@oh-story/dsh 0.1.10 → 0.1.11

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 (444) hide show
  1. package/README.md +7 -7
  2. package/lib/client.js +7 -3
  3. package/lib/client.js.map +2 -2
  4. package/lib/drama/manifest.json +212 -142
  5. package/lib/drama/skills/short-drama/SKILL.md +14 -2
  6. package/lib/drama/skills/short-drama/assets/project-template/short-drama.json +3 -0
  7. package/lib/drama/skills/short-drama/references/creator-documents.md +3 -0
  8. package/lib/drama/skills/short-drama/references/knowhow-index.md +15 -0
  9. package/lib/drama/skills/short-drama/scripts/project_tool.py +131 -0
  10. package/lib/drama/skills/short-drama-assets/SKILL.md +2 -1
  11. package/lib/drama/skills/short-drama-assets/references/asset-review-checklist.md +2 -0
  12. package/lib/drama/skills/short-drama-assets/references/era-anchors.md +37 -0
  13. package/lib/drama/skills/short-drama-assets/references/stage-contract.md +2 -0
  14. package/lib/drama/skills/short-drama-develop/SKILL.md +10 -4
  15. package/lib/drama/skills/short-drama-develop/assets/adaptation-map.example.jsonl +1 -1
  16. package/lib/drama/skills/short-drama-develop/assets/creative-brief.md +8 -0
  17. package/lib/drama/skills/short-drama-develop/references/adaptation-craft.md +80 -13
  18. package/lib/drama/skills/short-drama-develop/references/episode-design.md +95 -12
  19. package/lib/drama/skills/short-drama-develop/references/genre-and-hook-playbook.md +9 -5
  20. package/lib/drama/skills/short-drama-develop/references/genre-cards//345/244/215/344/273/207/346/211/223/350/204/270.md +1 -1
  21. package/lib/drama/skills/short-drama-develop/references/genre-cards//347/263/273/347/273/237/346/265/201.md +51 -0
  22. package/lib/drama/skills/short-drama-develop/references/genre-cards//351/200/206/350/242/255.md +51 -0
  23. package/lib/drama/skills/short-drama-develop/references/genre-cards//351/207/215/347/224/237/347/251/277/350/266/212.md +51 -0
  24. package/lib/drama/skills/short-drama-develop/references/genre-cards.md +10 -7
  25. package/lib/drama/skills/short-drama-develop/references/premise-devices.md +15 -9
  26. package/lib/drama/skills/short-drama-develop/references/serial-character-and-memory.md +3 -2
  27. package/lib/drama/skills/short-drama-develop/references/stage-contract.md +14 -7
  28. package/lib/drama/skills/short-drama-develop/references/story-craft.md +7 -3
  29. package/lib/drama/skills/short-drama-edit/SKILL.md +43 -20
  30. package/lib/drama/skills/short-drama-edit/assets/remotion/README.md +49 -13
  31. package/lib/drama/skills/short-drama-edit/assets/remotion/package.json +4 -2
  32. package/lib/drama/skills/short-drama-edit/assets/remotion/src/Overlay.tsx +31 -0
  33. package/lib/drama/skills/short-drama-edit/assets/remotion/src/Root.tsx +5 -5
  34. package/lib/drama/skills/short-drama-edit/assets/remotion/src/Subtitles.tsx +68 -69
  35. package/lib/drama/skills/short-drama-edit/assets/remotion/src/font.ts +39 -29
  36. package/lib/drama/skills/short-drama-edit/assets/remotion/src/rules.mjs +188 -0
  37. package/lib/drama/skills/short-drama-edit/assets/remotion/src/schema.ts +26 -13
  38. package/lib/drama/skills/short-drama-edit/assets/remotion/src/screen/Card.tsx +72 -0
  39. package/lib/drama/skills/short-drama-edit/assets/remotion/src/screen/CornerChip.tsx +39 -0
  40. package/lib/drama/skills/short-drama-edit/assets/remotion/src/screen/ScreenText.tsx +36 -0
  41. package/lib/drama/skills/short-drama-edit/assets/remotion/src/screen/SystemPanel.tsx +44 -0
  42. package/lib/drama/skills/short-drama-edit/assets/remotion/src/screen/TaskPanel.tsx +100 -0
  43. package/lib/drama/skills/short-drama-edit/assets/remotion/src/screen/chrome.tsx +197 -0
  44. package/lib/drama/skills/short-drama-edit/assets/remotion/src/screen/tokens.ts +62 -0
  45. package/lib/drama/skills/short-drama-edit/assets/remotion/tsconfig.json +1 -0
  46. package/lib/drama/skills/short-drama-edit/assets//345/211/252/350/276/221/345/215/225.md +4 -2
  47. package/lib/drama/skills/short-drama-edit/references/cut-craft.md +3 -1
  48. package/lib/drama/skills/short-drama-edit/references/delivery-verify.md +6 -2
  49. package/lib/drama/skills/short-drama-edit/references/generated-footage.md +12 -6
  50. package/lib/drama/skills/short-drama-edit/references/sound-and-subtitles.md +13 -8
  51. package/lib/drama/skills/short-drama-edit/references/stage-contract.md +2 -0
  52. package/lib/drama/skills/short-drama-edit/scripts/edit_tool.py +1153 -121
  53. package/lib/drama/skills/short-drama-edit/scripts/selftest.py +49 -9
  54. package/lib/drama/skills/short-drama-novel-analyze/SKILL.md +3 -3
  55. package/lib/drama/skills/short-drama-novel-analyze/assets/episode-candidate.example.jsonl +2 -2
  56. package/lib/drama/skills/short-drama-novel-analyze/references/adaptation-triage.md +8 -4
  57. package/lib/drama/skills/short-drama-novel-analyze/references/adaptation-value.md +10 -3
  58. package/lib/drama/skills/short-drama-novel-analyze/references/aggregation-and-entities.md +25 -1
  59. package/lib/drama/skills/short-drama-novel-analyze/references/stage-contract.md +1 -0
  60. package/lib/drama/skills/short-drama-review/SKILL.md +2 -2
  61. package/lib/drama/skills/short-drama-review/references/review-method.md +6 -1
  62. package/lib/drama/skills/short-drama-review/references/rubric-assets-prompts.md +11 -0
  63. package/lib/drama/skills/short-drama-review/references/rubric-story-script.md +77 -3
  64. package/lib/drama/skills/short-drama-review/references/rubric-visual-motion.md +15 -0
  65. package/lib/drama/skills/short-drama-review/references/stage-contract.md +3 -0
  66. package/lib/drama/skills/short-drama-storyboard/SKILL.md +13 -5
  67. package/lib/drama/skills/short-drama-storyboard/references/blocking-playbooks.md +1 -1
  68. package/lib/drama/skills/short-drama-storyboard/references/production-shot-grammar.md +2 -2
  69. package/lib/drama/skills/short-drama-storyboard/references/shot-craft.md +82 -14
  70. package/lib/drama/skills/short-drama-storyboard/references/stage-contract.md +4 -2
  71. package/lib/drama/skills/short-drama-video-prompts/SKILL.md +5 -3
  72. package/lib/drama/skills/short-drama-video-prompts/references/camera-audio-continuity.md +12 -0
  73. package/lib/drama/skills/short-drama-video-prompts/references/delivery-profile.md +4 -5
  74. package/lib/drama/skills/short-drama-video-prompts/references/generability.md +4 -2
  75. package/lib/drama/skills/short-drama-video-prompts/references/minimax-h3.md +40 -1
  76. package/lib/drama/skills/short-drama-video-prompts/references/motion-recipe.md +20 -14
  77. package/lib/drama/skills/short-drama-video-prompts/references/performance-action-timing.md +1 -1
  78. package/lib/drama/skills/short-drama-video-prompts/references/production-prompt-grammar.md +8 -7
  79. package/lib/drama/skills/short-drama-video-prompts/references/review-and-fixtures.md +1 -1
  80. package/lib/drama/skills/short-drama-video-prompts/references/stage-contract.md +1 -0
  81. package/lib/drama/skills/short-drama-video-prompts/references/target-model-profile.md +8 -1
  82. package/lib/drama/skills/short-drama-video-prompts/references/wan-3.0.md +103 -0
  83. package/lib/drama/skills/short-drama-video-prompts/scripts/motion_timing_check.py +8 -7
  84. package/lib/drama/skills/short-drama-write/SKILL.md +8 -3
  85. package/lib/drama/skills/short-drama-write/references/dialogue-craft.md +1 -1
  86. package/lib/drama/skills/short-drama-write/references/script-craft.md +56 -3
  87. package/lib/drama/skills/short-drama-write/references/stage-contract.md +4 -0
  88. package/lib/drama/skills/short-drama-write/scripts/duration_estimate.py +48 -2
  89. package/lib/index.js +71 -21
  90. package/lib/index.js.map +3 -3
  91. package/lib/oh-story/manifest.json +545 -310
  92. package/lib/oh-story/roles/chapter-extractor.md +11 -11
  93. package/lib/oh-story/roles/character-designer.md +1 -2
  94. package/lib/oh-story/roles/consistency-checker.md +11 -9
  95. package/lib/oh-story/roles/narrative-writer.md +24 -25
  96. package/lib/oh-story/roles/story-architect.md +9 -61
  97. package/lib/oh-story/roles/story-explorer.md +20 -125
  98. package/lib/oh-story/roles/story-researcher.md +0 -1
  99. package/lib/oh-story/skills/story/SKILL.md +6 -6
  100. package/lib/oh-story/skills/story/VERSION +1 -1
  101. package/lib/oh-story/skills/story/references/author-memory-maintenance.md +75 -0
  102. package/lib/oh-story/skills/story/references/author-memory.md +40 -118
  103. package/lib/oh-story/skills/story/scripts/author_memory_commit.py +3 -3
  104. package/lib/oh-story/skills/story-deslop/SKILL.md +24 -25
  105. package/lib/oh-story/skills/story-deslop/references/agent-calls.md +5 -0
  106. package/lib/oh-story/skills/story-deslop/references/anti-ai-writing.md +1 -1
  107. package/lib/oh-story/skills/story-deslop/references/author-memory-maintenance.md +75 -0
  108. package/lib/oh-story/skills/story-deslop/references/author-memory.md +40 -118
  109. package/lib/oh-story/skills/story-deslop/references/banned-words.md +2 -2
  110. package/lib/oh-story/skills/story-deslop/references/deslop-gates.md +21 -4
  111. package/lib/oh-story/skills/story-deslop/references/style-resolution.md +4 -4
  112. package/lib/oh-story/skills/story-deslop/scripts/author_memory_commit.py +3 -3
  113. package/lib/oh-story/skills/story-deslop/scripts/check-ai-patterns.js +155 -8
  114. package/lib/oh-story/skills/story-import/SKILL.md +63 -579
  115. package/lib/oh-story/skills/story-import/references/deep-analysis.md +47 -0
  116. package/lib/oh-story/skills/story-import/references/format-and-structure.md +1 -1
  117. package/lib/oh-story/skills/story-import/references/import-report.md +64 -0
  118. package/lib/oh-story/skills/story-import/references/import-special-cases.md +34 -0
  119. package/lib/oh-story/skills/story-import/references/import-tracking.md +95 -0
  120. package/lib/oh-story/skills/story-import/references/length-routing.md +1 -1
  121. package/lib/oh-story/skills/story-import/references/outline-reverse-rules.md +79 -0
  122. package/lib/oh-story/skills/story-import/references/outline-reverse.md +24 -0
  123. package/lib/oh-story/skills/story-import/references/structure-mapping-long.md +95 -91
  124. package/lib/oh-story/skills/story-import/references/structure-mapping-short.md +24 -12
  125. package/lib/oh-story/skills/story-import/references/tracking-initialization.md +1 -1
  126. package/lib/oh-story/skills/story-import/references/tracking-transaction.md +11 -9
  127. package/lib/oh-story/skills/story-import/scripts/build_outline_brief.py +332 -0
  128. package/lib/oh-story/skills/story-import/scripts/check-outline-contract.js +101 -14
  129. package/lib/oh-story/skills/story-import/scripts/tracking_commit.py +278 -23
  130. package/lib/oh-story/skills/story-import/scripts/wordcount_core.py +179 -23
  131. package/lib/oh-story/skills/story-long-analyze/SKILL.md +28 -50
  132. package/lib/oh-story/skills/story-long-analyze/references/author-facing.md +12 -5
  133. package/lib/oh-story/skills/story-long-analyze/references/deconstruction-notes.md +1 -1
  134. package/lib/oh-story/skills/story-long-analyze/references/final-checks.md +19 -0
  135. package/lib/oh-story/skills/story-long-analyze/references/index-rebuild.md +11 -0
  136. package/lib/oh-story/skills/story-long-analyze/references/pipeline-ops.md +21 -55
  137. package/lib/oh-story/skills/story-long-analyze/references/stage1-golden-chapters.md +128 -0
  138. package/lib/oh-story/skills/story-long-analyze/references/stage2-extraction.md +229 -0
  139. package/lib/oh-story/skills/story-long-analyze/references/stage3-plot-rhythm.md +480 -0
  140. package/lib/oh-story/skills/story-long-analyze/references/stage4-characters-settings.md +195 -0
  141. package/lib/oh-story/skills/story-long-analyze/references/stage5-report.md +33 -0
  142. package/lib/oh-story/skills/story-long-analyze/references/style-profile-generator.md +17 -0
  143. package/lib/oh-story/skills/story-long-analyze/references/style-profile-protocol.md +1 -1
  144. package/lib/oh-story/skills/story-long-analyze/references/synthesis-inputs.md +39 -0
  145. package/lib/oh-story/skills/story-long-analyze/scripts/manage_analysis_run.py +47 -8
  146. package/lib/oh-story/skills/story-long-scan/SKILL.md +41 -193
  147. package/lib/oh-story/skills/story-long-scan/references/platform-ciweimao.md +19 -0
  148. package/lib/oh-story/skills/story-long-scan/references/platform-fanqie.md +45 -0
  149. package/lib/oh-story/skills/story-long-scan/references/platform-jjwxc.md +28 -0
  150. package/lib/oh-story/skills/story-long-scan/references/platform-qidian.md +35 -0
  151. package/lib/oh-story/skills/story-long-scan/references/platform-qimao.md +27 -0
  152. package/lib/oh-story/skills/story-long-scan/references/topic-decision.md +6 -2
  153. package/lib/oh-story/skills/story-long-write/SKILL.md +32 -73
  154. package/lib/oh-story/skills/story-long-write/references/agent-calls.md +47 -0
  155. package/lib/oh-story/skills/story-long-write/references/anti-ai-writing.md +1 -1
  156. package/lib/oh-story/skills/story-long-write/references/artifact-protocols.md +18 -201
  157. package/lib/oh-story/skills/story-long-write/references/author-memory-maintenance.md +75 -0
  158. package/lib/oh-story/skills/story-long-write/references/author-memory.md +40 -118
  159. package/lib/oh-story/skills/story-long-write/references/banned-words.md +2 -2
  160. package/lib/oh-story/skills/story-long-write/references/benchmark-recall.md +6 -10
  161. package/lib/oh-story/skills/story-long-write/references/character-relations.md +49 -1
  162. package/lib/oh-story/skills/story-long-write/references/deslop-gates.md +171 -0
  163. package/lib/oh-story/skills/story-long-write/references/emotion-on-page.md +116 -0
  164. package/lib/oh-story/skills/story-long-write/references/emotional-arc-design.md +1 -114
  165. package/lib/oh-story/skills/story-long-write/references/genre-prose-cards.md +1 -1
  166. package/lib/oh-story/skills/story-long-write/references/long-chapter-quality.md +3 -2
  167. package/lib/oh-story/skills/story-long-write/references/long-format.md +0 -8
  168. package/lib/oh-story/skills/story-long-write/references/long-genre-catalog.md +1 -1
  169. package/lib/oh-story/skills/story-long-write/references/long-genre-mechanics.md +3 -3
  170. package/lib/oh-story/skills/story-long-write/references/opening-design.md +2 -2
  171. package/lib/oh-story/skills/story-long-write/references/outline-conflict.md +4 -4
  172. package/lib/oh-story/skills/story-long-write/references/outline-methods.md +7 -7
  173. package/lib/oh-story/skills/story-long-write/references/outline-rhythm.md +3 -3
  174. package/lib/oh-story/skills/story-long-write/references/outline-structure-theory.md +14 -69
  175. package/lib/oh-story/skills/story-long-write/references/plot-frameworks.md +1 -1
  176. package/lib/oh-story/skills/story-long-write/references/plot-special-topics.md +2 -2
  177. package/lib/oh-story/skills/story-long-write/references/project-files.md +10 -6
  178. package/lib/oh-story/skills/story-long-write/references/reader-contract-and-progression.md +1 -1
  179. package/lib/oh-story/skills/story-long-write/references/reference-index.md +4 -4
  180. package/lib/oh-story/skills/story-long-write/references/stop-and-fix.md +9 -0
  181. package/lib/oh-story/skills/story-long-write/references/style-combat-face.md +1 -58
  182. package/lib/oh-story/skills/story-long-write/references/style-genre-modules.md +1 -1
  183. package/lib/oh-story/skills/story-long-write/references/style-resolution.md +4 -4
  184. package/lib/oh-story/skills/story-long-write/references/tracking-initialization.md +1 -1
  185. package/lib/oh-story/skills/story-long-write/references/tracking-transaction.md +11 -9
  186. package/lib/oh-story/skills/story-long-write/references/workflow-chapter.md +33 -44
  187. package/lib/oh-story/skills/story-long-write/references/workflow-daily.md +18 -51
  188. package/lib/oh-story/skills/story-long-write/references/workflow-outline.md +157 -0
  189. package/lib/oh-story/skills/story-long-write/references/workflow-revision.md +53 -67
  190. package/lib/oh-story/skills/story-long-write/references/workflow-setup.md +112 -251
  191. package/lib/oh-story/skills/story-long-write/references/workflow-volume.md +142 -0
  192. package/lib/oh-story/skills/story-long-write/references/writer-prompt-fallback.md +5 -3
  193. package/lib/oh-story/skills/story-long-write/references/writing-craft.md +18 -56
  194. package/lib/oh-story/skills/story-long-write/scripts/author_memory_commit.py +3 -3
  195. package/lib/oh-story/skills/story-long-write/scripts/build_architect_brief.py +260 -0
  196. package/lib/oh-story/skills/story-long-write/scripts/build_writer_prompt.py +96 -16
  197. package/lib/oh-story/skills/story-long-write/scripts/check-ai-patterns.js +155 -8
  198. package/lib/oh-story/skills/story-long-write/scripts/check-outline-contract.js +101 -14
  199. package/lib/oh-story/skills/story-long-write/scripts/check-outline-copy.js +7 -2
  200. package/lib/oh-story/skills/story-long-write/scripts/outline_view.py +2 -1
  201. package/lib/oh-story/skills/story-long-write/scripts/storyctl.py +250 -50
  202. package/lib/oh-story/skills/story-long-write/scripts/tracking_commit.py +278 -23
  203. package/lib/oh-story/skills/story-long-write/scripts/wordcount_core.py +179 -23
  204. package/lib/oh-story/skills/story-review/SKILL.md +19 -273
  205. package/lib/oh-story/skills/story-review/references/agent-prompts.md +184 -0
  206. package/lib/oh-story/skills/story-review/references/anti-ai-writing.md +1 -1
  207. package/lib/oh-story/skills/story-review/references/author-memory-maintenance.md +75 -0
  208. package/lib/oh-story/skills/story-review/references/author-memory.md +40 -118
  209. package/lib/oh-story/skills/story-review/references/banned-words.md +2 -2
  210. package/lib/oh-story/skills/story-review/references/batch-review.md +19 -0
  211. package/lib/oh-story/skills/story-review/references/character-relations.md +49 -1
  212. package/lib/oh-story/skills/story-review/references/review-quality.md +2 -1
  213. package/lib/oh-story/skills/story-review/references/review-tracking.md +10 -0
  214. package/lib/oh-story/skills/story-review/references/solo.md +52 -0
  215. package/lib/oh-story/skills/story-review/references/style-resolution.md +4 -4
  216. package/lib/oh-story/skills/story-review/references/tracking-initialization.md +1 -1
  217. package/lib/oh-story/skills/story-review/references/tracking-transaction.md +11 -9
  218. package/lib/oh-story/skills/story-review/scripts/author_memory_commit.py +3 -3
  219. package/lib/oh-story/skills/story-review/scripts/check-ai-patterns.js +155 -8
  220. package/lib/oh-story/skills/story-review/scripts/tracking_commit.py +278 -23
  221. package/lib/oh-story/skills/story-review/scripts/wordcount_core.py +179 -23
  222. package/lib/oh-story/skills/story-setup/SKILL.md +69 -458
  223. package/lib/oh-story/skills/story-setup/references/agent-references/agent-quality.md +4 -4
  224. package/lib/oh-story/skills/story-setup/references/agent-references/anti-ai-writing.md +1 -1
  225. package/lib/oh-story/skills/story-setup/references/agent-references/banned-words.md +2 -2
  226. package/lib/oh-story/skills/story-setup/references/agent-references/benchmark-style-load.md +107 -0
  227. package/lib/oh-story/skills/story-setup/references/agent-references/character-relations.md +49 -1
  228. package/lib/oh-story/skills/story-setup/references/agent-references/deslop-gates.md +21 -4
  229. package/lib/oh-story/skills/story-setup/references/agent-references/emotion-on-page.md +116 -0
  230. package/lib/oh-story/skills/story-setup/references/agent-references/emotional-arc-design.md +1 -114
  231. package/lib/oh-story/skills/story-setup/references/agent-references/format-and-structure.md +1 -1
  232. package/lib/oh-story/skills/story-setup/references/agent-references/genre-prose-cards.md +1 -1
  233. package/lib/oh-story/skills/story-setup/references/agent-references/long-genre-catalog.md +1 -1
  234. package/lib/oh-story/skills/story-setup/references/agent-references/long-genre-mechanics.md +3 -3
  235. package/lib/oh-story/skills/story-setup/references/agent-references/long-quality.md +7 -5
  236. package/lib/oh-story/skills/story-setup/references/agent-references/opening-design.md +2 -2
  237. package/lib/oh-story/skills/story-setup/references/agent-references/outline-conflict.md +4 -4
  238. package/lib/oh-story/skills/story-setup/references/agent-references/outline-methods.md +7 -7
  239. package/lib/oh-story/skills/story-setup/references/agent-references/outline-rhythm.md +3 -3
  240. package/lib/oh-story/skills/story-setup/references/agent-references/short-emotional-methods.md +1 -1
  241. package/lib/oh-story/skills/story-setup/references/agent-references/short-genre-formulas.md +0 -15
  242. package/lib/oh-story/skills/story-setup/references/agent-references/short-reversal.md +1 -1
  243. package/lib/oh-story/skills/story-setup/references/agent-references/style-combat-face.md +1 -58
  244. package/lib/oh-story/skills/story-setup/references/agent-references/style-genre-modules.md +1 -1
  245. package/lib/oh-story/skills/story-setup/references/agent-references/style-resolution.md +4 -4
  246. package/lib/oh-story/skills/story-setup/references/agent-references/writing-craft.md +18 -56
  247. package/lib/oh-story/skills/story-setup/references/diagnostics.md +3 -3
  248. package/lib/oh-story/skills/story-short-analyze/SKILL.md +37 -110
  249. package/lib/oh-story/skills/story-short-analyze/references/analysis-character-relations.md +1 -1
  250. package/lib/oh-story/skills/story-short-analyze/references/analysis-method.md +42 -0
  251. package/lib/oh-story/skills/story-short-analyze/references/optional-modules.md +97 -0
  252. package/lib/oh-story/skills/story-short-analyze/references/output-contract.md +9 -47
  253. package/lib/oh-story/skills/story-short-analyze/references/quality-checklist.md +80 -0
  254. package/lib/oh-story/skills/story-short-analyze/references/source-story-quality.md +4 -4
  255. package/lib/oh-story/skills/story-short-analyze/references/stage2-3-structure-emotion.md +308 -0
  256. package/lib/oh-story/skills/story-short-analyze/references/{material-decomposition.md → stage4-6-reversal-summary.md} +303 -374
  257. package/lib/oh-story/skills/story-short-scan/SKILL.md +30 -64
  258. package/lib/oh-story/skills/story-short-scan/references/manual-rank-input.md +36 -0
  259. package/lib/oh-story/skills/story-short-scan/references/platform-dianzhong.md +24 -0
  260. package/lib/oh-story/skills/story-short-scan/references/platform-heiyan.md +21 -0
  261. package/lib/oh-story/skills/story-short-scan/references/topic-match.md +38 -0
  262. package/lib/oh-story/skills/story-short-write/SKILL.md +23 -34
  263. package/lib/oh-story/skills/story-short-write/references/agent-calls.md +13 -0
  264. package/lib/oh-story/skills/story-short-write/references/author-memory-maintenance.md +75 -0
  265. package/lib/oh-story/skills/story-short-write/references/author-memory.md +40 -118
  266. package/lib/oh-story/skills/story-short-write/references/banned-words.md +2 -2
  267. package/lib/oh-story/skills/story-short-write/references/benchmark-recall.md +1 -21
  268. package/lib/oh-story/skills/story-short-write/references/emotional-methods.md +1 -1
  269. package/lib/oh-story/skills/story-short-write/references/genre-writing-formulas.md +0 -15
  270. package/lib/oh-story/skills/story-short-write/references/output-contract.md +9 -47
  271. package/lib/oh-story/skills/story-short-write/references/reference-index.md +17 -49
  272. package/lib/oh-story/skills/story-short-write/references/scene-craft.md +40 -0
  273. package/lib/oh-story/skills/story-short-write/references/short-craft.md +7 -43
  274. package/lib/oh-story/skills/story-short-write/references/short-format.md +3 -3
  275. package/lib/oh-story/skills/story-short-write/references/short-prose-quality.md +2 -1
  276. package/lib/oh-story/skills/story-short-write/references/short-reversal.md +1 -1
  277. package/lib/oh-story/skills/story-short-write/references/style-resolution.md +4 -4
  278. package/lib/oh-story/skills/story-short-write/references/submission-craft.md +1 -1
  279. package/lib/oh-story/skills/story-short-write/references/villain-and-reveal.md +5 -10
  280. package/lib/oh-story/skills/story-short-write/references/workflow-design.md +19 -12
  281. package/lib/oh-story/skills/story-short-write/references/workflow-draft.md +22 -32
  282. package/lib/oh-story/skills/story-short-write/references/workflow-revision.md +84 -17
  283. package/lib/oh-story/skills/story-short-write/references/writing-workflow.md +7 -119
  284. package/lib/oh-story/skills/story-short-write/scripts/author_memory_commit.py +3 -3
  285. package/lib/oh-story/skills/story-short-write/scripts/check-ai-patterns.js +155 -8
  286. package/lib/oh-story/skills/story-short-write/scripts/check-outline-copy.js +7 -2
  287. package/lib/types/client/video-studio.d.ts.map +1 -1
  288. package/lib/types/native-hooks.d.ts +2 -2
  289. package/lib/types/native-hooks.d.ts.map +1 -1
  290. package/lib/types/role-tool.d.ts.map +1 -1
  291. package/lib/types/skill-provider.d.ts.map +1 -1
  292. package/lib/types/video-project.d.ts.map +1 -1
  293. package/lib/types/workspace-route.d.ts.map +1 -1
  294. package/lib/video-recap/CHANGELOG.md +60 -1
  295. package/lib/video-recap/README.en.md +348 -137
  296. package/lib/video-recap/README.md +340 -136
  297. package/lib/video-recap/manifest.json +406 -251
  298. package/lib/video-recap/skills/video-assemble/SKILL.md +30 -15
  299. package/lib/video-recap/skills/video-assemble/references/audio-modes.md +63 -0
  300. package/lib/video-recap/skills/video-assemble/references/explicit-audio-mix.md +75 -0
  301. package/lib/video-recap/skills/video-assemble/references/foreground-compose.md +118 -0
  302. package/lib/video-recap/skills/video-assemble/references/narration-adoption.md +103 -0
  303. package/lib/video-recap/skills/video-assemble/references/packaging.md +45 -0
  304. package/lib/video-recap/skills/video-assemble/references/pair-media.md +74 -0
  305. package/lib/video-recap/skills/video-assemble/references/source-score.md +147 -0
  306. package/lib/video-recap/skills/video-assemble/references/subtitle-track.md +202 -0
  307. package/lib/video-recap/skills/video-assemble/scripts/adoption/__init__.py +1 -0
  308. package/lib/video-recap/skills/video-assemble/scripts/adoption/audio_mix_binding.py +279 -0
  309. package/lib/video-recap/skills/video-assemble/scripts/adoption/frozen_audio.py +187 -0
  310. package/lib/video-recap/skills/video-assemble/scripts/adoption/narration_binding.py +323 -0
  311. package/lib/video-recap/skills/video-assemble/scripts/adoption/strict_inputs.py +109 -0
  312. package/lib/video-recap/skills/video-assemble/scripts/adoption/strict_publish.py +130 -0
  313. package/lib/video-recap/skills/video-assemble/scripts/artifacts.py +10 -46
  314. package/lib/video-recap/skills/video-assemble/scripts/assemble.py +378 -119
  315. package/lib/video-recap/skills/video-assemble/scripts/assemble_constants.py +29 -12
  316. package/lib/video-recap/skills/video-assemble/scripts/assembly_contract.py +95 -44
  317. package/lib/video-recap/skills/video-assemble/scripts/assembly_settings.py +75 -32
  318. package/lib/video-recap/skills/video-assemble/scripts/audio_mix.py +11 -11
  319. package/lib/video-recap/skills/video-assemble/scripts/compose_foreground.py +293 -0
  320. package/lib/video-recap/skills/video-assemble/scripts/export_jianying.py +71 -78
  321. package/lib/video-recap/skills/video-assemble/scripts/jianying/__init__.py +1 -0
  322. package/lib/video-recap/skills/video-assemble/scripts/{jianying_builders.py → jianying/builders.py} +39 -67
  323. package/lib/video-recap/skills/video-assemble/scripts/{jianying_model.py → jianying/model.py} +3 -11
  324. package/lib/video-recap/skills/video-assemble/scripts/{jianying_optional.py → jianying/optional.py} +1 -1
  325. package/lib/video-recap/skills/video-assemble/scripts/jianying/schema.py +53 -0
  326. package/lib/video-recap/skills/video-assemble/scripts/{jianying_templates.py → jianying/templates.py} +1 -1
  327. package/lib/video-recap/skills/video-assemble/scripts/{jianying_timeline_contract.py → jianying/timeline_contract.py} +34 -13
  328. package/lib/video-recap/skills/video-assemble/scripts/{jianying_writer.py → jianying/writer.py} +7 -17
  329. package/lib/video-recap/skills/video-assemble/scripts/lib.py +37 -4
  330. package/lib/video-recap/skills/video-assemble/scripts/media.py +12 -21
  331. package/lib/video-recap/skills/video-assemble/scripts/narration_audio.py +64 -34
  332. package/lib/video-recap/skills/video-assemble/scripts/packaging.py +122 -0
  333. package/lib/video-recap/skills/video-assemble/scripts/pair_media.py +216 -0
  334. package/lib/video-recap/skills/video-assemble/scripts/render_preflight.py +1 -3
  335. package/lib/video-recap/skills/video-assemble/scripts/source_score.py +469 -0
  336. package/lib/video-recap/skills/video-assemble/scripts/source_subtitles.py +25 -9
  337. package/lib/video-recap/skills/video-assemble/scripts/subtitles/__init__.py +1 -0
  338. package/lib/video-recap/skills/video-assemble/scripts/{subtitle_core.py → subtitles/core.py} +13 -6
  339. package/lib/video-recap/skills/video-assemble/scripts/{subtitle_render.py → subtitles/render.py} +5 -4
  340. package/lib/video-recap/skills/video-assemble/scripts/subtitles/track.py +324 -0
  341. package/lib/video-recap/skills/video-assemble/scripts/subtitles/track_binding.py +200 -0
  342. package/lib/video-recap/skills/video-assemble/scripts/timeline.py +30 -46
  343. package/lib/video-recap/skills/video-assemble/scripts/timeline_emit.py +91 -7
  344. package/lib/video-recap/skills/video-assemble/scripts/visual_render.py +22 -8
  345. package/lib/video-recap/skills/video-cut/SKILL.md +34 -16
  346. package/lib/video-recap/skills/video-cut/references/shot-review.md +50 -0
  347. package/lib/video-recap/skills/video-cut/scripts/cut.py +2 -28
  348. package/lib/video-recap/skills/video-cut/scripts/cut_cli.py +58 -62
  349. package/lib/video-recap/skills/video-cut/scripts/cut_contract.py +21 -106
  350. package/lib/video-recap/skills/video-cut/scripts/cut_render.py +14 -9
  351. package/lib/video-recap/skills/video-cut/scripts/lib.py +39 -0
  352. package/lib/video-recap/skills/video-cut/scripts/narration_mapping.py +2 -155
  353. package/lib/video-recap/skills/video-cut/scripts/narrative_selection.py +244 -0
  354. package/lib/video-recap/skills/video-cut/scripts/shot_review.py +357 -0
  355. package/lib/video-recap/skills/video-recap/SKILL.md +86 -42
  356. package/lib/video-recap/skills/video-recap/references/audio-routing.md +126 -0
  357. package/lib/video-recap/skills/video-recap/references/config-playbook.md +12 -8
  358. package/lib/video-recap/skills/video-recap/references/data-schema.md +44 -33
  359. package/lib/video-recap/skills/video-recap/references/resource-library.md +151 -0
  360. package/lib/video-recap/skills/video-recap/references/shift-left-qc-schema.md +1 -1
  361. package/lib/video-recap/skills/video-recap/scripts/doctor.py +123 -30
  362. package/lib/video-recap/skills/video-recap/scripts/final_qc.py +22 -75
  363. package/lib/video-recap/skills/video-recap/scripts/lib.py +3 -3
  364. package/lib/video-recap/skills/video-recap/scripts/library.py +509 -0
  365. package/lib/video-recap/skills/video-recap/scripts/materials.py +63 -91
  366. package/lib/video-recap/skills/video-recap/scripts/mimo_qc.py +8 -70
  367. package/lib/video-recap/skills/video-recap/scripts/project_binding.py +286 -0
  368. package/lib/video-recap/skills/video-recap/scripts/qc/__init__.py +1 -0
  369. package/lib/video-recap/skills/video-recap/scripts/{mimo_qc_client.py → qc/mimo_client.py} +1 -1
  370. package/lib/video-recap/skills/video-recap/scripts/{mimo_qc_evidence.py → qc/mimo_evidence.py} +33 -66
  371. package/lib/video-recap/skills/video-recap/scripts/{mimo_qc_observations.py → qc/mimo_observations.py} +3 -11
  372. package/lib/video-recap/skills/video-recap/scripts/{mimo_qc_payload.py → qc/mimo_payload.py} +4 -7
  373. package/lib/video-recap/skills/video-recap/scripts/{mimo_qc_report.py → qc/mimo_report.py} +17 -28
  374. package/lib/video-recap/skills/video-recap/scripts/{mimo_qc_runner.py → qc/mimo_runner.py} +2 -2
  375. package/lib/video-recap/skills/video-recap/scripts/qc_contract.py +0 -19
  376. package/lib/video-recap/skills/video-recap/scripts/recap_cli.py +119 -50
  377. package/lib/video-recap/skills/video-recap/scripts/recap_inspect.py +32 -114
  378. package/lib/video-recap/skills/video-recap/scripts/recap_review.py +9 -23
  379. package/lib/video-recap/skills/video-recap/scripts/recap_runner.py +387 -334
  380. package/lib/video-recap/skills/video-recap/scripts/recap_runtime.py +23 -23
  381. package/lib/video-recap/skills/video-recap/scripts/recap_source.py +278 -0
  382. package/lib/video-recap/skills/video-recap/scripts/recap_stage_qc.py +25 -12
  383. package/lib/video-recap/skills/video-recap/scripts/recap_timeline.py +59 -52
  384. package/lib/video-recap/skills/video-recap/scripts/resource_lock.py +162 -0
  385. package/lib/video-recap/skills/video-script/SKILL.md +16 -13
  386. package/lib/video-recap/skills/video-script/references/creative-editing-playbook.md +9 -5
  387. package/lib/video-recap/skills/video-script/references/promotional-copy.md +68 -0
  388. package/lib/video-recap/skills/video-script/references/research-guide.md +1 -1
  389. package/lib/video-recap/skills/video-script/scripts/evidence_bundle.py +24 -76
  390. package/lib/video-recap/skills/video-script/scripts/lib.py +10 -87
  391. package/lib/video-recap/skills/video-script/scripts/narration_lint.py +63 -39
  392. package/lib/video-recap/skills/video-script/scripts/review.py +0 -2
  393. package/lib/video-recap/skills/video-script/scripts/review_grounding.py +35 -59
  394. package/lib/video-recap/skills/video-script/scripts/review_response.py +66 -128
  395. package/lib/video-recap/skills/video-script/scripts/review_runner.py +12 -20
  396. package/lib/video-recap/skills/video-script/scripts/speech_ownership.py +4 -4
  397. package/lib/video-recap/skills/video-script/scripts/validate.py +53 -42
  398. package/lib/video-recap/skills/video-understanding/SKILL.md +6 -4
  399. package/lib/video-recap/skills/video-understanding/references/data-schema.md +50 -156
  400. package/lib/video-recap/skills/video-understanding/references/research-guide.md +4 -4
  401. package/lib/video-recap/skills/video-understanding/scripts/asr.py +85 -65
  402. package/lib/video-recap/skills/video-understanding/scripts/asr_timing_evidence.py +270 -0
  403. package/lib/video-recap/skills/video-understanding/scripts/brief.py +2 -5
  404. package/lib/video-recap/skills/video-understanding/scripts/briefing/__init__.py +1 -0
  405. package/lib/video-recap/skills/video-understanding/scripts/{agent_brief.py → briefing/builder.py} +38 -35
  406. package/lib/video-recap/skills/{video-script/scripts/brief_context.py → video-understanding/scripts/briefing/context.py} +4 -35
  407. package/lib/video-recap/skills/{video-script/scripts/brief_inputs.py → video-understanding/scripts/briefing/inputs.py} +9 -31
  408. package/lib/video-recap/skills/video-understanding/scripts/{brief_timeline.py → briefing/timeline.py} +5 -6
  409. package/lib/video-recap/skills/video-understanding/scripts/consolidate.py +65 -116
  410. package/lib/video-recap/skills/video-understanding/scripts/detect.py +31 -40
  411. package/lib/video-recap/skills/video-understanding/scripts/lib.py +30 -86
  412. package/lib/video-recap/skills/video-understanding/scripts/narration_lint.py +63 -39
  413. package/lib/video-recap/skills/video-understanding/scripts/speech_ownership.py +4 -4
  414. package/lib/video-recap/skills/video-understanding/scripts/storyboard.py +17 -79
  415. package/lib/video-recap/skills/video-understanding/scripts/understanding_brief.py +14 -40
  416. package/lib/video-recap/skills/video-understanding/scripts/understanding_cache.py +64 -46
  417. package/lib/video-recap/skills/video-understanding/scripts/understanding_runner.py +31 -11
  418. package/lib/video-recap/skills/video-understanding/scripts/understanding_storyboard.py +19 -14
  419. package/lib/video-recap/skills/video-understanding/scripts/vlm.py +80 -108
  420. package/lib/video-recap/skills/video-voiceover/SKILL.md +29 -19
  421. package/lib/video-recap/skills/video-voiceover/references/index-tts.md +31 -0
  422. package/lib/video-recap/skills/video-voiceover/scripts/approved_text_policy.py +123 -0
  423. package/lib/video-recap/skills/video-voiceover/scripts/dub.py +51 -59
  424. package/lib/video-recap/skills/video-voiceover/scripts/lib.py +8 -44
  425. package/lib/video-recap/skills/video-voiceover/scripts/providers/__init__.py +1 -0
  426. package/lib/video-recap/skills/video-voiceover/scripts/providers/index_tts.py +184 -0
  427. package/lib/video-recap/skills/video-voiceover/scripts/voiceover.py +212 -134
  428. package/package.json +1 -1
  429. package/lib/oh-story/skills/story-long-analyze/references/material-decomposition.md +0 -538
  430. package/lib/oh-story/skills/story-long-analyze/references/output-templates.md +0 -603
  431. package/lib/oh-story/skills/story-long-scan/references/scan-output-format.md +0 -207
  432. package/lib/oh-story/skills/story-short-analyze/references/output-templates.md +0 -561
  433. package/lib/video-recap/skills/video-assemble/scripts/jianying_schema.py +0 -98
  434. package/lib/video-recap/skills/video-recap/references/creative-editing-playbook.md +0 -225
  435. package/lib/video-recap/skills/video-recap/references/research-guide.md +0 -74
  436. package/lib/video-recap/skills/video-recap/references/timeline-and-jianying.md +0 -250
  437. package/lib/video-recap/skills/video-script/scripts/agent_brief.py +0 -399
  438. package/lib/video-recap/skills/video-script/scripts/brief_timeline.py +0 -327
  439. package/lib/video-recap/skills/video-script/scripts/narration.py +0 -12
  440. package/lib/video-recap/skills/video-understanding/scripts/brief_context.py +0 -348
  441. package/lib/video-recap/skills/video-understanding/scripts/brief_inputs.py +0 -290
  442. /package/lib/video-recap/skills/video-assemble/scripts/{jianying_tracks.py → jianying/tracks.py} +0 -0
  443. /package/lib/video-recap/skills/video-recap/scripts/{mimo_qc_contract.py → qc/mimo_contract.py} +0 -0
  444. /package/lib/video-recap/skills/video-voiceover/scripts/{fish_audio.py → providers/fish_audio.py} +0 -0
