Iron Law (under no circumstances may it be violated)
The following constraints must not be bypassed no matter what the user requests:
⛔ Do not skip the mandatory chapter closed loop: After each chapter is generated, the following must be executed in sequence: "update memory → check consistency → style calibration → proofread → gate check". If any of the five steps is missing, it is considered a process interruption. When the gate is not passed (gate_result.json in passed != true), it is strictly forbidden to proceed to the next chapter.
⛔ Do not bypass pre-book confirmation: Before executing /一键开书 , the user must be guided to complete confirmation of the five elements (target readers, writing style, core forbidden zones, automation level, target scale), and write them into idea_seed.md. It must not be omitted on the grounds that "the user is in a hurry".
⛔ Do not confuse main text with meta-information: The novel's main text must not contain any [说明]、(注:)、TODO, writing analysis paragraphs, or character positioning markers. Once any appear, a P0 rewrite is triggered immediately; they must not be retained and "fixed later".
⛔ Do not continue writing after a gate failure:gate_result.json shows passed: false , the only legal operation is to execute /修复本章. Do not bypass, manually modify gate_result.json, or ignore it on the grounds that it is a "small problem".
⛔ Do not arbitrarily modify the mainline plan: No Agent (including the writing agent) has the authority to modify novel_plan.md 's mainline architecture. Mid-course outline changes must explicitly execute /改纲续写 and be confirmed by the user.
⛔ Do not accelerate the plot: Each chapter may trigger at most 1 of the following quotas (A substantial advancement of the mainline conflict / B decisive escalation of a major relationship / C complete revelation of a core secret). Triggering 2 or more at the same time = overstepping; the Beat Sheet must be modified and rewritten, and the gate is forced to fail. After a fast-paced chapter (mainline breakthrough), the next chapter must be slow-paced or medium-paced.
1. Capability Matrix
| Capability | Status | Entry Command |
|---|---|---|
| Interactive brainstorming guidance + knowledge graph construction | [已实现] |
/脑洞建图 |
| Three-command quick start for beginners | [已实现] |
/一键开书 /继续写 /修复本章 |
| Five-step quality gate per chapter | [已实现] |
Automatic execution |
| Long-term memory + 3-million-word consistency guarantee | [已实现] |
Gate + RAG + graph collaboration (all five layers in place) |
| RAG plot retrieval + entity mapping | [已实现] |
/剧情检索 /更新剧情索引 |
| Online research + knowledge gap supplementation | [已实现] |
/联网调研 |
| Style extraction, accumulation, and cross-project reuse | [已实现] |
/风格提取 /风格库检索 |
| Pre-continuation guidance + automatic advancement without human intervention | [已实现] |
/继续写 |
| Fully automatic book-writing scheduling (resume from breakpoint) | [部分实现] |
/一键写书 |
| Novel imitation (online deconstruction + modification) | [部分实现] |
/仿写 /拆书 |
| Mid-course outline change + cascading updates | [已实现] |
/改纲续写 |
| Outline anchors + strict progress quota constraints | [已实现] |
Automatic integration |
| Multi-step pipeline writing (Beat Sheet) | [已实现] |
Automatic integration |
| Reverse braking (Anti-Resolution) | [已实现] |
Automatic integration |
| Event matrix + cooldown mechanism | [已实现] |
Automatic integration |
| Cross-Agent dual-agent review | [已实现] |
/双审 |
| Mandatory confirmation of readership + writing style | [已实现] |
/一键开书 --target-audience --writing-style |
Consistency assurance mechanism for 3 million words
Long-term memory is not a single feature, but the coordination of multiple layers of mechanisms:
| Layer | Mechanism | Status |
|---|---|---|
| Layer 1 | 5-step gate per chapter (memory sync + consistency + style + proofreading + gate script) | [已实现] |
| Layer 2 | RAG plot retrieval (two-level coarse filtering and fine ranking, automatically rereads relevant passages before writing) | [已实现] |
| Layer 3 | Knowledge graph (nodes + edges + versions, written back each chapter, cascading on outline changes) | [已实现] |
| Layer 4 | Outline anchors (global progress bar, chapter advancement quota, failure upon exceeding bounds) | [已实现] |
| Layer 5 | Cross-Agent review (independent reviewer cross-validation, batch health check of 10 chapters) | [已实现] |
All 5 layers are in place and can support plot consistency at the scale of 3 million words. The triple safeguards of automatic knowledge graph write-back each chapter + strong constraints from outline anchors + cross-Agent review fundamentally eliminate global plot drift.
2. Three commands for beginners
| Command | Description |
|---|---|
/一键开书 |
Input the genre and plot seed, and automatically complete modeling + database creation + first chapter preparation |
/继续写 |
Automatically execute the full chain of "retrieval → writing → gate → index update" |
/修复本章 |
Automatically generate the shortest repair path after gate failure |
Beginner mode:/新手模式 开启(default); advanced users:/新手模式 关闭
3. Mandatory confirmation before starting the book (must pass before writing)
Execute /一键开书 or /脑洞建图 before, you must guide the user to confirm the following elements and write them into 00_memory/idea_seed.md:
- Target readers: age group, channel (Qidian/Fanqie/publishing), taste preferences
- Writing style: historical main text / web novel power fantasy / literary / suspense mystery / delicate romance (refer to the genre style matrix)
- Core禁区: what cannot be written (sensitive topics, reader dealbreakers)
- Automation level: manual (confirm every chapter) / semi-automatic (confirm every 10 chapters) / fully automatic
- Target scale: total word count, expected number of volumes, single-chapter word count range
When the user answers "unsure": based on the genre and readership, provide 2-3 recommended options to choose from.
The confirmation results are directly bound to subsequent generation parameters (temperature, dialogue ratio, sentence-length rhythm, payoff density, etc.).
4. Mandatory chapter closed loop
After each new chapter is generated, it is executed fixedly, checked item by item in order, and if any item fails, ⛔ entering the next chapter is prohibited:
-
/更新记忆⚠️ — Sync chapter changes to the state tracker.Consequences of skipping: Key information such as character states, foreshadowing, and timelines loses tracking, and subsequent chapters will produce setting conflicts. -
/检查一致性⚠️ — Check for plot/setting/character/timeline conflicts.Consequences of skipping: Contradictions accumulate in subsequent chapters, and after a hundred chapters they are almost impossible to fix. -
/节奏审查⛔ — Semantic-level rhythm review(executed by Claude Code itself, no external API required). Read the chapter text, complete four judgments, and write them into04_editing/gate_artifacts/<chapter_id>/pacing_review.md。Consequences of skipping: Implicit plot acceleration that keyword scripts cannot detect will slip through the gate. See the "Rhythm Review Execution Specification" below for details. -
/风格校准⚠️ — Detect and correct stylistic drift (genre tone, sentence-length rhythm, dialogue ratio).Consequences of Skipping: Style drifts chapter by chapter, and reader churn rises. -
/校稿⛔ — Two-pass de-AI-flavor polishing: remove 24 categories of AI patterns → self-audit remaining AI feel → second revision. Resolves translationese, over-summarization, and dialogue homogenization.Consequences of Skipping: The main text retains obvious AI traces; once readers recognize them, they lose immersion, directly affecting completion rate. Seereferences/humanizer-guide.md。 -
/门禁检查⛔ — Script-based verification of publishing standards (gate_result.jsonpassed: trueonly then can the next chapter be unlocked).Consequences of Skipping: Violates the Iron Law, and the process is forcibly interrupted.
Why It Cannot Be Skipped: In a long novel, setting contradictions and style drift amplify exponentially with each chapter. Spending 10 extra minutes on the gate per chapter can avoid a comprehensive rework of 30 chapters later.
/节奏审查 Execution Specification (Claude Code itself serves as the review Agent)
When executing /节奏审查 ,no external API is required; the current Claude Code instance directly reads the chapter text and performs the following four semantic judgments, writing the results to the artifact file:
Artifact Path:04_editing/gate_artifacts/<chapter_id>/pacing_review.md
Output Template(fill in strictly according to the format for easy script parsing):
# 节奏审查报告
## 一、档位判断
- **本章档位**:[慢档 / 中档 / 快档]
- **判断依据**:[1-2句:主要场景类型、核心矛盾推进幅度]
## 二、A/B/C 配额核查
- **A(主线矛盾实质推进)**:[触发 / 未触发] — [简要说明]
- **B(主要关系决定性升级)**:[触发 / 未触发] — [简要说明]
- **C(核心秘密完整揭露)**:[触发 / 未触发] — [简要说明]
- **配额违规**:[是 / 否](同时触发 ≥2项 = 违规)
## 三、章末悬念质量
- **悬念等级**:[强 / 中 / 弱 / 无]
- **具体悬念内容**:[用一句话描述章末留下的钩子]
## 四、隐性加速检测
- **是否存在关键词未覆盖的隐性加速**:[是 / 否]
- **说明**:[如有,描述具体表现;无则写"无"]
## 综合结论
节奏审查: [通过 / 失败]
失败原因: [若失败,填写具体原因;通过则填"无"]
Review Judgment Criteria:
- A triggered = a substantive, irreversible change occurs in the chapter's main plot landscape (not a minor friction)
- B triggered = the relationship of the main characters reaches a decisive node (alliance/rupture/confession/declaration of war, etc.)
- C triggered = the core secret is fully revealed in this chapter (not hinted at)
- Conditions for a "fail" conclusion: A/B/C simultaneously trigger ≥2 items or there is implicit acceleration or the chapter-end suspense level is "none" and it is not a slow-paced ending
5. Low-Context Strategy
- Default read-only before writing:
00_memory/novel_plan.md、00_memory/novel_state.md - For new plot, prioritize executing
/剧情检索, reading onlynext_plot_context.mdthe recommended Top snippets - Per-chapter pre-read limit:at most 4 files
- Perform deep compression and deep style calibration once every 10 chapters
6. Five Major Working Modes
| Mode | Process | Applicable Scenario | Status |
|---|---|---|---|
| From a vague idea | /脑洞建图 → /一键开书 → /继续写 → chapter closed loop |
Only one inspiration | /脑洞建图 planning, the rest implemented |
| Imitative writing from a sample chapter | /仿写 → /风格提取 → /题材选风格 → /继续写 → chapter closed loop |
Imitate an existing work | Partially implemented |
| Continue writing an existing project | /续写 → /继续写 or /批量写作 → chapter closed loop |
Resume after interruption | Implemented |
| Mid-course outline change | /改纲续写 → cascading update → /继续写 → chapter closed loop |
Plot direction needs adjustment | Implemented |
| Fully automatic | /一键写书 → the system automatically loops until the target word count |
Fully managed | Partially implemented (scheduling framework ready) |
For detailed step-by-step tutorial, see references/user-guide.md。
7. Long-form Strong Constraint Mechanisms
The following mechanisms are the core safeguards for long-form works at the 3-million-character level. For detailed specifications, see the respective reference documents.
7.1 Knowledge Graph (Replacing Flat Files)
Use a graph structure (nodes + edges + versions) to manage characters, events, foreshadowing, and worldbuilding rules. After each chapter is written, automatically extract information and write it back to the graph; when the outline is changed, update in cascade.
→ See references/story-graph-schema.md
7.2 Outline Anchors and Progress Quotas
Before writing each chapter, read the global progress bar and dynamically inject constraints ("Currently at Chapter X, 200 chapters remain to the goal; this chapter must not exceed the current node's plot"). Crossing the boundary directly triggers a gate failure.
→ See references/outline-anchor-quota-spec.md
7.3 Multi-step Pipeline Writing
Break "writing one chapter" into: generate a Beat Sheet (storyboard) → expand into flesh according to the Beats → concatenate and synthesize. Forcibly limit the plot span of a single generation, allowing each scene to fully unfold.
→ See references/beat-pipeline-spec.md
7.4 Reverse Braking + Event Cooldown + Pacing Quotas
- Three-tier pacing system: Slow tier (setup/bonds, at least 1 chapter every 3-4 chapters, zero main plot advancement) / Medium tier (secondary conflicts heat up without erupting, ≥60%) / Fast tier (main plot breakthrough, ≤2-3 times per volume; after a fast tier there must be a slow/medium tier buffer)
- Hard quota caps(Iron Law Article 6): each chapter may trigger at most 1 of A/B/C; after triggering, cool down chapter by chapter
- Mandatory self-check at chapter end: ① Is the main plot's core conflict still unresolved? ② What is the specific suspense at the chapter end (must not be vague)?
- Non-final chapters are forbidden from resolving the main plot's core conflict; event classification pools have cooldowns; non-conflict scenes must plant micro-foreshadowing
→ See
references/anti-resolution-cooldown-spec.md
7.5 Cross-Agent Dual-Intelligence Review
- Chapter-by-chapter review: after the writing tool completes → a different tool reviews (Claude writes, Codex reviews, and vice versa)
- Batch review: every 10 chapters, a review officer with the persona of an "extremely strict veteran bookworm" conducts a three-dimensional checkup (logical flaws / reading experience / de-AI-ification)
- Anti-infinite-loop: at most 3 review rounds per chapter; if there are 3 consecutive chapters of "conditional pass", forcibly pause and request human intervention
→ See
references/cross-agent-review-protocol.md
8. Command Table
Beginner Commands
| Command | Function | When to Use |
|---|---|---|
/一键开书 |
Automatically complete the entire book-starting process | First time starting a project |
/继续写 |
Guide the plot direction → automatically run the complete chapter process serially | Daily chapter advancement |
/修复本章 |
Automatically repair after gate failure | After the gate returns failure |
/新手模式 |
Switch between simplified/advanced interaction layers | As needed |
/继续写 pre-continuation guidance mechanism
Each time /继续写 is executed, the system automatically performs the following before writing:
- Guiding questions: ask the user about their preferred plot direction for this chapter ("What do you want to happen in this chapter? Any new ideas?")
- Idea expansion: based on the current outline and knowledge base, provide 2-3 possible plot directions to choose from
- User confirmation: the user selects a direction, or provides their own idea
- Fallback mechanism: if the user replies "not sure"/"whatever"/"automatic", then proceed automatically according to
novel_plan.mdcurrent node, without manual intervention - Fully automatic mode: If the "fully automatic" level is selected in the book-start confirmation card, skip the guide and write directly according to the outline
- Pacing pre-check (⛔ BLOCKING, must be declared before writing starts): ① The pacing tier of this chapter (slow/medium/fast) and its basis; ② The quota trigger record for the last 3 chapters, confirming that this chapter triggers at most 1 of A/B/C; ③ What specific suspense is retained at the end of the chapter. Writing must not begin until the pre-check passes.
Creation Commands
| Command | Function | When to Use |
|---|---|---|
/写全篇 |
Vague idea → million-word roadmap | Starting a new book or rebuilding the outline |
/写作 |
Generate a single-chapter draft and trigger the closed loop | Manually advance a single chapter |
/续写 |
Restore session state and continue | Resume after interruption |
/批量写作 |
Continuously generate multiple chapters | Rapid advancement |
/修改章节 |
Revise written chapters and cascade updates | Chapter rework |
/改纲续写 |
Mid-course outline change + anchor recalculation + graph cascade + RAG rebuild | Continue writing after adjusting the main storyline direction |
/一键写书 |
Fully automatic writing scheduling | Fully managed |
/改纲续写 Usage Instructions
Applicable scenarios: If it is discovered that the main storyline direction needs adjustment and novel_plan.md has been modified, this command must be used to realign the system's three-layer index (outline anchors + knowledge graph + RAG index) before writing can continue.
Execution preconditions(order cannot be reversed):
- Manually edit
00_memory/novel_plan.md, complete the outline changes - Confirm the starting chapter affected by the outline change (
--from-chapter), that is, the chapter from which the plot direction has changed
Three-step cascade process:
- Anchor recalculation(must succeed, otherwise abort): back up the current
outline_anchors.json→ recalculate all outline anchors from the modifiednovel_plan.mdRecalculate all outline anchors - Graph cascade marking(depends on successful anchor recalculation): mark the knowledge graph node of
last_updated >= from_chapterascascade_pending=True, and generate a cascade impact report - RAG index rebuild(depends on successful anchor recalculation): call
plot_rag_retriever.py buildto fully rebuild the retrieval index
Script execution:
python3 scripts/novel_flow_executor.py revise-outline \
--project-root <项目目录> \
--from-chapter <起始章节号> \
--change-description "<本次改纲的简要说明>" \
[--emit-json]
Parameter description:
| Parameter | Type | Required | Description |
|---|---|---|---|
--project-root |
Path | Yes | Novel project root directory |
--from-chapter |
Integer (≥1) | Yes | Starting chapter number affected by the outline change |
--change-description |
String | No | Brief description of this outline change (written into the report) |
--emit-json |
Switch | No | Append the JSON result to stdout |
Success criteria:ok = anchors_recalculated AND report_written(graph marking failure and RAG build failure are soft failures and do not affect ok)
Artifacts:
.flow/backup_anchors_<时间戳>.json: anchor backup before the outline change00_memory/outline_anchors.json: new anchors after recalculation00_memory/revise_outline_report.md: report on the scope affected by this outline change (total number of volumes/chapters, number of cascaded nodes, RAG status)
Follow-up operations after the outline change: Check the report to confirm the cascade nodes are correct → for cascade_pending=True perform manual review or automatic correction on the nodes → execute /继续写 resume the normal writing workflow
Quality commands (required for every chapter)
| Command | Function |
|---|---|
/更新记忆 |
Sync status tracker |
/检查一致性 |
Check plot/setting/timeline conflicts |
/节奏审查 |
Semantic-level pacing review, written to pacing_review.md (executed by Claude Code itself, no external API needed) |
/风格校准 |
Detect style drift |
/校稿 |
De-AI polish |
/门禁检查 |
Scripted validation of publishing standards |
Retrieval and memory commands
| Command | Function | When to use |
|---|---|---|
/更新剧情索引 |
Scan chapters to build an index | After the gate check passes |
/剧情检索 |
RAG retrieval of relevant passages | Before writing each chapter |
/检索记忆 |
Search memory by keyword | Locate historical settings |
/伏笔状态 |
View foreshadowing setup/payoff/overdue | Confirm before writing |
/角色状态 |
Summarize the current status of characters | Before ensemble chapters |
/时间线 |
View the chronological order of events | Cross-chapter time-skip narration |
/联网调研 |
Online search to supplement the knowledge base | Fill knowledge gaps |
Style commands
| Command | Function | When to use |
|---|---|---|
/题材选风格 |
Select a baseline style by genre matrix | Set the style when starting a book |
/风格提取 |
Extract style from sample chapters into the library | When the user provides sample chapters |
/风格迁移 |
Apply the style profile to chapters | Switch writing style |
/风格库检索 |
Retrieve reusable styles | When choosing a style is difficult |
Analysis commands
| Command | Function | When to use |
|---|---|---|
/拆书 |
Break down the work's structure and extract payoff hooks | Study a target work |
/仿写 |
Extract writing templates and style features | Imitate the style of sample chapters |
Planning commands
| Command | Function | When to use |
|---|---|---|
/脑洞建图 |
Interactive brainstorming + knowledge graph construction | When you only have a vague idea |
/双审 |
Cross-Agent dual-agent review | Every 10 chapters or manually triggered |
/完整流程 |
Connect the entire pipeline | Run through in one go |
9. Script entry points
| Script | Purpose |
|---|---|
python3 scripts/novel_flow_executor.py one-click |
/一键开书 |
python3 scripts/novel_flow_executor.py continue-write --project-root <目录> --query "<新剧情>" |
/继续写(All features enabled by default, no extra parameters needed) |
python3 scripts/novel_flow_executor.py revise-outline --project-root <目录> --from-chapter <N> --change-description "<说明>" |
/改纲续写(Anchor recalculation + graph cascade + RAG rebuild) |
python3 scripts/plot_rag_retriever.py build/query |
/更新剧情索引 /剧情检索 |
python3 scripts/chapter_gate_check.py |
/门禁检查 |
python3 scripts/gate_repair_plan.py |
/修复本章 |
python3 scripts/auto_novel_writer.py |
/一键写书 |
python3 scripts/style_fingerprint.py |
/风格提取 |
python3 scripts/research_agent.py |
/联网调研 |
python3 scripts/benchmark_novel_flow.py |
/评测基线 |
python3 scripts/story_graph_builder.py |
Knowledge graph CRUD / validation / Mermaid export |
python3 scripts/outline_anchor_manager.py |
Outline anchor initialization / quota check / advancement |
python3 scripts/event_matrix_scheduler.py |
Event matrix cooldown / recommendation / recording |
python3 scripts/anti_resolution_guard.py |
Reverse brake validation / constraint prompt generation |
python3 scripts/beat_sheet_generator.py |
Beat Sheet generation / expansion prompts / validation |
python3 scripts/chapter_synthesizer.py |
Chapter synthesis / synthesized draft quality validation |
python3 scripts/cross_agent_reviewer.py |
Cross-Agent review task generation / result recording |
python3 scripts/story_graph_updater.py |
Automatically extract information after chapter completion to update the knowledge graph |
python3 scripts/interactive_ideation_engine.py |
Interactive brainstorming guidance, 5-round convergence / deliverable generation |
python3 scripts/text_humanizer.py |
AI trace detection / two-pass polishing prompt generation (automatically integrated into the chapter writing workflow) |
python3 scripts/editorial_team_manager.py |
Editorial team state management: snapshots/review records/state queries/manual intervention detection |
continue-write Standard usage (v1.0.0, all features enabled by default):
# 标准用法:知识图谱/大纲锚点/Beat Sheet/AI痕迹纠正/风格更新均自动激活
python3 scripts/novel_flow_executor.py continue-write \
--project-root <项目目录> --query "<新剧情>"
# 高级用户:按需关闭部分功能
python3 scripts/novel_flow_executor.py continue-write \
--project-root <项目目录> --query "<新剧情>" \
--no-beat-sheet --no-constraints --no-graph-update
See for complete parameter descriptions references/command-playbook.md。
10. Reference Documentation Navigation
Select the corresponding document based on your scenario:
| What do you want to do | Which document to read |
|---|---|
| First time using it, starting a book from scratch | references/user-guide.md |
| View the complete parameters of a command | references/command-playbook.md |
| Understand gate deliverables and pass criteria | references/gate-artifacts-spec.md |
| Plan a volume and chapter structure at the million-word level | references/million-word-roadmap.md |
| Choose a suitable writing style | references/genre-style-matrix.md |
| Understand the design principles of RAG retrieval | references/rag-consistency-design.md |
| Use the online research feature | references/research-guide.md |
| Use the fully automatic book writing feature | references/auto-write-guide.md |
| Run /proofread for de-AI polishing | references/humanizer-guide.md |
| Understand the knowledge graph data structure | references/story-graph-schema.md |
| Understand outline anchors and progress quotas | references/outline-anchor-quota-spec.md |
| Understand multi-step pipeline writing | references/beat-pipeline-spec.md |
| Understand reverse braking and event cooldown | references/anti-resolution-cooldown-spec.md |
| Understand the cross-Agent review protocol | references/cross-agent-review-protocol.md |
| Understand the brainstorming guidance process | references/interactive-brainstorming-playbook.md |
| Imitate or heavily adapt an existing novel | references/adaptation-workflow.md |
| Understand the editorial team structure and work protocol | references/editorial-team-protocol.md |
11. Agent Editorial Team (/启动编辑团队)
11.1 Why an editorial team is needed
Single-Agent writing has three root problems:
- AI hallucination: The writing Agent may fabricate place names, character names, and setting rules that have never appeared
- Character confusion: Characters are placed in the wrong positions, given abilities they do not possess, or all have identical tone and style
- Agent thinking contaminates the main text: Analytical thinking, character positioning explanations, and meta notes from the writing process seep into the novel's main text
The editorial team builds three firewalls into the production process through strict separation of responsibilities.
11.2 Team structure (real newsroom model)
用户
│
▼
总编辑(Claude Code 主 Agent)
│ 协调所有子 Agent,汇总报告,作最终裁判
├──► 策划主编(planning-editor)
│ 读规划文件 → 生成 Chapter Brief → 传给写作特工
│
├──► 写作特工(novelist)
│ 只接收 Brief,只输出纯正文,严格隔离 meta 信息
│
├──► 反AI编辑(anti-ai-editor) ┐ 并行
└──► 连载核实官(consistency-reviewer)┘ 审核
11.3 Trigger commands
/启动编辑团队 [--项目路径 <路径>] [--章节 <N>] [--模式 单章|批量]
Single-chapter mode(default): fully go through the production + review process for one chapter. Batch mode: continuously produce and review multiple chapters (waiting for each chapter to pass the gate before proceeding).
11.4 Execution steps (Claude Code operates according to this process)
When received /启动编辑团队 when, Claude Code executes:
步骤 0:准备上下文快照
python3 scripts/editorial_team_manager.py snapshot --project-root <路径>
→ 读取输出中的 context_file 路径和 current_chapter_no
步骤 1:创建团队
TeamCreate(team_name="editorial-team-ch{N}", description="第N章编辑生产")
步骤 2:召唤策划主编
Agent(subagent_type="planning-editor", team_name=..., name="planning-editor",
prompt="请读取以下文件并生成第N章 Chapter Brief:
novel_plan.md={路径}
novel_state.md={路径}
character_tracker.md={路径}")
→ 等待 CHAPTER_BRIEF_START...CHAPTER_BRIEF_END
步骤 3:召唤写作特工
Agent(subagent_type="novelist", team_name=..., name="novelist",
prompt="[将完整 CHAPTER_BRIEF 原文粘贴于此]")
→ 等待 NOVEL_TEXT_START...NOVEL_TEXT_END
步骤 4:并行召唤审核者(同时发起)
Agent(subagent_type="anti-ai-editor", team_name=..., name="anti-ai-editor",
prompt="请对以下章节正文执行去AI化审核:\n[NOVEL_TEXT]")
Agent(subagent_type="consistency-reviewer", team_name=..., name="consistency-reviewer",
prompt="请核查以下章节正文,项目路径:<路径>\n[NOVEL_TEXT]")
→ 等待两份报告
步骤 5:总编辑汇总判定
- 如有 P0 → 返工(最多2次)
- 无 P0 → 使用反AI编辑润色后的版本
- 记录结果:
python3 scripts/editorial_team_manager.py record-review \
--project-root <路径> --chapter N --stage final --verdict pass/conditional/rewrite \
--p0 X --p1 Y --p2 Z
步骤 6:输出最终章节包
将 FINAL_CHAPTER_PACKAGE 写入 03_manuscript/第N章-[标题].md
步骤 7:检查是否需要人工介入
python3 scripts/editorial_team_manager.py need-human --project-root <路径>
→ 如 need_human=true,暂停并向用户汇报
步骤 8:关闭团队
SendMessage(type="shutdown_request") × 各子 Agent
TeamDelete()
11.5 Main text isolation protocol (prevent Agent thinking from contaminating the main text)
This is the most critical safety mechanism:
| Agent | Allowed output content | Strictly prohibited output content |
|---|---|---|
| Writing Agent | NOVEL_TEXT_START to NOVEL_TEXT_END the pure novel main text between |
Analysis explanations, character positioning, writing ideas, meta notes, parenthetical explanations |
| Anti-AI editor | Report + HUMANIZED_TEXT purified main text within the tags |
Insert any annotations into the polished main text |
| Serialization verification officer | Structured verification report | Directly modify the main text |
| Editor-in-Chief | Final Chapter Package (Main Text and Report Sections) | Mixing review comments into the main text section |
P0 Detection Trigger: If any of the following appears in the main text, a P0 mandatory rewrite is immediately triggered:
[]Explanatory text enclosed in parentheses (such as[此处填写]、[角色A])(注:)、【写作说明】、TODO、作者按and other metadata markers- The writing Agent's reasoning process or analytical paragraphs appearing in the main text section
11.6 Mandatory Role Consistency Verification Checklist
Items that the Serialization Verification Officer must check in every chapter (may not be omitted):
- The current geographic location of all appearing characters is consistent with character_tracker
- The ability boundaries of all appearing characters have not been violated
- Characters confirmed dead/departed have not been revived in the main text (unless in an explicit flashback/hallucination scene)
- The progression logic between the time point of this chapter and the time point of the previous chapter is reasonable
- No new place names/personal names/organizations that were never registered in the planning documents and character profiles appear in the main text
11.7 Balancing Mechanism Between Free Creation and Planning Compliance
The editing team maintains a strict division of labor between the following two types of rules:
The Planning Editor-in-Chief is responsible for compliance (hard constraints):
- The plot task of the current chapter must be advanced
- The forbidden zones of this chapter (plot points that must not be touched in advance) must be observed
- The authenticity of characters' locations and states
The Writing Agent is responsible for innovation (soft freedom):
- Chapter entry angle (8 modes rotate, no repetition)
- The specific presentation method of the scene
- The specific content and pacing of dialogue
- The choice of detailed descriptions
Things that no Agent has the authority to do:
- Change the novel's main plot plan
- Have characters arrive early at places they should not reach
- Invent important settings outside the planning documents
11.8 State Management Script
# 生成上下文快照(团队启动前必须运行)
python3 scripts/editorial_team_manager.py snapshot --project-root <路径>
# 记录单次审核结果
python3 scripts/editorial_team_manager.py record-review \
--project-root <路径> --chapter N --stage final \
--verdict pass --p0 0 --p1 2 --p2 3
# 查看最近10章审核历史
python3 scripts/editorial_team_manager.py status --project-root <路径>
# 检测是否需要人工介入
python3 scripts/editorial_team_manager.py need-human --project-root <路径>