name: webnovel-write description: Writes webnovel chapters (3000-5000 words). Use when the user asks to write a chapter or runs /webnovel-write. Runs context, drafting, review, polish, and data extraction.
.webnovel/state.json)。$PROJECT_ROOT = (Resolve-Path ".").Path。目标:让
/webnovel-resume能基于真实断点恢复。即使 workflow_manager 出错,也只记录警告,写作继续。
推荐(bash):
# 启动任务(失败不阻断)
python "${CLAUDE_PLUGIN_ROOT}/scripts/workflow_manager.py" start-task --command webnovel-write --chapter {chapter_num} || true
# 每个 Step 开始/结束都记录(失败不阻断)
python "${CLAUDE_PLUGIN_ROOT}/scripts/workflow_manager.py" start-step --step-id "Step 1" --step-name "Context Agent" || true
python "${CLAUDE_PLUGIN_ROOT}/scripts/workflow_manager.py" complete-step --step-id "Step 1" --artifacts '{"ok":true}' || true
# 全部结束后完成任务
python "${CLAUDE_PLUGIN_ROOT}/scripts/workflow_manager.py" complete-task --artifacts '{"ok":true}' || true
注:--step-id 必须严格使用:Step 1 / Step 1.5 / Step 2A / Step 2B / Step 3 / Step 4 / Step 5 / Step 6。
| 模式 | 启用步骤 | 说明 |
|---|---|---|
/webnovel-write |
Step 1 → 1.5 → 2A → 2B → 3 → 4 → 5 → 6 | 标准流程 |
/webnovel-write --fast |
Step 1 → 1.5 → 2A → 3 → 4 → 5 → 6 | 跳过 Step 2B |
/webnovel-write --minimal |
Step 1 → 1.5 → 2A → 3(仅3个基础审查) → 4 → 5 → 6 | 跳过 Step 2B;不产出追读力数据 |
使用 Task 调用 context-agent:
调用 context-agent,参数:
- chapter: {chapter_num}
- project_root: {PROJECT_ROOT}
- storage_path: .webnovel/
- state_file: .webnovel/state.json
要求:
python "${CLAUDE_PLUGIN_ROOT}/scripts/extract_chapter_context.py" --chapter {chapter_num} --project-root "{PROJECT_ROOT}" --format json
writing_guidance.guidance_itemsreader_signal、genre_profile.reference_hintsrag_assist(当 invoked=true 且 hits 非空,必须把检索命中转成可执行写作约束)正文/第{NNNN}章.md开写前加载:
cat "${CLAUDE_PLUGIN_ROOT}/references/shared/core-constraints.md"
--fast / --minimal 跳过)执行前加载(按需,若本章需要强网文化/去AI化处理则必读):
cat "${CLAUDE_PLUGIN_ROOT}/skills/webnovel-write/references/style-adapter.md"
调用约束:
Task 工具调用各审查 subagent,禁止主流程直接内联“自审”替代。issues/severity/overall_score。index.db.review_metrics(包括 --minimal 模式)。默认核心 4 审查器:
consistency-checkercontinuity-checkerooc-checkerreader-pull-checker关键章/卷末/用户明确要求时追加:
high-point-checkerpacing-checker--minimal 模式仅运行前三个基础审查器,不产出追读力数据。
审查指标落库(必做):
python -m data_modules.index_manager save-review-metrics --data '{...}' --project-root "${PROJECT_ROOT}"
说明:--minimal 可只包含 3 维 dimension_scores(设定一致性/人物塑造/连贯性),但必须给出 overall_score。JSON 结构见 workflow-details.md。
cat "${CLAUDE_PLUGIN_ROOT}/skills/webnovel-write/references/polish-guide.md"
cat "${CLAUDE_PLUGIN_ROOT}/skills/webnovel-write/references/writing/typesetting.md"
polish-guide.md)。使用 Task 调用 data-agent:
调用 data-agent,参数:
- chapter: {chapter_num}
- chapter_file: "正文/第{NNNN}章.md"
- review_score: {overall_score from Step 3}
- project_root: {PROJECT_ROOT}
- storage_path: .webnovel/
- state_file: .webnovel/state.json
review_score 必须使用 Step 3 汇总后的 overall_score(--minimal 也必须产出)。git add . && git commit -m "Ch{chapter_num}: {title}"
${CLAUDE_PLUGIN_ROOT}/references/shared/core-constraints.md 为准。