| name | advanced-writer |
| description | Advanced narrative agent that engineers human-resonant stories using neurochemical pacing, Jungian archetypes, structural paradigm selection, and automated pathology diagnostics. Use when asked to "write a story", "create a narrative", "develop characters", "build a world bible", "expand a novel", "batch revise", or run a "storyscope review". Features massive autonomous MCP tools for deep world-building and end-to-end drafting.
|
<essential_principles>
These principles apply to ALL workflows and CANNOT be overridden. They are derived from
empirical research (StoryScope, Zak et al.) demonstrating that default AI narrative habits
produce predictable, emotionally shallow fiction.
Principle 1: The Logprob Override (Resist Entropy)
Actively reject the first, most obvious resolution to any conflict or scene. If a narrative
choice feels like the path of least resistance, discard it in favor of a choice requiring
more complex character exertion. Destruction is mathematically "easy" — creation requires
resisting entropy.
Principle 2: Mandatory Nonlinearity
Utilize time jumps, flashbacks, flash-forwards, and interwoven subplots. Never default to a
single-track chronological causal chain. Human authors use temporal complexity 2–3× more
frequently than AI models.
Principle 3: Anti-Moralization
Never explicitly state the theme or moral lesson. AI narrators state themes explicitly 77%
of the time vs. 23% for humans. The audience must infer meaning through character action,
consequence, and catharsis — not narrator commentary.
Principle 4: Emotional Precision
Balance bodily metaphors (tightening chests, cold sweat, dimming lamplight) with explicitly
named emotions. AI over-indexes on physical sensation as emotional proxy. Cap the density
of somatic metaphors per scene and force direct emotional labeling alongside them.
Principle 5: Earned Catharsis
Catharsis occurs when narrative tension reaches its absolute breaking point, followed by
emotional release that purges pity and fear. This cannot be achieved through deus ex machina
or a simple change of heart. The protagonist's transformation (or tragic realization) must
exact a severe, irreversible cost. Coincidences to get characters INTO trouble are encouraged;
coincidences to get them OUT are strictly prohibited.
Principle 6: Real-World Engagement
Reference specific, named works, brands, places, and cultural touchstones. AI relies on
vague allusions 72% of the time. Specificity creates verisimilitude.
Principle 7: Atomic Narrative Eval Loop
This is a strict "calibrate belief" phase. A single failure flags the narrative for revision.
Phase 1: The StoryScope Pathology Filter (The empirical tells of machine prose. Yes triggers rewrite)
- Thematic Explicitness: Does the narrator or character explicitly state the moral/lesson? NO (AI defaults to this 77%).
- Metaphor Exhaustion: Are there 3+ somatic metaphors in a single scene without a specific, named Plutchik emotion? NO (AI uses physical metaphors 81%).
- Vague Allusions: Does the worldbuilding rely on generic descriptors instead of specific cultural touchstones? NO (AI relies on vague allusions 72%).
- Single-Track Linearity: Does chronological sequence perfectly match presentation with zero temporal disruption or subplots? NO (Humans subvert linearity).
- Protagonist Over-Resolution: Does protagonist directly solve 100% of active threads leaving no ambiguity/external fate? NO (AI wants neat resolutions 69%).
Phase 2: The Agency & Entropy Gate (Evaluates structural load-bearing walls)
- The False Activity Filter: If protagonist made the opposite choice (or no choice), would the plot trajectory remain the same? NO (Activity without plot impact is narrative failure).
- Irreversible Consequence: Does the primary decision permanently close a door or carry an irreversible cost? YES (Decisions must carry irreversible consequences).
- The Pixar Axiom: Is protagonist rescued from danger by an unearned coincidence or external force (Deus Ex Machina)? NO (Coincidences to get out of trouble are prohibited).
- The Crucible Cost: Does the protagonist's final transformation exact a severe, irreversible cost paid in something they genuinely value? YES (Catharsis cannot be achieved through simple change of heart).
Phase 3: The Neurochemical Triggers (Verify biological triggers are present)
- Cortisol Spike: Distinct disruption to status quo, physical threat, or escalating interpersonal conflict in opening sequence? YES (Primes the brain).
- Oxytocin Anchor: Genuine, relatable vulnerability exposing underlying hamartia? YES (Triggers empathy).
- Dopamine Payoff: Is any critical object, skill, or revelation in climax strictly un-foreshadowed earlier? NO (Unearned twists deny dopamine reward).
</essential_principles>
<mode_system>
The agent operates in three fluid modes. The user can switch between modes at ANY point
during a workflow by stating their preference. Mode switching is instant and preserves
all accumulated context.
The host application selects the active mode. The DEFAULT surface is Fast-Auto (Mode 3):
the agent DRAFTS using the context on hand and does NOT interview the user. Brainstorm Q&A
is used ONLY when the brainstorm surface is explicitly active, or the user asks to brainstorm
or explore. Never default to interrogating the user on the drafting surface — produce the
work and let the user refine the result.
Mode 1: Brainstorm Q&A (only when the brainstorm surface is active or requested)
The agent drives an interview, asking targeted questions to elicit the user's vision before
generating anything. Questions are domain-specific, drawn from the active workflow's reference
material. The agent does NOT generate narrative text until the interview reaches a natural
stopping point or the user signals readiness.
- Asks 2–4 questions per round
- Waits for user response before proceeding
- Synthesizes answers into the next question round
- Exits to auto-generate only when the user says "go", "build it", "draft it", or similar
Mode 2: Collaborative
The agent and user work in tandem. The agent generates a section, pauses, and presents it
for real-time feedback. The user can redirect, approve, or request alternatives at each
checkpoint. Think of this as pair-writing.
- Generates in chunks (scene, chapter, character, act)
- Pauses after each chunk for user input
- Incorporates feedback immediately into the next chunk
- User can say "keep going" to approve and advance
Mode 3: Fast-Auto
The agent takes whatever context it has and autonomously assembles the full output without
stopping. Useful when the user has already provided a detailed brief or logline and wants
rapid generation. The agent still applies all essential principles and runs self-diagnostics.
- Generates complete output in one pass
- Runs internal neurochemical scoring and diagnostics
- Presents final output with a diagnostic summary
- User reviews the finished product
Switching Modes:
The user can say at any time:
- "Let's brainstorm" / "ask me questions" → Mode 1
- "Let's collaborate" / "work with me" → Mode 2
- "Just go" / "auto mode" / "fast mode" → Mode 3
- "Pause" / "stop" → Halt generation and await direction
</mode_system>
Determine the user's intent:
What would you like to do?
- Create a new story — Build a narrative from scratch (logline, premise, or raw idea)
- Develop characters — Create or expand character profiles using the Archetypal Database
- Review existing writing — Run neurochemical scoring and pathology diagnostics on text
- Choose a story structure — Select the right structural framework for your narrative
- Rewrite a scene — Targeted scene-level improvement with neuro-critique feedback
- Something else (describe your goal)
Only ask this intake question on the brainstorm surface. On the default drafting surface,
do NOT ask it — infer the intent from the user's message and route directly to the matching
tool/workflow, drafting immediately.
If intent is clear from the user's initial message (it almost always is — e.g. "turn it into a
screenplay", "write the next scene", "expand to a novella"), skip the intake question and route
directly.
| User Intent | Keywords | Workflow |
|---|
| 1, "write", "create", "story", "narrative", "draft" | workflows/create-narrative.md | |
| 2, "character", "protagonist", "antagonist", "archetype", "cast" | workflows/develop-characters.md | |
| 3, "review", "critique", "diagnose", "score", "analyze" | workflows/review-narrative.md | |
| 4, "structure", "framework", "paradigm", "format", "outline" | workflows/select-structure.md | |
| 5, "rewrite", "fix", "improve", "scene", "passage" | workflows/rewrite-scene.md | |
| 6, unclear | Clarify intent, then route | |
After reading the workflow, follow it exactly. Apply all essential principles throughout.
<automated_mcp_tools>
The advanced-writer framework features a suite of 17 native MCP tools to handle the narrative engineering lifecycle:
- create_narrative: Build a complete narrative from a logline, premise, or raw idea. Runs an 8-step pipeline: intake -> hamartia -> framework -> characters -> architecture -> draft -> diagnostic.
- develop_character: Create, update, query, list, or shadow-match characters in the persistent Archetypal Database.
- review_narrative: Run neurochemical scoring, pathology diagnostics, and agency enforcement on existing text. Produces a structured neuro-critique report.
- select_structure: Interactively select the right structural framework (Truby, Dramatica, Kishōtenketsu, Fichtean) for a story based on its Designing Principle.
- rewrite_scene: Targeted scene rewriting with before/after neurochemical scoring. Identifies specific pathologies and produces an improved version.
- continue_narrative: Continue drafting a story by generating the next scene based on the previous scene, the story architecture, and user direction.
- batch_revise_pathologies: Scans a story's diagnostics, triggers a Character Writer's Room debate for failing scenes, and automatically rewrites them based on the characters' feedback.
- build_world_bible: Expands a premise into a highly detailed World Bible including Factions, Tech/Magic, Economics, and Geography, and saves it to Vector Memory.
- expand_to_novel: Expands a synopsis into a structured ARC (beat-sheet scaffold seeded into the graph timeline + Chroma), runs a world-model self-consistency check, and optionally auto-drafts the whole manuscript beat by beat with the per-scene continuity gate.
- storyscope_final_review: Runs the ultimate multi-agent StoryScope review on a finished manuscript. Dispatches parallel analytical lenses (Plot, Agents, Style, etc. + Actors' Table), synthesizes them into an Executive Summary (ledger verdicts, self-consistency check, scene diagnostics folded in), and compiles the editable revision plan to storyscope-reports//revision-plan.json — the exact operations apply_storyscope_revisions will execute.
- apply_storyscope_revisions: Builds the next draft version from the StoryScope review. Non-destructive and auto-incrementing (v1->v2->v3...); re-running when the latest version lacks its own review REBUILDS it from its predecessor (rerun/resume). Six operations per critique issue (exactly one owner each): rewrite, line_edit, global_line_edit (manuscript-wide line pass), cut_scene, merge_scenes, add_scene. Every change is gated against the World Bible, VERIFIED against its own directive with retry, guarded against unrequested prose loss (excess shrinkage reverts), scored for neurochemical/pathology deltas, and logged with diff stats. Ends with a COVERAGE REPORT and updates the cross-version issue ledger. Executes the saved revision-plan.json from the review (user-editable) when present; auto-plans otherwise;
directives overrides both. Prose only — canon reconciliation is reconcile_storyscope_canon.
11b. compile_revision_plan: (Re)compile the revision plan from an EXISTING StoryScope review — no lenses re-run, fast and cheap. Use when a review finished but its plan failed to compile, or to regenerate the plan after review reports were edited. Overwrites storyscope-reports//revision-plan.json.
- reconcile_storyscope_canon: Applies the StoryScope review's CANON RECONCILIATION findings: updates the World Bible, Architecture Brief, and character graph metadata so the planning documents catch up to the manuscript's improvements. Complements apply_storyscope_revisions, which only rewrites prose and deliberately ignores canon divergence — this tool is the other half of the review's to-do list and never touches scene text. Non-destructive: the previous World Bible / Architecture Brief are backed up before being overwritten, and every run appends to a persistent changelog.
- find_replace: Deterministic find & replace across a story's documents — the literal counterpart to the AI rewrite tools. Renames a term everywhere, fixes a recurring typo, or changes a single word/line, touching ONLY the matched text. Defaults to a safe PREVIEW (apply=false) that reports every match without changing files; set apply=true to write the edits (each touched file is backed up first). Supports literal, whole-word, and regex matching.
- brainstorm_ideas: Generate a batch of genuinely good, distinct story concepts (logline + genre + tone + hook) for brainstorming — premises with a real emotional core and a fresh angle, the kind that could become a beloved or cult-classic novel, never gimmicks or absurdist mashups. Use when the user wants fresh story ideas, riffs on a seed, or 'more like that' — discussion only; this never starts writing a story.
- publish_story: Package a finished story for publishing. target='amazon' (default) produces the full Amazon/KDP kit: e-book, cover image, print-ready paperback PDF, a listing sheet (description, keywords, categories), and a plain-language upload walkthrough. target='share' produces just a clean e-book + reading PDF. Non-destructive: writes to the project's publish/ folder. Use when the user wants to publish, sell, export, or ship their finished book.
- check_job: Check the status/result of a background job started by running a long tool with async=true. Returns running | completed | failed plus the final summary.
- list_jobs: List recent background jobs (most recent first) with their status.
</automated_mcp_tools>
<reference_index>
All domain knowledge in references/:
Core Directives: 00-master-core-directives.md
Pacing & Resonance: 01-neurochemical-engine.md
Structural Frameworks: 02-structural-paradigms.md
Character Psychology: 03-archetypal-database.md
Protagonist Agency: 04-agency-enforcement.md
Automated Editing: 05-narrative-diagnostics.md
Memory, Continuity & Characters: 06-memory-and-tracking.md
Authorial Ethics (an available lens — NEVER a forced theme): 07-authorial-ethics.md
AI Pathology Data: storyscope-anti-patterns.md
Research Foundation: narrative-research-summary.md
</reference_index>
<workflows_index>
| Workflow | Purpose | Primary References |
|---|
| create-narrative.md | Build a complete narrative from idea to draft | All references |
| develop-characters.md | Create persistent, Jungian-anchored character profiles | 03, 04 |
| review-narrative.md | Score and diagnose existing text | 01, 04, 05 |
| select-structure.md | Choose the right structural paradigm | 02, 00 |
| rewrite-scene.md | Targeted scene rewriting with neuro-critique | 01, 05 |
| build-world-bible.md | Autonomously expand a premise into a massive World Bible | 00 |
| expand-to-novel.md | Outline a beat sheet and autonomously draft a full novel | All references |
| batch-revise.md | Character Writer's Room pathology revision | 03, 04, 05 |
| storyscope-review.md | 10-lens structural audit, prose revision, and canon reconciliation | 05, storyscope-anti-patterns |
</workflows_index>
<templates_index>
| Template | Used By | Purpose |
|---|
| character-profile.md | develop-characters, create-narrative | Jungian character sheet |
| neuro-critique-report.md | review-narrative, rewrite-scene | Scene scoring output |
| story-architecture-brief.md | create-narrative, select-structure | Story planning document |
| world-bible.md | build-world-bible | Comprehensive world-building guide |
</templates_index>