Blog

The 9-step AI novel-writing pipeline

The NovelKit pipeline from DNA to sync: 9 controlled writing steps on Hermes — no skipping outline/write/review.

The 9-step NovelKit pipeline maps to a task DAG on Hermes: each step has a contract, an output artifact and a gate before the next step. This is the backbone of AI novel writing instead of “prompting for the next chapter”.

The 9 pipeline steps

  1. Create characters — Character Architect, CHARACTER_BLUEPRINT
  2. Build world — World Builder, worldbuilding DB
  3. Plot threads — seed, arc, foreshadow map
  4. Timeline — master timeline in-story
  5. Master outline — arc overview
  6. Chapter outline — chapter beats, active threads
  7. Write chapter — Prose Writer following the style profile
  8. Review — Quality Auditor, PASS 85+
  9. Sync — sync commit, memory, reindex, doctor

Operating through the Hermes CLI

plan_next — the next ready task. record_result — record outcome + breaker. resume — continue after a crash. sync commit <chapter> — gate + memory. doctor — health check.

Task DAG — no skipping steps

Outline not done → no writing. Review FAIL → no sync. A chapter not yet synced → not used as canon for later chapters. Guide: Writing guide. Gate: Quality gate.

Read more: Quality Auditor · Canon file-first · The system

Mapping the 9 steps to Hermes tools

Bootstrap: novelkit_dna, character/world tools. Outline: plot/timeline tools. Write: pipeline write stage. Review: novelkit_gate. Sync: novelkit_sync commit. Every tool is registered through bootstrap.verify_registry() — if a tool is missing, the surface won't start.

Parallel vs sequential

Character Architect + World Builder run in parallel at bootstrap. Write and review are sequential per chapter. Multiple chapters do not run in parallel on the same novel if the previous chapter isn't synced — the DAG enforces this.

record_result and the circuit breaker

Each task records its result through record_result — updating breaker state. Consecutive failures open the breaker, stopping resource burn. Resume only continues tasks that aren't done — no duplicate sync (P12).

The 9-step NovelKit pipeline mapped to Hermes tools

The 9-step NovelKit pipeline isn't a slide checklist — it's a DAG executed on Hermes with a verified tool registry. Bootstrap: novelkit_dna, character architect, world builder (in parallel). Outline: plot weaver, timeline tools. Write: prose stage with creative_input_bundle. Review: novelkit_gate. Sync: novelkit_sync commit (reindex, episodic, Memory.md, doctor, provenance). The Lãng Khách orchestrator dispatches through delegate_tool hub-and-spoke — child agents don't call each other directly.

plan_next (claim a task) → the agent runs the AIAgent loop → record_result (outcome + breaker) → next plan_next. resume after a crash/interruption — only tasks not done, no duplicate sync (P12).

Parallel vs sequential and the sync gate

Bootstrap in parallel is fine — character + world don't block each other if the DNA is complete. Per chapter: write → review → sync are strictly sequential. Chapter N+1 is blocked if chapter N hasn't PASSed ≥85 and synced — to avoid DAG orphan state. Multi-novel in parallel is fine — workspace memory is isolated per title.

The 9 steps at a glance

StepMain outputTool / agent
1 DNAPROJECT_DNA.mdnovelkit_dna
2 Bootstrap chardatabase/charactersCharacter Architect
3 Bootstrap worlddatabase/worldWorld Builder
4 Outlineoutlines/masterPlot Weaver
5 Writechapters/draftProse Writer
6 Reviewreviews/chapter_*Quality Auditor / gate
7 Synccanon + memory + indexnovelkit_sync
8 Doctorhealth reportnovelkit_sync doctor
9 Resume/scalenext batchplan_next / cron

Cron and the circuit breaker in a long pipeline

style_audit every 10 chapters; rolling_seed after sync. Breaker hard×2, soft×3, total×5 — once open it's blocked until reset. bootstrap.verify_registry() — if a tool is missing, the Studio surface won't start.

The AIAgent loop and the Hermes gateway

Every production operation goes through the Hermes CLI/gateway/cron — with a verified tool registry. AIAgent loop: plan_next claims a task → the agent runs with creative_input_bundle → record_result records outcome + breaker state → next plan_next. Resume after a crash only handles tasks not done — P12 prevents duplicate sync. Multi-novel: workspaces run in parallel, but write/review/sync are sequential per chapter per novel.

Publisher scaling workflow

  1. Pilot 3–10 chapters: bootstrap + gate + sync + review trail
  2. Retention test at chapter 10/30 on the platform
  3. Doctor + style_audit before a 20+ batch
  4. Night batch plan_next — the breaker protects if canon breaks
  5. Provenance dossier for legal when scaling to 100 chapters

The novelkit-context plugin runs RAG + RRF within the retrieval budget; novelkit_memory provides 5 layers with per-novel isolation. Lãng Khách is the orchestrator — child agents don't call each other, only delegate_tool hub-and-spoke. 6 service lines: xianxia, romance, isekai, system, urban, sci-fi.

Cluster: guide, quality gate, canon, What is NovelKit, Studio.

9-step pipeline FAQ

Can bootstrap run in parallel?
Yes — character + world in parallel if the DNA is complete; write/review/sync sequential per chapter.
Missing from the tool registry?
bootstrap.verify_registry() fails — the Studio surface won't start the pipeline.
If chapter N HARD-FAILs, what about N+1?
The DAG is blocked — fix the root cause, reset the breaker, resume.

AIAgent loop on the Hermes gateway: plan_next claims → agent runs → record_result → next plan_next. Cron style_audit + rolling_seed; novelkit-context reindexes after sync. The studio.novelkit.cc surface — bootstrap.verify_registry() before start.

The 9-step NovelKit pipeline maps to a real DAG: bootstrap in parallel, write/review/sync sequential per chapter, doctor health-check, resume to scale — Lãng Khách orchestrator hub-and-spoke.

The 9-step pipeline isn't a slide — it's a verified Hermes tool registry on Studio.

Circuit breaker 2/3/5 and cron style_audit/rolling_seed are integrated in a long 100+ chapter pipeline.

novelkit_sync commit reindexes RAG, upserts episodic, curates Memory.md after PASS ≥85.

Common mistakes when skipping steps

Skip World Builder → location/faction contradictions by chapter 20. Skip the outline → Prose Writer filler. Skip review → memory pollution. Skip doctor → the next batch runs on a stale index. The NovelKit DAG blocks dependencies — it's not a polite suggestion.

Where does human oversight sit?

DNA approval, major arc outlines, SOFT-FAIL rewrites, and the decision to publish on a platform. Agents automate draft + review; humans keep creative direction and the contract.

Guide, the system.

Mapping the 9 steps to artifact paths

StepMain output
Charactersdatabase/characters/*.yaml
Worlddatabase/worldbuilding/
Plot threadsdatabase/plot_threads/
Timelinedatabase/timeline/
Outlinesoutlines/
Chapterschapters/
Reviewsreviews/
Syncmemory/, index update, provenance

P12: resume without duplication

Hermes resume only runs tasks not done — avoiding double sync that would create duplicate episodic memory. Critical when cron runs in parallel or the server restarts mid-batch.

Canon, Auditor.