novelws 4.0.0 → 5.0.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 (357) hide show
  1. package/CHANGELOG.md +100 -623
  2. package/README.md +79 -594
  3. package/dist/cli.js +1 -3
  4. package/dist/cli.js.map +1 -1
  5. package/dist/commands/init.d.ts.map +1 -1
  6. package/dist/commands/init.js +12 -99
  7. package/dist/commands/init.js.map +1 -1
  8. package/dist/commands/upgrade.d.ts.map +1 -1
  9. package/dist/commands/upgrade.js +17 -108
  10. package/dist/commands/upgrade.js.map +1 -1
  11. package/dist/core/config.d.ts +1 -37
  12. package/dist/core/config.d.ts.map +1 -1
  13. package/dist/core/config.js +6 -45
  14. package/dist/core/config.js.map +1 -1
  15. package/dist/core/errors.d.ts +0 -31
  16. package/dist/core/errors.d.ts.map +1 -1
  17. package/dist/core/errors.js +0 -58
  18. package/dist/core/errors.js.map +1 -1
  19. package/dist/utils/diagnostics.d.ts +2 -16
  20. package/dist/utils/diagnostics.d.ts.map +1 -1
  21. package/dist/utils/diagnostics.js +5 -72
  22. package/dist/utils/diagnostics.js.map +1 -1
  23. package/dist/utils/project.d.ts +1 -1
  24. package/dist/utils/project.d.ts.map +1 -1
  25. package/dist/utils/project.js +3 -3
  26. package/dist/utils/project.js.map +1 -1
  27. package/package.json +1 -2
  28. package/templates/commands/analyze.md +65 -265
  29. package/templates/commands/expand.md +70 -0
  30. package/templates/commands/plan.md +47 -452
  31. package/templates/commands/specify.md +43 -869
  32. package/templates/commands/write.md +49 -643
  33. package/templates/dot-claude/CLAUDE.md +38 -202
  34. package/templates/resources/anti-ai.md +16 -0
  35. package/templates/resources/style-reference.md +19 -0
  36. package/templates/tracking/character-state.json +1 -76
  37. package/templates/tracking/plot-tracker.json +3 -60
  38. package/templates/tracking/relationships.json +1 -68
  39. package/templates/tracking/timeline.json +1 -47
  40. package/dist/commands/plugin.d.ts +0 -6
  41. package/dist/commands/plugin.d.ts.map +0 -1
  42. package/dist/commands/plugin.js +0 -135
  43. package/dist/commands/plugin.js.map +0 -1
  44. package/dist/plugins/identifier.d.ts +0 -13
  45. package/dist/plugins/identifier.d.ts.map +0 -1
  46. package/dist/plugins/identifier.js +0 -72
  47. package/dist/plugins/identifier.js.map +0 -1
  48. package/dist/plugins/installers/base.d.ts +0 -27
  49. package/dist/plugins/installers/base.d.ts.map +0 -1
  50. package/dist/plugins/installers/base.js +0 -30
  51. package/dist/plugins/installers/base.js.map +0 -1
  52. package/dist/plugins/installers/github.d.ts +0 -22
  53. package/dist/plugins/installers/github.d.ts.map +0 -1
  54. package/dist/plugins/installers/github.js +0 -133
  55. package/dist/plugins/installers/github.js.map +0 -1
  56. package/dist/plugins/installers/local.d.ts +0 -16
  57. package/dist/plugins/installers/local.d.ts.map +0 -1
  58. package/dist/plugins/installers/local.js +0 -69
  59. package/dist/plugins/installers/local.js.map +0 -1
  60. package/dist/plugins/installers/npm.d.ts +0 -20
  61. package/dist/plugins/installers/npm.d.ts.map +0 -1
  62. package/dist/plugins/installers/npm.js +0 -99
  63. package/dist/plugins/installers/npm.js.map +0 -1
  64. package/dist/plugins/manager.d.ts +0 -77
  65. package/dist/plugins/manager.d.ts.map +0 -1
  66. package/dist/plugins/manager.js +0 -349
  67. package/dist/plugins/manager.js.map +0 -1
  68. package/dist/plugins/registry.d.ts +0 -48
  69. package/dist/plugins/registry.d.ts.map +0 -1
  70. package/dist/plugins/registry.js +0 -111
  71. package/dist/plugins/registry.js.map +0 -1
  72. package/dist/plugins/types.d.ts +0 -66
  73. package/dist/plugins/types.d.ts.map +0 -1
  74. package/dist/plugins/types.js +0 -2
  75. package/dist/plugins/types.js.map +0 -1
  76. package/dist/plugins/validator.d.ts +0 -19
  77. package/dist/plugins/validator.d.ts.map +0 -1
  78. package/dist/plugins/validator.js +0 -164
  79. package/dist/plugins/validator.js.map +0 -1
  80. package/dist/utils/logger.d.ts +0 -13
  81. package/dist/utils/logger.d.ts.map +0 -1
  82. package/dist/utils/logger.js +0 -48
  83. package/dist/utils/logger.js.map +0 -1
  84. package/plugins/authentic-voice/README.md +0 -31
  85. package/plugins/authentic-voice/commands/authentic-voice.md +0 -73
  86. package/plugins/authentic-voice/commands/authenticity-audit.md +0 -37
  87. package/plugins/authentic-voice/config.yaml +0 -30
  88. package/plugins/authentic-voice/experts/authentic-editor.md +0 -27
  89. package/plugins/export/README.md +0 -319
  90. package/plugins/export/commands/export.md +0 -460
  91. package/plugins/export/commands/generate-cover.md +0 -256
  92. package/plugins/export/commands/metadata.md +0 -309
  93. package/plugins/export/config.yaml +0 -47
  94. package/plugins/export/experts/publishing-expert.md +0 -171
  95. package/plugins/export/templates/epub/chapter-template.html +0 -13
  96. package/plugins/export/templates/epub/cover-template.html +0 -14
  97. package/plugins/export/templates/epub/stylesheet.css +0 -200
  98. package/plugins/export/templates/pdf/ebook-style.css +0 -137
  99. package/plugins/export/templates/pdf/print-style.css +0 -179
  100. package/plugins/export/templates/platforms/jinjiang-format.md +0 -101
  101. package/plugins/export/templates/platforms/qidian-format.md +0 -108
  102. package/plugins/export/templates/platforms/tomato-format.md +0 -95
  103. package/plugins/translate/README.md +0 -265
  104. package/plugins/translate/commands/glossary.md +0 -731
  105. package/plugins/translate/commands/translate-preview.md +0 -543
  106. package/plugins/translate/commands/translate.md +0 -649
  107. package/plugins/translate/config.yaml +0 -43
  108. package/plugins/translate/experts/literary-translator.md +0 -605
  109. package/templates/commands/character.md +0 -287
  110. package/templates/commands/checklist.md +0 -744
  111. package/templates/commands/clarify.md +0 -269
  112. package/templates/commands/constitution.md +0 -269
  113. package/templates/commands/expert.md +0 -188
  114. package/templates/commands/facts.md +0 -552
  115. package/templates/commands/guide.md +0 -900
  116. package/templates/commands/help-me.md +0 -221
  117. package/templates/commands/recap.md +0 -748
  118. package/templates/commands/relations.md +0 -385
  119. package/templates/commands/revise.md +0 -450
  120. package/templates/commands/search.md +0 -531
  121. package/templates/commands/tasks.md +0 -396
  122. package/templates/commands/timeline.md +0 -309
  123. package/templates/commands/track-init.md +0 -149
  124. package/templates/commands/track.md +0 -704
  125. package/templates/commands/volume-summary.md +0 -471
  126. package/templates/knowledge/audit-config.json +0 -26
  127. package/templates/knowledge/character-profiles.md +0 -152
  128. package/templates/knowledge/character-voices.md +0 -137
  129. package/templates/knowledge/locations.md +0 -184
  130. package/templates/knowledge/world-setting.md +0 -121
  131. package/templates/resources/character-archetypes/01-hero.md +0 -233
  132. package/templates/resources/character-archetypes/02-mentor.md +0 -177
  133. package/templates/resources/character-archetypes/03-shadow.md +0 -221
  134. package/templates/resources/character-archetypes/04-ally.md +0 -178
  135. package/templates/resources/character-archetypes/05-shapeshifter.md +0 -177
  136. package/templates/resources/character-archetypes/06-trickster.md +0 -181
  137. package/templates/resources/character-archetypes/07-threshold-guardian.md +0 -177
  138. package/templates/resources/character-archetypes/08-herald.md +0 -180
  139. package/templates/resources/character-archetypes/09-father.md +0 -249
  140. package/templates/resources/character-archetypes/10-mother.md +0 -202
  141. package/templates/resources/character-archetypes/11-child.md +0 -183
  142. package/templates/resources/character-archetypes/12-sage.md +0 -202
  143. package/templates/resources/character-archetypes/README.md +0 -60
  144. package/templates/resources/character-archetypes/application-guide.md +0 -222
  145. package/templates/resources/character-archetypes/archetype-combinations.md +0 -242
  146. package/templates/resources/character-archetypes/config.yaml +0 -28
  147. package/templates/resources/character-archetypes/examples-analysis.md +0 -223
  148. package/templates/resources/config/keyword-mappings.json +0 -226
  149. package/templates/resources/config/specification-example.md +0 -146
  150. package/templates/resources/craft/character-arc.md +0 -1153
  151. package/templates/resources/craft/dialogue.md +0 -1170
  152. package/templates/resources/craft/hook-design.md +0 -345
  153. package/templates/resources/craft/pacing.md +0 -1200
  154. package/templates/resources/craft/power-system.md +0 -254
  155. package/templates/resources/craft/scene-structure.md +0 -1136
  156. package/templates/resources/craft/show-not-tell.md +0 -1012
  157. package/templates/resources/craft/story-structures.md +0 -134
  158. package/templates/resources/craft/tension-management.md +0 -168
  159. package/templates/resources/emotional-beats/01-first-meeting.md +0 -145
  160. package/templates/resources/emotional-beats/02-bonding-moment.md +0 -226
  161. package/templates/resources/emotional-beats/03-declaration.md +0 -284
  162. package/templates/resources/emotional-beats/04-triumph.md +0 -240
  163. package/templates/resources/emotional-beats/05-reunion.md +0 -396
  164. package/templates/resources/emotional-beats/06-forgiveness.md +0 -204
  165. package/templates/resources/emotional-beats/07-betrayal.md +0 -204
  166. package/templates/resources/emotional-beats/08-loss.md +0 -214
  167. package/templates/resources/emotional-beats/09-rejection.md +0 -254
  168. package/templates/resources/emotional-beats/10-failure.md +0 -244
  169. package/templates/resources/emotional-beats/11-misunderstanding.md +0 -205
  170. package/templates/resources/emotional-beats/12-farewell.md +0 -283
  171. package/templates/resources/emotional-beats/13-revelation.md +0 -242
  172. package/templates/resources/emotional-beats/14-point-of-no-return.md +0 -215
  173. package/templates/resources/emotional-beats/15-dark-night.md +0 -244
  174. package/templates/resources/emotional-beats/16-sacrifice.md +0 -246
  175. package/templates/resources/emotional-beats/17-awakening.md +0 -246
  176. package/templates/resources/emotional-beats/18-confrontation.md +0 -217
  177. package/templates/resources/emotional-beats/19-bittersweet-goodbye.md +0 -368
  178. package/templates/resources/emotional-beats/20-moral-dilemma.md +0 -248
  179. package/templates/resources/emotional-beats/21-temptation.md +0 -240
  180. package/templates/resources/emotional-beats/22-redemption.md +0 -210
  181. package/templates/resources/emotional-beats/README.md +0 -104
  182. package/templates/resources/emotional-beats/beat-sequences.md +0 -276
  183. package/templates/resources/emotional-beats/config.yaml +0 -30
  184. package/templates/resources/emotional-beats/pacing-guide.md +0 -390
  185. package/templates/resources/genres/game-lit.md +0 -174
  186. package/templates/resources/genres/historical.md +0 -1127
  187. package/templates/resources/genres/horror.md +0 -211
  188. package/templates/resources/genres/military.md +0 -209
  189. package/templates/resources/genres/mystery.md +0 -1123
  190. package/templates/resources/genres/rebirth.md +0 -177
  191. package/templates/resources/genres/revenge.md +0 -846
  192. package/templates/resources/genres/romance.md +0 -948
  193. package/templates/resources/genres/sci-fi.md +0 -156
  194. package/templates/resources/genres/sports.md +0 -216
  195. package/templates/resources/genres/thriller.md +0 -166
  196. package/templates/resources/genres/urban.md +0 -170
  197. package/templates/resources/genres/workplace.md +0 -214
  198. package/templates/resources/genres/wuxia.md +0 -143
  199. package/templates/resources/genres/xuanhuan.md +0 -234
  200. package/templates/resources/genres/youth.md +0 -219
  201. package/templates/resources/memory/personal-voice.md +0 -113
  202. package/templates/resources/references/README.md +0 -96
  203. package/templates/resources/references/china-1920s/culture.md +0 -423
  204. package/templates/resources/references/china-1920s/daily-life.md +0 -616
  205. package/templates/resources/references/china-1920s/overview.md +0 -298
  206. package/templates/resources/references/china-1920s/society.md +0 -703
  207. package/templates/resources/references/china-1920s/warlords.md +0 -427
  208. package/templates/resources/references/cultivation-world/daily-life.md +0 -108
  209. package/templates/resources/references/cultivation-world/overview.md +0 -64
  210. package/templates/resources/references/cultivation-world/power-system.md +0 -108
  211. package/templates/resources/references/cultivation-world/sects.md +0 -104
  212. package/templates/resources/references/cultivation-world/world-setting.md +0 -108
  213. package/templates/resources/references/modern-workplace/corporate.md +0 -115
  214. package/templates/resources/references/modern-workplace/daily-life.md +0 -129
  215. package/templates/resources/references/modern-workplace/overview.md +0 -73
  216. package/templates/resources/references/modern-workplace/relationships.md +0 -107
  217. package/templates/resources/references/modern-workplace/tech-industry.md +0 -131
  218. package/templates/resources/references/tang-dynasty/culture.md +0 -135
  219. package/templates/resources/references/tang-dynasty/daily-life.md +0 -139
  220. package/templates/resources/references/tang-dynasty/overview.md +0 -76
  221. package/templates/resources/references/tang-dynasty/politics.md +0 -121
  222. package/templates/resources/references/tang-dynasty/society.md +0 -126
  223. package/templates/resources/requirements/README.md +0 -240
  224. package/templates/resources/requirements/anti-ai-v3.md +0 -46
  225. package/templates/resources/requirements/anti-ai-v4-deprecated.md +0 -442
  226. package/templates/resources/requirements/anti-ai-v5-balanced.md +0 -203
  227. package/templates/resources/requirements/concretization.md +0 -90
  228. package/templates/resources/requirements/fast-paced.md +0 -552
  229. package/templates/resources/requirements/no-poison.md +0 -60
  230. package/templates/resources/requirements/romance-angst.md +0 -102
  231. package/templates/resources/requirements/romance-sweet.md +0 -63
  232. package/templates/resources/requirements/serious-literature.md +0 -45
  233. package/templates/resources/requirements/strong-emotion.md +0 -60
  234. package/templates/resources/scripts/README.md +0 -187
  235. package/templates/resources/scripts/bash/analyze-story.sh +0 -170
  236. package/templates/resources/scripts/bash/check-analyze-stage.sh +0 -108
  237. package/templates/resources/scripts/bash/check-consistency.sh +0 -463
  238. package/templates/resources/scripts/bash/check-facts.sh +0 -214
  239. package/templates/resources/scripts/bash/check-plot.sh +0 -374
  240. package/templates/resources/scripts/bash/check-timeline.sh +0 -346
  241. package/templates/resources/scripts/bash/check-world.sh +0 -395
  242. package/templates/resources/scripts/bash/check-writing-state.sh +0 -854
  243. package/templates/resources/scripts/bash/clarify-story.sh +0 -117
  244. package/templates/resources/scripts/bash/common.sh +0 -151
  245. package/templates/resources/scripts/bash/constitution.sh +0 -114
  246. package/templates/resources/scripts/bash/generate-tasks.sh +0 -65
  247. package/templates/resources/scripts/bash/init-tracking.sh +0 -183
  248. package/templates/resources/scripts/bash/manage-relations.sh +0 -174
  249. package/templates/resources/scripts/bash/migrate-tracking.sh +0 -183
  250. package/templates/resources/scripts/bash/plan-story.sh +0 -100
  251. package/templates/resources/scripts/bash/specify-story.sh +0 -93
  252. package/templates/resources/scripts/bash/tasks-story.sh +0 -96
  253. package/templates/resources/scripts/bash/test-word-count.sh +0 -182
  254. package/templates/resources/scripts/bash/tests/bench-preload-cache.sh +0 -100
  255. package/templates/resources/scripts/bash/tests/run-all-benchmarks.sh +0 -16
  256. package/templates/resources/scripts/bash/tests/test-cache-semantics.sh +0 -199
  257. package/templates/resources/scripts/bash/tests/test-cross-platform.sh +0 -35
  258. package/templates/resources/scripts/bash/tests/test-edge-cases-bash.sh +0 -60
  259. package/templates/resources/scripts/bash/tests/test-phase1-bash.sh +0 -28
  260. package/templates/resources/scripts/bash/tests/test-preload-cache.sh +0 -123
  261. package/templates/resources/scripts/bash/tests/test-regex-precompile.sh +0 -89
  262. package/templates/resources/scripts/bash/tests/test-regression-bash.sh +0 -42
  263. package/templates/resources/scripts/bash/tests/test-task6-verification.sh +0 -200
  264. package/templates/resources/scripts/bash/text-audit.sh +0 -144
  265. package/templates/resources/scripts/bash/track-progress.sh +0 -194
  266. package/templates/resources/scripts/powershell/analyze-story.ps1 +0 -174
  267. package/templates/resources/scripts/powershell/check-analyze-stage.ps1 +0 -110
  268. package/templates/resources/scripts/powershell/check-consistency.ps1 +0 -138
  269. package/templates/resources/scripts/powershell/check-facts.ps1 +0 -195
  270. package/templates/resources/scripts/powershell/check-plot.ps1 +0 -139
  271. package/templates/resources/scripts/powershell/check-timeline.ps1 +0 -112
  272. package/templates/resources/scripts/powershell/check-writing-state.ps1 +0 -486
  273. package/templates/resources/scripts/powershell/clarify-story.ps1 +0 -107
  274. package/templates/resources/scripts/powershell/common.ps1 +0 -36
  275. package/templates/resources/scripts/powershell/constitution.ps1 +0 -145
  276. package/templates/resources/scripts/powershell/generate-tasks.ps1 +0 -70
  277. package/templates/resources/scripts/powershell/init-tracking.ps1 +0 -98
  278. package/templates/resources/scripts/powershell/manage-relations.ps1 +0 -134
  279. package/templates/resources/scripts/powershell/migrate-tracking.ps1 +0 -145
  280. package/templates/resources/scripts/powershell/plan-story.ps1 +0 -99
  281. package/templates/resources/scripts/powershell/specify-story.ps1 +0 -85
  282. package/templates/resources/scripts/powershell/tests/bench-ps-cache.ps1 +0 -80
  283. package/templates/resources/scripts/powershell/tests/test-cross-platform.ps1 +0 -27
  284. package/templates/resources/scripts/powershell/tests/test-edge-cases-ps.ps1 +0 -29
  285. package/templates/resources/scripts/powershell/tests/test-phase1-ps.ps1 +0 -28
  286. package/templates/resources/scripts/powershell/tests/test-ps-cache.ps1 +0 -73
  287. package/templates/resources/scripts/powershell/tests/test-regression-ps.ps1 +0 -40
  288. package/templates/resources/scripts/powershell/text-audit.ps1 +0 -102
  289. package/templates/resources/scripts/powershell/track-progress.ps1 +0 -105
  290. package/templates/resources/styles/README.md +0 -302
  291. package/templates/resources/styles/ancient-style.md +0 -579
  292. package/templates/resources/styles/literary.md +0 -439
  293. package/templates/resources/styles/minimal.md +0 -472
  294. package/templates/resources/styles/natural-voice.md +0 -930
  295. package/templates/resources/styles/web-novel.md +0 -525
  296. package/templates/skills/analysis/character-analysis/SKILL.md +0 -71
  297. package/templates/skills/analysis/foreshadow-analysis/SKILL.md +0 -45
  298. package/templates/skills/analysis/hook-analysis/SKILL.md +0 -111
  299. package/templates/skills/analysis/logic-analysis/SKILL.md +0 -58
  300. package/templates/skills/analysis/opening-analysis/SKILL.md +0 -59
  301. package/templates/skills/analysis/pacing-analysis/SKILL.md +0 -55
  302. package/templates/skills/analysis/power-analysis/SKILL.md +0 -148
  303. package/templates/skills/analysis/reader-analysis/SKILL.md +0 -117
  304. package/templates/skills/analysis/style-analysis/SKILL.md +0 -60
  305. package/templates/skills/analysis/voice-analysis/SKILL.md +0 -42
  306. package/templates/skills/auto-tracking/SKILL.md +0 -280
  307. package/templates/skills/genre-knowledge/fantasy/SKILL.md +0 -355
  308. package/templates/skills/genre-knowledge/mystery/SKILL.md +0 -337
  309. package/templates/skills/genre-knowledge/romance/SKILL.md +0 -228
  310. package/templates/skills/genre-knowledge/sci-fi/SKILL.md +0 -65
  311. package/templates/skills/genre-knowledge/thriller/SKILL.md +0 -95
  312. package/templates/skills/planning/volume-detail/SKILL.md +0 -219
  313. package/templates/skills/quality-assurance/consistency-checker/SKILL.md +0 -412
  314. package/templates/skills/quality-assurance/continuity-tracker/SKILL.md +0 -157
  315. package/templates/skills/quality-assurance/facts-checker/SKILL.md +0 -405
  316. package/templates/skills/quality-assurance/forgotten-elements/SKILL.md +0 -147
  317. package/templates/skills/quality-assurance/getting-started/SKILL.md +0 -224
  318. package/templates/skills/quality-assurance/hook-checker/SKILL.md +0 -164
  319. package/templates/skills/quality-assurance/hook-checker/experts/hook-analyst.md +0 -33
  320. package/templates/skills/quality-assurance/long-series-continuity/SKILL.md +0 -570
  321. package/templates/skills/quality-assurance/pacing-monitor/SKILL.md +0 -143
  322. package/templates/skills/quality-assurance/pov-validator/SKILL.md +0 -135
  323. package/templates/skills/quality-assurance/pre-write-checklist/SKILL.md +0 -583
  324. package/templates/skills/quality-assurance/requirement-detector/CONFLICT_RESOLUTION.md +0 -119
  325. package/templates/skills/quality-assurance/requirement-detector/EXAMPLES.md +0 -146
  326. package/templates/skills/quality-assurance/requirement-detector/KEYWORDS.md +0 -160
  327. package/templates/skills/quality-assurance/requirement-detector/SKILL.md +0 -149
  328. package/templates/skills/quality-assurance/setting-detector/SKILL.md +0 -611
  329. package/templates/skills/quality-assurance/style-detector/CONFLICT_RESOLUTION.md +0 -126
  330. package/templates/skills/quality-assurance/style-detector/EXAMPLES.md +0 -206
  331. package/templates/skills/quality-assurance/style-detector/KEYWORDS.md +0 -207
  332. package/templates/skills/quality-assurance/style-detector/SKILL.md +0 -264
  333. package/templates/skills/quality-assurance/voice-consistency-checker/SKILL.md +0 -103
  334. package/templates/skills/quality-assurance/voice-consistency-checker/experts/voice-analyst.md +0 -21
  335. package/templates/skills/quality-assurance/workflow-guide/SKILL.md +0 -381
  336. package/templates/skills/writing-techniques/character-arc/SKILL.md +0 -267
  337. package/templates/skills/writing-techniques/dialogue-techniques/SKILL.md +0 -366
  338. package/templates/skills/writing-techniques/multi-thread-narrative/SKILL.md +0 -708
  339. package/templates/skills/writing-techniques/multi-thread-narrative/experts/thread-analyst.md +0 -226
  340. package/templates/skills/writing-techniques/pacing-control/SKILL.md +0 -480
  341. package/templates/skills/writing-techniques/reader-expectation/SKILL.md +0 -1026
  342. package/templates/skills/writing-techniques/reader-expectation/experts/expectation-analyst.md +0 -209
  343. package/templates/skills/writing-techniques/revision-polish/SKILL.md +0 -496
  344. package/templates/skills/writing-techniques/revision-polish/experts/revision-editor.md +0 -221
  345. package/templates/skills/writing-techniques/scene-structure/SKILL.md +0 -361
  346. package/templates/skills/writing-techniques/style-learning/SKILL.md +0 -436
  347. package/templates/skills/writing-techniques/writing-balance/.gitkeep +0 -0
  348. package/templates/skills/writing-techniques/writing-balance/SKILL.md +0 -460
  349. package/templates/skills/writing-techniques/writing-techniques/SKILL.md +0 -727
  350. package/templates/tracking/story-facts.json +0 -5
  351. package/templates/tracking/summary/characters-summary.json +0 -7
  352. package/templates/tracking/summary/plot-summary.json +0 -13
  353. package/templates/tracking/summary/timeline-summary.json +0 -8
  354. package/templates/tracking/summary/volume-summaries.json +0 -5
  355. package/templates/tracking/tracking-log.md +0 -110
  356. package/templates/tracking/validation-rules.json +0 -128
  357. /package/templates/resources/{memory/constitution.md → constitution.md} +0 -0
