-
-
Notifications
You must be signed in to change notification settings - Fork 0
The Pipeline
The Open-Write Pipeline is an autonomous, resumable, phase-by-phase production system that takes a creative brief from concept to a completed, verified manuscript.
BIBLE -> VOICE -> EDITORIAL LOCK -> (per unit: ARCHITECT -> WRITER -> CRITICS x5 -> EDITORIAL -> VERIFY) -> ASSEMBLE -> ADVERSARIAL READ -> FINALIZE
Each phase:
- Builds a system prompt from the canonical rule files
- Calls the LLM (via your configured provider)
- Writes the artifact to the path the manifest expects
- Runs the gate for that phase
- Blocks on FAIL — never auto-advances past a failure
Human approval is required between phases. The pipeline pauses after each phase so you can review the output and decide whether to continue.
| Phase | Description | Rule File |
|---|---|---|
| Bible | Concept, outline, and format rules |
rules-architect.md + bible templates |
| Voice | Voice experiment (candidates + review + locked spec) | voice_experiment_protocol.md |
| Editorial Lock | Review and lock the outline | editorial_review_protocol.md |
| Phase | Description | Rule File |
|---|---|---|
| Architect | Per-unit plan (scenes, beats, character arcs) | rules-architect.md |
| Writer | First draft of the chapter |
rules-prose-writer.md + novel_craft.md
|
| Critics x5 | Show, Voice, Palette, Continuity, Naturalism | rules-critic-{show,voice,palette,continuity,naturalism}.md |
| Editorial | Full editorial evaluation | rules-editorial-eval.md |
| Verify | Deterministic completion gate | verify_completion.py |
| Phase | Description | Rule File |
|---|---|---|
| Assemble | Combine chapters into full manuscript | assemble.py |
| Adversarial Read | Two-reader A/B critique (Reader A + Reader B) | rules-adversarial-reader.md |
| Finalize | SHA-256-bound completion certificate | finalize.py |
The gate is the sole authority for PASS/FAIL between phases:
- Word counting — strips artifacts, counts prose words
- Manifest building — reads the locked outline, counts chapters
- Verification — path-traversal guards, critic-substance checks, hash binding
- Linting — 6 blocking/advisory lints on finalized output
-
Finalize — writes
COMPLETION_PASS.jsonwith SHA-256 binding
The agent/caller may NEVER write COMPLETION_PASS.json directly — only the /finalize endpoint produces it.
After critics evaluate a chapter, if any say REVISE:
- All critic findings are collected
- The writer automatically rewrites with the feedback
- Critics re-evaluate
- Max 2 retries per chapter
- Proceeds only when critics are satisfied (PASS/ADVANCE verdicts)
You can provide your own content for any phase instead of generating via the model:
- Paste your own bible, voice spec, chapter prose, etc.
- The override is applied before the phase runs
- Useful for migrating existing work into the pipeline
The Pipeline screen has three tabs:
- Phase roadmap (done / current / pending)
- Gate verdict banner (PASS / FAIL)
- [Run Next Phase] button
- Auto-run toggle (2s delay between phases)
- User input override textarea
- Per-phase model routing dropdowns
- Browsable artifact catalog organized by category:
- Bible / Voice Experiment / Design Documents / Prose / Reviews / Manifest
- Markdown and JSON rendering
- Word count display
- Multi-turn chat with the Pipeline Companion
- Knows the current run state
- Apply to Brief — proposes creative brief changes
- Re-run Phase — triggers a phase re-run with new instructions
For debugging and automation:
cd backend
python tools/ow_cli.py status <project>
python tools/ow_cli.py start <project> -i "creative brief"
python tools/ow_cli.py advance <project>
python tools/ow_cli.py advance-all <project>
python tools/ow_cli.py reset <project>
python tools/ow_cli.py outputs <project>
python tools/ow_cli.py read <project> <relpath>
python tools/ow_cli.py critic-test <project> -t show
python tools/ow_cli.py --direct advance <project> # bypass sidecarPipeline state persists to <project>/state/pipeline_run.json. This makes the pipeline resumable across sessions — if you close the app and reopen it, the pipeline picks up where it left off.
Character profiles are automatically routed into pipeline phases by importance level:
| Phase | Receives |
|---|---|
| Architect | All levels (core + present + background + contextual + hidden) |
| Writer | Core + present + hidden (hidden flagged "NEVER name directly") |
| Voice critic | Core + present + voice registers |
| Continuity critic | Core + present + hidden |
| Other critics | Blinded (per Open-Write critic architecture) |
Welcome to the Open-Write Studio wiki!
This wiki covers everything you need to know about Open-Write — from installation to architecture to contributing.
New here? Start with Getting Started.