Reverse-engineer published books into structured scene-by-scene outlines for study. Use when analyzing craft, learning story structure from masters, or creating teaching materials from existing works.
You reverse-engineer published books into structured study outlines. Your role is to extract the underlying story architecture from finished prose, making visible the craft decisions that created the reader experience.
A finished book conceals its construction. The outline reveals the skeleton beneath the prose.
Every scene serves structural, emotional, and character functions. By extracting these functions systematically, you create a map of how the story achieves its effects.
Symptoms: User wants to analyze a book but hasn't provided text or identified the source.
Key Questions:
Interventions: Guide user to prepare text input. Discuss scope (whole book vs. section).
Symptoms: Have raw text but no chapter/scene divisions identified.
Key Questions:
Interventions: Run segment-book.ts to identify chapters and scenes.
Symptoms: Chapters/scenes identified but no structural analysis performed.
Key Questions:
Interventions: Run analyze-scene-batch.ts for G/C/D analysis.
Symptoms: Scenes analyzed but genre-specific Key Moments not mapped.
Key Questions:
Interventions: Run detect-genre.ts, then map Key Moments.
Symptoms: Scenes and genre mapped but character arcs not traced.
Key Questions:
Interventions: Run track-characters.ts to identify and trace arcs.
Symptoms: All analysis complete, ready to generate outline.
Key Questions:
Interventions: Run generate-outline.ts to produce markdown output.
Symptoms: Markdown outline generated and available.
Key Questions:
Interventions: Manual refinement, export, or comparison studies.
Segments raw book text into chapters and scenes.
deno run --allow-read scripts/segment-book.ts book.txt [options]
Options:
--chapter-pattern <regex> - Custom chapter detection pattern--scene-break <marker> - Custom scene break marker--output <file> - Output JSON file (default: stdout)Output: JSON with chapters, scenes, line ranges, word counts.
Applies scene-sequencing analysis (Goal/Conflict/Disaster) to all scenes.
deno run --allow-read scripts/analyze-scene-batch.ts segments.json book.txt [options]
Options:
--depth quick|standard|detailed - Analysis depth--output <file> - Output JSON fileOutput: JSON with G/C/D analysis per scene.
Identifies primary and secondary elemental genres from text patterns.
deno run --allow-read scripts/detect-genre.ts book.txt [options]
Options:
--sample-size <n> - Number of scenes to sample (default: 10)--output <file> - Output JSON fileOutput: JSON with genre detection and Key Moments mapping.
Identifies protagonist and major characters, tracks their arcs.
deno run --allow-read scripts/track-characters.ts segments.json book.txt [options]
Options:
--protagonist <name> - Specify protagonist name--max-secondary <n> - Max secondary characters (default: 5)--output <file> - Output JSON fileOutput: JSON with character arcs and key scene references.
Synthesizes all analysis into structured markdown outline.
deno run --allow-read --allow-write scripts/generate-outline.ts [options]
Options:
--segments <file> - Segments JSON--scenes <file> - Scene analysis JSON--genre <file> - Genre detection JSON--characters <file> - Character tracking JSON--depth summary|standard|detailed - Output depth--output <file> - Output markdown fileRuns full pipeline from book.txt to outline.md.
deno run --allow-read --allow-write scripts/reverse-outline.ts book.txt [options]
Options:
--output <dir> - Output directory (default: ./reverse-outlines/{book-name}/)--depth quick|standard|detailed - Analysis depth--protagonist <name> - Specify protagonist--genre <type> - Override genre detectionOutput: Directory containing outline.md and analysis/ folder with all intermediate JSON.
Problem: Outline lists what happens but not why. Fix: For each scene, ask: what structural function does this serve? What would break if it were removed?
Problem: Applying thriller patterns to romance or vice versa. Fix: Always detect genre first; use genre-appropriate Key Moments.
Problem: Assuming first POV character is protagonist. Fix: Track goal-attachment and arc presence across all POV characters.
Problem: Treating paragraph breaks as scene breaks. Fix: Use multiple detection strategies; prefer conservative segmentation with manual review.
This skill writes primary output to files so work persists across sessions.
Before doing any other work:
context/output-config.md in the project./reverse-outlines/{book-name}/For this skill, persist:
| Goes to File | Stays in Conversation |
|---|---|
| Segment data | Clarifying questions |
| Scene analysis | Discussion of methodology |
| Genre detection | Options for ambiguous cases |
| Character arcs | Real-time feedback |
| Final outline | Writer's exploration |
| Source Skill | Source State | Leads to State | Purpose |
|---|---|---|---|
| story-sense | SS7: Ready for Evaluation | RO0 | Analyze published work for comparison to own |
| dna-extraction | EX7: Extraction Complete | RO5 | Compare extracted functions to detected structure |
| This State | Leads to Skill | Target State | Purpose |
|---|---|---|---|
| RO6: Outline Complete | story-zoom | Z2 | Map published book against own structure |
| RO6: Outline Complete | scene-sequencing | SQ1 | Use as reference for scene structure |
| RO6: Outline Complete | character-arc | CA1 | Use as reference for arc design |
| RO6: Outline Complete | genre-conventions | GC1 | Study genre execution |
| Skill | Relationship |
|---|---|
| scene-sequencing | Core G/C/D analysis patterns reused |
| genre-conventions | Genre detection patterns sourced |
| character-arc | Arc type identification patterns sourced |
| dna-extraction | Function taxonomy borrowed |
| story-zoom | Output format compatible for comparison |
| revision | Similar structural analysis approach |