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,194 +0,0 @@
1
- #!/bin/bash
2
-
3
- # track-progress.sh - 综合追踪小说创作进度
4
- # 支持 --check 深度验证和 --fix 自动修复
5
-
6
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7
- PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
8
-
9
- # 颜色输出
10
- RED='\033[0;31m'
11
- GREEN='\033[0;32m'
12
- YELLOW='\033[1;33m'
13
- BLUE='\033[0;34m'
14
- NC='\033[0m' # No Color
15
-
16
- # 解析参数
17
- MODE="report" # 默认模式
18
- if [[ "$1" == "--check" ]]; then
19
- MODE="check"
20
- elif [[ "$1" == "--fix" ]]; then
21
- MODE="fix"
22
- elif [[ "$1" == "--brief" ]]; then
23
- MODE="brief"
24
- elif [[ "$1" == "--plot" ]]; then
25
- MODE="plot"
26
- elif [[ "$1" == "--stats" ]]; then
27
- MODE="stats"
28
- fi
29
-
30
- echo -e "${BLUE}📊 执行追踪分析...${NC}"
31
- echo ""
32
-
33
- # 检查基础文件是否存在
34
- check_files() {
35
- local has_files=false
36
-
37
- if [[ -f "stories/current/progress.json" ]]; then
38
- has_files=true
39
- fi
40
-
41
- if [[ -f "tracking/plot-tracker.json" ]]; then
42
- has_files=true
43
- fi
44
-
45
- if [[ "$has_files" == false ]]; then
46
- echo -e "${YELLOW}⚠️ 未找到追踪文件,请先初始化项目${NC}"
47
- exit 1
48
- fi
49
- }
50
-
51
- # 基础报告功能
52
- show_basic_report() {
53
- echo -e "${GREEN}📖 小说创作综合报告${NC}"
54
- echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
55
-
56
- # 读取进度信息
57
- if [[ -f "stories/current/progress.json" ]]; then
58
- echo -e "${BLUE}✍️ 写作进度${NC}"
59
- # 这里AI会读取并显示进度信息
60
- echo " 章节完成情况等待分析..."
61
- fi
62
-
63
- # 读取情节追踪
64
- if [[ -f "tracking/plot-tracker.json" ]]; then
65
- echo -e "${BLUE}📍 情节状态${NC}"
66
- echo " 主线进度等待分析..."
67
- fi
68
-
69
- echo ""
70
- }
71
-
72
- # 深度验证模式
73
- run_deep_check() {
74
- echo -e "${GREEN}🔍 执行深度验证...${NC}"
75
- echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
76
-
77
- # Phase 1: 基础验证
78
- echo -e "${BLUE}Phase 1: 基础验证${NC}"
79
- echo " [P] 执行情节一致性检查..."
80
- echo " [P] 执行时间线验证..."
81
- echo " [P] 执行关系验证..."
82
- echo " [P] 执行世界观验证..."
83
-
84
- # Phase 2: 角色深度验证
85
- echo -e "${BLUE}Phase 2: 角色深度验证${NC}"
86
-
87
- # 检查验证规则文件
88
- if [[ -f "tracking/validation-rules.json" ]]; then
89
- echo " ✅ 加载验证规则"
90
- echo " 扫描章节中的角色名称..."
91
- echo " 对比character-state.json..."
92
- echo " 检查称呼准确性..."
93
-
94
- # 生成验证任务(内部使用)
95
- cat << EOF > /tmp/validation-tasks.md
96
- # 验证任务 (自动生成)
97
-
98
- ## Phase 1: 基础验证 [并行]
99
- - [ ] T001 [P] 执行plot-check逻辑
100
- - [ ] T002 [P] 执行timeline逻辑
101
- - [ ] T003 [P] 执行relations逻辑
102
- - [ ] T004 [P] 执行world-check逻辑
103
-
104
- ## Phase 2: 角色验证
105
- - [ ] T005 加载validation-rules.json
106
- - [ ] T006 扫描章节角色名称
107
- - [ ] T007 验证名称一致性
108
- - [ ] T008 检查称呼准确性
109
- - [ ] T009 验证行为一致性
110
-
111
- ## Phase 3: 生成报告
112
- - [ ] T010 汇总结果
113
- - [ ] T011 标记问题
114
- - [ ] T012 生成建议
115
- EOF
116
-
117
- echo -e "${GREEN} ✅ 验证任务已生成${NC}"
118
- else
119
- echo -e "${YELLOW} ⚠️ 未找到验证规则文件${NC}"
120
- echo " 建议创建 tracking/validation-rules.json"
121
- fi
122
-
123
- # Phase 3: 生成报告
124
- echo -e "${BLUE}Phase 3: 生成验证报告${NC}"
125
- echo ""
126
- echo "📊 深度验证报告"
127
- echo "━━━━━━━━━━━━━━━━━━━━━━━━━━"
128
- echo "AI将分析所有章节并生成详细报告..."
129
- echo ""
130
- echo -e "${YELLOW}💡 提示:发现问题后可运行 $0 --fix 自动修复${NC}"
131
- }
132
-
133
- # 自动修复模式
134
- run_auto_fix() {
135
- echo -e "${GREEN}🔧 执行自动修复...${NC}"
136
- echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
137
-
138
- if [[ ! -f "tracking/validation-rules.json" ]]; then
139
- echo -e "${RED}❌ 需要先运行 --check 生成验证报告${NC}"
140
- exit 1
141
- fi
142
-
143
- # 生成修复任务
144
- cat << EOF > /tmp/fix-tasks.md
145
- # 修复任务 (自动生成)
146
-
147
- ## Phase 1: 简单修复 [可自动]
148
- - [ ] F001 读取验证报告
149
- - [ ] F002 [P] 修复角色名称错误
150
- - [ ] F003 [P] 修复称呼错误
151
- - [ ] F004 [P] 修复简单拼写
152
-
153
- ## Phase 2: 生成报告
154
- - [ ] F005 汇总修复结果
155
- - [ ] F006 更新追踪文件
156
- EOF
157
-
158
- echo " 生成修复任务..."
159
- echo " 执行自动修复..."
160
- echo ""
161
- echo "🔧 自动修复报告"
162
- echo "━━━━━━━━━━━━━━━━━━━"
163
- echo "AI将自动修复简单问题..."
164
- echo ""
165
- echo -e "${GREEN}修复完成后建议重新运行 $0 --check 验证${NC}"
166
- }
167
-
168
- # 主执行逻辑
169
- check_files
170
-
171
- case $MODE in
172
- "check")
173
- run_deep_check
174
- ;;
175
- "fix")
176
- run_auto_fix
177
- ;;
178
- "brief"|"plot"|"stats")
179
- echo "显示${MODE}模式的报告..."
180
- show_basic_report
181
- ;;
182
- *)
183
- show_basic_report
184
- echo -e "${BLUE}💡 可用选项:${NC}"
185
- echo " --check : 深度验证所有内容"
186
- echo " --fix : 自动修复简单问题"
187
- echo " --brief : 显示简要信息"
188
- echo " --plot : 仅显示情节追踪"
189
- echo " --stats : 仅显示统计数据"
190
- ;;
191
- esac
192
-
193
- echo ""
194
- echo -e "${GREEN}✅ 追踪分析完成${NC}"
@@ -1,174 +0,0 @@
1
- # 故事分析验证脚本
2
- # 用于 /analyze 命令
3
-
4
- param(
5
- [string]$StoryName,
6
- [string]$AnalysisType = "full" # full, compliance, quality, progress
7
- )
8
-
9
- Set-StrictMode -Version Latest
10
- $ErrorActionPreference = 'Stop'
11
-
12
- # 导入通用函数
13
- . "$PSScriptRoot\common.ps1"
14
-
15
- # 获取项目根目录
16
- $ProjectRoot = Get-ProjectRoot
17
- Set-Location $ProjectRoot
18
-
19
- # 确定故事路径
20
- if ([string]::IsNullOrEmpty($StoryName)) {
21
- $StoryName = Get-ActiveStory
22
- }
23
-
24
- $StoryDir = "stories\$StoryName"
25
-
26
- # 检查必要文件
27
- function Test-StoryFiles {
28
- $missingFiles = @()
29
-
30
- # 检查基准文档
31
- if (-not (Test-Path "resources\memory\constitution.md")) {
32
- $missingFiles += "宪法文件"
33
- }
34
- if (-not (Test-Path "$StoryDir\specification.md")) {
35
- $missingFiles += "规格文件"
36
- }
37
- if (-not (Test-Path "$StoryDir\creative-plan.md")) {
38
- $missingFiles += "计划文件"
39
- }
40
-
41
- if ($missingFiles.Count -gt 0) {
42
- Write-Host "⚠️ 缺少以下基准文档:" -ForegroundColor Yellow
43
- foreach ($file in $missingFiles) {
44
- Write-Host " - $file"
45
- }
46
- return $false
47
- }
48
-
49
- return $true
50
- }
51
-
52
- # 统计内容
53
- function Get-ContentAnalysis {
54
- $contentDir = "$StoryDir\content"
55
- $totalWords = 0
56
- $chapterCount = 0
57
-
58
- if (Test-Path $contentDir) {
59
- $mdFiles = Get-ChildItem "$contentDir\*.md" -ErrorAction SilentlyContinue
60
-
61
- foreach ($file in $mdFiles) {
62
- $chapterCount++
63
- # 简单的字数统计(中文按字符算)
64
- $content = Get-Content $file.FullName -Raw
65
- $words = ($content -replace '\s', '').Length
66
- $totalWords += $words
67
- }
68
- }
69
-
70
- Write-Host "内容统计:"
71
- Write-Host " 总字数:$totalWords"
72
- Write-Host " 章节数:$chapterCount"
73
-
74
- if ($chapterCount -gt 0) {
75
- $avgLength = [math]::Round($totalWords / $chapterCount)
76
- Write-Host " 平均章节长度:$avgLength"
77
- }
78
- }
79
-
80
- # 检查任务完成度
81
- function Test-TaskCompletion {
82
- $tasksFile = "$StoryDir\tasks.md"
83
-
84
- if (-not (Test-Path $tasksFile)) {
85
- Write-Host "任务文件不存在"
86
- return
87
- }
88
-
89
- $content = Get-Content $tasksFile -Raw
90
- $totalTasks = ([regex]::Matches($content, '^- \[', [System.Text.RegularExpressions.RegexOptions]::Multiline)).Count
91
- $completedTasks = ([regex]::Matches($content, '^- \[x\]', [System.Text.RegularExpressions.RegexOptions]::Multiline)).Count
92
- $inProgress = ([regex]::Matches($content, '^- \[~\]', [System.Text.RegularExpressions.RegexOptions]::Multiline)).Count
93
- $pending = $totalTasks - $completedTasks - $inProgress
94
-
95
- Write-Host "任务进度:"
96
- Write-Host " 总任务:$totalTasks"
97
- Write-Host " 已完成:$completedTasks"
98
- Write-Host " 进行中:$inProgress"
99
- Write-Host " 未开始:$pending"
100
-
101
- if ($totalTasks -gt 0) {
102
- $completionRate = [math]::Round(($completedTasks * 100) / $totalTasks)
103
- Write-Host " 完成率:$completionRate%"
104
- }
105
- }
106
-
107
- # 检查规格符合度
108
- function Test-SpecificationCompliance {
109
- $specFile = "$StoryDir\specification.md"
110
-
111
- Write-Host "规格符合度检查:"
112
-
113
- if (Test-Path $specFile) {
114
- $content = Get-Content $specFile -Raw
115
-
116
- # 检查P0需求(简化版)
117
- if ($content -match "### 必须包含(P0)") {
118
- Write-Host " P0需求:检测到,需人工验证"
119
- }
120
-
121
- # 检查是否还有[需要澄清]标记
122
- $unclearCount = ([regex]::Matches($content, '\[需要澄清\]')).Count
123
- if ($unclearCount -gt 0) {
124
- Write-Host " ⚠️ 仍有 $unclearCount 处需要澄清" -ForegroundColor Yellow
125
- }
126
- else {
127
- Write-Host " ✅ 所有决策已澄清" -ForegroundColor Green
128
- }
129
- }
130
- }
131
-
132
- # 主分析流程
133
- Write-Host "故事分析报告"
134
- Write-Host "============"
135
- Write-Host "故事:$StoryName"
136
- Write-Host "分析时间:$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')"
137
- Write-Host ""
138
-
139
- # 检查基准文档
140
- if (-not (Test-StoryFiles)) {
141
- Write-Host ""
142
- Write-Host "❌ 无法进行完整分析,请先完成基准文档" -ForegroundColor Red
143
- exit 1
144
- }
145
-
146
- Write-Host "✅ 基准文档完整" -ForegroundColor Green
147
- Write-Host ""
148
-
149
- # 根据分析类型执行
150
- switch ($AnalysisType) {
151
- "full" {
152
- Get-ContentAnalysis
153
- Write-Host ""
154
- Test-TaskCompletion
155
- Write-Host ""
156
- Test-SpecificationCompliance
157
- }
158
- "quality" {
159
- Get-ContentAnalysis
160
- }
161
- "progress" {
162
- Test-TaskCompletion
163
- }
164
- "compliance" {
165
- Test-SpecificationCompliance
166
- }
167
- default {
168
- Write-Host "未知的分析类型:$AnalysisType" -ForegroundColor Red
169
- exit 1
170
- }
171
- }
172
-
173
- Write-Host ""
174
- Write-Host "分析完成。详细报告已保存到:$StoryDir\analysis-report.md"
@@ -1,110 +0,0 @@
1
- #!/usr/bin/env pwsh
2
- # 检测 analyze 命令应该执行的阶段
3
- # 返回 JSON 格式的阶段信息
4
-
5
- param(
6
- [switch]$Json
7
- )
8
-
9
- Set-StrictMode -Version Latest
10
- $ErrorActionPreference = 'Stop'
11
-
12
- # 加载公共函数
13
- $scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
14
- . (Join-Path $scriptDir "common.ps1")
15
-
16
- # 获取项目根目录和故事目录
17
- try {
18
- $projectRoot = Get-ProjectRoot
19
- $storyDir = Get-CurrentStoryDir
20
- } catch {
21
- Write-Error "错误: $_"
22
- exit 1
23
- }
24
-
25
- if (-not $storyDir) {
26
- Write-Error "错误: 未找到故事目录"
27
- exit 1
28
- }
29
-
30
- # 默认返回值
31
- $analyzeType = "content"
32
- $chapterCount = 0
33
- $hasSpec = $false
34
- $hasPlan = $false
35
- $hasTasks = $false
36
- $reason = ""
37
-
38
- # 检查规格文件
39
- $specPath = Join-Path $storyDir "specification.md"
40
- if (Test-Path $specPath) {
41
- $hasSpec = $true
42
- }
43
-
44
- # 检查计划文件
45
- $planPath = Join-Path $storyDir "creative-plan.md"
46
- if (Test-Path $planPath) {
47
- $hasPlan = $true
48
- }
49
-
50
- # 检查任务文件
51
- $tasksPath = Join-Path $storyDir "tasks.md"
52
- if (Test-Path $tasksPath) {
53
- $hasTasks = $true
54
- }
55
-
56
- # 统计章节数量
57
- $contentDir = Join-Path $storyDir "content"
58
- if (-not (Test-Path $contentDir)) {
59
- $contentDir = Join-Path $storyDir "chapters"
60
- }
61
-
62
- if (Test-Path $contentDir) {
63
- # 统计 .md 文件数量(排除索引文件)
64
- $chapters = Get-ChildItem -Path $contentDir -Filter "*.md" -File |
65
- Where-Object { $_.Name -notin @("README.md", "index.md") }
66
- $chapterCount = $chapters.Count
67
- }
68
-
69
- # 决策逻辑
70
- if ($chapterCount -eq 0) {
71
- # 无章节内容 → 框架分析
72
- $analyzeType = "framework"
73
- $reason = "无章节内容,建议进行框架一致性分析"
74
- } elseif ($chapterCount -lt 3) {
75
- # 章节数量不足 → 框架分析(但提示可以开始写作)
76
- $analyzeType = "framework"
77
- $reason = "章节数量较少($chapterCount 章),建议继续写作或进行框架验证"
78
- } else {
79
- # 章节充足 → 内容分析
80
- $analyzeType = "content"
81
- $reason = "已完成 $chapterCount 章,可进行内容质量分析"
82
- }
83
-
84
- # 输出 JSON 或人类可读格式
85
- if ($Json) {
86
- # JSON 格式输出
87
- $output = @{
88
- analyze_type = $analyzeType
89
- chapter_count = $chapterCount
90
- has_spec = $hasSpec
91
- has_plan = $hasPlan
92
- has_tasks = $hasTasks
93
- story_dir = $storyDir
94
- reason = $reason
95
- }
96
-
97
- $output | ConvertTo-Json -Compress
98
- } else {
99
- # 人类可读输出
100
- Write-Host "分析阶段检测结果"
101
- Write-Host "=================="
102
- Write-Host "故事目录: $storyDir"
103
- Write-Host "章节数量: $chapterCount"
104
- Write-Host "规格文件: $(if ($hasSpec) { '✅' } else { '❌' })"
105
- Write-Host "计划文件: $(if ($hasPlan) { '✅' } else { '❌' })"
106
- Write-Host "任务文件: $(if ($hasTasks) { '✅' } else { '❌' })"
107
- Write-Host ""
108
- Write-Host "推荐模式: $analyzeType"
109
- Write-Host "原因: $reason"
110
- }
@@ -1,138 +0,0 @@
1
- #!/usr/bin/env pwsh
2
- # 综合一致性检查(PowerShell)
3
-
4
- Set-StrictMode -Version Latest
5
- $ErrorActionPreference = 'Stop'
6
-
7
- . "$PSScriptRoot/common.ps1"
8
-
9
- $root = Get-ProjectRoot
10
- $storyDir = Get-CurrentStoryDir
11
- if (-not $storyDir) { throw "未找到故事项目(stories/*)" }
12
-
13
- $progress = Join-Path $storyDir "progress.json"
14
- $plot = Join-Path $storyDir "tracking/plot-tracker.json"
15
- if (-not (Test-Path $plot)) { $plot = Join-Path $root "tracking/plot-tracker.json" }
16
- $timeline = Join-Path $storyDir "tracking/timeline.json"
17
- if (-not (Test-Path $timeline)) { $timeline = Join-Path $root "tracking/timeline.json" }
18
- $rels = Join-Path $storyDir "tracking/relationships.json"
19
- if (-not (Test-Path $rels)) { $rels = Join-Path $root "tracking/relationships.json" }
20
- $charState = Join-Path $storyDir "tracking/character-state.json"
21
- if (-not (Test-Path $charState)) { $charState = Join-Path $root "tracking/character-state.json" }
22
-
23
- $TOTAL=0; $PASS=0; $WARN=0; $ERR=0
24
- function Check([string]$name, [bool]$ok, [string]$msg) {
25
- $script:TOTAL++
26
- if ($ok) { Write-Host "✓ $name" -ForegroundColor Green; $script:PASS++ }
27
- else { Write-Host "✗ $name: $msg" -ForegroundColor Red; $script:ERR++ }
28
- }
29
- function Warn([string]$msg) { Write-Host "⚠ $msg" -ForegroundColor Yellow; $script:WARN++ }
30
-
31
- function Check-FileIntegrity {
32
- Write-Host "📁 检查文件完整性"
33
- Write-Host "────────────────"
34
- Check "progress.json" (Test-Path $progress) "文件不存在"
35
- Check "plot-tracker.json" (Test-Path $plot) "文件不存在"
36
- Check "timeline.json" (Test-Path $timeline) "文件不存在"
37
- Check "relationships.json" (Test-Path $rels) "文件不存在"
38
- Check "character-state.json" (Test-Path $charState) "文件不存在"
39
- Write-Host ""
40
- }
41
-
42
- function Check-ChapterConsistency {
43
- Write-Host "📖 检查章节号一致性"
44
- Write-Host "───────────────────"
45
- if ((Test-Path $progress) -and (Test-Path $plot)) {
46
- $p = Get-Content -LiteralPath $progress -Raw -Encoding UTF8 | ConvertFrom-Json
47
- $j = Get-Content -LiteralPath $plot -Raw -Encoding UTF8 | ConvertFrom-Json
48
- $pCh = [int]($p.statistics.currentChapter ?? 0)
49
- $plCh = [int]($j.currentState.chapter ?? 0)
50
- Check "章节号同步" ($pCh -eq $plCh) "progress($pCh) != plot-tracker($plCh)"
51
- if (Test-Path $charState) {
52
- $cs = Get-Content -LiteralPath $charState -Raw -Encoding UTF8 | ConvertFrom-Json
53
- # 示例结构中 protagonist 字段不稳定,回退 characters->主角
54
- $csCh = [int]($cs.protagonist.currentStatus.chapter)
55
- if (-not $csCh) { $csCh = [int]($cs.characters.'主角'.lastSeen.chapter) }
56
- if ($csCh) { Check "角色状态章节同步" ($pCh -eq $csCh) "与character-state($csCh)不一致" }
57
- }
58
- } else { Warn "部分追踪文件缺失,无法完成章节检查" }
59
- Write-Host ""
60
- }
61
-
62
- function Check-TimelineConsistency {
63
- Write-Host "⏰ 检查时间线连续性"
64
- Write-Host "───────────────────"
65
- if (Test-Path $timeline) {
66
- $j = Get-Content -LiteralPath $timeline -Raw -Encoding UTF8 | ConvertFrom-Json
67
- $events = @($j.events | Sort-Object chapter)
68
- $issues=0; $prev=-1
69
- foreach ($e in $events) { if ($prev -ge 0 -and $e.chapter -le $prev) { $issues++ }; $prev=$e.chapter }
70
- Check "时间事件顺序" ($issues -eq 0) "发现${issues}个乱序事件"
71
- $curTime = $j.storyTime.current
72
- Check "当前时间设置" ([bool]$curTime) "当前故事时间未设置"
73
- } else { Warn "时间线文件不存在" }
74
- Write-Host ""
75
- }
76
-
77
- function Check-CharacterConsistency {
78
- Write-Host "👥 检查角色状态合理性"
79
- Write-Host "─────────────────────"
80
- if ((Test-Path $charState) -and (Test-Path $rels)) {
81
- $cs = Get-Content -LiteralPath $charState -Raw -Encoding UTF8 | ConvertFrom-Json
82
- $rel = Get-Content -LiteralPath $rels -Raw -Encoding UTF8 | ConvertFrom-Json
83
- $name = $cs.protagonist.name
84
- if (-not $name) { $name = $cs.characters.'主角'.name }
85
- if ($name) {
86
- $has = $false
87
- if ($rel.characters) { $has = $rel.characters.PSObject.Properties.Name -contains $name }
88
- Check "主角关系记录" $has "主角'$name'在relationships中无记录"
89
- }
90
- $loc = $cs.protagonist.currentStatus.location
91
- if (-not $loc) { $loc = $cs.characters.'主角'.location }
92
- Check "主角位置记录" ([bool]$loc) "主角当前位置未记录"
93
- } else { Warn "角色追踪文件不完整" }
94
- Write-Host ""
95
- }
96
-
97
- function Check-ForeshadowingPlan {
98
- Write-Host "🎯 检查伏笔管理"
99
- Write-Host "──────────────"
100
- if (Test-Path $plot) {
101
- $j = Get-Content -LiteralPath $plot -Raw -Encoding UTF8 | ConvertFrom-Json
102
- $fs = @($j.foreshadowing)
103
- $total = $fs.Count
104
- $active = @($fs | Where-Object { $_.status -eq 'active' }).Count
105
- Write-Host " 📊 伏笔统计: 总计${total}个,活跃${active}个"
106
- if ($active -gt 10) { Warn "活跃伏笔过多(${active}个),可能造成读者困惑" }
107
- } else { Warn "情节追踪文件不存在" }
108
- Write-Host ""
109
- }
110
-
111
- Write-Host "═══════════════════════════════════════"
112
- Write-Host "📊 综合一致性检查报告"
113
- Write-Host "═══════════════════════════════════════"
114
- Write-Host ""
115
-
116
- Check-FileIntegrity
117
- Check-ChapterConsistency
118
- Check-TimelineConsistency
119
- Check-CharacterConsistency
120
- Check-ForeshadowingPlan
121
-
122
- Write-Host "═══════════════════════════════════════"
123
- Write-Host "📈 检查结果汇总"
124
- Write-Host "───────────────────"
125
- Write-Host " 总检查项: $TOTAL"
126
- Write-Host " 通过: $PASS"
127
- Write-Host " 警告: $WARN"
128
- Write-Host " 错误: $ERR"
129
-
130
- if ($ERR -eq 0 -and $WARN -eq 0) { Write-Host "`n✅ 完美!所有检查项全部通过" -ForegroundColor Green }
131
- elseif ($ERR -eq 0) { Write-Host "`n⚠️ 存在$WARN 个警告,建议关注" -ForegroundColor Yellow }
132
- else { Write-Host "`n❌ 发现$ERR 个错误,需要修正" -ForegroundColor Red }
133
-
134
- Write-Host "═══════════════════════════════════════"
135
- Write-Host "检查时间: $(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')"
136
-
137
- if ($ERR -gt 0) { exit 1 } else { exit 0 }
138
-