
Index & Describe an Image Set
Given a folder of images, produce a structured index that describes each one (caption, tags, notable content) in a consistent schema, then validates coverage and consistency. For cataloguing, search, or alt-text generation over an image collection.
Steps
Entry step: scope. Each step names the specialist role it wants; the full working prompt is expandable.
- Scope the indexplannerentry
fields per image + output schema + criteria
Show working prompt
Decide the index schema before describing anything: which fields per image (filename, caption, tags, dominant colors, any flags), the output format (JSON/CSV/markdown table), and where it lands. Write an **acceptance-criteria checklist** ("every image in the folder has a row", "captions are 1-2 sentences", "tags are from a consistent vocabulary"). `write_task_note` the schema + checklist. - Describe each imagedeveloper
read each image, write structured descriptions
Show working prompt
List the image folder, then for each image use the image-reading capability (e.g. `read_image_as_base64` + a vision-capable turn, or the available describe tool) to produce the fields from the schema. Keep the vocabulary consistent across images. Stage results as you go so progress is observable. Do not skip images.
- Assemble the indexdeveloper
write the index file in the chosen format
Show working prompt
Write the full index to a single file in the chosen format. Ensure it parses (valid JSON/CSV). On a loop-back, fix only the named gaps (missing rows, inconsistent tags). `write_task_note` the index path and a coverage count (rows vs images).
- Evaluatereviewer
Grade the deliverable against every acceptance criterion. All pass → finish; any fail → loop back and fix the gap.
Show working prompt
Check coverage and consistency: does every image have a row, do captions/tags follow the schema and a consistent vocabulary, does the file parse? Spot-check a few descriptions against the actual images if you can. Write PASS/FAIL per criterion. Then route — this is the whole point of the loop: - **Every criterion PASSES →** call `advance_task_step({ ref, stepId: "evaluate", next: "finish" })`. - **Any criterion FAILS →** write the specific gaps to notes, then call `advance_task_step({ ref, stepId: "evaluate", next: "assemble" })` to loop back. The builder fixes exactly those gaps. Never route to `finish` while any criterion is unmet. If you advance without a target, the loop sends you back by design. After ~3 unproductive loops, stop and report DONE_WITH_CONCERNS so the user can step in. - Finishdeveloper
All acceptance criteria met. Stamp a short summary and report DONE.
Show working prompt
Every criterion passed. Write a DONE summary: index path, format, image count, and a one-line note that coverage is complete and the schema is consistent.
Triggers
Phrases that suggest this craftbook to a crew.
- index images
- describe images
- caption a folder
- image catalog
Source
View this craftbook on GitHub · MIT license