@lemoncat7/dsh-partner 2.8.1 → 2.8.2

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 (794) hide show
  1. package/docs/THIRD_PARTY_LICENSES.md +10 -0
  2. package/docs/blocked-delivery-recovery.md +7 -0
  3. package/docs/concern-attention.md +19 -0
  4. package/docs/observation-contract.md +11 -0
  5. package/docs/releases/2.8.2.md +7 -0
  6. package/lib/agent-runtime.d.ts +7 -0
  7. package/lib/agent-runtime.d.ts.map +1 -1
  8. package/lib/agent-runtime.js +110 -32
  9. package/lib/agent-runtime.js.map +1 -1
  10. package/lib/api.js +28 -6
  11. package/lib/api.js.map +1 -1
  12. package/lib/autonomy.d.ts.map +1 -1
  13. package/lib/autonomy.js +5 -0
  14. package/lib/autonomy.js.map +1 -1
  15. package/lib/channel-message.d.ts +2 -0
  16. package/lib/channel-message.d.ts.map +1 -1
  17. package/lib/channel-message.js.map +1 -1
  18. package/lib/channels/direct/message-format.js +127 -127
  19. package/lib/channels/direct/message-format.js.map +1 -1
  20. package/lib/channels/manager.d.ts.map +1 -1
  21. package/lib/channels/manager.js +4 -3
  22. package/lib/channels/manager.js.map +1 -1
  23. package/lib/channels/notification-delivery.d.ts.map +1 -1
  24. package/lib/channels/notification-delivery.js +10 -0
  25. package/lib/channels/notification-delivery.js.map +1 -1
  26. package/lib/channels/weixin/connect.d.ts.map +1 -1
  27. package/lib/client-api.d.ts +7 -2
  28. package/lib/client-api.d.ts.map +1 -1
  29. package/lib/client-api.js +8 -1
  30. package/lib/client-api.js.map +1 -1
  31. package/lib/client.d.ts.map +1 -1
  32. package/lib/client.js +2185 -1956
  33. package/lib/client.js.map +4 -4
  34. package/lib/collaboration/composition.js +1 -1
  35. package/lib/collaboration/composition.js.map +1 -1
  36. package/lib/concern-attention.d.ts +19 -0
  37. package/lib/concern-attention.d.ts.map +1 -0
  38. package/lib/concern-attention.js +36 -0
  39. package/lib/concern-attention.js.map +1 -0
  40. package/lib/concern-domain.d.ts +7 -1
  41. package/lib/concern-domain.d.ts.map +1 -1
  42. package/lib/concern-domain.js +4 -0
  43. package/lib/concern-domain.js.map +1 -1
  44. package/lib/concern-execution-notes.d.ts +18 -0
  45. package/lib/concern-execution-notes.d.ts.map +1 -0
  46. package/lib/concern-execution-notes.js +41 -0
  47. package/lib/concern-execution-notes.js.map +1 -0
  48. package/lib/concern-execution-receipt.d.ts +4 -0
  49. package/lib/concern-execution-receipt.d.ts.map +1 -0
  50. package/lib/concern-execution-receipt.js +28 -0
  51. package/lib/concern-execution-receipt.js.map +1 -0
  52. package/lib/concern-execution.d.ts +30 -0
  53. package/lib/concern-execution.d.ts.map +1 -0
  54. package/lib/concern-execution.js +86 -0
  55. package/lib/concern-execution.js.map +1 -0
  56. package/lib/concern-management-tool.d.ts.map +1 -1
  57. package/lib/concern-management-tool.js +21 -19
  58. package/lib/concern-management-tool.js.map +1 -1
  59. package/lib/concern-note-source.d.ts +7 -0
  60. package/lib/concern-note-source.d.ts.map +1 -0
  61. package/lib/concern-note-source.js +25 -0
  62. package/lib/concern-note-source.js.map +1 -0
  63. package/lib/concern-resources.d.ts +27 -0
  64. package/lib/concern-resources.d.ts.map +1 -0
  65. package/lib/concern-resources.js +36 -0
  66. package/lib/concern-resources.js.map +1 -0
  67. package/lib/concern-sources.d.ts +1 -1
  68. package/lib/concern-sources.d.ts.map +1 -1
  69. package/lib/concern-store.d.ts +9 -1
  70. package/lib/concern-store.d.ts.map +1 -1
  71. package/lib/concern-store.js +111 -34
  72. package/lib/concern-store.js.map +1 -1
  73. package/lib/concern-tool.d.ts +1 -0
  74. package/lib/concern-tool.d.ts.map +1 -1
  75. package/lib/concern-tool.js +8 -4
  76. package/lib/concern-tool.js.map +1 -1
  77. package/lib/decision/conversation.d.ts +11 -0
  78. package/lib/decision/conversation.d.ts.map +1 -0
  79. package/lib/decision/conversation.js +52 -0
  80. package/lib/decision/conversation.js.map +1 -0
  81. package/lib/decision/events.d.ts +16 -0
  82. package/lib/decision/events.d.ts.map +1 -0
  83. package/lib/decision/events.js +9 -0
  84. package/lib/decision/events.js.map +1 -0
  85. package/lib/domain.d.ts +2 -0
  86. package/lib/domain.d.ts.map +1 -1
  87. package/lib/domain.js.map +1 -1
  88. package/lib/heartbeat.d.ts +12 -10
  89. package/lib/heartbeat.d.ts.map +1 -1
  90. package/lib/heartbeat.js +54 -26
  91. package/lib/heartbeat.js.map +1 -1
  92. package/lib/index.d.ts.map +1 -1
  93. package/lib/index.js +3 -0
  94. package/lib/index.js.map +1 -1
  95. package/lib/memory-prompt-context.js +1 -0
  96. package/lib/memory-prompt-context.js.map +1 -1
  97. package/lib/memory-reflection.js +1 -1
  98. package/lib/observation-contract.d.ts +9 -0
  99. package/lib/observation-contract.d.ts.map +1 -0
  100. package/lib/observation-contract.js +19 -0
  101. package/lib/observation-contract.js.map +1 -0
  102. package/lib/observation-executor.d.ts +5 -0
  103. package/lib/observation-executor.d.ts.map +1 -1
  104. package/lib/observation-executor.js +17 -1
  105. package/lib/observation-executor.js.map +1 -1
  106. package/lib/observation-loop.d.ts +5 -0
  107. package/lib/observation-loop.d.ts.map +1 -1
  108. package/lib/observation-loop.js +36 -3
  109. package/lib/observation-loop.js.map +1 -1
  110. package/lib/observation-sources.d.ts +14 -0
  111. package/lib/observation-sources.d.ts.map +1 -0
  112. package/lib/observation-sources.js +12 -0
  113. package/lib/observation-sources.js.map +1 -0
  114. package/lib/requirements/service.d.ts.map +1 -1
  115. package/lib/requirements/service.js +2 -0
  116. package/lib/requirements/service.js.map +1 -1
  117. package/lib/requirements/worker.d.ts.map +1 -1
  118. package/lib/requirements/worker.js +1 -0
  119. package/lib/requirements/worker.js.map +1 -1
  120. package/lib/scheduler/continuations.d.ts.map +1 -1
  121. package/lib/scheduler/continuations.js +17 -3
  122. package/lib/scheduler/continuations.js.map +1 -1
  123. package/lib/skills/builtin.d.ts.map +1 -1
  124. package/lib/skills/builtin.js +2 -0
  125. package/lib/skills/builtin.js.map +1 -1
  126. package/lib/skills/drama-builtin.d.ts.map +1 -1
  127. package/lib/skills/drama-builtin.js +13 -1
  128. package/lib/skills/drama-builtin.js.map +1 -1
  129. package/lib/skills/story-builtins.d.ts +3 -0
  130. package/lib/skills/story-builtins.d.ts.map +1 -0
  131. package/lib/skills/story-builtins.js +72 -0
  132. package/lib/skills/story-builtins.js.map +1 -0
  133. package/lib/skills/viora-canvas-builtin.d.ts.map +1 -1
  134. package/lib/skills/viora-canvas-builtin.js +12 -1
  135. package/lib/skills/viora-canvas-builtin.js.map +1 -1
  136. package/lib/snapshot-cache.d.ts +7 -0
  137. package/lib/snapshot-cache.d.ts.map +1 -0
  138. package/lib/snapshot-cache.js +26 -0
  139. package/lib/snapshot-cache.js.map +1 -0
  140. package/lib/tasks/result.js +1 -1
  141. package/lib/tasks/result.js.map +1 -1
  142. package/lib/ui/memory/concern-board.d.ts +1 -1
  143. package/lib/ui/memory/concern-board.d.ts.map +1 -1
  144. package/lib/ui/memory/concern-board.js +12 -6
  145. package/lib/ui/memory/concern-board.js.map +1 -1
  146. package/lib/ui/memory/concern-deletion.d.ts.map +1 -1
  147. package/lib/ui/memory/concern-deletion.js +2 -1
  148. package/lib/ui/memory/concern-deletion.js.map +1 -1
  149. package/lib/ui/memory/concern-editor.d.ts.map +1 -1
  150. package/lib/ui/memory/concern-editor.js +5 -3
  151. package/lib/ui/memory/concern-editor.js.map +1 -1
  152. package/lib/ui/memory/concern-execution-fields.d.ts +7 -0
  153. package/lib/ui/memory/concern-execution-fields.d.ts.map +1 -0
  154. package/lib/ui/memory/concern-execution-fields.js +8 -0
  155. package/lib/ui/memory/concern-execution-fields.js.map +1 -0
  156. package/lib/ui/memory/concern-feedback.d.ts +15 -0
  157. package/lib/ui/memory/concern-feedback.d.ts.map +1 -0
  158. package/lib/ui/memory/concern-feedback.js +13 -0
  159. package/lib/ui/memory/concern-feedback.js.map +1 -0
  160. package/lib/ui/memory/concern-panel.d.ts.map +1 -1
  161. package/lib/ui/memory/concern-panel.js +11 -3
  162. package/lib/ui/memory/concern-panel.js.map +1 -1
  163. package/package.json +5 -1
  164. package/resources/skills/novel-game-creation/manifest.json +393 -0
  165. package/resources/skills/novel-game-creation/upstream/LICENSE +21 -0
  166. package/resources/skills/novel-game-creation/upstream/README.md +420 -0
  167. package/resources/skills/novel-game-creation/upstream/README_ZH.md +421 -0
  168. package/resources/skills/novel-game-creation/upstream/VERSION +1 -0
  169. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/BUILD_BRIEF.md +219 -0
  170. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/.vercelignore +3 -0
  171. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/RUN.md +138 -0
  172. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/bg/compound_new_guofeng.webp +0 -0
  173. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/finale/fate_coda.webp +0 -0
  174. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/finale/meng.webp +0 -0
  175. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/finale/pan.webp +0 -0
  176. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/finale/pinger.webp +0 -0
  177. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/finale/xuee.webp +0 -0
  178. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/finale/yue.webp +0 -0
  179. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/group/inner_court_accord_five.webp +0 -0
  180. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/group/inner_court_afterglow_five.webp +0 -0
  181. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/group/inner_court_alliance.webp +0 -0
  182. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/group/public_day10.webp +0 -0
  183. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/group/public_day15.webp +0 -0
  184. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/group/public_day5.webp +0 -0
  185. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/group/title_new_guofeng.webp +0 -0
  186. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/joint/pan_pinger.webp +0 -0
  187. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/joint/pan_xuee.webp +0 -0
  188. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/joint/yue_meng.webp +0 -0
  189. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/joint/yue_pan.webp +0 -0
  190. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/joint/yue_pinger.webp +0 -0
  191. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/meng/explicit.webp +0 -0
  192. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/meng/prelude.webp +0 -0
  193. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/milestone/meng.webp +0 -0
  194. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/milestone/pan.webp +0 -0
  195. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/milestone/pinger.webp +0 -0
  196. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/milestone/xuee.webp +0 -0
  197. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/milestone/yue.webp +0 -0
  198. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/pan/explicit.webp +0 -0
  199. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/pan/prelude.webp +0 -0
  200. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/pinger/explicit.webp +0 -0
  201. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/pinger/prelude.webp +0 -0
  202. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/xuee/explicit.webp +0 -0
  203. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/xuee/prelude.webp +0 -0
  204. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/yue/explicit.webp +0 -0
  205. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/yue/prelude.webp +0 -0
  206. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/heroine/meng/night.webp +0 -0
  207. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/heroine/pan/night.webp +0 -0
  208. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/heroine/pinger/night.webp +0 -0
  209. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/heroine/xuee/night.webp +0 -0
  210. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/heroine/yue/night.webp +0 -0
  211. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/household/li_jiaoer.webp +0 -0
  212. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/scene/gate_collector.webp +0 -0
  213. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/css/new-guofeng.css +1494 -0
  214. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/css/style.css +2508 -0
  215. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/index.html +18 -0
  216. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/js/assets.js +147 -0
  217. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/js/audio.js +332 -0
  218. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/js/data.js +7470 -0
  219. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/js/engine.js +13066 -0
  220. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/js/main.js +3051 -0
  221. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/js/text.js +32 -0
  222. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/package.json +11 -0
  223. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/vercel.json +23 -0
  224. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/art/generated-art.json +161 -0
  225. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/example.json +12 -0
  226. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/qa/README.md +26 -0
  227. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/qa/playable-model.json +99 -0
  228. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/qa/verification.json +41 -0
  229. package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/qa/verify_playable_model.mjs +152 -0
  230. package/resources/skills/novel-game-creation/upstream/manifest.json +498 -0
  231. package/resources/skills/novel-game-creation/upstream/skills/game-art-direction/SKILL.md +47 -0
  232. package/resources/skills/novel-game-creation/upstream/skills/game-art-direction/agents/openai.yaml +4 -0
  233. package/resources/skills/novel-game-creation/upstream/skills/game-art-direction/references/art-direction-method.md +40 -0
  234. package/resources/skills/novel-game-creation/upstream/skills/game-build/SKILL.md +66 -0
  235. package/resources/skills/novel-game-creation/upstream/skills/game-build/agents/openai.yaml +4 -0
  236. package/resources/skills/novel-game-creation/upstream/skills/game-build/references/blender-asset-workflow.md +24 -0
  237. package/resources/skills/novel-game-creation/upstream/skills/game-build/references/build-brief-contract.md +72 -0
  238. package/resources/skills/novel-game-creation/upstream/skills/game-build/references/generative-media-pipeline.md +25 -0
  239. package/resources/skills/novel-game-creation/upstream/skills/game-build/references/playable-model-contract.md +46 -0
  240. package/resources/skills/novel-game-creation/upstream/skills/game-build/references/tts-production-contract.md +23 -0
  241. package/resources/skills/novel-game-creation/upstream/skills/game-concept/SKILL.md +54 -0
  242. package/resources/skills/novel-game-creation/upstream/skills/game-concept/agents/openai.yaml +4 -0
  243. package/resources/skills/novel-game-creation/upstream/skills/game-concept/references/concept-method.md +47 -0
  244. package/resources/skills/novel-game-creation/upstream/skills/game-qa/SKILL.md +39 -0
  245. package/resources/skills/novel-game-creation/upstream/skills/game-qa/agents/openai.yaml +4 -0
  246. package/resources/skills/novel-game-creation/upstream/skills/game-qa/references/qa-contract.md +66 -0
  247. package/resources/skills/novel-game-creation/upstream/skills/game-qa/references/test-design-method.md +49 -0
  248. package/resources/skills/novel-game-creation/upstream/skills/game-world-design/SKILL.md +50 -0
  249. package/resources/skills/novel-game-creation/upstream/skills/game-world-design/agents/openai.yaml +4 -0
  250. package/resources/skills/novel-game-creation/upstream/skills/game-world-design/references/narrative-design-method.md +35 -0
  251. package/resources/skills/novel-game-creation/upstream/skills/game-world-design/references/numeric-design-method.md +22 -0
  252. package/resources/skills/novel-game-creation/upstream/skills/game-world-design/references/world-design-method.md +57 -0
  253. package/resources/skills/novel-game-creation/upstream/skills/novel-game-analyze/SKILL.md +68 -0
  254. package/resources/skills/novel-game-creation/upstream/skills/novel-game-analyze/agents/openai.yaml +4 -0
  255. package/resources/skills/novel-game-creation/upstream/skills/novel-game-analyze/references/gameability-protocol.md +65 -0
  256. package/resources/skills/novel-game-creation/upstream/skills/novel-to-game/SKILL.md +54 -0
  257. package/resources/skills/novel-game-creation/upstream/skills/novel-to-game/agents/openai.yaml +4 -0
  258. package/resources/skills/novel-game-creation/upstream/skills/novel-to-game/references/intake-method.md +50 -0
  259. package/resources/skills/novel-game-creation/upstream/skills/novel-to-game/references/pipeline-contract.md +60 -0
  260. package/resources/skills/story-creation/manifest.json +1477 -0
  261. package/resources/skills/story-creation/upstream/LICENSE.upstream +21 -0
  262. package/resources/skills/story-creation/upstream/manifest.json +1861 -0
  263. package/resources/skills/story-creation/upstream/roles/chapter-extractor.md +254 -0
  264. package/resources/skills/story-creation/upstream/roles/character-designer.md +168 -0
  265. package/resources/skills/story-creation/upstream/roles/consistency-checker.md +192 -0
  266. package/resources/skills/story-creation/upstream/roles/narrative-writer.md +105 -0
  267. package/resources/skills/story-creation/upstream/roles/story-architect.md +139 -0
  268. package/resources/skills/story-creation/upstream/roles/story-explorer.md +262 -0
  269. package/resources/skills/story-creation/upstream/roles/story-researcher.md +303 -0
  270. package/resources/skills/story-creation/upstream/skills/browser-cdp/SKILL.md +175 -0
  271. package/resources/skills/story-creation/upstream/skills/story/SKILL.md +129 -0
  272. package/resources/skills/story-creation/upstream/skills/story/VERSION +1 -0
  273. package/resources/skills/story-creation/upstream/skills/story/references/author-memory-maintenance.md +75 -0
  274. package/resources/skills/story-creation/upstream/skills/story/references/author-memory.md +117 -0
  275. package/resources/skills/story-creation/upstream/skills/story/scripts/author_memory_commit.py +1635 -0
  276. package/resources/skills/story-creation/upstream/skills/story-cover/SKILL.md +336 -0
  277. package/resources/skills/story-creation/upstream/skills/story-cover/references/cover-styles.md +210 -0
  278. package/resources/skills/story-creation/upstream/skills/story-deslop/SKILL.md +274 -0
  279. package/resources/skills/story-creation/upstream/skills/story-deslop/references/agent-calls.md +5 -0
  280. package/resources/skills/story-creation/upstream/skills/story-deslop/references/anti-ai-writing.md +556 -0
  281. package/resources/skills/story-creation/upstream/skills/story-deslop/references/author-memory-maintenance.md +75 -0
  282. package/resources/skills/story-creation/upstream/skills/story-deslop/references/author-memory.md +117 -0
  283. package/resources/skills/story-creation/upstream/skills/story-deslop/references/banned-words.md +151 -0
  284. package/resources/skills/story-creation/upstream/skills/story-deslop/references/deslop-gates.md +171 -0
  285. package/resources/skills/story-creation/upstream/skills/story-deslop/references/style-resolution.md +27 -0
  286. package/resources/skills/story-creation/upstream/skills/story-deslop/scripts/author_memory_commit.py +1635 -0
  287. package/resources/skills/story-creation/upstream/skills/story-deslop/scripts/check-ai-patterns.js +1586 -0
  288. package/resources/skills/story-creation/upstream/skills/story-deslop/scripts/check-degeneration.js +349 -0
  289. package/resources/skills/story-creation/upstream/skills/story-deslop/scripts/normalize-punctuation.js +415 -0
  290. package/resources/skills/story-creation/upstream/skills/story-deslop/scripts/style-whitelist.js +39 -0
  291. package/resources/skills/story-creation/upstream/skills/story-import/SKILL.md +127 -0
  292. package/resources/skills/story-creation/upstream/skills/story-import/references/character-state-reverse.md +82 -0
  293. package/resources/skills/story-creation/upstream/skills/story-import/references/deep-analysis.md +47 -0
  294. package/resources/skills/story-creation/upstream/skills/story-import/references/format-and-structure.md +168 -0
  295. package/resources/skills/story-creation/upstream/skills/story-import/references/import-report.md +64 -0
  296. package/resources/skills/story-creation/upstream/skills/story-import/references/import-special-cases.md +34 -0
  297. package/resources/skills/story-creation/upstream/skills/story-import/references/import-tracking.md +95 -0
  298. package/resources/skills/story-creation/upstream/skills/story-import/references/length-routing.md +134 -0
  299. package/resources/skills/story-creation/upstream/skills/story-import/references/outline-reverse-rules.md +79 -0
  300. package/resources/skills/story-creation/upstream/skills/story-import/references/outline-reverse.md +24 -0
  301. package/resources/skills/story-creation/upstream/skills/story-import/references/state-tracking.md +43 -0
  302. package/resources/skills/story-creation/upstream/skills/story-import/references/structure-mapping-long.md +448 -0
  303. package/resources/skills/story-creation/upstream/skills/story-import/references/structure-mapping-short.md +187 -0
  304. package/resources/skills/story-creation/upstream/skills/story-import/references/tracking-initialization.md +31 -0
  305. package/resources/skills/story-creation/upstream/skills/story-import/references/tracking-transaction.md +146 -0
  306. package/resources/skills/story-creation/upstream/skills/story-import/scripts/build_outline_brief.py +332 -0
  307. package/resources/skills/story-creation/upstream/skills/story-import/scripts/check-outline-contract.js +520 -0
  308. package/resources/skills/story-creation/upstream/skills/story-import/scripts/tracking_commit.py +1691 -0
  309. package/resources/skills/story-creation/upstream/skills/story-import/scripts/wordcount_core.py +405 -0
  310. package/resources/skills/story-creation/upstream/skills/story-long-analyze/SKILL.md +140 -0
  311. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/author-facing.md +252 -0
  312. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/deconstruction-notes.md +270 -0
  313. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/final-checks.md +19 -0
  314. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/index-rebuild.md +11 -0
  315. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/inspiration-library.md +105 -0
  316. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/pipeline-ops.md +154 -0
  317. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/semantic-acceptance-fixtures.md +84 -0
  318. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/stage1-golden-chapters.md +128 -0
  319. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/stage2-extraction.md +229 -0
  320. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/stage3-plot-rhythm.md +480 -0
  321. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/stage4-characters-settings.md +195 -0
  322. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/stage5-report.md +33 -0
  323. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/style-profile-generator.md +76 -0
  324. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/style-profile-protocol.md +133 -0
  325. package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/synthesis-inputs.md +39 -0
  326. package/resources/skills/story-creation/upstream/skills/story-long-analyze/scripts/build_chapter_index.py +466 -0
  327. package/resources/skills/story-creation/upstream/skills/story-long-analyze/scripts/inspect_existing_assets.py +702 -0
  328. package/resources/skills/story-creation/upstream/skills/story-long-analyze/scripts/inspiration_index.py +864 -0
  329. package/resources/skills/story-creation/upstream/skills/story-long-analyze/scripts/manage_analysis_run.py +1145 -0
  330. package/resources/skills/story-creation/upstream/skills/story-long-analyze/scripts/render_relation_chart.py +425 -0
  331. package/resources/skills/story-creation/upstream/skills/story-long-scan/SKILL.md +193 -0
  332. package/resources/skills/story-creation/upstream/skills/story-long-scan/references/genre-trends.md +197 -0
  333. package/resources/skills/story-creation/upstream/skills/story-long-scan/references/platform-ciweimao.md +19 -0
  334. package/resources/skills/story-creation/upstream/skills/story-long-scan/references/platform-fanqie.md +45 -0
  335. package/resources/skills/story-creation/upstream/skills/story-long-scan/references/platform-jjwxc.md +28 -0
  336. package/resources/skills/story-creation/upstream/skills/story-long-scan/references/platform-qidian.md +35 -0
  337. package/resources/skills/story-creation/upstream/skills/story-long-scan/references/platform-qimao.md +27 -0
  338. package/resources/skills/story-creation/upstream/skills/story-long-scan/references/publishing-guide.md +114 -0
  339. package/resources/skills/story-creation/upstream/skills/story-long-scan/references/reader-profiling.md +105 -0
  340. package/resources/skills/story-creation/upstream/skills/story-long-scan/references/topic-decision.md +82 -0
  341. package/resources/skills/story-creation/upstream/skills/story-long-scan/scripts/aggregate-rank.js +682 -0
  342. package/resources/skills/story-creation/upstream/skills/story-long-scan/scripts/cdp-utils.js +242 -0
  343. package/resources/skills/story-creation/upstream/skills/story-long-scan/scripts/ciweimao-rank-scraper.js +240 -0
  344. package/resources/skills/story-creation/upstream/skills/story-long-scan/scripts/fanqie-rank-scraper.js +658 -0
  345. package/resources/skills/story-creation/upstream/skills/story-long-scan/scripts/jjwxc-rank-scraper.js +400 -0
  346. package/resources/skills/story-creation/upstream/skills/story-long-scan/scripts/qidian-rank-scraper.js +592 -0
  347. package/resources/skills/story-creation/upstream/skills/story-long-scan/scripts/qimao-rank-scraper.js +435 -0
  348. package/resources/skills/story-creation/upstream/skills/story-long-write/SKILL.md +136 -0
  349. package/resources/skills/story-creation/upstream/skills/story-long-write/references/agent-calls.md +47 -0
  350. package/resources/skills/story-creation/upstream/skills/story-long-write/references/anti-ai-writing.md +556 -0
  351. package/resources/skills/story-creation/upstream/skills/story-long-write/references/artifact-protocols.md +183 -0
  352. package/resources/skills/story-creation/upstream/skills/story-long-write/references/author-memory-maintenance.md +75 -0
  353. package/resources/skills/story-creation/upstream/skills/story-long-write/references/author-memory.md +117 -0
  354. package/resources/skills/story-creation/upstream/skills/story-long-write/references/banned-words.md +151 -0
  355. package/resources/skills/story-creation/upstream/skills/story-long-write/references/benchmark-recall.md +16 -0
  356. package/resources/skills/story-creation/upstream/skills/story-long-write/references/character-basics.md +445 -0
  357. package/resources/skills/story-creation/upstream/skills/story-long-write/references/character-design-methods.md +428 -0
  358. package/resources/skills/story-creation/upstream/skills/story-long-write/references/character-relations.md +433 -0
  359. package/resources/skills/story-creation/upstream/skills/story-long-write/references/commercial-core-methods.md +502 -0
  360. package/resources/skills/story-creation/upstream/skills/story-long-write/references/cross-book-recall.md +88 -0
  361. package/resources/skills/story-creation/upstream/skills/story-long-write/references/deslop-gates.md +171 -0
  362. package/resources/skills/story-creation/upstream/skills/story-long-write/references/dialogue-mastery.md +288 -0
  363. package/resources/skills/story-creation/upstream/skills/story-long-write/references/emotion-on-page.md +116 -0
  364. package/resources/skills/story-creation/upstream/skills/story-long-write/references/emotional-arc-design.md +313 -0
  365. package/resources/skills/story-creation/upstream/skills/story-long-write/references/emotional-methods.md +209 -0
  366. package/resources/skills/story-creation/upstream/skills/story-long-write/references/female-audience-writing.md +188 -0
  367. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//344/270/234/346/226/271/344/273/231/344/276/240.md +51 -0
  368. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//344/274/240/347/273/237/347/216/204/345/271/273.md +51 -0
  369. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/216/206/345/217/262/345/217/244/344/273/243.md +51 -0
  370. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/216/206/345/217/262/350/204/221/346/264/236.md +51 -0
  371. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/217/214/347/224/267/344/270/273.md +53 -0
  372. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/217/244/350/250/200/350/204/221/346/264/236.md +51 -0
  373. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/217/244/351/243/216/344/270/226/346/203/205.md +51 -0
  374. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/245/263/351/242/221/346/202/254/347/226/221.md +51 -0
  375. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/245/263/351/242/221/347/247/215/347/224/260.md +51 -0
  376. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/256/253/346/226/227/345/256/205/346/226/227.md +51 -0
  377. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/271/264/344/273/243.md +53 -0
  378. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/277/253/347/251/277.md +51 -0
  379. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//346/202/254/347/226/221/347/201/265/345/274/202.md +51 -0
  380. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//346/202/254/347/226/221/350/204/221/346/264/236.md +51 -0
  381. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//346/210/230/347/245/236/350/265/230/345/251/277.md +51 -0
  382. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//346/212/227/346/210/230/350/260/215/346/210/230.md +51 -0
  383. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//346/230/237/345/205/211/347/222/200/347/222/250.md +51 -0
  384. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//346/260/221/345/233/275/350/250/200/346/203/205.md +51 -0
  385. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//346/270/270/346/210/217/344/275/223/350/202/262.md +51 -0
  386. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//347/216/204/345/271/273/350/204/221/346/264/236.md +53 -0
  387. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//347/216/204/345/271/273/350/250/200/346/203/205.md +51 -0
  388. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//347/216/260/350/250/200/350/204/221/346/264/236.md +51 -0
  389. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//347/247/221/345/271/273/346/234/253/344/270/226.md +51 -0
  390. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//350/201/214/345/234/272/345/251/232/346/201/213.md +51 -0
  391. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//350/245/277/346/226/271/345/245/207/345/271/273.md +51 -0
  392. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//350/261/252/351/227/250/346/200/273/350/243/201.md +53 -0
  393. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//351/203/275/345/270/202/344/277/256/347/234/237.md +51 -0
  394. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//351/203/275/345/270/202/346/227/245/345/270/270.md +53 -0
  395. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//351/203/275/345/270/202/347/247/215/347/224/260.md +51 -0
  396. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//351/203/275/345/270/202/350/204/221/346/264/236.md +53 -0
  397. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//351/203/275/345/270/202/351/253/230/346/255/246.md +53 -0
  398. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//351/235/222/346/230/245/347/224/234/345/256/240.md +51 -0
  399. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards.md +91 -0
  400. package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-readers.md +235 -0
  401. package/resources/skills/story-creation/upstream/skills/story-long-write/references/long-chapter-hooks.md +225 -0
  402. package/resources/skills/story-creation/upstream/skills/story-long-write/references/long-chapter-quality.md +177 -0
  403. package/resources/skills/story-creation/upstream/skills/story-long-write/references/long-format.md +36 -0
  404. package/resources/skills/story-creation/upstream/skills/story-long-write/references/long-genre-catalog.md +394 -0
  405. package/resources/skills/story-creation/upstream/skills/story-long-write/references/long-genre-mechanics.md +415 -0
  406. package/resources/skills/story-creation/upstream/skills/story-long-write/references/long-reversal.md +335 -0
  407. package/resources/skills/story-creation/upstream/skills/story-long-write/references/long-suspense.md +352 -0
  408. package/resources/skills/story-creation/upstream/skills/story-long-write/references/opening-design.md +349 -0
  409. package/resources/skills/story-creation/upstream/skills/story-long-write/references/outline-conflict.md +457 -0
  410. package/resources/skills/story-creation/upstream/skills/story-long-write/references/outline-methods.md +287 -0
  411. package/resources/skills/story-creation/upstream/skills/story-long-write/references/outline-rhythm.md +389 -0
  412. package/resources/skills/story-creation/upstream/skills/story-long-write/references/outline-structure-theory.md +273 -0
  413. package/resources/skills/story-creation/upstream/skills/story-long-write/references/plot-core-methods.md +522 -0
  414. package/resources/skills/story-creation/upstream/skills/story-long-write/references/plot-emotion-system.md +354 -0
  415. package/resources/skills/story-creation/upstream/skills/story-long-write/references/plot-frameworks.md +711 -0
  416. package/resources/skills/story-creation/upstream/skills/story-long-write/references/plot-special-topics.md +622 -0
  417. package/resources/skills/story-creation/upstream/skills/story-long-write/references/project-files.md +114 -0
  418. package/resources/skills/story-creation/upstream/skills/story-long-write/references/reader-contract-and-progression.md +117 -0
  419. package/resources/skills/story-creation/upstream/skills/story-long-write/references/reference-index.md +86 -0
  420. package/resources/skills/story-creation/upstream/skills/story-long-write/references/stop-and-fix.md +9 -0
  421. package/resources/skills/story-creation/upstream/skills/story-long-write/references/style-combat-face.md +352 -0
  422. package/resources/skills/story-creation/upstream/skills/story-long-write/references/style-craft.md +327 -0
  423. package/resources/skills/story-creation/upstream/skills/story-long-write/references/style-genre-modules.md +510 -0
  424. package/resources/skills/story-creation/upstream/skills/story-long-write/references/style-resolution.md +27 -0
  425. package/resources/skills/story-creation/upstream/skills/story-long-write/references/tracking-initialization.md +31 -0
  426. package/resources/skills/story-creation/upstream/skills/story-long-write/references/tracking-transaction.md +146 -0
  427. package/resources/skills/story-creation/upstream/skills/story-long-write/references/workflow-chapter.md +104 -0
  428. package/resources/skills/story-creation/upstream/skills/story-long-write/references/workflow-daily.md +75 -0
  429. package/resources/skills/story-creation/upstream/skills/story-long-write/references/workflow-outline.md +157 -0
  430. package/resources/skills/story-creation/upstream/skills/story-long-write/references/workflow-revision.md +89 -0
  431. package/resources/skills/story-creation/upstream/skills/story-long-write/references/workflow-setup.md +170 -0
  432. package/resources/skills/story-creation/upstream/skills/story-long-write/references/workflow-volume.md +142 -0
  433. package/resources/skills/story-creation/upstream/skills/story-long-write/references/writer-prompt-fallback.md +24 -0
  434. package/resources/skills/story-creation/upstream/skills/story-long-write/references/writing-craft.md +442 -0
  435. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/author_memory_commit.py +1635 -0
  436. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/build_architect_brief.py +260 -0
  437. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/build_writer_prompt.py +611 -0
  438. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/check-ai-patterns.js +1586 -0
  439. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/check-degeneration.js +349 -0
  440. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/check-outline-contract.js +520 -0
  441. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/check-outline-copy.js +313 -0
  442. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/normalize-punctuation.js +415 -0
  443. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/outline_view.py +286 -0
  444. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/storyctl.py +561 -0
  445. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/style-whitelist.js +39 -0
  446. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/tracking_commit.py +1691 -0
  447. package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/wordcount_core.py +405 -0
  448. package/resources/skills/story-creation/upstream/skills/story-review/SKILL.md +231 -0
  449. package/resources/skills/story-creation/upstream/skills/story-review/references/agent-prompts.md +184 -0
  450. package/resources/skills/story-creation/upstream/skills/story-review/references/anti-ai-writing.md +556 -0
  451. package/resources/skills/story-creation/upstream/skills/story-review/references/author-memory-maintenance.md +75 -0
  452. package/resources/skills/story-creation/upstream/skills/story-review/references/author-memory.md +117 -0
  453. package/resources/skills/story-creation/upstream/skills/story-review/references/banned-words.md +151 -0
  454. package/resources/skills/story-creation/upstream/skills/story-review/references/batch-review.md +19 -0
  455. package/resources/skills/story-creation/upstream/skills/story-review/references/character-relations.md +433 -0
  456. package/resources/skills/story-creation/upstream/skills/story-review/references/dialogue-mastery.md +288 -0
  457. package/resources/skills/story-creation/upstream/skills/story-review/references/plot-core-methods.md +522 -0
  458. package/resources/skills/story-creation/upstream/skills/story-review/references/quality-rubric.md +55 -0
  459. package/resources/skills/story-creation/upstream/skills/story-review/references/review-quality.md +246 -0
  460. package/resources/skills/story-creation/upstream/skills/story-review/references/review-tracking.md +10 -0
  461. package/resources/skills/story-creation/upstream/skills/story-review/references/rubrics/fanqie.md +18 -0
  462. package/resources/skills/story-creation/upstream/skills/story-review/references/rubrics/qidian.md +19 -0
  463. package/resources/skills/story-creation/upstream/skills/story-review/references/rubrics/zhihu.md +20 -0
  464. package/resources/skills/story-creation/upstream/skills/story-review/references/solo.md +52 -0
  465. package/resources/skills/story-creation/upstream/skills/story-review/references/style-resolution.md +27 -0
  466. package/resources/skills/story-creation/upstream/skills/story-review/references/tracking-initialization.md +31 -0
  467. package/resources/skills/story-creation/upstream/skills/story-review/references/tracking-transaction.md +146 -0
  468. package/resources/skills/story-creation/upstream/skills/story-review/scripts/author_memory_commit.py +1635 -0
  469. package/resources/skills/story-creation/upstream/skills/story-review/scripts/check-ai-patterns.js +1586 -0
  470. package/resources/skills/story-creation/upstream/skills/story-review/scripts/check-degeneration.js +349 -0
  471. package/resources/skills/story-creation/upstream/skills/story-review/scripts/normalize-punctuation.js +415 -0
  472. package/resources/skills/story-creation/upstream/skills/story-review/scripts/style-whitelist.js +39 -0
  473. package/resources/skills/story-creation/upstream/skills/story-review/scripts/tracking_commit.py +1691 -0
  474. package/resources/skills/story-creation/upstream/skills/story-review/scripts/wordcount_core.py +405 -0
  475. package/resources/skills/story-creation/upstream/skills/story-setup/SKILL.md +165 -0
  476. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/agent-quality.md +72 -0
  477. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/agent-reference-profiles.md +55 -0
  478. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/anti-ai-writing.md +556 -0
  479. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/banned-words.md +151 -0
  480. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/benchmark-style-load.md +107 -0
  481. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/character-basics.md +445 -0
  482. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/character-design-methods.md +428 -0
  483. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/character-relations.md +433 -0
  484. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/deslop-gates.md +171 -0
  485. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/dialogue-mastery.md +288 -0
  486. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/emotion-on-page.md +116 -0
  487. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/emotional-arc-design.md +313 -0
  488. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/format-and-structure.md +168 -0
  489. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//344/270/234/346/226/271/344/273/231/344/276/240.md +51 -0
  490. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//344/274/240/347/273/237/347/216/204/345/271/273.md +51 -0
  491. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/216/206/345/217/262/345/217/244/344/273/243.md +51 -0
  492. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/216/206/345/217/262/350/204/221/346/264/236.md +51 -0
  493. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/217/214/347/224/267/344/270/273.md +53 -0
  494. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/217/244/350/250/200/350/204/221/346/264/236.md +51 -0
  495. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/217/244/351/243/216/344/270/226/346/203/205.md +51 -0
  496. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/245/263/351/242/221/346/202/254/347/226/221.md +51 -0
  497. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/245/263/351/242/221/347/247/215/347/224/260.md +51 -0
  498. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/256/253/346/226/227/345/256/205/346/226/227.md +51 -0
  499. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/271/264/344/273/243.md +53 -0
  500. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/277/253/347/251/277.md +51 -0
  501. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//346/202/254/347/226/221/347/201/265/345/274/202.md +51 -0
  502. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//346/202/254/347/226/221/350/204/221/346/264/236.md +51 -0
  503. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//346/210/230/347/245/236/350/265/230/345/251/277.md +51 -0
  504. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//346/212/227/346/210/230/350/260/215/346/210/230.md +51 -0
  505. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//346/230/237/345/205/211/347/222/200/347/222/250.md +51 -0
  506. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//346/260/221/345/233/275/350/250/200/346/203/205.md +51 -0
  507. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//346/270/270/346/210/217/344/275/223/350/202/262.md +51 -0
  508. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//347/216/204/345/271/273/350/204/221/346/264/236.md +53 -0
  509. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//347/216/204/345/271/273/350/250/200/346/203/205.md +51 -0
  510. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//347/216/260/350/250/200/350/204/221/346/264/236.md +51 -0
  511. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//347/247/221/345/271/273/346/234/253/344/270/226.md +51 -0
  512. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//350/201/214/345/234/272/345/251/232/346/201/213.md +51 -0
  513. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//350/245/277/346/226/271/345/245/207/345/271/273.md +51 -0
  514. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//350/261/252/351/227/250/346/200/273/350/243/201.md +53 -0
  515. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//351/203/275/345/270/202/344/277/256/347/234/237.md +51 -0
  516. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//351/203/275/345/270/202/346/227/245/345/270/270.md +53 -0
  517. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//351/203/275/345/270/202/347/247/215/347/224/260.md +51 -0
  518. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//351/203/275/345/270/202/350/204/221/346/264/236.md +53 -0
  519. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//351/203/275/345/270/202/351/253/230/346/255/246.md +53 -0
  520. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//351/235/222/346/230/245/347/224/234/345/256/240.md +51 -0
  521. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards.md +91 -0
  522. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-readers.md +235 -0
  523. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/long-chapter-hooks.md +225 -0
  524. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/long-emotional-methods.md +209 -0
  525. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/long-genre-catalog.md +394 -0
  526. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/long-genre-mechanics.md +415 -0
  527. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/long-quality.md +42 -0
  528. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/long-reversal.md +335 -0
  529. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/long-suspense.md +352 -0
  530. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/opening-design.md +349 -0
  531. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/outline-conflict.md +457 -0
  532. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/outline-methods.md +287 -0
  533. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/outline-rhythm.md +389 -0
  534. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/plot-core-methods.md +522 -0
  535. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/short-chapter-hooks.md +225 -0
  536. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/short-emotional-methods.md +179 -0
  537. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/short-genre-formulas.md +417 -0
  538. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/short-paragraph-hooks.md +146 -0
  539. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/short-quality.md +39 -0
  540. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/short-reversal.md +355 -0
  541. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/short-suspense.md +352 -0
  542. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/style-combat-face.md +352 -0
  543. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/style-genre-modules.md +510 -0
  544. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/style-resolution.md +27 -0
  545. package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/writing-craft.md +442 -0
  546. package/resources/skills/story-creation/upstream/skills/story-setup/references/diagnostics.md +38 -0
  547. package/resources/skills/story-creation/upstream/skills/story-short-analyze/SKILL.md +224 -0
  548. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-character-basics.md +453 -0
  549. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-character-design.md +438 -0
  550. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-character-relations.md +395 -0
  551. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-method.md +42 -0
  552. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-paragraph-hooks.md +146 -0
  553. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-reader-profile.md +245 -0
  554. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-report-style.md +45 -0
  555. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-short-genres.md +65 -0
  556. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-short-hooks.md +77 -0
  557. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-short-mechanics.md +82 -0
  558. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-short-patterns.md +50 -0
  559. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-short-suspense.md +98 -0
  560. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-writing-techniques.md +477 -0
  561. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/deconstruction-examples.md +79 -0
  562. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/optional-modules.md +97 -0
  563. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/output-contract.md +127 -0
  564. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/quality-checklist.md +80 -0
  565. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/real-market-data.md +90 -0
  566. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/source-story-quality.md +221 -0
  567. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/stage2-3-structure-emotion.md +308 -0
  568. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/stage4-6-reversal-summary.md +611 -0
  569. package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/zhihu-style.md +54 -0
  570. package/resources/skills/story-creation/upstream/skills/story-short-scan/SKILL.md +182 -0
  571. package/resources/skills/story-creation/upstream/skills/story-short-scan/references/manual-rank-input.md +36 -0
  572. package/resources/skills/story-creation/upstream/skills/story-short-scan/references/platform-dianzhong.md +24 -0
  573. package/resources/skills/story-creation/upstream/skills/story-short-scan/references/platform-heiyan.md +21 -0
  574. package/resources/skills/story-creation/upstream/skills/story-short-scan/references/real-market-data.md +90 -0
  575. package/resources/skills/story-creation/upstream/skills/story-short-scan/references/topic-match.md +38 -0
  576. package/resources/skills/story-creation/upstream/skills/story-short-scan/scripts/aggregate-rank.js +682 -0
  577. package/resources/skills/story-creation/upstream/skills/story-short-scan/scripts/cdp-utils.js +242 -0
  578. package/resources/skills/story-creation/upstream/skills/story-short-scan/scripts/dz-browse-scraper.js +232 -0
  579. package/resources/skills/story-creation/upstream/skills/story-short-scan/scripts/heiyan-booklist-scraper.js +345 -0
  580. package/resources/skills/story-creation/upstream/skills/story-short-write/SKILL.md +136 -0
  581. package/resources/skills/story-creation/upstream/skills/story-short-write/references/agent-calls.md +13 -0
  582. package/resources/skills/story-creation/upstream/skills/story-short-write/references/author-memory-maintenance.md +75 -0
  583. package/resources/skills/story-creation/upstream/skills/story-short-write/references/author-memory.md +117 -0
  584. package/resources/skills/story-creation/upstream/skills/story-short-write/references/banned-words.md +151 -0
  585. package/resources/skills/story-creation/upstream/skills/story-short-write/references/benchmark-recall.md +40 -0
  586. package/resources/skills/story-creation/upstream/skills/story-short-write/references/cross-book-recall.md +62 -0
  587. package/resources/skills/story-creation/upstream/skills/story-short-write/references/dialogue-mastery.md +288 -0
  588. package/resources/skills/story-creation/upstream/skills/story-short-write/references/emotional-methods.md +179 -0
  589. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//344/270/226/346/203/205/346/211/223/350/204/270.md +159 -0
  590. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//345/217/214/347/224/267/344/270/273.md +156 -0
  591. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//345/244/215/344/273/207/346/211/223/350/204/270.md +163 -0
  592. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//345/256/205/346/226/227/345/256/253/346/226/227.md +167 -0
  593. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//346/200/273/350/243/201/350/261/252/351/227/250.md +178 -0
  594. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//346/202/254/347/226/221.md +166 -0
  595. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//346/260/221/344/277/227/346/200/252/350/260/210.md +159 -0
  596. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//346/262/231/351/233/225/350/204/221/346/264/236.md +151 -0
  597. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//347/224/234/345/256/240.md +153 -0
  598. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//350/277/275/345/246/273/347/201/253/350/221/254/345/234/272.md +210 -0
  599. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-writing-formulas.md +417 -0
  600. package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-writing-techniques.md +490 -0
  601. package/resources/skills/story-creation/upstream/skills/story-short-write/references/hooks-chapter.md +225 -0
  602. package/resources/skills/story-creation/upstream/skills/story-short-write/references/hooks-paragraph.md +146 -0
  603. package/resources/skills/story-creation/upstream/skills/story-short-write/references/output-contract.md +127 -0
  604. package/resources/skills/story-creation/upstream/skills/story-short-write/references/reference-index.md +23 -0
  605. package/resources/skills/story-creation/upstream/skills/story-short-write/references/scene-craft.md +40 -0
  606. package/resources/skills/story-creation/upstream/skills/story-short-write/references/short-craft.md +147 -0
  607. package/resources/skills/story-creation/upstream/skills/story-short-write/references/short-deslop.md +133 -0
  608. package/resources/skills/story-creation/upstream/skills/story-short-write/references/short-format.md +199 -0
  609. package/resources/skills/story-creation/upstream/skills/story-short-write/references/short-prose-quality.md +224 -0
  610. package/resources/skills/story-creation/upstream/skills/story-short-write/references/short-reversal.md +355 -0
  611. package/resources/skills/story-creation/upstream/skills/story-short-write/references/short-suspense.md +352 -0
  612. package/resources/skills/story-creation/upstream/skills/story-short-write/references/style-resolution.md +27 -0
  613. package/resources/skills/story-creation/upstream/skills/story-short-write/references/submission-craft.md +35 -0
  614. package/resources/skills/story-creation/upstream/skills/story-short-write/references/villain-and-reveal.md +153 -0
  615. package/resources/skills/story-creation/upstream/skills/story-short-write/references/workflow-design.md +85 -0
  616. package/resources/skills/story-creation/upstream/skills/story-short-write/references/workflow-draft.md +116 -0
  617. package/resources/skills/story-creation/upstream/skills/story-short-write/references/workflow-revision.md +99 -0
  618. package/resources/skills/story-creation/upstream/skills/story-short-write/references/writing-workflow.md +50 -0
  619. package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/author_memory_commit.py +1635 -0
  620. package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/check-ai-patterns.js +1586 -0
  621. package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/check-degeneration.js +349 -0
  622. package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/check-delivery-contract.js +241 -0
  623. package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/check-outline-copy.js +313 -0
  624. package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/check-phase2-contract.js +363 -0
  625. package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/normalize-punctuation.js +415 -0
  626. package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/style-whitelist.js +39 -0
  627. package/resources/skills/video-recap-production/manifest.json +673 -0
  628. package/resources/skills/video-recap-production/upstream/CHANGELOG.md +371 -0
  629. package/resources/skills/video-recap-production/upstream/LICENSE +21 -0
  630. package/resources/skills/video-recap-production/upstream/README.en.md +468 -0
  631. package/resources/skills/video-recap-production/upstream/README.md +459 -0
  632. package/resources/skills/video-recap-production/upstream/manifest.json +839 -0
  633. package/resources/skills/video-recap-production/upstream/skills/video-assemble/SKILL.md +112 -0
  634. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/audio-modes.md +63 -0
  635. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/explicit-audio-mix.md +75 -0
  636. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/foreground-compose.md +118 -0
  637. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/LICENSE.duo-video +21 -0
  638. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/SOURCE.md +15 -0
  639. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_draft_meta_info.json +69 -0
  640. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_combination_segment.json +84 -0
  641. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_combination_video_material.json +98 -0
  642. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_draft.json +204 -0
  643. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_material_video.json +83 -0
  644. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_meta_material_value.json +23 -0
  645. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_project_info.json +133 -0
  646. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_segment.json +70 -0
  647. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_text_styles.json +30 -0
  648. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_yj_material_audio.json +41 -0
  649. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_yj_material_text.json +109 -0
  650. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/narration-adoption.md +103 -0
  651. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/packaging.md +45 -0
  652. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/pair-media.md +74 -0
  653. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/source-score.md +147 -0
  654. package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/subtitle-track.md +202 -0
  655. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/adoption/__init__.py +1 -0
  656. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/adoption/audio_mix_binding.py +279 -0
  657. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/adoption/frozen_audio.py +187 -0
  658. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/adoption/narration_binding.py +323 -0
  659. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/adoption/strict_inputs.py +109 -0
  660. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/adoption/strict_publish.py +130 -0
  661. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/artifacts.py +47 -0
  662. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/assemble.py +591 -0
  663. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/assemble_constants.py +51 -0
  664. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/assembly_contract.py +318 -0
  665. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/assembly_settings.py +138 -0
  666. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/audio_automation.py +195 -0
  667. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/audio_mix.py +465 -0
  668. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/compose_foreground.py +293 -0
  669. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/export_jianying.py +254 -0
  670. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/__init__.py +1 -0
  671. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/builders.py +718 -0
  672. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/model.py +105 -0
  673. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/optional.py +23 -0
  674. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/schema.py +53 -0
  675. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/templates.py +37 -0
  676. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/timeline_contract.py +223 -0
  677. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/tracks.py +72 -0
  678. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/writer.py +383 -0
  679. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/lib.py +218 -0
  680. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/media.py +190 -0
  681. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/narration_audio.py +413 -0
  682. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/packaging.py +122 -0
  683. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/pair_media.py +216 -0
  684. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/render_preflight.py +33 -0
  685. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/source_score.py +469 -0
  686. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/source_subtitles.py +423 -0
  687. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/subtitles/__init__.py +1 -0
  688. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/subtitles/core.py +330 -0
  689. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/subtitles/render.py +82 -0
  690. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/subtitles/track.py +324 -0
  691. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/subtitles/track_binding.py +200 -0
  692. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/timeline.py +217 -0
  693. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/timeline_emit.py +167 -0
  694. package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/visual_render.py +448 -0
  695. package/resources/skills/video-recap-production/upstream/skills/video-cut/SKILL.md +108 -0
  696. package/resources/skills/video-recap-production/upstream/skills/video-cut/references/shot-review.md +50 -0
  697. package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/cut.py +41 -0
  698. package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/cut_cli.py +308 -0
  699. package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/cut_contract.py +424 -0
  700. package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/cut_render.py +304 -0
  701. package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/lib.py +114 -0
  702. package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/media_geometry.py +238 -0
  703. package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/narration_mapping.py +71 -0
  704. package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/narrative_selection.py +244 -0
  705. package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/sentence_boundaries.py +585 -0
  706. package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/shot_review.py +357 -0
  707. package/resources/skills/video-recap-production/upstream/skills/video-recap/SKILL.md +260 -0
  708. package/resources/skills/video-recap-production/upstream/skills/video-recap/references/audio-routing.md +126 -0
  709. package/resources/skills/video-recap-production/upstream/skills/video-recap/references/config-playbook.md +65 -0
  710. package/resources/skills/video-recap-production/upstream/skills/video-recap/references/data-schema.md +545 -0
  711. package/resources/skills/video-recap-production/upstream/skills/video-recap/references/resource-library.md +151 -0
  712. package/resources/skills/video-recap-production/upstream/skills/video-recap/references/shift-left-qc-schema.md +23 -0
  713. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/doctor.py +556 -0
  714. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/final_qc.py +527 -0
  715. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/lib.py +220 -0
  716. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/library.py +509 -0
  717. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/materials.py +406 -0
  718. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/mimo_qc.py +33 -0
  719. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/project_binding.py +286 -0
  720. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/__init__.py +1 -0
  721. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/mimo_client.py +13 -0
  722. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/mimo_contract.py +9 -0
  723. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/mimo_evidence.py +287 -0
  724. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/mimo_observations.py +175 -0
  725. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/mimo_payload.py +206 -0
  726. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/mimo_report.py +318 -0
  727. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/mimo_runner.py +130 -0
  728. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc_contract.py +320 -0
  729. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap.py +9 -0
  730. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_cli.py +209 -0
  731. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_inspect.py +452 -0
  732. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_review.py +70 -0
  733. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_runner.py +696 -0
  734. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_runtime.py +260 -0
  735. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_source.py +278 -0
  736. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_stage_qc.py +160 -0
  737. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_timeline.py +621 -0
  738. package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/resource_lock.py +162 -0
  739. package/resources/skills/video-recap-production/upstream/skills/video-script/SKILL.md +251 -0
  740. package/resources/skills/video-recap-production/upstream/skills/video-script/references/creative-editing-playbook.md +229 -0
  741. package/resources/skills/video-recap-production/upstream/skills/video-script/references/promotional-copy.md +68 -0
  742. package/resources/skills/video-recap-production/upstream/skills/video-script/references/research-guide.md +75 -0
  743. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/agent_text.py +301 -0
  744. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/deslop_qc.py +211 -0
  745. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/evidence_bundle.py +440 -0
  746. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/lib.py +254 -0
  747. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/narration_lint.py +707 -0
  748. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/review.py +40 -0
  749. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/review_grounding.py +238 -0
  750. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/review_response.py +669 -0
  751. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/review_runner.py +186 -0
  752. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/speech_ownership.py +143 -0
  753. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/timeline_fusion.py +108 -0
  754. package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/validate.py +175 -0
  755. package/resources/skills/video-recap-production/upstream/skills/video-understanding/SKILL.md +77 -0
  756. package/resources/skills/video-recap-production/upstream/skills/video-understanding/references/data-schema.md +193 -0
  757. package/resources/skills/video-recap-production/upstream/skills/video-understanding/references/prompt-templates.md +37 -0
  758. package/resources/skills/video-recap-production/upstream/skills/video-understanding/references/research-guide.md +74 -0
  759. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/agent_text.py +301 -0
  760. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/asr.py +279 -0
  761. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/asr_timing_evidence.py +270 -0
  762. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/brief.py +9 -0
  763. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/briefing/__init__.py +1 -0
  764. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/briefing/builder.py +402 -0
  765. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/briefing/context.py +317 -0
  766. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/briefing/inputs.py +268 -0
  767. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/briefing/timeline.py +326 -0
  768. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/consolidate.py +596 -0
  769. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/deslop_qc.py +211 -0
  770. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/detect.py +504 -0
  771. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/extract.py +62 -0
  772. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/lib.py +419 -0
  773. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/narration_lint.py +707 -0
  774. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/speech_ownership.py +143 -0
  775. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/storyboard.py +445 -0
  776. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/timeline_fusion.py +108 -0
  777. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/understand.py +9 -0
  778. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/understanding_brief.py +190 -0
  779. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/understanding_cache.py +345 -0
  780. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/understanding_runner.py +387 -0
  781. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/understanding_storyboard.py +167 -0
  782. package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/vlm.py +674 -0
  783. package/resources/skills/video-recap-production/upstream/skills/video-voiceover/SKILL.md +91 -0
  784. package/resources/skills/video-recap-production/upstream/skills/video-voiceover/references/index-tts.md +31 -0
  785. package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/approved_text_policy.py +123 -0
  786. package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/dub.py +623 -0
  787. package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/lib.py +352 -0
  788. package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/providers/__init__.py +1 -0
  789. package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/providers/fish_audio.py +91 -0
  790. package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/providers/index_tts.py +184 -0
  791. package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/tts_audio.py +102 -0
  792. package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/voiceover.py +771 -0
  793. package/resources/skills/viora-canvas-production/manifest.json +5 -1
  794. package/resources/skills/viora-canvas-production/references/story-handoff.md +49 -0
