autonovel

repository·master·Indexed 23 days ago

https://github.com/nousresearch/autonovel

A reproducible pipeline designed to automate the generation, drafting, and revision of a novel from a single seed concept. The project includes guidelines for identifying and fixing AI writing anti-patterns, removing 'slop' words and filler phrases, and applying context-specific tone guidelines to improve prose quality.

Tokens
15.8K
Snippets
14
Records
54
Agent score
79%

What's inside autonovel

  1. Understand the Autonovel Pipeline Architecture

    master

    Autonovel operates using a dual-branch architecture to ensure reproducibility and separation of concerns:

    1. Master Branch (Framework): Contains the reusable, immutable base. This includes agent instructions (program.md), craft education (CRAFT.md), anti-slop/anti-pattern detection rules (ANTI-SLOP.md, ANTI-PATTERNS.md), and the core Python toolset.
    2. Per-Novel Branch (Generated): A separate branch created automatically for each novel. This contains all story-specific content, including the seed.txt, world bibles (world.md), character registries (characters.md), outlines (outline.md), prose chapters (chapters/ch_*.md), and the current state (state.json).

    This separation allows the pipeline machinery to remain constant while the story content evolves through different phases.

  2. Understand Voice Identity components

    master

    While Guardrails are universal, Voice Identity is unique to each novel and is generated during the foundation phase. The Voice Identity defines the specific aesthetic and technical constraints for a story. It consists of the following components:

    • Tone: The emotional quality (e.g., "Mythic and weighty" vs "Spare and cold").
    • Sentence Rhythm: The tendencies for sentence length and flow (e.g., "Long sentences for worldbuilding, short for violence").
    • Vocabulary Register: The specific 'word-hoard' of the world (e.g., Anglo-Saxon blunt vs Latinate baroque).
    • POV and Tense: The perspective (First, Third Limited, Omniscient) and time frame (Past, Present).
    • Dialogue Conventions: Rules for dialogue tags (e.g., using said only), action beats, and character-specific subtext.
    • Exemplar Passages: 3-5 paragraphs that serve as the 'tuning fork' for the voice. The agent calibrates all subsequent chapters against these.
    • Anti-Exemplars: 3-5 paragraphs demonstrating what the voice is NOT (e.g., "This is too flowery for our tone").
  3. Show Don't Tell: Operational Definition

    master

    Distinguish between 'Telling' (abstract labels) and 'Showing' (concrete evidence through action, sensory detail, and dialogue).

    Detectable Telling Patterns

    Avoid these patterns in critical moments:

    • Emotion labels: "[Character] felt [emotion]", "was [emotion]", or "seemed [emotion]".
    • Direct emotion words: angry, sad, happy, scared, nervous, etc.
    • Emotion adverbs: angrily, sadly, happily, etc.
    • Trait declarations: "[Character] was [trait]" (e.g., brave, kind, smart).
    • Relationship declarations: "They were best friends."
    • Atmosphere labels: "It was a creepy house."

    When Telling is Acceptable

    • Time transitions: "Three weeks later".
    • Mundane context: Non-plot-critical details (e.g., "She worked as a nurse").
    • Pacing compression: Skipping uneventful periods.

    Rule: Critical moments (emotional peaks, revelations, climax) should be zero tell, all show.

  4. Understand the autonovel Layer Stack

    master

    The autonovel pipeline operates using five co-evolving layers of documentation and prose, supported by a cross-cutting consistency database. Understanding these layers is essential for managing the novel's development:

    • Layer 5: voice.md – Defines style, tone, and vocabulary (HOW to write).
    • Layer 4: world.md – Defines lore, magic, geography, and history (WHAT exists).
    • Layer 3: characters.md – Defines the registry, character arcs, and relationships (WHO acts).
    • Layer 2: outline.md – Defines plot beats and the foreshadowing map (WHAT happens).
    • Layer 1: chapters/ch_NN.md – The actual prose (one file per chapter).
    • Cross-cutting: canon.md – A database of hard facts and truths to ensure consistency across all layers.
  5. Save the Cat Beat Sheet Plot Structure

    master

    The Save the Cat Beat Sheet provides a structural framework for plotting a story based on specific percentage marks. Use this to ensure your narrative hits key emotional and plot milestones at the correct pacing.

    Act Structure:

    • Act I: 0-23%
    • Act II: 23-77%
    • Act III: 77-100%

    Key Beats:

    • Opening Image (0-1%): Snapshot of the status quo.
    • Theme Stated (~5%): A non-protagonist hints at the story's lesson.
    • Setup (1-10%): Establishing the normal world and characters.
    • Catalyst (~11%): An external event that happens to the protagonist.
    • Debate (11-23%): Protagonist weighs options and resists the call.
    • Break Into Two (~23%): The protagonist chooses to enter the new world.
    • B Story (~27%): A new relationship that carries the theme.
    • Fun and Games (26-50%): Delivery of the premise's promise.
    • Midpoint (~50%): A false victory or false defeat that raises stakes.
    • Bad Guys Close In (50-68%): Increasing pressure and fracturing allies.
    • All Is Lost (~68%): The lowest point, often involving a 'whiff of death'.
    • Dark Night of the Soul (68-77%): Internalization of the theme.
    • Break Into Three (~77%): New information changes the protagonist's perspective.
    • Finale (77-97%): Resolves the arc through five sub-beats: (a) Gather Team/Plan, (b) Execute Plan, (c) High Tower Surprise (twist), (d) Dig Deep Down (test of faith), (e) Execute New Plan.
    • Final Image (~99%): A mirror of the Opening Image showing transformation.
  6. Sanderson's Three Laws of Magic

    master

    Guidelines for designing and using magic systems in fiction:

    • ZEROTH LAW: "Always err on the side of awesome." Wonder has intrinsic value.
    • FIRST LAW: An author's ability to solve conflict with magic is directly proportional to how well the reader understands the magic.
      • Hard Magic: Clear rules; can be used to solve conflicts.
      • Soft Magic: Mysterious; should be used to create problems, not solve them.
      • Warning: Solving a climax with unexplained magic is a deus ex machina.
    • SECOND LAW: Limitations > Powers. Narrative prominence should favor what magic cannot do over what it can do. Focus on:
      • LIMITATIONS: Hard boundaries.
      • COSTS: What the user pays (exhaustion, resources).
      • WEAKNESSES: Vulnerabilities created by magic.
    • THIRD LAW: Expand what you have before adding something new. Prioritize depth (many applications for few powers) over breadth (a 'grab-bag' of many powers). Do not introduce new powers in the final 25% of the story without prior foreshadowing.
  7. Understand the Autonovel pipeline phases and timeline

    master

    The Autonovel pipeline is a multi-phase process designed to produce a full-length novel (e.g., ~75k words). The total estimated API time is 15-30 hours.

    PhaseDescriptionEstimated API Time
    Phase 1: FoundationGenerating lore, world-building, and core concepts.2-4 hours (5-15 iterations)
    Phase 2: First DraftSequential drafting of chapters (approx. 23-30 chapters).8-16 hours
    Phase 3: RevisionAutomated revision cycles and reader panel feedback.4-8 hours (3-6 cycles)
    Phase 4: ExportTypesetting and final document generation.30 minutes
  8. Canon categories and entry examples

    master

    The canon.md file is organized into specific categories to ensure all world-building constraints are captured. Use the following categories to group your facts:

    • Geography: Physical locations and their relationships.
    • Timeline: Historical events and character ages.
    • Magic System Rules: The mechanics and costs of magic (use HARD RULE for absolute constraints).
    • Character Facts: Physical traits, abilities, and personal histories.
    • Political / Factional: Laws, house control, and institutional rules.
    • Cultural: Traditions, superstitions, and social norms.
    • Established In-Story: Permanent changes or events that occurred in specific chapters.
    ## Geography
    - Vael is 12 days' ride north of Tasren. (world.md)
    
    ## Timeline
    - The Sundering happened 300 years before the story begins. (world.md)
    
    ## Magic System Rules
    - All magic costs blood or memory. No exceptions. (world.md, HARD RULE)
    
    ## Character Facts
    - Kael is left-handed. (ch_01)
    
    ## Political / Factional
    - House Drennan controls the salt trade. (world.md)
    
    ## Cultural
    - In Tasren, the dead are burned, never buried. (world.md)
    
    ## Established In-Story
    - Kael killed the messenger in ch_03. This cannot be undone.
  9. Avoid the 'Stability Trap' in AI-generated fiction

    master

    AI models tend to favor stability over change, which can result in flat, generic stories. To ensure a compelling narrative, actively enforce these countermeasures:

    • Enforce Transformation: Characters must end truly different from how they began.
    • Maintain Conflict: Do not let conflicts resolve too quickly or cleanly. Allow for irreversible decisions and irreversible loss.
    • Introduce Darkness: Avoid 'emotional room temperature' by allowing genuine darkness, moral ambiguity, and situations where the 'right' choice is unclear.
    • Information Economy: Withhold information to maintain mystery; do not reveal everything immediately.
    • Vary Intensity: Ensure emotional intensity is not a flat line; include quiet moments, explosive scenes, dread, relief, and horror.
  10. Character Craft: The Lie the Character Believes (K.M. Weiland)

    master

    This maps a character's internal arc directly onto the plot structure:

    Plot Beat% MarkArc Function
    Setup0-12%Character lives in the Lie; it 'works' for them.
    Inciting Event~12%First brush with the Truth.
    First Plot Point~25%Lie is challenged directly, but still held.
    First Half Act 225-50%Using Lie-based strategies; gathering tools.
    Midpoint~50%Glimpses the Truth; shifts from reactive to active.
    Second Half Act 250-75%Oscillates between the Lie and the Truth.
    Third Plot Point~75%Worst consequences of the Lie; must choose.
    Climax~88-95%Final choice: reject Lie, embrace Truth.
    Resolution95-100%Lives in the new Truth; Need is fulfilled.

    Arc Classifications:

    • POSITIVE: Lie $\rightarrow$ Truth (Growth).
    • FLAT: Truth $\rightarrow$ Truth (Changes the world).
    • NEGATIVE: Truth $\rightarrow$ Lie, or Lie $\rightarrow$ Deeper Lie (Fall).
  11. Understand AI detection signals

    master

    AI detection tools (like Pangram or GPTZero) identify synthetic text by looking for specific statistical, vocabulary, and structural patterns. Understanding these signals helps in writing text that avoids being flagged as AI-generated.

    Statistical Signals

    • Low Perplexity: Text is highly predictable. Human writing is more surprising. A perplexity < 50 often flags synthetic text.
    • Low Burstiness: Sentence lengths are uniform. Human writing typically mixes short, punchy sentences with long, winding ones.
    • Uniform Entropy: Information density remains constant. Humans vary density between paragraphs, whereas AI maintains a steady flow.
    • Token Probability Patterns: Word choices align too closely with a language model's predicted probability distribution.

    Vocabulary Signals

    • Slop word frequency: High usage of words overrepresented in LLM outputs (tracked by metrics like the EQ-Bench slop score).
    • Low vocabulary diversity: LLMs tend to reuse the same words more frequently than humans (measured by MATTR).
    • Trigram overrepresentation: Excessive use of specific three-word phrases common in AI text.

    Structural Signals

    • Consistent paragraph templates: Repeating the same structural pattern across all paragraphs.
    • List-heavy formatting: Over-reliance on Markdown bullet lists where prose would be more natural.
    • Balanced section lengths: Suspiciously even distribution of content across sections.
    • Opening/closing formulae: Using generic phrases like "In this article..." or "In conclusion..."
    • Missing personal markers: Lack of first-person pronouns ("I"), anecdotes, specific experiences, or mistakes.
  12. MICE Quotient

    master

    The MICE Quotient (Milieu, Inquiry, Character, Event) categorizes story threads. Every story is a blend of these four types:

    • MILIEU: Exploration of place/world (Enter $\rightarrow$ Leave).
    • INQUIRY: Driven by a mystery (Posed $\rightarrow$ Answered).
    • CHARACTER: Driven by internal state (Dissatisfaction $\rightarrow$ Change).
    • EVENT: Disruption of status quo (Disruption $\rightarrow$ New Equilibrium).

    Rule of Nesting: Threads must close in the reverse order of their opening (e.g., if you open M-I-C, you must close C-I-M).