mindforge-cc 11.5.1 → 11.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/.agent/mindforge/skill-tdd.md +53 -0
  2. package/.agent/mindforge/skills-index.md +118 -0
  3. package/.agent/mindforge/systematic-debug.md +60 -0
  4. package/.agent/skills/1password-skill/SKILL.md +156 -0
  5. package/.agent/skills/1password-skill/references/cli-examples.md +31 -0
  6. package/.agent/skills/1password-skill/references/get-started.md +21 -0
  7. package/.agent/skills/article-illustrator/SKILL.md +199 -0
  8. package/.agent/skills/article-illustrator/references/prompt-construction.md +426 -0
  9. package/.agent/skills/article-illustrator/references/style-presets.md +80 -0
  10. package/.agent/skills/article-illustrator/references/styles.md +224 -0
  11. package/.agent/skills/article-illustrator/references/usage.md +50 -0
  12. package/.agent/skills/article-illustrator/references/workflow.md +332 -0
  13. package/.agent/skills/arxiv/SKILL.md +275 -0
  14. package/.agent/skills/blogwatcher/SKILL.md +130 -0
  15. package/.agent/skills/code-wiki/SKILL.md +438 -0
  16. package/.agent/skills/code-wiki/templates/README.md +31 -0
  17. package/.agent/skills/code-wiki/templates/architecture.md +30 -0
  18. package/.agent/skills/code-wiki/templates/getting-started.md +47 -0
  19. package/.agent/skills/code-wiki/templates/module.md +38 -0
  20. package/.agent/skills/codebase-inspection/SKILL.md +109 -0
  21. package/.agent/skills/comic-creator/SKILL.md +240 -0
  22. package/.agent/skills/comic-creator/references/analysis-framework.md +176 -0
  23. package/.agent/skills/comic-creator/references/auto-selection.md +71 -0
  24. package/.agent/skills/comic-creator/references/base-prompt.md +98 -0
  25. package/.agent/skills/comic-creator/references/character-template.md +180 -0
  26. package/.agent/skills/comic-creator/references/ohmsha-guide.md +85 -0
  27. package/.agent/skills/comic-creator/references/partial-workflows.md +106 -0
  28. package/.agent/skills/comic-creator/references/storyboard-template.md +143 -0
  29. package/.agent/skills/comic-creator/references/workflow.md +401 -0
  30. package/.agent/skills/concept-diagrams/SKILL.md +355 -0
  31. package/.agent/skills/concept-diagrams/references/dashboard-patterns.md +43 -0
  32. package/.agent/skills/concept-diagrams/references/infrastructure-patterns.md +144 -0
  33. package/.agent/skills/concept-diagrams/references/physical-shape-cookbook.md +42 -0
  34. package/.agent/skills/creative-ideation/SKILL.md +144 -0
  35. package/.agent/skills/creative-ideation/references/full-prompt-library.md +110 -0
  36. package/.agent/skills/devops-cli/SKILL.md +149 -0
  37. package/.agent/skills/devops-cli/references/app-discovery.md +112 -0
  38. package/.agent/skills/devops-cli/references/authentication.md +59 -0
  39. package/.agent/skills/devops-cli/references/cli-reference.md +104 -0
  40. package/.agent/skills/devops-cli/references/running-apps.md +171 -0
  41. package/.agent/skills/devops-watchers/SKILL.md +103 -0
  42. package/.agent/skills/docker-management/SKILL.md +273 -0
  43. package/.agent/skills/domain-intel/SKILL.md +96 -0
  44. package/.agent/skills/duckduckgo-search/SKILL.md +230 -0
  45. package/.agent/skills/github-auth/SKILL.md +240 -0
  46. package/.agent/skills/github-code-review/SKILL.md +474 -0
  47. package/.agent/skills/github-code-review/references/review-output-template.md +74 -0
  48. package/.agent/skills/github-issues/SKILL.md +363 -0
  49. package/.agent/skills/github-issues/templates/bug-report.md +35 -0
  50. package/.agent/skills/github-issues/templates/feature-request.md +31 -0
  51. package/.agent/skills/github-pr-workflow/SKILL.md +360 -0
  52. package/.agent/skills/github-pr-workflow/references/ci-troubleshooting.md +183 -0
  53. package/.agent/skills/github-pr-workflow/references/conventional-commits.md +71 -0
  54. package/.agent/skills/github-pr-workflow/templates/pr-body-bugfix.md +35 -0
  55. package/.agent/skills/github-pr-workflow/templates/pr-body-feature.md +33 -0
  56. package/.agent/skills/github-repo-management/SKILL.md +509 -0
  57. package/.agent/skills/github-repo-management/references/github-api-cheatsheet.md +161 -0
  58. package/.agent/skills/godmode/SKILL.md +396 -0
  59. package/.agent/skills/godmode/references/jailbreak-templates.md +128 -0
  60. package/.agent/skills/godmode/references/refusal-detection.md +142 -0
  61. package/.agent/skills/hyperframes/SKILL.md +182 -0
  62. package/.agent/skills/hyperframes/references/cli.md +185 -0
  63. package/.agent/skills/hyperframes/references/composition.md +129 -0
  64. package/.agent/skills/hyperframes/references/features.md +289 -0
  65. package/.agent/skills/hyperframes/references/gsap.md +136 -0
  66. package/.agent/skills/hyperframes/references/troubleshooting.md +137 -0
  67. package/.agent/skills/hyperframes/references/website-to-video.md +145 -0
  68. package/.agent/skills/jupyter-live-kernel/SKILL.md +160 -0
  69. package/.agent/skills/kanban-orchestrator/SKILL.md +209 -0
  70. package/.agent/skills/kanban-worker/SKILL.md +188 -0
  71. package/.agent/skills/llm-wiki/SKILL.md +499 -0
  72. package/.agent/skills/meme-generation/SKILL.md +122 -0
  73. package/.agent/skills/node-inspect-debugger/SKILL.md +312 -0
  74. package/.agent/skills/obsidian/SKILL.md +60 -0
  75. package/.agent/skills/osint-investigation/SKILL.md +269 -0
  76. package/.agent/skills/osint-investigation/templates/source-template.md +59 -0
  77. package/.agent/skills/oss-forensics/SKILL.md +422 -0
  78. package/.agent/skills/oss-forensics/references/evidence-types.md +89 -0
  79. package/.agent/skills/oss-forensics/references/github-archive-guide.md +184 -0
  80. package/.agent/skills/oss-forensics/references/investigation-templates.md +131 -0
  81. package/.agent/skills/oss-forensics/references/recovery-techniques.md +164 -0
  82. package/.agent/skills/oss-forensics/templates/forensic-report.md +151 -0
  83. package/.agent/skills/oss-forensics/templates/malicious-package-report.md +43 -0
  84. package/.agent/skills/parallel-cli/SKILL.md +384 -0
  85. package/.agent/skills/pinggy-tunnel/SKILL.md +302 -0
  86. package/.agent/skills/pixel-art/SKILL.md +209 -0
  87. package/.agent/skills/pixel-art/references/palettes.md +49 -0
  88. package/.agent/skills/plan/SKILL.md +331 -0
  89. package/.agent/skills/polymarket/SKILL.md +75 -0
  90. package/.agent/skills/polymarket/references/api-endpoints.md +220 -0
  91. package/.agent/skills/python-debugpy/SKILL.md +368 -0
  92. package/.agent/skills/requesting-code-review/SKILL.md +273 -0
  93. package/.agent/skills/research-paper-writing/SKILL.md +2367 -0
  94. package/.agent/skills/research-paper-writing/references/autoreason-methodology.md +394 -0
  95. package/.agent/skills/research-paper-writing/references/checklists.md +434 -0
  96. package/.agent/skills/research-paper-writing/references/citation-workflow.md +563 -0
  97. package/.agent/skills/research-paper-writing/references/experiment-patterns.md +728 -0
  98. package/.agent/skills/research-paper-writing/references/human-evaluation.md +476 -0
  99. package/.agent/skills/research-paper-writing/references/paper-types.md +481 -0
  100. package/.agent/skills/research-paper-writing/references/reviewer-guidelines.md +433 -0
  101. package/.agent/skills/research-paper-writing/references/sources.md +191 -0
  102. package/.agent/skills/research-paper-writing/references/writing-guide.md +474 -0
  103. package/.agent/skills/research-paper-writing/templates/README.md +251 -0
  104. package/.agent/skills/rest-graphql-debug/SKILL.md +507 -0
  105. package/.agent/skills/s6-container-supervision/SKILL.md +171 -0
  106. package/.agent/skills/scrapling/SKILL.md +328 -0
  107. package/.agent/skills/sherlock/SKILL.md +186 -0
  108. package/.agent/skills/simplify-code/SKILL.md +168 -0
  109. package/.agent/skills/skill-authoring/SKILL.md +158 -0
  110. package/.agent/skills/spike/SKILL.md +190 -0
  111. package/.agent/skills/subagent-driven-development/SKILL.md +345 -0
  112. package/.agent/skills/subagent-driven-development/references/context-budget-discipline.md +53 -0
  113. package/.agent/skills/subagent-driven-development/references/gates-taxonomy.md +93 -0
  114. package/.agent/skills/systematic-debugging/SKILL.md +360 -0
  115. package/.agent/skills/test-driven-development/SKILL.md +336 -0
  116. package/.agent/skills/video-orchestrator/SKILL.md +194 -0
  117. package/.agent/skills/video-orchestrator/references/examples.md +227 -0
  118. package/.agent/skills/video-orchestrator/references/intake.md +166 -0
  119. package/.agent/skills/video-orchestrator/references/kanban-setup.md +278 -0
  120. package/.agent/skills/video-orchestrator/references/monitoring.md +180 -0
  121. package/.agent/skills/video-orchestrator/references/role-archetypes.md +298 -0
  122. package/.agent/skills/video-orchestrator/references/tool-matrix.md +317 -0
  123. package/.agent/skills/web-pentest/SKILL.md +332 -0
  124. package/.agent/skills/web-pentest/references/bypass-techniques.md +133 -0
  125. package/.agent/skills/web-pentest/references/exploitation-techniques.md +204 -0
  126. package/.agent/skills/web-pentest/references/scope-enforcement.md +110 -0
  127. package/.agent/skills/web-pentest/references/vuln-taxonomy.md +81 -0
  128. package/.agent/skills/web-pentest/templates/authorization.md +69 -0
  129. package/.agent/skills/web-pentest/templates/pentest-report.md +178 -0
  130. package/.claude/commands/mindforge/skill-tdd.md +53 -0
  131. package/.claude/commands/mindforge/skills-index.md +118 -0
  132. package/.claude/commands/mindforge/systematic-debug.md +60 -0
  133. package/.mindforge/config.json +2 -2
  134. package/.mindforge/memory/sync-manifest.json +1 -1
  135. package/.mindforge/skills/arxiv/SKILL.md +294 -0
  136. package/.mindforge/skills/blogwatcher/SKILL.md +147 -0
  137. package/.mindforge/skills/code-wiki/SKILL.md +457 -0
  138. package/.mindforge/skills/codebase-inspection/SKILL.md +126 -0
  139. package/.mindforge/skills/concept-diagrams/SKILL.md +373 -0
  140. package/.mindforge/skills/creative-ideation/SKILL.md +162 -0
  141. package/.mindforge/skills/domain-intel/SKILL.md +116 -0
  142. package/.mindforge/skills/duckduckgo-search/SKILL.md +249 -0
  143. package/.mindforge/skills/github-code-review/SKILL.md +493 -0
  144. package/.mindforge/skills/github-issues/SKILL.md +382 -0
  145. package/.mindforge/skills/github-pr-workflow/SKILL.md +379 -0
  146. package/.mindforge/skills/jupyter-live-kernel/SKILL.md +179 -0
  147. package/.mindforge/skills/kanban-orchestrator/SKILL.md +227 -0
  148. package/.mindforge/skills/kanban-worker/SKILL.md +206 -0
  149. package/.mindforge/skills/meme-generation/SKILL.md +141 -0
  150. package/.mindforge/skills/obsidian/SKILL.md +80 -0
  151. package/.mindforge/skills/osint-investigation/SKILL.md +288 -0
  152. package/.mindforge/skills/oss-forensics/SKILL.md +421 -0
  153. package/.mindforge/skills/pixel-art/SKILL.md +228 -0
  154. package/.mindforge/skills/plan/SKILL.md +350 -0
  155. package/.mindforge/skills/requesting-code-review/SKILL.md +292 -0
  156. package/.mindforge/skills/research-paper-writing/SKILL.md +2384 -0
  157. package/.mindforge/skills/scrapling/SKILL.md +345 -0
  158. package/.mindforge/skills/sherlock/SKILL.md +203 -0
  159. package/.mindforge/skills/simplify-code/SKILL.md +187 -0
  160. package/.mindforge/skills/spike/SKILL.md +209 -0
  161. package/.mindforge/skills/subagent-driven-development/SKILL.md +364 -0
  162. package/.mindforge/skills/systematic-debugging/SKILL.md +379 -0
  163. package/.mindforge/skills/test-driven-development/SKILL.md +355 -0
  164. package/.mindforge/skills/web-pentest/SKILL.md +327 -0
  165. package/CHANGELOG.md +43 -0
  166. package/MINDFORGE.md +2 -2
  167. package/README.md +39 -3
  168. package/RELEASENOTES.md +55 -0
  169. package/docs/getting-started.md +42 -5
  170. package/package.json +1 -1
