@oh-story/dsh 0.1.8 → 0.1.10

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 (360) hide show
  1. package/README.md +14 -14
  2. package/lib/client.js +237 -84
  3. package/lib/client.js.map +3 -3
  4. package/lib/drama/manifest.json +183 -77
  5. package/lib/drama/skills/short-drama/SKILL.md +5 -1
  6. package/lib/drama/skills/short-drama/scripts/creator_markdown_check.py +140 -9
  7. package/lib/drama/skills/short-drama/scripts/project_tool.py +11 -0
  8. package/lib/drama/skills/short-drama-assets/references/character-and-look.md +28 -0
  9. package/lib/drama/skills/short-drama-assets/references/continuity-lock.md +8 -2
  10. package/lib/drama/skills/short-drama-assets/references/voice-direction.md +28 -0
  11. package/lib/drama/skills/short-drama-edit/SKILL.md +146 -0
  12. package/lib/drama/skills/short-drama-edit/agents/openai.yaml +4 -0
  13. package/lib/drama/skills/short-drama-edit/assets/remotion/README.md +60 -0
  14. package/lib/drama/skills/short-drama-edit/assets/remotion/package.json +15 -0
  15. package/lib/drama/skills/short-drama-edit/assets/remotion/remotion.config.ts +6 -0
  16. package/lib/drama/skills/short-drama-edit/assets/remotion/src/Root.tsx +26 -0
  17. package/lib/drama/skills/short-drama-edit/assets/remotion/src/Subtitles.tsx +88 -0
  18. package/lib/drama/skills/short-drama-edit/assets/remotion/src/font.ts +46 -0
  19. package/lib/drama/skills/short-drama-edit/assets/remotion/src/index.ts +4 -0
  20. package/lib/drama/skills/short-drama-edit/assets/remotion/src/schema.ts +32 -0
  21. package/lib/drama/skills/short-drama-edit/assets/remotion/tsconfig.json +13 -0
  22. package/lib/drama/skills/short-drama-edit/assets//345/211/252/350/276/221/345/215/225.md +43 -0
  23. package/lib/drama/skills/short-drama-edit/references/cut-craft.md +38 -0
  24. package/lib/drama/skills/short-drama-edit/references/delivery-verify.md +29 -0
  25. package/lib/drama/skills/short-drama-edit/references/generated-footage.md +54 -0
  26. package/lib/drama/skills/short-drama-edit/references/sound-and-subtitles.md +60 -0
  27. package/lib/drama/skills/short-drama-edit/references/stage-contract.md +51 -0
  28. package/lib/drama/skills/short-drama-edit/scripts/edit_tool.py +1156 -0
  29. package/lib/drama/skills/short-drama-edit/scripts/selftest.py +520 -0
  30. package/lib/drama/skills/short-drama-image-prompts/SKILL.md +2 -0
  31. package/lib/drama/skills/short-drama-image-prompts/assets/image-prompts.md +5 -0
  32. package/lib/drama/skills/short-drama-image-prompts/assets/lookdev-prompts.md +3 -0
  33. package/lib/drama/skills/short-drama-image-prompts/references/common-recipe.md +11 -0
  34. package/lib/drama/skills/short-drama-novel-analyze/references/aggregation-and-entities.md +2 -2
  35. package/lib/drama/skills/short-drama-novel-analyze/references/chapter-extraction.md +4 -1
  36. package/lib/drama/skills/short-drama-produce/SKILL.md +29 -4
  37. package/lib/drama/skills/short-drama-produce/references/adapter-contract.md +22 -0
  38. package/lib/drama/skills/short-drama-produce/references/providers/minimax-h3-video.md +13 -12
  39. package/lib/drama/skills/short-drama-produce/references/providers/minimax-speech.md +41 -0
  40. package/lib/drama/skills/short-drama-produce/references/providers/seedance.md +7 -0
  41. package/lib/drama/skills/short-drama-produce/scripts/fixture_adapter.py +18 -1
  42. package/lib/drama/skills/short-drama-produce/scripts/production_tool.py +181 -2
  43. package/lib/drama/skills/short-drama-produce/scripts/provider_adapters.py +199 -3
  44. package/lib/drama/skills/short-drama-review/SKILL.md +2 -0
  45. package/lib/drama/skills/short-drama-review/references/production-quality-gates.md +7 -0
  46. package/lib/drama/skills/short-drama-review/references/rubric-visual-motion.md +10 -0
  47. package/lib/drama/skills/short-drama-storyboard/SKILL.md +12 -1
  48. package/lib/drama/skills/short-drama-storyboard/assets/keyframe-prompts.md +4 -0
  49. package/lib/drama/skills/short-drama-storyboard/references/lighting-craft.md +39 -0
  50. package/lib/drama/skills/short-drama-storyboard/references/shot-craft.md +78 -2
  51. package/lib/drama/skills/short-drama-storyboard/references/stage-contract.md +2 -0
  52. package/lib/drama/skills/short-drama-video-prompts/SKILL.md +12 -5
  53. package/lib/drama/skills/short-drama-video-prompts/references/camera-audio-continuity.md +17 -0
  54. package/lib/drama/skills/short-drama-video-prompts/references/minimax-h3.md +76 -7
  55. package/lib/drama/skills/short-drama-video-prompts/references/motion-recipe.md +5 -2
  56. package/lib/drama/skills/short-drama-video-prompts/references/performance-action-timing.md +21 -0
  57. package/lib/drama/skills/short-drama-video-prompts/references/production-prompt-grammar.md +6 -17
  58. package/lib/drama/skills/short-drama-video-prompts/references/seedance-2.0.md +12 -3
  59. package/lib/drama/skills/short-drama-video-prompts/references/seedance-2.5.md +61 -5
  60. package/lib/drama/skills/short-drama-video-prompts/references/stage-contract.md +3 -3
  61. package/lib/drama/skills/short-drama-write/SKILL.md +11 -2
  62. package/lib/drama/skills/short-drama-write/references/screenplay-format.md +6 -0
  63. package/lib/drama/skills/short-drama-write/references/stage-contract.md +1 -0
  64. package/lib/index.js +290 -90
  65. package/lib/index.js.map +4 -4
  66. package/lib/novel-to-game/README.md +299 -59
  67. package/lib/novel-to-game/README_ZH.md +299 -56
  68. package/lib/novel-to-game/VERSION +1 -1
  69. package/lib/novel-to-game/examples/jin-ping-mei/build/BUILD_BRIEF.md +3 -1
  70. package/lib/novel-to-game/examples/jin-ping-mei/build/app/RUN.md +11 -3
  71. package/lib/novel-to-game/examples/jin-ping-mei/build/app/css/new-guofeng.css +397 -8
  72. package/lib/novel-to-game/examples/jin-ping-mei/build/app/css/style.css +0 -31
  73. package/lib/novel-to-game/examples/jin-ping-mei/build/app/js/data.js +71 -73
  74. package/lib/novel-to-game/examples/jin-ping-mei/build/app/js/engine.js +78 -89
  75. package/lib/novel-to-game/examples/jin-ping-mei/build/app/js/main.js +37 -14
  76. package/lib/novel-to-game/examples/jin-ping-mei/build/app/js/text.js +5 -5
  77. package/lib/novel-to-game/examples/jin-ping-mei/build/app/package.json +2 -1
  78. package/lib/novel-to-game/examples/jin-ping-mei/qa/README.md +11 -16
  79. package/lib/novel-to-game/examples/jin-ping-mei/qa/verification.json +11 -11
  80. package/lib/novel-to-game/examples/jin-ping-mei/qa/verify_playable_model.mjs +23 -0
  81. package/lib/novel-to-game/manifest.json +77 -87
  82. package/lib/novel-to-game/skills/game-art-direction/SKILL.md +9 -35
  83. package/lib/novel-to-game/skills/game-art-direction/references/art-direction-method.md +27 -106
  84. package/lib/novel-to-game/skills/game-build/SKILL.md +17 -35
  85. package/lib/novel-to-game/skills/game-build/references/blender-asset-workflow.md +24 -0
  86. package/lib/novel-to-game/skills/game-build/references/build-brief-contract.md +45 -82
  87. package/lib/novel-to-game/skills/game-build/references/generative-media-pipeline.md +14 -45
  88. package/lib/novel-to-game/skills/game-build/references/playable-model-contract.md +30 -65
  89. package/lib/novel-to-game/skills/game-build/references/tts-production-contract.md +13 -27
  90. package/lib/novel-to-game/skills/game-concept/SKILL.md +16 -34
  91. package/lib/novel-to-game/skills/game-concept/references/concept-method.md +28 -75
  92. package/lib/novel-to-game/skills/game-qa/SKILL.md +9 -20
  93. package/lib/novel-to-game/skills/game-qa/references/test-design-method.md +10 -6
  94. package/lib/novel-to-game/skills/game-world-design/SKILL.md +19 -32
  95. package/lib/novel-to-game/skills/game-world-design/references/narrative-design-method.md +23 -72
  96. package/lib/novel-to-game/skills/game-world-design/references/numeric-design-method.md +14 -48
  97. package/lib/novel-to-game/skills/game-world-design/references/world-design-method.md +36 -103
  98. package/lib/novel-to-game/skills/novel-game-analyze/SKILL.md +9 -18
  99. package/lib/novel-to-game/skills/novel-game-analyze/references/gameability-protocol.md +4 -4
  100. package/lib/novel-to-game/skills/novel-to-game/SKILL.md +10 -27
  101. package/lib/novel-to-game/skills/novel-to-game/references/intake-method.md +5 -6
  102. package/lib/novel-to-game/skills/novel-to-game/references/pipeline-contract.md +6 -11
  103. package/lib/oh-story/manifest.json +419 -254
  104. package/lib/oh-story/roles/chapter-extractor.md +177 -237
  105. package/lib/oh-story/roles/character-designer.md +1 -1
  106. package/lib/oh-story/roles/consistency-checker.md +4 -4
  107. package/lib/oh-story/roles/narrative-writer.md +56 -243
  108. package/lib/oh-story/roles/story-architect.md +6 -6
  109. package/lib/oh-story/roles/story-explorer.md +11 -11
  110. package/lib/oh-story/skills/story/SKILL.md +13 -7
  111. package/lib/oh-story/skills/story/VERSION +1 -1
  112. package/lib/oh-story/skills/story/references/author-memory.md +61 -29
  113. package/lib/oh-story/skills/story/scripts/author_memory_commit.py +934 -170
  114. package/lib/oh-story/skills/story-cover/SKILL.md +10 -1
  115. package/lib/oh-story/skills/story-deslop/SKILL.md +54 -229
  116. package/lib/oh-story/skills/story-deslop/references/anti-ai-writing.md +29 -56
  117. package/lib/oh-story/skills/story-deslop/references/author-memory.md +61 -29
  118. package/lib/oh-story/skills/story-deslop/references/banned-words.md +3 -1
  119. package/lib/oh-story/skills/story-deslop/references/deslop-gates.md +154 -0
  120. package/lib/oh-story/skills/story-deslop/references/style-resolution.md +27 -0
  121. package/lib/oh-story/skills/story-deslop/scripts/author_memory_commit.py +934 -170
  122. package/lib/oh-story/skills/story-deslop/scripts/check-ai-patterns.js +6 -1
  123. package/lib/oh-story/skills/story-deslop/scripts/check-degeneration.js +39 -20
  124. package/lib/oh-story/skills/story-deslop/scripts/normalize-punctuation.js +10 -5
  125. package/lib/oh-story/skills/story-deslop/scripts/style-whitelist.js +39 -0
  126. package/lib/oh-story/skills/story-import/SKILL.md +78 -82
  127. package/lib/oh-story/skills/story-import/references/character-state-reverse.md +1 -1
  128. package/lib/oh-story/skills/story-import/references/format-and-structure.md +2 -2
  129. package/lib/oh-story/skills/story-import/references/state-tracking.md +4 -69
  130. package/lib/oh-story/skills/story-import/references/structure-mapping-long.md +10 -8
  131. package/lib/oh-story/skills/story-import/references/tracking-initialization.md +31 -0
  132. package/lib/oh-story/skills/story-import/references/tracking-transaction.md +9 -34
  133. package/lib/oh-story/skills/story-import/scripts/check-outline-contract.js +197 -15
  134. package/lib/oh-story/skills/story-import/scripts/tracking_commit.py +210 -2
  135. package/lib/oh-story/skills/story-import/scripts/wordcount_core.py +3 -0
  136. package/lib/oh-story/skills/story-long-analyze/SKILL.md +91 -258
  137. package/lib/oh-story/skills/story-long-analyze/references/author-facing.md +245 -0
  138. package/lib/oh-story/skills/story-long-analyze/references/deconstruction-notes.md +2 -2
  139. package/lib/oh-story/skills/story-long-analyze/references/inspiration-library.md +105 -0
  140. package/lib/oh-story/skills/story-long-analyze/references/material-decomposition.md +113 -105
  141. package/lib/oh-story/skills/story-long-analyze/references/output-templates.md +169 -125
  142. package/lib/oh-story/skills/story-long-analyze/references/pipeline-ops.md +172 -64
  143. package/lib/oh-story/skills/story-long-analyze/references/semantic-acceptance-fixtures.md +84 -0
  144. package/lib/oh-story/skills/story-long-analyze/references/style-profile-generator.md +42 -132
  145. package/lib/oh-story/skills/story-long-analyze/references/style-profile-protocol.md +5 -5
  146. package/lib/oh-story/skills/story-long-analyze/scripts/build_chapter_index.py +466 -0
  147. package/lib/oh-story/skills/story-long-analyze/scripts/inspect_existing_assets.py +702 -0
  148. package/lib/oh-story/skills/story-long-analyze/scripts/inspiration_index.py +864 -0
  149. package/lib/oh-story/skills/story-long-analyze/scripts/manage_analysis_run.py +1106 -0
  150. package/lib/oh-story/skills/story-long-analyze/scripts/render_relation_chart.py +425 -0
  151. package/lib/oh-story/skills/story-long-scan/SKILL.md +4 -1
  152. package/lib/oh-story/skills/story-long-write/SKILL.md +52 -216
  153. package/lib/oh-story/skills/story-long-write/references/anti-ai-writing.md +29 -56
  154. package/lib/oh-story/skills/story-long-write/references/artifact-protocols.md +72 -12
  155. package/lib/oh-story/skills/story-long-write/references/author-memory.md +61 -29
  156. package/lib/oh-story/skills/story-long-write/references/banned-words.md +3 -1
  157. package/lib/oh-story/skills/story-long-write/references/benchmark-recall.md +20 -0
  158. package/lib/oh-story/skills/story-long-write/references/cross-book-recall.md +26 -0
  159. package/lib/oh-story/skills/story-long-write/references/dialogue-mastery.md +10 -4
  160. package/lib/oh-story/skills/story-long-write/references/emotional-methods.md +2 -2
  161. package/lib/oh-story/skills/story-long-write/references/long-chapter-quality.md +6 -15
  162. package/lib/oh-story/skills/story-long-write/references/long-format.md +2 -0
  163. package/lib/oh-story/skills/story-long-write/references/outline-structure-theory.md +2 -0
  164. package/lib/oh-story/skills/story-long-write/references/project-files.md +110 -0
  165. package/lib/oh-story/skills/story-long-write/references/reader-contract-and-progression.md +12 -4
  166. package/lib/oh-story/skills/story-long-write/references/reference-index.md +86 -0
  167. package/lib/oh-story/skills/story-long-write/references/style-combat-face.md +1 -1
  168. package/lib/oh-story/skills/story-long-write/references/style-craft.md +9 -29
  169. package/lib/oh-story/skills/story-long-write/references/style-genre-modules.md +1 -1
  170. package/lib/oh-story/skills/story-long-write/references/style-resolution.md +27 -0
  171. package/lib/oh-story/skills/story-long-write/references/tracking-initialization.md +31 -0
  172. package/lib/oh-story/skills/story-long-write/references/tracking-transaction.md +9 -34
  173. package/lib/oh-story/skills/story-long-write/references/workflow-chapter.md +88 -118
  174. package/lib/oh-story/skills/story-long-write/references/workflow-daily.md +55 -119
  175. package/lib/oh-story/skills/story-long-write/references/workflow-revision.md +15 -11
  176. package/lib/oh-story/skills/story-long-write/references/workflow-setup.md +73 -54
  177. package/lib/oh-story/skills/story-long-write/references/writer-prompt-fallback.md +22 -0
  178. package/lib/oh-story/skills/story-long-write/references/writing-craft.md +63 -4
  179. package/lib/oh-story/skills/story-long-write/scripts/author_memory_commit.py +934 -170
  180. package/lib/oh-story/skills/story-long-write/scripts/build_writer_prompt.py +531 -0
  181. package/lib/oh-story/skills/story-long-write/scripts/check-ai-patterns.js +6 -1
  182. package/lib/oh-story/skills/story-long-write/scripts/check-degeneration.js +39 -20
  183. package/lib/oh-story/skills/story-long-write/scripts/check-outline-contract.js +197 -15
  184. package/lib/oh-story/skills/story-long-write/scripts/check-outline-copy.js +90 -23
  185. package/lib/oh-story/skills/story-long-write/scripts/normalize-punctuation.js +10 -5
  186. package/lib/oh-story/skills/story-long-write/scripts/outline_view.py +285 -0
  187. package/lib/oh-story/skills/story-long-write/scripts/storyctl.py +58 -0
  188. package/lib/oh-story/skills/story-long-write/scripts/style-whitelist.js +39 -0
  189. package/lib/oh-story/skills/story-long-write/scripts/tracking_commit.py +210 -2
  190. package/lib/oh-story/skills/story-long-write/scripts/wordcount_core.py +3 -0
  191. package/lib/oh-story/skills/story-review/SKILL.md +80 -87
  192. package/lib/oh-story/skills/story-review/references/anti-ai-writing.md +29 -56
  193. package/lib/oh-story/skills/story-review/references/author-memory.md +61 -29
  194. package/lib/oh-story/skills/story-review/references/banned-words.md +3 -1
  195. package/lib/oh-story/skills/story-review/references/dialogue-mastery.md +10 -4
  196. package/lib/oh-story/skills/story-review/references/review-quality.md +6 -12
  197. package/lib/oh-story/skills/story-review/references/style-resolution.md +27 -0
  198. package/lib/oh-story/skills/story-review/references/tracking-initialization.md +31 -0
  199. package/lib/oh-story/skills/story-review/references/tracking-transaction.md +9 -34
  200. package/lib/oh-story/skills/story-review/scripts/author_memory_commit.py +934 -170
  201. package/lib/oh-story/skills/story-review/scripts/check-ai-patterns.js +6 -1
  202. package/lib/oh-story/skills/story-review/scripts/check-degeneration.js +39 -20
  203. package/lib/oh-story/skills/story-review/scripts/normalize-punctuation.js +10 -5
  204. package/lib/oh-story/skills/story-review/scripts/style-whitelist.js +39 -0
  205. package/lib/oh-story/skills/story-review/scripts/tracking_commit.py +210 -2
  206. package/lib/oh-story/skills/story-review/scripts/wordcount_core.py +3 -0
  207. package/lib/oh-story/skills/story-setup/SKILL.md +58 -43
  208. package/lib/oh-story/skills/story-setup/references/agent-references/anti-ai-writing.md +29 -56
  209. package/lib/oh-story/skills/story-setup/references/agent-references/banned-words.md +3 -1
  210. package/lib/oh-story/skills/story-setup/references/agent-references/deslop-gates.md +154 -0
  211. package/lib/oh-story/skills/story-setup/references/agent-references/dialogue-mastery.md +10 -4
  212. package/lib/oh-story/skills/story-setup/references/agent-references/format-and-structure.md +2 -2
  213. package/lib/oh-story/skills/story-setup/references/agent-references/long-emotional-methods.md +2 -2
  214. package/lib/oh-story/skills/story-setup/references/agent-references/long-quality.md +1 -1
  215. package/lib/oh-story/skills/story-setup/references/agent-references/short-genre-formulas.md +1 -1
  216. package/lib/oh-story/skills/story-setup/references/agent-references/style-combat-face.md +1 -1
  217. package/lib/oh-story/skills/story-setup/references/agent-references/style-genre-modules.md +1 -1
  218. package/lib/oh-story/skills/story-setup/references/agent-references/style-resolution.md +27 -0
  219. package/lib/oh-story/skills/story-setup/references/agent-references/writing-craft.md +63 -4
  220. package/lib/oh-story/skills/story-setup/references/diagnostics.md +38 -0
  221. package/lib/oh-story/skills/story-short-analyze/SKILL.md +22 -3
  222. package/lib/oh-story/skills/story-short-analyze/references/analysis-writing-techniques.md +1 -1
  223. package/lib/oh-story/skills/story-short-analyze/references/material-decomposition.md +5 -1
  224. package/lib/oh-story/skills/story-short-analyze/references/source-story-quality.md +2 -2
  225. package/lib/oh-story/skills/story-short-scan/SKILL.md +5 -1
  226. package/lib/oh-story/skills/story-short-write/SKILL.md +15 -324
  227. package/lib/oh-story/skills/story-short-write/references/author-memory.md +61 -29
  228. package/lib/oh-story/skills/story-short-write/references/banned-words.md +3 -1
  229. package/lib/oh-story/skills/story-short-write/references/benchmark-recall.md +60 -0
  230. package/lib/oh-story/skills/story-short-write/references/dialogue-mastery.md +10 -4
  231. package/lib/oh-story/skills/story-short-write/references/genre-styles//344/270/226/346/203/205/346/211/223/350/204/270.md +2 -2
  232. package/lib/oh-story/skills/story-short-write/references/genre-styles//345/217/214/347/224/267/344/270/273.md +1 -1
  233. package/lib/oh-story/skills/story-short-write/references/genre-styles//345/244/215/344/273/207/346/211/223/350/204/270.md +3 -3
  234. package/lib/oh-story/skills/story-short-write/references/genre-styles//345/256/205/346/226/227/345/256/253/346/226/227.md +3 -3
  235. package/lib/oh-story/skills/story-short-write/references/genre-styles//346/200/273/350/243/201/350/261/252/351/227/250.md +3 -3
  236. package/lib/oh-story/skills/story-short-write/references/genre-styles//346/202/254/347/226/221.md +5 -5
  237. package/lib/oh-story/skills/story-short-write/references/genre-styles//346/260/221/344/277/227/346/200/252/350/260/210.md +4 -4
  238. package/lib/oh-story/skills/story-short-write/references/genre-styles//347/224/234/345/256/240.md +5 -5
  239. package/lib/oh-story/skills/story-short-write/references/genre-styles//350/277/275/345/246/273/347/201/253/350/221/254/345/234/272.md +3 -3
  240. package/lib/oh-story/skills/story-short-write/references/genre-writing-formulas.md +1 -1
  241. package/lib/oh-story/skills/story-short-write/references/genre-writing-techniques.md +1 -1
  242. package/lib/oh-story/skills/story-short-write/references/reference-index.md +55 -0
  243. package/lib/oh-story/skills/story-short-write/references/short-craft.md +12 -14
  244. package/lib/oh-story/skills/story-short-write/references/short-deslop.md +10 -10
  245. package/lib/oh-story/skills/story-short-write/references/short-format.md +3 -1
  246. package/lib/oh-story/skills/story-short-write/references/short-prose-quality.md +2 -2
  247. package/lib/oh-story/skills/story-short-write/references/style-resolution.md +27 -0
  248. package/lib/oh-story/skills/story-short-write/references/workflow-design.md +78 -0
  249. package/lib/oh-story/skills/story-short-write/references/workflow-draft.md +126 -0
  250. package/lib/oh-story/skills/story-short-write/references/workflow-revision.md +32 -0
  251. package/lib/oh-story/skills/story-short-write/references/writing-workflow.md +5 -5
  252. package/lib/oh-story/skills/story-short-write/scripts/author_memory_commit.py +934 -170
  253. package/lib/oh-story/skills/story-short-write/scripts/check-ai-patterns.js +6 -1
  254. package/lib/oh-story/skills/story-short-write/scripts/check-degeneration.js +39 -20
  255. package/lib/oh-story/skills/story-short-write/scripts/check-delivery-contract.js +34 -5
  256. package/lib/oh-story/skills/story-short-write/scripts/check-outline-copy.js +90 -23
  257. package/lib/oh-story/skills/story-short-write/scripts/normalize-punctuation.js +10 -5
  258. package/lib/oh-story/skills/story-short-write/scripts/style-whitelist.js +39 -0
  259. package/lib/types/client/drama-production-view.d.ts.map +1 -1
  260. package/lib/types/client/file-activity.d.ts +19 -1
  261. package/lib/types/client/file-activity.d.ts.map +1 -1
  262. package/lib/types/client/index.d.ts.map +1 -1
  263. package/lib/types/client/production-prompts.d.ts +7 -0
  264. package/lib/types/client/production-prompts.d.ts.map +1 -1
  265. package/lib/types/client/production-runtime.d.ts +33 -0
  266. package/lib/types/client/production-runtime.d.ts.map +1 -1
  267. package/lib/types/drama-adapters.d.ts +5 -3
  268. package/lib/types/drama-adapters.d.ts.map +1 -1
  269. package/lib/types/native-hooks.d.ts +52 -0
  270. package/lib/types/native-hooks.d.ts.map +1 -1
  271. package/lib/types/role-identity.d.ts +17 -0
  272. package/lib/types/role-identity.d.ts.map +1 -0
  273. package/lib/types/role-tool.d.ts.map +1 -1
  274. package/lib/types/skill-provider.d.ts.map +1 -1
  275. package/lib/video-recap/CHANGELOG.md +31 -1
  276. package/lib/video-recap/manifest.json +162 -162
  277. package/lib/video-recap/skills/video-assemble/scripts/artifacts.py +4 -9
  278. package/lib/video-recap/skills/video-assemble/scripts/assemble.py +47 -60
  279. package/lib/video-recap/skills/video-assemble/scripts/assembly_contract.py +77 -115
  280. package/lib/video-recap/skills/video-assemble/scripts/assembly_settings.py +41 -40
  281. package/lib/video-recap/skills/video-assemble/scripts/audio_automation.py +22 -32
  282. package/lib/video-recap/skills/video-assemble/scripts/audio_mix.py +102 -192
  283. package/lib/video-recap/skills/video-assemble/scripts/jianying_builders.py +14 -35
  284. package/lib/video-recap/skills/video-assemble/scripts/jianying_model.py +14 -12
  285. package/lib/video-recap/skills/video-assemble/scripts/jianying_optional.py +8 -9
  286. package/lib/video-recap/skills/video-assemble/scripts/jianying_schema.py +3 -14
  287. package/lib/video-recap/skills/video-assemble/scripts/jianying_timeline_contract.py +23 -12
  288. package/lib/video-recap/skills/video-assemble/scripts/jianying_tracks.py +1 -4
  289. package/lib/video-recap/skills/video-assemble/scripts/jianying_writer.py +24 -25
  290. package/lib/video-recap/skills/video-assemble/scripts/lib.py +31 -85
  291. package/lib/video-recap/skills/video-assemble/scripts/media.py +100 -144
  292. package/lib/video-recap/skills/video-assemble/scripts/narration_audio.py +101 -195
  293. package/lib/video-recap/skills/video-assemble/scripts/render_preflight.py +10 -21
  294. package/lib/video-recap/skills/video-assemble/scripts/source_subtitles.py +90 -169
  295. package/lib/video-recap/skills/video-assemble/scripts/subtitle_core.py +69 -122
  296. package/lib/video-recap/skills/video-assemble/scripts/subtitle_render.py +10 -17
  297. package/lib/video-recap/skills/video-assemble/scripts/timeline.py +33 -48
  298. package/lib/video-recap/skills/video-assemble/scripts/timeline_emit.py +14 -20
  299. package/lib/video-recap/skills/video-assemble/scripts/visual_render.py +135 -213
  300. package/lib/video-recap/skills/video-cut/scripts/cut_cli.py +49 -57
  301. package/lib/video-recap/skills/video-cut/scripts/cut_contract.py +38 -74
  302. package/lib/video-recap/skills/video-cut/scripts/cut_render.py +46 -95
  303. package/lib/video-recap/skills/video-cut/scripts/lib.py +23 -25
  304. package/lib/video-recap/skills/video-cut/scripts/media_geometry.py +70 -173
  305. package/lib/video-recap/skills/video-cut/scripts/narration_mapping.py +28 -53
  306. package/lib/video-recap/skills/video-cut/scripts/sentence_boundaries.py +162 -322
  307. package/lib/video-recap/skills/video-recap/references/timeline-and-jianying.md +6 -7
  308. package/lib/video-recap/skills/video-recap/scripts/doctor.py +104 -124
  309. package/lib/video-recap/skills/video-recap/scripts/final_qc.py +255 -412
  310. package/lib/video-recap/skills/video-recap/scripts/lib.py +30 -52
  311. package/lib/video-recap/skills/video-recap/scripts/materials.py +97 -120
  312. package/lib/video-recap/skills/video-recap/scripts/mimo_qc_client.py +7 -12
  313. package/lib/video-recap/skills/video-recap/scripts/mimo_qc_evidence.py +46 -97
  314. package/lib/video-recap/skills/video-recap/scripts/mimo_qc_observations.py +18 -36
  315. package/lib/video-recap/skills/video-recap/scripts/mimo_qc_payload.py +29 -47
  316. package/lib/video-recap/skills/video-recap/scripts/mimo_qc_report.py +43 -76
  317. package/lib/video-recap/skills/video-recap/scripts/mimo_qc_runner.py +2 -1
  318. package/lib/video-recap/skills/video-recap/scripts/qc_contract.py +2 -1
  319. package/lib/video-recap/skills/video-recap/scripts/recap_cli.py +2 -2
  320. package/lib/video-recap/skills/video-recap/scripts/recap_inspect.py +129 -145
  321. package/lib/video-recap/skills/video-recap/scripts/recap_review.py +27 -20
  322. package/lib/video-recap/skills/video-recap/scripts/recap_runner.py +20 -31
  323. package/lib/video-recap/skills/video-recap/scripts/recap_runtime.py +31 -106
  324. package/lib/video-recap/skills/video-recap/scripts/recap_stage_qc.py +43 -113
  325. package/lib/video-recap/skills/video-recap/scripts/recap_timeline.py +196 -377
  326. package/lib/video-recap/skills/video-script/scripts/agent_brief.py +1 -1
  327. package/lib/video-recap/skills/video-script/scripts/agent_text.py +63 -172
  328. package/lib/video-recap/skills/video-script/scripts/brief_context.py +80 -135
  329. package/lib/video-recap/skills/video-script/scripts/brief_inputs.py +125 -167
  330. package/lib/video-recap/skills/video-script/scripts/brief_timeline.py +93 -208
  331. package/lib/video-recap/skills/video-script/scripts/deslop_qc.py +20 -46
  332. package/lib/video-recap/skills/video-script/scripts/lib.py +30 -26
  333. package/lib/video-recap/skills/video-script/scripts/narration_lint.py +145 -140
  334. package/lib/video-recap/skills/video-script/scripts/review_response.py +12 -42
  335. package/lib/video-recap/skills/video-script/scripts/review_runner.py +0 -6
  336. package/lib/video-recap/skills/video-script/scripts/speech_ownership.py +39 -100
  337. package/lib/video-recap/skills/video-script/scripts/timeline_fusion.py +33 -124
  338. package/lib/video-recap/skills/video-understanding/scripts/agent_brief.py +1 -1
  339. package/lib/video-recap/skills/video-understanding/scripts/agent_text.py +63 -172
  340. package/lib/video-recap/skills/video-understanding/scripts/asr.py +1 -2
  341. package/lib/video-recap/skills/video-understanding/scripts/brief_context.py +80 -135
  342. package/lib/video-recap/skills/video-understanding/scripts/brief_inputs.py +125 -167
  343. package/lib/video-recap/skills/video-understanding/scripts/brief_timeline.py +93 -208
  344. package/lib/video-recap/skills/video-understanding/scripts/consolidate.py +1 -1
  345. package/lib/video-recap/skills/video-understanding/scripts/deslop_qc.py +20 -46
  346. package/lib/video-recap/skills/video-understanding/scripts/lib.py +31 -26
  347. package/lib/video-recap/skills/video-understanding/scripts/narration_lint.py +145 -140
  348. package/lib/video-recap/skills/video-understanding/scripts/speech_ownership.py +39 -100
  349. package/lib/video-recap/skills/video-understanding/scripts/timeline_fusion.py +33 -124
  350. package/lib/video-recap/skills/video-understanding/scripts/vlm.py +1 -4
  351. package/lib/video-recap/skills/video-voiceover/scripts/dub.py +7 -13
  352. package/lib/video-recap/skills/video-voiceover/scripts/fish_audio.py +12 -30
  353. package/lib/video-recap/skills/video-voiceover/scripts/lib.py +98 -131
  354. package/lib/video-recap/skills/video-voiceover/scripts/tts_audio.py +17 -28
  355. package/lib/video-recap/skills/video-voiceover/scripts/voiceover.py +151 -240
  356. package/package.json +45 -45
  357. package/lib/novel-to-game/skills/game-world-design/references/dialogue-design-method.md +0 -59
  358. package/lib/novel-to-game/skills/game-world-design/references/game-writing-craft.md +0 -53
  359. package/lib/novel-to-game/skills/novel-to-game/references/intake-benchmark-reference.md +0 -42
  360. package/lib/oh-story/skills/story-long-write/references/state-tracking.md +0 -108
