optional-skills/creative/baoyu-comic/references/workflow.md
Full workflow for generating knowledge comics.
Copy and track progress:
Comic Progress:
- [ ] Step 1: Setup & Analyze
- [ ] 1.1 Analyze content
- [ ] 1.2 Check existing ⚠️ REQUIRED
- [ ] Step 2: Confirmation - Style & options ⚠️ REQUIRED
- [ ] Step 3: Generate storyboard + characters
- [ ] Step 4: Review outline (conditional)
- [ ] Step 5: Generate prompts
- [ ] Step 6: Review prompts (conditional)
- [ ] Step 7: Generate images
- [ ] 7.1 Character sheet (if needed)
- [ ] 7.2 Generate pages
- [ ] Step 8: Completion report
Input → Analyze → [Check Existing?] → [Confirm: Style + Reviews] → Storyboard → [Review Outline?] → Prompts → [Review Prompts?] → Images → Complete
analysis.mdRead source content, save it if needed, and perform deep analysis.
Actions:
source-{slug}.md in the target directory using write_file, where {slug} is the kebab-case topic slug used for the output directorysource-{slug}.md already exists, rename it to source-{slug}-backup-YYYYMMDD-HHMMSS.md before writinganalysis-framework.md:
analysis.md using write_fileanalysis.md Format: YAML front matter (title, topic, time_span, source_language, user_language, aspect_ratio, recommended_page_count, recommended_art, recommended_tone) + sections for Target Audience, Value Proposition, Core Themes, Key Figures & Story Arcs, Content Signals, Recommended Approaches. See analysis-framework.md for full template.
MUST execute before proceeding to Step 2.
Check if the output directory exists (e.g., via test -d "comic/{topic-slug}").
If directory exists, use clarify:
question: "Existing content found at comic/{topic-slug}. How to proceed?"
options:
- "Regenerate storyboard — Keep images, regenerate storyboard and characters only"
- "Regenerate images — Keep storyboard, regenerate images only"
- "Backup and regenerate — Backup to {slug}-backup-{timestamp}, then regenerate all"
- "Exit — Cancel, keep existing content unchanged"
Save result and handle accordingly:
prompts/ and imagesPurpose: Select visual style + decide whether to review outline before generation. Do NOT skip.
Display summary first:
Use clarify one question at a time, in priority order:
Timeout handling (CRITICAL): if
clarifyreturns"The user did not provide a response within the time limit. Use your best judgement...", that is a per-question default, NOT blanket consent. Continue to the next question in the sequence — do not bail out of Step 2. Then, in your next user-visible message, explicitly surface every default that was taken (e.g."Defaulted style → ohmsha, narrative focus → concept explanation, audience → developers (clarify timed out on all three). Say the word to redirect."). An unreported default is indistinguishable to the user from "the agent never asked."
If a preset is recommended (see auto-selection.md), show it first:
question: "Which visual style for this comic?"
options:
- "[preset name] preset (Recommended) — [preset description] with special rules"
- "[recommended art] + [recommended tone] (Recommended) — Best match for your content"
- "ligne-claire + neutral — Classic educational, Logicomix style"
- "ohmsha preset — Educational manga with visual metaphors, gadgets, NO talking heads"
- "Custom — Specify your own art + tone or preset"
Preset vs Art+Tone: Presets include special rules beyond art+tone. ohmsha = manga + neutral + visual metaphor rules + character roles + NO talking heads. Plain manga + neutral does NOT include these rules.
question: "What should the comic emphasize? (Pick the primary focus; mention others in a follow-up if needed)"
options:
- "Biography/life story — Follow a person's journey through key life events"
- "Concept explanation — Break down complex ideas visually"
- "Historical event — Dramatize important historical moments"
- "Tutorial/how-to — Step-by-step educational guide"
question: "Who is the primary reader?"
options:
- "General readers — Broad appeal, accessible content"
- "Students/learners — Educational focus, clear explanations"
- "Industry professionals — Technical depth, domain knowledge"
- "Children/young readers — Simplified language, engaging visuals"
question: "Do you want to review the outline before image generation?"
options:
- "Yes, let me review (Recommended) — Review storyboard and characters before generating images"
- "No, generate directly — Skip outline review, start generating immediately"
question: "Review prompts before generating images?"
options:
- "Yes, review prompts (Recommended) — Review image generation prompts before generating"
- "No, skip prompt review — Proceed directly to image generation"
After responses:
analysis.md with user preferencesskip_outline_review flag based on Question 4 responseskip_prompt_review flag based on Question 5 responseCreate storyboard and character definitions using the confirmed style from Step 2.
Loading Style References:
art-styles/{art}.mdtones/{tone}.mdpresets/{preset}.mdGenerate:
Storyboard (storyboard.md):
storyboard-template.mdpresets/Character definitions (characters/characters.md):
character-template.mdOhmsha Default Characters (use these unless user specifies custom characters):
| Role | Character | Visual Description |
|---|---|---|
| Student | 大雄 (Nobita) | Japanese boy, 10yo, round glasses, black hair parted in middle, yellow shirt, navy shorts |
| Mentor | 哆啦 A 梦 (Doraemon) | Round blue robot cat, big white eyes, red nose, whiskers, white belly with 4D pocket, golden bell, no ears |
| Challenge | 胖虎 (Gian) | Stocky boy, rough features, small eyes, orange shirt |
| Support | 静香 (Shizuka) | Cute girl, black short hair, pink dress, gentle expression |
These are the canonical ohmsha-style characters. Do NOT create custom characters for ohmsha unless explicitly requested.
After generation:
skip_outline_review is true → Skip Step 4, go directly to Step 5skip_outline_review is false → Continue to Step 4Skip this step if user selected "No, generate directly" in Step 2.
Purpose: User reviews and confirms storyboard + characters before generation.
Display:
Use clarify:
question: "Ready to generate images with this outline?"
options:
- "Yes, proceed (Recommended) — Generate character sheet and comic pages"
- "Edit storyboard first — I'll modify storyboard.md before continuing"
- "Edit characters first — I'll modify characters/characters.md before continuing"
- "Edit both — I'll modify both files before continuing"
After response:
Create image generation prompts for all pages.
Style Reference Loading:
art-styles/{art}.md for rendering guidelinestones/{tone}.md for mood/color adjustmentspresets/{preset}.md for special rulesFor each page (cover + pages):
characters/characters.md) — image_generate is prompt-only, so the prompt text is the sole vehicle for character consistencyprompts/NN-{cover|page}-[slug].md using write_file
prompts/NN-{cover|page}-[slug]-backup-YYYYMMDD-HHMMSS.mdPrompt File Format:
# Page NN: [Title]
## Visual Style
Art: [art style] | Tone: [tone] | Layout: [layout type]
## Character Reference (embedded inline — maintain exact traits below)
- [Character A]: [detailed visual traits from characters/characters.md]
- [Character B]: [detailed visual traits from characters/characters.md]
## Panel Breakdown
[From storyboard.md - panel descriptions, actions, dialogue]
## Generation Prompt
[Combined prompt passed to image_generate]
After generation:
skip_prompt_review is true → Skip Step 6, go directly to Step 7skip_prompt_review is false → Continue to Step 6Skip this step if user selected "No, skip prompt review" in Step 2.
Purpose: User reviews and confirms prompts before image generation.
Display prompt summary table:
| Page | Title | Key Elements |
|---|---|---|
| Cover | [title] | [main visual] |
| P1 | [title] | [key elements] |
| ... | ... | ... |
Use clarify:
question: "Ready to generate images with these prompts?"
options:
- "Yes, proceed (Recommended) — Generate all comic page images"
- "Edit prompts first — I'll modify prompts/*.md before continuing"
- "Regenerate prompts — Regenerate all prompts with different approach"
After response:
With confirmed prompts from Step 5/6, use the image_generate tool. The tool accepts only prompt and aspect_ratio (landscape | portrait | square) and returns a URL — it does not accept reference images and does not write local files. Every invocation must be followed by a download step.
Aspect ratio mapping — map the storyboard's aspect_ratio to the tool's enum:
| Storyboard ratio | image_generate format |
|---|---|
3:4, 9:16, 2:3 | portrait |
4:3, 16:9, 3:2 | landscape |
1:1 | square |
Download procedure (run after every successful image_generate call):
url field from the tool resultcurl -fsSL "<url>" -o comic/{slug}/<target>.pngtest -s <target>.png); on failure, retry the generation onceCharacter sheet is recommended for multi-page comics with recurring characters, but NOT required for all presets.
When to generate:
| Condition | Action |
|---|---|
| Multi-page comic with detailed/recurring characters | Generate character sheet (recommended) |
| Preset with simplified characters (e.g., four-panel minimalist) | Skip — prompt descriptions are sufficient |
| Single-page comic | Skip unless characters are complex |
When generating:
characters/characters.mdcharacters/characters.png exists, rename to characters/characters-backup-YYYYMMDD-HHMMSS.pngimage_generate with landscape formatcharacters/characters.pngImportant: the downloaded sheet is a human-facing review artifact (so the user can visually verify character design) and a reference for later regenerations or manual prompt edits. It does not drive Step 7.2 — page prompts were already written in Step 5 from the text descriptions in characters/characters.md. image_generate cannot accept images as visual input, so the text is the sole cross-page consistency mechanism.
Before generating any page:
prompts/NN-{cover|page}-[slug].mdimage_generate is prompt-only, so the prompt text is the sole consistency mechanism.Page Generation Strategy: every page prompt must embed character descriptions (sourced from characters/characters.md) inline. This is done during Step 5, uniformly whether or not the PNG sheet was produced in 7.1 — the PNG is only a review/regeneration aid, never a generation input.
Example embedded prompt (prompts/01-page-xxx.md):
# Page 01: [Title]
## Character Reference (embedded inline — maintain consistency)
- 大雄:Japanese boy, round glasses, yellow shirt, navy shorts, worried expression...
- 哆啦 A 梦:Round blue robot cat, white belly, red nose, golden bell, 4D pocket...
## Page Content
[Original page prompt body — panels, dialogue, visual metaphors]
For each page (cover + pages):
prompts/NN-{cover|page}-[slug].mdNN-{cover|page}-[slug]-backup-YYYYMMDD-HHMMSS.pngimage_generate with the prompt text and mapped aspect ratioNN-{cover|page}-[slug].pngComic Complete!
Title: [title] | Art: [art] | Tone: [tone] | Pages: [count] | Aspect: [ratio] | Language: [lang]
Location: [path]
✓ source-{slug}.md (if content was pasted)
✓ analysis.md
✓ characters.png (if generated)
✓ 00-cover-[slug].png ... NN-page-[slug].png
| Action | Steps |
|---|---|
| Edit | Update prompt → Regenerate image → Download new PNG |
| Add | Create prompt at position → Generate image → Download PNG → Renumber subsequent (NN+1) → Update storyboard |
| Delete | Remove files → Renumber subsequent (NN-1) → Update storyboard |
File naming: NN-{cover|page}-[slug].png (e.g., 03-page-enigma-machine.png)