Skip to content

mrigankad/Novel-OS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Novel OS Mascot

A Production-Grade Multi-Agent Fiction Writing Framework

Write novels like a professional author β€” with an entire editorial team at your command.


Python License Status Agents


╔══════════════════════════════════════════════════════════════════╗
β•‘                                                                  β•‘
β•‘   "The difference between an amateur and a professional          β•‘
β•‘    writer is a systematic process."                              β•‘
β•‘                                                                  β•‘
β•‘                              β€” Novel OS Philosophy               β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

🌟 What is Novel OS?

Novel OS is not just a writing tool β€” it's a complete editorial infrastructure for producing professional-quality novels using multiple specialized AI agents working in concert.

Traditional AI writing generates one response and forgets everything. Novel OS is different. It builds a persistent, intelligent writing environment where:

  • 🧠 Everything is remembered β€” characters, timelines, world rules, plot threads
  • 🀝 Agents collaborate β€” each specialist hands off to the next with full context
  • πŸ›‘οΈ Quality is enforced β€” no chapter advances until it passes multiple gates
  • 🎯 Consistency is guaranteed β€” automated fact-checking catches every contradiction

Think of it like hiring a full-time editorial team: a story architect, a prose craftsman, a line editor, a fact-checker, and a voice coach β€” all working on your novel simultaneously, around the clock.


πŸ›οΈ Architecture at a Glance

graph TD
    A["πŸ—οΈ Architect\nPlanner"] <--> B["✍️ Scribe\nDrafter"]
    B <--> C["πŸ” Editor\nRefiner"]
    C <--> D["πŸ›‘οΈ Guardian\nValidator"]

    A --> SM["🧠 State Manager\nCentral Memory"]
    B --> SM
    C --> SM
    D --> SM

    SM --> SC["🎨 Style Curator\nVoice & Consistency"]

    style A fill:#1e3a5f,stroke:#4a9eff,color:#fff
    style B fill:#1a4731,stroke:#4ade80,color:#fff
    style C fill:#3b1f5e,stroke:#a78bfa,color:#fff
    style D fill:#5e1f1f,stroke:#f87171,color:#fff
    style SM fill:#1f3a4f,stroke:#fbbf24,color:#fff
    style SC fill:#4a1f4a,stroke:#e879f9,color:#fff
Loading

🧠 Core Philosophy

❌ Traditional AI Writing βœ… Novel OS
Single prompt, single output Multi-agent collaborative pipeline
Forgets everything between sessions Persistent JSON state β€” nothing is lost
Characters act inconsistently Full character database with psychology, arcs, locations
Plot holes and dropped threads Automated continuity guardian catches every error
Style drifts between chapters Style curator locks your voice across 300+ pages
Manual continuity checking Automated 4-category validation at every chapter
One-size-fits-all approach Extensible agents per genre (thriller, romance, fantasy…)

🎭 The Five Agents

1 πŸ—οΈ The Architect β€” Story Planner

The Architect is your master story engineer. Before a single word of prose is written, the Architect lays the structural foundation.

