StoryLens — System Architecture
News / Topic → Age-Appropriate Comic Book | 6 Phases | Claude + Gemini (NanoBanana) + Claude Code
v4 — pipeline diagram with verification loop. Prompt files contain the detail; this contains the direction.
Context Store
(persists across all phases)
User Selections
• Topic / source material
• Age band (8–10 ... 17–18)
• Length (Brief / Std / Deep)
• Narrative style
• Persona (optional)
• Visual style
📄 News Story Document ✓
📄 Calibrated Story
📄 Narrative Story
🎨 Selected Style Spec
📄 Comic Script
📄 NanoBanana Playbook
🖼️ Comic Book Images
Phase 1 — Topic Intake & Research
Claude
Build a neutral story doc; verify before passing forward.
User
topic +
source material
Research draft news story
Facts, viewpoints, timeline, key figures
Prompt: Comprehensive_News_Story_Doc_Prompt.md
Verification Loop ↻
Run on every draft. Re-research until all gates pass.
Trusted sources
major outlets, primary records
Opposing perspectives
both sides represented
Global sources
non-US outlets included
AI self-check
re-prompt: "what did I miss?"
if any gate fails
→ re-research
Verified News Story Document
Phase 2 — Content Calibration
Claude
Reshape the same story for an age band + length.
User
Age band + length
8–10 | 11–13 | 14–16 | 17–18
Transform for age + length
Adjusts vocabulary, complexity, depth, tone
Prompts: age_transformation_prompt_v2.md + length_setting.md
Calibrated Story
Phase 3 — Narrative Styling
Claude
Same facts, one of 4 narrative lenses.
Investigation
Time Traveler
Debate
Walk in Shoes (+ persona)
User picks one
Rewrite through selected lens
Input: Calibrated Story + lens + persona
Prompt: narrative_style_prompt.md
Narrative Story
Phase 4 — Visual Style Selection
Rule-based
User picks 1 of 4 styles, each anchored to ONE artist tradition. No blending.
Storybook Hero
Brian Biggs
Suggested: ages 8–10
Painted World
Oliver Jeffers
Suggested: ages 11–13
Pop Editorial
Hergé + editorial
Suggested: ages 14–16
Manga Action Report
Shonen manga
Suggested: ages 17–18
User
Each style = reference images in /styles/[style-id]/ (source of truth) + style lock + drift-fix rules
Reference: style_guide.md (fixed document — not a prompt)
Selected Style Spec
Phase 5 — Script & Playbook Generation
Claude
Two-step: story → comic script → image-prompt playbook.
Step 5A — Comic Script Generator
Claude
Transforms the narrative story into a full comic script.
Input: Narrative Story + Style Spec + age band + length
Output: A) Character & Setting Bible · B) Panel-by-Panel Script · C) Cover Design
MECHANISM: Pacing = 2–3 panels/pg (8–10) → 3–4 (11–13) → 4–5 (14–16) → 4–6 (17–18)
Prompt: comic_script_prompt_v2.md | Ref: style_guide.md
Comic Script
Step 5B — Playbook Converter
Claude
Converts the script into a NanoBanana Playbook: a sequence of copy-paste prompts for Gemini.
Output: Prompt #0 (Setup) → Cover → Pages 1–N → Troubleshooting → Character Reference
MECHANISMS:
• Reference image = primary style anchor (uploaded with Prompt #0, then chained page-to-page)
• Page prompts: lean on style ("same art style as ref"), heavy on scene
• Character descriptions repeated verbatim every turn (Gemini forgets between turns)
Prompt: playbook_converter_prompt.md | Ref: style_guide.md, NanoBanana_Playbook_StorybookCrayon_v2.md
NanoBanana Playbook (.md)
Phase 6 — Image Generation
Gemini
Claude Code
Multi-turn chat session; previous page chained as ref into the next.
Claude Code executes the Playbook via a persistent Gemini chat
Prompt #0 (style + characters) persists across all turns · models: gemini-2.5-flash-image (default)
Execution Flow
Turn 1 — Prompt #0
ref image + style lock + characters
Turn 2 — Cover
→ save cover.png
Turns 3–N — Pages (sequential)
prev page as ref + prompt → page_N.png
loop
CONSISTENCY MECHANISMS (why one artist seems to have drawn it):
1. Multi-turn chat — Prompt #0 context persists across all turns
2. Ref-image chaining — EVERY new turn uploads the previous page (the #1 consistency lever)
3. Drift recovery — if style breaks: new session + re-send Prompt #0 + style ref + last page
Comic Book Images (/output/)
Architecture Principles + LLM Assignment
Pipeline Design Principles
• Each phase produces ONE artifact that feeds the next. No skipping, no cycles.
• Verification is a looped prompt, not a model choice (Phase 1).
• Style rules live in style_guide.md — single source of truth, not duplicated in prompts.
• Comic script is a reviewable intermediate — edit before playbook conversion.
• Ref-image chaining is the #1 consistency mechanism for images (Phase 6).
• Memory ≠ more context: each step hands forward only what the next needs.
• Zero post-production: bubbles, text, narration baked into the generated image.
• No real names for public figures — described by appearance + role only.
User Touch-Points
Phases 1 (topic), 2 (age/length), 3 (narrative lens, persona), 4 (visual style).
Phases 5 + 6 are fully automated after selections are locked.
Model Assignment
Claude
Phases 1, 2, 3, 5A, 5B
text reasoning + transformation
Gemini
Phase 6
image gen via multi-turn chat (NanoBanana)
Claude Code
Phase 6 orchestrator
parses playbook, manages chat, chains refs
Rule-based
Phase 4
style picker from style_guide.md
Reference Files
style_guide.md · NanoBanana_Playbook_*.md · phase6_execution_reference.md