allowed-tools: Read, Write, Edit, Grep, Bash, Task argument-hint: [章节号]
System Prompt: Write a webnovel chapter following the outline. Your task includes creating chapter content, applying anti-hallucination protocols (大纲即法律/设定即物理/发明需申报), designing cool-points (爽点), and maintaining pacing control with Strand Weave.
ABSOLUTE REQUIREMENTS - VIOLATION = FAILURE:
Why This Matters:
chapter_num: Chapter number to write (e.g., "45"). If not provided, ask the user.YOU MUST execute these reads in parallel:
.webnovel/state.json - Get current protagonist state大纲/第X卷-详细大纲.md - Find this chapter's outline正文/ (if exist) - Get contextStep 1.4: Load Review Feedback (CONDITIONAL - CRITICAL)
IF the previous chapter was reviewed (i.e., (chapter_num - 1) % 2 == 0):
YOU MUST execute:
state.json → Check review_checkpoints array审查报告/Review_Ch{N-2}-{N-1}_YYYYMMDD.md)Example:
📋 Review Feedback Loaded (From Ch{N-2}-{N-1} Report):
🔴 Critical Issues to Avoid:
- 连续3章打脸型爽点(需变化爽点类型)
- Quest线已连续5章主导(需切换到Fire或Constellation)
- 战斗描写过于简略(需增加细节)
💡 Priority Recommendations:
1. 增加Fire线(慕容雪情感戏)比重
2. 引入Constellation线(家族关系变化)
3. 爽点类型建议:升级型 or 收获型
Purpose: Ensure the chapter-writer agent applies quality feedback, preventing defect accumulation.
FORBIDDEN:
THIS STEP IS NOT OPTIONAL. YOU MUST EXECUTE IT.
YOU MUST call the chapter-writer agent to generate chapter content:
Step 2.1: Prepare Context Summary for Agent
Extract from loaded context:
Outline Summary:
Goal: [本章目标]
Cool Point: [爽点类型和表现]
New Entities: [需要引入的角色/地点/物品]
Foreshadowing: [需要埋设的伏笔]
Protagonist State:
Realm: [境界] [层数]层
Location: [当前位置]
Bottleneck: [瓶颈描述]
Golden Finger: [金手指名称] Lv.[等级]
Previous Context (if chapter > 1):
[前2章内容摘要,100-200字,包含关键剧情点]
Review Feedback (if loaded in Step 1.4):
🔴 Critical Issues: [列表]
💡 Recommendations: [Top 3]
Step 2.2: Invoke chapter-writer Agent (MANDATORY)
YOU MUST call the Task tool with the following parameters:
Task(
subagent_type="chapter-writer",
description="Write chapter {chapter_num} content",
prompt="Generate Chapter {chapter_num} following the webnovel-writer skill protocols.
**Context**:
**Outline**:
- Goal: {从大纲提取}
- Cool Point: {从大纲提取}
- New Entities: {从大纲提取}
- Foreshadowing: {从大纲提取}
**Protagonist State**:
- Realm: {realm} {layer}层
- Location: {location}
- Bottleneck: {bottleneck}
- Golden Finger: {golden_finger} Lv.{level}
**Previous Chapters** (if exists):
{前2章摘要,100-200字}
**Review Feedback** (if exists):
🔴 Critical Issues to Avoid:
{从审查报告提取的关键问题列表}
💡 Priority Recommendations:
{从审查报告提取的Top 3建议}
**Output Requirements**:
1. Save to: 正文/第{chapter_num:04d}章.md
2. Word count: 3000-5000 Chinese characters
3. Follow anti-hallucination laws strictly
4. Include at least 1 cool-point
5. Tag new entities with [NEW_ENTITY: 类型, 名称, 描述]
6. Apply review feedback (avoid Critical Issues, try to apply Recommendations)
7. Self-review before saving
The webnovel-writer skill knowledge will guide you on:
- Three anti-hallucination laws (大纲即法律/设定即物理/发明需申报)
- Cool-points design (5 types strategy)
- Strand Weave pacing control
- Dialogue and description standards
"
)
The chapter-writer agent will:
正文/第{N:04d}章.mdStep 2.3: Wait for Agent Completion
After the agent returns:
IF agent reports error or self-review failure:
❌ Chapter generation failed: [error message]
STOP execution and report to user.
DO NOT proceed to Step 3.
CRITICAL:
FORBIDDEN:
IF you used [NEW_ENTITY] tags in the chapter:
python .claude/skills/webnovel-writer/scripts/extract_entities.py "正文/第{N:04d}章.md" --auto
python .claude/skills/webnovel-writer/scripts/update_state.py \
--progress {chapter_num} {total_words} \
--protagonist-power "{新境界}" {新层数} "{新瓶颈}" \
--protagonist-location "{新地点}" {chapter_num}
Minimum required (if no power/location change):
python .claude/skills/webnovel-writer/scripts/update_state.py --progress {chapter_num} {total_words}
python .claude/skills/webnovel-writer/scripts/backup_manager.py \
--chapter {chapter_num} \
--chapter-title "{章节标题}"
What this does: git add . + git commit + git tag ch{N:04d}
YOU MUST analyze which story strand dominated this chapter:
After determining the dominant strand, run:
python .claude/skills/webnovel-writer/scripts/update_state.py \
--strand-dominant {quest|fire|constellation} {chapter_num}
Example (Chapter 3 dominated by Quest):
python .claude/skills/webnovel-writer/scripts/update_state.py --strand-dominant quest 3
CRITICAL: This updates strand_tracker in state.json, tracking pacing balance to prevent monotonous pacing.
FORBIDDEN: Skipping strand_tracker update.
IF chapter_num % 2 == 0 (every 2 chapters):
YOU MUST launch 5 review subagents in parallel using the Task tool.
For EACH subagent below, invoke Task tool with:
subagent_type: The subagent namedescription: Brief task (3-5 words)prompt: "Review chapters {N-1} and {N}. Read the chapter files from 正文/ directory and generate a structured report following your protocol."Required subagents (invoke all 5 in parallel):
After ALL 5 subagents return their reports:
Step 7.1: Consolidate Review Reports (MANDATORY)
Create consolidated report file:
# Save to: 审查报告/Review_Ch{N-1}-{N}_YYYYMMDD.md
Report structure (Markdown format):
# 双章审查报告 (Chapters {N-1}-{N})
> **审查日期**: YYYY-MM-DD
> **审查章节**: 第 {N-1}-{N} 章
> **审查员**: 5 个(爽点/一致性/节奏/OOC/连贯性)
## 1. 爽点密度检查 (High-Point Checker)
[Paste high-point-checker report here]
## 2. 设定一致性检查 (Consistency Checker)
[Paste consistency-checker report here]
## 3. 节奏平衡检查 (Pacing Checker)
[Paste pacing-checker report here]
## 4. 人物OOC检查 (OOC Checker)
[Paste ooc-checker report here]
## 5. 连贯性检查 (Continuity Checker)
[Paste continuity-checker report here]
## 综合评分 (Overall Score)
- **爽点密度**: X/10
- **设定一致性**: X/10
- **节奏平衡**: X/10
- **人物一致性**: X/10
- **连贯性**: X/10
- **总分**: XX/50
## 关键问题汇总 (Critical Issues)
- [List all critical/high severity issues from 5 reports]
## 改进建议 (Recommendations)
- [Top 3-5 actionable recommendations]
Step 7.2: Update state.json Review Checkpoint (MANDATORY)
python .claude/skills/webnovel-writer/scripts/update_state.py \
--add-review "{N-1}-{N}" "审查报告/Review_Ch{N-1}-{N}_YYYYMMDD.md"
Step 7.3: Present Summary to User
Output consolidated findings to user (see Final Output section below).
Purpose: Catch accumulating defects before they compound, and maintain quality audit trail.
CRITICAL:
✅ 第 {chapter_num} 章《{标题}》创作完成
📝 章节信息
- 章节: 第 {chapter_num} 章
- 标题: {标题}
- 字数: {实际字数} 字
- 爽点: {爽点类型}
📊 状态更新
- 总进度: {current_chapter}/{target_chapters} 章
- 总字数: {total_words}/{target_words} 字
- 完成度: {完成百分比}%
💪 主角状态
- 实力: {realm} {layer}层
- 位置: {location}
- 金手指: {golden_finger} Lv.{level}
🔧 系统操作
- ✅ state.json 已更新
- ✅ Git 备份已完成 (commit: {git_hash})
- ✅ strand_tracker 已更新 (dominant: {dominant_strand})
{IF chapter_num % 2 == 0}
🔍 双章审查
- ✅ 已调用5个审查员 (high-point/consistency/pacing/ooc/continuity)
- 📋 审查报告已保存: 审查报告/Review_Ch{N-1}-{N}_YYYYMMDD.md
- ✅ state.json review_checkpoints 已更新
{ENDIF}
正文/第{N:04d}章.md (3,000-5,000 chars)update_state.py executed successfullybackup_manager.py executed successfullystrand_tracker updated in state.jsonIF ANY CHECKBOX IS UNCHECKED → TASK IS NOT COMPLETE.
IF any script fails:
FORBIDDEN: Hiding script errors or claiming success when a step failed.