novelws 1.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 (320) hide show
  1. package/CHANGELOG.md +161 -0
  2. package/LICENSE +22 -0
  3. package/README.md +372 -0
  4. package/dist/cli.d.ts +3 -0
  5. package/dist/cli.d.ts.map +1 -0
  6. package/dist/cli.js +50 -0
  7. package/dist/cli.js.map +1 -0
  8. package/dist/commands/check.d.ts +6 -0
  9. package/dist/commands/check.d.ts.map +1 -0
  10. package/dist/commands/check.js +32 -0
  11. package/dist/commands/check.js.map +1 -0
  12. package/dist/commands/init.d.ts +6 -0
  13. package/dist/commands/init.d.ts.map +1 -0
  14. package/dist/commands/init.js +160 -0
  15. package/dist/commands/init.js.map +1 -0
  16. package/dist/commands/plugin.d.ts +6 -0
  17. package/dist/commands/plugin.d.ts.map +1 -0
  18. package/dist/commands/plugin.js +135 -0
  19. package/dist/commands/plugin.js.map +1 -0
  20. package/dist/commands/upgrade.d.ts +6 -0
  21. package/dist/commands/upgrade.d.ts.map +1 -0
  22. package/dist/commands/upgrade.js +92 -0
  23. package/dist/commands/upgrade.js.map +1 -0
  24. package/dist/core/config.d.ts +72 -0
  25. package/dist/core/config.d.ts.map +1 -0
  26. package/dist/core/config.js +136 -0
  27. package/dist/core/config.js.map +1 -0
  28. package/dist/core/errors.d.ts +59 -0
  29. package/dist/core/errors.d.ts.map +1 -0
  30. package/dist/core/errors.js +125 -0
  31. package/dist/core/errors.js.map +1 -0
  32. package/dist/core/platform.d.ts +27 -0
  33. package/dist/core/platform.d.ts.map +1 -0
  34. package/dist/core/platform.js +75 -0
  35. package/dist/core/platform.js.map +1 -0
  36. package/dist/core/template.d.ts +35 -0
  37. package/dist/core/template.d.ts.map +1 -0
  38. package/dist/core/template.js +94 -0
  39. package/dist/core/template.js.map +1 -0
  40. package/dist/plugins/identifier.d.ts +13 -0
  41. package/dist/plugins/identifier.d.ts.map +1 -0
  42. package/dist/plugins/identifier.js +72 -0
  43. package/dist/plugins/identifier.js.map +1 -0
  44. package/dist/plugins/installers/base.d.ts +27 -0
  45. package/dist/plugins/installers/base.d.ts.map +1 -0
  46. package/dist/plugins/installers/base.js +30 -0
  47. package/dist/plugins/installers/base.js.map +1 -0
  48. package/dist/plugins/installers/github.d.ts +22 -0
  49. package/dist/plugins/installers/github.d.ts.map +1 -0
  50. package/dist/plugins/installers/github.js +133 -0
  51. package/dist/plugins/installers/github.js.map +1 -0
  52. package/dist/plugins/installers/local.d.ts +16 -0
  53. package/dist/plugins/installers/local.d.ts.map +1 -0
  54. package/dist/plugins/installers/local.js +69 -0
  55. package/dist/plugins/installers/local.js.map +1 -0
  56. package/dist/plugins/installers/npm.d.ts +20 -0
  57. package/dist/plugins/installers/npm.d.ts.map +1 -0
  58. package/dist/plugins/installers/npm.js +99 -0
  59. package/dist/plugins/installers/npm.js.map +1 -0
  60. package/dist/plugins/manager.d.ts +77 -0
  61. package/dist/plugins/manager.d.ts.map +1 -0
  62. package/dist/plugins/manager.js +349 -0
  63. package/dist/plugins/manager.js.map +1 -0
  64. package/dist/plugins/registry.d.ts +48 -0
  65. package/dist/plugins/registry.d.ts.map +1 -0
  66. package/dist/plugins/registry.js +111 -0
  67. package/dist/plugins/registry.js.map +1 -0
  68. package/dist/plugins/types.d.ts +66 -0
  69. package/dist/plugins/types.d.ts.map +1 -0
  70. package/dist/plugins/types.js +2 -0
  71. package/dist/plugins/types.js.map +1 -0
  72. package/dist/plugins/validator.d.ts +19 -0
  73. package/dist/plugins/validator.d.ts.map +1 -0
  74. package/dist/plugins/validator.js +164 -0
  75. package/dist/plugins/validator.js.map +1 -0
  76. package/dist/utils/logger.d.ts +13 -0
  77. package/dist/utils/logger.d.ts.map +1 -0
  78. package/dist/utils/logger.js +48 -0
  79. package/dist/utils/logger.js.map +1 -0
  80. package/dist/utils/project.d.ts +24 -0
  81. package/dist/utils/project.d.ts.map +1 -0
  82. package/dist/utils/project.js +61 -0
  83. package/dist/utils/project.js.map +1 -0
  84. package/dist/version.d.ts +3 -0
  85. package/dist/version.d.ts.map +1 -0
  86. package/dist/version.js +21 -0
  87. package/dist/version.js.map +1 -0
  88. package/package.json +76 -0
  89. package/plugins/authentic-voice/README.md +31 -0
  90. package/plugins/authentic-voice/commands/authentic-voice.md +73 -0
  91. package/plugins/authentic-voice/commands/authenticity-audit.md +37 -0
  92. package/plugins/authentic-voice/config.yaml +30 -0
  93. package/plugins/authentic-voice/experts/authentic-editor.md +27 -0
  94. package/plugins/export/README.md +319 -0
  95. package/plugins/export/commands/export.md +460 -0
  96. package/plugins/export/commands/generate-cover.md +256 -0
  97. package/plugins/export/commands/metadata.md +309 -0
  98. package/plugins/export/config.yaml +47 -0
  99. package/plugins/export/experts/publishing-expert.md +171 -0
  100. package/plugins/export/templates/epub/chapter-template.html +13 -0
  101. package/plugins/export/templates/epub/cover-template.html +14 -0
  102. package/plugins/export/templates/epub/stylesheet.css +200 -0
  103. package/plugins/export/templates/pdf/ebook-style.css +137 -0
  104. package/plugins/export/templates/pdf/print-style.css +179 -0
  105. package/plugins/export/templates/platforms/jinjiang-format.md +101 -0
  106. package/plugins/export/templates/platforms/qidian-format.md +108 -0
  107. package/plugins/export/templates/platforms/tomato-format.md +95 -0
  108. package/plugins/translate/README.md +265 -0
  109. package/plugins/translate/commands/glossary.md +731 -0
  110. package/plugins/translate/commands/translate-preview.md +543 -0
  111. package/plugins/translate/commands/translate.md +649 -0
  112. package/plugins/translate/config.yaml +43 -0
  113. package/plugins/translate/experts/literary-translator.md +605 -0
  114. package/templates/commands/analyze.md +1485 -0
  115. package/templates/commands/checklist.md +434 -0
  116. package/templates/commands/clarify.md +257 -0
  117. package/templates/commands/constitution.md +257 -0
  118. package/templates/commands/expert.md +136 -0
  119. package/templates/commands/plan.md +749 -0
  120. package/templates/commands/recap.md +613 -0
  121. package/templates/commands/relations.md +96 -0
  122. package/templates/commands/revise.md +341 -0
  123. package/templates/commands/specify.md +682 -0
  124. package/templates/commands/tasks.md +142 -0
  125. package/templates/commands/timeline.md +73 -0
  126. package/templates/commands/track-init.md +137 -0
  127. package/templates/commands/track.md +463 -0
  128. package/templates/commands/write.md +1264 -0
  129. package/templates/config/keyword-mappings.json +106 -0
  130. package/templates/knowledge/audit-config.json +26 -0
  131. package/templates/knowledge/character-profiles.md +152 -0
  132. package/templates/knowledge/character-voices.md +137 -0
  133. package/templates/knowledge/locations.md +184 -0
  134. package/templates/knowledge/world-setting.md +121 -0
  135. package/templates/knowledge-base/README.md +285 -0
  136. package/templates/knowledge-base/character-archetypes/01-hero.md +233 -0
  137. package/templates/knowledge-base/character-archetypes/02-mentor.md +177 -0
  138. package/templates/knowledge-base/character-archetypes/03-shadow.md +221 -0
  139. package/templates/knowledge-base/character-archetypes/04-ally.md +178 -0
  140. package/templates/knowledge-base/character-archetypes/05-shapeshifter.md +177 -0
  141. package/templates/knowledge-base/character-archetypes/06-trickster.md +181 -0
  142. package/templates/knowledge-base/character-archetypes/07-threshold-guardian.md +177 -0
  143. package/templates/knowledge-base/character-archetypes/08-herald.md +180 -0
  144. package/templates/knowledge-base/character-archetypes/09-father.md +249 -0
  145. package/templates/knowledge-base/character-archetypes/10-mother.md +202 -0
  146. package/templates/knowledge-base/character-archetypes/11-child.md +183 -0
  147. package/templates/knowledge-base/character-archetypes/12-sage.md +202 -0
  148. package/templates/knowledge-base/character-archetypes/README.md +60 -0
  149. package/templates/knowledge-base/character-archetypes/application-guide.md +222 -0
  150. package/templates/knowledge-base/character-archetypes/archetype-combinations.md +242 -0
  151. package/templates/knowledge-base/character-archetypes/config.yaml +28 -0
  152. package/templates/knowledge-base/character-archetypes/examples-analysis.md +223 -0
  153. package/templates/knowledge-base/craft/character-arc.md +1153 -0
  154. package/templates/knowledge-base/craft/dialogue.md +1170 -0
  155. package/templates/knowledge-base/craft/pacing.md +1200 -0
  156. package/templates/knowledge-base/craft/scene-structure.md +1136 -0
  157. package/templates/knowledge-base/craft/show-not-tell.md +1012 -0
  158. package/templates/knowledge-base/emotional-beats/01-first-meeting.md +145 -0
  159. package/templates/knowledge-base/emotional-beats/02-bonding-moment.md +226 -0
  160. package/templates/knowledge-base/emotional-beats/03-declaration.md +284 -0
  161. package/templates/knowledge-base/emotional-beats/04-triumph.md +240 -0
  162. package/templates/knowledge-base/emotional-beats/05-reunion.md +396 -0
  163. package/templates/knowledge-base/emotional-beats/06-forgiveness.md +204 -0
  164. package/templates/knowledge-base/emotional-beats/07-betrayal.md +204 -0
  165. package/templates/knowledge-base/emotional-beats/08-loss.md +214 -0
  166. package/templates/knowledge-base/emotional-beats/09-rejection.md +254 -0
  167. package/templates/knowledge-base/emotional-beats/10-failure.md +244 -0
  168. package/templates/knowledge-base/emotional-beats/11-misunderstanding.md +205 -0
  169. package/templates/knowledge-base/emotional-beats/12-farewell.md +283 -0
  170. package/templates/knowledge-base/emotional-beats/13-revelation.md +242 -0
  171. package/templates/knowledge-base/emotional-beats/14-point-of-no-return.md +215 -0
  172. package/templates/knowledge-base/emotional-beats/15-dark-night.md +244 -0
  173. package/templates/knowledge-base/emotional-beats/16-sacrifice.md +246 -0
  174. package/templates/knowledge-base/emotional-beats/17-awakening.md +246 -0
  175. package/templates/knowledge-base/emotional-beats/18-confrontation.md +217 -0
  176. package/templates/knowledge-base/emotional-beats/19-bittersweet-goodbye.md +368 -0
  177. package/templates/knowledge-base/emotional-beats/20-moral-dilemma.md +248 -0
  178. package/templates/knowledge-base/emotional-beats/21-temptation.md +240 -0
  179. package/templates/knowledge-base/emotional-beats/22-redemption.md +210 -0
  180. package/templates/knowledge-base/emotional-beats/README.md +104 -0
  181. package/templates/knowledge-base/emotional-beats/beat-sequences.md +276 -0
  182. package/templates/knowledge-base/emotional-beats/config.yaml +30 -0
  183. package/templates/knowledge-base/emotional-beats/pacing-guide.md +390 -0
  184. package/templates/knowledge-base/genres/historical.md +1127 -0
  185. package/templates/knowledge-base/genres/mystery.md +1123 -0
  186. package/templates/knowledge-base/genres/revenge.md +846 -0
  187. package/templates/knowledge-base/genres/romance.md +948 -0
  188. package/templates/knowledge-base/genres/sci-fi.md +156 -0
  189. package/templates/knowledge-base/genres/thriller.md +166 -0
  190. package/templates/knowledge-base/genres/wuxia.md +143 -0
  191. package/templates/knowledge-base/references/README.md +96 -0
  192. package/templates/knowledge-base/references/china-1920s/culture.md +423 -0
  193. package/templates/knowledge-base/references/china-1920s/daily-life.md +616 -0
  194. package/templates/knowledge-base/references/china-1920s/overview.md +298 -0
  195. package/templates/knowledge-base/references/china-1920s/society.md +703 -0
  196. package/templates/knowledge-base/references/china-1920s/warlords.md +427 -0
  197. package/templates/knowledge-base/references/cultivation-world/daily-life.md +108 -0
  198. package/templates/knowledge-base/references/cultivation-world/overview.md +64 -0
  199. package/templates/knowledge-base/references/cultivation-world/power-system.md +108 -0
  200. package/templates/knowledge-base/references/cultivation-world/sects.md +104 -0
  201. package/templates/knowledge-base/references/cultivation-world/world-setting.md +108 -0
  202. package/templates/knowledge-base/references/modern-workplace/corporate.md +115 -0
  203. package/templates/knowledge-base/references/modern-workplace/daily-life.md +129 -0
  204. package/templates/knowledge-base/references/modern-workplace/overview.md +73 -0
  205. package/templates/knowledge-base/references/modern-workplace/relationships.md +107 -0
  206. package/templates/knowledge-base/references/modern-workplace/tech-industry.md +131 -0
  207. package/templates/knowledge-base/references/tang-dynasty/culture.md +135 -0
  208. package/templates/knowledge-base/references/tang-dynasty/daily-life.md +139 -0
  209. package/templates/knowledge-base/references/tang-dynasty/overview.md +76 -0
  210. package/templates/knowledge-base/references/tang-dynasty/politics.md +121 -0
  211. package/templates/knowledge-base/references/tang-dynasty/society.md +126 -0
  212. package/templates/knowledge-base/requirements/README.md +240 -0
  213. package/templates/knowledge-base/requirements/anti-ai-v3.md +46 -0
  214. package/templates/knowledge-base/requirements/anti-ai-v4.md +430 -0
  215. package/templates/knowledge-base/requirements/fast-paced.md +552 -0
  216. package/templates/knowledge-base/requirements/no-poison.md +60 -0
  217. package/templates/knowledge-base/requirements/romance-angst.md +102 -0
  218. package/templates/knowledge-base/requirements/romance-sweet.md +63 -0
  219. package/templates/knowledge-base/requirements/serious-literature.md +45 -0
  220. package/templates/knowledge-base/requirements/strong-emotion.md +60 -0
  221. package/templates/knowledge-base/styles/README.md +302 -0
  222. package/templates/knowledge-base/styles/ancient-style.md +579 -0
  223. package/templates/knowledge-base/styles/literary.md +439 -0
  224. package/templates/knowledge-base/styles/minimal.md +472 -0
  225. package/templates/knowledge-base/styles/natural-voice.md +930 -0
  226. package/templates/knowledge-base/styles/web-novel.md +525 -0
  227. package/templates/memory/constitution.md +140 -0
  228. package/templates/memory/personal-voice.md +113 -0
  229. package/templates/scripts/README.md +187 -0
  230. package/templates/scripts/bash/analyze-story.sh +170 -0
  231. package/templates/scripts/bash/check-consistency.sh +463 -0
  232. package/templates/scripts/bash/check-plot.sh +374 -0
  233. package/templates/scripts/bash/check-timeline.sh +346 -0
  234. package/templates/scripts/bash/check-world.sh +395 -0
  235. package/templates/scripts/bash/check-writing-state.sh +854 -0
  236. package/templates/scripts/bash/clarify-story.sh +117 -0
  237. package/templates/scripts/bash/common.sh +151 -0
  238. package/templates/scripts/bash/constitution.sh +114 -0
  239. package/templates/scripts/bash/generate-tasks.sh +65 -0
  240. package/templates/scripts/bash/init-tracking.sh +183 -0
  241. package/templates/scripts/bash/manage-relations.sh +174 -0
  242. package/templates/scripts/bash/plan-story.sh +100 -0
  243. package/templates/scripts/bash/specify-story.sh +93 -0
  244. package/templates/scripts/bash/tasks-story.sh +96 -0
  245. package/templates/scripts/bash/test-word-count.sh +182 -0
  246. package/templates/scripts/bash/tests/bench-preload-cache.sh +100 -0
  247. package/templates/scripts/bash/tests/run-all-benchmarks.sh +16 -0
  248. package/templates/scripts/bash/tests/test-cache-semantics.sh +199 -0
  249. package/templates/scripts/bash/tests/test-cross-platform.sh +35 -0
  250. package/templates/scripts/bash/tests/test-edge-cases-bash.sh +60 -0
  251. package/templates/scripts/bash/tests/test-phase1-bash.sh +28 -0
  252. package/templates/scripts/bash/tests/test-preload-cache.sh +123 -0
  253. package/templates/scripts/bash/tests/test-regex-precompile.sh +89 -0
  254. package/templates/scripts/bash/tests/test-regression-bash.sh +42 -0
  255. package/templates/scripts/bash/tests/test-task6-verification.sh +200 -0
  256. package/templates/scripts/bash/text-audit.sh +144 -0
  257. package/templates/scripts/bash/track-progress.sh +194 -0
  258. package/templates/scripts/powershell/analyze-story.ps1 +171 -0
  259. package/templates/scripts/powershell/check-analyze-stage.ps1 +110 -0
  260. package/templates/scripts/powershell/check-consistency.ps1 +138 -0
  261. package/templates/scripts/powershell/check-plot.ps1 +139 -0
  262. package/templates/scripts/powershell/check-timeline.ps1 +112 -0
  263. package/templates/scripts/powershell/check-writing-state.ps1 +490 -0
  264. package/templates/scripts/powershell/check-writing-state.ps1.backup +135 -0
  265. package/templates/scripts/powershell/clarify-story.ps1 +107 -0
  266. package/templates/scripts/powershell/common.ps1 +36 -0
  267. package/templates/scripts/powershell/constitution.ps1 +142 -0
  268. package/templates/scripts/powershell/generate-tasks.ps1 +75 -0
  269. package/templates/scripts/powershell/init-tracking.ps1 +98 -0
  270. package/templates/scripts/powershell/manage-relations.ps1 +134 -0
  271. package/templates/scripts/powershell/plan-story.ps1 +96 -0
  272. package/templates/scripts/powershell/specify-story.ps1 +82 -0
  273. package/templates/scripts/powershell/tests/bench-ps-cache.ps1 +80 -0
  274. package/templates/scripts/powershell/tests/test-cross-platform.ps1 +27 -0
  275. package/templates/scripts/powershell/tests/test-edge-cases-ps.ps1 +29 -0
  276. package/templates/scripts/powershell/tests/test-phase1-ps.ps1 +28 -0
  277. package/templates/scripts/powershell/tests/test-ps-cache.ps1 +73 -0
  278. package/templates/scripts/powershell/tests/test-regression-ps.ps1 +40 -0
  279. package/templates/scripts/powershell/text-audit.ps1 +100 -0
  280. package/templates/scripts/powershell/track-progress.ps1 +105 -0
  281. package/templates/skills/genre-knowledge/fantasy/SKILL.md +355 -0
  282. package/templates/skills/genre-knowledge/mystery/SKILL.md +337 -0
  283. package/templates/skills/genre-knowledge/romance/SKILL.md +228 -0
  284. package/templates/skills/genre-knowledge/sci-fi/SKILL.md +65 -0
  285. package/templates/skills/genre-knowledge/thriller/SKILL.md +95 -0
  286. package/templates/skills/quality-assurance/consistency-checker/SKILL.md +341 -0
  287. package/templates/skills/quality-assurance/continuity-tracker/SKILL.md +157 -0
  288. package/templates/skills/quality-assurance/forgotten-elements/SKILL.md +147 -0
  289. package/templates/skills/quality-assurance/getting-started/SKILL.md +224 -0
  290. package/templates/skills/quality-assurance/pacing-monitor/SKILL.md +143 -0
  291. package/templates/skills/quality-assurance/pov-validator/SKILL.md +135 -0
  292. package/templates/skills/quality-assurance/pre-write-checklist/SKILL.md +583 -0
  293. package/templates/skills/quality-assurance/requirement-detector/CONFLICT_RESOLUTION.md +119 -0
  294. package/templates/skills/quality-assurance/requirement-detector/EXAMPLES.md +146 -0
  295. package/templates/skills/quality-assurance/requirement-detector/KEYWORDS.md +160 -0
  296. package/templates/skills/quality-assurance/requirement-detector/SKILL.md +149 -0
  297. package/templates/skills/quality-assurance/setting-detector/SKILL.md +611 -0
  298. package/templates/skills/quality-assurance/style-detector/CONFLICT_RESOLUTION.md +126 -0
  299. package/templates/skills/quality-assurance/style-detector/EXAMPLES.md +206 -0
  300. package/templates/skills/quality-assurance/style-detector/KEYWORDS.md +207 -0
  301. package/templates/skills/quality-assurance/style-detector/SKILL.md +126 -0
  302. package/templates/skills/quality-assurance/workflow-guide/SKILL.md +381 -0
  303. package/templates/skills/writing-techniques/character-arc/SKILL.md +267 -0
  304. package/templates/skills/writing-techniques/dialogue-techniques/SKILL.md +366 -0
  305. package/templates/skills/writing-techniques/multi-thread-narrative/SKILL.md +553 -0
  306. package/templates/skills/writing-techniques/multi-thread-narrative/experts/thread-analyst.md +226 -0
  307. package/templates/skills/writing-techniques/pacing-control/SKILL.md +377 -0
  308. package/templates/skills/writing-techniques/reader-expectation/SKILL.md +578 -0
  309. package/templates/skills/writing-techniques/reader-expectation/experts/expectation-analyst.md +209 -0
  310. package/templates/skills/writing-techniques/revision-polish/SKILL.md +496 -0
  311. package/templates/skills/writing-techniques/revision-polish/experts/revision-editor.md +221 -0
  312. package/templates/skills/writing-techniques/scene-structure/SKILL.md +361 -0
  313. package/templates/skills/writing-techniques/style-learning/SKILL.md +436 -0
  314. package/templates/specification-example.md +146 -0
  315. package/templates/tracking/character-state.json +78 -0
  316. package/templates/tracking/plot-tracker.json +62 -0
  317. package/templates/tracking/relationships.json +70 -0
  318. package/templates/tracking/timeline.json +49 -0
  319. package/templates/tracking/tracking-log.md +110 -0
  320. package/templates/tracking/validation-rules.json +128 -0