@@ -1,673 +1,79 @@
1
1
  ---
2
- description: 基于任务清单执行章节写作,自动加载上下文和验证规则
3
- argument-hint: [章节编号或任务ID] [--fast] [--batch N] [--volume vol-XX]
4
- recommended-model: claude-opus-4-6 # 创作质量最高;--fast 时可用 sonnet
5
- allowed-tools: Read(//**), Write(//stories/**/content/**), Bash(ls:*), Bash(find:*), Bash(wc:*), Bash(grep:*), Bash(*)
6
- scripts:
7
- sh: resources/scripts/bash/check-writing-state.sh
8
- ps: resources/scripts/powershell/check-writing-state.ps1
2
+ description: 逐章生成剧情概要(200-500字),同步更新 tracking
3
+ argument-hint: [章节号] [--batch N]
4
+ recommended-model: claude-opus-4-6
5
+ allowed-tools: Read(//stories/**), Write(//stories/**/content/**), Read(//tracking/**), Write(//tracking/**), Bash(ls:*)
9
6
  ---
10
7
 
11
- 基于七步方法论流程执行章节写作。
8
+ 用户输入:$ARGUMENTS
12
9
 
13
- ---
14
-
15
- ## 自动激活的Skills
16
-
17
- 本命令自动激活以下Skills:
18
-
19
- 1. **writing-balance** - 智能写作平衡监控
20
- - 文件: @templates/skills/writing-techniques/writing-balance/SKILL.md
21
- - 功能: 写作完成后自动评估6个维度平衡度
22
- - 输出: 平衡度评估报告 + 改进建议
23
-
24
- 2. **writing-techniques** - 写作技巧教学
25
- - 文件: @templates/skills/writing-techniques/writing-techniques/SKILL.md
26
- - 功能: 应用8个模块的写作技巧
27
- - 效果: 提升文字自然度、层次感、节奏变化
28
-
29
- **说明**:
30
- - 这两个Skills协同工作,替代了旧的 anti-ai-v4 禁止列表
31
- - 用户无需手动激活,AI会自动应用
32
- - 如需自定义配置,可在 specification.md 中添加 `writing_balance_config`
33
-
34
- ---
35
-
36
- ## 写作前准备(推荐)
37
-
38
- 如果距离上次写作已超过 1 天,或已写超过 30 章:
39
- - 执行 `/recap` 重建上下文
40
- - 快速扫描简报中的关键信息和警告
41
-
42
- **快速模式**:使用 `/recap --brief` 获取快速参考卡片。
43
-
44
- ---
45
-
46
- ## 前置检查
47
-
48
- 1. **运行脚本** `{SCRIPT}` 检查创作状态
49
- 2. **解析资源加载报告**
50
-
51
- 运行脚本并获取 JSON 格式的资源加载报告:
52
-
53
- ```bash
54
- # Bash 环境
55
- bash {SCRIPT} --json
56
-
57
- # PowerShell 环境
58
- powershell -File {SCRIPT} -Json
59
- ```
60
-
61
- **报告格式**(JSON):
62
- ```json
63
- {
64
- "status": "ready",
65
- "resources": {
66
- "knowledge-base": ["craft/dialogue.md", "craft/pacing.md"],
67
- "skills": ["writing-techniques/dialogue-techniques"],
68
- "disabled": []
69
- },
70
- "warnings": []
71
- }
72
- ```
73
-
74
- **处理逻辑**:
75
- 1. `status` 不是 "ready" → 终止执行
76
- 2. `warnings` 非空 → 显示警告但继续
77
- 3. 按顺序加载 `resources.knowledge-base` 和 `resources.skills`
78
- 4. 跳过 `resources.disabled` 中的资源
79
-
80
- ### 增量缓存加载(性能优化核心)
81
-
82
- ⚠️ **此机制大幅减少重复加载,连续写作时跳过未变化的资源。**
83
-
84
- **步骤 0: 检查缓存**
85
-
86
- ```
87
- 1. 读取 .claude/.cache/resource-digest.json
88
- ├─ 不存在 → 首次加载(全量),生成 digest + context
89
- └─ 存在 → 进入增量检查
90
-
91
- 2. 对比每个已缓存文件的 mtime(用 Bash stat 命令)
92
- ├─ 全部未变 → 直接复用 .claude/.cache/write-context.json,跳到 L0 加载
93
- └─ 有变化 → 只重新读取变化的文件
94
-
95
- 3. 更新 write-context.json 中变化的部分
96
- ├─ L1 文件变化 → 重新生成该文件的摘要(200-300字)
97
- └─ L2 文件变化 → 重新缓存全文
98
-
99
- 4. 写回更新后的 resource-digest.json + write-context.json
100
- ```
101
-
102
- **资源分级**:
103
-
104
- | 级别 | 内容 | 策略 |
105
- |------|------|------|
106
- | L0 必读 | tasks.md、上一章最后500字、当前活跃角色 | 每次读取全文,不缓存 |
107
- | L1 摘要 | constitution.md、specification.md、creative-plan.md、plot-tracker.json、relationships.json | 首次读全文生成摘要,后续只在 mtime 变化时重新生成 |
108
- | L2 按需 | craft/、genres/、styles/、requirements/、skills/ | 仅在关键词触发或配置指定时加载,加载后缓存全文 |
109
-
110
- **缓存复用判定**:
111
- - 如果 `write-context.json` 存在且 `digest_version` 与 `resource-digest.json` 的 `version` 一致 → 复用 L1 摘要 + L2 缓存
112
- - 如果 `digest_version` 不一致 → 全量重建
113
- - 用户删除 `.claude/.cache/` → 下次全量重建
114
-
115
- **首次加载(无缓存)**:按下方完整查询协议执行,完成后生成两个缓存文件。
116
-
117
- **后续加载(有缓存且未过期)**:
118
- 1. 直接使用 `write-context.json` 中的 `l1_summaries` 作为 L1 上下文
119
- 2. 直接使用 `l2_loaded` 中的缓存资源
120
- 3. 仅实时加载 L0 资源(tasks.md、上一章、活跃角色)
121
- 4. 合并 L0 + L1 缓存 + L2 缓存 → 进入写作
122
-
123
- ---
124
-
125
- ### 查询协议(必读顺序 + 三层资源加载)
126
-
127
- ⚠️ **严格按以下顺序查询文档**(首次加载或缓存失效时执行完整流程):
128
-
129
- 1. **先查(最高优先级)**【L1 — 缓存摘要】:
130
- - `memory/constitution.md`(创作宪法)
131
- - `memory/personal-voice.md`(个人风格指南 - 如有)
132
- - `memory/style-reference.md`(风格参考 - 如有)
133
-
134
- 2. **再查(规格和计划)**【L1 — 缓存摘要】:
135
- - `stories/*/specification.md`(故事规格)
136
- - `stories/*/creative-plan.md`(创作计划)
137
- - `stories/*/tasks.md`(当前任务)【L0 — 每次必读】
138
-
139
- 2.1. **风格学习前置检查**:
140
- - 如果 `memory/personal-voice.md` 不存在且已写 ≥ 3 章,提示用户执行 `/style-learning`
141
-
142
- 2.5. **自动加载写作风格和规范(基于配置)**:
143
- - 读取 `specification.md` 的 YAML frontmatter
144
- - 如配置了 `writing-style`,加载 `resources/styles/[name].md`
145
- - 如配置了 `writing-requirements`,加载对应规范文档
146
-
147
- 2.6. **第三层智能资源加载(三层机制)**
148
-
149
- **优先级顺序**: Layer 2 配置覆盖 > Layer 1 默认推断 > Layer 3 关键词触发
150
-
151
- #### Layer 1: 默认智能推断
152
-
153
- 如果 specification.md 未配置 `resource-loading`,自动加载:
154
-
155
- **Knowledge-base (craft)**:
156
- - `resources/craft/dialogue.md`
157
- - `resources/craft/scene-structure.md`
158
- - `resources/craft/character-arc.md`
159
- - `resources/craft/pacing.md`
160
- - `resources/craft/show-not-tell.md`
161
-
162
- **Skills (writing-techniques)**:
163
- - `templates/skills/writing-techniques/dialogue-techniques/SKILL.md`
164
- - `templates/skills/writing-techniques/scene-structure/SKILL.md`
165
- - `templates/skills/writing-techniques/character-arc/SKILL.md`
166
- - `templates/skills/writing-techniques/pacing-control/SKILL.md`
167
-
168
- #### Layer 2: 配置覆盖
169
-
170
- 如果 specification.md 配置了 `resource-loading`,使用配置覆盖默认推断:
171
-
172
- ```yaml
173
- ---
174
- resource-loading:
175
- auto-load: true
176
- knowledge-base:
177
- craft:
178
- - dialogue
179
- - pacing
180
- - "!character-arc" # ! 前缀排除
181
- skills:
182
- writing-techniques:
183
- - dialogue-techniques
184
- keyword-triggers:
185
- enabled: true
186
- custom-mappings:
187
- "情感节奏": "knowledge-base/craft/pacing.md"
188
- ---
189
- ```
190
-
191
- #### Layer 3: 运行时关键词触发(动态加载)
192
-
193
- **触发时机**: 命令参数、任务描述、用户输入中的关键词
194
-
195
- **检查配置**: 读取 `specification.md` 的 `resource-loading.keyword-triggers`
196
-
197
- **执行流程**:
198
- 1. 收集待扫描文本(命令参数 + 任务描述 + 用户输入)
199
- 2. 读取 `resources/config/keyword-mappings.json` 映射表
200
- 3. 合并 specification.md 中的自定义映射
201
- 4. 执行关键词匹配,跳过已加载资源
202
- 5. 如有匹配,提示用户确认加载:
203
-
204
- ```
205
- 🔍 **关键词触发检测**
206
-
207
- 检测到以下关键词,建议加载相关资源:
208
- 1. **"节奏"** → 节奏控制 (pacing)
209
- - 知识库: craft/pacing.md
210
- - 技巧: writing-techniques/pacing-control
211
-
212
- 是否加载这些资源? [Y] 全部加载 [N] 跳过 [S] 选择性加载
213
- ```
214
-
215
- > **性能优化**:参见 CLAUDE.md 中的「会话级资源复用」章节。
216
-
217
- 3. **再查(状态和数据 — 三层 Fallback)**【L0/L1 混合】:
218
-
219
- 按以下优先级加载 tracking 数据:
220
-
221
- **Layer 1: MCP 查询(优先)**【L0 — 每次查询】
222
- - `query_characters --status=active --limit=20` → 活跃角色
223
- - `query_relationships --volume=[当前卷号]` → 当前卷关系
224
- - `query_plot --status=active` → 活跃伏笔
225
- - `query_facts` → 设定事实
226
- - 如果指定了 `--volume vol-XX`,所有查询限定到该卷
227
-
228
- **Layer 2: 分片 JSON(次优,检测 tracking/volumes/ 是否存在)**【L1 — 缓存摘要】
229
- - 确定当前章节属于哪个卷(从 volume-summaries.json 的 chapters 范围判断)
230
- - 读取该卷的分片文件:`tracking/volumes/[currentVolume]/character-state.json` 等
231
- - 读取全局摘要:`tracking/summary/characters-summary.json`(活跃角色概览)
232
-
233
- **Layer 3: 单文件 JSON(兜底,现有逻辑)**【L1 — 缓存摘要】
234
- - `tracking/character-state.json`(角色状态)
235
- - `tracking/relationships.json`(关系网络)
236
- - `tracking/plot-tracker.json`(情节追踪 - 如有)
237
- - `tracking/validation-rules.json`(验证规则 - 如有)
238
- - `tracking/story-facts.json`(设定事实 - 如有)
239
-
240
- **📋 本章引用的设定事实**(如当前章节已有 `<!-- story-facts: ... -->` 注释):
241
-
242
- - 解析注释头,提取声明的 fact ID 列表
243
- - 从 `story-facts.json` 加载这些事实的当前值
244
- - 展示为写作参考:
245
-
246
- ```
247
- 📋 本章引用的设定事实(来自 story-facts.json):
248
-
249
- - finance-monthly-deficit: 宗门月亏损 = 1000灵石
250
- - finance-reserve: 灵石储备 = 5000灵石
251
- - finance-runway: 储备可撑月数 = 5月
252
-
253
- ⚠️ 写作时请确保上述数值与正文一致。
254
- ```
255
-
256
- - **快写模式(--fast)**: 跳过详细展示,但保留数据加载
257
-
258
- 4. **再查(知识库)**【L2 — 按需缓存】:
259
- - `resources/knowledge/` 相关文件(世界观、角色档案等)
260
- - `stories/*/content/`(前文内容 - 了解前情)
261
-
262
- 5. **再查(写作规范)**【L2 — 按需缓存】:
263
- - `memory/personal-voice.md`(个人语料 - 如有)
264
- - `resources/knowledge/natural-expression.md`(自然化表达 - 如有)
265
- - **⚠️ 必须加载**:`resources/requirements/anti-ai-v4.md`(禁用词与替换策略权威参考)
266
-
267
- 6. **条件查询(前三章专用)**:
268
- - **如果章节编号 ≤ 3 或总字数 < 10000字**,额外查询 `resources/presets/golden-opening.md`
269
-
270
- ### ⚠️ 强制完成确认
271
-
272
- **在开始写作前,必须列出已读取的核心文件**:
273
-
274
- ```markdown
275
- 📋 写作前检查清单(已完成):
276
-
277
- ✓ 1. memory/constitution.md - 创作宪法
278
- ✓ 2. stories/*/specification.md - 故事规格
279
- ✓ 3. stories/*/creative-plan.md - 创作计划
280
- ✓ 4. stories/*/tasks.md - 当前任务
281
- ✓ 5. tracking/ - 角色状态、关系、情节
282
-
283
- 🆕 三层资源加载:
284
- ✓ Layer 1-3 加载完成
285
- ✓ 已加载资源清单:[列出]
286
-
287
- 📊 上下文加载状态:✅ 完成
288
- ```
289
-
290
- ⚠️ **禁止跳过此步骤**:这是防止AI在长篇创作中失焦的核心机制。
291
-
292
- ### 缓存写回
293
-
294
- **首次加载或有文件变化时**,将加载结果写入缓存:
295
-
296
- 1. **生成 resource-digest.json**:记录所有已读文件的 mtime 和 size
297
- ```json
298
- {
299
- "version": 1,
300
- "updated_at": "[ISO时间]",
301
- "files": {
302
- "resources/memory/constitution.md": { "mtime": [毫秒时间戳], "size": [字节] },
303
- "tracking/character-state.json": { "mtime": [毫秒时间戳], "size": [字节] }
304
- }
305
- }
306
- ```
307
-
308
- 2. **生成 write-context.json**:保存 L1 摘要和 L2 缓存状态
309
- ```json
310
- {
311
- "version": 1,
312
- "story": "[故事目录名]",
313
- "last_chapter": [章节号],
314
- "generated_at": "[ISO时间]",
315
- "digest_version": 1,
316
- "context": {
317
- "l1_summaries": {
318
- "constitution": "[200字摘要]",
319
- "specification": "[300字摘要]",
320
- "creative_plan": "[200字摘要]",
321
- "active_plots": [{"id": "", "name": "", "status": "", "progress": ""}],
322
- "active_relationships": [{"from": "", "to": "", "type": "", "tension": ""}]
323
- },
324
- "l2_loaded": {
325
- "resources/craft/dialogue.md": "已缓存",
326
- "resources/requirements/anti-ai-v5-balanced.md": "已缓存"
327
- }
328
- }
329
- }
330
- ```
331
-
332
- 3. 使用 `Write` 工具写入 `.claude/.cache/resource-digest.json` 和 `.claude/.cache/write-context.json`
10
+ ## 目标
333
11
 
334
- <!-- PLUGIN_HOOK: genre-knowledge-write -->
12
+ 为指定章节生成 200-500 字的纯剧情概要,同步生成 tracking 骨架数据。
335
13
 
336
- ---
337
-
338
- ## 🚀 快写模式(`--fast`)
339
-
340
- **触发条件**:用户参数 `$ARGUMENTS` 包含 `--fast`
341
-
342
- **快写模式流程**:
343
-
344
- ### Fast-1. 最小资源加载
345
-
346
- **仅加载以下 3 项**(跳过三层资源加载):
347
- 1. **当前任务**:`stories/*/tasks.md` 中 `pending` 或 `in_progress` 的任务
348
- 2. **上一章内容**:最近完成的章节文件(最后 500 字)
349
- 3. **角色状态**:`tracking/character-state.json`(仅当前活跃角色)
350
-
351
- ### Fast-2. 极简写作提醒
352
-
353
- ```
354
- 📍 快写模式
355
- ━━━━━━━━━━━━━━━━━━━━
356
- 📋 任务:[当前任务标题]
357
- 📖 上章结尾:[一句话概括]
358
- 👤 在场角色:[角色列表]
359
- ━━━━━━━━━━━━━━━━━━━━
360
- ⚡ 直接开始写作
361
- 💡 如需完整上下文,请使用 /write(不带 --fast)
362
- ```
363
-
364
- ### Fast-3. 直接进入写作
365
-
366
- 跳过详细提醒,但仍遵守段落结构规范、反 AI 规范。
367
-
368
- ### Fast-4. 完整后置处理
14
+ ## 参数解析
369
15
 
370
- 写作完成后仍执行完整的后置处理(与正常模式相同)。
16
+ - 章节号:从 $ARGUMENTS 提取,如 `1`、`42`
17
+ - `--batch N`:批量生成 N 章概要(最大 20),从指定章节号开始
371
18
 
372
- ---
373
-
374
- > ⚠️ **以下为正常模式流程**(`--fast` 模式跳过以下内容)
375
-
376
- ## 断点续写机制
19
+ ## 资源加载(极简)
377
20
 
378
- ### 恢复检测
21
+ 1. **specification.md 摘要**:读取 `stories/<story>/specification.md`,提取100字核心摘要(类型+主角+核心冲突)
22
+ 2. **当前卷大纲**:读取 `stories/<story>/creative-plan.md`,只提取当前章节所属卷的段落
23
+ 3. **前序概要标题列表**:扫描 `stories/<story>/content/chapter-*-synopsis.md`,只读取每个文件的第一行标题
24
+ 4. **前一章概要全文**:读取前一章的 synopsis.md(200-500字)
379
25
 
380
- 在开始写作前,检查 `tracking/write-checkpoint.json`:
381
- - 如存在且 `status` 为 `in_progress` 且未过期(24小时内)→ 提示恢复
382
- - 用户选择「继续写作」→ 从断点恢复
383
- - 用户选择「重新开始」→ 删除 checkpoint,正常流程
26
+ **不加载**:resources 目录任何文件、tracking 文件(写入时直接追加)
384
27
 
385
- ### 断点恢复流程
28
+ ## 执行步骤
386
29
 
387
- 1. **跳过资源加载**:使用 checkpoint 中的 `loadedResources` 列表
388
- 2. **恢复上下文**:读取已写内容,验证 hash
389
- 3. **从断点继续**:从已写内容末尾继续创作
30
+ ### 1. 确定故事目录和章节号
390
31
 
391
- ### 断点保存时机
32
+ $ARGUMENTS 和 `stories/` 目录确定当前故事和目标章节。
392
33
 
393
- - 每完成一个场景/段落组后(约 500-1000 字)
394
- - 用户主动中断时
395
- - 写作完成时:`status` 更新为 `completed`
34
+ ### 2. 加载上下文
396
35
 
397
- ### Checkpoint 数据结构
398
-
399
- ```json
400
- {
401
- "version": "1.0",
402
- "storyDir": "[故事目录名]",
403
- "chapter": { "number": "[章节编号]", "title": "[标题]", "taskId": "[任务ID]" },
404
- "progress": { "status": "in_progress", "wordsWritten": 0, "targetWords": 3000 },
405
- "context": { "loadedResources": [], "charactersFocused": [], "currentTask": "" },
406
- "content": { "filePath": "", "contentHash": "" },
407
- "timestamps": { "createdAt": "", "updatedAt": "", "expiresAt": "" }
408
- }
409
- ```
410
-
411
- ---
36
+ 按上述「资源加载」规则加载最小上下文。
412
37
 
413
- ## 写作执行流程
38
+ ### 3. 生成概要
414
39
 
415
- ### 灵感扫描(前置)
40
+ 为当前章节生成 200-500 字纯剧情概要,包含:
416
41
 
417
- 在开始写作前,自动扫描 `notes/ideas.json`(如存在),推荐与当前章节相关的灵感:
42
+ - **本章标题**:简短的章节标题
43
+ - **核心事件**:本章发生的主要事件(1-3个)
44
+ - **出场角色**:本章出场的角色列表
45
+ - **情感走向**:本章的情感基调和变化
46
+ - **章末钩子**:本章结尾的悬念或引子
418
47
 
419
- **匹配规则**:
48
+ 写入 `stories/<story>/content/chapter-XXX-synopsis.md`(XXX 为三位数补零)。
420
49
 
421
- | 匹配维度 | 方法 |
422
- |---------|------|
423
- | 章节关联 | 灵感的 `relatedChapters` 包含当前章节号 |
424
- | 角色关联 | 灵感的 `relatedCharacters` 与本章出场角色重叠 |
425
- | 标签关联 | 灵感的 `tags` 与本章计划关键词重叠 |
50
+ ### 4. 更新 tracking 骨架
426
51
 
427
- ```
428
- 💡 相关灵感提醒
429
- ━━━━━━━━━━━━━━━━━━━━
430
-
431
- 与第 [N] 章相关的灵感([M] 条):
432
-
433
- 1. 💡 [灵感内容]
434
- 标签:#战斗 #师姐
435
- 状态:🆕 未使用
436
-
437
- 是否要在本章使用这些灵感?
438
- ```
439
-
440
- ---
52
+ 根据概要内容,更新 4 个 tracking 文件:
441
53
 
442
- ### 1. 选择写作任务
443
- `tasks.md` 中选择状态为 `pending` 的写作任务,标记为 `in_progress`。
54
+ **tracking/character-state.json**:
55
+ - 新出场角色:添加条目(role, status, location, state, lastAppearance)
56
+ - 已有角色:更新 status、location、state、lastAppearance
444
57
 
445
- ### 2. 验证前置条件
446
- - 检查相关依赖任务是否完成
447
- - 验证必要的设定是否就绪
448
- - 确认前序章节是否完成
58
+ **tracking/relationships.json**:
59
+ - 新关系:添加条目(from, to, type, note, lastUpdate)
60
+ - 关系变化:更新 note 和 lastUpdate
449
61
 
450
- ### 3. 写作前提醒
62
+ **tracking/plot-tracker.json**:
63
+ - 更新 currentChapter
64
+ - 新情节线:添加到 plotlines(name, status, description, keyChapters)
65
+ - 伏笔埋设:添加到 foreshadowing(id, content, plantedAt, status=planted)
66
+ - 伏笔回收:更新 resolveAt 和 status=resolved
451
67
 
452
- **基于宪法原则提醒**:核心价值观、质量标准、风格一致性
453
-
454
- **基于规格要求提醒**:P0 必须包含的元素、目标读者特征、内容红线
455
-
456
- **分段格式规范(重要)**:
457
- - ⛔ **禁止使用**:"一"、"二"、"三"等数字标记分段
458
- - ✅ **使用方式**:场景转换时用两个空行(一个空白行)分隔
459
-
460
- **反AI检测写作规范**:
461
-
462
- ⚠️ 核心原则(详见 CLAUDE.md 和 anti-ai-v4.md):
463
- - 单句成段 30%-50%,每段 50-100 字
464
- - 短句优先(15-25 字),白话优先
465
- - 一个准确细节胜过三个堆砌
466
-
467
- **📋 禁用词与替换策略**:
468
-
469
- > **引用外部规范**:完整的禁用词黑名单(200+ 词)和替换策略表,请参阅:
470
- > `resources/requirements/anti-ai-v4.md`
471
- >
472
- > ⚠️ **写作时必须加载此文件**,作为禁用词和替换的权威参考。
473
-
474
- ### 4. 实时辅助模式(可选)
475
-
476
- 如果用户在写作过程中遇到困难(如"帮我想一下主角该怎么办"),可主动提供 2-3 个行动选项。
477
-
478
- ⚠️ 不要主动提供选项,除非用户明确请求帮助。
479
-
480
- ### 5. 根据计划创作内容:
481
- - **开场**:吸引读者,承接前文
482
- - **发展**:推进情节,深化人物
483
- - **转折**:制造冲突或悬念
484
- - **收尾**:适当收束,引出下文
485
-
486
- ### 6. 质量自检
487
-
488
- **宪法合规检查**:是否符合核心价值观、质量标准、风格一致
489
-
490
- **规格符合检查**:是否包含必要元素、符合目标定位、遵守约束条件
491
-
492
- **格式规范检查**:确认未使用数字标记分段,场景转换使用空行分隔
493
-
494
- **设定事实校验**(如 story-facts.json 存在且非空):
495
- - 如果本章声明了 `<!-- story-facts: ... -->` 注释,调用 facts-checker skill
496
- - 检查声明的事实值是否与 story-facts.json 一致
497
- - 验证涉及本章 facts 的算术规则
498
- - 如发现不一致,输出警告(不阻断写作流程)
499
- - **快写模式(--fast)**: 仍执行校验,但简化报告
500
-
501
- ### 📊 具象化检查(去AI味关键)⭐
502
-
503
- 写完一段后,主动识别并替换抽象表达。
504
-
505
- > **完整清单和示例**:首次写作时读取 `resources/requirements/concretization.md`
506
- >
507
- > 核心要点:
508
- > - 时间具体化(避免"最近"、"很久")
509
- > - 人物具体化(避免"有人"、"大家")
510
- > - 数量精确化(避免"很多"、"不少")
511
- > - 场景可视化(避免"很xx"的形容)
512
- > - 关键情节必须具象,次要信息可以概括
513
-
514
- ### 7. 保存和更新
515
- - 将章节内容保存到 `stories/*/content/`
516
- - 更新任务状态为 `completed`
517
- - 记录完成时间和字数
518
-
519
- ---
68
+ **tracking/timeline.json**:
69
+ - 添加本章事件到 events(chapter, time, event)
520
70
 
521
- ## 完成后行动
71
+ ### 5. 批量模式
522
72
 
523
- ### 8. 验证字数和更新进度
73
+ 如果指定了 `--batch N`,重复步骤 2-4 共 N 次,每次递增章节号。每章完成后输出进度。
524
74
 
525
- **字数统计**:使用项目提供的脚本验证:
526
- ```bash
527
- source resources/scripts/bash/common.sh
528
- count_chinese_words "stories/*/content/第X章.md"
529
- ```
530
- ⚠️ 不要使用 `wc -w` 统计中文字数。
531
-
532
- **完成报告**:
533
- ```
534
- ✅ 章节写作完成
535
- - 已保存:stories/*/content/第X章.md
536
- - 实际字数:[X]字
537
- - 字数要求:2000-4000字
538
- - 字数状态:✅ 符合要求 / ⚠️ 字数不足
539
- - 任务状态:已更新
540
- ```
541
-
542
- ### 9. 建议下一步
543
- - 继续下一个写作任务
544
- - 每5章运行 `/analyze` 进行质量检查
545
-
546
- ---
547
-
548
- ## 🆕 后置处理:自动 Tracking 更新
549
-
550
- **执行时机**: 章节写作完成后
551
-
552
- **更新策略**: 核心命令(/write)自动更新,无需用户确认
553
-
554
- ### 执行步骤
555
-
556
- 1. **分析本章内容**:提取角色、关系变化、情节推进、时间线信息
557
- 2. **读取现有 tracking 文件**(按三层 Fallback 加载)
558
- 3. **合并更新**:将新内容增量合并到现有数据
559
- 4. **写入 tracking 数据**:
560
- - **分片模式**:确定当前章节所属卷,更新该卷的分片文件,同步更新全局摘要
561
- - **单文件模式**:直接更新 `tracking/` 下的文件
562
- 5. **MCP 同步**(如果可用):
563
- - `log_writing_session` — 记录本次写作的章节号、字数
564
- - `sync_from_json` — 将更新后的 tracking 数据同步到 SQLite
565
- - 更新 FTS 索引 — 将新章节内容索引到全文检索
566
- 6. **记录日志**:追加到 `tracking/tracking-log.md`
567
-
568
- > **详细格式和示例**:参见 `.claude/skills/auto-tracking/SKILL.md`
569
-
570
- ### 灵感状态更新
571
-
572
- 写作完成后,检查本章是否使用了推荐的灵感:
573
- - 如果使用 → 更新灵感状态为 `used`,记录 `usedInChapter`
574
- - 如果未使用 → 保持 `new` 状态
575
- - 自动将更新写回 `notes/ideas.json`
576
-
577
- ### 灵感快速捕捉
578
-
579
- 用户可在写作过程中随时记录灵感(「记一下」「等等,我突然想到」),AI 识别后自动分类、打标签、写入 `notes/ideas.json`。
580
-
581
- ### Checkpoint 完成标记
582
-
583
- 写作正常完成后,更新 `write-checkpoint.json` 的 `status` 为 `completed`。
584
-
585
- ### 新事实注册提示
586
-
587
- 写作完成后,检查正文中是否出现新的可量化事实(具体数字 + 单位的组合):
588
-
589
- **检测规则**:
590
- - 数字 + 单位模式(如 `1000灵石`、`200人`、`5月`)
591
- - 中文数字 + 单位(如 `五百灵石`,识别但提示用户确认)
592
- - 专有名词首次出现(引号包围或首字母大写)
593
-
594
- **去重逻辑**:
595
- - 检查 `story-facts.json` 中是否已存在相同值
596
- - 检查之前章节的 `<!-- story-facts: ... -->` 注释中是否已声明
597
-
598
- **输出提示**:
599
-
600
- ```
601
- 💡 Story Facts 提示
602
-
603
- 检测到以下可能的新事实(未注册):
604
-
605
- 1. "外门弟子二百人"
606
- 建议 ID: sect-outer-disciples
607
- 类型: number
608
- 值: 200
609
- 单位: 人
610
-
611
- 2. "内门长老十二位"
612
- 建议 ID: sect-inner-elders
613
- 类型: number
614
- 值: 12
615
- 单位: 位
616
-
617
- 使用 /facts 命令添加这些事实以便后续追踪。
618
- ```
619
-
620
- - **仅提示,不自动注册**:用户需手动使用 `/facts` 命令确认添加
621
- - **快写模式(--fast)**: 仍执行检测和提示
622
-
623
- ### 智能推荐(后置)
624
-
625
- 检查 P0/P1 级别推荐(角色缺席、伏笔紧急度),在命令链式提示中展示。
626
-
627
- ## 🆕 批量写作模式(`--batch N`)
628
-
629
- **触发条件**:用户参数 `$ARGUMENTS` 包含 `--batch N`(N 为章节数,1-5)
630
-
631
- **执行模型**:Flow-Pipeline,逐章执行完整写作流程。
632
-
633
- ### 流程
634
-
635
- ```
636
- for i in 1..N:
637
- 1. 加载上下文(首章完整加载,后续章增量更新)
638
- 2. 执行写作(正常模式或 --fast 模式)
639
- 3. 后置处理(tracking 更新、checkpoint 保存)
640
- 4. 将本章结果作为下一章的上下文输入
641
- ```
642
-
643
- ### 上下文传递
644
-
645
- - **首章**:完整执行三层 Fallback 数据加载
646
- - **后续章**:复用已加载的资源,仅增量更新:
647
- - 上一章的结尾内容(续写衔接)
648
- - 上一章更新后的角色状态
649
- - 上一章更新后的伏笔状态
650
- - tasks.md 中的下一个 pending 任务
651
-
652
- ### 中断与恢复
653
-
654
- - 每章完成后保存 checkpoint(含 batch 进度:`batchIndex: 2/5`)
655
- - 中断后可通过 `/write --batch` 恢复(检测 checkpoint 中的 batch 状态)
656
- - 单章写作失败不影响已完成的章节
657
-
658
- ### 限制
659
-
660
- - `--batch` 最大值为 5(避免上下文过长导致质量下降)
661
- - 可与 `--fast` 组合使用:`/write --batch 3 --fast`
662
- - 可与 `--volume` 组合使用:`/write --batch 3 --volume vol-02`
663
-
664
- ---
75
+ ### 6. 后续建议
665
76
 
666
- ## 🔗 命令链式提示
77
+ 单章完成:「第X章概要已生成。继续 /write [X+1] 或 /write --batch 20 批量生成。概要全部完成后使用 /expand 开始扩写。」
667
78
 
668
- ```
669
- 💡 下一步建议:
670
- 1️⃣ `/write [下一章节号]` — 继续写作下一章
671
- 2️⃣ `/analyze` — 每5章执行一次质量分析(已写N章)
672
- 3️⃣ `/recap --brief` — 快速回顾上下文
673
- ```
79
+ 批量完成:「第X-Y章概要已生成(共Z章)。继续 /write [Y+1] --batch 20 或开始 /expand [章节号] 扩写。」