@@ -0,0 +1,401 @@
1
+ # Complete Workflow
2
+
3
+ Full workflow for generating knowledge comics.
4
+
5
+ ## Progress Checklist
6
+
7
+ Copy and track progress:
8
+
9
+ ```
10
+ Comic Progress:
11
+ - [ ] Step 1: Setup & Analyze
12
+ - [ ] 1.1 Analyze content
13
+ - [ ] 1.2 Check existing ⚠️ REQUIRED
14
+ - [ ] Step 2: Confirmation - Style & options ⚠️ REQUIRED
15
+ - [ ] Step 3: Generate storyboard + characters
16
+ - [ ] Step 4: Review outline (conditional)
17
+ - [ ] Step 5: Generate prompts
18
+ - [ ] Step 6: Review prompts (conditional)
19
+ - [ ] Step 7: Generate images
20
+ - [ ] 7.1 Character sheet (if needed)
21
+ - [ ] 7.2 Generate pages
22
+ - [ ] Step 8: Completion report
23
+ ```
24
+
25
+ ## Flow Diagram
26
+
27
+ ```
28
+ Input → Analyze → [Check Existing?] → [Confirm: Style + Reviews] → Storyboard → [Review Outline?] → Prompts → [Review Prompts?] → Images → Complete
29
+ ```
30
+
31
+ ---
32
+
33
+ ## Step 1: Setup & Analyze
34
+
35
+ ### 1.1 Analyze Content → `analysis.md`
36
+
37
+ Read source content, save it if needed, and perform deep analysis.
38
+
39
+ **Actions**:
40
+ 1. **Save source content** (if not already a file):
41
+ - If user provides a file path: use as-is
42
+ - If user pastes content: save to `source-{slug}.md` in the target directory using `write_file`, where `{slug}` is the kebab-case topic slug used for the output directory
43
+ - **Backup rule**: If `source-{slug}.md` already exists, rename it to `source-{slug}-backup-YYYYMMDD-HHMMSS.md` before writing
44
+ 2. Read source content
45
+ 3. **Deep analysis** following `analysis-framework.md`:
46
+ - Target audience identification
47
+ - Value proposition for readers
48
+ - Core themes and narrative potential
49
+ - Key figures and their story arcs
50
+ 4. Detect source language
51
+ 5. **Determine language**:
52
+ - If user specified a language → use it
53
+ - Else → use detected source language or user's conversation language
54
+ 6. Determine recommended page count:
55
+ - Short story: 5-8 pages
56
+ - Medium complexity: 9-15 pages
57
+ - Full biography: 16-25 pages
58
+ 7. Analyze content signals for art/tone/layout recommendations
59
+ 8. **Save to `analysis.md`** using `write_file`
60
+
61
+ **analysis.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.
62
+
63
+ ### 1.2 Check Existing Content ⚠️ REQUIRED
64
+
65
+ **MUST execute before proceeding to Step 2.**
66
+
67
+ Check if the output directory exists (e.g., via `test -d "comic/{topic-slug}"`).
68
+
69
+ **If directory exists**, use `clarify`:
70
+
71
+ ```
72
+ question: "Existing content found at comic/{topic-slug}. How to proceed?"
73
+ options:
74
+ - "Regenerate storyboard — Keep images, regenerate storyboard and characters only"
75
+ - "Regenerate images — Keep storyboard, regenerate images only"
76
+ - "Backup and regenerate — Backup to {slug}-backup-{timestamp}, then regenerate all"
77
+ - "Exit — Cancel, keep existing content unchanged"
78
+ ```
79
+
80
+ Save result and handle accordingly:
81
+ - **Regenerate storyboard**: Skip to Step 3, preserve `prompts/` and images
82
+ - **Regenerate images**: Skip to Step 7, use existing prompts
83
+ - **Backup and regenerate**: Move directory, start fresh from Step 2
84
+ - **Exit**: End workflow immediately
85
+
86
+ ---
87
+
88
+ ## Step 2: Confirmation - Style & Options ⚠️
89
+
90
+ **Purpose**: Select visual style + decide whether to review outline before generation. **Do NOT skip.**
91
+
92
+ **Display summary first**:
93
+ - Content type + topic identified
94
+ - Key figures extracted
95
+ - Time span detected
96
+ - Recommended page count
97
+ - Language (detected or user-specified)
98
+ - **Recommended style**: [art] + [tone] (based on content signals)
99
+
100
+ **Use `clarify` one question at a time**, in priority order:
101
+
102
+ > **Timeout handling (CRITICAL)**: if `clarify` returns `"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."
103
+
104
+ ### Question 1: Visual Style
105
+
106
+ If a preset is recommended (see `auto-selection.md`), show it first:
107
+
108
+ ```
109
+ question: "Which visual style for this comic?"
110
+ options:
111
+ - "[preset name] preset (Recommended) — [preset description] with special rules"
112
+ - "[recommended art] + [recommended tone] (Recommended) — Best match for your content"
113
+ - "ligne-claire + neutral — Classic educational, Logicomix style"
114
+ - "ohmsha preset — Educational manga with visual metaphors, gadgets, NO talking heads"
115
+ - "Custom — Specify your own art + tone or preset"
116
+ ```
117
+
118
+ **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.
119
+
120
+ ### Question 2: Narrative Focus
121
+
122
+ ```
123
+ question: "What should the comic emphasize? (Pick the primary focus; mention others in a follow-up if needed)"
124
+ options:
125
+ - "Biography/life story — Follow a person's journey through key life events"
126
+ - "Concept explanation — Break down complex ideas visually"
127
+ - "Historical event — Dramatize important historical moments"
128
+ - "Tutorial/how-to — Step-by-step educational guide"
129
+ ```
130
+
131
+ ### Question 3: Target Audience
132
+
133
+ ```
134
+ question: "Who is the primary reader?"
135
+ options:
136
+ - "General readers — Broad appeal, accessible content"
137
+ - "Students/learners — Educational focus, clear explanations"
138
+ - "Industry professionals — Technical depth, domain knowledge"
139
+ - "Children/young readers — Simplified language, engaging visuals"
140
+ ```
141
+
142
+ ### Question 4: Outline Review
143
+
144
+ ```
145
+ question: "Do you want to review the outline before image generation?"
146
+ options:
147
+ - "Yes, let me review (Recommended) — Review storyboard and characters before generating images"
148
+ - "No, generate directly — Skip outline review, start generating immediately"
149
+ ```
150
+
151
+ ### Question 5: Prompt Review
152
+
153
+ ```
154
+ question: "Review prompts before generating images?"
155
+ options:
156
+ - "Yes, review prompts (Recommended) — Review image generation prompts before generating"
157
+ - "No, skip prompt review — Proceed directly to image generation"
158
+ ```
159
+
160
+ **After responses**:
161
+ 1. Update `analysis.md` with user preferences
162
+ 2. **Store `skip_outline_review`** flag based on Question 4 response
163
+ 3. **Store `skip_prompt_review`** flag based on Question 5 response
164
+ 4. → Step 3
165
+
166
+ ---
167
+
168
+ ## Step 3: Generate Storyboard + Characters
169
+
170
+ Create storyboard and character definitions using the confirmed style from Step 2.
171
+
172
+ **Loading Style References**:
173
+ - Art style: `art-styles/{art}.md`
174
+ - Tone: `tones/{tone}.md`
175
+ - If preset (ohmsha/wuxia/shoujo/concept-story/four-panel): also load `presets/{preset}.md`
176
+
177
+ **Generate**:
178
+
179
+ 1. **Storyboard** (`storyboard.md`):
180
+ - YAML front matter with art_style, tone, layout, aspect_ratio
181
+ - Cover design
182
+ - Each page: layout, panel breakdown, visual prompts
183
+ - **Written in user's preferred language** (from Step 1)
184
+ - Reference: `storyboard-template.md`
185
+ - **If using preset**: Load and apply preset rules from `presets/`
186
+
187
+ 2. **Character definitions** (`characters/characters.md`):
188
+ - Visual specs matching the art style (in user's preferred language)
189
+ - Include Reference Sheet Prompt for later image generation
190
+ - Reference: `character-template.md`
191
+ - **If using ohmsha preset**: Use default Doraemon characters (see below)
192
+
193
+ **Ohmsha Default Characters** (use these unless user specifies custom characters):
194
+
195
+ | Role | Character | Visual Description |
196
+ |------|-----------|-------------------|
197
+ | Student | 大雄 (Nobita) | Japanese boy, 10yo, round glasses, black hair parted in middle, yellow shirt, navy shorts |
198
+ | Mentor | 哆啦 A 梦 (Doraemon) | Round blue robot cat, big white eyes, red nose, whiskers, white belly with 4D pocket, golden bell, no ears |
199
+ | Challenge | 胖虎 (Gian) | Stocky boy, rough features, small eyes, orange shirt |
200
+ | Support | 静香 (Shizuka) | Cute girl, black short hair, pink dress, gentle expression |
201
+
202
+ These are the canonical ohmsha-style characters. Do NOT create custom characters for ohmsha unless explicitly requested.
203
+
204
+ **After generation**:
205
+ - If `skip_outline_review` is true → Skip Step 4, go directly to Step 5
206
+ - If `skip_outline_review` is false → Continue to Step 4
207
+
208
+ ---
209
+
210
+ ## Step 4: Review Outline (Conditional)
211
+
212
+ **Skip this step** if user selected "No, generate directly" in Step 2.
213
+
214
+ **Purpose**: User reviews and confirms storyboard + characters before generation.
215
+
216
+ **Display**:
217
+ - Page count and structure
218
+ - Art style + Tone combination
219
+ - Page-by-page summary (Cover → P1 → P2...)
220
+ - Character list with brief descriptions
221
+
222
+ **Use `clarify`**:
223
+
224
+ ```
225
+ question: "Ready to generate images with this outline?"
226
+ options:
227
+ - "Yes, proceed (Recommended) — Generate character sheet and comic pages"
228
+ - "Edit storyboard first — I'll modify storyboard.md before continuing"
229
+ - "Edit characters first — I'll modify characters/characters.md before continuing"
230
+ - "Edit both — I'll modify both files before continuing"
231
+ ```
232
+
233
+ **After response**:
234
+ 1. If user wants to edit → Wait for user to finish editing, then ask again
235
+ 2. If user confirms → Continue to Step 5
236
+
237
+ ---
238
+
239
+ ## Step 5: Generate Prompts
240
+
241
+ Create image generation prompts for all pages.
242
+
243
+ **Style Reference Loading**:
244
+ - Read `art-styles/{art}.md` for rendering guidelines
245
+ - Read `tones/{tone}.md` for mood/color adjustments
246
+ - If preset: Read `presets/{preset}.md` for special rules
247
+
248
+ **For each page (cover + pages)**:
249
+ 1. Create prompt following art style + tone guidelines
250
+ 2. **Embed character descriptions** inline (copy relevant traits from `characters/characters.md`) — `image_generate` is prompt-only, so the prompt text is the sole vehicle for character consistency
251
+ 3. Save to `prompts/NN-{cover|page}-[slug].md` using `write_file`
252
+ - **Backup rule**: If prompt file exists, rename to `prompts/NN-{cover|page}-[slug]-backup-YYYYMMDD-HHMMSS.md`
253
+
254
+ **Prompt File Format**:
255
+ ```markdown
256
+ # Page NN: [Title]
257
+
258
+ ## Visual Style
259
+ Art: [art style] | Tone: [tone] | Layout: [layout type]
260
+
261
+ ## Character Reference (embedded inline — maintain exact traits below)
262
+ - [Character A]: [detailed visual traits from characters/characters.md]
263
+ - [Character B]: [detailed visual traits from characters/characters.md]
264
+
265
+ ## Panel Breakdown
266
+ [From storyboard.md - panel descriptions, actions, dialogue]
267
+
268
+ ## Generation Prompt
269
+ [Combined prompt passed to image_generate]
270
+ ```
271
+
272
+ **After generation**:
273
+ - If `skip_prompt_review` is true → Skip Step 6, go directly to Step 7
274
+ - If `skip_prompt_review` is false → Continue to Step 6
275
+
276
+ ---
277
+
278
+ ## Step 6: Review Prompts (Conditional)
279
+
280
+ **Skip this step** if user selected "No, skip prompt review" in Step 2.
281
+
282
+ **Purpose**: User reviews and confirms prompts before image generation.
283
+
284
+ **Display prompt summary table**:
285
+
286
+ | Page | Title | Key Elements |
287
+ |------|-------|--------------|
288
+ | Cover | [title] | [main visual] |
289
+ | P1 | [title] | [key elements] |
290
+ | ... | ... | ... |
291
+
292
+ **Use `clarify`**:
293
+
294
+ ```
295
+ question: "Ready to generate images with these prompts?"
296
+ options:
297
+ - "Yes, proceed (Recommended) — Generate all comic page images"
298
+ - "Edit prompts first — I'll modify prompts/*.md before continuing"
299
+ - "Regenerate prompts — Regenerate all prompts with different approach"
300
+ ```
301
+
302
+ **After response**:
303
+ 1. If user wants to edit → Wait for user to finish editing, then ask again
304
+ 2. If user wants to regenerate → Go back to Step 5
305
+ 3. If user confirms → Continue to Step 7
306
+
307
+ ---
308
+
309
+ ## Step 7: Generate Images
310
+
311
+ 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.
312
+
313
+ **Aspect ratio mapping** — map the storyboard's `aspect_ratio` to the tool's enum:
314
+
315
+ | Storyboard ratio | `image_generate` format |
316
+ |------------------|-------------------------|
317
+ | `3:4`, `9:16`, `2:3` | `portrait` |
318
+ | `4:3`, `16:9`, `3:2` | `landscape` |
319
+ | `1:1` | `square` |
320
+
321
+ **Download procedure** (run after every successful `image_generate` call):
322
+
323
+ 1. Extract the `url` field from the tool result
324
+ 2. Fetch it to disk, e.g. `curl -fsSL "<url>" -o comic/{slug}/<target>.png`
325
+ 3. Verify the file is non-empty (`test -s <target>.png`); on failure, retry the generation once
326
+
327
+ ### 7.1 Generate Character Reference Sheet (conditional)
328
+
329
+ Character sheet is recommended for multi-page comics with recurring characters, but **NOT required** for all presets.
330
+
331
+ **When to generate**:
332
+
333
+ | Condition | Action |
334
+ |-----------|--------|
335
+ | Multi-page comic with detailed/recurring characters | Generate character sheet (recommended) |
336
+ | Preset with simplified characters (e.g., four-panel minimalist) | Skip — prompt descriptions are sufficient |
337
+ | Single-page comic | Skip unless characters are complex |
338
+
339
+ **When generating**:
340
+ 1. Use Reference Sheet Prompt from `characters/characters.md`
341
+ 2. **Backup rule**: If `characters/characters.png` exists, rename to `characters/characters-backup-YYYYMMDD-HHMMSS.png`
342
+ 3. Call `image_generate` with `landscape` format
343
+ 4. Download the returned URL → save to `characters/characters.png`
344
+
345
+ **Important**: 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.
346
+
347
+ ### 7.2 Generate Comic Pages
348
+
349
+ **Before generating any page**:
350
+ 1. Confirm each prompt file exists at `prompts/NN-{cover|page}-[slug].md`
351
+ 2. Confirm that each prompt has character descriptions embedded inline (see Step 5). `image_generate` is prompt-only, so the prompt text is the sole consistency mechanism.
352
+
353
+ **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.
354
+
355
+ **Example embedded prompt** (`prompts/01-page-xxx.md`):
356
+
357
+ ```markdown
358
+ # Page 01: [Title]
359
+
360
+ ## Character Reference (embedded inline — maintain consistency)
361
+ - 大雄:Japanese boy, round glasses, yellow shirt, navy shorts, worried expression...
362
+ - 哆啦 A 梦:Round blue robot cat, white belly, red nose, golden bell, 4D pocket...
363
+
364
+ ## Page Content
365
+ [Original page prompt body — panels, dialogue, visual metaphors]
366
+ ```
367
+
368
+ **For each page (cover + pages)**:
369
+ 1. Read prompt from `prompts/NN-{cover|page}-[slug].md`
370
+ 2. **Backup rule**: If image file exists, rename to `NN-{cover|page}-[slug]-backup-YYYYMMDD-HHMMSS.png`
371
+ 3. Call `image_generate` with the prompt text and mapped aspect ratio
372
+ 4. Download the returned URL → save to `NN-{cover|page}-[slug].png`
373
+ 5. Report progress after each generation: "Generated X/N: [page title]"
374
+
375
+ ---
376
+
377
+ ## Step 8: Completion Report
378
+
379
+ ```
380
+ Comic Complete!
381
+ Title: [title] | Art: [art] | Tone: [tone] | Pages: [count] | Aspect: [ratio] | Language: [lang]
382
+ Location: [path]
383
+ ✓ source-{slug}.md (if content was pasted)
384
+ ✓ analysis.md
385
+ ✓ characters.png (if generated)
386
+ ✓ 00-cover-[slug].png ... NN-page-[slug].png
387
+ ```
388
+
389
+ ---
390
+
391
+ ## Page Modification
392
+
393
+ | Action | Steps |
394
+ |--------|-------|
395
+ | **Edit** | Update prompt → Regenerate image → Download new PNG |
396
+ | **Add** | Create prompt at position → Generate image → Download PNG → Renumber subsequent (NN+1) → Update storyboard |
397
+ | **Delete** | Remove files → Renumber subsequent (NN-1) → Update storyboard |
398
+
399
+ **File naming**: `NN-{cover|page}-[slug].png` (e.g., `03-page-enigma-machine.png`)
400
+ - Slugs: kebab-case, unique, derived from content
401
+ - Renumbering: Update NN prefix only, slugs unchanged