What it does:

  • Designs 3-act structure (or Hero's Journey, Save the Cat, etc.)
  • Maps every character's complete arc β€” start, transformation, end
  • Plans narrative beats, chapter-by-chapter
  • Detects plot logic violations before they happen
  • Integrates subplots so they interweave naturally

Output: A detailed outline.json with acts, beats, and scene-level chapter breakdowns


2 ✍️ The Scribe β€” Prose Craftsman

The Scribe is your novelist. It receives the Architect's chapter outline and transforms it into immersive, emotionally resonant prose.

What it does:

  • Writes in deep Point of View (no head-hopping)
  • Crafts dialogue that sounds distinct per character
  • Embeds sensory details (sight, sound, touch, taste, smell)
  • Opens every scene with a hook; ends every chapter with tension
  • Maintains scene goals β†’ obstacles β†’ resolution structure

Output: A polished draft saved to outputs/manuscript/chapter_XXX_draft.md


3 πŸ” The Editor β€” Literary Surgeon

The Editor elevates without homogenizing. It refines the Scribe's draft without erasing voice.

Five editing modes available:

Mode Focus
line Awkward phrasing, verb strength, rhythm
developmental Scene goals, escalation, transitions
pacing Slow sections, compression, momentum
dialogue Natural speech, subtext, distinct voices
tension Stakes, micro-tension, chapter endings

Output: chapter_XXX_revised.md + quality score delta (before/after)


4 πŸ›‘οΈ The Continuity Guardian β€” Fact Checker

The Guardian is a forensic analyst for fiction. Nothing escapes its notice.

Four validation categories:

  • Character Continuity β€” Does she still have blue eyes? Does he know the secret yet?
  • Timeline Continuity β€” Can he travel from London to Paris in 3 hours?
  • World Consistency β€” Are the magic system's rules being respected?
  • Plot Continuity β€” Was the foreshadowing from Chapter 4 resolved?

Output: A CONTINUITY_REPORT with PASS / WARNING / FAIL status and suggested fixes


5 🎨 The Style Curator β€” Voice Guardian

The Style Curator ensures that Chapter 32 sounds like the same author as Chapter 1.

Built-in style profiles:

Profile Characteristics
Lyrical / Literary Elevated vocab, metaphor-rich, complex sentences
Minimalist / Gritty Short sentences, simple words, stark imagery
Cinematic / Epic Visual descriptions, dynamic pacing, dramatic tension
Intimate / Romance Emotional depth, sensory richness, relationship dynamics
Suspenseful / Thriller Tight paragraphs, high stakes, unreliable information

Output: Style analysis with drift detection and prose rhythm metrics


πŸ”„ The Chapter Workflow Loop

Every chapter travels through six quality gates before it's approved:

flowchart LR
    P["πŸ—οΈ PLAN\nArchitect"] --> D["✍️ DRAFT\nScribe"]
    D --> E["πŸ” EDIT\nEditor"]
    E --> V["πŸ›‘οΈ VALIDATE\nGuardian"]
    V --> S["🎨 STYLE\nCurator"]
    S --> U["πŸ’Ύ STATE\nUpdate"]
    U -->|"Next Chapter β†Ί"| P

    style P fill:#1e3a5f,stroke:#4a9eff,color:#fff
    style D fill:#1a4731,stroke:#4ade80,color:#fff
    style E fill:#3b1f5e,stroke:#a78bfa,color:#fff
    style V fill:#5e1f1f,stroke:#f87171,color:#fff
    style S fill:#4a1f4a,stroke:#e879f9,color:#fff
    style U fill:#1f3a4f,stroke:#fbbf24,color:#fff
Loading

A chapter cannot advance until:

  • βœ… The Editor approves prose quality
  • βœ… The Continuity Guardian approves consistency
  • βœ… The Style Curator approves voice

πŸ“Š State Management β€” The Brain of Novel OS

The StoryState is a central JSON database (outputs/state/story_state.json) that all agents read from and write to. It is the single source of truth for your entire novel.

{
  "metadata": { "title": "...", "genre": "..." },

  "story_bible": {
    "themes": [],
    "setting": {},
    "world_rules": {}
  },

  "characters": {
    "char_001": {
      "full_name": "...",
      "role": "protagonist",
      "arc_stage": "...",
      "arc_progress": 45,
      "current_location": "...",
      "emotional_state": "...",
      "relationships": {}
    }
  },

  "plot_threads": {
    "plot_001": {
      "name": "...",
      "status": "active",
      "priority": 5
    }
  },

  "timeline": [ ... ],

  "style_profile": {
    "tone": "...",
    "prose_style": "...",
    "point_of_view": "Third Person Limited"
  },

  "chapters": {
    "1": { "status": "complete", "word_count": 2450 }
  }
}

πŸ“ Project Structure

novel-os/
β”œβ”€β”€ πŸ“„ README.md                   ← You are here
β”œβ”€β”€ πŸ“„ AGENTS.md                   ← Full agent system prompts & protocols
β”œβ”€β”€ πŸ“„ SYSTEM_OVERVIEW.md          ← Architecture deep-dive
β”œβ”€β”€ πŸ“„ LICENSE
β”‚
β”œβ”€β”€ 🐍 core/
β”‚   β”œβ”€β”€ orchestrator.py            ← Main CLI β€” run everything from here
β”‚   └── state_manager.py           ← Persistent JSON state engine
β”‚
β”œβ”€β”€ πŸ€– agents/
β”‚   β”œβ”€β”€ architect/prompt.md        ← Planner agent instructions
β”‚   β”œβ”€β”€ scribe/prompt.md           ← Writer agent instructions
β”‚   β”œβ”€β”€ editor/prompt.md           ← Editor agent instructions
β”‚   β”œβ”€β”€ continuity_guardian/       ← Fact-checker agent instructions
β”‚   β”‚   └── prompt.md
β”‚   └── style_curator/             ← Voice agent instructions
β”‚       └── prompt.md
β”‚
β”œβ”€β”€ πŸ“‹ templates/
β”‚   β”œβ”€β”€ story_bible/template.md    ← World-building starter
β”‚   β”œβ”€β”€ character/template.md      ← Character profile template
β”‚   β”œβ”€β”€ outline/template.json      ← Story structure template
β”‚   └── chapter/template.md        ← Chapter template
β”‚
β”œβ”€β”€ πŸ“š docs/
β”‚   β”œβ”€β”€ WORKFLOWS.md               ← Step-by-step usage guide
β”‚   └── API.md                     ← Programmatic interface reference
β”‚
β”œβ”€β”€ 🎬 examples/
β”‚   └── demo_project/              ← Complete working example
β”‚
└── πŸ“€ outputs/                    ← (Generated at runtime)
    β”œβ”€β”€ state/story_state.json     ← Central state file
    β”œβ”€β”€ manuscript/                ← Chapter drafts and revisions
    └── feedback/                  ← Agent prompts and reports

πŸš€ Quick Start

Prerequisites

python --version   # Python 3.8+ required

No external dependencies β€” Novel OS runs on pure Python.


Step 1 β€” Initialize Your Novel

python core/orchestrator.py init --title "The Last Signal" --genre "Sci-Fi Thriller"

This creates your project structure and a story_bible.md template.


Step 2 β€” Define Your World

Edit outputs/story_bible.md to add:

  • Your world rules (magic system, technology, social structures)
  • Primary locations with descriptions
  • Central themes and tone

Then add characters via CLI:

python core/orchestrator.py character add --name "Lena Vasquez" --role protagonist
python core/orchestrator.py character add --name "Director Malk" --role antagonist

Step 3 β€” Generate the Story Outline

python core/orchestrator.py plan outline --chapters 32

Reviews the outputs/outline.json β€” the Architect generates act structure with Save the Cat beats.


Step 4 β€” Write Chapter by Chapter

# 1. Plan the chapter (generates detailed Scribe prompt)
python core/orchestrator.py plan chapter --number 1 --pov "Lena Vasquez"

# 2. Feed the prompt to your AI, paste the result to a file, then submit
python core/orchestrator.py write --chapter 1 --draft-file chapter1_draft.md

# 3. Edit (choose a mode: line, developmental, pacing, dialogue, tension)
python core/orchestrator.py edit --chapter 1 --mode line

# 4. Validate continuity
python core/orchestrator.py validate --chapter 1

# 5. Approve and update state
python core/orchestrator.py approve --chapter 1

Step 5 β€” Track Progress

python core/orchestrator.py status

Output example:

============================================================
πŸ“– The Last Signal
   Genre: Sci-Fi Thriller
   Created: 2025-01-15
============================================================

πŸ‘₯ Characters: 4
πŸ”— Plot Threads: 7
   Active: 5

πŸ“ Chapters:
   βœ… Complete: 8
   🟣 Edited: 1
   🟑 Drafting: 1
   βšͺ Planned: 22

πŸ“Š Progress: 8/32 (25.0%)
============================================================

Step 6 β€” Export the Manuscript

python core/orchestrator.py export

Compiles all approved chapters into a single outputs/Your_Novel_Title.md manuscript file.


🎯 Genre-Specific Configurations

Genre Recommended Agent Setup
Commercial Fiction Standard 5-agent loop
Epic Fantasy + World-Builder Agent
Mystery / Thriller + Clue-Tracker Agent
Romance + Emotional Arc Agent
Literary Fiction + Theme Weaver Agent
Series Writing + Canon Manager Agent

All extended agents follow the same protocol and can be added as new agents/[name]/prompt.md files.


βš™οΈ Technical Specifications

Spec Detail
Language Python 3.8+
State Format JSON
CLI Engine argparse
Dependencies None (pure Python stdlib)
State File outputs/state/story_state.json
Chapter Storage outputs/manuscript/

πŸ“– Documentation

Document Description
AGENTS.md Full system prompts, output formats, and quality standards for all 5 agents
SYSTEM_OVERVIEW.md Deep architectural overview and design rationale
docs/WORKFLOWS.md Complete step-by-step writing workflows
docs/API.md Programmatic API reference for custom integrations

πŸ’‘ Why Novel OS Works

The core insight behind Novel OS is that great novels are not written β€” they are engineered.

Professional authors use editors, fact-checkers, and style guides. They maintain character bibles, plot trackers, and timelines. They revise chapter-by-chapter with different lenses (structure, prose, pacing, consistency).

Novel OS gives every writer access to exactly this process, automated and systematic.

Without Novel OS

  • ❌ Characters forget their own backstory
  • ❌ Plot holes emerge 200 pages in
  • ❌ Style drifts between early and later chapters
  • ❌ Timeline inconsistencies invalidate plot points
  • ❌ Subplots disappear without resolution
  • ❌ Tension collapses in the second act

With Novel OS

  • βœ… Consistent character psychology from page 1 to 300
  • βœ… Every continuity error caught before it compounds
  • βœ… Locked voice and style profile across all chapters
  • βœ… Coherent, auditable timeline
  • βœ… All plot threads tracked and resolved
  • βœ… Progressive tension and escalation enforced


Novel OS β€” Write novels like a professional author, with an entire editorial team at your command.

v1.0 | Production-Ready Fiction Framework | MIT License

Releases

No releases published

Packages

 
 
 

Contributors

Languages