@cloud411716/fancy-webnovel 1.0.46 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/client.js +183 -0
  2. package/cordis.patch.yml +0 -14
  3. package/index.js +21 -37
  4. package/lib/chinese-num.js +111 -0
  5. package/lib/deployed-state.js +141 -0
  6. package/lib/error-codes.js +104 -0
  7. package/lib/infra.js +569 -0
  8. package/lib/llm-wiki.js +109 -0
  9. package/lib/safe-rm.js +94 -0
  10. package/lib/scraper-utils.js +165 -0
  11. package/package.json +37 -5
  12. package/plugins/fancy-analyze/command-input.js +65 -0
  13. package/plugins/fancy-analyze/index.js +973 -0
  14. package/plugins/fancy-analyze/schema-analyze.md +379 -0
  15. package/plugins/fancy-analyze/schema-write.md +178 -0
  16. package/plugins/fancy-analyze/scripts/split_source.js +292 -0
  17. package/plugins/fancy-analyze/summary-progress.js +431 -0
  18. package/plugins/fancy-analyze/templates.js +881 -0
  19. package/plugins/fancy-bootstrap/index.js +168 -0
  20. package/plugins/fancy-bootstrap/scripts/init.js +143 -0
  21. package/plugins/fancy-bootstrap/scripts/path-utils.js +21 -0
  22. package/plugins/fancy-bootstrap/templates.js +54 -0
  23. package/plugins/fancy-import/import-core.js +1118 -0
  24. package/plugins/fancy-import/import-driver.js +581 -0
  25. package/plugins/fancy-import/index.js +730 -0
  26. package/plugins/fancy-import/prompts/01-import-prompt.md +106 -0
  27. package/plugins/fancy-import/templates.js +49 -0
  28. package/plugins/fancy-scan/index.js +319 -0
  29. package/plugins/fancy-scan/scripts/run-scan.js +520 -0
  30. package/plugins/fancy-scan/scripts/scrapers/fanqie-rank-scraper.js +794 -0
  31. package/plugins/fancy-scan/scripts/scrapers/jjwxc-rank-scraper.js +339 -0
  32. package/plugins/fancy-scan/scripts/scrapers/qimao-rank-scraper.js +611 -0
  33. package/plugins/fancy-scan/templates.js +295 -0
  34. package/plugins/fancy-story-builder/deploy-manifest.js +239 -0
  35. package/plugins/fancy-story-builder/deslop-driver.js +821 -0
  36. package/plugins/fancy-story-builder/flesh-output.js +155 -0
  37. package/plugins/fancy-story-builder/index.js +3152 -0
  38. package/plugins/fancy-story-builder/prompts/01-skeleton-prompt.md +553 -0
  39. package/plugins/fancy-story-builder/prompts/02-flesh-prompt.md +540 -0
  40. package/plugins/fancy-story-builder/prompts/03-rhythm-prompt.md +504 -0
  41. package/plugins/fancy-story-builder/prompts/04-writing-prompt.md +188 -0
  42. package/plugins/fancy-story-builder/prompts/05-deslop-prompt.md +96 -0
  43. package/plugins/fancy-story-builder/purpose-template.md +107 -0
  44. package/plugins/fancy-story-builder/references/formulas-rhythm.json +302 -0
  45. package/plugins/fancy-story-builder/references/formulas-skeleton.json +229 -0
  46. package/plugins/fancy-story-builder/references/glossary.md +585 -0
  47. package/plugins/fancy-story-builder/references/index.md +490 -0
  48. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/00-index.md +174 -0
  49. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/01-scene.md +150 -0
  50. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/02-chapter-workflow.md +99 -0
  51. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/03-opening-chapter.md +104 -0
  52. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/04-dialogue-mastery.md +274 -0
  53. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/05-genre-formulas.md +432 -0
  54. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/06-tone-ensemble.md +259 -0
  55. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/07-ledger-audit.md +222 -0
  56. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/08-diagnosis-revision.md +205 -0
  57. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/09-reading-power.md +135 -0
  58. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/10-deslop.md +129 -0
  59. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/00-index.md +98 -0
  60. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/01-upgrade-rhythm.md +300 -0
  61. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/02-arc-rhythm.md +168 -0
  62. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/03-highpoint-hooks.md +189 -0
  63. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/04-satisfaction.md +226 -0
  64. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/05-foreshadow-density.md +195 -0
  65. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/06-chapter-outline.md +226 -0
  66. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/07-audit.md +163 -0
  67. package/plugins/fancy-story-builder/references//350/241/200/350/202/211/346/214/207/345/257/274/00-index.md +100 -0
  68. package/plugins/fancy-story-builder/references//350/241/200/350/202/211/346/214/207/345/257/274/01-character.md +239 -0
  69. package/plugins/fancy-story-builder/references//350/241/200/350/202/211/346/214/207/345/257/274/02-worldbuilding.md +245 -0
  70. package/plugins/fancy-story-builder/references//350/241/200/350/202/211/346/214/207/345/257/274/03-relations.md +181 -0
  71. package/plugins/fancy-story-builder/references//350/241/200/350/202/211/346/214/207/345/257/274/04-emotion-methods.md +286 -0
  72. package/plugins/fancy-story-builder/references//350/241/200/350/202/211/346/214/207/345/257/274/05-audit.md +177 -0
  73. package/plugins/fancy-story-builder/references//351/252/250/346/236/266/346/214/207/345/257/274/00-index.md +91 -0
  74. package/plugins/fancy-story-builder/references//351/252/250/346/236/266/346/214/207/345/257/274/01-positioning.md +208 -0
  75. package/plugins/fancy-story-builder/references//351/252/250/346/236/266/346/214/207/345/257/274/02-packaging.md +135 -0
  76. package/plugins/fancy-story-builder/references//351/252/250/346/236/266/346/214/207/345/257/274/03-entities.md +305 -0
  77. package/plugins/fancy-story-builder/references//351/252/250/346/236/266/346/214/207/345/257/274/04-conflict.md +328 -0
  78. package/plugins/fancy-story-builder/references//351/252/250/346/236/266/346/214/207/345/257/274/05-quota.md +187 -0
  79. package/plugins/fancy-story-builder/references//351/252/250/346/236/266/346/214/207/345/257/274/06-audit.md +142 -0
  80. package/plugins/fancy-story-builder/rhythm-output.js +140 -0
  81. package/plugins/fancy-story-builder/schema-setting.md +324 -0
  82. package/plugins/fancy-story-builder/scripts/ai-patterns.js +619 -0
  83. package/plugins/fancy-story-builder/scripts/check-guide-compliance.js +289 -0
  84. package/plugins/fancy-story-builder/scripts/content-quality.js +413 -0
  85. package/plugins/fancy-story-builder/scripts/deslop-validate.js +143 -0
  86. package/plugins/fancy-story-builder/scripts/error-classes.js +112 -0
  87. package/plugins/fancy-story-builder/scripts/flesh-validate.js +1189 -0
  88. package/plugins/fancy-story-builder/scripts/formula-engine.js +112 -0
  89. package/plugins/fancy-story-builder/scripts/graph-utils.js +1385 -0
  90. package/plugins/fancy-story-builder/scripts/label-coverage.js +171 -0
  91. package/plugins/fancy-story-builder/scripts/prompt-drift-check.js +441 -0
  92. package/plugins/fancy-story-builder/scripts/reading-power.js +298 -0
  93. package/plugins/fancy-story-builder/scripts/rhythm-validate.js +1216 -0
  94. package/plugins/fancy-story-builder/scripts/semantic-lint.js +377 -0
  95. package/plugins/fancy-story-builder/scripts/skeleton-quota.js +145 -0
  96. package/plugins/fancy-story-builder/scripts/skeleton-validate.js +1832 -0
  97. package/plugins/fancy-story-builder/scripts/stage-batches.js +1371 -0
  98. package/plugins/fancy-story-builder/scripts/stage-contract.js +417 -0
  99. package/plugins/fancy-story-builder/scripts/upstream-query.js +198 -0
  100. package/plugins/fancy-story-builder/scripts/writing-rules.js +167 -0
  101. package/plugins/fancy-story-builder/scripts/writing-validate.js +682 -0
  102. package/plugins/fancy-story-builder/skeleton-output.js +199 -0
  103. package/plugins/fancy-story-builder/stage-driver.js +1049 -0
  104. package/plugins/fancy-story-builder/templates//350/212/202/345/245/217//346/227/266/345/272/217/346/230/240/345/260/204/346/250/241/346/235/277.json +204 -0
  105. package/plugins/fancy-story-builder/templates//350/212/202/345/245/217//347/253/240/350/212/202/347/273/206/347/272/262/346/250/241/346/235/277.json +34 -0
  106. package/plugins/fancy-story-builder/templates//350/212/202/345/245/217//347/253/240/350/212/202/350/247/204/345/210/222/346/250/241/346/235/277.json +24 -0
  107. package/plugins/fancy-story-builder/templates//350/212/202/345/245/217//350/212/202/345/245/217/345/217/202/346/225/260/346/250/241/346/235/277.json +27 -0
  108. package/plugins/fancy-story-builder/templates//350/241/200/350/202/211//344/270/226/347/225/214/350/247/202/350/247/204/345/210/231/346/250/241/346/235/277.json +66 -0
  109. package/plugins/fancy-story-builder/templates//350/241/200/350/202/211//345/205/263/351/224/256/351/201/223/345/205/267/346/250/241/346/235/277.json +76 -0
  110. package/plugins/fancy-story-builder/templates//350/241/200/350/202/211//345/206/262/347/252/201/346/250/241/346/235/277.json +72 -0
  111. package/plugins/fancy-story-builder/templates//350/241/200/350/202/211//345/211/247/346/203/205/346/250/241/346/235/277.json +37 -0
  112. package/plugins/fancy-story-builder/templates//350/241/200/350/202/211//345/212/277/345/212/233/346/250/241/346/235/277.json +53 -0
  113. package/plugins/fancy-story-builder/templates//350/241/200/350/202/211//345/234/260/347/202/271/346/250/241/346/235/277.json +40 -0
  114. package/plugins/fancy-story-builder/templates//350/241/200/350/202/211//347/273/223/345/261/200/346/250/241/346/235/277.json +79 -0
  115. package/plugins/fancy-story-builder/templates//350/241/200/350/202/211//350/247/222/350/211/262/346/250/241/346/235/277.json +132 -0
  116. package/plugins/fancy-story-builder/templates//351/252/250/346/236/266//345/205/263/347/263/273/346/250/241/346/235/277.json +133 -0
  117. package/plugins/fancy-story-builder/templates//351/252/250/346/236/266//345/256/236/344/275/223/346/250/241/346/235/277.json +160 -0
  118. package/plugins/fancy-story-builder/templates//351/252/250/346/236/266//345/261/202/347/272/247/346/250/241/346/235/277.json +65 -0
  119. package/plugins/fancy-story-builder/templates//351/252/250/346/236/266//346/241/206/346/236/266/346/250/241/346/235/277.json +134 -0
  120. package/plugins/fancy-story-builder/templates.js +1248 -0
  121. package/plugins/fancy-story-builder/wiki-references.js +204 -0
  122. package/plugins/fancy-story-builder/writing-driver.js +1061 -0
  123. package/plugins/fancy-topic/index.js +704 -0
  124. package/plugins/fancy-topic/scripts/select-topic.js +274 -0
  125. package/plugins/fancy-topic/templates.js +373 -0
  126. package/commands/bootstrap/index.js +0 -164
  127. package/commands/bootstrap/init-project.js +0 -121
  128. package/commands/scan/index.js +0 -283
  129. package/commands/scan/platforms/fanqie.js +0 -146
  130. package/commands/scan/platforms/jinjiang.js +0 -143
  131. package/commands/scan/platforms/qidian.js +0 -102
  132. package/commands/scan/platforms/qimao.js +0 -127
  133. package/commands/scan/scraper.js +0 -195
  134. package/infra.js +0 -160