@@ -0,0 +1,257 @@
1
+ ---
2
+ description: 创建或更新小说创作宪法,定义不可妥协的创作原则
3
+ argument-hint: [创作原则描述]
4
+ allowed-tools: Write(//memory/constitution.md), Write(memory/constitution.md), Read(//memory/**), Read(memory/**), Bash(find:*), Bash(*)
5
+ model: claude-sonnet-4-5-20250929
6
+ scripts:
7
+ sh: .specify/scripts/bash/constitution.sh
8
+ ps: .specify/scripts/powershell/constitution.ps1
9
+ ---
10
+
11
+ 用户输入:$ARGUMENTS
12
+
13
+ ## 资源加载(可选)
14
+
15
+ 本命令用于定义项目创作原则,默认不加载额外资源。
16
+
17
+ ### 可选配置
18
+
19
+ 如果需要参考特定风格或要求模板:
20
+
21
+ ```yaml
22
+ resource-loading:
23
+ constitution:
24
+ knowledge-base:
25
+ styles:
26
+ - natural-voice # 自然风格
27
+ requirements:
28
+ - anti-ai-v4 # 防AI检测要求
29
+ ```
30
+
31
+ **推荐资源**: styles/* 和 requirements/*(作为参考模板)
32
+
33
+ ## 目标
34
+
35
+ 建立小说创作的核心原则和价值观,形成创作的"宪法"文件。这些原则将指导后续所有创作决策。
36
+
37
+ ## 执行步骤
38
+
39
+ ### 1. 检查现有文档
40
+
41
+ **首先检查是否存在风格参考文档**(来自 `/book-internalize`):
42
+ ```bash
43
+ test -f memory/style-reference.md && echo "exists" || echo "not-found"
44
+ ```
45
+
46
+ - 如果存在,使用 Read 工具读取 `memory/style-reference.md`
47
+ - 然后告诉用户:"检测到您已完成对标作品分析,我将参考该风格帮您起草宪法。"
48
+
49
+ **然后检查现有宪法**:
50
+ ```bash
51
+ test -f memory/constitution.md && echo "exists" || echo "not-found"
52
+ ```
53
+
54
+ - 如果存在(输出 "exists"),使用 Read 工具读取 `memory/constitution.md` 并准备更新
55
+ - 如果不存在(输出 "not-found"),跳过读取步骤,直接准备创建新宪法
56
+
57
+ ### 2. 收集创作原则
58
+
59
+ 基于用户输入,收集以下维度的原则(如未提供则询问或推断):
60
+
61
+ #### 核心价值观
62
+ - 作品要传递什么核心理念?
63
+ - 什么是绝对不能违背的底线?
64
+ - 创作的根本目的是什么?
65
+
66
+ #### 质量标准
67
+ - 逻辑一致性要求
68
+ - 文字质量标准
69
+ - 更新频率承诺
70
+ - 完成度保证
71
+
72
+ #### 创作风格原则
73
+ - 叙事风格(简洁/华丽/朴实/诗意)
74
+ - 节奏控制(快速/缓慢/张弛有度)
75
+ - 情感基调(热血/深沉/轻松/严肃)
76
+ - 语言特色(古风/现代/口语/书面)
77
+
78
+ #### 内容原则
79
+ - 角色塑造原则
80
+ - 每个角色必须有完整动机
81
+ - 角色成长必须符合逻辑
82
+ - 对话必须符合角色身份
83
+ - 情节设计原则
84
+ - 冲突设计原则
85
+ - 转折合理性要求
86
+ - 伏笔回收原则
87
+ - 世界观原则
88
+ - 设定自洽性要求
89
+ - 细节真实性标准
90
+ - 文化考据要求
91
+
92
+ #### 读者导向原则
93
+ - 目标读者定位
94
+ - 读者体验保证
95
+ - 互动反馈原则
96
+
97
+ #### 创作纪律
98
+ - 日常写作规范
99
+ - 修改和完善流程
100
+ - 版本管理原则
101
+
102
+ ### 3. 起草宪法文档
103
+
104
+ 使用以下模板结构:
105
+
106
+ ```markdown
107
+ # 小说创作宪法
108
+
109
+ ## 元数据
110
+ - 版本:[版本号,如 1.0.0]
111
+ - 创建日期:[YYYY-MM-DD]
112
+ - 最后修订:[YYYY-MM-DD]
113
+ - 作者:[作者名]
114
+ - 作品:[作品名或"通用"]
115
+
116
+ ## 前言
117
+ [阐述为什么需要这份宪法,以及它的约束力]
118
+
119
+ ## 第一章:核心价值观
120
+
121
+ ### 原则1:[原则名称]
122
+ **声明**:[原则的明确表述]
123
+ **理由**:[为什么这个原则重要]
124
+ **执行**:[如何在创作中体现]
125
+
126
+ ### 原则2:[原则名称]
127
+ [同上格式]
128
+
129
+ ## 第二章:质量标准
130
+
131
+ ### 标准1:逻辑一致性
132
+ **要求**:[具体要求]
133
+ **验证方法**:[如何验证]
134
+ **违反后果**:[必须修正]
135
+
136
+ [更多标准...]
137
+
138
+ ## 第三章:创作风格
139
+
140
+ ### 风格原则1:[名称]
141
+ **定义**:[什么是这种风格]
142
+ **范例**:[具体例子]
143
+ **禁忌**:[绝对不要做什么]
144
+
145
+ [更多风格原则...]
146
+
147
+ ## 第四章:内容规范
148
+
149
+ ### 角色塑造规范
150
+ [具体规范内容]
151
+
152
+ ### 情节设计规范
153
+ [具体规范内容]
154
+
155
+ ### 世界观构建规范
156
+ [具体规范内容]
157
+
158
+ ## 第五章:读者契约
159
+
160
+ ### 对读者的承诺
161
+ - [承诺1]
162
+ - [承诺2]
163
+ - [承诺3]
164
+
165
+ ### 底线保证
166
+ - [保证1]
167
+ - [保证2]
168
+
169
+ ## 第六章:修订程序
170
+
171
+ ### 修订触发条件
172
+ - 重大创作方向调整
173
+ - 读者反馈累积
174
+ - 个人成长和认识变化
175
+
176
+ ### 修订流程
177
+ 1. 提出修订动议
178
+ 2. 评估影响
179
+ 3. 更新版本
180
+ 4. 记录变更
181
+
182
+ ## 附录:版本历史
183
+ - v1.0.0 (日期):初始版本
184
+ - [后续版本记录]
185
+ ```
186
+
187
+ ### 4. 版本管理
188
+
189
+ - **主版本号**:重大原则变更或删除
190
+ - **次版本号**:新增原则或章节
191
+ - **修订号**:措辞优化、澄清说明
192
+
193
+ ### 5. 一致性传播
194
+
195
+ 检查并更新相关文件以保持一致:
196
+ - 在后续命令中引用宪法原则
197
+ - 建议更新 README 中的创作理念部分
198
+
199
+ ### 6. 生成影响报告
200
+
201
+ 输出宪法创建/更新的影响:
202
+ ```markdown
203
+ ## 宪法影响报告
204
+ - 版本:[旧版本] → [新版本]
205
+ - 新增原则:[列表]
206
+ - 修改原则:[列表]
207
+ - 影响范围:
208
+ ✅ 规格定义需遵循宪法
209
+ ✅ 计划制定需符合原则
210
+ ✅ 创作执行需遵守规范
211
+ ✅ 验证需检查合规性
212
+ ```
213
+
214
+ ### 7. 输出和保存
215
+
216
+ - 将宪法保存到 `memory/constitution.md`
217
+ - 输出创建/更新成功消息
218
+ - 提示下一步:`/specify` 定义故事规格
219
+
220
+ ## 执行原则
221
+
222
+ ### 必须遵守
223
+ - 原则必须是可验证的,不能太抽象
224
+ - 使用"必须"、"禁止"等明确词汇
225
+ - 每个原则都要有明确的理由
226
+
227
+ ### 应该包含
228
+ - 至少 3-5 个核心价值观
229
+ - 明确的质量底线
230
+ - 可操作的创作规范
231
+
232
+ ### 避免
233
+ - 空泛的口号(如"追求卓越")
234
+ - 无法验证的要求
235
+ - 过度限制创意的条款
236
+
237
+ ## 示例原则
238
+
239
+ **优秀的原则**:
240
+ - "主要角色的行为必须有明确的动机链,不得出现'因为剧情需要'的行为"
241
+ - "每个伏笔必须在合理时间内(最多10章)得到回收或解释"
242
+ - "绝不使用现代网络用语破坏古代背景的沉浸感"
243
+
244
+ **糟糕的原则**:
245
+ - "要写得好"(太模糊)
246
+ - "追求艺术性"(无法验证)
247
+ - "让读者满意"(标准不明)
248
+
249
+ ## 后续流程
250
+
251
+ 宪法确立后,所有后续创作步骤都需遵循:
252
+ 1. `/specify` - 规格需符合宪法价值观
253
+ 2. `/plan` - 计划需遵循宪法原则
254
+ 3. `/write` - 创作需遵守宪法规范
255
+ 4. `/analyze` - 验证需检查宪法合规性
256
+
257
+ 记住:**宪法是最高准则,但也可以与时俱进地修订。**
@@ -0,0 +1,136 @@
1
+ ---
2
+ description: 专家模式 - 获取专业写作指导
3
+ argument-hint: [plot | character | world | style]
4
+ allowed-tools: Read(//.specify/experts/**), Read(.specify/experts/**), Read(//plugins/**/experts/**), Read(plugins/**/experts/**), Bash(find:*), Bash(ls:*), Bash(*)
5
+ model: claude-sonnet-4-5-20250929
6
+ scripts:
7
+ sh: echo ""
8
+ ps: Write-Output ""
9
+ ---
10
+
11
+ # 专家模式
12
+
13
+ 根据用户输入执行相应操作:
14
+
15
+ ## 资源加载(可选)
16
+
17
+ 本命令提供写作技巧咨询,可根据咨询主题动态加载资源。
18
+
19
+ ### 可选配置
20
+
21
+ ```yaml
22
+ resource-loading:
23
+ expert:
24
+ knowledge-base:
25
+ craft:
26
+ - dialogue
27
+ - pacing
28
+ - character-arc
29
+ skills:
30
+ writing-techniques:
31
+ - dialogue-techniques
32
+ - pacing-control
33
+ ```
34
+
35
+ ### 关键词触发
36
+
37
+ 本命令特别适合使用关键词触发。当用户提问包含特定关键词时,自动建议加载相关资源:
38
+
39
+ - "对话" → dialogue.md + dialogue-techniques
40
+ - "节奏" → pacing.md + pacing-control
41
+ - "角色" → character-arc.md + character-arc skill
42
+
43
+ **推荐资源**: craft/* 和 writing-techniques/*(根据咨询主题)
44
+
45
+ ## 1. 列出可用专家(无参数时)
46
+
47
+ 如果用户输入 `/expert` 不带参数,显示所有可用专家:
48
+
49
+ ### 核心专家
50
+ - **plot** - 剧情结构专家
51
+ - 精通三幕、英雄之旅、故事圈等叙事结构
52
+ - 分析情节问题、优化节奏、设计冲突升级
53
+
54
+ - **character** - 人物塑造专家
55
+ - 人物弧光设计、动机分析、性格塑造
56
+ - 对话优化、声音区分、关系构建
57
+
58
+ - **world** - 世界观设计专家
59
+ - 世界观构建、设定一致性、文化背景
60
+ - 规则体系、历史脉络、地理环境
61
+
62
+ - **style** - 文风语言专家
63
+ - 叙述技巧、修辞手法、语言风格
64
+ - 文风统一、氛围营造、节奏把控
65
+
66
+ ### 插件专家
67
+ 扫描 `plugins/` 目录,如果存在带有专家配置的插件,列出:
68
+ - 检查每个插件目录下的 `config.yaml`
69
+ - 如果包含 `experts` 字段,显示专家信息
70
+
71
+ 使用示例:`/expert plot` 激活剧情结构专家
72
+
73
+ ## 2. 激活专家模式
74
+
75
+ 用户输入:`/expert <type>` (如 `/expert plot`)
76
+
77
+ ### 执行步骤:
78
+ 1. **确认专家类型**
79
+ - 核心专家:读取 `.specify/experts/core/<type>.md`
80
+ - 插件专家:读取对应插件的专家文件
81
+
82
+ 2. **加载专家配置**
83
+ 读取专家定义文件,获取:
84
+ - 身份定位
85
+ - 专业领域
86
+ - 工作方式
87
+ - 分析框架
88
+
89
+ 3. **进入专家模式**
90
+ ```
91
+ ✨ 已激活【<专家名称>】模式
92
+
93
+ [显示专家的自我介绍]
94
+
95
+ 我现在会从专业角度为您提供 <领域> 方面的深度指导。
96
+ 有什么可以帮助您的吗?
97
+ ```
98
+
99
+ 4. **模式特征**
100
+ - 保持专家视角和专业术语
101
+ - 提供深度分析而非快速答案
102
+ - 引用相关理论和方法论
103
+ - 主动提出诊断性问题
104
+
105
+ ## 3. 专家模式行为准则
106
+
107
+ 进入专家模式后:
108
+ - **保持专业身份**:始终以该领域专家的视角交流
109
+ - **深度优先**:提供详细分析而非简单建议
110
+ - **理论支撑**:引用相关专业理论和框架
111
+ - **主动引导**:通过提问帮助用户深入思考
112
+ - **持续模式**:直到用户使用其他 `/` 命令才退出
113
+
114
+ ## 4. 退出专家模式
115
+
116
+ 当用户使用任何其他 `/` 命令时:
117
+ 1. 自动退出专家模式
118
+ 2. 执行新命令
119
+ 3. 回到正常交互模式
120
+
121
+ 无需显式退出命令,保持使用流畅性。
122
+
123
+ ## 5. 错误处理
124
+
125
+ - 如果指定的专家不存在:
126
+ ```
127
+ 未找到专家类型:<type>
128
+ 可用的专家有:plot, character, world, style
129
+ 使用 /expert 查看所有可用专家
130
+ ```
131
+
132
+ - 如果专家文件读取失败:
133
+ ```
134
+ 专家配置加载失败,请检查文件是否存在:
135
+ .specify/experts/core/<type>.md
136
+ ```