Build an Interactive Story
Create an interactive educational story using $ARGUMENTS.
Follow the full conventions in stories/CLAUDE.md. The story must be self-contained HTML with inline CSS/JS, 10-15 scenes, 3-5 branching points, 2-3 endings, and keyboard navigation (1-9 keys).
Phase 0 — Plan (interactive)
- Parse the argument: first word is the style name, optional remaining words hint at the topic.
- Read the Style Guide Catalog table in
README.md to confirm the style is available (empty Story column) and see what's already taken.
- Read the chosen style's HTML file from
styles/{name}.html to extract the design system.
- Read
stories/CLAUDE.md for the template and conventions.
- Read 1 existing story to match structure — skim for the STORY data format, engine pattern, and component mapping.
- If no topic was given:
- Research the style's cultural/historical period
- Propose 2-3 story concepts that thematically match the aesthetic
- Ask the user to pick one
- Propose the story arc: title, setting, 10-15 scene outline with branching diagram, key historical facts, and how style components map to narrative functions (e.g., "cards = case files", "alerts = discoveries").
- Discuss with the user before proceeding.
Phase 1 — Research (parallel Sonnet subagents)
Launch 2-3 sonnet subagents in parallel to research:
- Historical facts: Real names, dates, numbers, events for the chosen topic. Need 8-12 concrete facts.
- Cultural context: Period details, atmosphere, vocabulary appropriate to the era.
- Style component mapping: How to repurpose the style guide's CSS classes for narrative elements.
Each subagent returns structured research notes.
Phase 2 — Build (sequential Opus subagents)
Use 3-4 sequential opus subagents:
- First agent: Create the full HTML file with adapted CSS, title screen with back-to-stories link, scene wrapper structure, and the story engine JavaScript. Write the first 5 scenes of the STORY object. Include CSS for scene types (narration, investigation, confrontation, ending).
- Second agent: Read the file, add scenes 6-10 (or remaining scenes). Ensure branching points connect correctly.
- Third agent: Read the file, add remaining scenes and endings. Verify all
next values point to defined scenes. Ensure every scene has a fact property. Test that no orphan scenes exist.
- Fourth agent (polish): Read complete file. Verify scene graph integrity (no dead ends, no orphans), keyboard navigation works, clue tracker collects facts, all historical content is accurate.
Critical rules for build agents:
- Each agent MUST read the current file before writing
- All
next values in choices must reference existing scene IDs in the STORY object
- Every scene needs:
year, era, content, fact, choices
- Endings should offer "Play Again" (next: 'intro') and "Back to Stories" (next: '_exit')
- Back-to-stories link on title screen:
<a href="index.html">
Phase 3 — Brief & Index
- Write a research brief to
stories/briefs/{style-name}-brief.md documenting the historical facts, story arc, and component mapping.
- Read
stories/index.html to understand the card format.
- Add a card for the new story with: scene count, ending count, style name, title, description.
- Update the Style Guide Catalog table in
README.md — add the story title in the Story column for the chosen style.
- Commit with message:
Add {title} interactive story ({style-name} style)
- Push using:
git config --global credential.helper store && echo "https://GGPrompts:$(gh auth token --user GGPrompts)@github.com" > ~/.git-credentials && git push origin main
1---2name: story-53description: Build an interactive educational story with a style guide aesthetic4---5
6# Build an Interactive Story
7
8Create an interactive educational story using **$ARGUMENTS**.
9
10Follow the full conventions in `stories/CLAUDE.md`. The story must be self-contained HTML with inline CSS/JS, 10-15 scenes, 3-5 branching points, 2-3 endings, and keyboard navigation (1-9 keys).
11
12## Phase 0 — Plan (interactive)
13
141. Parse the argument: first word is the style name, optional remaining words hint at the topic.
152. Read the **Style Guide Catalog** table in `README.md` to confirm the style is available (empty Story column) and see what's already taken.
163. Read the chosen style's HTML file from `styles/{name}.html` to extract the design system.
174. Read `stories/CLAUDE.md` for the template and conventions.
184. Read 1 existing story to match structure — skim for the STORY data format, engine pattern, and component mapping.
195. If no topic was given:
20 - Research the style's cultural/historical period
21 - Propose 2-3 story concepts that thematically match the aesthetic
22 - Ask the user to pick one
236. Propose the story arc: title, setting, 10-15 scene outline with branching diagram, key historical facts, and how style components map to narrative functions (e.g., "cards = case files", "alerts = discoveries").
247. Discuss with the user before proceeding.
25
26## Phase 1 — Research (parallel Sonnet subagents)
27
28Launch 2-3 **sonnet** subagents in parallel to research:
29- **Historical facts**: Real names, dates, numbers, events for the chosen topic. Need 8-12 concrete facts.
30- **Cultural context**: Period details, atmosphere, vocabulary appropriate to the era.
31- **Style component mapping**: How to repurpose the style guide's CSS classes for narrative elements.
32
33Each subagent returns structured research notes.
34
35## Phase 2 — Build (sequential Opus subagents)
36
37Use 3-4 sequential **opus** subagents:
38
391. **First agent**: Create the full HTML file with adapted CSS, title screen with back-to-stories link, scene wrapper structure, and the story engine JavaScript. Write the first 5 scenes of the STORY object. Include CSS for scene types (narration, investigation, confrontation, ending).
402. **Second agent**: Read the file, add scenes 6-10 (or remaining scenes). Ensure branching points connect correctly.
413. **Third agent**: Read the file, add remaining scenes and endings. Verify all `next` values point to defined scenes. Ensure every scene has a `fact` property. Test that no orphan scenes exist.
424. **Fourth agent (polish)**: Read complete file. Verify scene graph integrity (no dead ends, no orphans), keyboard navigation works, clue tracker collects facts, all historical content is accurate.
43
44**Critical rules for build agents:**
45- Each agent MUST read the current file before writing
46- All `next` values in choices must reference existing scene IDs in the STORY object
47- Every scene needs: `year`, `era`, `content`, `fact`, `choices`
48- Endings should offer "Play Again" (next: 'intro') and "Back to Stories" (next: '_exit')
49- Back-to-stories link on title screen: `<a href="index.html">`
50
51## Phase 3 — Brief & Index
52
531. Write a research brief to `stories/briefs/{style-name}-brief.md` documenting the historical facts, story arc, and component mapping.
542. Read `stories/index.html` to understand the card format.
553. Add a card for the new story with: scene count, ending count, style name, title, description.
564. Update the **Style Guide Catalog** table in `README.md` — add the story title in the Story column for the chosen style.
575. Commit with message: `Add {title} interactive story ({style-name} style)`
586. Push using: `git config --global credential.helper store && echo "https://GGPrompts:$(gh auth token --user GGPrompts)@github.com" > ~/.git-credentials && git push origin main`