@@ -45,7 +45,7 @@ metadata: {"openclaw":{"source":"https://github.com/zenstory-ai/oh-story-claudec
45
45
 
46
46
  用户要求记住、查看、确认、替换或忘掉作者习惯时,加载 [references/author-memory.md](references/author-memory.md),并只用本 skill 的 `scripts/author_memory_commit.py` 管理两级 `.story/作者记忆/`:全局、题材、流程条目在工作区(`AP`),本书条目在书目录(`BP`,传 `--book-root`)。常用变更走单事件 `record`;工具未返回 `ok: true` 和 `Author Memory Receipt` 前,不得声称已记住。告诉作者时先用一句人话说记住了什么(如「记住了:这本书的对话一律用「」」),回执放最后一行,写法见协议「回执怎么告诉作者」。显示画像或待确认项是只读操作;不存在时直接说明尚未建立。
47
47
 
48
- 新增习惯必须保留用户原话和适用范围。一次性要求只执行不记录;小说事实写入本书设定/追踪;不从反复修改或成稿推断偏好,只记作者明确说的,原话范围含糊才进待确认;与已生效习惯冲突时显式 replace,不原地改写历史。项目级画像里还有「本书:」条目时,建议对该书运行 `migrate --book-root`。用户没有指定工作区时,按协议定位已有作者记忆的最近祖先或当前创作工作区,禁止默认写到用户主目录。
48
+ 新增习惯必须保留用户原话和适用范围。一次性要求只执行不记录;小说事实写入本书设定/追踪;不从反复修改或成稿推断偏好,只记作者明确说的,原话范围含糊才进待确认;与已生效习惯冲突时显式 replace,不原地改写历史。作者说「整理作者记忆」、回执提示习惯攒得太多、工具报单书布局错误,或项目级画像里还有「本书:」条目(建议对该书运行 `migrate --book-root`)时,再加载 [references/author-memory-maintenance.md](references/author-memory-maintenance.md)。用户没有指定工作区时,按协议定位已有作者记忆的最近祖先或当前创作工作区,禁止默认写到用户主目录。
49
49
 
50
50
  ## Dashboard 工作台
51
51
 
@@ -88,12 +88,12 @@ metadata: {"openclaw":{"source":"https://github.com/zenstory-ai/oh-story-claudec
88
88
 
89
89
  ## 查询降级
90
90
 
91
- > Spawn 版本提示(不阻断 spawn):先读取项目根 `.story-deployed` 的 `agents_version`。与本版 `agents_version: 32` 不一致时(标记缺失、字段缺失/非整数、小于或大于 32)**照常按文件存在性检查并 spawn**,但只检查当前运行时的 canonical 目录;同时报告 `Notice: agents bundle 版本不匹配(项目 {N},本版 32)` 并提示重新运行 `/story-setup` 后新开会话;大于 32 时额外提示先更新 oh-story-claudecode,不要用本地旧版 setup 降级覆盖。只有 agent 文件缺失、或运行时不暴露 custom agent 时才降级 solo/direct,报告 `Fallback: ... -> solo`。
91
+ > Spawn 版本提示(不阻断 spawn):先读取项目根 `.story-deployed` 的 `agents_version`。与本版 `agents_version: 34` 不一致时(标记缺失、字段缺失/非整数、小于或大于 34)**照常按文件存在性检查并 spawn**,但只检查当前运行时的 canonical 目录;同时报告 `Notice: agents bundle 版本不匹配(项目 {N},本版 34)` 并提示重新运行 `/story-setup` 后新开会话;大于 34 时额外提示先更新 oh-story-claudecode,不要用本地旧版 setup 降级覆盖。只有 agent 文件缺失、或运行时不暴露 custom agent 时才降级 solo/direct,报告 `Fallback: ... -> solo`。
92
92
 
93
93
  「查故事资料」「查资料」走 agent 前先做轻量可用性检查(路由只做这一层,不承担全局部署策略):当前不在子代理上下文、当前运行时的 Agent/Task 或 `invoke_subagent` 工具可用,且对应部署文件存在(Claude `.claude/agents/*.md`、OpenCode `.opencode/agents/*.md`、Codex `.codex/agents/*.toml`、Antigravity `.agents/agents/agent-name/agent.md`,其中 `agent-name` 为目标 agent 名)→ 可尝试 spawn。Antigravity 用 `invoke_subagent` + 同名 `TypeName`,不得因其他端文件存在而误判。任一不满足,或运行时返回 unknown agent / 未暴露 custom-agent registry,则降级,不硬失败:
94
94
 
95
- - `story-explorer` 不可用 → 主线程直接用 Read/Grep 从项目文件检索(角色状态/伏笔/进度/设定),回答前说一句「查资料助手没启用,这次我直接翻项目文件」;项目尚未部署时提示先 `/story-setup`(Codex 中用 `$story-setup`)。
96
- - `story-researcher` 不可用 → 主线程用现有检索/回答能力完成,或提示用户改用 `/browser-cdp` 采集,同样用一句白话说明。
95
+ - `story-explorer` 不可用 → 主会话直接用 Read/Grep 从项目文件检索(角色状态/伏笔/进度/设定),回答前说一句「查资料助手没启用,这次我直接翻项目文件」;项目尚未部署时提示先 `/story-setup`(Codex 中用 `$story-setup`)。
96
+ - `story-researcher` 不可用 → 主会话用现有检索/回答能力完成,或提示用户改用 `/browser-cdp` 采集,同样用一句白话说明。
97
97
 
98
98
  回答作者时讲故事里的事(谁、在哪章、发生了什么);文件字段名、伏笔/事件编号不单独出现,编号必须跟着故事描述。
99
99
 
@@ -101,7 +101,7 @@ metadata: {"openclaw":{"source":"https://github.com/zenstory-ai/oh-story-claudec
101
101
 
102
102
  路由前先检查当前项目状态:
103
103
 
104
- - **无项目目录**(没有包含 `追踪/` 或 `设定/` 的书名目录):
104
+ - **无项目目录**(没有包含 `追踪/` 或 `设定/` 的书名目录,也没有同时有 `正文.md` 与 `小节大纲.md`(或 `设定.md`)的短篇目录):
105
105
  - 如果用户要写作,下一步是先运行 `/story-setup` 初始化环境(Codex 中用 `$story-setup`)
106
106
  - 如果用户要扫榜/拆文,直接路由
107
107
  - **已有项目**:检查 `.story-deployed` 标记,如未部署则先运行 `/story-setup`(Codex 中用 `$story-setup`)
@@ -110,7 +110,7 @@ metadata: {"openclaw":{"source":"https://github.com/zenstory-ai/oh-story-claudec
110
110
 
111
111
  用户想切换或查看在写的书时(一个项目可同时有多本):
112
112
 
113
- 1. 在项目根查找所有书目录:包含 `追踪/` 或 `设定/` 子目录的目录(含 `长篇/`、`短篇/` 下的子目录)。
113
+ 1. 在项目根查找所有书目录:包含 `追踪/` 或 `设定/` 子目录的目录,或同时有 `正文.md` 与 `小节大纲.md`(或 `设定.md`)的目录(含 `长篇/`、`短篇/` 下的子目录)。
114
114
  2. 列出书名,并标出当前 `.active-book` 指向的那本。
115
115
  3. 让用户选择,把所选书的相对路径写入项目根 `.active-book`(覆盖原内容)。
116
116
  4. 只发现一本时直接确认为活跃书,无需询问。
@@ -1 +1 @@
1
- 0.8.0
1
+ 0.8.4
@@ -0,0 +1,75 @@
1
+ # 作者记忆维护
2
+
3
+ [author-memory.md](author-memory.md) 的少见时刻补充:记一条、确认、替换、忘掉和优先级仍按那份协议,本文件只在下列情况读——作者说「整理作者记忆」,或回执 `warnings`/查询 `omitted_ids` 提示超编;写入因 `作者画像.md` 写满失败;书根就是工作区,或工具报 `state.book`、单书布局错误;要做存量迁移 `migrate`、多事件原子 `commit`、派生视图 `check`;冲突候选要落定;碰到升级前留下的旧条目。
4
+
5
+ 作者记忆借鉴“原始证据 → 候选 → 已确认画像 → 变更记录”的记忆管道,但把决定权留给作者。
6
+
7
+ ## 文件
8
+
9
+ ```text
10
+ {工作区}/.story/作者记忆/ # 项目级 store:global / genre / workflow 条目,编号 AP
11
+ ├── _author-memory-state.json # 唯一结构化权威
12
+ ├── 作者画像.md # 仅 active,供作者查看与管理
13
+ ├── 待确认.md # pending / conflict,不参与约束
14
+ └── 变更记录.md # 最近 100 次、最新在前的事务记录
15
+ {书}/.story/作者记忆/ # 书级 store:只存这本书的 book 条目,编号 BP,同样四个文件
16
+ ```
17
+
18
+ 三个 Markdown 文件都从 state 确定性生成,禁止手改;完整历史保留在 state,变更记录只展示最近 100 次。`作者画像.md` 是人类管理视图,普通写作 agent 不整份注入,而是调用 `query` 取得本次相关的紧凑上下文。
19
+
20
+ ## 任务映射表
21
+
22
+ 各 skill 入口的 `query` 命令按此表选 kind;写入时的预算提醒也按这四类任务组合估算。
23
+
24
+ | 任务 | query kinds | 注入位置 |
25
+ |---|---|---|
26
+ | 正文初稿 / 续写 | `prose_style` + `story_design` | 主会话与实际正文 agent |
27
+ | 去 AI 味 / 改写 | `prose_style` | 主会话与实际改写 agent |
28
+ | 设定 / 大纲 | `story_design` + `workflow` + `interaction` | 主会话,不传正文 agent |
29
+ | 审稿 | `delivery` + `interaction` + 必要的 `prose_style` | 主会话,不降低 rubric |
30
+
31
+ 审稿匹配项只用于交付格式、协作方式和“作者有意采用的表达选择”说明;问题严重度和 PASS/FAIL 仍由 rubric 决定。
32
+
33
+ ## 注入预算与容量
34
+
35
+ - **写入不因注入预算失败**:`record` / `commit` 照常成功、给回执;工具按上表四类任务组合估算最坏查询情形(全局条目+各 scope 维度最重的单一切片,切片按大小写无关归并、轻重按写作时真正读到的字段算,与真实查询同一把尺),装不进 2048 字节的组合在返回的 `warnings` 里点名将被略过的条目及其断言首句。
36
+ - 写入落盘后另一级 store 读不出来(书目录不存在、`--book` 与书级记录不符等)也照常给回执,`warnings` 注明本次提醒没算上它。写书级条目时「本书+全局」按实际条目精确计算;写项目级条目时只看得到项目级 store,顺手传 `--book-root` 就把当前这本书也算进提醒。
37
+ - 查询按 **重要度 → 本书例外 → 最近更新** 排序装填(同一范围的条目必在同一 store,「最近」按该 store 的修订号比,不跨 store 比较),先丢的恒是重要度较低的条目——`importance` 决定超编时谁留在 prompt 里。装不下的条目跳过而不中断(一条长的不挡后面的短条),漏下的 ID 按同一优先级报进 `omitted_ids`(最多列 20 条,`omitted` 是真实总数)。
38
+ - 注入预算之外还有一道硬上限:`作者画像.md` 超过 12288 字节时写入会直接失败并要求先整理。active 条目攒到几十上百条才会碰到(远在注入预算之后),碰到就走「整理作者记忆」;`forget` 这类减量操作在满编时照常可用。
39
+
40
+ ## 整理作者记忆
41
+
42
+ 作者说「整理作者记忆」,或回执 `warnings`/查询 `omitted_ids` 提示超编、写入因画像写满失败时:读项目级与当前书的 `作者画像.md`(每条都标了范围、重要度、把握和确认次数,重要度就是超编时的去留依据),提出合并同义条(`replace` 多合一)、退役过时条(`forget`)、给错标成 `high` 的条目下调重要度、把超长断言压缩成一句话的提案;项目级画像里还有「本书:」条目时,「对该书运行 `migrate --book-root`」列为默认提案项。清单用原话逐条列给作者确认(编号只放括号里),确认后按 store 各汇成一份 `commit` 事务提交(一份事务只写一个 store)。合并时保住每条的否定词、限定词和适用范围——合不动就退役其中一条,不要靠删限定词把两条凑成一条。整理只由作者发起或确认,不自动执行。
43
+
44
+ ## 冲突候选
45
+
46
+ 冲突候选(`conflict`)不能绕过旧规则直接 `decide=activate`。作者选新说法:用 `replace`,`old_ids` 同时列旧 active 条目和这条冲突候选,新条目直接 active、两条旧的标 `superseded`;作者留旧规则:对候选 `decide=reject`。旧条目被 `replace` / `forget` 撤下后,它不再是任何候选的冲突对象,冲突对象清空的候选退回 `pending`。
47
+
48
+ ## 单书布局
49
+
50
+ 书根就是工作区(`--book-root` 与 `--workspace` 同一目录)时,书级 store 改住 `{工作区}/.story/作者记忆/书级/`,与项目级各自一份 state;首次建立的书名优先取项目级存量本书条目里唯一的书名,再取目录名。旧版曾把书级 state 写在项目级位置,此后项目级读写都报 `state.book`;带 `--book-root {工作区}` 运行任一命令(含 `query`)会先把它原样移进 `书级/`,不改内容。这个目录其实是某个工作区里的一本书时(上一层叫 `长篇/` 或 `短篇/`,或某个祖先有 `.active-book` 或项目级 state),工具直接报错、不动任何文件,按报错改传 `--workspace`。
51
+
52
+ ## 存量迁移
53
+
54
+ 不做双读:升级前写进项目级 store 的 book 条目不再参与查询与预算估算,也不再接受新的 book 写入;它们仍在 `作者画像.md` 里可见、可 `decide` / `forget`。对每本书运行一次 `migrate --book-root {书目录}` 即可整批搬回来:断言、证据、确认次数、重要度原样保留,换成 `BP` 编号,原 `AP` 条目标 `superseded` 并注明去向;与全局条目的冲突关系在迁移后不再成立,这类候选退回 `pending`。书级每个源条目一笔事务,重跑只补没做完的一半。「整理作者记忆」看到项目级画像里还有「本书:」条目时,把迁移列为默认提案项。
55
+
56
+ ## 旧条目
57
+
58
+ - 升级前写下的长断言不受 120 字节新建上限约束:原样重申它会**强化**原条目(确认次数 +1),不会因超长被拒;只有真正新建条目才校验 120 字节。
59
+ - 存量 state 里推断类旧来源的条目照常可读、可确认、可退役;新写入仍只接受 `explicit_user`、`accepted_suggestion`、`manual`。
60
+
61
+ ## 其他命令
62
+
63
+ 先依次尝试 `python3`、`python`、`py -3` 找到 Python 3,再从当前 skill 根运行本地副本(`record` / `query` 见 author-memory.md):
64
+
65
+ ```text
66
+ {PYTHON} {当前 skill 根}/scripts/author_memory_commit.py init --workspace {工作区} [--book-root {书目录}]
67
+ {PYTHON} {当前 skill 根}/scripts/author_memory_commit.py commit --workspace {工作区} [--book-root {书目录}] --input {工作区}/.story/work/作者记忆-事务.json
68
+ {PYTHON} {当前 skill 根}/scripts/author_memory_commit.py migrate --workspace {工作区} --book-root {书目录}
69
+ {PYTHON} {当前 skill 根}/scripts/author_memory_commit.py check --workspace {工作区} [--book-root {书目录}]
70
+ ```
71
+
72
+ - `commit`:高级批量入口,只在需要把多个动作绑定成一次原子提交时用(如整理作者记忆)。顶层传 `schema_version`、唯一 `transaction_id`、当前 `expected_state_revision` 和含 1–32 项的 `operations`(每项与单事件的 `operation` 同形)。一份事务只写一个 store;先在内存完成 schema、引用、容量和所有视图校验,操作按数组顺序应用,任一步失败则整份事务零写入,最后原子替换 state。过期修订会在任何写入前失败。事务文件在成功前必须保留,成功后删除;显式记忆请求按 author-memory.md「回执怎么告诉作者」转告。
73
+ - `migrate`:把项目级 store 里某本书的存量 book 条目整批搬进 `--book-root` 的书级 store,幂等,中途失败直接重跑;返回 `migrated`(源→新编号),没有存量时为空。
74
+ - `check`:从 state 重建并逐字核验所有派生视图;传 `--book-root` 时两级一起核验。
75
+ - `init`:显式初始化 store;平常不需要,首次 `record` 会随事务创建。
@@ -1,6 +1,6 @@
1
1
  # 作者记忆协议
2
2
 
3
- 作者记忆用于保存跨会话复用的创作偏好,不保存小说世界里的事实。它借鉴“原始证据 → 候选 → 已确认画像 → 变更记录”的记忆管道,但把决定权留给作者。
3
+ 作者记忆保存跨会话复用的创作偏好,不保存小说世界里的事实,决定权留给作者。本文件管最常见的时刻:作者说出一条偏好,或要确认、替换、忘掉某条。少见情况读 [author-memory-maintenance.md](author-memory-maintenance.md):整理作者记忆与超编、画像写满、单书布局与 `state.book` 报错、存量迁移、多事件 `commit`、`check`、冲突候选落定、升级前的旧条目。
4
4
 
5
5
  ## 边界与优先级
6
6
 
@@ -17,61 +17,24 @@
17
17
 
18
18
  作者记忆不能把本书事实写进 `.story/作者记忆/`,不能覆盖当前请求,不能降低审稿 rubric,也不能让去 AI 味改动剧情意图。小说事实继续由各书的 `追踪/` 和 `设定/` 管理。
19
19
 
20
- ## 文件与所有权
20
+ ## 存放与路由
21
21
 
22
- 作者记忆分两级存放,记忆随书走:
22
+ 两级 store,记忆随书走:`{工作区}/.story/作者记忆/` 存 global / genre / workflow 条目(编号 `AP`),`{书}/.story/作者记忆/` 只存本书的 book 条目(编号 `BP`)。每级各有 `作者画像.md`(生效条目)和 `待确认.md`(候选,不参与约束),都从 state 生成,禁止手改;不存在时写作、审稿、去味照常继续,首次 `record` 自动创建。
23
23
 
24
- ```text
25
- {工作区}/.story/作者记忆/ # 项目级 store:global / genre / workflow 条目,编号 AP
26
- ├── _author-memory-state.json # 唯一结构化权威
27
- ├── 作者画像.md # 仅 active,供作者查看与管理
28
- ├── 待确认.md # pending / conflict,不参与约束
29
- └── 变更记录.md # 最近 100 次、最新在前的事务记录
30
- {书}/.story/作者记忆/ # 书级 store:只存这本书的 book 条目,编号 BP,同样四个文件
31
- ```
32
-
33
- 三个 Markdown 文件都从 state 确定性生成,禁止手改;完整历史保留在 state,变更记录只展示最近 100 次。`作者画像.md` 是人类管理视图,普通写作 agent 不整份注入,而是调用 `query` 取得本次相关的紧凑上下文。作者记忆不存在时,普通写作、审稿和去味任务直接继续,不自动初始化空目录;首次 `record` 会随事务创建。
34
-
35
- **定位规则**:`--workspace` 必须显式传给脚本,指创作工作区根——承载多本书、`.active-book`、`长篇/`、`短篇/` 或 `拆文库/` 的那一层;已有记忆时,是项目级 state(不带 `book` 字段)所在的最近祖先。书目录自己的 `.story/作者记忆/` 是书级 store,`长篇/`、`短篇/` 下的书目录永远不当 `--workspace`;不要把用户主目录当默认工作区。`--book-root` 是当前书的项目目录(`.active-book` 指向、或含 `设定/`、`正文/` 的那一层,如 `{工作区}/长篇/{书名}/`);书名默认取书级 state 记录的名字,首次建立时取目录名,`--book` 可覆盖。
36
-
37
- **单书布局**:书根就是工作区(`--book-root` 与 `--workspace` 同一目录)时,书级 store 改住 `{工作区}/.story/作者记忆/书级/`,与项目级各自一份 state;首次建立的书名优先取项目级存量本书条目里唯一的书名,再取目录名。旧版曾把书级 state 写在项目级位置,此后项目级读写都报 `state.book`;带 `--book-root {工作区}` 运行任一命令(含 `query`)会先把它原样移进 `书级/`,不改内容。这个目录其实是某个工作区里的一本书时(上一层叫 `长篇/` 或 `短篇/`,或某个祖先有 `.active-book` 或项目级 state),工具直接报错、不动任何文件,按报错改传 `--workspace`。
38
-
39
- **路由规则**:ID 前缀就是 store——`decide` / `forget` 看 `item_id`(`AP` 进项目级,`BP` 进书级),`remember` / `replace` 看 `scope.level`(`book` 进书级,其余进项目级)。书级操作必须传 `--book-root`,没传直接报错,不会退而写进项目级。一份 `commit` 事务只能写一个 store;`replace` 与 `conflicts_with` 不能跨 store——本书例外按优先级覆盖全局规则,不算冲突,直接 `remember` 为 book 条目即可;要把全局规则改成本书规则,拆成 `forget` + `remember` 两个事件。
40
-
41
- **存量迁移,不做双读**:升级前写进项目级 store 的 book 条目不再参与查询与预算估算,也不再接受新的 book 写入;它们仍在 `作者画像.md` 里可见、可 `decide` / `forget`。对每本书运行一次 `migrate --book-root {书目录}` 即可整批搬回来:断言、证据、确认次数、重要度原样保留,换成 `BP` 编号,原 `AP` 条目标 `superseded` 并注明去向;与全局条目的冲突关系在迁移后不再成立,这类候选退回 `pending`。书级每个源条目一笔事务,重跑只补没做完的一半。「整理作者记忆」看到项目级画像里还有「本书:」条目时,把迁移列为默认提案项。
42
-
43
- ## 什么时候读取
44
-
45
- 长篇、短篇、去 AI 味开始前,如果 state 已存在,用 `query` 按本书、题材、流程和类型筛选 active 条目:结果是项目级 store 与 `--book-root` 所指书级 store 的合并;不传 `--book-root` 就拿不到任何本书条目。查询输出固定不超过 2048 字节。`--kind` 必传——不传直接报错,不再默认返回全部类型;按任务直接选择 kind:
24
+ - `--workspace` 必须显式传,指创作工作区根——承载多本书、`.active-book`、`长篇/`、`短篇/` 或 `拆文库/` 的那一层;已有记忆时,是项目级 state(不带 `book` 字段)所在的最近祖先。`长篇/`、`短篇/` 下的书目录永远不当 `--workspace`,也不要把用户主目录当默认工作区。
25
+ - `--book-root` 是当前书的项目目录(`.active-book` 指向、或含 `设定/`、`正文/` 的那一层,如 `{工作区}/长篇/{书名}/`);书名默认取书级 state 记的名字,首次取目录名,`--book` 可覆盖。书根就是工作区时读维护文件「单书布局」。
26
+ - ID 前缀就是 store:`decide` / `forget` 看 `item_id`(`AP` 项目级,`BP` 书级),`remember` / `replace` 看 `scope.level`(`book` 书级,其余项目级)。书级操作必须传 `--book-root`,没传直接报错,不会退而写进项目级。
27
+ - `replace` 与 `conflicts_with` 不能跨 store:本书例外按优先级覆盖全局规则,不算冲突,直接 `remember` 为 book 条目;要把全局规则改成本书规则,拆成 `forget` + `remember` 两个事件。
46
28
 
47
- | 任务 | query kinds | 注入位置 |
48
- |---|---|---|
49
- | 正文初稿 / 续写 | `prose_style` + `story_design` | 主会话与实际正文 agent |
50
- | 去 AI 味 / 改写 | `prose_style` | 主会话与实际改写 agent |
51
- | 设定 / 大纲 | `story_design` + `workflow` + `interaction` | 主会话,不传正文 agent |
52
- | 审稿 | `delivery` + `interaction` + 必要的 `prose_style` | 主会话,不降低 rubric |
29
+ ## 查询
53
30
 
54
- 审稿匹配项只用于交付格式、协作方式和“作者有意采用的表达选择”说明;问题严重度和 PASS/FAIL 仍由 rubric 决定。
31
+ 各 skill 入口已写好本任务的 `query` 命令(长篇正文由组装脚本代查);没写命令的长篇设定、大纲等任务查 `story_design` + `workflow` + `interaction`,结果只给主会话、不传正文 agent。四类任务的映射表见维护文件。state 存在才查(两级都不存在时返回空结果、零写入);结果合并项目级与 `--book-root` 所指书级(不传就拿不到本书条目),`--kind` 必传,输出不超过 2048 字节。
55
32
 
56
- 待确认项不进入 prompt 约束,也不应为了确认它们中断当前任务。只有用户主动查看作者画像、候选积累到适合回顾的节点,或新偏好与 active 条目冲突时,才集中呈现。
33
+ 普通创作只做一次本地 `query`,完整画像、证据、候选和 journal 不进 prompt。查询项是低优先级倾向,不是逐条打卡清单:自然吸收,不复述画像、不刻意提高词面命中率,不为命中牺牲连贯、节奏、字数或本书既定笔调。**`omitted_ids` 非空=记忆超编**,不是「没有更多了」:转告作者并建议「整理作者记忆」,不得改读完整画像规避预算。待确认项不进 prompt,也不为确认它们中断任务;只在作者主动查看、候选积累到适合回顾的节点,或新偏好与 active 条目冲突时集中呈现。
57
34
 
58
- ## 可靠性与负荷边界
35
+ ## 记不记、记成什么
59
36
 
60
- - 明确“记住 / 确认 / 替换 / 忘掉”的请求走单事件 `record`,不要求 agent 手工读取修订号或拼多操作事务。成功响应会给出 `Author Memory Receipt: rN · APxxx`;没有回执就不得声称“已经记住”。怎么告诉作者见「回执怎么告诉作者」。
61
- - 普通创作只做一次本地 `query`,没有 state 时返回空结果且不创建文件;有记忆时也只返回相关 active 条目,硬上限 2048 字节。完整画像、证据、候选和 journal 不进入正文 prompt。
62
- - **写入不因注入预算失败**:`record` / `commit` 照常成功、给回执;工具按上表四类任务组合估算最坏查询情形(全局条目+各 scope 维度最重的单一切片,切片按大小写无关归并、轻重按写作时真正读到的字段算,与真实查询同一把尺),装不进 2048 字节的组合在返回的 `warnings` 里点名将被略过的条目及其断言首句。收到提醒就用白话转告作者并建议「整理作者记忆」。写入落盘后另一级 store 读不出来(书目录不存在、`--book` 与书级记录不符等)也照常给回执,`warnings` 注明本次提醒没算上它——已有回执就是已记住,不要换 `event_id` 重试。写书级条目时「本书+全局」按实际条目精确计算;写项目级条目时只看得到项目级 store,顺手传 `--book-root` 就把当前这本书也算进提醒。查询按 **重要度 → 本书例外 → 最近更新** 排序装填(同一范围的条目必在同一 store,「最近」按该 store 的修订号比,不跨 store 比较),先丢的恒是重要度较低的条目——`importance` 决定超编时谁留在 prompt 里,写入时按偏好的实际分量填,不要一律 `high`。
63
- - 注入预算之外还有一道硬上限:`作者画像.md` 超过 12288 字节时写入会直接失败并要求先整理。active 条目攒到几十上百条才会碰到(远在注入预算之后),碰到就走「整理作者记忆」;`forget` 这类减量操作在满编时照常可用。
64
- - 查询项是低优先级倾向,不是逐条打卡清单。自然吸收即可,不复述画像、不刻意提高词面命中率,也不得为命中偏好牺牲正文连贯、节奏、字数或本书既定笔调。
65
- - 不安装会记录全部用户消息的 prompt hook,也不在作者没开口时观察他:不从反复修改、成稿或操作轨迹推断偏好写入。只记作者明确表达的偏好;自然语言是否属于长期习惯仍需 agent 判断,拿不准就只执行不记录。需要确定写入时,用户可明确说“记住:……”,并以回执验收。
66
-
67
- ## 回执怎么告诉作者
68
-
69
- 回复就两行纯文本,不加代码块或引用格式:第一行用一句人话说记住了什么、管哪本书或哪类场合,如「记住了:《{书名}》的对话一律用「」,以后写这本书都照这个来;想改随时说。」;第二行是机器回执作凭证,如「技术备注:Author Memory Receipt: r1 · BP001」。
70
-
71
- - 确认、替换、忘掉同理:「好,这条生效了:……」「换成了:……,原来的「……」不再用」「忘掉了:……」。只进待确认时说「这条先记在待确认里,你说"确认"才生效」;有冲突时用原话说明跟哪条旧习惯冲突。
72
- - `warnings` / `omitted_ids` 不原样贴:说「你的习惯攒得有点多,写正文时这几条可能顾不上:「……」」,并建议说「整理作者记忆」。不提字节、prompt、kind、scope;编号只能跟着原话出现。
73
-
74
- ## 捕获判定
37
+ 不装记录全部用户消息的 prompt hook,不在作者没开口时观察他,只记作者明确表达的偏好。是否属于长期习惯由 agent 判断,拿不准就只执行不记录;作者可明说“记住:……”,以回执验收。
75
38
 
76
39
  | 输入证据 | 处理 |
77
40
  |---|---|
@@ -83,59 +46,44 @@
83
46
  | 角色、时间线、伏笔、世界观、当前剧情走向 | 写项目设定/追踪,不写作者记忆 |
84
47
  | 助手自己生成的文字、默认模板、工具告警、rubric 结论 | 不自我学习 |
85
48
 
86
- 保留用户的否定词、限定词和适用范围,`quote` 写原话,`assertion` 只做不改变语义的紧凑归纳,**新建条目限一句话(≤120 字节,约 40 个字)**;需要解释的背景写进 `reason`(不进 prompt 载荷),不另开字段。
87
-
88
- **一条偏好就是一条记录,例外和限定不许拆出去单列。** 「以后少用破折号,对话里也别用,除非表示打断」是一条带例外的偏好,必须整条写成一个 `assertion`(「破折号少用、对话里也不用,只在表示打断时保留」)。超编时条目是逐条被丢的,把「除非表示打断」拆成独立一条,就可能只丢掉例外、把作者明说过的限定变成送进正文的绝对禁令。只有原话确实塞了**几条互不依赖**的偏好(如「多用短句」+「章末留钩子」)才拆成几条。整句写不进 120 字节时压缩措辞,不要切掉限定词。
49
+ 保留否定词、限定词和适用范围:`quote` 写原话,`assertion` 只做不改变语义的紧凑归纳,**新建条目限一句话(≤120 字节,约 40 个字)**,写不下就压缩措辞、不切限定词;背景写进 `reason`(不进 prompt),不另开字段。
89
50
 
90
- 升级前写下的长断言不受新上限约束:原样重申它会**强化**原条目(确认次数 +1),不会因超长被拒;只有真正新建条目才校验 120 字节。
51
+ **一条偏好就是一条记录,例外和限定不许拆出去单列。** 「以后少用破折号,对话里也别用,除非表示打断」整条写成「破折号少用、对话里也不用,只在表示打断时保留」:超编时条目逐条被丢,拆开就可能只丢掉例外,把作者说过的限定变成绝对禁令。只有原话塞了**几条互不依赖**的偏好(如「多用短句」+「章末留钩子」)才拆。
91
52
 
92
- 范围规则:
53
+ 范围:“本书 / 这个角色 / 这次连载” → `book`;“都市文 / 这类题材” → `genre`;交稿、检查、确认节奏等操作习惯 → `workflow`;“以后 / 一贯 / 我习惯”且无更窄限定 → `global`;含糊但可能稳定 → 最窄合理范围并置 `pending`。
93
54
 
94
- - “本书 / 这个角色 / 这次连载” → `book`;
95
- - “都市文 / 这类题材” → `genre`;
96
- - 交稿、检查、确认节奏等操作习惯 → `workflow`;
97
- - “以后 / 一贯 / 我习惯”且无更窄限定 → `global`;
98
- - 范围含糊但可能稳定 → 取当前最窄合理范围并置 `pending`。
55
+ 类型:`prose_style`、`story_design`、`workflow`、`delivery`、`interaction`。置信度与重要度均为 `low | medium | high`;超编时先丢重要度低的,按偏好的实际分量填,不要一律 `high`。`source` 只接受 `explicit_user`、`accepted_suggestion`、`manual`,工具拒绝推断类来源。
99
56
 
100
- 类型可选:`prose_style`、`story_design`、`workflow`、`delivery`、`interaction`。置信度与重要度均为 `low | medium | high`。`source` 只接受 `explicit_user`、`accepted_suggestion`、`manual`;工具会拒绝推断类来源,存量 state 里的旧来源条目照常可读、可确认、可退役。
57
+ ## 确认、替换、忘掉与冲突
101
58
 
102
- ## 冲突、撤回与强化
59
+ - 同一类型、范围、归纳文本再出现,脚本强化原条目(累加证据与确认次数),不重复建条。
60
+ - 新偏好与同一 store 的 active 条目矛盾:以 `conflict` 记候选,`conflicts_with` 列冲突 ID,本轮仍按当前要求执行;本书例外与全局规则不算冲突。冲突候选不能直接 activate,落定见维护文件「冲突候选」。
61
+ - pending 用 `decide=activate|reject`。同一范围的规则改版用 `replace`,新条目启用、旧条目标 `superseded`;只有作者明确撤销或改变旧规则范围才跨范围替换。
62
+ - 作者说“忘掉 / 这不再是我的习惯”用 `forget`,保留历史证据但不再加载。active 条目的语义不可原地偷改,语义变化必须 replace,历史才可审计。
103
63
 
104
- - 同一类型、范围、归纳文本再次出现时,脚本强化原条目,累加证据和确认次数,不重复建条目。
105
- - 新偏好与同一 store 里的 active 条目矛盾时,先以 `conflict` 记候选,并在 `conflicts_with` 列出冲突 ID;当前任务仍按本轮明确要求执行。本书例外与全局规则不算冲突。
106
- - 同一范围的规则改版用 `replace`,启用新条目并将旧条目标成 `superseded`。本书例外用 `remember` 新建 book 条目(传 `--book-root`),保留 global 习惯;只有作者明确撤销或改变旧规则范围时才跨范围替换,跨 store 时拆成 `forget` + `remember`。
107
- - pending 可以用 `decide=activate|reject`;冲突候选不能绕过旧规则直接 activate。
108
- - 作者说“忘掉 / 这不再是我的习惯”时用 `forget`,保留历史证据但不再加载。
109
- - active 条目的语义不可原地偷改;语义变化必须 replace,历史才可审计。
64
+ ## 回执怎么告诉作者
110
65
 
111
- ## 整理作者记忆
66
+ 回复就两行纯文本,不加代码块或引用格式:第一行用一句人话说记住了什么、管哪本书或哪类场合,如「记住了:《{书名}》的对话一律用「」,以后写这本书都照这个来;想改随时说。」;第二行是机器回执作凭证,如「技术备注:Author Memory Receipt: r1 · BP001」。
112
67
 
113
- 作者说「整理作者记忆」,或回执 `warnings`/查询 `omitted_ids` 提示超编时:读项目级与当前书的 `作者画像.md`(每条都标了范围、重要度、把握和确认次数,重要度就是超编时的去留依据),提出合并同义条(`replace` 多合一)、退役过时条(`forget`)、给错标成 `high` 的条目下调重要度、把超长断言压缩成一句话的提案;项目级画像里还有「本书:」条目时,「对该书运行 `migrate --book-root`」列为默认提案项。清单用原话逐条列给作者确认(编号只放括号里),确认后按 store 各汇成一份 `commit` 事务提交(一份事务只写一个 store)。合并时保住每条的否定词、限定词和适用范围——合不动就退役其中一条,不要靠删限定词把两条凑成一条。整理只由作者发起或确认,不自动执行。
68
+ - 确认、替换、忘掉同理:「好,这条生效了:……」「换成了:……,原来的「……」不再用」「忘掉了:……」。只进待确认时说「这条先记在待确认里,你说"确认"才生效」;有冲突时用原话说明跟哪条旧习惯冲突。
69
+ - `warnings` / `omitted_ids` 不原样贴:说「你的习惯攒得有点多,写正文时这几条可能顾不上:「……」」,并建议说「整理作者记忆」。不提字节、prompt、kind、scope;编号只能跟着原话出现。
114
70
 
115
71
  ## 运行工具
116
72
 
117
- 先依次尝试 `python3`、`python`、`py -3` 找到 Python 3,再从当前 skill 根运行本地副本:
73
+ 依次尝试 `python3`、`python`、`py -3` 找到 Python 3,从当前 skill 根运行本地副本:
118
74
 
119
75
  ```text
120
- {PYTHON} {当前 skill 根}/scripts/author_memory_commit.py init --workspace {工作区} [--book-root {书目录}]
121
- {PYTHON} {当前 skill 根}/scripts/author_memory_commit.py record --workspace {工作区} [--book-root {书目录}] --input {工作区}/.story/work/作者记忆-事件.json
122
- {PYTHON} {当前 skill 根}/scripts/author_memory_commit.py query --workspace {工作区} --book-root {书目录} --kind {类型}(必传,可重复) [--genre {题材}] [--workflow {流程}]
123
- {PYTHON} {当前 skill 根}/scripts/author_memory_commit.py commit --workspace {工作区} [--book-root {书目录}] --input {工作区}/.story/work/作者记忆-事务.json
124
- {PYTHON} {当前 skill 根}/scripts/author_memory_commit.py migrate --workspace {工作区} --book-root {书目录}
125
- {PYTHON} {当前 skill 根}/scripts/author_memory_commit.py check --workspace {工作区} [--book-root {书目录}]
76
+ {PYTHON} {当前 skill 根}/scripts/author_memory_commit.py record --workspace {工作区} [--book-root {书目录}] --input {工作区}/.story/work/作者记忆-事件.json
77
+ {PYTHON} {当前 skill 根}/scripts/author_memory_commit.py query --workspace {工作区} --book-root {书目录} --kind {类型}(必传,可重复) [--genre {题材}] [--workflow {流程}]
126
78
  ```
127
79
 
128
- 所有子命令都可加 `--book {书名}` 覆盖书名;正在写某本书时一律带上 `--book-root`,书级操作没有它会直接报错。事件与事务 JSON 写在 `{工作区}/.story/work/` 下(不写系统 `/tmp`),成功后删掉;`book` 条目的 `scope.value` 填书名(书级 store 已记着书名就用它,首次取书目录名)。
129
-
130
- - `record`:常用单事件入口,按路由规则落到项目级或书级 store,自动读取该 store 的当前修订、首次自动初始化;`event_id` 相同且内容相同会幂等返回原回执,内容不同会失败。原样重申已有条目的 `assertion` 会强化该条(不受 120 字节新建上限约束)。返回里的 `store` / `book` 说明写到了哪一级,`warnings` 是预算提醒,按「回执怎么告诉作者」用白话转告。
131
- - `query`:只读相关 active 条目,项目级与书级合并返回;`--kind` 必传、可重复,两级 state 都不存在时返回空结果且零写入。输出按 重要度 → 本书例外 → 最近更新 排序装填;装不下的条目跳过而不中断(一条长的不挡后面的短条),漏下的 ID 按同一优先级报进 `omitted_ids`(最多列 20 条,`omitted` 是真实总数)。**`omitted_ids` 非空=记忆超编**——转告作者并建议「整理作者记忆」,它不是「没有更多了」,也不得改读完整画像规避预算。
132
- - `commit`:高级批量入口;一份事务只写一个 store,先在内存完成 schema、引用、容量和所有视图校验,最后原子替换 state。事务文件在成功前必须保留;过期修订会在任何写入前失败。
133
- - `migrate`:把项目级 store 里某本书的存量 book 条目整批搬进 `--book-root` 的书级 store,幂等,中途失败直接重跑;返回 `migrated`(源→新编号),没有存量时为空。
134
- - `check`:从 state 重建并逐字核验所有派生视图;传 `--book-root` 时两级一起核验。
80
+ - 子命令都可加 `--book {书名}`;写某本书时一律带 `--book-root`。事件 JSON 写在 `{工作区}/.story/work/`(不写系统 `/tmp`),成功后删掉;book 条目的 `scope.value` 填书名(书级 store 已记的名字,首次取目录名)。
81
+ - 明确的“记住 / 确认 / 替换 / 忘掉”都走单事件 `record`:自动读该 store 当前修订、首次自动初始化,不手工读修订号或拼多操作事务。同一 `event_id` 同内容幂等返回原回执,内容不同则失败;返回的 `store` / `book` 说明写到了哪一级。
82
+ - 成功才有 `Author Memory Receipt: rN · APxxx`,没有回执不得声称“已经记住”。**写入不因注入预算失败**:`warnings` 只是提醒(另一级 store 读不出来也在这里注明),按上节转告;有回执就是已记住,不要换 `event_id` 重试。
135
83
 
136
- ## 事务格式
84
+ ## 事件格式
137
85
 
138
- 常用单事件新增或强化:
86
+ 新增或强化(`record` 输入;book 范围传 `--book-root`):
139
87
 
140
88
  ```json
141
89
  {
@@ -147,11 +95,11 @@
147
95
  "kind": "prose_style",
148
96
  "scope": {"level": "global", "value": null},
149
97
  "assertion": "对话尽量短,用动作承接情绪,不用大段解释",
150
- "quote": "以后对话都短一点,情绪放动作里,别让角色长篇解释。",
151
- "source_ref": "conversation:2026-08-25",
152
- "source": "explicit_user",
153
- "confidence": "high",
154
- "importance": "high",
98
+ "quote": "以后对话都短一点,情绪放动作里,别让角色长篇解释。",
99
+ "source_ref": "conversation:2026-08-25",
100
+ "source": "explicit_user",
101
+ "confidence": "high",
102
+ "importance": "high",
155
103
  "status": "active",
156
104
  "reason": "用户以“以后”明确声明长期偏好",
157
105
  "conflicts_with": []
@@ -160,36 +108,10 @@
160
108
  }
161
109
  ```
162
110
 
163
- 把文件交给 `record`(book 范围的事件同时传 `--book-root`)。待确认项的 `status` 用 `pending`;冲突候选用 `conflict` 并填写同一 store 里的 active ID。确认或拒绝候选时,把下列对象作为新事件的 `operation`(`BP` 编号的事件传 `--book-root`):
111
+ 待确认用 `"status": "pending"`;冲突候选用 `conflict` 并填同一 store 的 active ID。确认、替换、忘掉时,把下列对象换进新事件的 `operation`(`BP` 编号传 `--book-root`);`replace.preference` 字段同上但不传 `status`、`conflicts_with`,新条目直接 active:
164
112
 
165
113
  ```json
166
114
  {"action":"decide","item_id":"AP002","decision":"activate","quote":"对,这就是我的长期习惯。","reason":"作者明确确认"}
167
- ```
168
-
169
- 用新规则替代一个或多个旧条目时,`replace.preference` 与上例字段相同,但不传 `status`、`conflicts_with`,新条目直接 active;下列对象同样作为 `operation`:
170
-
171
- ```json
172
- {
173
- "action": "replace",
174
- "old_ids": ["AP001"],
175
- "preference": {
176
- "kind": "prose_style",
177
- "scope": {"level": "global", "value": null},
178
- "assertion": "以后对话允许更长的试探,但避免解释设定",
179
- "quote": "把以前对话都要短的习惯替换掉:以后可以让对话慢一点,多试探,但还是别拿台词讲设定。",
180
- "source_ref": "conversation:2026-08-25",
181
- "source": "explicit_user",
182
- "confidence": "high",
183
- "importance": "high",
184
- "reason": "作者明确替换原有全局规则,不是新增本书例外"
185
- }
186
- }
187
- ```
188
-
189
- 撤回条目的 `operation`:
190
-
191
- ```json
115
+ {"action":"replace","old_ids":["AP001"],"preference":{"kind":"prose_style","scope":{"level":"global","value":null},"assertion":"以后对话允许更长的试探,但避免解释设定","quote":"……","source_ref":"conversation:2026-08-25","source":"explicit_user","confidence":"high","importance":"high","reason":"作者明确替换原有全局规则,不是新增本书例外"}}
192
116
  {"action":"forget","item_id":"AP003","quote":"忘掉这个偏好。","reason":"作者明确撤回"}
193
117
  ```
194
-
195
- 需要把多个动作绑定成一次原子提交时才用高级 `commit`:顶层传 `schema_version`、唯一 `transaction_id`、当前 `expected_state_revision` 和含 1–32 项的 `operations`。操作按数组顺序应用,任一步失败则整份事务零写入。成功后删除临时输入文件;显式记忆请求按「回执怎么告诉作者」转告。
@@ -41,7 +41,7 @@ LEGACY_ASSERTION_MAX_BYTES = 768 # 存量条目的读取上限;强化老条
41
41
  # 是它在 prompt 里的注意力预算,不该放大。防「作者以为载入了、实际被静默
42
42
  # 截断挤掉」靠三层:①新建条目的断言限 ASSERTION_MAX_BYTES,从源头短(强化
43
43
  # 已有条目不受限,否则存量长断言再也无法被确认,只会派生重复条目);②写入
44
- # 端按下列任务组合(与 references/author-memory.md 的映射表同包跟版)估算
44
+ # 端按下列任务组合(与 references/author-memory-maintenance.md 的映射表同包跟版)估算
45
45
  # 最坏查询情形——全局条目+各 scope 维度上最重的单一切片(一次查询只带一
46
46
  # 个 book/genre/workflow,不同书的条目不会同现;切片按 casefold 归并,与
47
47
  # same_scope_value 同一口径,轻重按 compact 字节+列表分隔符算,与真实载荷
@@ -150,7 +150,7 @@ def is_item_id(value: object) -> bool:
150
150
  isinstance(value, str)
151
151
  and len(value) >= 3
152
152
  and value[:2] in ID_PREFIXES
153
- and value[2:].isdigit()
153
+ and value[2:].isdecimal()
154
154
  and int(value[2:]) >= 1
155
155
  )
156
156
 
@@ -1414,7 +1414,7 @@ def command_query(
1414
1414
  prepare_workspace(workspace, book_root)
1415
1415
  require(
1416
1416
  bool(kinds),
1417
- "query 必须显式传 --kind(按 references/author-memory.md 的任务映射表选类型),不再默认返回全部类型",
1417
+ "query 必须显式传 --kind(按调用方 skill 写好的 query 命令选类型,映射表见 references/author-memory-maintenance.md),不再默认返回全部类型",
1418
1418
  )
1419
1419
  project_state = load_state(project_store(workspace))
1420
1420
  book_state = load_state(book_store(workspace, book_root, book)) if book_root is not None else None
@@ -14,9 +14,9 @@ metadata: {"openclaw":{"source":"https://github.com/zenstory-ai/oh-story-claudec
14
14
 
15
15
  ---
16
16
 
17
- > Agent 兼容性:只检查当前运行时的 canonical 目录:Claude `.claude/agents/{agent}.md`、OpenCode `.opencode/agents/{agent}.md`、Codex `.codex/agents/{agent}.toml`、Antigravity `.agents/agents/agent-name/agent.md`(`agent-name` 为目标 agent 名),不得因其他端文件存在而误判。Codex 使用同名 `agent_type`;Antigravity 使用 `invoke_subagent` + `TypeName`。对应运行时未暴露 custom-agent registry / `invoke_subagent` 或返回未知 agent 时,必须降级 solo/direct。检测到 `.zcode/` 时同样直接 solo/direct,因为 ZCode 3.3.4 不执行项目 custom agents;报告 `Fallback: project custom agents unavailable -> solo`。Claude 用 `subagent_type`;OpenCode 用 `subagent` 工具的 `agent` 参数。
17
+ > Agent 兼容性:只检查当前运行时的 canonical 目录:Claude `.claude/agents/{agent}.md`、OpenCode `.opencode/agents/{agent}.md`、Codex `.codex/agents/{agent}.toml`、Antigravity `.agents/agents/agent-name/agent.md`(`agent-name` 为目标 agent 名),不得因其他端文件存在而误判。Claude 用 `subagent_type`,OpenCode 用 `subagent` 工具的 `agent` 参数,Codex 用同名 `agent_type`,Antigravity 用 `invoke_subagent` + `TypeName`。运行时未暴露 custom-agent registry / `invoke_subagent`、返回未知 agent,或检测到 `.zcode/`(ZCode 3.3.4 不执行项目 custom agents)时降级 solo/direct:报告里一句白话告诉作者「这次由我直接改」,`Fallback: project custom agents unavailable -> solo` 原文只写进报告最后一行「技术备注:」。
18
18
  >
19
- > Spawn 版本提示(不阻断 spawn):先读取项目根 `.story-deployed` 的 `agents_version`。与本版 `agents_version: 32` 不一致时(标记缺失、字段缺失/非整数、小于或大于 32)**照常按文件存在性检查并 spawn**,同时报告 `Notice: agents bundle 版本不匹配(项目 {N},本版 32)` 并提示重新运行 `/story-setup` 后新开会话;大于 32 时额外提示先更新 oh-story-claudecode,不要用本地旧版 setup 降级覆盖。只有 agent 文件缺失、或运行时不暴露 custom agent 时才降级 solo/direct,报告 `Fallback: ... -> solo`。
19
+ > Spawn 版本提示(不阻断 spawn):先读取项目根 `.story-deployed` 的 `agents_version`。与本版 `agents_version: 34` 不一致时(标记缺失、字段缺失/非整数、小于或大于 34)**照常按文件存在性检查并 spawn**,同时用一句白话提示作者「写作助手是旧版,运行 /story-setup 后新开对话」,`Notice: agents bundle 版本不匹配(项目 {N},本版 34)` 原文写进技术备注行;大于 34 时额外提示先更新 oh-story-claudecode,不要用本地旧版 setup 降级覆盖。只有 agent 文件缺失、或运行时不暴露 custom agent 时才降级 solo/direct,`Fallback: ... -> solo` 同样只进技术备注行。
20
20
 
21
21
  ## 核心哲学
22
22
 
@@ -50,7 +50,7 @@ AI味不按语法错误处理,也不需要"修正"。它属于风格问题:
50
50
 
51
51
  ### 作者习惯
52
52
 
53
- 若作者记忆 state 已存在,改写前用 `scripts/author_memory_commit.py query --kind prose_style --book-root {书目录}` 获取匹配的 active 文风条目(总输出 ≤2KB),并交给 inline/spawn 执行者作为自然倾向,不逐条展示或最大化命中,不牺牲连贯、节奏和字数;当前请求、原文剧情功能和本 skill 保护规则优先。用户明确声明长期文风习惯时,改写后按 [references/author-memory.md](references/author-memory.md) 用 `record` 写入并按其「回执怎么告诉作者」转告;只记作者明确说的,一次性要求、反复修改、检测器 findings 和助手自己的结果不记录。
53
+ 若作者记忆 state 已存在,改写前用 `scripts/author_memory_commit.py query --workspace {工作区} --book-root {书目录} --kind prose_style [--genre {题材}] [--workflow 去AI味]` 获取匹配的 active 文风条目(`--workspace` 必传;`--genre` 填本书题材类型;总输出 ≤2KB),并交给 inline/spawn 执行者作为自然倾向,不逐条展示或最大化命中,不牺牲连贯、节奏和字数;当前请求、原文剧情功能和本 skill 保护规则优先。用户明确声明长期文风习惯时,改写后按 [references/author-memory.md](references/author-memory.md) 用 `record` 写入并按其「回执怎么告诉作者」转告;只记作者明确说的,一次性要求、反复修改、检测器 findings 和助手自己的结果不记录。
54
54
 
55
55
  ---
56
56
 
@@ -89,6 +89,8 @@ AI味不按语法错误处理,也不需要"修正"。它属于风格问题:
89
89
 
90
90
  ### Phase 1:AI味扫描
91
91
 
92
+ **先认篇幅**:目标是单个 `正文.md`(同目录常有 `小节大纲.md` 或 `设定.md`)按短篇处理,门禁 F/G 保留短篇卖点(主观审判句、火葬场预告、心死式章尾);`正文/` 下逐章文件或章节片段按长篇处理。拿不准问作者一句。
93
+
92
94
  对用户提交的文本做快速扫描,标记AI味浓重的位置。报告写给作者:问题用白话说并附原文,脚本名、检测器类别名、Gate 字母不进报告。
93
95
 
94
96
  <!-- author-report -->
@@ -111,7 +113,7 @@ AI味不按语法错误处理,也不需要"修正"。它属于风格问题:
111
113
  | 第Q段 | 动作清单 | "伸手拿起…取过…放下…转身…" | 像监控录像,缺人物的感受 |
112
114
  ```
113
115
 
114
- > 类型 → Gate 速查(内部计数用,不写进表):套话 = A,句式 = B,情绪空转 = C,节奏 = D,对话腔调 = E,结尾升华 = F,解释腔 = G,重复描写 = C/D,动作清单 = D/E。「诊断与分级」判定"7 Gate 中 4+ 个有问题"时按此换算计数。
116
+ > 类型 → Gate 速查(选 Gate 用,不写进表):套话 = A,句式 = B,情绪空转 = C,节奏 = D,对话腔调 = E,结尾升华 = F,解释腔 = G,重复描写 = C/D,动作清单 = D/E。
115
117
 
116
118
  > 评价只输出 AI味等级(轻度/中度/重度)与问题标记;不做「上乘 / 新人投稿属上乘 / 性价比高」这类横向市场判断——skill 没有平台投稿分布数据,这类措辞是无依据的越权担保。
117
119
 
@@ -122,7 +124,7 @@ node scripts/check-ai-patterns.js --check --fail-on=blocking <正文文件...>
122
124
  ```
123
125
 
124
126
  - 检测器 blocking=必须修,advisory=建议看;轻/中/重分档另按「诊断与分级」定,用来选 Gate。
125
- - severity=blocking 的类别(`not-is-comparison` / `em-dash` / `voice-contrast` / `negation-parade` / `reverse-not-is` / `trailer-ending` / `trailer-summary`)并入 Gate B,属于写作/去 AI 味时优先处理的 blocking 类问题。
127
+ - severity=blocking 的类别(`not-is-comparison` / `em-dash` / `voice-contrast` / `negation-parade` / `reverse-not-is` / `trailer-ending` / `trailer-summary`)是写作/去 AI 味时优先处理的问题:章尾预告与章尾状态总结(`trailer-ending` / `trailer-summary`)归 Gate F,其余 blocking 并入 Gate B。
126
128
  - 其他 findings(碎句号、长段落、微动作、套式反应细节、动作清单、抽象总结、套词、比喻密度、解释链、公文腔、过度精炼、低连接密度、引号强调滥用、`formulaic-parallelism` 工整并列)只作读感提示;完整类别和修法见 `references/anti-ai-writing.md`。其中工整并列会扫描台词,必须读语境判断,不能因为 hook 对台词低误报豁免就跳过。
127
129
  - 处理方式:删掉否定铺垫,直接写后项;或改成角色动作、物件细节、身体反应来呈现。
128
130
  - 若用户只要检测,保留报告不改文。若执行去 AI 味,只改确实损害读感且无叙事功能的问题;功能性写法标 `[需复核]` 并保留。
@@ -131,21 +133,17 @@ node scripts/check-ai-patterns.js --check --fail-on=blocking <正文文件...>
131
133
 
132
134
  ### Phase 2:诊断与分级
133
135
 
134
- 用户明确指定 Gate 时,直接使用该范围;未指定时,根据「AI味扫描」检测结果判断 AI 味程度,决定处理策略:
135
-
136
- | AI味程度 | 量化标准(参考值) | 特征 | 处理策略 |
137
- |----------|---------|------|----------|
138
- | 轻度 | 禁用词命中 ≤5 处/千字,无连续 3+ 句式套路 | 少量禁用词,偶有书面腔 | 只过 Gate A + B |
139
- | 中度 | 禁用词命中 6-15 处/千字,或有连续 3+ 句式套路 | 多处禁用词 + 句式套路 + 心理描写抽象 | 过 Gate A + B + C + D + G |
140
- | 重度 | 禁用词命中 >15 处/千字,或 7 Gate 中 4+ 个有问题 | 全文AI味明显,节奏/对话/结尾/解释腔都有问题 | 完整 7 Gate + 重点段落重写 |
136
+ 用户明确指定 Gate 时,直接使用该范围;未指定时按下表定档、选处理策略:
141
137
 
142
- > 量化标准为参考值。命中 = banned-words.md 中条目作为连续字符串在文本中出现一次。`.deslop-whitelist` 中的词如果是命中片段的真子串,跳过该次计数(避免误报世界观术语)。同一词在一处出现计 1 次。
143
- >
144
- > **判定优先级**:(1) 先按下方"AI味打分客观指标"做量化定档;(2) 允许根据题材/语境做 ≤1 档的主观下调(必须在报告中给出书面理由),不允许上调;(3) 量化与主观冲突时,以量化结果为准。
138
+ | AI味程度 | 特征 | 处理策略 |
139
+ |----------|------|----------|
140
+ | 轻度 | 少量禁用词,偶有书面腔 | 只过 Gate A + B |
141
+ | 中度 | 多处禁用词 + 句式套路 + 心理描写抽象 | 过 Gate A + B + C + D + G |
142
+ | 重度 | 全文AI味明显,节奏/对话/结尾/解释腔都有问题 | 完整 7 Gate + 重点段落重写 |
145
143
 
146
- **AI味打分客观指标**:
144
+ **定档只看这六项**(阈值是参考值,按题材放宽,如古风的对话标签天然偏多):
147
145
 
148
- | 指标 | 计算方式 | 轻度阈值 | 中度阈值 | 重度阈值 |
146
+ | 指标 | 计算方式 | 轻度 | 中度 | 重度 |
149
147
  |------|----------|---------|---------|---------|
150
148
  | 禁用词密度 | 命中次数 / 千字 | ≤5 | 6-15 | >15 |
151
149
  | 连续排比段数 | 连续相同句式结构的段落数 | ≤2 | 3-4 | ≥5 |
@@ -154,11 +152,10 @@ node scripts/check-ai-patterns.js --check --fail-on=blocking <正文文件...>
154
152
  | 平均段落句数 | 总句数 / 总段落数 | ≤3 | 3-5 | >5 |
155
153
  | 重复描写密度 | 同一信息/动作/情绪连续多段拆写的处数 / 千字 | ≤1处/千字 | 2-3处/千字 | ≥4处/千字 |
156
154
 
157
- > 备注:核心场景(开篇、高潮、收束)出现 1 次重复描写即按 ≥1 档加权(轻→中,中→重)。
158
- >
159
- > 以上阈值为参考值,需结合题材特点调整。例如古风题材的对话标签密度天然偏高,应适当放宽。
160
- >
161
- > **综合判定规则**:取六项指标中的最高档位。任一指标达重度即按重度处理;无重度时,中度指标 ≥3 项按中度处理,否则按轻度处理。
155
+ - **怎么定档**:任一项到重度,或四项及以上到中度,按重度;有一项到中度,按中度;六项都在轻度,按轻度。
156
+ - **要紧处加一档**:本次处理的这段文字里,开头约 500 字、高潮那场戏、最后约 500 字出现重复描写,「重复描写密度」这一项按高一档算(轻→中,中→重)。短篇按全篇、长篇按本章算开头和结尾。
157
+ - **禁用词怎么数**:banned-words.md 的条目作为连续字符串出现一次算一处,同一处只算一次;`.deslop-whitelist` 里的词是命中片段的一部分时不算(免得误报世界观术语)。
158
+ - 按指标定档后,可按题材语境往下调至多一档,并在报告里写明理由;不往上调。
162
159
 
163
160
  **改写顺序**(只排所选 Gate 的先后,不扩大范围):先去泛化与套话(禁用词、抽象情绪、工整对仗、解释腔),再去书面腔,最后回自然节奏、对话差异与结尾落点;做法与范例见 [references/anti-ai-writing.md](references/anti-ai-writing.md)。
164
161
 
@@ -171,12 +168,12 @@ node scripts/check-ai-patterns.js --check --fail-on=blocking <正文文件...>
171
168
  「诊断与分级」完成后,按以下顺序选择执行路径:
172
169
 
173
170
  1. **已在 narrative-writer 子代理内**:按选定 Gate 范围 inline 执行,不再 spawn(嵌套 spawn 会被静默降级)。
174
- 2. **未在子代理内且按顶部顺序找到 `narrative-writer` agent**:按当前运行时调用;Antigravity 用 `invoke_subagent(TypeName: "narrative-writer")`,Claude/OpenCode/Codex 用各自字段。prompt 保持:`项目目录:{dir}\n任务描述:去AI味\nGate 细则:执行前按你的参考表读取 deslop-gates.md 的删除保护与所选 Gate(部署副本与本 skill 同源)\n检查分工:你负责本次语义去味;父流程负责 Phase 4 最终文件扫描,不重复整轮改稿\n检查范围:{待处理的正文文件}\n文风路径:{本书文风全文路径,无则写无}\nstyle_resolution:{本次生效要求及来源、被覆盖的默认条款、事实边界}\n作者偏好:{query 命中的 prose_style 项}\nAI味等级:{诊断与分级结果}\n处理策略:{实际选定的 Gate 范围;优先使用用户指定范围}\n删除优先:每条 AI 味项先判能否删除——删后不丢伏笔/钩子/角色/情节/人物记忆/情绪承接/因果锚点/必要信息/必要转折的直接删,会丢才进 Gate 润色;看似解释/评价但承担小连贯的句子,压成白话承接、动作或物件锚点,不机械删除;已有任务/手续/物件/证据缺口可以压成角色当下要处理的具体卡点,但不新增原文没有的事件链;删除服从比例上限与字数下限,跌破下限改降AI重写。\n模式处理:按 references/anti-ai-writing.md 的问题模式目录执行;模式 8(解释腔/上帝视角/安排感)归入 Gate G,其余新增模式归入 Gate A-F 的对应处理。相邻段重复表达同一信息/动作/情绪时,按 Gate C/D 合并去重;`。
175
- 3. **agent 不存在或 spawn 失败**:主线程 inline 执行。
171
+ 2. **未在子代理内且按顶部顺序找到 `narrative-writer` agent**:按当前运行时调用;Antigravity 用 `invoke_subagent(TypeName: "narrative-writer")`,Claude/OpenCode/Codex 用各自字段。prompt 照 [references/agent-calls.md](references/agent-calls.md) 填,只在交给写手时读。
172
+ 3. **agent 不存在或 spawn 失败**:主会话 inline 执行。
176
173
 
177
174
  #### Gate 规则入口
178
175
 
179
- 实际执行者在逐项清除前读取 [references/deslop-gates.md](references/deslop-gates.md) 的删除保护与所选 Gate 细则;inline 与 agent 使用同源规则。按上文「改写顺序」排所选 Gate 的先后,不另起一次全篇去味。
176
+ 实际执行者逐项清除前读 [references/deslop-gates.md](references/deslop-gates.md) 的删除保护、所选 Gate 细则与「写法抽查」;inline 与 agent 使用同源规则。按上文「改写顺序」排所选 Gate 的先后,不另起一次全篇去味。
180
177
 
181
178
  ### Phase 4:确定性收尾(文件模式)
182
179
 
@@ -218,6 +215,7 @@ node scripts/normalize-punctuation.js <正文文件...>
218
215
  {文件模式(默认;章节/正文文件、批量与长篇去AI):直接改写落盘,写明改了哪个文件,本节只回 ≤200 字代表性片段,不向父会话返回全文。文本模式(仅限交互式贴入、无文件路径的零散片段):完整输出润色后的文本。}
219
216
 
220
217
  下一步:{一句话,如「要我接着处理下一章吗?」}
218
+ 技术备注:{降级或版本提示的原文;没有就删掉这一行}
221
219
  ```
222
220
 
223
221
  **字数硬约束**:删除比例不得超过「诊断与分级」对应上限(轻度 ≤15%、中度 ≤25%、重度 ≤35%)。超限时分段输出并在报告里标记,不得整段删除正文。
@@ -248,6 +246,7 @@ node scripts/normalize-punctuation.js <正文文件...>
248
246
  |------|----------|
249
247
  | [references/banned-words.md](references/banned-words.md) | 检测和替换禁用词时 |
250
248
  | [references/deslop-gates.md](references/deslop-gates.md) | 逐项清除前:删除保护与所选 Gate 的细则、示例 |
249
+ | [references/agent-calls.md](references/agent-calls.md) | 交给 narrative-writer 去味时:prompt 模板 |
251
250
  | [references/anti-ai-writing.md](references/anti-ai-writing.md) | **去AI味完整指南**:预防+改写顺序+范例 |
252
251
  | [scripts/normalize-punctuation.js](scripts/normalize-punctuation.js) | 文件模式落盘后做确定性标点收尾;默认保留引号风格 |
253
252
  | [scripts/check-ai-patterns.js](scripts/check-ai-patterns.js) | 文件模式「AI味扫描」预检与「确定性收尾」复扫(只看引号外叙述),只报告不改写 |
@@ -0,0 +1,5 @@
1
+ # 交给 narrative-writer 去味的 prompt
2
+
3
+ 只在 SKILL.md「逐项清除」第 2 步交给写手时读;主会话自己改不读本文件。花括号按本次诊断结果填,其余照抄:
4
+
5
+ `项目目录:{dir}\n任务描述:去AI味\nGate 细则:执行前按你的参考表读取 deslop-gates.md 的删除保护与所选 Gate(部署副本与本 skill 同源)\n检查分工:你负责本次语义去味;父流程负责 Phase 4 最终文件扫描,不重复整轮改稿\n检查范围:{待处理的正文文件}\n文风路径:{本书文风全文路径,无则写无}\nstyle_resolution:{本次生效要求及来源、被覆盖的默认条款、事实边界}\n作者偏好:{query 命中的 prose_style 项}\n篇幅:{长篇/短篇}\nAI味等级:{诊断与分级结果}\n处理策略:{实际选定的 Gate 范围;优先使用用户指定范围}\n删除优先:每条 AI 味项先判能否删除——删后不丢伏笔/钩子/角色/情节/人物记忆/情绪承接/因果锚点/必要信息/必要转折的直接删,会丢才进 Gate 润色;看似解释/评价但承担小连贯的句子,压成白话承接、动作或物件锚点,不机械删除;已有任务/手续/物件/证据缺口可以压成角色当下要处理的具体卡点,但不新增原文没有的事件链;删除服从比例上限与本次字数范围的下沿,跌破下沿改降AI重写。\n模式处理:按 references/anti-ai-writing.md 的问题模式目录执行;模式 8(解释腔/上帝视角/安排感)归入 Gate G,其余新增模式归入 Gate A-F 的对应处理。相邻段重复表达同一信息/动作/情绪时,按 Gate C/D 合并去重`
@@ -285,7 +285,7 @@ AI 喜欢把事情凑成三个以显"完整"。-> 砍到只剩最有力的一条
285
285
  - 剧透式点破潜台词:「那点笑她看得分明」「谁都看得出他在撒谎」-> 把藏着的挑明了。留着别点破。
286
286
  - 定性比喻/盖棺句:「像在宣判一件早已定好的事」「像看一件死物」-> 比喻在替角色下定论。非角色此刻强烈主观感受就删;要留也只能是她带偏见的瞬间感觉,不是客观断言。
287
287
 
288
- 自检:每句问一遍——这是"角色在经历",还是"作者在讲解/安排"?凡作者跳出来讲,删,或改成角色视角内的呈现。根治办法是锁定深度限知视角(见 writing-craft.md「视角姿态:深度限知」),镜头钉死在角色身体里,作者就没位置跳出来了。
288
+ 自检:每句问一遍——这是"角色在经历",还是"作者在讲解/安排"?凡作者跳出来讲,删,或改成角色视角内的呈现。根治办法是锁定深度限知视角:只写视角人物此刻看得见、听得见、想得到的,镜头钉死在角色身体里,作者就没位置跳出来了。
289
289
 
290
290
  改法优先级:先删或原位替换污染句,不在段尾另补“人味”尾巴。需要补信息时,把原来的总结/动机/评价句改成角色当下能碰到的问题、手续、回信、付款、门外动静等具体压力;已有手机/屏幕/公告/门牌/表单等信息,优先作为角色看见的场内载体保留,不要转写成叙述者解释。具体载体跟剧情走,不套固定清单。
291
291