@@ -0,0 +1,702 @@
1
+ #!/usr/bin/env python3
2
+ """Inspect reusable long-analysis assets without changing user files.
3
+
4
+ Only the upstream directory contract is recognized: ``章节/第N章_摘要.md``,
5
+ golden-three-chapter analyses, and the aggregate files. Missing chapters are
6
+ reported exactly so a run only fills gaps.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import argparse
12
+ import csv
13
+ import json
14
+ import re
15
+ import sys
16
+ import unicodedata
17
+ from pathlib import Path
18
+ from typing import Iterable
19
+
20
+
21
+ SUMMARY_RE = re.compile(r"^第0*(\d+)章_摘要\.md$")
22
+ GOLDEN_RE = re.compile(r"^第0*(\d+)章_深度拆解\.md$")
23
+ SCHEMA_RE = re.compile(r"schema_version\s*[::]\s*v?(\d+)", re.IGNORECASE)
24
+ TOTAL_RE = re.compile(r"总章数\s*(?:[::]|\|)\s*(\d+)")
25
+ TOTAL_FALLBACK_RE = re.compile(r"总章数\s+(\d+)\s*章?")
26
+ TABLE_CHAPTER_TOTAL_RE = re.compile(r"\|\s*章节数\s*\|\s*(\d+)\s*(?:章)?\s*\|")
27
+ COVERAGE_TOTAL_RE = re.compile(
28
+ r"(?:输入覆盖\s*[::]\s*全文|精读覆盖\s*[::]\s*第\s*1\s*[—–-]\s*)(\d+)\s*章"
29
+ )
30
+ FINAL_RE = re.compile(r"(?:最终状态|当前状态)\s*[::]\s*([a-z0-9_]+)", re.IGNORECASE)
31
+ SOURCE_HASH_RE = re.compile(
32
+ r"(?:输入版本|SHA-256|source_sha256)\s*(?:[::]|\|)\s*([0-9a-f]{64})", re.IGNORECASE
33
+ )
34
+ PROJECTION_RE = re.compile(
35
+ r"<!--\s*story-long-analyze:projection\s+runtime=(?P<runtime>[^\s]+)\s+"
36
+ r"source=(?P<source>[^\s]+)(?:\s+[^>]*?)?\s*-->"
37
+ )
38
+ STATE_START = "<!-- story-long-analyze:runtime-state:start -->"
39
+ STATE_END = "<!-- story-long-analyze:runtime-state:end -->"
40
+ # v0.7.x wrote a 「章节边界」 table (章号 | 标题 | 起始行 | 字数) into _progress.md.
41
+ BOUNDARY_HEADING_RE = re.compile(r"^#{1,6}\s*章节边界")
42
+ TITLE_LABEL_RE = re.compile(
43
+ r"^\s*(?:第(?P<number>[〇零一二三四五六七八九十百千万两0-9]+)章|第[〇零一二三四五六七八九十百千万两0-9]+[卷回节]"
44
+ r"|卷[〇零一二三四五六七八九十百千万两0-9]+|Chapter\s*(?P<english>[0-9]+)|(?P<numeric>[0-9]+)[.、](?![0-9])"
45
+ r"|(?P<special>楔子|序章|引子|前言|后记|尾声|番外[〇零一二三四五六七八九十百千万两0-9]*))",
46
+ re.IGNORECASE,
47
+ )
48
+ # Author notes appended to a heading, e.g. 「(求收藏)」「【二合一】」.
49
+ TITLE_NOTE_RE = re.compile(r"[(\[【〔〖][^()\[\]【】〔〕〖〗]*[)\]】〕〗]\s*$")
50
+ TITLE_NOISE_RE = re.compile(r"[\s\-—::、.,;!?\"“”'‘’《》「」『』()\[\]【】〔〕〖〗]+")
51
+
52
+
53
+ def nonempty(path: Path) -> bool:
54
+ try:
55
+ return path.is_file() and path.stat().st_size > 0
56
+ except OSError:
57
+ return False
58
+
59
+
60
+ def any_nonempty(paths: Iterable[Path]) -> bool:
61
+ return any(nonempty(path) for path in paths)
62
+
63
+
64
+ def read_text(path: Path) -> str | None:
65
+ if not nonempty(path):
66
+ return None
67
+ try:
68
+ return path.read_text(encoding="utf-8-sig")
69
+ except (OSError, UnicodeError):
70
+ return None
71
+
72
+
73
+ def read_progress(path: Path) -> tuple[int | None, int | None, str | None]:
74
+ text = read_text(path)
75
+ if text is None:
76
+ return None, None, "unreadable" if path.exists() else None
77
+ schema_match = SCHEMA_RE.search(text)
78
+ total_match = TOTAL_RE.search(text) or COVERAGE_TOTAL_RE.search(text)
79
+ final_match = FINAL_RE.search(text)
80
+ return (
81
+ int(schema_match.group(1)) if schema_match else None,
82
+ int(total_match.group(1)) if total_match else None,
83
+ final_match.group(1).lower() if final_match else None,
84
+ )
85
+
86
+
87
+ def read_declared_total(paths: Iterable[Path]) -> tuple[int | None, str | None]:
88
+ for path in paths:
89
+ text = read_text(path)
90
+ if text is None:
91
+ continue
92
+ match = TOTAL_RE.search(text) or TOTAL_FALLBACK_RE.search(text) or TABLE_CHAPTER_TOTAL_RE.search(text)
93
+ if match and int(match.group(1)) > 0:
94
+ return int(match.group(1)), path.as_posix()
95
+ return None, None
96
+
97
+
98
+ def read_source_hash(paths: Iterable[Path]) -> tuple[str | None, str | None]:
99
+ for path in paths:
100
+ text = read_text(path)
101
+ if text is None:
102
+ continue
103
+ match = SOURCE_HASH_RE.search(text)
104
+ if match:
105
+ return match.group(1).lower(), path.as_posix()
106
+ return None, None
107
+
108
+
109
+ def read_index_chapters(path: Path) -> tuple[list[int], list[str]]:
110
+ if not nonempty(path):
111
+ return [], []
112
+ errors: list[str] = []
113
+ chapters: list[int] = []
114
+ try:
115
+ with path.open("r", encoding="utf-8-sig", newline="") as handle:
116
+ reader = csv.DictReader(handle)
117
+ required = {"chapter", "char_count", "source_locator", "status", "source_sha256"}
118
+ missing = required - set(reader.fieldnames or [])
119
+ if missing:
120
+ return [], ["chapter_index.csv 缺列:" + ", ".join(sorted(missing))]
121
+ for row_number, row in enumerate(reader, start=2):
122
+ try:
123
+ chapters.append(int(row["chapter"]))
124
+ except (TypeError, ValueError):
125
+ errors.append(f"chapter_index.csv 第 {row_number} 行章号无效")
126
+ except (OSError, UnicodeError, csv.Error) as exc:
127
+ return [], [f"chapter_index.csv 不可读:{exc}"]
128
+ if len(chapters) != len(set(chapters)):
129
+ errors.append("chapter_index.csv 存在重复章号")
130
+ unique = sorted(set(chapters))
131
+ if unique and unique != list(range(1, max(unique) + 1)):
132
+ errors.append("chapter_index.csv 章号不连续")
133
+ return unique, errors
134
+
135
+
136
+ def read_index_identities(path: Path) -> list[dict[str, str]]:
137
+ if not nonempty(path):
138
+ return []
139
+ try:
140
+ with path.open("r", encoding="utf-8-sig", newline="") as handle:
141
+ return [dict(row) for row in csv.DictReader(handle)]
142
+ except (OSError, UnicodeError, csv.Error):
143
+ return []
144
+
145
+
146
+ def read_managed_stages(text: str | None) -> tuple[bool, dict[str, dict[str, str]]]:
147
+ if not text or text.count(STATE_START) != 1 or text.count(STATE_END) != 1:
148
+ return False, {}
149
+ match = re.search(re.escape(STATE_START) + r"(.*?)" + re.escape(STATE_END), text, re.DOTALL)
150
+ if not match:
151
+ return False, {}
152
+ stages: dict[str, dict[str, str]] = {}
153
+ section = None
154
+ for line in match.group(1).splitlines():
155
+ if line.strip() == "### 阶段状态":
156
+ section = "stages"
157
+ continue
158
+ if line.startswith("### "):
159
+ section = None
160
+ continue
161
+ if section != "stages" or not line.lstrip().startswith("|"):
162
+ continue
163
+ cells = [cell.strip() for cell in line.strip().strip("|").split("|")]
164
+ if len(cells) >= 3 and cells[0] not in {"阶段", "---"}:
165
+ stages[cells[0].lower()] = {"status": cells[1].lower(), "output": cells[2]}
166
+ return True, stages
167
+
168
+
169
+ def collect_numbered_files(
170
+ directory: Path, pattern: re.Pattern[str]
171
+ ) -> tuple[list[int], dict[int, Path], list[str]]:
172
+ chapters: list[int] = []
173
+ sources: dict[int, Path] = {}
174
+ duplicates: list[str] = []
175
+ if not directory.is_dir():
176
+ return chapters, sources, duplicates
177
+ for path in sorted(directory.iterdir()):
178
+ match = pattern.match(path.name)
179
+ if not match or not nonempty(path):
180
+ continue
181
+ chapter = int(match.group(1))
182
+ if chapter in sources:
183
+ duplicates.append(f"第{chapter}章:{sources[chapter].as_posix()} / {path.as_posix()}")
184
+ continue
185
+ chapters.append(chapter)
186
+ sources[chapter] = path
187
+ return sorted(chapters), sources, duplicates
188
+
189
+
190
+ def compact_ranges(chapters: Iterable[int]) -> list[str]:
191
+ values = sorted(set(chapters))
192
+ if not values:
193
+ return []
194
+ ranges: list[str] = []
195
+ start = previous = values[0]
196
+ for chapter in values[1:]:
197
+ if chapter == previous + 1:
198
+ previous = chapter
199
+ continue
200
+ ranges.append(str(start) if start == previous else f"{start}-{previous}")
201
+ start = previous = chapter
202
+ ranges.append(str(start) if start == previous else f"{start}-{previous}")
203
+ return ranges
204
+
205
+
206
+ def relative(root: Path, path: Path) -> str:
207
+ try:
208
+ return path.resolve().relative_to(root.resolve()).as_posix()
209
+ except (OSError, ValueError):
210
+ return path.as_posix()
211
+
212
+
213
+ def summary_kind(path: Path) -> str:
214
+ text = read_text(path) or ""
215
+ return "three_script_projection" if PROJECTION_RE.search(text[:1000]) else "upstream_summary"
216
+
217
+
218
+ def read_legacy_boundaries(text: str | None) -> list[dict[str, object]]:
219
+ """Rows of the v0.7.x 「章节边界」 table: old chapter number, title, start line."""
220
+ if not text:
221
+ return []
222
+ rows: list[dict[str, object]] = []
223
+ in_section = False
224
+ header: list[str] | None = None
225
+ for line in text.splitlines():
226
+ stripped = line.strip()
227
+ if stripped.startswith("#"):
228
+ if in_section and rows:
229
+ break
230
+ in_section = bool(BOUNDARY_HEADING_RE.match(stripped))
231
+ header = None
232
+ continue
233
+ if not in_section or not stripped.startswith("|"):
234
+ continue
235
+ cells = [cell.strip() for cell in stripped.strip("|").split("|")]
236
+ if header is None:
237
+ if "章号" in cells:
238
+ header = cells
239
+ continue
240
+ if not "".join(cells).strip("-: "):
241
+ continue
242
+ record = dict(zip(header, cells))
243
+ number = re.search(r"\d+", record.get("章号", ""))
244
+ start = re.search(r"\d+", record.get("起始行", ""))
245
+ if not number:
246
+ continue
247
+ rows.append({
248
+ "chapter": int(number.group(0)),
249
+ "title": record.get("标题", ""),
250
+ "start_line": int(start.group(0)) if start else None,
251
+ })
252
+ return rows
253
+
254
+
255
+ def title_parts(title: str) -> tuple[str, str, str]:
256
+ """(label, strict key, loose key) of a heading; loose drops trailing author notes."""
257
+ text = unicodedata.normalize("NFKC", str(title or "")).strip()
258
+ label = ""
259
+ for _ in range(3):
260
+ match = TITLE_LABEL_RE.match(text)
261
+ if not match or not match.group(0).strip():
262
+ break
263
+ for group in ("number", "english", "numeric", "special"):
264
+ if match.group(group):
265
+ label = match.group(group)
266
+ text = text[match.end():]
267
+ strict = TITLE_NOISE_RE.sub("", text)
268
+ loose = text
269
+ while TITLE_NOTE_RE.search(loose):
270
+ loose = TITLE_NOTE_RE.sub("", loose)
271
+ return label, strict, TITLE_NOISE_RE.sub("", loose) or strict
272
+
273
+
274
+ def label_matches(label: str, row: dict[str, object]) -> bool:
275
+ source = str(row.get("source_chapter", "")).strip()
276
+ if not label or not source:
277
+ return False
278
+ if label == source:
279
+ return True
280
+ try:
281
+ from build_chapter_index import parse_number
282
+ return source.isdigit() and parse_number(label) == int(source)
283
+ except ValueError:
284
+ return False
285
+
286
+
287
+ def title_candidates(title: str, index_rows: list[dict[str, object]]) -> list[dict[str, object]]:
288
+ """Index rows whose title agrees with an old table title, best tier first."""
289
+ label, strict, loose = title_parts(title)
290
+ if strict:
291
+ keys = [(row, title_parts(str(row.get("title", "")))) for row in index_rows]
292
+ for tier in (
293
+ [row for row, (_, row_strict, _) in keys if row_strict == strict],
294
+ [row for row, (_, _, row_loose) in keys
295
+ if row_loose and (row_loose == loose or row_loose in loose or loose in row_loose)],
296
+ ):
297
+ if tier:
298
+ return tier
299
+ # Retitled or title-less headings still carry their chapter number.
300
+ return [row for row in index_rows if label_matches(label, row)]
301
+
302
+
303
+ def map_legacy_row(old: dict[str, object], index_rows: list[dict[str, object]]) -> int | None:
304
+ """Index chapter an old boundary row points at.
305
+
306
+ A start line that is exactly a chapter's heading line decides on its own.
307
+ Otherwise the title picks the chapter (nearest to the old start line when
308
+ several match); a title-less row falls back to the chapter holding the line.
309
+ """
310
+ start = old.get("start_line")
311
+ if isinstance(start, int):
312
+ for row in index_rows:
313
+ if int(row["start_line"]) == start:
314
+ return int(row["chapter"])
315
+ matches = title_candidates(str(old.get("title", "")), index_rows)
316
+ if not isinstance(start, int):
317
+ return int(matches[0]["chapter"]) if len(matches) == 1 else None
318
+ if not matches and not any(title_parts(str(old.get("title", "")))[:2]):
319
+ matches = [row for row in index_rows if int(row["start_line"]) <= start <= int(row["end_line"])]
320
+
321
+ def distance(row: dict[str, object]) -> int:
322
+ first, last = int(row["start_line"]), int(row["end_line"])
323
+ return 0 if first <= start <= last else min(abs(start - first), abs(start - last))
324
+
325
+ ranked = sorted(matches, key=distance)
326
+ if not ranked or (len(ranked) > 1 and distance(ranked[0]) == distance(ranked[1])):
327
+ return None
328
+ return int(ranked[0]["chapter"])
329
+
330
+
331
+ def leading_special_labels(index_rows: list[dict[str, object]]) -> list[str]:
332
+ """Prologue-like chapters (楔子、序章、第0章…) before the first numbered chapter."""
333
+ labels: list[str] = []
334
+ for row in index_rows:
335
+ source = str(row.get("source_chapter", "")).strip()
336
+ if source.isdigit() and int(source) >= 1:
337
+ break
338
+ labels.append("第0章" if source == "0" else source)
339
+ return labels
340
+
341
+
342
+ def mapping_author_message(detail: str, labels: list[str], done: str) -> str:
343
+ """One plain-language stop message with the author's choices (no field names)."""
344
+ if labels:
345
+ prologue = "、".join("「%s」" % label for label in labels)
346
+ return (
347
+ "先停一下:%s。这次重新识别章节时,开头的%s被算成了单独一章,"
348
+ "照这样续拆,旧文件会整体错开一章——%s没人拆、有的章被拆两遍。请选一种:"
349
+ "① 按旧章号继续(推荐,旧拆文当时没把%s算作一章时选这个):%s并进第一章,"
350
+ "已拆好的%s原样复用,%s不单独拆;"
351
+ "② %s单独算一章:这本书已有的拆文结果全部挪进备份目录(不删除),按新章号重拆;"
352
+ "③ 换一个新目录,整本重新拆。"
353
+ % (detail, prologue, prologue, prologue, prologue, done, prologue, prologue)
354
+ )
355
+ return (
356
+ "先停一下:%s,没法确认已拆好的%s各对应哪一章。请选一种:"
357
+ "① 换一个新目录,整本重新拆(推荐);② 如果原文换过版本或被改过,换回拆文时用的那份原文再续拆。"
358
+ % (detail, done)
359
+ )
360
+
361
+
362
+ def legacy_mapping_check(root: Path, index_rows: list[dict[str, object]]) -> dict[str, object] | None:
363
+ """Stop when files numbered by an older run no longer match the chapter index.
364
+
365
+ Old summaries always predate the index. Golden-chapter analyses count as old
366
+ when ``_progress.md`` comes from v0.7.x (a 「章节边界」 table or no runtime
367
+ block); this run's Stage 1 writes them against the index. The old boundary
368
+ table, when present, decides; otherwise a source that does not start at
369
+ chapter one is ambiguous.
370
+ """
371
+ if not index_rows:
372
+ return None
373
+ progress_text = read_text(root / "_progress.md")
374
+ boundaries = read_legacy_boundaries(progress_text)
375
+ legacy_progress = progress_text is not None and (bool(boundaries) or STATE_START not in progress_text)
376
+ _, summary_sources, _ = collect_numbered_files(root / "章节", SUMMARY_RE)
377
+ old_chapters = {chapter for chapter, path in summary_sources.items() if summary_kind(path) == "upstream_summary"}
378
+ old_kinds = ["逐章摘要"] if old_chapters else []
379
+ if legacy_progress:
380
+ golden, _, _ = collect_numbered_files(root / "章节", GOLDEN_RE)
381
+ if golden:
382
+ old_chapters.update(golden)
383
+ old_kinds.insert(0, "开头三章拆解")
384
+ if not old_chapters:
385
+ return None
386
+ rows = sorted(index_rows, key=lambda row: int(row["chapter"]))
387
+ labels = leading_special_labels(rows)
388
+ done = "、".join(old_kinds)
389
+ if boundaries:
390
+ by_old = {int(row["chapter"]): row for row in boundaries}
391
+ # Chapters the old run appended after its table stay on the same numbering
392
+ # as long as every chapter the table does cover lines up.
393
+ checked = sorted(chapter for chapter in old_chapters if chapter <= max(by_old)) or sorted(old_chapters)
394
+ shifted = []
395
+ unknown = []
396
+ for chapter in checked:
397
+ old = by_old.get(chapter)
398
+ mapped = map_legacy_row(old, rows) if old else None
399
+ if mapped is None:
400
+ unknown.append(chapter)
401
+ elif mapped != chapter:
402
+ shifted.append((chapter, mapped))
403
+ if not shifted and not unknown:
404
+ return None
405
+ if shifted:
406
+ old_number, new_number = shifted[0]
407
+ title = next((str(row.get("title", "")) for row in rows if int(row["chapter"]) == new_number), "")
408
+ detail = "旧拆文的第%s章「%s」,在这次的章节表里是第%s章" % (old_number, title, new_number)
409
+ else:
410
+ detail = "旧进度里的章节表和原文对不上(第%s章找不到)" % compact_ranges(unknown)[0]
411
+ code = "legacy_boundary_shift" if shifted else "legacy_boundary_unmatched"
412
+ else:
413
+ first_source = str(rows[0].get("source_chapter", "")).strip()
414
+ if first_source.isdigit() and int(first_source) == 1:
415
+ return None
416
+ detail = "原文开头是「%s」,而旧拆文没有留下能核对章号的章节表" % (first_source or "未知")
417
+ code = "legacy_identity_unverifiable"
418
+ return {
419
+ "code": code,
420
+ "conflict": "旧拆文章号与当前索引不一致:" + detail,
421
+ "author_message": mapping_author_message(detail, labels, done),
422
+ "fold_prologue_available": bool(labels),
423
+ "legacy_chapters": sorted(old_chapters),
424
+ }
425
+
426
+
427
+ def inspect(root: Path, expected_override: int | None) -> dict[str, object]:
428
+ root = root.resolve()
429
+ schema, progress_total, final_state = read_progress(root / "_progress.md")
430
+ progress_text = read_text(root / "_progress.md")
431
+ index_chapters, index_errors = read_index_chapters(root / "chapter_index.csv")
432
+ index_identities = read_index_identities(root / "chapter_index.csv")
433
+ managed_state_present, managed_stages = read_managed_stages(progress_text)
434
+
435
+ summaries, summary_sources, duplicate_summaries = collect_numbered_files(root / "章节", SUMMARY_RE)
436
+ golden, golden_sources, duplicate_golden = collect_numbered_files(root / "章节", GOLDEN_RE)
437
+
438
+ preferred_paths: dict[int, str] = {}
439
+ preferred_kinds: dict[int, str] = {}
440
+ for chapter, path in summary_sources.items():
441
+ preferred_paths[chapter] = relative(root, path)
442
+ preferred_kinds[chapter] = summary_kind(path)
443
+ for chapter, path in golden_sources.items():
444
+ if chapter not in preferred_paths:
445
+ preferred_paths[chapter] = relative(root, path)
446
+ preferred_kinds[chapter] = "golden_analysis"
447
+
448
+ expected = expected_override
449
+ expected_source = "argument" if expected is not None else None
450
+ if expected is None and index_chapters and not index_errors:
451
+ expected = max(index_chapters)
452
+ expected_source = "chapter_index.csv"
453
+ if expected is None and progress_total is not None and final_state in {"completed", "completed_with_errors"}:
454
+ expected = progress_total
455
+ expected_source = "_progress.md"
456
+ if expected is None:
457
+ expected, source = read_declared_total((root / "拆文报告.md", root / "概要.md", root / "快速预览.md"))
458
+ expected_source = Path(source).name if source else None
459
+ if expected is None and progress_total is not None:
460
+ expected = progress_total
461
+ expected_source = "_progress.md"
462
+
463
+ expected_set = set(range(1, expected + 1)) if expected else set()
464
+ union_semantic_set = set(preferred_paths)
465
+ missing_semantic = sorted(expected_set - union_semantic_set)
466
+ out_of_range_semantic = sorted(union_semantic_set - expected_set) if expected else []
467
+ missing_summaries = sorted(expected_set - set(summaries))
468
+ out_of_range_summaries = sorted(set(summaries) - expected_set) if expected else []
469
+
470
+ primary = {
471
+ "emotion_module": nonempty(root / "剧情" / "情绪模块.md"),
472
+ "rhythm": nonempty(root / "剧情" / "节奏.md"),
473
+ }
474
+ plot_dir = root / "剧情"
475
+ assets = {
476
+ "report": nonempty(root / "拆文报告.md"),
477
+ "style": nonempty(root / "文风.md"),
478
+ "storyline": nonempty(plot_dir / "故事线.md"),
479
+ "plot_units": any_nonempty(
480
+ path
481
+ for path in plot_dir.glob("*.md")
482
+ if path.name not in {"README.md", "故事线.md", "节奏.md", "情绪模块.md", "散落情节.md"}
483
+ )
484
+ if plot_dir.is_dir()
485
+ else False,
486
+ "characters": any_nonempty((root / "角色").glob("*.md")) if (root / "角色").is_dir() else False,
487
+ "settings": any_nonempty((root / "设定").rglob("*.md")) if (root / "设定").is_dir() else False,
488
+ "batch_cache": any_nonempty((root / "_analysis_cache").glob("批次-*.md"))
489
+ if (root / "_analysis_cache").is_dir()
490
+ else False,
491
+ "chapter_index": nonempty(root / "chapter_index.csv"),
492
+ }
493
+
494
+ has_any = bool(union_semantic_set) or any(assets.values()) or any(primary.values()) or nonempty(root / "_progress.md")
495
+ semantic_coverage_complete = bool(union_semantic_set) and (
496
+ (expected is not None and not missing_semantic and not out_of_range_semantic)
497
+ or (expected is None and final_state in {"completed", "completed_with_errors"})
498
+ )
499
+ summary_coverage_complete = (
500
+ bool(summaries) and expected is not None and not missing_summaries and not out_of_range_summaries
501
+ )
502
+ standard_coverage_complete = bool(union_semantic_set) and expected is not None and union_semantic_set == expected_set
503
+ legacy_core = assets["report"] and summary_coverage_complete and (assets["storyline"] or assets["plot_units"])
504
+ managed_pipeline_complete = all(
505
+ managed_stages.get(stage, {}).get("status") == "completed"
506
+ for stage in ("stage1", "stage2", "stage3", "stage4", "stage5", "stage6")
507
+ )
508
+ usable_upstream_complete = (
509
+ all(primary.values())
510
+ and assets["report"]
511
+ and standard_coverage_complete
512
+ and (
513
+ managed_pipeline_complete
514
+ or (
515
+ final_state in {"completed", "completed_with_errors"}
516
+ and (assets["storyline"] or assets["plot_units"])
517
+ )
518
+ )
519
+ )
520
+
521
+ if expected:
522
+ preferred_paths = {chapter: path for chapter, path in preferred_paths.items() if chapter in expected_set}
523
+ preferred_kinds = {chapter: kind for chapter, kind in preferred_kinds.items() if chapter in expected_set}
524
+ semantic_set = set(preferred_paths)
525
+
526
+ full_result_available = usable_upstream_complete or legacy_core
527
+ mixed_sources = len(set(preferred_kinds.values())) > 1
528
+
529
+ # Files numbered by an older run can drift from the index; this run's golden
530
+ # analyses and projections are written against it.
531
+ mapping_conflicts: list[str] = []
532
+ mapping_blocked_chapters: list[int] = []
533
+ mapping = legacy_mapping_check(root, index_identities) if index_identities else None
534
+ if mapping:
535
+ mapping_blocked_chapters = sorted(expected_set or set(index_chapters))
536
+ mapping_conflicts.append(str(mapping["conflict"]))
537
+
538
+ stage_repairs: list[str] = []
539
+ if semantic_coverage_complete:
540
+ legacy_completed = final_state in {"completed", "completed_with_errors"}
541
+ if not primary["emotion_module"]:
542
+ stage_repairs.append("stage3_emotion")
543
+ if not primary["rhythm"]:
544
+ stage_repairs.append("stage3_rhythm")
545
+ if not legacy_completed and (not assets["characters"] or not assets["settings"]):
546
+ stage_repairs.append("stage4")
547
+ if not assets["report"]:
548
+ stage_repairs.append("stage5")
549
+ if not assets["style"]:
550
+ stage_repairs.append("stage6_style")
551
+ for stage in ("stage3", "stage4", "stage5", "stage6"):
552
+ row = managed_stages.get(stage)
553
+ if row and row.get("status") != "completed" and stage not in stage_repairs:
554
+ stage_repairs.append(stage)
555
+ elif managed_state_present and not legacy_completed and row is None:
556
+ # New three-script runs require a completed stage row even when
557
+ # a file was manually placed before the interruption.
558
+ if stage not in stage_repairs and not any(item.startswith(stage + "_") for item in stage_repairs):
559
+ stage_repairs.append(stage)
560
+
561
+ if not has_any:
562
+ classification = "empty"
563
+ recommended_path = "new_analysis"
564
+ elif usable_upstream_complete:
565
+ classification = "current_complete"
566
+ recommended_path = "repair_stages" if stage_repairs else "direct_use"
567
+ elif legacy_core:
568
+ classification = "legacy_complete"
569
+ recommended_path = "repair_stages" if stage_repairs else "direct_use"
570
+ elif semantic_coverage_complete:
571
+ classification = "partial_or_mixed"
572
+ recommended_path = "repair_stages" if stage_repairs else "enhance_existing"
573
+ else:
574
+ classification = "partial_or_mixed"
575
+ recommended_path = "continue_partial" if expected and missing_semantic else "enhance_existing"
576
+
577
+ conflicts = list(index_errors)
578
+ conflicts.extend(f"重复摘要:{item}" for item in duplicate_summaries)
579
+ conflicts.extend(f"重复黄金三章:{item}" for item in duplicate_golden)
580
+ conflicts.extend(mapping_conflicts)
581
+ if final_state == "completed" and not usable_upstream_complete:
582
+ conflicts.append("进度标记 completed,但当前主产物或上游逐章覆盖不完整")
583
+ if final_state == "completed_with_errors" and not semantic_coverage_complete:
584
+ conflicts.append("进度标记 completed_with_errors,需按失败与待核记录确认可用范围")
585
+ if index_chapters and expected and max(index_chapters) != expected:
586
+ conflicts.append("机械索引章数与期望章数不一致")
587
+
588
+ source_hash, source_hash_path = read_source_hash((root / "_progress.md",))
589
+
590
+ return {
591
+ "root": str(root),
592
+ "classification": classification,
593
+ "recommended_path": recommended_path,
594
+ "schema_version": schema,
595
+ "final_state": final_state,
596
+ "expected_chapters": expected,
597
+ "expected_chapters_source": expected_source,
598
+ # Original keys remain for callers that need the upstream interface itself.
599
+ "completed_summary_chapters": summaries,
600
+ "missing_summary_chapters": missing_summaries,
601
+ "out_of_range_summary_chapters": out_of_range_summaries,
602
+ # Runtime routing must use the selected semantic family below, never summary filenames alone.
603
+ "completed_semantic_chapters": sorted(semantic_set),
604
+ "missing_semantic_chapters": missing_semantic,
605
+ "out_of_range_semantic_chapters": out_of_range_semantic,
606
+ "semantic_coverage_complete": semantic_coverage_complete,
607
+ "full_result_available": full_result_available,
608
+ "chapter_sources": {
609
+ "priority": ["upstream_summary", "three_script_projection", "golden_analysis"],
610
+ "upstream_summary": {"chapters": summaries, "ranges": compact_ranges(summaries)},
611
+ "golden_analysis": {"chapters": golden, "ranges": compact_ranges(golden)},
612
+ "preferred_by_chapter": {str(chapter): preferred_kinds[chapter] for chapter in sorted(preferred_kinds)},
613
+ "preferred_paths": {str(chapter): preferred_paths[chapter] for chapter in sorted(preferred_paths)},
614
+ },
615
+ "source_hash": source_hash,
616
+ "source_hash_source": source_hash_path,
617
+ "primary_artifacts": primary,
618
+ "reusable_assets": assets,
619
+ "legacy_capabilities": {
620
+ "benchmark_reference": full_result_available or assets["report"] or assets["plot_units"] or bool(semantic_set),
621
+ "import_facts": bool(semantic_set),
622
+ "writing_style_reference": assets["style"],
623
+ },
624
+ "current_capabilities": {
625
+ "emotion_module_recall": primary["emotion_module"],
626
+ "rhythm_reference_recall": primary["rhythm"],
627
+ "source_location": assets["chapter_index"],
628
+ },
629
+ "mixed_sources": mixed_sources,
630
+ "stage_repairs": stage_repairs,
631
+ "managed_stage_status": managed_stages,
632
+ "chapter_mapping_conflicts": mapping_conflicts,
633
+ "chapter_mapping_blocked_chapters": mapping_blocked_chapters,
634
+ "chapter_mapping_author_message": mapping["author_message"] if mapping else None,
635
+ "provenance_requires_review": mixed_sources or (has_any and schema is None),
636
+ "conflicts": conflicts,
637
+ "notes": [
638
+ "本检查只扫描传入书目目录中的上游标准路径,不扫描其他项目或磁盘。",
639
+ "运行路由必须使用 completed_semantic_chapters;缺少逐章摘要文件不等于缺少语义成果。",
640
+ "direct_use 表示默认直接复用;只有用户明确要求增强时才二次提取已有成果。",
641
+ "整本重拆换一个新目录;本检查不提供就地重拆入口。",
642
+ ],
643
+ }
644
+
645
+
646
+ def compact_payload(payload: dict[str, object]) -> dict[str, object]:
647
+ """Remove per-chapter arrays from the human/model-facing inspection view."""
648
+ result = dict(payload)
649
+ semantic = result.pop("completed_semantic_chapters")
650
+ missing = result.pop("missing_semantic_chapters")
651
+ result["semantic_coverage"] = {
652
+ "completed_count": len(semantic),
653
+ "completed_ranges": compact_ranges(semantic),
654
+ "missing_count": len(missing),
655
+ "missing_ranges": compact_ranges(missing),
656
+ }
657
+ result.pop("completed_summary_chapters", None)
658
+ result.pop("missing_summary_chapters", None)
659
+ result.pop("out_of_range_summary_chapters", None)
660
+ result.pop("out_of_range_semantic_chapters", None)
661
+ source_info = dict(result["chapter_sources"])
662
+ source_info.pop("preferred_by_chapter", None)
663
+ source_info.pop("preferred_paths", None)
664
+ for key in ("upstream_summary", "golden_analysis"):
665
+ entry = dict(source_info[key])
666
+ entry["count"] = len(entry.pop("chapters"))
667
+ source_info[key] = entry
668
+ result["chapter_sources"] = source_info
669
+ return result
670
+
671
+
672
+ def main() -> int:
673
+ for stream in (sys.stdout, sys.stderr):
674
+ if hasattr(stream, "reconfigure"):
675
+ stream.reconfigure(encoding="utf-8")
676
+ parser = argparse.ArgumentParser(description=__doc__)
677
+ parser.add_argument("--root", type=Path, required=True, help="拆文库/{书名} 目录")
678
+ parser.add_argument("--expected-chapters", type=int, help="已知总章数;省略时按标准路径优先推断")
679
+ parser.add_argument("--compact", action="store_true", help="省略逐章数组,输出适合运行路由读取的范围摘要")
680
+ args = parser.parse_args()
681
+ if args.expected_chapters is not None and args.expected_chapters < 1:
682
+ parser.error("--expected-chapters 必须大于 0")
683
+ try:
684
+ if not args.root.exists():
685
+ raise ValueError("root_not_found:%s" % args.root)
686
+ if not args.root.is_dir():
687
+ raise ValueError("root_is_not_directory:%s" % args.root)
688
+ # Force a directory read here so an unreadable path fails before it can
689
+ # be mistaken for an empty new-analysis project.
690
+ next(args.root.iterdir(), None)
691
+ payload = inspect(args.root, args.expected_chapters)
692
+ if args.compact:
693
+ payload = compact_payload(payload)
694
+ print(json.dumps(payload, ensure_ascii=False, indent=2, sort_keys=True))
695
+ return 0
696
+ except (OSError, UnicodeError, ValueError) as exc:
697
+ print(json.dumps({"ok": False, "error": str(exc)}, ensure_ascii=False))
698
+ return 2
699
+
700
+
701
+ if __name__ == "__main__":
702
+ raise SystemExit(main())