@@ -0,0 +1,110 @@
1
+ # 项目文件与产物协议
2
+
3
+ #### 项目文件结构
4
+
5
+ 需落盘时在用户指定目录按下表组织;只讨论不建工程,仅规划只创建本次产物所需目录,不为凑齐目录树生成正文或追踪:
6
+
7
+ ```
8
+ {书名}/
9
+ ├── 设定/
10
+ │ ├── 世界观/
11
+ │ │ ├── 背景设定.md # 时代背景、地理、历史
12
+ │ │ ├── 力量体系.md # 修炼/能力/等级体系
13
+ │ │ └── ...
14
+ │ ├── 角色/
15
+ │ │ ├── 沈栀.md # 每个人物一个文件,文件名用角色名
16
+ │ │ └── ...
17
+ │ ├── 势力/
18
+ │ │ ├── 天机阁.md # 每个势力/组织一个文件
19
+ │ │ └── ...
20
+ │ ├── 关系.md # 角色关系映射
21
+ │ ├── 题材定位.md # 题材核心梗+对标分析+终局底牌/升级台阶(防写无可写)
22
+ │ └── 题材正文提示卡.md # 题材正文核心:边界/期待/爽点/节奏/禁漂移
23
+ ├── 大纲/
24
+ │ ├── 大纲.md # 全书卷级结构
25
+ │ ├── 卷纲_第一卷.md # 每卷一个:对标结构坐标+剧情单元+情绪弧线(含章节定位)+人物弧线+伏笔+反转
26
+ │ └── 细纲_第001章.md # 每章一个:章节定位+事件+钩子(按章节定位,章首/章尾/段落级)+爽点+悬念
27
+ ├── 正文/
28
+ │ ├── 第001章_章名.md
29
+ │ └── ...
30
+ ├── 对标/ ← 拆文产出的结构化资产
31
+ │ └── {对标书名}/
32
+ │ ├── 原文/
33
+ │ │ ├── 第001章_章名.md
34
+ │ │ └── ...
35
+ │ ├── 角色/ ← 从拆文库/结构化输出同步
36
+ │ │ └── {角色名}.md
37
+ │ ├── 剧情/ ← 从拆文库/结构化输出同步
38
+ │ │ ├── {剧情单元名}.md
39
+ │ │ ├── 故事线.md
40
+ │ │ ├── 节奏.md # 关键信息推进 + 情绪触动点 + 爆发节奏(权威节奏索引)
41
+ │ │ └── 情绪模块.md # 读者需求/情绪引擎 + 可复现模块(权威模块索引)
42
+ │ ├── 设定/ ← 从拆文库/结构化输出同步
43
+ │ │ ├── 世界观/ ← 按主题拆分到子目录
44
+ │ │ │ ├── 背景设定.md
45
+ │ │ │ ├── 力量体系.md
46
+ │ │ │ ├── 地理.md
47
+ │ │ │ └── 金手指.md
48
+ │ │ └── 势力/
49
+ │ │ └── {势力名}.md
50
+ │ └── 拆文报告.md
51
+ ├── 追踪/
52
+ │ ├── _tracking-state.json ← 唯一结构化权威状态
53
+ │ ├── 上下文.md ← 派生续写状态卡(固定 7 栏),≤12KB
54
+ │ ├── 逐章记录/第NNN章.md ← 未来相关紧凑记录,≤3072 字节
55
+ │ ├── 角色状态/{角色名}.md ← 派生核心角色当前快照
56
+ │ ├── 伏笔.md ← 派生伏笔当前视图
57
+ │ └── 时间线/{作者真相.md,读者已知.md}
58
+ ├── 参考资料/
59
+ │ └── {topic}.md # story-researcher 输出的研究资料
60
+ ├── .story/work/第NNN章/ ← 本章临时文件(分组 segment、prompt 留档、事务 JSON),提交后自动删除
61
+ ```
62
+
63
+ **产物映射表**(创建模板详见 [references/artifact-protocols.md](artifact-protocols.md)):
64
+
65
+ | 文件 | 粒度 | 创建阶段 | 读取时机 |
66
+ |------|------|---------|---------|
67
+ | 设定/关系.md | 全书 | Phase 2 | 按需:story-explorer relationship 查询、story-review 查设定(不在每章写作回路里逐章读) |
68
+ | 设定/题材定位.md(含 `主对标书` 字段,多对标时必填) | 全书 | Phase 2 | Phase 3 大纲、每卷开始前、Phase 4 写前召回 |
69
+ | 设定/题材正文提示卡.md | 全书/题材 | Phase 2(缺失则 Phase 4 写前即时生成) | Phase 4 每章写作前:按 `genre-prose-cards.md` 索引匹配后读取 `genre-prose-cards/` 目录对应单题材卡优先、`style-genre-modules.md` 通用模块兜底,与通用正文要求、情绪/节奏召回和文风一起组装 prompt |
70
+ | 设定/角色/{角色名}.md、设定/势力/{名}.md | 角色/势力 | Phase 3 细纲后增量补全(首批含主角/主要角色) | Phase 4 状态筛选/写作 |
71
+ | 设定/文风.md(自定义文风·优先级最高) | 本书 | 用户自写(Claude Code 可代写);导入/拆解不覆盖 | Phase 4 每章写作前:含实质内容则取代对标文风作权威风格基 |
72
+ | 对标/{书名}/文风.md | 对标书 | analyze Stage 6 输出 → story-import 显式绑定或本 skill 首次引用时同步 | Phase 4 每章写作前(文风召回;有自定义文风时降为参考/句长兜底) |
73
+ | 大纲/卷纲_第X卷.md | 卷 | Phase 3 | **一律走取段器 `outline_view.py --unit/--contract/--toc`,不整读**(见「路径与术语约定」);段位契约与 checker 见 artifact-protocols.md |
74
+ | 追踪/_tracking-state.json | 全书 | 首次写正文前初始化(规划阶段不建) | 唯一结构化权威,不进正文 prompt;每章运行 `tracking_commit.py check` 读取章号和修订号 |
75
+ | 追踪/伏笔.md | 全书当前视图 | 与 state 同时初始化 | 续写状态卡缺项时按 ID 定点查询;每 ID 只一行 |
76
+ | 追踪/时间线/{作者真相.md,读者已知.md} | 全书当前事实/认知派生视图 | 与 state 同时初始化 | 按作者真相或读者认知的实际问题选择视图 |
77
+ | 对标/{书名}/拆文报告.md | 对标书 | 用户手动+analyze | Phase 2 核心设定、Phase 3 大纲、Phase 4 写作 |
78
+ | 追踪/逐章记录/第NNN章.md | 章 | Phase 4 每章事务 | 日更不读;目标 ≤1536 字节、硬上限 3072 字节,按需查询历史原因 |
79
+ | 追踪/上下文.md(续写状态卡,≤12KB) | 全书当前状态 | 与 state 同时初始化 | 日更每章整份读;由事务工具整份重建,固定 7 栏 |
80
+ | 参考资料/{topic}.md | 按需 | Phase 4(story-researcher 输出) | Phase 4 后续章节写作时复用 |
81
+ | 追踪/角色状态/{角色名}.md | 核心角色 | 首次进入正文或导入初始化 | 久别角色按名读取一个小快照;目标 ≤4096 字节、硬上限 8192 字节;静态人设仍读 `设定/角色/` |
82
+ | 对标/{书名}/角色/{角色名}.md | 对标书 | analyze 输出 | Phase 4 模块召回(角色参考) |
83
+ | 对标/{书名}/剧情/{剧情单元名}.md | 对标书 | analyze 输出 | Phase 3 卷纲选段与细纲成批(剧情单元卡「对标剧情参照」)、Phase 4 模块召回(剧情模块参考) |
84
+ | 对标/{书名}/剧情/情绪模块.md | 对标书 | analyze Stage 3 输出 → story-import 显式绑定或本 skill 首次引用时同步 | Phase 2 核心设定、Phase 3 大纲、Phase 4 每章写作前(读者需求 / 情绪引擎、可复现模块选择) |
85
+ | 对标/{书名}/剧情/节奏.md | 对标书 | analyze Stage 3 输出 → story-import 显式绑定或本 skill 首次引用时同步 | Phase 3 大纲、Phase 4 每章写作前(关键信息推进、情绪触动点、爆发节奏参考) |
86
+ | 对标/{书名}/设定/*.md | 对标书 | analyze 输出 | Phase 2 设定参考、Phase 4 世界观约束 |
87
+
88
+ **缺失文件处理**:先按进度、报告总章数与逐章覆盖识别资料代际;当前契约缺项时显式修复,不拼装降级结果:
89
+ 1. **角色状态文件缺失** → 当前协议项目先运行 `tracking_commit.py check`,再重跑产生该状态的完整事务;已有正文但 `_tracking-state.json` 缺失时重新 `/story-import`。不得从前文临时推断后直接手写快照。
90
+ 2. **角色、普通剧情单元或设定等非主产物子目录缺失** → 按「对标书路径查找」查找项目视图与根目录数据源,仍缺失则跳过该可选模块。本条不适用于 `剧情/情绪模块.md` 和 `剧情/节奏.md`。
91
+ 3. **当前契约的 `剧情/情绪模块.md` / `剧情/节奏.md` 缺失** → 写前准备必须停下,设置 `missing_primary_contract: true` 并给出 `repair_action`:重跑 `/story-long-analyze` Stage 3+ 或重新 `/story-import`,不得用摘要文件假装已召回权威模块。
92
+ 4. **有对标书但 `文风.md` 缺失** → 若有 `设定/文风.md`(含实质内容)走自定义文风模式继续;否则日更文风召回 fail-fast,提示先运行 `/story-long-analyze` Stage 6 并 `/story-import` 同步。**完全无对标项目**则跳过文风召回、不阻塞(有 `设定/文风.md` 时用它写作)。情绪/节奏轴(`missing_primary_contract`)独立,自定义文风模式不豁免其 fail-fast。
93
+ 5. **伏笔/时间线文件缺失** → 视为当前语义检查点损坏,停止写正文;先运行 `tracking_commit.py check`,再用事务修复。卷纲/大纲中的计划不能代替已发生事实的当前检查点。
94
+ 6. **`设定/题材正文提示卡.md` 缺失** → 不阻塞;写前从 `设定/题材定位.md` 精确匹配 `references/genre-prose-cards.md` 索引,并只读取 `references/genre-prose-cards/` 中对应题材单卡(高/中/低置信照原卡标注),无命中再用 `references/style-genre-modules.md` 通用流派模块即时生成短 `genre_prose_card`。只有 `设定/题材定位.md` 也缺失时,退回细纲和目标平台做低置信题材卡,并在意图确认写明。
95
+
96
+ **对标分析权威优先级(权威读取顺序)**:
97
+ 1. `剧情/情绪模块.md` 是读者需求 / 情绪引擎、爽文套路框架、可复现模块和重组指南的权威来源。
98
+ 2. `剧情/节奏.md` 是关键信息推进、章节扩写技法聚合、情绪触动点和爆发节奏的权威来源。
99
+ 3. `文风.md` 只管句长、标点、对话潜台词、原文锚点等风格;它不能覆盖情绪模块或节奏意图。**自定义文风 `设定/文风.md`(用户自写、不被导入/拆解覆盖)优先级高于对标 `文风.md`**:含实质内容时作权威风格基,对标文风降为参考与句长数值兜底;句长、停顿标点、视角与修辞按 `references/style-resolution.md` 裁决;段间空行等文件结构仍按交付协议,不把通用表达禁令称为硬安全线。
100
+ 4. `章节/第K章_摘要.md` 是具体章节证据,用来校验和补足权威索引,不反向覆盖 `情绪模块.md` / `节奏.md`。
101
+ 5. `拆文报告.md`、`剧情/故事线.md` 是投影/摘要;若与 `剧情/情绪模块.md` 或 `剧情/节奏.md` 冲突,写作以两个权威文件为准,并在写前准备 `gaps.conflict` 记录冲突来源。
102
+ 6. **公共灵感召回**(工作区有 `灵感库/` 时)按任务标签选 Top 3–8 张 active CBA;不传 IA/NM,不把灵感卡当风格样本;灵感卡只影响设计选择,与上述权威文件或细纲事实冲突时以后者为准。
103
+
104
+ **文件组织原则:**
105
+ - **人物一个一个文件**:`角色/角色名.md`,方便按需读取
106
+ - **势力一个一个文件**:`势力/势力名.md`,组织/门派/家族/国家等
107
+ - **世界观按主题拆分**:背景、力量体系、社会结构等各自独立
108
+ - **细纲一章一个文件**:`细纲_第XXX章.md`,含钩子设计,与正文一一对应
109
+ - **正文按章拆分**:每章一个文件,`第XXX章_章名.md`
110
+ - 每章写完直接写入 `正文/` 目录,不要先输出到对话
@@ -1,15 +1,23 @@
1
1
  # 读者契约与终局储备
2
2
 
3
- 本文件是 `story-long-write` 关于读者契约、主角代理权(叙事能动性/主导性)、利益安全与阶段推进的权威参考文件。相关洞察由授权社区样本提炼而来;样本多数是问题帖/避坑帖,属于非统计共识,也不能替代具体题材、平台和对标书判断。
3
+ 本文件是 `story-long-write` 关于读者契约、主角代理权(叙事能动性/主导性)、利益安全与阶段推进的权威参考文件。洞察来自授权社区的避坑样本,是经验共识,不替代具体题材、平台和对标书判断。
4
4
 
5
5
  **安全边界**:本文件不得包含来源站点隐私数据、访问凭证、cookies、tokens、请求签名、私有标识符,或任何能反推出私域账号/请求环境的信息。
6
6
 
7
+ ## 0. 契约四问(排纲、写正文、批末核对只用这四问)
8
+
9
+ 1. 主角是不是靠自己的选择挣到了结果?(因果权 + 结算权,拿不准过「关键节点四问」)
10
+ 2. 核心收益或高光有没有被配角、机构或巧合无交换地拿走?(期待所有权、利益安全)
11
+ 3. 有没有动用本阶段还不该解锁的终局底牌,或把某条升级线顶到天花板?(终局储备、透支两问)
12
+ 4. 旧期待付了利息没,又给读者留了什么期待?新地图、新机构、新谜团有没有被拿来逃避旧承诺?(期待债、换书债)
13
+
14
+ 四问都过=契约安全;有一问勉强但能靠铺垫/交换/成本补上=需补强;补不上=契约破坏。答不上来的那问再读下面对应小节。
15
+
7
16
  ## 1. 核心概念
8
17
 
9
18
  ### 读者契约
10
19
  - 读者契约 = 开篇、题材、主角配置、叙事口吻共同许诺的阅读快感。
11
20
  - 写作前先确认:读者是来看主角解决问题、见证团队群像、看导师托举后辈,还是看制度合作建设?不同契约下同一情节风险不同。
12
- - 题材边界先于单条禁忌:政府、宗门总部、跨国组织、多国公司等高层级机构一出现,可能开启制度/势力范围情节线;先检查本书是否从开篇承诺了这种玩法。
13
21
 
14
22
  ### 主角代理权:因果权 + 结算权
15
23
  - 主角代理权首先看**因果权 + 结算权**,不看出场时长,也不要求主角永远亲自动手或垄断每个镜头。
@@ -23,7 +31,7 @@
23
31
  - 群像、导师或制度合作可把期待所有权明确给团队成员/学生/机构角色;关键是预先承诺、按约结算,而非事后解释抢戏合理。
24
32
 
25
33
  ### 关键节点四问
26
- 大纲、正文与审查遇到关键节点时统一问;答案可以指向主角,也可以指向本卷已承诺的其他所有者,不要求主角亲自完成每个动作:
34
+ 第一问拿不准时逐条问(可指向本卷已承诺的其他所有者):
27
35
  1. 谁决定事情为什么发生/如何进入?
28
36
  2. 谁作出不可替代的关键选择?
29
37
  3. 谁承担或选择关键后果?
@@ -57,7 +65,7 @@
57
65
  1. 是否动用了本阶段还不该解锁的终局底牌(宿敌了结、终极真相、身份终点、金手指触顶)?
58
66
  2. 是否让某条升级线逼近天花板、后面没台阶接?
59
67
 
60
- 任一为“是” = 真正的透支预警 → 回退或改纲;两者皆否,多线齐涨放行。这套判定是经验法则,档位与里程碑按本书题材、平台与对标调整,不是硬门槛。
68
+ 任一为“是” = 真正的透支预警 → 回退或改纲;两者皆否,多线齐涨放行。档位与里程碑按本书题材、平台与对标调整,不是硬门槛。
61
69
 
62
70
  ### 合理化债务
63
71
  - 解释成本用于说明机构响应/接管、保密、资源调动、跨区执法、组织协作等为什么成立。
@@ -0,0 +1,86 @@
1
+ # 长篇参考资料索引
2
+
3
+ ## 参考资料索引
4
+
5
+ 按场景加载 workflow,以下技法按需补充。
6
+
7
+ ### Phase 1:选题方向
8
+
9
+ | 场景 | 加载文件 |
10
+ |------|---------|
11
+ | 确定题材类型 | `references/long-genre-catalog.md` |
12
+ | 判断市场方向 | `references/genre-readers.md` |
13
+ | 特殊题材考量 | `references/plot-special-topics.md` |
14
+ | 女频长篇(题材/文案/平台/感情线) | `references/female-audience-writing.md` |
15
+
16
+ ### Phase 2:核心设定
17
+
18
+ | 场景 | 加载文件 |
19
+ |------|---------|
20
+ | 设定人物 | `references/character-basics.md` |
21
+ | 设计关系 | `references/character-relations.md` |
22
+ | 题材框架与定位 | `references/long-genre-catalog.md` + `references/long-genre-mechanics.md` |
23
+ | 创建 artifact | `references/artifact-protocols.md` |
24
+ | 读者契约与主角高光 | `references/reader-contract-and-progression.md` |
25
+
26
+ ### Phase 3:大纲搭建
27
+
28
+ | 场景 | 加载文件 |
29
+ |------|---------|
30
+ | 搭建大纲 | `references/outline-methods.md` |
31
+ | 设计矛盾与结构 | `references/outline-conflict.md` |
32
+ | 深度结构设计 | `references/outline-structure-theory.md` |
33
+ | 节奏与升级感 | `references/outline-rhythm.md` |
34
+ | 小纲与卡文 | `references/plot-core-methods.md` |
35
+ | 选择叙事框架 | `references/plot-frameworks.md` |
36
+ | 题材结构 | `references/genre-prose-cards.md` 索引 + `references/genre-prose-cards/` 单题材卡 |
37
+ | 黄金三章 | `references/opening-design.md` |
38
+ | 情绪弧线 | `references/emotional-arc-design.md` |
39
+ | 契约/终局储备/剧情单元契约四问 | `references/reader-contract-and-progression.md` |
40
+ | 反转设计 | `references/long-reversal.md` |
41
+ | 细纲结构验收 | `scripts/check-outline-contract.js`(新建/补建后跑,只判字段与表结构) |
42
+
43
+ ### Phase 4:正文写作
44
+
45
+ | 场景 | 加载文件 |
46
+ |------|---------|
47
+ | 章节钩子 | `references/long-chapter-hooks.md` |
48
+ | 悬念设计 | `references/long-suspense.md` |
49
+ | 题材正文提示卡 / 题材分类卡 | `references/genre-prose-cards.md` 索引 + `references/genre-prose-cards/` 单题材卡目录(按题材分类优先) + `references/style-genre-modules.md`(通用流派补充) |
50
+ | 打斗/装逼 | `references/style-combat-face.md` |
51
+ | 写作技法 | `references/style-craft.md` |
52
+ | 商业创作核心方法 | `references/commercial-core-methods.md` |
53
+ | 对话 | `references/dialogue-mastery.md` |
54
+ | 人物深化 | `references/character-design-methods.md` |
55
+ | 情绪技法 + 叙事单元 | `references/plot-emotion-system.md` + `references/emotional-methods.md` |
56
+ | 写作技法全程参考 | `references/writing-craft.md` |
57
+ | 格式 | `references/long-format.md`(章节、段落、对话、标点与工程元信息) |
58
+ | 当前剧情单元与契约校准 | `references/reader-contract-and-progression.md` |
59
+
60
+ ### Phase 5:质量检查
61
+
62
+ | 场景 | 加载文件 |
63
+ |------|---------|
64
+ | 质量检查 | `references/long-chapter-quality.md` + `references/reader-contract-and-progression.md` |
65
+ | 禁用词扫描 | `references/banned-words.md` |
66
+ | AI句式脚本复扫 | `scripts/check-ai-patterns.js` |
67
+ | 去AI味 | `references/anti-ai-writing.md` |
68
+
69
+ ### 按主题快速定位(横切主题)
70
+
71
+ 有些主题横跨多个阶段、散在多个文件里。下表给每个主题一个**权威文件**(先读它,通常够用),配套文件只在需要那个角度时再加载。括号是该文件里对应的小节。
72
+
73
+ | 主题 | 权威文件(先读) | 配套文件(按角度补充) |
74
+ |------|-----------------|----------------------|
75
+ | 爽点(按意图分流) | **`references/plot-emotion-system.md`**(爽点设计体系:本质/六种类型/倒推法——"怎么设计爽点"先读这个) | 翻盘/高潮式爽点→`references/plot-core-methods.md`(假胜→崩解)· 打脸/装逼释放→`references/style-combat-face.md`· 题材声线与长线约束→`references/genre-prose-cards.md`· 爽文循环/多层→`references/outline-methods.md`·`references/outline-conflict.md` |
76
+ | 情绪模块 | **`对标/{书名}/剧情/情绪模块.md`(项目/书级权威)**;无对标或设计新模块时再读 `references/plot-emotion-system.md` | `references/outline-rhythm.md` 只作理论参考;不得覆盖对标书权威模块 |
77
+ | 节奏 | **`对标/{书名}/剧情/节奏.md`(项目/书级权威)**;无对标或设计新节奏时再读 `references/outline-rhythm.md` | `references/plot-core-methods.md` 只作理论参考;不得覆盖对标书权威节奏 |
78
+ | 高潮 | **`references/plot-core-methods.md`**(高潮构建公式:蓄能→假胜→崩解) | `references/outline-rhythm.md`(高潮分类与反推)· `references/outline-methods.md`(八节点故事结构:结构定位) |
79
+ | 金手指 | **`references/plot-special-topics.md`**(金手指拆分理解与战力防崩 + 进阶设计) | `references/outline-conflict.md`(金手指与身份:四点统一) |
80
+ | 感情线 | **`references/character-relations.md`**(好感度体系/四阶段 + 男女频差异) | `references/outline-conflict.md`(感情线设计)· `references/style-combat-face.md`(后宫文女主 / 男频极简爱情线构型)· `references/plot-special-topics.md`(爱情线提纯策略) |
81
+ | 反转 | **`references/long-reversal.md`**(单元/卷级/全书反转、铺垫、有效性自检) | `references/plot-core-methods.md`(假胜:先给希望再击碎) |
82
+ | 人物 | **`references/character-basics.md`**(主角/配角/反派/动机模板速填) | `references/character-design-methods.md`(三层标签反差/九维深化)· `references/character-relations.md`(关系类型/感情线) |
83
+ | 女频写作 | **`references/female-audience-writing.md`**(女频长篇:核心原则/文案/题材/感情线长线/平台) | `references/genre-readers.md`(读者心理/平台差异)· `references/character-relations.md`(感情线总框架) |
84
+ | 去AI味 | **`references/anti-ai-writing.md`**(AI指纹/核心规则/Show Don't Tell) | `references/banned-words.md`(禁用词扫描)· `references/long-chapter-quality.md`(成稿检查) |
85
+
86
+ ---
@@ -17,7 +17,7 @@
17
17
  | 写新媒体/短平快装逼 | 新媒体写作与题材套路 |
18
18
  | 搭建装逼舞台 | 舞台搭建法 |
19
19
  | 打脸写了但不爽 | 检查:爽点释放到位法则 + 前置小无敌准备了吗 + 对手层级够不够 |
20
- | 战斗场景枯燥/流水账 | 检查:战斗描写三板斧 + 情绪调动三阶法 + 缺少感官细节和身体反应 |
20
+ | 战斗场景枯燥/流水账 | 检查:战斗描写三板斧 + 情绪调动三阶法 + 攻防选择、伤势和动作后果是否清楚 |
21
21
 
22
22
  ## 指令语气
23
23
 
@@ -17,7 +17,7 @@
17
17
 
18
18
  ## 指令语气
19
19
 
20
- 本文件以"操作指令"语气书写。所有规则都是**必须遵守**的写作约束。遇到冲突时:镜头式写作法的规则 > 基础技巧 > 认知类参考。
20
+ 本文件是默认技法库,按 [style-resolution.md](style-resolution.md) 服从当前请求、本书文风和 active 作者偏好;镜头法、视角和句长建议不作跨文风验收线。
21
21
 
22
22
  ---
23
23
 
@@ -109,12 +109,12 @@
109
109
 
110
110
  ## 镜头式写作法
111
111
 
112
- 忘掉全知视角,你是跟在主角身后的摄像机。读者只能看到主角看到的东西。
112
+ 采用限知镜头法时,跟随主角感知;本书选有限全知或多视角时按文风执行,不将授权的视角切换判错。
113
113
 
114
114
  ### 核心原则
115
- 1. 只写能看到/听到/闻到/摸到的,不写"他心里想""他感到"
115
+ 1. 只写主角能看到/听到/闻到/摸到的,不切他人内心,不写作者解说
116
116
  2. 每句对话都要推进剧情、塑造人物、或传递信息
117
- 3. 动作代替描述:"他很紧张" -> "他的手在抖"
117
+ 3. 情绪可以直写;要补足信息时优先选择、台词、物件或后果,不默认换成身体动作
118
118
  4. 手机屏幕优先:按动作/信息变化换行,读起来卡时拆段;拆的是段落,叙述句仍以逗号长句为主(句长标准见 anti-ai-writing.md 规则 3)
119
119
 
120
120
  ### 高危清单
@@ -137,8 +137,7 @@
137
137
 
138
138
  | 禁用 | 替代 |
139
139
  |------|------|
140
- | 他感到紧张 | 他的手在抖 |
141
- | 她很伤心 | 她转过身,肩膀微微颤动 |
140
+ | 他感到一阵悲伤(无落点) | 删掉,或写他此刻做不成的那件事 |
142
141
  | 高频公式化对话标签 | 用动作、语气或上下文承接;普通“说”可保留 |
143
142
  | 他深吸一口气 | 他把烟摁灭在烟灰缸里 |
144
143
  | 她眼中闪过一丝惊讶 | 她的手停在了半空 |
@@ -175,17 +174,9 @@
175
174
  ### 核心分类
176
175
  - **画面感**:人+环境(静/动),如高清摄像机忠实记录
177
176
  - **思想**:计划/目标/吐槽/揣测/分析等内心活动
178
- - **情绪**:藏在画面感与思想之中,不直接写出来
177
+ - **情绪**:可直写,也可藏在画面与思想里;落地判断见 `writing-craft.md` 第 1 节
179
178
  - **旁白**:身世背景/设定/人物关系/回忆,尽可能简洁
180
179
 
181
- ### 情绪表达层级(由低到高)
182
- 1. 最低:直接写"xx愤怒/伤心/快乐"——告诉情绪,读者感受不到
183
- 2. 低:用思想"xx暗骂"
184
- 3. 中:用神态"xx脸色铁青"
185
- 4. 高:用动作"xx猛地攥紧拳头,指甲掐进肉里"
186
-
187
- 核心:离底层情绪越远的表达越高级 = 侧面描写。
188
-
189
180
  ### 环境交互(环境描写核心)
190
181
  没有交互的环境描写不值得写。
191
182
  - 物理交互:梨花飘到鼻尖打喷嚏 / 雪山瑟瑟发抖 / 河水洗脸
@@ -237,7 +228,7 @@
237
228
 
238
229
  ---
239
230
 
240
- ## 文笔的本质与层级
231
+ ## 文笔的本质
241
232
 
242
233
  ### 三项输出检查
243
234
  - **选材**:目标读者、题材边界、核心卖点是否清楚。
@@ -246,17 +237,6 @@
246
237
 
247
238
  如果正文问题来自选材或剧情设计,不要只润色句子;回到对应 artifact 修正。
248
239
 
249
- ### 表达情绪的层级(由低到高)
250
-
251
- | 层级 | 写法 |
252
- |------|------|
253
- | 最低 | 直接写"xx愤怒" |
254
- | 低 | 用思想"xx暗骂" |
255
- | 中 | 用神态"脸色铁青" |
256
- | 高 | 用动作"猛地攥紧拳头,指甲掐进肉里" |
257
-
258
- 核心:不写情绪本身,写情绪引发的外在表现。
259
-
260
240
  ---
261
241
 
262
242
  ## 视角选择与叙事
@@ -336,12 +316,12 @@
336
316
  - [ ] **段落控制**:按动作/信息变化断段,读起来不卡
337
317
  - [ ] **高危词扫描**:少用"仿佛/犹如/一丝/不禁/眼中闪过/嘴角勾起"等模板化表达
338
318
  - [ ] **高危句式扫描**:公式化对话标签/"他感到"/"带着一丝XX"等不要过量
339
- - [ ] **情绪展示**:关键情绪节点没有直接写"他愤怒/伤心/紧张",用动作/神态替代;低强度过场情绪允许一笔直写,不必处处外化
319
+ - [ ] **情绪落地**:按 `writing-craft.md` 第 1 节检查,允许准确直写,不为情绪词强配动作或神态
340
320
  - [ ] **对话有效性**:每句对话至少推进剧情/塑造人物/制造张力之一
341
321
  - [ ] **五感调动**:每个场景至少调动2种以上感官
342
322
  - [ ] **环境交互**:环境描写有角色交互,不是空镜头
343
323
  - [ ] **镜头感**:每段有明确拍摄对象,远景/中景/近景/特写交替
344
324
  - [ ] **水分检查**:删掉任意一段后读者是否困惑——不困惑则该段多余
345
- - [ ] **视角一致**:没有全知叙述/上帝视角/心理分析混入
325
+ - [ ] **视角一致**:符合本书选定的叙述姿态,没有未经授权的信息泄露
346
326
  - [ ] **节奏交替**:叙述默认是逗号长句(句长标准见 anti-ai-writing.md 规则 3),短句只作偶尔的孤立重拍、用完回到逗号长句;忌通篇同长度,也忌机械长短交替;快慢场景交替
347
327
  - [ ] **代入感**:主角目标清晰、行为可理解、叙事立场站在主角一侧
@@ -166,7 +166,7 @@
166
166
  ### 关键技法
167
167
  - 恐惧要升级(不能一直同一个强度)
168
168
  - 限制信息来源(断电、断信号、独自一人)
169
- - 用生理反应代替直接描写恐惧
169
+ - 恐惧可落在危险线索、选择和行动受阻上,也可直写;生理反应有实际作用时再用
170
170
  - 安全感的短暂回归让下一波恐怖更猛
171
171
 
172
172
  ---
@@ -0,0 +1,27 @@
1
+ # 文风与参考冲突裁决
2
+
3
+ 写正文、改写、去 AI 味和审稿都先做这一步;inline 与 agent 用同一份裁决。无需另建画像或要求作者填写配置。
4
+
5
+ ## 按维度取值,不把整份文件互相覆盖
6
+
7
+ 表达选择按以下顺序取第一个明确、适用的要求:**当前请求 > 本书文风/设定 > 本书 active 作者记忆 > 题材、流程、全局 active 记忆 > 主对标文风 > 题材包与通用 references 默认值**。未声明的维度才向下补齐;本书例外不撤销全局习惯,临时要求不写回长期记忆。
8
+
9
+ 句长、视角、标点、对话落法、情绪直写、修辞、叙述者评论和收尾方式都是表达维度。reference 中的“必须”“禁用”“最高优先级”、示例和检测阈值不使默认写法升级为作者不可覆盖的规则。主对标的低置信观察不压过作者的明确选择。
10
+
11
+ 事实与表达分开裁决:文风不能改变细纲事件、已知事实、信息揭露边界、用户字数范围、改写范围、文件结构或追踪协议;有限全知允许换视角,不等于可提前揭底。转限知时可暂不叙述该人物无从得知的信息,事实本身不变;不得补出“早已知道”“后来发现”或新观察经历来保全原文信息。审稿照常评价因果、可读性与情绪效果,不能仅因使用了作者选定的写法就判错,也不能因为作者喜欢就忽略真实缺陷。
12
+
13
+ ## 加载与传递
14
+
15
+ 1. 从本次正文路径确定书目录(长篇为 `正文/` 的父目录,短篇为 `正文.md` 所在目录)。读该书 `设定/文风.md`;短篇同时读 `设定.md` 的文风约定。无文件就继续,不创建占位文件、不猜其他书。文风无最低字数限制,一句可执行的偏好也有效;空白、纯标题、待补充不算。
16
+ 2. `_文风摘要.md` 只能辅助定位,不能独立替代全文。当前会话已读全文时无需反复读;摘要与全文不一致用全文,不让旧摘要压过作者的新修改。
17
+ 3. 作者记忆 query 显式传当前书名、已知题材和流程以及需要的 kind,避免只取到 global。只用 active;同一维度窄范围覆盖宽范围,不拼成同时满足的清单。无法判定的同范围冲突才问作者,已能按优先级解决的不询问。
18
+ 4. 在现有 prompt 填 `style_resolution`:本次生效的表达要求及来源、被覆盖的默认条款、必须保留的事实/信息边界;只列与任务有关的冲突,无冲突可写“按本书文风”。原样传给正文、去味和文字 reviewer,并传文风全文路径。同一批次复用,当前请求或文风变动时更新。单独调用去味/审稿也执行本步骤,不能靠上一次会话的记忆。
19
+
20
+ ## 检测器如何服从裁决
21
+
22
+ 检测器不理解作者意图。保留现有默认检查;明确采用且有功能的命中,复用**书目录**下的 `.deslop-whitelist`:UTF-8,一行一个原文字面片段,空行和以 `#` 开头的整行注释忽略,不支持正则或通配符。不向父目录找,避免跨书继承。
23
+
24
+ - 本书文风明确允许某种停顿标点时,可登记 `——` 或 `……`;具体修辞登记完整的获准原句,不能登记“不是”“没有”等泛词来关闭整类检查。
25
+ - 每项用上一行 `# 来源:…;用途:…` 说明当前请求或文风依据。只为执行作者已明确的选择登记,不因脚本报警自动放行。当前请求禁止某写法时移除相冲突的豁免;一次性保留只登记该句,不推断长期习惯。
26
+ - 深扫、标点整理和写后/下一章检查读取同一白名单。豁免只影响对应字面片段的风格检查;同一行其他问题照报,事实、字数、占位、工程词、截断和文件结构检查不豁免。
27
+ - 所选 Gate 仍执行:检查该写法是否重复、冗余、破坏节奏或越过信息边界;有这些具体问题才改。裁决与发现可简短写在正常交付报告中,不写进小说正文。
@@ -0,0 +1,31 @@
1
+ # 追踪初始化事务
2
+
3
+ ## 初始化事务
4
+
5
+ 新书从第 0 章初始化。`story-import` 导入已有小说时把最后完整章写入 `last_chapter=N`;第 1..N 章不伪造日更记录,常规续写从 N+1 章开始。
6
+
7
+ ```json
8
+ {
9
+ "schema_version": 1,
10
+ "book_title": "让你管账号,你高燃混剪炸全网",
11
+ "last_chapter": 0,
12
+ "context": {
13
+ "position": {
14
+ "volume": "第一卷·军宣整顿",
15
+ "volume_start_chapter": 1,
16
+ "story_time": "江晨到火箭军文工团报到前",
17
+ "scene": "火箭军文工团"
18
+ },
19
+ "long_term_constraints": ["军宣爽点要用作品效果和围观反应链兑现,不能只靠系统播报"],
20
+ "active_character_names": [],
21
+ "continuity_risks": [],
22
+ "recent_chapters": [],
23
+ "next_chapter_commitments": ["让江晨报到,并落下五天百万粉的新手任务"]
24
+ },
25
+ "character_snapshots": {},
26
+ "foreshadow": [],
27
+ "timeline_events": []
28
+ }
29
+ ```
30
+
31
+ 导入初始化时直接传入当前核心角色快照、伏笔当前行、时间线事件和固定 7 栏状态输入。阶段/卷级回看按需查询正文,不作为每章强一致追踪产物。
@@ -18,24 +18,25 @@ Markdown 只负责给作者和 Agent 阅读,工具不再反向解析 Markdown
18
18
  先按运行环境探测 Python 3 解释器(依次尝试 `python3`、`python`、`py -3`)。追踪事务脚本使用当前 skill 根目录;字数与章节闭环统一使用 `story-long-write` skill 根目录:
19
19
 
20
20
  ```text
21
- {PYTHON} {当前 skill 根}/scripts/tracking_commit.py init --project {书项目根} --input {初始化事务.json}
21
+ {PYTHON} {当前 skill 根}/scripts/tracking_commit.py init --project {书项目根} --input {书项目根}/.story/work/init.json
22
22
  {PYTHON} {当前 skill 根}/scripts/tracking_commit.py check --project {书项目根}
23
- {PYTHON} {story-long-write skill 根}/scripts/storyctl.py wordcount checkpoint --file {前半段临时文件} --target {目标} --chapter {N}
23
+ {PYTHON} {当前 skill 根}/scripts/tracking_commit.py draft --project {书项目根} --chapter {N}
24
24
  {PYTHON} {story-long-write skill 根}/scripts/storyctl.py chapter check --project {书项目根} --chapter {N}
25
- {PYTHON} {story-long-write skill 根}/scripts/storyctl.py chapter commit --project {书项目根} --chapter {N} --input {逐章事务.json}
26
- {PYTHON} {story-long-write skill 根}/scripts/storyctl.py chapter accept-current-length --project {书项目根} --chapter {N} --input {逐章事务.json}
25
+ {PYTHON} {story-long-write skill 根}/scripts/storyctl.py chapter commit --project {书项目根} --chapter {N} --input {书项目根}/.story/work/第{NNN}章/tracking.json
26
+ {PYTHON} {story-long-write skill 根}/scripts/storyctl.py chapter accept-current-length --project {书项目根} --chapter {N} --input {书项目根}/.story/work/第{NNN}章/tracking.json
27
27
  ```
28
28
 
29
29
  - `init`:只在 `_tracking-state.json` 不存在时执行,绝不覆盖已初始化项目。
30
- - `wordcount checkpoint`:纯测量;返回当前实际字数、用户带与剩余用户区间,不写正文、不写 tracking、不做语义判断。每章最多调用一次。
31
- - `chapter check`:重新读取当前正文与细纲目标,返回确定性长度状态、现有 blocking quality、`state_revision` 和当前可执行动作,不保存 approval。`under` 不提供自动补写;`over` 额外返回一次净删型 `compress-once` 及进入内带/用户带所需的机器删除区间。
30
+ - `draft`:按当前 state 把逐章事务预填到 `.story/work/第NNN章/tracking.json`(修订号、模式、章名、`context` 四项当前值),并输出各文本字段的字数上限与在场核心角色的当前快照;调用方只填 `delta` 与有变化角色的快照。
31
+ - `wordcount measure` / `wordcount checkpoint`:纯测量入口;不写正文、不写 tracking、不做语义判断。长篇正文只在前组写完后由父流程调用一次 `checkpoint`(见 workflow-chapter 步骤 6),整章长度由 `chapter check` 收口。
32
+ - `chapter check`:重新读取当前正文与细纲目标,返回确定性长度状态、现有 blocking quality、`state_revision` 和当前可执行动作,不保存 approval。`under` 不提供自动补写;`over` 额外返回一次净删型 `compress-once` 及回到内部区间或作者给定区间所需的删除字数。
32
33
  - `chapter commit`:再次读取当前文件、重新计数并重跑 blocking quality;只接受用户带内章节,把简短字数记录与逐章事务一起原子提交。
33
34
  - `chapter accept-current-length`:只接受带外但 quality pass 的章节;接受动作发生时重新读取、重新计数并立即原子提交,不保存可陈旧的历史决议。
34
35
  - `check`:严格验证 state schema、逐章记录连续性/规范名/体积、固定 7 栏、角色快照硬上限、派生文件集合,以及所有派生视图与 state 的逐字一致性。
35
36
 
36
37
  每本书由 `追踪/.tracking-commit.lock` 串行写事务,`expected_state_revision` 再拒绝基于旧状态构造的 stale transaction。两个不同事务并发时至多一个修订成功。字数记录也在锁内对当前正文和目标重新验证,正文或目标变化会让预先构造的记录直接失败。
37
38
 
38
- 事务 JSON 是临时输入,不是项目产物:成功前必须保留;提交成功且紧随其后的 `check` 通过后立即删除,不能把 `init_transaction.json`、`chapter_*_transaction.json` 等输入长期留在书项目根目录。若文件写入失败,`_tracking-state.json` 尚未推进;修正环境后直接重跑**同一份** `commit`。append 重跑只接受内容完全相同的既有逐章记录,不维护 `dirty/pending/repair` 状态机。
39
+ 事务 JSON 是临时输入,不是项目产物:只写在书目录 `.story/work/` 下(逐章事务放 `.story/work/第NNN章/tracking.json`),不写系统 `/tmp`、书根、`大纲/` 或 `正文/`;成功前必须保留,提交成功后即可删除(`storyctl.py chapter commit` / `accept-current-length` 成功时自动删除该章目录;直接调用 `tracking_commit.py commit` 时由调用方删除)——之后 `check` 失败按下文提交 `mode=revision` 新事务修复,不需要原事务。若文件写入失败,`_tracking-state.json` 尚未推进;修正环境后直接重跑**同一份** `commit`。append 重跑只接受内容完全相同的既有逐章记录,不维护 `dirty/pending/repair` 状态机。
39
40
 
40
41
  校验失败与写入失败处理方式不同:校验失败(字段非法、退役结构、容量超限)要按报错改事务本身,重跑同一份结果不变。派生视图被手改或外部改动导致 `check` 报 `derived view differs from _tracking-state.json` 时,重新提交**该章**的 `mode=revision` 事务让工具整份重建,`expected_state_revision` 取 `追踪/_tracking-state.json` 的 `state_revision` 字段——`check` 失败时只往 stderr 打 ERROR,不输出 JSON;不手改派生文件,也不删 `_tracking-state.json` 重来。手写出的逐章记录会让同章 `append` 永久报 `chapter delta N already exists with different content`——删掉那个手写文件后重跑原事务即可。
41
42
 
@@ -43,33 +44,7 @@ Markdown 只负责给作者和 Agent 阅读,工具不再反向解析 Markdown
43
44
 
44
45
  ## 初始化事务
45
46
 
46
- 新书从第 0 章初始化。`story-import` 导入已有小说时把最后完整章写入 `last_chapter=N`;第 1..N 章不伪造日更记录,常规续写从 N+1 章开始。
47
-
48
- ```json
49
- {
50
- "schema_version": 1,
51
- "book_title": "让你管账号,你高燃混剪炸全网",
52
- "last_chapter": 0,
53
- "context": {
54
- "position": {
55
- "volume": "第一卷·军宣整顿",
56
- "volume_start_chapter": 1,
57
- "story_time": "江晨到火箭军文工团报到前",
58
- "scene": "火箭军文工团"
59
- },
60
- "long_term_constraints": ["军宣爽点要用作品效果和围观反应链兑现,不能只靠系统播报"],
61
- "active_character_names": [],
62
- "continuity_risks": [],
63
- "recent_chapters": [],
64
- "next_chapter_commitments": ["让江晨报到,并落下五天百万粉的新手任务"]
65
- },
66
- "character_snapshots": {},
67
- "foreshadow": [],
68
- "timeline_events": []
69
- }
70
- ```
71
-
72
- 导入初始化时直接传入当前核心角色快照、伏笔当前行、时间线事件和固定 7 栏状态输入。阶段/卷级回看按需查询正文,不作为每章强一致追踪产物。
47
+ 仅新书或导入初始化时,执行 `init` 前必须完整读取 [tracking-initialization.md](tracking-initialization.md),按其中原始 JSON 与导入边界构造事务。已有项目续写直接使用下方逐章事务,不重复读初始化示例。
73
48
 
74
49
  调用方的逐章 JSON 不写 `wordcount`;正式入口 `chapter commit` 或 `chapter accept-current-length` 在提交当下生成并注入。最终 state 只为已提交章节保留 `metric / target / actual / status / resolution / body_sha256`,不保存 MEASURE/RESOLVE 事件、ID 链、policy fingerprint 或独立 chapter state。
75
50