@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,585 @@
1
+ # glossary.md 网文生成系统术语总表
2
+
3
+ > 本文件是四阶段生成体系的**唯一术语真源**。
4
+ > 模板、公式、指导文件、脚本、提示词都以本文件为准。
5
+ > 本文件只做"定义",不做"方法论"、不做"量化"、不做"验证"。
6
+ > 文件清单以 `references/index.md` 为准,本文件不列出文件数。
7
+
8
+ ---
9
+
10
+ ## 一、文件用途
11
+
12
+ 本文件定义:
13
+ 1. 四阶段边界(哪个字段属于哪个阶段)
14
+ 2. 核心术语(实体、关系、章节号等)
15
+ 3. ID 前缀总表
16
+ 4. 枚举值总表
17
+ 5. 章节号字段清单
18
+ 6. 字段归属总表
19
+ 7. 生命周期
20
+ 8. 文件间引用关系
21
+
22
+ **本文件不包含**:方法论、公式、验证逻辑、数据结构细节、默认值。
23
+
24
+ - 方法论 → `references/*指导/*.md`
25
+ - 量化约束 → `references/formulas-*.json`
26
+ - 数据结构 → `模板/*/*模板.json`
27
+ - 验证逻辑 → `references/*-validate.js`
28
+
29
+ ---
30
+
31
+ ## 二、四阶段边界
32
+
33
+ 判断"某字段属于哪个阶段",用两个问题:
34
+ 1. 这个信息回答什么问题?
35
+ 2. 这个信息的生命期有多长?
36
+
37
+ | 阶段 | 回答的问题 | 信息生命期 | 是否含章节号 | 产出文件 |
38
+ |---|---|---|---|---|
39
+ | **骨架** | 有什么实体?实体如何连接?有多少?分几卷几幕? | 全书不变 | **否** | 4 个 JSON |
40
+ | **血肉** | 每个实体具体是什么样? | 全书不变(局部可更新) | **否** | 8 个 JSON |
41
+ | **节奏** | 什么时间发生什么? | 全书不变(一旦定稿) | **是** | 4 个 JSON |
42
+ | **写作** | 具体怎么写? | 唯一会变的阶段 | 是 | 逐章正文 |
43
+
44
+ ### 2.1 核心规则
45
+
46
+ > **"章节号"是节奏阶段的专属。**
47
+ > 骨架阶段、血肉阶段出现任何章节号(见第六节清单),都是越界。
48
+
49
+ ### 2.2 越界检查
50
+
51
+ - 骨架脚本:`SKELETON_CHAPTER_FORBIDDEN`
52
+ - 血肉脚本:`FLESH_CHAPTER_FORBIDDEN`
53
+
54
+ 只要某字段名命中第六节的"章节号字段清单",就报错。
55
+
56
+ ---
57
+
58
+ ## 三、核心术语
59
+
60
+ | 术语 | 定义 | 所属阶段 |
61
+ |---|---|---|
62
+ | 实体 | 有 ID 的对象(角色、冲突、势力、卷、伏笔、主线、支线、地点、结局、规则、道具、高潮、爽点) | 骨架 |
63
+ | 关系 | 两个实体之间的连接(角色关系、势力成员、冲突参与等) | 骨架 |
64
+ | 数量配额 | 各类实体的"总数"(quota) | 骨架 |
65
+ | 卷级归属 | 主线/支线挂哪几卷 | 骨架 |
66
+ | 实体属性 | 实体的描述、目标、缺陷、信息状态、语言档案等 | 血肉 |
67
+ | 关系描述 | 关系的类型、描述、变化内容 | 血肉 |
68
+ | 冲突内容 | 冲突的矛盾、升级路径、信息差内容 | 血肉 |
69
+ | 节奏参数 | `branch_chapter_total` / `overlap_chapter_count` / `main_progress_chapter_count` | 节奏 |
70
+ | 时序映射 | 所有实体的章节号在节奏阶段的唯一真源 | 节奏 |
71
+ | 章节规划 | 每章归属卷/幕/场景焦点 | 节奏 |
72
+ | 章节细纲 | 每章的功能/情绪/爽点/伏笔动作/势力出场/钩子 | 节奏 |
73
+ | 钩子位置 | 章首 / 章尾 | 骨架(定义) |
74
+ | 钩子式子 | 具体 7 式(章首)/ 13 式(章尾) | 节奏(细化) |
75
+ | 正文 | 每章的实际文字 | 写作 |
76
+ | 台账 | 写作阶段的动态记录(章台账、人物台账等) | 写作 |
77
+
78
+ ---
79
+
80
+ ## 四、ID 前缀总表
81
+
82
+ | 前缀 | 实体类型 | 出现阶段 | 示例 | 说明 |
83
+ |---|---|---|---|---|
84
+ | `C` | 角色 | 骨架 | C001 | 三位数字,从 001 起 |
85
+ | `X` | 冲突 | 骨架 | X001 | |
86
+ | `F` | 势力 | 骨架 | F001 | |
87
+ | `V` | 卷 | 骨架 | V001 | 单卷作品只有 V001 |
88
+ | `FS` | 伏笔 | 骨架 | FS001 | 跨卷统一编号 |
89
+ | `M` | 主线 | 骨架 | M001 | 通常只有 M001 |
90
+ | `B` | 支线 | 骨架 | B001 | |
91
+ | `L` | 地点 | 骨架 | L001 | |
92
+ | `E` | 结局 | 骨架 | E001 | |
93
+ | `R` | 核心规则 | 骨架 | R001 | 世界观规则 |
94
+ | `I` | 信息规则 | 骨架 | I001 | 世界观规则 |
95
+ | `SR` | 社会规则 | 骨架 | SR001 | 原 `S` 改为 `SR`,避免与旧版伏笔冲突 |
96
+ | `P` | 关键道具 | 骨架 | P001 | 三类道具共享编号空间 |
97
+ | `CL` | 高潮 | 骨架 | CL001 | |
98
+ | `PL` | 爽点 | 骨架 | PL001 | |
99
+
100
+ **说明**:钩子(hook)不是骨架实体——它的类型(`hook_form_head`/`hook_form_tail`)属于节奏阶段,它的数量下限由节奏参数 `chapter_hook_rate` 表达,不需要独立 ID。因此本表不含 `HK` 前缀。
101
+
102
+ ### 4.1 编号规则
103
+
104
+ - 从 001 开始,连续递增,不跳号
105
+ - 格式严格三位数字:`C001` 可以,`C01` 不行,`C0001` 不行
106
+ - 同文件内 ID 字符串唯一,不重复
107
+ - **新 ID 只能出现在骨架阶段**,血肉/节奏/写作沿用骨架的 ID
108
+
109
+ ### 4.2 章节复合键
110
+
111
+ 章节不是实体,没有独立 ID。节奏阶段用复合键 `ch: N` 引用:
112
+
113
+ - `ch: 1`、`ch: 100`、`ch: 300`
114
+
115
+ 写作阶段用文件名引用章节:`第001章.md`。
116
+
117
+ ---
118
+
119
+ ## 五、枚举值总表
120
+
121
+ ### 5.1 骨架阶段枚举
122
+
123
+ #### character_type(角色类型)
124
+
125
+ | 值 | 定义 |
126
+ |---|---|
127
+ | 主角 | 全书第一视角,故事的主驱动者 |
128
+ | 贯穿级核心配角 | 贯穿全书或大部分卷的重要配角 |
129
+ | 卷级重要配角 | 在某几卷中重要的配角 |
130
+ | 贯穿级核心反派 | 贯穿全书或大部分卷的主要对手 |
131
+ | 卷级反派 | 在某几卷中的主要对手 |
132
+
133
+ #### age_group(年龄段)
134
+
135
+ | 值 | 定义 |
136
+ |---|---|
137
+ | 少年 | 12-18 岁 |
138
+ | 青年 | 19-35 岁 |
139
+ | 中年 | 36-55 岁 |
140
+ | 老年 | 56 岁以上 |
141
+
142
+ #### conflict_type(冲突类型)
143
+
144
+ | 值 | 定义 |
145
+ |---|---|
146
+ | 核心 | 全书核心冲突 |
147
+ | 阶段 | 某个阶段(卷/单元)的核心冲突 |
148
+ | 交织 | 主线与支线交织产生的冲突 |
149
+
150
+ #### conflict_scale(冲突规模)
151
+
152
+ | 值 | 定义 |
153
+ |---|---|
154
+ | 全局性 | 涉及整个世界/国家/大势力 |
155
+ | 区域性 | 涉及某个城市/宗门/局部势力 |
156
+ | 个人 | 涉及个人命运 |
157
+
158
+ #### faction_type(势力类型)
159
+
160
+ | 值 | 定义 |
161
+ |---|---|
162
+ | 官方组织 | 政府、军队、执法机构 |
163
+ | 民间组织 | 帮派、家族、宗门、商会 |
164
+ | 商业组织 | 公司、商会、财团 |
165
+ | 其他 | 不属于以上三类 |
166
+
167
+ #### location_type(地点类型)
168
+
169
+ | 值 | 定义 |
170
+ |---|---|
171
+ | 主要场景 | 反复出场的重要场景 |
172
+ | 次要场景 | 出场 2-5 次 |
173
+ | 过渡场景 | 出场 1 次,仅作过渡 |
174
+ | 其他 | 不属于以上三类 |
175
+
176
+ #### narrative_function(叙事功能)
177
+
178
+ | 值 | 定义 |
179
+ |---|---|
180
+ | 对话 | 主要用于对话 |
181
+ | 冲突 | 主要用于冲突 |
182
+ | 情感 | 主要用于情感 |
183
+ | 转折 | 主要用于转折 |
184
+ | 伏笔 | 主要用于伏笔 |
185
+ | 其他 | 不属于以上五类 |
186
+
187
+ #### ending_level(结局级别)
188
+
189
+ | 值 | 定义 |
190
+ |---|---|
191
+ | 全书级 | 全书最终结局(每本书 1 个) |
192
+ | 卷级 | 某卷的结局(V 个卷 V 个卷级结局,多卷作品才有) |
193
+
194
+ #### ending_type(结局类型)
195
+
196
+ | 值 | 定义 |
197
+ |---|---|
198
+ | 开放式结局 | 不给出明确结论,留悬念 |
199
+ | 闭合式结局 | 所有线索收束,给出明确结论 |
200
+ | 悲剧结局 | 主角或核心角色命运走向负面 |
201
+ | 喜剧结局 | 主角或核心角色命运走向正面 |
202
+
203
+ #### foreshadow_type(伏笔类型)
204
+
205
+ | 值 | 定义 |
206
+ |---|---|
207
+ | 小伏笔 | 跨几章内的伏笔(回收窗口 ≤ 8 章) |
208
+ | 中伏笔 | 跨十几章的伏笔(回收窗口 15-20 章) |
209
+ | 大伏笔 | 跨卷的伏笔(回收窗口 ≥ 50 章) |
210
+
211
+ #### climax_type(高潮类型)
212
+
213
+ | 值 | 定义 |
214
+ |---|---|
215
+ | 小高潮 | 单元级高潮 |
216
+ | 中高潮 | 桥段级高潮(更细分) |
217
+ | 大高潮 | 卷级高潮 |
218
+
219
+ #### pleasure_scale(爽点规模)
220
+
221
+ | 值 | 定义 |
222
+ |---|---|
223
+ | 小爽点 | 单章内的小满足 |
224
+ | 中爽点 | 跨几章的中等满足 |
225
+ | 大爽点 | 跨十几章或卷级的重大满足 |
226
+
227
+ #### pleasure_kind(爽点种类)
228
+
229
+ | 值 | 定义 |
230
+ |---|---|
231
+ | 打脸 | 对手嚣张后被碾压 |
232
+ | 收获 | 获得资源/装备/地位 |
233
+ | 身份 | 隐藏身份揭露 |
234
+ | 情感 | 关系质变/被偏爱 |
235
+ | 智力 | 计谋揭晓/解谜 |
236
+ | 探索 | 发现新世界/新真相 |
237
+ | 团战 | 集体胜利 |
238
+
239
+ #### world_rule_category(世界观规则分类)
240
+
241
+ | 值 | 定义 |
242
+ |---|---|
243
+ | 核心规则 | 世界运行的根本规则(力量体系、物理规则) |
244
+ | 信息规则 | 信息传播/隐藏/揭示的规则 |
245
+ | 社会规则 | 社会结构/文化/禁忌 |
246
+
247
+ #### item_category(道具分类)
248
+
249
+ | 值 | 定义 |
250
+ |---|---|
251
+ | 核心道具 | 影响主线的关键道具 |
252
+ | 支线道具 | 影响支线的道具 |
253
+ | 象征道具 | 承载情感/主题的象征物 |
254
+
255
+ #### owner_kind(归属者类型)
256
+
257
+ | 值 | 定义 |
258
+ |---|---|
259
+ | character | 道具属于角色 |
260
+ | faction | 道具属于势力 |
261
+
262
+ #### branch_type(支线类型)
263
+
264
+ | 值 | 定义 |
265
+ |---|---|
266
+ | 角色成长型 | 围绕某角色成长的支线 |
267
+ | 身份揭示型 | 围绕身份/秘密揭示的支线 |
268
+ | 背景揭示型 | 围绕世界观/历史背景揭示的支线 |
269
+
270
+ #### hook_position(钩子位置)
271
+
272
+ | 值 | 定义 |
273
+ |---|---|
274
+ | 章首 | 章节开头的钩子 |
275
+ | 章尾 | 章节结尾的钩子 |
276
+
277
+ #### relation_type(势力关系类型)
278
+
279
+ | 值 | 定义 |
280
+ |---|---|
281
+ | 合作 | 双方合作 |
282
+ | 对立 | 双方敌对 |
283
+ | 利用 | 一方利用另一方 |
284
+ | 中立 | 保持中立 |
285
+
286
+ #### member_relation(成员关系类型)
287
+
288
+ | 值 | 定义 |
289
+ |---|---|
290
+ | 利益交换 | 以利益为纽带 |
291
+ | 合作 | 平等合作 |
292
+ | 对立 | 内部对立 |
293
+ | 利用 | 互相利用 |
294
+ | 师徒 | 师徒关系 |
295
+ | 雇佣 | 雇佣关系 |
296
+ | 血亲 | 血缘关系 |
297
+ | 无 | 无特定关系 |
298
+
299
+ #### relation_kind(角色关系类型)
300
+
301
+ 骨架阶段与血肉阶段共用。骨架 `关系.json` 的 `character_relations[].relation_kind` 与血肉 `角色.json` 的 `relationships[].relationship_type` 取值必须来自本表。
302
+
303
+ | 值 | 定义 | 方向 | 维度 |
304
+ |---|---|---|---|
305
+ | 血缘 | 有血缘/亲属关系 | 对称 | 身份 |
306
+ | 师徒 | 有师承关系(from 为师父侧,to 为徒弟侧) | 有向 | 身份 |
307
+ | 雇佣 | 有雇佣关系(from 为雇主侧,to 为受雇侧) | 有向 | 身份 |
308
+ | 服从 | from 服从 to | 有向 | 姿态 |
309
+ | 提携 | from 提携 to | 有向 | 姿态 |
310
+ | 合作 | 平等合作、互为盟友 | 对称 | 立场 |
311
+ | 利益交换 | 以利益为纽带互相交换 | 对称 | 立场 |
312
+ | 利用 | from 利用 to | 有向 | 立场 |
313
+ | 对立 | 立场对立、互为反对者 | 对称 | 立场 |
314
+ | 敌对 | 敌视仇视、互为敌人 | 对称 | 立场 |
315
+ | 竞争 | 争夺同一目标或资源 | 对称 | 立场 |
316
+ | 中立 | 无特殊立场、互不相干 | 对称 | 立场 |
317
+
318
+ **说明**:
319
+
320
+ - **方向**与**维度**是机器判定用的语义标注,取值定义在 `scripts/graph-utils.js` 的 `RELATION_KIND_META`。词表与元数据由 `assertRelationKindMeta` 在每次校验时比对,不同步会报 `REL_KIND_META_DRIFT`。
321
+ - **身份维度**(血缘/师徒/雇佣)与**立场维度**(合作/利益交换/利用/对立/敌对/竞争/中立)可同时成立,例如"A 是 B 的表弟,同时两人是竞争对手"。
322
+ - **立场维度**下同一对角色只能有一种关系:A→B 声明"合作"、B→A 声明"敌对"会被 `REL_ASYMMETRIC_INCOMPATIBLE` 拦截。
323
+ - **有向关系**不能双向互指同一个值:A→B 与 B→A 都写"服从"会被 `REL_ASYMMETRIC_INCOMPATIBLE` 拦截。
324
+ - 血肉阶段的 `relationships[]` 语义是"**本角色**对 `target_name` 的关系",方向与骨架的 `from`→`to` 一致,跨阶段比对见 `REL_TYPE_MISMATCH`。
325
+
326
+ #### branch_relation_kind(主线与支线的交织关系)
327
+
328
+ 骨架 `关系.json` 的 `main_line_branch_relation[].relation_kind` 取值必须来自本表。它描述"这条支线怎么挂到主线上",与角色关系是不同维度,因此单列一套词表。
329
+
330
+ | 值 | 定义 |
331
+ |---|---|
332
+ | 促成 | 支线推动主线向前,是主线的助力 |
333
+ | 阻碍 | 支线阻滞主线,制造主线要跨越的障碍 |
334
+ | 并行 | 支线与主线并行展开,互不依赖 |
335
+ | 揭示 | 支线揭示主线真相、身份或伏笔 |
336
+ | 收束 | 支线收束主线的某个节点或悬念 |
337
+ | 依存 | 主线为支线提供前提,支线依附主线展开 |
338
+
339
+ **说明**:血肉阶段 `剧情.json` 的 `branches[].main_relation` 是这段交织关系的文字描述,不受本表约束。
340
+
341
+ ### 5.2 血肉阶段枚举
342
+
343
+ #### exit_type(退场方式)
344
+
345
+ | 值 | 定义 |
346
+ |---|---|
347
+ | 死亡 | 角色死亡 |
348
+ | 存活 | 角色存活到最后 |
349
+ | 淡出 | 角色淡出故事,未明确结局 |
350
+ | 未退场 | 角色无退场(贯穿全书) |
351
+
352
+ #### presentation_method(呈现方式)
353
+
354
+ | 值 | 定义 |
355
+ |---|---|
356
+ | 回忆 | 通过回忆呈现 |
357
+ | 对话提及 | 通过对话提及 |
358
+ | 闪回 | 通过闪回场景呈现 |
359
+ | 其他 | 不属于以上三类 |
360
+
361
+ #### arc_type(弧光类型)
362
+
363
+ | 值 | 定义 |
364
+ |---|---|
365
+ | 成长型 | 从 A 到 B 的提升 |
366
+ | 堕落型 | 从 A 到 B 的下坠 |
367
+ | 不变型 | 保持稳定(稳定人设) |
368
+ | 发现型 | 发现真相/真实自我 |
369
+
370
+ #### mirror_type(镜像类型)
371
+
372
+ | 值 | 定义 |
373
+ |---|---|
374
+ | 相似镜像 | 与主角同起点不同选择(用于大弧 Boss/最终 Boss) |
375
+ | 相反镜像 | 与主角长处相反(用于中反派/日常对手) |
376
+
377
+ #### character_defect_type(角色缺陷类型)
378
+
379
+ | 值 | 定义 | 是否要求导致犯错 |
380
+ |---|---|---|
381
+ | 性格缺陷 | 傲慢、多疑、逃避、复仇心等性格层面的缺陷 | 是(关键情节导致失败) |
382
+ | 生理缺陷 | 天阉、残疾、病弱等身体层面的缺陷 | 否(制造关系障碍) |
383
+ | 身份缺陷 | 私生子、赘婿、废柴等社会身份层面的缺陷 | 否(制造社会障碍) |
384
+ | 能力缺陷 | 战力低、没钱、没背景等能力层面的缺陷 | 否(制造成长空间) |
385
+ | 道德缺陷 | 内核邪恶、圣母等道德层面的缺陷 | 主角禁用(仅反派/配角) |
386
+
387
+ **说明**:该枚举是 `01-character.md` §2.2 的方法论分类。`角色模板.json` 的 `core_flaw` 字段是 `type: string`(不是 `enumRef`),因为它是"一句话描述"(如"极度自我,拒绝求助"),不是枚举值本身。方法论层面按此分类设计缺陷,但数据层自由描述。
388
+
389
+ ### 5.3 节奏阶段枚举
390
+
391
+ #### hook_form_head(章首钩子 7 式)
392
+
393
+ | 值 | 定义 |
394
+ |---|---|
395
+ | 悬念对话 | 从意味深长的对话开始 |
396
+ | 闪前碎片 | 先给结果碎片 |
397
+ | 倒计时 | 建立紧迫感 |
398
+ | 神秘独白 | 第一人称诡异内心独白 |
399
+ | 反差场景 | 两个截然不同的场景并列 |
400
+ | 未完成动作 | 动作进行中被截断 |
401
+ | 意象预示 | 用环境意象暗示 |
402
+
403
+ #### hook_form_tail(章尾钩子 13 式)
404
+
405
+ | 值 | 定义 |
406
+ |---|---|
407
+ | 突然揭示 | 抛出改变全局的信息 |
408
+ | 紧急危机 | 下章必须回应的紧迫威胁 |
409
+ | 未完成动作 | 动作被新变量打断 |
410
+ | 身份反转 | 身份真相偏离读者预期 |
411
+ | 两难抉择 | 被迫在两个坏选项中选一个 |
412
+ | 神秘物品 | 重要但含义未知的物件 |
413
+ | 倒计时 | 时间不够用 |
414
+ | 承诺/威胁 | 有人宣布行动意图 |
415
+ | 离奇消失 | 不可能的消失 |
416
+ | 隐藏含义 | 表面正常实际暗藏信息 |
417
+ | 意象钩子 | 反复出现的意象发生变化 |
418
+ | 回声钩子 | 章尾句呼应开头,关键细节变了 |
419
+ | 留白钩子 | 只展示反应,不揭示发生了什么 |
420
+
421
+ #### hook_strength(钩子强度)
422
+
423
+ | 值 | 定义 |
424
+ |---|---|
425
+ | 强 | 信息颠覆 / 下章必须回应 / 命运级转折(三选一即可) |
426
+ | 中 | 局部新信息 / 几章内回应 / 关系变化 |
427
+ | 弱 | 背景/日常 / 无紧迫威胁 / 情感平稳 |
428
+
429
+ #### node_type(冲突升级节点类型)
430
+
431
+ | 值 | 定义 |
432
+ |---|---|
433
+ | 引入 | 冲突引入 |
434
+ | 积累 | 冲突积累 |
435
+ | 升级 | 冲突升级 |
436
+ | 转折 | 冲突转折 |
437
+ | 揭示 | 信息揭示 |
438
+ | 危机 | 危机爆发 |
439
+ | 高潮 | 冲突高潮 |
440
+
441
+ ---
442
+
443
+ ## 六、章节号字段清单
444
+
445
+ **以下字段名只能出现在节奏阶段**。骨架脚本(`SKELETON_CHAPTER_FORBIDDEN`)和血肉脚本(`FLESH_CHAPTER_FORBIDDEN`)会拦截;节奏脚本(`RHYTHM_CHAP_RANGE`)会检查数值范围。
446
+
447
+ | 字段名 | 类型 | 含义 |
448
+ |---|---|---|
449
+ | `chapter` | 单章号 | 单个章节的编号 |
450
+ | `ch` | 单章号 | `chapter` 的简写形式(节奏模板中常用) |
451
+ | `start` | 单章号 | 区间起点(注意:与 arc_change_descriptions.start 同名,但后者为文本描述,已在脚本豁免) |
452
+ | `end` | 单章号 | 区间终点(注意:与 arc_change_descriptions.end 同名,但后者为文本描述,已在脚本豁免) |
453
+ | `turning` | 单章号 | 支线的转折章(注意:与 arc_change_descriptions.turning 同名,但后者为文本描述,已在脚本豁免) |
454
+ | `midpoint` | 单章号 | 弧光阶段中点章(节奏模板暂未使用,但作为弧光阶段命名空间已对齐) |
455
+ | `resolution` | 单章号 | 支线/冲突的收束章(与 `resolution_chapter` 等价) |
456
+ | `resolution_chapter` | 单章号 | 冲突收束章(与 `resolution` 等价) |
457
+ | `appear_start` | 单章号 | 角色/地点/道具出现起点 |
458
+ | `appear_end` | 单章号 | 角色/地点/道具出现终点 |
459
+ | `exit_chapter` | 单章号 | 角色退场章 |
460
+ | `buried_chapter` | 单章号 | 伏笔埋设章 |
461
+ | `recovered_chapter` | 单章号 | 伏笔回收章 |
462
+ | `escalation_nodes[].chapter` | 单章号 | 冲突升级节点章 |
463
+ | `resolution_chapter` | 单章号 | 冲突收束章 |
464
+ | `info_gaps[].created` | 单章号 | 信息差产生章 |
465
+ | `info_gaps[].resolved` | 单章号 | 信息差消除章 |
466
+ | `key_nodes[].chapter` | 单章号 | 主线关键节点章 |
467
+ | `interweaves[].chapter` | 单章号 | 支线交织点章 |
468
+ | `foreshadow_recovery[].chapter` | 单章号 | 结局伏笔回收章 |
469
+ | `hook_chapter` | 单章号 | 钩子章 |
470
+ | `climax_chapter` | 单章号 | 高潮章 |
471
+ | `pleasure_chapter` | 单章号 | 爽点章 |
472
+ | `arc_stages[].chapter` | 单章号 | 弧光阶段章 |
473
+ | `appearance_chapters` | 区间 | 出现区间(容器) |
474
+ | `chapter_range` | 区间 | 章节范围(容器) |
475
+ | `chapter_count` | 计数 | 章节计数 |
476
+
477
+ **说明**:
478
+ - **"单章号"**:值的类型应为 number,表示某一章的编号。若在骨架/血肉阶段出现且值为 number → 报 `*_CHAPTER_FORBIDDEN`;在节奏阶段出现且值不在 `[1, T]` → 报 `RHYTHM_CHAP_RANGE`。
479
+ - **"区间"(容器)**:值的类型应为 object(含 start/end)或数组。若在骨架/血肉阶段出现(无论值类型)→ 报 `*_CHAPTER_FORBIDDEN`。
480
+ - **"计数"**:值的类型应为 number,表示"章数"而不是"第几章"。骨架/血肉阶段的 `chapter_count` 不报错(因为它是计数不是章节号),但节奏阶段仍检查其值 ≤ T。
481
+
482
+ **等价关系**:
483
+ - `ch` 与 `chapter` 语义等价(都是单章号)
484
+ - `resolution` 与 `resolution_chapter` 语义等价(都是收束章)
485
+ - 节奏模板中 `branch_timeline` 用 `resolution`,`conflict_timeline` 用 `resolution_chapter`,两者都能被 `RHYTHM_CHAP_RANGE` 检查
486
+
487
+ **例外**:
488
+ - `chapter_ratio`(框架.json 的 `volume_ratio[].chapter_ratio`)是"比例"不是"章节号",允许在骨架
489
+ - `volume_ratio`(层级.json 的 `volume_ratio[]`)是"比例"不是"章节号",允许在骨架
490
+
491
+ ---
492
+
493
+ ## 七、字段归属总表
494
+
495
+ 只列"哪些字段在哪个文件",详细结构见对应模板。
496
+
497
+ ### 7.1 骨架阶段(4 个 JSON)
498
+
499
+ | 文件 | 顶层字段 |
500
+ |---|---|
501
+ | `框架.json` | `capacity`、`input_snapshot`、`quota`、`volume_ratio`、`derivations` |
502
+ | `实体.json` | `characters`、`conflicts`、`factions`、`locations`、`items`、`endings`、`foreshadows`、`climaxes`、`pleasures`、`world_rules`、`main_lines`、`branches` |
503
+ | `关系.json` | `character_relations`、`faction_membership`、`faction_relations`、`conflict_participants`、`branch_protagonist`、`item_owner`、`location_conflict`、`ending_character`、`main_line_branch_relation` |
504
+ | `层级.json` | `volumes`、`acts`、`main_line_span`、`branch_span` |
505
+
506
+ ### 7.2 血肉阶段(8 个 JSON)
507
+
508
+ | 文件 | 顶层字段 |
509
+ |---|---|
510
+ | `角色.json` | `characters`(含 description/goals/core_flaw/golden_finger/information_state/arc_type/arc_stages/language_profile/behavior_repeat_points/mirror_type/relationships/arc_changes/memory_points/exclusive_needs/exit) |
511
+ | `冲突.json` | `conflicts`(含 description/core_goal/influence_scope/focus_points/surface_contradiction/deep_contradiction/ultimate_contradiction/escalation_path/information_gaps/resolution_plan) |
512
+ | `势力.json` | `factions`(含 goal/resources/internal_structure/suppression_method/resource_seizure_path/main_line_connection/members/relations) |
513
+ | `剧情.json` | `main_lines`(core_drive)、`branches`(goal/main_relation/expected_outcome) |
514
+ | `地点.json` | `locations`(features/key_event_descriptions/narrative_role_description) |
515
+ | `结局.json` | `endings`(conflict_summary/conflict_solution/anti_trope_design/aftermath/emotion_trajectory/core_emotion/final_point/chapter_design/memorable_scenes/epilogue_hints/foreshadow_recovery_plan) |
516
+ | `世界观规则.json` | `core_rules`、`information_rules`、`social_rules`、`rule_conflict_plan` |
517
+ | `关键道具.json` | `core_items`、`branch_items`、`symbolic_items`、`details` |
518
+
519
+ ### 7.3 节奏阶段(4 个 JSON)
520
+
521
+ | 文件 | 顶层字段 |
522
+ |---|---|
523
+ | `章节规划.json` | `chapters`(每章:ch/volume/act/scene_focus) |
524
+ | `时序映射.json` | `character_timeline`、`conflict_timeline`、`foreshadow_timeline`、`climax_timeline`、`pleasure_timeline`、`hook_timeline`、`main_line_timeline`、`branch_timeline`、`location_timeline`、`item_timeline`、`ending_timeline` |
525
+ | `节奏参数.json` | `chapter_hook_rate`、`branch_chapter_total`、`overlap_chapter_count`、`main_progress_chapter_count`、`derivations` |
526
+ | `章节细纲.json` | `outlines`(每章一行,可只对重点章写) |
527
+
528
+ ### 7.4 写作阶段
529
+
530
+ | 文件 | 内容 |
531
+ |---|---|
532
+ | `第NNN章.md` | 正文 |
533
+ | `台账/*.json` | 章台账、人物台账、伏笔台账、时间线台账 |
534
+
535
+ ---
536
+
537
+ ## 八、生命周期
538
+
539
+ | 阶段 | 信息生命期 | 是否允许更新 |
540
+ |---|---|---|
541
+ | 骨架 | 全书不变 | 一旦定稿不可改(除非全量重跑) |
542
+ | 血肉 | 全书不变(局部可更新,如新增角色回填) | 允许局部更新,但要同步更新到骨架 |
543
+ | 节奏 | 全书不变(一旦定稿) | 一旦定稿不可改(除非全量重跑) |
544
+ | 写作 | 唯一会变的阶段 | 可改稿(改稿要同步更新台账) |
545
+
546
+ ### 8.1 阶段间依赖
547
+
548
+ - 血肉依赖骨架(读骨架的 4 个 JSON)
549
+ - 节奏依赖骨架 + 血肉(骨架 4 个 + 血肉 8 个产物;校验脚本**实际读 6 个**:骨架 `框架.json`/`实体.json`/`层级.json` + 血肉 `角色.json`/`地点.json`/`关键道具.json`,其余按需用 `upstream-query.js` 查)
550
+ - 写作依赖骨架 + 血肉 + 节奏(16 个产物;写作驱动**实际读 6 个**:骨架 `框架.json`/`实体.json` + 血肉 `角色.json` + 节奏 `章节规划.json`/`时序映射.json`/`章节细纲.json`,其余按需用 `upstream-query.js` 精确取;另外读前 N 章正文与 4 类台账)
551
+
552
+ ### 8.2 单向数据流
553
+
554
+ > **下游只读上游,不写上游。**
555
+ > 阶段 2 不能改阶段 1 的 JSON。阶段 3 不能改阶段 2 的 JSON。
556
+
557
+ ---
558
+
559
+ ## 九、引用关系
560
+
561
+ ```
562
+ glossary.md(本文件)
563
+ ↓ 被引用
564
+ ├── formulas-skeleton.json(公式 + 区间约束)
565
+ ├── formulas-rhythm.json(联合可行性约束 + 参考节)
566
+ ├── 模板/*.json(enumRef 引本文件枚举;required/type/pattern 由本文件语义约束)
567
+ ├── 脚本 *.js(解析本文件拿枚举与章节号字段清单;不硬编码)
568
+ └── 指导文件 *.md(引用枚举名而非枚举值)
569
+ ```
570
+
571
+ **硬规则**:
572
+ - 每个 enumRef 必须指向本文件定义的枚举
573
+ - 每个枚举值只在第五节定义一次
574
+ - 指导文件不重复枚举值,只引用枚举名
575
+
576
+ ---
577
+
578
+ ## 十、版本记录
579
+
580
+ | 版本 | 变更 |
581
+ |---|---|
582
+ | v1.0 | 初建。定义四阶段边界、术语、ID 前缀、24 个枚举、章节号字段清单、字段归属、生命周期 |
583
+ | v1.1 | 新增 `owner_kind` 枚举(关系模板 item_owner.owner_kind 引用);移除未使用的 `HK` 前缀(钩子不是骨架实体);术语表移除"钩子"实体行 |
584
+ | v1.2 | 新增 `character_defect_type` 枚举(01-character.md §2.2 引用);字段归属总表的血肉字段清单补齐(与当前模板一致);文件数说明以 `references/index.md` 为准 |
585
+ | v1.3 | 第六节新增 `ch` / `turning` / `resolution` 三个单章号字段(节奏模板实际使用,但原清单缺失);第六节加"等价关系"说明;`chapter_count` 标注为"计数"而非"章节号"(骨架/血肉阶段不报错) |