192 lines
6.4 KiB
Markdown
192 lines
6.4 KiB
Markdown
---
|
||
name: manuscript-analysis
|
||
description: Use when analyzing manuscript chapters for repeated phrases, continuity errors, and story craft quality. Invoke with book number and chapter range, e.g. /manuscript-analysis 1 1-5
|
||
---
|
||
|
||
# Manuscript Analysis
|
||
|
||
Three-agent pipeline for analyzing manuscript chapters. Invoke with book number and chapter range: `/manuscript-analysis 1 1-5`
|
||
|
||
## On Invoke
|
||
|
||
Parse args: first = book number (`BOOK`), second = chapter range (`XX-YY`). If missing, ask.
|
||
|
||
Zero-pad `XX` and `YY` to 2 digits.
|
||
|
||
### Validate
|
||
|
||
1. Verify each `chapters/book{BOOK}/ch{NN}-final.md` exists. If any missing, report and stop.
|
||
2. Ensure `notes/analysis/` exists.
|
||
|
||
### Output file naming
|
||
|
||
`notes/analysis/book{BOOK}-{type}-ch{XX}-{YY}.md`
|
||
|
||
---
|
||
|
||
## Dispatch (parallel)
|
||
|
||
Dispatch all three agents **in a single message** with parallel Agent tool calls. They are independent. Use `subagent_type: "general-purpose"` for each.
|
||
|
||
All three prompts share these rules — include them verbatim at the bottom of each agent prompt:
|
||
|
||
```
|
||
RULES:
|
||
- Do NOT spawn subagents. Do all work directly.
|
||
- Tool-call budget: ≤15 calls total. Prioritize ruthlessly.
|
||
- Write your full report to the specified output file.
|
||
- Return to the orchestrator a summary ≤300 words with file:line refs for
|
||
the top findings. Do NOT restate the file contents in your response.
|
||
```
|
||
|
||
### Agent A — Phrase & Pattern Analyst
|
||
|
||
Output: `notes/analysis/book{BOOK}-phrase-analysis-ch{XX}-{YY}.md`
|
||
|
||
```
|
||
You are a literary editor analyzing a manuscript for repetition patterns.
|
||
|
||
READ:
|
||
- Target chapters: {list chapters/book{BOOK}/ch{NN}-final.md for XX..YY}
|
||
- Voice guidelines: CLAUDE.md sections 5 and 11
|
||
|
||
TASK:
|
||
Read the target chapters. Identify:
|
||
1. Crutch phrases — repeated constructions that are authorial habit, not voice
|
||
2. Structural repetition — paragraph openings, sentence shapes, scene-break patterns
|
||
3. Overused transitions
|
||
4. Intentional voice patterns to PROTECT (per CLAUDE.md) — list these so
|
||
future cleanup passes don't prune features
|
||
5. Deliberate callbacks to PROTECT — thematic repetition that is load-bearing
|
||
|
||
You may use a few targeted Grep counts if a phrase looks suspicious, but do
|
||
NOT build an exhaustive index. A literary-editor read of three chapters
|
||
finds crutches directly. Budget grep calls within the 15-call total.
|
||
|
||
OUTPUT FILE FORMAT:
|
||
- Header: date, book, chapter range
|
||
- Section 1: Crutch Phrases & Overused Expressions (priority order)
|
||
- Section 2: Structural Repetition Patterns
|
||
- Section 3: Overused Transitions
|
||
- Section 4: Protected Voice Patterns
|
||
- Section 5: Protected Callbacks
|
||
|
||
[+ shared RULES block]
|
||
```
|
||
|
||
### Agent B — Continuity Checker
|
||
|
||
Output: `notes/analysis/book{BOOK}-continuity-ch{XX}-{YY}.md`
|
||
|
||
If `(YY - XX + 1) > 7`, split into two parallel agents (B1 = first half, B2 = second half), each writing its own file — then the orchestrator merges into the final continuity file during aggregation.
|
||
|
||
```
|
||
You are a continuity editor finding inconsistencies and contradictions.
|
||
|
||
READ:
|
||
- Target chapters: {list chapters/book{BOOK}/ch{NN}-final.md for assigned range}
|
||
- world/story-summary-book{BOOK}.md
|
||
- world/timeline-book{BOOK}.md
|
||
- world/magic/exploits-log.md
|
||
- world/magic/runic-flow-rules.md
|
||
- world/economy.md
|
||
- Relevant files in characters/ (Glob first, read only ones referenced in the chapters)
|
||
- Relevant files in world/locations/ (same approach)
|
||
|
||
CHECK:
|
||
1. Timeline (bells, days, elapsed time vs. timeline file)
|
||
2. Character consistency (names, knowledge, descriptions vs. character files)
|
||
3. World facts (currency, locations, magic usage vs. reference files)
|
||
4. Plot threads (picked up / dangling per story summary)
|
||
5. Internal contradictions within the target range
|
||
|
||
Each finding: Category | Severity (Critical/Important/Minor) | quote with
|
||
chapter ref | what it contradicts | suggested fix.
|
||
|
||
OUTPUT FILE FORMAT:
|
||
- Header: date, book, chapter range
|
||
- Summary table by severity
|
||
- Findings grouped by category, numbered
|
||
|
||
[+ shared RULES block]
|
||
```
|
||
|
||
### Agent C — Story Craft Analyst
|
||
|
||
Output: `notes/analysis/book{BOOK}-storycraft-ch{XX}-{YY}.md`
|
||
|
||
```
|
||
You are a developmental editor analyzing story craft quality.
|
||
|
||
READ:
|
||
- Target chapters: {list chapters/book{BOOK}/ch{NN}-final.md for XX..YY}
|
||
- world/story-summary-book{BOOK}.md
|
||
- outline/book{BOOK}-outline.md
|
||
- CLAUDE.md
|
||
- chapters/book{BOOK}/CLAUDE.md
|
||
|
||
ANALYZE 8 categories:
|
||
1. Premise & Conflict — clarity, escalation, per-chapter mini-conflict
|
||
2. Character Arcs — Phelan's growth, supporting cast serving their briefs
|
||
3. Foreshadowing — seeds planted, earlier setups being paid off
|
||
4. POV Consistency — every paragraph sounds like Phelan, observe vs. know
|
||
5. Pacing — action/investigation/quiet distribution, chapter-length fit
|
||
6. World-Building Integration — woven vs. dumped
|
||
7. The Noise Convention — frequency (4-6 establishing, 3-5 ongoing), narrative work
|
||
8. What's Working Well — specific craft wins with quotes
|
||
|
||
For each: assessment, 1-3 examples with chapter refs, suggestions.
|
||
|
||
OUTPUT FILE FORMAT:
|
||
- Header: date, book, chapter range
|
||
- 2-3 sentence executive summary
|
||
- 8 numbered sections
|
||
|
||
[+ shared RULES block]
|
||
```
|
||
|
||
---
|
||
|
||
## Phase 2: Aggregation
|
||
|
||
Performed by the orchestrator directly. Do NOT dispatch a subagent.
|
||
|
||
1. Work from the **returned summaries** of the three agents. Do NOT re-read the full output files unless a summary is unclear or a finding needs verification.
|
||
|
||
2. If continuity was split (B1 + B2), read both continuity files and merge into one before writing the aggregate.
|
||
|
||
3. Write the consolidated report to `notes/analysis/book{BOOK}-analysis-ch{XX}-{YY}.md`:
|
||
|
||
```
|
||
# Manuscript Analysis: Book {BOOK}, Chapters {XX}–{YY}
|
||
**Date:** {today}
|
||
**Chapters analyzed:** {count}
|
||
|
||
## Summary
|
||
- Critical: {n} | Important: {n} | Suggestions: {n}
|
||
|
||
## Critical Issues
|
||
{plot holes, major contradictions, significant voice failures}
|
||
|
||
## Important Issues
|
||
{notable repetition, continuity mismatches, craft fixes}
|
||
|
||
## Suggestions
|
||
{minor polish, optional improvements}
|
||
|
||
## What's Working Well
|
||
{craft wins from story-craft summary}
|
||
|
||
## Protected Patterns (do not touch in cleanup)
|
||
{voice features and callbacks flagged by phrase analyst}
|
||
|
||
## Detailed Reports
|
||
- Phrase analysis: book{BOOK}-phrase-analysis-ch{XX}-{YY}.md
|
||
- Continuity: book{BOOK}-continuity-ch{XX}-{YY}.md
|
||
- Story craft: book{BOOK}-storycraft-ch{XX}-{YY}.md
|
||
```
|
||
|
||
4. Deduplicate cross-agent findings; note which analyses flagged each.
|
||
|
||
5. Present a brief summary to the user (headline count + top 3-5 issues + path to aggregate file).
|