@@ -0,0 +1,490 @@
1
+ # 网文生成系统 · 总索引
2
+
3
+ > 本文件是整个体系的使用者入口。回答:这套体系有哪些文件、每个文件干什么、文件之间怎么依赖、常见任务怎么查。
4
+ > 本文件不定义方法、不写公式、不写验证逻辑、不定义数据结构。
5
+
6
+ ---
7
+
8
+ ## 一、体系概览
9
+
10
+ 四阶段单向流水线,每个阶段读上游、产出本阶段文件、由脚本校验、通过后进入下游。
11
+
12
+ ```
13
+ 任务输入
14
+ │
15
+ ▼
16
+ ┌─────────────────────────────┐
17
+ │ 骨架:有什么、有多少、怎么连 │ 4 个 JSON
18
+ │ (无章节号) │
19
+ └──────────────┬──────────────┘
20
+ │ 只读
21
+ ▼
22
+ ┌─────────────────────────────┐
23
+ │ 血肉:每个实体具体什么样 │ 8 个 JSON
24
+ │ (无章节号) │
25
+ └──────────────┬──────────────┘
26
+ │ 只读
27
+ ▼
28
+ ┌─────────────────────────────┐
29
+ │ 节奏:什么时间发生什么 │ 4 个 JSON
30
+ │ (章节号唯一出现处) │
31
+ └──────────────┬──────────────┘
32
+ │ 只读
33
+ ▼
34
+ ┌─────────────────────────────┐
35
+ │ 写作:具体怎么写 │ 逐章正文 + 台账
36
+ │ (会变的阶段) │
37
+ └─────────────────────────────┘
38
+ ```
39
+
40
+ **核心规则**:
41
+ - 下游只读上游,不写上游
42
+ - 新 ID 只能出现在骨架阶段
43
+ - 章节号只能出现在节奏阶段
44
+ - 每个文件生成后立即单检,不过不进下一个
45
+ - 每个阶段有独立的 `.stage-status.json`
46
+
47
+ ---
48
+
49
+ ## 二、文件分类
50
+
51
+ 五类文件,五种职责:
52
+
53
+ | 类型 | 只做 | 不包含 |
54
+ |---|---|---|
55
+ | `glossary.md` | 定义(术语、ID、枚举、字段归属) | 方法论、公式、验证、结构 |
56
+ | `formulas-*.json` | 量化约束 | 方法论、验证、结构 |
57
+ | `模板/*.json` | 数据结构 | 默认值、公式、验证、示例值 |
58
+ | `*指导/*.md` | 方法论 | 数字区间、检查清单、错误代码、数据结构 |
59
+ | `*-validate.js` | 验证 | 方法论、硬编码公式/枚举/结构 |
60
+
61
+ ---
62
+
63
+ ## 三、全部文件清单
64
+
65
+ **总计 59 个体系文件 + 本索引 = 60 个文件**。
66
+
67
+ ### 3.1 基础层(3 个)
68
+
69
+ | 文件 | 版本 | 职责 |
70
+ |---|---|---|
71
+ | `references/glossary.md` | v1.3 | 术语总表:四阶段边界、术语定义、15 个 ID 前缀、26 个枚举、章节号字段清单(含 `ch`/`turning`/`resolution`)、字段归属、生命周期 |
72
+ | `references/formulas-skeleton.json` | v1.1 | 骨架阶段 **30 条**数量公式(含 3 条 `world_rule_counts`;`ending_count` 用条件表达式;`faction_relation_count` 下界改为 n-1) |
73
+ | `references/formulas-rhythm.json` | v1.1 | 节奏阶段 10 个节:`constraints`(7 条联合可行性,脚本强制)+ `arc_phase_ratio` / `upgrade_guides` / `bridge_guides` / `hook_guides` / `satisfaction_guides` / `expectation_guides` / `foreshadow_guides` / `outline_guides` / `faction_guides`(9 个参考节,指导文件引用,脚本不强制) |
74
+
75
+ ### 3.2 骨架阶段(13 个)
76
+
77
+ **模板(4 个)**:
78
+
79
+ | 文件 | 内容 |
80
+ |---|---|
81
+ | `模板/骨架/框架模板.json` | capacity / input_snapshot / quota / volume_ratio / derivations |
82
+ | `模板/骨架/实体模板.json` | 12 类实体数组(characters / conflicts / factions / ... / branches) |
83
+ | `模板/骨架/关系模板.json` | 9 类关系数组(character_relations / faction_membership / ... / main_line_branch_relation) |
84
+ | `模板/骨架/层级模板.json` | volumes / acts / main_line_span / branch_span |
85
+
86
+ **脚本(1 个)**:
87
+
88
+ | 文件 | 版本 | 能力 |
89
+ |---|---|---|
90
+ | `references/skeleton-validate.js` | v2.4 | 单文件 + 全量模式;从 glossary 读枚举、从 formulas 读公式、从模板读结构;无章节号、无时序;新增 `QUOTA_MISMATCH` / `BOOK_ENDING_COUNT` / `VOLUME_COUNT_MISMATCH` / `ACT_INDEX_DUP` / `SPAN_RATIO_RANGE` / **关系组合重复检查(7 类)** / `NO_SELF_RELATION` / `EMPTY_HARD_CONSTRAINTS` / `CROSS_TYPE_NAME_DUP` / `faction_relation_count` 一致性;图检查 import `graph-utils.js`;`evalExpr` 支持三元运算符 |
91
+
92
+ **提示词(1 个)**:
93
+
94
+ | 文件 | 版本 | 内容 |
95
+ |---|---|---|
96
+ | `prompts/01-skeleton-prompt.md` | v1.1 | 前置检查(无上游)、4 文件生成顺序、每文件循环、5 次 BLOCKED、全量 3 轮 BLOCKED;§6.3 拓扑顺序补全 `faction_relation_count`;"27 条"改为"30 条" |
97
+
98
+ **指导(7 个)**:
99
+
100
+ | 文件 | 职责 |
101
+ |---|---|
102
+ | `references/骨架指导/00-index.md` | 骨架阶段入口 |
103
+ | `references/骨架指导/01-positioning.md` | 定位、需求矩阵、平台矩阵、一句话故事 |
104
+ | `references/骨架指导/02-packaging.md` | 书名、简介、标签、一句话卖点 |
105
+ | `references/骨架指导/03-entities.md` | 角色/势力/其他实体建卡方法论 |
106
+ | `references/骨架指导/04-conflict.md` | 矛盾四重、死亡赌注、黏结剂、双线 |
107
+ | `references/骨架指导/05-quota.md` | 数量决策方法论(在公式区间内选终值) |
108
+ | `references/骨架指导/06-audit.md` | 骨架验证流程与问题记录 |
109
+
110
+ ### 3.3 血肉阶段(16 个)
111
+
112
+ **模板(8 个)**:
113
+
114
+ | 文件 | 内容 |
115
+ |---|---|
116
+ | `模板/血肉/角色模板.json` | 角色档案(描述/目标/缺陷/弧光/语言/关系/退场) |
117
+ | `模板/血肉/冲突模板.json` | 冲突档案(描述/矛盾/升级路径/信息差/收束) |
118
+ | `模板/血肉/势力模板.json` | 势力档案(目标/资源/内部结构/压制手段/成员详述) |
119
+ | `模板/血肉/剧情模板.json` | 主线驱动 + 支线目标 |
120
+ | `模板/血肉/地点模板.json` | 地点档案(空间特征/关键事件/叙事作用) |
121
+ | `模板/血肉/结局模板.json` | 结局档案(冲突解决/反套路/余韵/章节设计/伏笔回收计划) |
122
+ | `模板/血肉/世界观规则模板.json` | R/I/SR 三类规则 + rule_conflict_plan |
123
+ | `模板/血肉/关键道具模板.json` | core/branch/symbolic items + details |
124
+
125
+ **脚本(1 个)**:
126
+
127
+ | 文件 | 版本 | 能力 |
128
+ |---|---|---|
129
+ | `references/flesh-validate.js` | v1.2 | 单文件 + 全量模式;`--upstream=<骨架>`;检查 `FLESH_CHAPTER_FORBIDDEN` / 引用完整性 / 名称一致性 / arc 兼容性 / details 对应 / 规则前缀 / `FLESH_GROUP_CATEGORY_MISMATCH` / `FLESH_FREETEXT_CHAPTER_REF`(warning)/ `completenessCheck` 覆盖 9 类(用文件类型作 key) |
130
+
131
+ **提示词(1 个)**:
132
+
133
+ | 文件 | 版本 | 内容 |
134
+ |---|---|---|
135
+ | `prompts/02-flesh-prompt.md` | v1.0 | 前置检查(读骨架 PASSED)、8 文件生成顺序、每文件循环、5 次 BLOCKED、全量 3 轮 BLOCKED;各文件"已填/不填"清单 |
136
+
137
+ **指导(6 个)**:
138
+
139
+ | 文件 | 职责 |
140
+ |---|---|
141
+ | `references/血肉指导/00-index.md` | 血肉阶段入口 |
142
+ | `references/血肉指导/01-character.md` | 人物深化、缺陷五类、弧光类型、语言档案、执念 |
143
+ | `references/血肉指导/02-worldbuilding.md` | 世界背景、力量体系、势力卡、物品卡、地点卡、设定校验 |
144
+ | `references/血肉指导/03-relations.md` | 关系网细化、支线设计、多线管理 |
145
+ | `references/血肉指导/04-emotion-methods.md` | 情绪弧线类型、叠加规则、引擎七环、三板斧、题材策略 |
146
+ | `references/血肉指导/05-audit.md` | 血肉验证流程与问题记录 |
147
+
148
+ ### 3.4 节奏阶段(14 个)
149
+
150
+ **模板(4 个)**:
151
+
152
+ | 文件 | 内容 |
153
+ |---|---|
154
+ | `模板/节奏/章节规划模板.json` | 每章:ch / volume / act / scene_focus |
155
+ | `模板/节奏/时序映射模板.json` | 11 类时序映射——所有章节号在此 |
156
+ | `模板/节奏/节奏参数模板.json` | chapter_hook_rate / 三参数 / derivations |
157
+ | `模板/节奏/章节细纲模板.json` | 每章细纲(功能/情绪/爽点/伏笔/势力/钩子/字数) |
158
+
159
+ **脚本(1 个)**:
160
+
161
+ | 文件 | 版本 | 能力 |
162
+ |---|---|---|
163
+ | `references/rhythm-validate.js` | v1.2 | 单文件 + 全量模式;**强制 `--upstream` 至少两个目录(骨架 + 血肉)**;7 条联合约束 / 章节范围 / 时序一致性 / 布局吻合 / 覆盖性 / 钩子 / 图连通 / `RHYTHM_ACT_INVALID` / `RHYTHM_COVERAGE_SKIPPED`;启动时校验业务常量 `大伏笔` / `全书级` |
164
+
165
+ **提示词(1 个)**:
166
+
167
+ | 文件 | 版本 | 内容 |
168
+ |---|---|---|
169
+ | `prompts/03-rhythm-prompt.md` | v1.0 | 前置检查(双上游)、§7.2.2 联合可行性收敛算法、§7.2.3 时序映射填法、生成顺序、5 次 BLOCKED、全量 3 轮 BLOCKED |
170
+
171
+ **指导(8 个)**:
172
+
173
+ | 文件 | 职责 |
174
+ |---|---|
175
+ | `references/节奏指导/00-index.md` | 节奏阶段入口 |
176
+ | `references/节奏指导/01-upgrade-rhythm.md` | 升级感三步法、粒度五分类、情绪模块、桥段结构、嵌套图 |
177
+ | `references/节奏指导/02-arc-rhythm.md` | 弧线类型回顾、叠加算法、关键点换算到章 |
178
+ | `references/节奏指导/03-highpoint-hooks.md` | 高潮 8 类、章首 7 式、章尾 13 式、钩子强度 |
179
+ | `references/节奏指导/04-satisfaction.md` | 爽点分布、压制换算、期待管理、断期待诊断 |
180
+ | `references/节奏指导/05-foreshadow-density.md` | 伏笔密度、唤醒策略、超期处理 |
181
+ | `references/节奏指导/06-chapter-outline.md` | 细纲字段设计、钩子排布、伏笔推进、势力出场 |
182
+ | `references/节奏指导/07-audit.md` | 节奏验证流程与问题记录 |
183
+
184
+ ### 3.5 写作阶段(11 个)
185
+
186
+ **脚本(1 个)**:
187
+
188
+ | 文件 | 版本 | 能力 |
189
+ |---|---|---|
190
+ | `references/writing-validate.js` | v1.2 | 单章校验;`--chapter=N`;`--upstream=<骨架>,<血肉>,<节奏>`;章节标题兼容三种格式(`# 第N章` / `# 第NNN章` / `# 第X章`,中文数字支持到"万");`EMPTY_BODY` / 字数 / 禁用词(`基本一致` / `无重大问题`)/ 与细纲对照;`UPSTREAM_PARTIAL` 在 outline 或 avgWords 任一缺失时触发;零反引号 |
191
+
192
+ **提示词(1 个)**:
193
+
194
+ | 文件 | 版本 | 内容 |
195
+ |---|---|---|
196
+ | `prompts/04-writing-prompt.md` | v1.1 | 前置检查(三上游)、逐章生成、单章校验、台账更新、5 次 BLOCKED;禁用词清单与脚本对齐;章节标题三种格式 |
197
+
198
+ **指导(9 个)**:
199
+
200
+ | 文件 | 职责 |
201
+ |---|---|
202
+ | `references/写作指导/00-index.md` | 写作阶段入口(加载顺序、产出清单、决策路由) |
203
+ | `references/写作指导/01-scene.md` | 场景五要素、进出场、画面感、比例、非对话信息传递 |
204
+ | `references/写作指导/02-chapter-workflow.md` | 八步流程、批量生成、版本管理 |
205
+ | `references/写作指导/03-opening-chapter.md` | 五段式、题材变体、平台差异 |
206
+ | `references/写作指导/04-dialogue-mastery.md` | 权力博弈、潜台词、场景路由、语言差异化、弹幕 |
207
+ | `references/写作指导/05-genre-formulas.md` | 21 个题材公式的结构骨架 |
208
+ | `references/写作指导/06-tone-ensemble.md` | 喜剧/悲剧/文学/群像/单元剧/非线性 |
209
+ | `references/写作指导/07-ledger-audit.md` | 4 类台账、单元末/卷末盘点、上下文加载、改稿影响 |
210
+ | `references/写作指导/08-diagnosis-revision.md` | 八种症状诊断树、修改优先级、四轮打磨、复验 |
211
+
212
+ ### 3.6 公共工具(2 个)
213
+
214
+ | 文件 | 版本 | 职责 |
215
+ |---|---|---|
216
+ | `references/graph-utils.js` | v1.4 | 图工具库:`SimpleGraph` / `getIsolatedNodes` / `getDisconnectedCoreNodes` / `checkBidirectionalSymmetry` / `parseGlossaryFromMd`(统一 glossary 解析,剥离反引号,跳过计数类型) |
217
+ | `references/check-guide-compliance.js` | v1.2 | 检查指导文件是否符合五条禁令(不数字区间 / 不检查清单 / 错误代码只在白名单节 / 有"与其他文件的关系"节 / 不重复枚举值);**audit 文件豁免错误代码检查,写作指导豁免数字区间检查** |
218
+
219
+ ---
220
+
221
+ ## 四、文件依赖关系
222
+
223
+ ```
224
+ glossary.md ────────────────────────────────┐
225
+ │ │
226
+ │ 被引用 │
227
+ ▼ ▼
228
+ formulas-skeleton.json ──────────► skeleton-validate.js
229
+ formulas-rhythm.json ────────────► rhythm-validate.js
230
+ │ ▲
231
+ │ │
232
+ ▼ │
233
+ 模板/骨架/*.json ──────────────────────────┤
234
+ 模板/血肉/*.json ─────────────► flesh-validate.js
235
+ 模板/节奏/*.json ─────────────► rhythm-validate.js
236
+ writing-validate.js
237
+ ▲
238
+ │
239
+ prompts/01-skeleton-prompt.md ──────┘(编排)
240
+ prompts/02-flesh-prompt.md ─────────┘
241
+ prompts/03-rhythm-prompt.md ────────┘
242
+ prompts/04-writing-prompt.md ───────┘
243
+ ```
244
+
245
+ **关键依赖**:
246
+ - 所有模板的 `enumRef` 依赖 `glossary.md` 的枚举
247
+ - 所有脚本的枚举校验依赖 `glossary.md`
248
+ - `skeleton-validate.js` 的公式校验依赖 `formulas-skeleton.json`(30 条)
249
+ - `rhythm-validate.js` 的联合约束依赖 `formulas-rhythm.json` 的 `constraints` 节(7 条)
250
+ - 各阶段脚本通过 `--upstream` 读上游 JSON
251
+ - 三个校验脚本(skeleton / flesh / rhythm)都 `import { parseGlossaryFromMd } from './graph-utils.js'`
252
+ - 提示词通过读指导文件获得方法论、读模板获得结构、调脚本获得验证
253
+
254
+ ---
255
+
256
+ ## 五、常见任务导航
257
+
258
+ ### 5.1 "我要从零开始生成骨架"
259
+
260
+ 1. 读 `prompts/01-skeleton-prompt.md` 全文
261
+ 2. 按提示词的"六、生成顺序"逐个生成 4 个 JSON
262
+ 3. 每个文件生成后按"七、每文件生成循环"调 `skeleton-validate.js` 单检
263
+ 4. 全部通过后跑 `--all`
264
+ 5. 输出交付摘要
265
+
266
+ ### 5.2 "我要在已完成的骨架上补血肉"
267
+
268
+ 1. 确认骨架 `.stage-status.json` 的 `all_check.status === "PASSED"`
269
+ 2. 读 `prompts/02-flesh-prompt.md` 全文
270
+ 3. 按提示词的"六、生成顺序"逐个生成 8 个 JSON
271
+ 4. 每个文件生成后调 `flesh-validate.js --upstream=<骨架>` 单检
272
+ 5. 全部通过后跑 `--all`
273
+ 6. 输出交付摘要
274
+
275
+ ### 5.3 "我要在血肉基础上排节奏"
276
+
277
+ 1. 确认骨架和血肉的 `.stage-status.json` 都 PASSED
278
+ 2. 读 `prompts/03-rhythm-prompt.md` 全文
279
+ 3. **重点读 7.2.2**(联合可行性收敛算法)和 **7.2.3**(时序映射填法)
280
+ 4. 按提示词的"六、生成顺序"(章节规划 → 节奏参数 → 时序映射 → 章节细纲)逐个生成
281
+ 5. 每个文件生成后调 `rhythm-validate.js --upstream=<骨架>,<血肉>` 单检
282
+ 6. 全部通过后跑 `--all`
283
+ 7. 输出交付摘要
284
+
285
+ ### 5.4 "我要在节奏基础上写正文"
286
+
287
+ 1. 确认骨架、血肉、节奏的 `.stage-status.json` 都 PASSED
288
+ 2. 读 `prompts/04-writing-prompt.md` 全文
289
+ 3. 按提示词的"六、生成顺序"逐章生成
290
+ 4. 每章生成后调 `writing-validate.js --chapter=N --upstream=<骨架>,<血肉>,<节奏>` 单检
291
+ 5. 每章通过后更新 4 个台账
292
+ 6. 第 T 章通过后做完本检查 + 输出交付摘要
293
+
294
+ ### 5.5 "我要加一个角色"
295
+
296
+ 1. 判断是否影响框架(`quota.character_counts`)
297
+ 2. 若影响,先改 `框架.json` 的 `quota` 与 `derivations`
298
+ 3. 改 `实体.json` 加新角色(`id` 从 `C001` 到 `C0NN` 连续)
299
+ 4. 改 `关系.json` 给新角色建关系(至少一条,否则会报 `G_ISOLATED`)
300
+ 5. 重跑骨架阶段 `--all` 确认无破坏(`QUOTA_MISMATCH` 会检查 quota 与实体数量一致)
301
+ 6. 重跑血肉阶段(新角色需要补血肉档案)
302
+ 7. 重跑节奏阶段(新角色需要补时序映射)
303
+ 8. 重跑写作阶段(如果已经在写正文)
304
+
305
+ ### 5.6 "我要改章节总数 500 → 600"
306
+
307
+ **不能走增量**,全量重跑:
308
+
309
+ 1. 改 `框架.json` 的 `capacity.target_chapters`
310
+ 2. 全部 30 条公式的 `derivations` 重算
311
+ 3. 从骨架阶段第 1 步重新生成所有文件
312
+ 4. 每阶段单检 + 全量
313
+ 5. 全部通过后交付
314
+
315
+ ### 5.7 "我要改某个角色的背景描述"
316
+
317
+ 1. 判断是否影响框架(通常不影响)
318
+ 2. 直接改 `血肉/角色.json` 对应角色的字段
319
+ 3. 重跑 `flesh-validate.js --input=角色.json ... --upstream=<骨架>`
320
+ 4. 若角色涉及时序(如退场章),重跑节奏阶段的时序映射
321
+ 5. 若已在写正文,重新生成受影响的章
322
+
323
+ ### 5.8 "我要改某条支线的章节范围"
324
+
325
+ 1. 判断改动后 `branch_chapter_total` / `overlap_chapter_count` / `main_progress_chapter_count` 是否变化
326
+ 2. 若变化,先改 `节奏参数.json` 并重算
327
+ 3. 改 `时序映射.json` 的 `branch_timeline`
328
+ 4. 重跑 `rhythm-validate.js --input=时序映射.json ... --upstream=<骨架>,<血肉>`
329
+ 5. 重跑全量
330
+ 6. 若已写正文,重新生成受影响的章
331
+
332
+ ### 5.9 "脚本报错了怎么办"
333
+
334
+ 1. **单文件校验 status:1**:读 `errors[]`,按 `path` 定位字段,按 `hint` 修改,重跑
335
+ 2. **单文件校验 status:2**:脚本异常。读 stderr,检查参数 / 上游 / glossary
336
+ 3. **全量校验 status:1**:读 `errors[]`,按 `file` 或 `path` 前缀分组,先改根因文件,重跑单检,重跑全量
337
+ 4. **连续 5 次 status:1**:触发 BLOCKED。按提示词的 BLOCKED 格式输出,停止,等人工介入
338
+ 5. **全量 3 轮失败**:触发 BLOCKED。同上
339
+
340
+ ### 5.10 "我要检查指导文件是否符合规范"
341
+
342
+ ```bash
343
+ node references/check-guide-compliance.js --dir=references/骨架指导
344
+ node references/check-guide-compliance.js --dir=references/血肉指导
345
+ node references/check-guide-compliance.js --dir=references/节奏指导
346
+ node references/check-guide-compliance.js --dir=references/写作指导
347
+ ```
348
+
349
+ 输出 JSON:`{status, total_files, total_errors, total_warnings, results}`。error 需修复,warning 可选。
350
+
351
+ **v1.2 注**:audit 文件(文件名匹配 `0X-audit.md`)整体豁免 `ERROR_CODE_IN_BODY`;写作指导目录豁免 `RANGE_IN_GUIDE`。
352
+
353
+ ---
354
+
355
+ ## 六、ID 前缀速查
356
+
357
+ | 前缀 | 实体 | 出现阶段 |
358
+ |---|---|---|
359
+ | C | 角色 | 骨架 |
360
+ | X | 冲突 | 骨架 |
361
+ | F | 势力 | 骨架 |
362
+ | V | 卷 | 骨架 |
363
+ | FS | 伏笔 | 骨架 |
364
+ | M | 主线 | 骨架 |
365
+ | B | 支线 | 骨架 |
366
+ | L | 地点 | 骨架 |
367
+ | E | 结局 | 骨架 |
368
+ | R | 核心规则 | 骨架 |
369
+ | I | 信息规则 | 骨架 |
370
+ | SR | 社会规则 | 骨架 |
371
+ | P | 关键道具 | 骨架 |
372
+ | CL | 高潮 | 骨架 |
373
+ | PL | 爽点 | 骨架 |
374
+
375
+ **章节**:无独立 ID,节奏阶段用 `ch: N` 复合键。
376
+
377
+ 完整定义见 `references/glossary.md` 第四节。
378
+
379
+ ---
380
+
381
+ ## 七、字段归属速查
382
+
383
+ | 阶段 | 文件 | 顶层字段 |
384
+ |---|---|---|
385
+ | 骨架 | 框架.json | capacity / input_snapshot / quota / volume_ratio / derivations |
386
+ | 骨架 | 实体.json | characters / conflicts / factions / locations / items / endings / foreshadows / climaxes / pleasures / world_rules / main_lines / branches |
387
+ | 骨架 | 关系.json | character_relations / faction_membership / faction_relations / conflict_participants / branch_protagonist / item_owner / location_conflict / ending_character / main_line_branch_relation |
388
+ | 骨架 | 层级.json | volumes / acts / main_line_span / branch_span |
389
+ | 血肉 | 角色.json | characters(id + name + 描述层) |
390
+ | 血肉 | 冲突.json | conflicts |
391
+ | 血肉 | 势力.json | factions |
392
+ | 血肉 | 剧情.json | main_lines / branches |
393
+ | 血肉 | 地点.json | locations |
394
+ | 血肉 | 结局.json | endings |
395
+ | 血肉 | 世界观规则.json | core_rules / information_rules / social_rules / rule_conflict_plan |
396
+ | 血肉 | 关键道具.json | core_items / branch_items / symbolic_items / details |
397
+ | 节奏 | 章节规划.json | chapters |
398
+ | 节奏 | 时序映射.json | character_timeline / conflict_timeline / foreshadow_timeline / climax_timeline / pleasure_timeline / hook_timeline / main_line_timeline / branch_timeline / location_timeline / item_timeline / ending_timeline |
399
+ | 节奏 | 节奏参数.json | chapter_hook_rate / branch_chapter_total / overlap_chapter_count / main_progress_chapter_count / derivations |
400
+ | 节奏 | 章节细纲.json | outlines |
401
+
402
+ 完整定义见 `references/glossary.md` 第七节。
403
+
404
+ ---
405
+
406
+ ## 八、章节号归属速查
407
+
408
+ **以下字段只能出现在节奏阶段**(完整清单见 `glossary.md` 第六节):
409
+
410
+ | 字段 | 含义 |
411
+ |---|---|
412
+ | `chapter` / `ch` | 单章号 |
413
+ | `start` / `end` | 区间 |
414
+ | `turning` | 支线转折章 |
415
+ | `resolution` | 支线/冲突收束章(与 `resolution_chapter` 等价) |
416
+ | `appear_start` / `appear_end` | 出现区间 |
417
+ | `exit_chapter` | 退场章 |
418
+ | `buried_chapter` / `recovered_chapter` | 伏笔埋/收 |
419
+ | `escalation_nodes[].chapter` | 冲突升级节点 |
420
+ | `resolution_chapter` | 冲突收束 |
421
+ | `info_gaps[].created` / `resolved` | 信息差 |
422
+ | `key_nodes[].chapter` | 主线节点 |
423
+ | `interweaves[].chapter` | 支线交织 |
424
+ | `foreshadow_recovery[].chapter` | 结局回收 |
425
+ | `arc_stages[].chapter` | 弧光阶段 |
426
+ | `appearance_chapters` | 出现区间(容器) |
427
+ | `chapter_range` | 章节范围(容器) |
428
+ | `chapter_count` | 章节计数(非章节号) |
429
+
430
+ **例外**:`chapter_ratio` 和 `volume_ratio` 是"比例"不是"章节号",允许在骨架。
431
+
432
+ ---
433
+
434
+ ## 九、脚本调用速查
435
+
436
+ ### 9.1 骨架脚本
437
+
438
+ ```bash
439
+ # 单文件
440
+ node references/skeleton-validate.js --input=<json> --template=<模板> --file=<类型>
441
+
442
+ # 全量
443
+ node references/skeleton-validate.js --stage-dir=<骨架目录> --template-dir=<模板/骨架> --all
444
+ ```
445
+
446
+ ### 9.2 血肉脚本
447
+
448
+ ```bash
449
+ # 单文件(必须带 --upstream)
450
+ node references/flesh-validate.js --input=<json> --template=<模板> --file=<类型> --upstream=<骨架目录>
451
+
452
+ # 全量
453
+ node references/flesh-validate.js --stage-dir=<血肉目录> --template-dir=<模板/血肉> --upstream=<骨架目录> --all
454
+ ```
455
+
456
+ ### 9.3 节奏脚本
457
+
458
+ ```bash
459
+ # 单文件(必须带双上游,v1.2 起强制)
460
+ node references/rhythm-validate.js --input=<json> --template=<模板> --file=<类型> --upstream=<骨架目录>,<血肉目录>
461
+
462
+ # 全量
463
+ node references/rhythm-validate.js --stage-dir=<节奏目录> --template-dir=<模板/节奏> --upstream=<骨架目录>,<血肉目录> --all
464
+ ```
465
+
466
+ ### 9.4 写作脚本
467
+
468
+ ```bash
469
+ # 单章(必须带章号和三上游)
470
+ node references/writing-validate.js --input=<第NNN章.md> --chapter=<N> --upstream=<骨架目录>,<血肉目录>,<节奏目录>
471
+ ```
472
+
473
+ ### 9.5 合规检查脚本
474
+
475
+ ```bash
476
+ node references/check-guide-compliance.js --dir=<指导目录>
477
+ node references/check-guide-compliance.js --file=<单个指导文件>
478
+ ```
479
+
480
+ **退出码统一**:0=通过、1=内容错误、2=脚本异常。
481
+
482
+ ---
483
+
484
+ ## 十、版本记录
485
+
486
+ | 版本 | 变更 |
487
+ |---|---|
488
+ | v1.0 | 初建。总索引:体系概览、文件分类、全部文件清单、依赖关系、常见任务导航(10 个场景)、ID 前缀速查、字段归属速查、章节号归属速查、脚本调用速查 |
489
+ | v1.1 | 修正文件数(61 → 58);补全各文件的版本号(反映 P0-1 到 P3-1 的所有变更);§3.1 补 formulas-skeleton 30 条说明、formulas-rhythm 10 节说明;§3.2 补 skeleton-validate v2.2 新增 6 项检查;§3.3 补 flesh-validate v1.1 扩展;§3.4 补 rhythm-validate v1.1 修订;§3.5 补 writing-validate v1.1 修订;§八 章节号清单补 `ch` / `turning` / `resolution`;§五 5.5 加 `QUOTA_MISMATCH` 提示 |
490
+ | v1.2 | 修正节奏阶段文件数(13 → 14);总数(57/58 → 59/60);写作阶段补 `00-index.md`(10 → 11 个);§3.2 skeleton-validate 版本更新 v2.4 并补"关系组合重复检查(7 类)"表述;§3.3 flesh-validate 更新 v1.2;§3.4 rhythm-validate 更新 v1.2(强制双上游);§3.5 writing-validate 更新 v1.2;§3.6 公共工具版本更新(graph-utils v1.4 / check-guide-compliance v1.2);§5.10 补 v1.2 的 audit / 写作指导豁免说明 |
@@ -0,0 +1,174 @@
1
+ # 写作阶段入口
2
+
3
+ > 本文件是写作阶段的唯一入口。回答"写作阶段做什么、按什么顺序读、产出什么"。
4
+ > 本文件不定义方法、不写验证逻辑、不定义数据结构。
5
+
6
+ ---
7
+
8
+ ## 一、阶段目标
9
+
10
+ 把骨架 + 血肉 + 节奏的"档案 / 图 / 引擎 / 时序"落成逐章正文,并用台账持续维护"已发生"的状态。
11
+
12
+ 回答:每章具体怎么写、每章写完台账怎么更新、出问题怎么诊断改稿。
13
+
14
+ 写作是唯一会变的阶段。骨架 / 血肉 / 节奏一旦定稿即不可改;写作可改稿,但改稿要同步更新台账。
15
+
16
+ ---
17
+
18
+ ## 二、四阶段定位
19
+
20
+ 写作是四阶段的第四层。按"信息生命期"标准:
21
+
22
+ - **骨架**:实体、关系、数量、卷级归属(全书不变,无章节号)
23
+ - **血肉**:每个实体具体什么样(全书不变,无章节号)
24
+ - **节奏**:什么时间发生什么(含章节号)
25
+ - **写作**:具体怎么写(唯一会变的阶段)
26
+
27
+ 写作阶段依赖上游的 16 个产物(骨架 4 + 血肉 8 + 节奏 4),但驱动**只整文件读 6 个**(骨架 `框架.json`/`实体.json` + 血肉 `角色.json` + 节奏 `章节规划.json`/`时序映射.json`/`章节细纲.json`)——整文件读会撑爆单回合上下文。其余上游产物按需用 `references/upstream-query.js` 精确取。写作阶段产出本阶段的逐章正文与 4 类台账。
28
+
29
+ ---
30
+
31
+ ## 三、加载顺序
32
+
33
+ | 序 | 文件 | 作用 |
34
+ |---|---|---|
35
+ | 1 | 01-scene.md | 场景五要素、进出场、画面感、视角、比例、非对话信息传递 |
36
+ | 2 | 02-chapter-workflow.md | 从细纲到正文的八步流程、批量生成、版本管理 |
37
+ | 3 | 03-opening-chapter.md | 开篇第一章五段式、题材变体、平台差异 |
38
+ | 4 | 04-dialogue-mastery.md | 权力博弈、潜台词、场景路由、语言差异化、弹幕 |
39
+ | 5 | 05-genre-formulas.md | 各题材的节拍顺序、必选场景、核心规则 |
40
+ | 6 | 06-tone-ensemble.md | 喜剧 / 悲剧 / 文学性基调,群像 / 单元剧 / 非线性结构 |
41
+ | 7 | 07-ledger-audit.md | 台账体系、单元末 / 卷末盘点、上下文加载、改稿影响 |
42
+ | 8 | 08-diagnosis-revision.md | 八种症状诊断树、修改优先级、四轮打磨、复验 |
43
+ | 9 | 09-reading-power.md | 章末钩子 13 式、章首引子 7 式、8 大爽点、7 种微兑现、30-40-30 结构 |
44
+ | 10 | 10-deslop.md | 去 AI 味:四种改写手法、24 类 AI 模式清单(**去味阶段用**,写作阶段不必读) |
45
+
46
+ **顺序说明**:01 是"场景"这一最小单位的写法;02 是"章"这一层的工作流;03 是"第 1 章"的专门写法。三者是"从小到大"的递进,01 → 02 → 03 是必读基线。
47
+
48
+ 04~06 是按场景 / 题材 / 基调的"按需加载"——写对话密集章时读 04,写特定题材时读 05,写喜剧 / 群像 / 单元剧 / 非线性时读 06。
49
+
50
+ 07 是"每章后"必用(台账);08 是"出问题时"才用(诊断改稿);09 是"每章都要用"的阅读动力规则(钩子类型、微兑现)。
51
+
52
+ 10 是"去味阶段"才用(改写方法),写作阶段不必读。
53
+
54
+ ---
55
+
56
+ ## 四、产出清单
57
+
58
+ | 产出 | 路径 |
59
+ |---|---|
60
+ | 逐章正文 | `设定/raw/sources/写作/第001章.md` ~ `第<T>章.md`(三位补零) |
61
+ | 章台账 | `设定/raw/sources/写作/台账/章台账.json` |
62
+ | 人物台账 | `设定/raw/sources/写作/台账/人物台账.json` |
63
+ | 伏笔台账 | `设定/raw/sources/写作/台账/伏笔台账.json` |
64
+ | 时间线台账 | `设定/raw/sources/写作/台账/时间线台账.json` |
65
+
66
+ **具体台账结构见 `prompts/04-writing-prompt.md` 的 §7.6**,本文件不重复定义。
67
+
68
+ ---
69
+
70
+ ## 五、决策路由
71
+
72
+ | 你在做什么 | 查 |
73
+ |---|---|
74
+ | 写一个场景 | 01-scene.md §2 场景五要素 |
75
+ | 判断场景 vs 概述 | 01-scene.md §3 比例 |
76
+ | 设计进入 / 退出场景 | 01-scene.md §4 进出场 |
77
+ | 写画面感 | 01-scene.md §5 画面感 |
78
+ | 选叙述视角 | 01-scene.md §6 视角 |
79
+ | 控句长文风 | 01-scene.md §7 句长 |
80
+ | 非对话信息传递 | 01-scene.md §9 非对话信息 |
81
+ | 从细纲到正文的流程 | 02-chapter-workflow.md §2 八步流程 |
82
+ | 批量生成质量控制 | 02-chapter-workflow.md §3 批量生成 |
83
+ | 版本管理 | 02-chapter-workflow.md §4 版本管理 |
84
+ | 写第一章 | 03-opening-chapter.md §2 五段式 |
85
+ | 按题材变体写第一章 | 03-opening-chapter.md §3 题材变体 |
86
+ | 按平台调整第一章 | 03-opening-chapter.md §4 平台差异 |
87
+ | 写对话 | 04-dialogue-mastery.md §2 对话核心规则 |
88
+ | 压制模式 / 反转模式 / 心死模式 | 04-dialogue-mastery.md §3 权力博弈 |
89
+ | 潜台词与议程 | 04-dialogue-mastery.md §4 潜台词与议程 |
90
+ | 情绪推动对话 | 04-dialogue-mastery.md §5 情绪推动 |
91
+ | 信息展示 / 弹幕 | 04-dialogue-mastery.md §6 信息展示与弹幕 |
92
+ | 人物语言差异化 | 04-dialogue-mastery.md §7 语言差异化 |
93
+ | 喜剧写法 | 06-tone-ensemble.md §2 喜剧 |
94
+ | 悲剧写法 | 06-tone-ensemble.md §3 悲剧 |
95
+ | 文学性 | 06-tone-ensemble.md §4 文学性 |
96
+ | 群像写法 | 06-tone-ensemble.md §5 群像 |
97
+ | 单元剧结构 | 06-tone-ensemble.md §6 单元剧 |
98
+ | 非线性叙事 | 06-tone-ensemble.md §7 非线性 |
99
+ | 更新伏笔 / 人物 / 时间线台账 | 07-ledger-audit.md §2 台账体系 |
100
+ | 单元末盘点 | 07-ledger-audit.md §3 单元末盘点 |
101
+ | 卷末大盘点 | 07-ledger-audit.md §4 卷末大盘点 |
102
+ | 上下文加载策略 | 07-ledger-audit.md §5 上下文加载 |
103
+ | 改稿连锁影响 | 07-ledger-audit.md §6 改稿影响 |
104
+ | 读者说平淡 / 憋屈 / 弃书 | 08-diagnosis-revision.md §2 诊断树 |
105
+ | 修哪个问题 | 08-diagnosis-revision.md §3 修改优先级 |
106
+ | 怎么修 | 08-diagnosis-revision.md §4 四轮打磨 |
107
+ | 修完怎么验 | 08-diagnosis-revision.md §5 复验 |
108
+ | 按题材套公式 | 05-genre-formulas.md(按题材路由) |
109
+ | 去掉 AI 味 | 10-deslop.md §2 四种改写手法 |
110
+ | 查某一类 AI 模式属于哪一类 | 10-deslop.md §4 24 类清单(判定以 `scripts/ai-patterns.js` 为准) |
111
+
112
+ ---
113
+
114
+ ## 六、每章循环速览
115
+
116
+ 写作阶段不是"一次生成全部正文",而是"逐章生成 + 逐章校验 + 台账持续更新"。循环结构:
117
+
118
+ ```
119
+ 对第 N 章(N=1..T):
120
+ ┌─ 步骤 A:读前置
121
+ │ ├─ 读本章细纲(如果本章有)
122
+ │ ├─ 读前章正文最后一段(衔接)
123
+ │ ├─ 读人物台账(出场角色当前状态)
124
+ │ ├─ 读伏笔台账(open 伏笔的当前状态)
125
+ │ └─ 读时间线台账(in-world-time 当前位置)
126
+ ├─ 步骤 B:生成正文(按 01/02/03/04/05/06 方法论)
127
+ ├─ 步骤 C:单章校验(writing-validate.js)
128
+ ├─ 步骤 D:处理输出(status 0 → E / status 1 → 回喂重写 / status 2 → BLOCKED)
129
+ └─ 步骤 E:更新 4 类台账(07-ledger-audit.md)
130
+ ```
131
+
132
+ **完整的循环细节、回喂格式、重试规则、BLOCKED 触发条件见 `prompts/04-writing-prompt.md` 的 §7**,本文件不重复。
133
+
134
+ ---
135
+
136
+ ## 七、禁用与强制(本阶段特有)
137
+
138
+ 写作阶段与前三阶段的差异,集中在"输出形态":
139
+
140
+ - **章节标题**:第一行必须是 `# 第N章 <标题>` / `# 第NNN章 <标题>` / `# 第X章 <标题>`(X 为中文数字)三种格式之一,章号必须与 `--chapter=N` 一致
141
+ - **禁用词**:`基本一致` / `无重大问题`(AI 分析口吻,不得出现在正文)
142
+ - **占位符**:`[X]` / `[Y]` / `[Z]` / `[W]` / `待确认` / `待定` / `N/A`
143
+ - **字符集**:不得含韩文谚文、日文假名
144
+ - **空章节**:标题存在但正文过短(非空白字符 < 50)会报 `EMPTY_BODY`
145
+
146
+ **具体的校验代码与触发条件见 `prompts/04-writing-prompt.md` 的 §八、§十二**,本文件不重复。
147
+
148
+ ---
149
+
150
+ ## 八、与其他文件的关系
151
+
152
+ | 本文件作用 | 被谁引用 |
153
+ |---|---|
154
+ | 写作阶段入口 | `prompts/04-writing-prompt.md`(提示词读本文件确定加载顺序与决策路由) |
155
+ | 写作阶段产出清单 | `index.md` §3.5(写作阶段 9 个指导文件之一) |
156
+
157
+ **本文件本身不直接输出到任何 JSON / 正文**,它是导航文件。所有具体输出由 01~08 子文件负责。
158
+
159
+ **上下游关系**:
160
+ - 上游:`prompts/04-writing-prompt.md`(编排) + 骨架 4 JSON + 血肉 8 JSON + 节奏 4 JSON
161
+ - 下游:`writing-validate.js`(单章校验) + 台账(持续更新)
162
+
163
+ **不输出到**:
164
+ - 场景五要素 / 八步流程 / 五段式 / 对话规则 / 题材公式 / 基调结构 / 台账结构 → 都是方法论或数据结构,分别写在 01~08 子文件与提示词 §7.6
165
+ - 具体章节号 / 字数 → 由节奏阶段的章节规划、章节细纲、时序映射决定
166
+ - 具体正文 → 逐章生成,不在本文件
167
+
168
+ ---
169
+
170
+ ## 九、版本记录
171
+
172
+ | 版本 | 变更 |
173
+ |---|---|
174
+ | v1.0 | 初建。从 `prompts/04-writing-prompt.md` 提炼入口层内容:阶段目标 / 四阶段定位 / 加载顺序 / 产出清单 / 决策路由 / 每章循环速览 / 禁用与强制 / 与其他文件的关系。补全写作阶段缺失的阶段入口(此前写作指导从 01-scene.md 开始,无 00-index.md) |