@cloud411716/fancy-webnovel 1.0.46 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (271) hide show
  1. package/client.js +369 -0
  2. package/cordis.patch.yml +4 -13
  3. package/docs/douyin-plugin.md +118 -0
  4. package/docs/material-library/README.md +404 -0
  5. package/docs/material-library/import.js +437 -0
  6. package/docs/material-library/prompt.md +370 -0
  7. package/docs/material-library/queries.surql +94 -0
  8. package/docs/material-library/sample.jsonl +14 -0
  9. package/docs/material-library/schema.surql +46 -0
  10. package/docs/mcp-profile.example.yml +24 -0
  11. package/docs/story-graph-design.md +602 -0
  12. package/docs/story-graph-validation.md +81 -0
  13. package/docs/workspace-mcp.md +284 -0
  14. package/index.js +26 -38
  15. package/lib/atomic-write.js +109 -0
  16. package/lib/chapter-order.js +100 -0
  17. package/lib/chinese-num.js +111 -0
  18. package/lib/confirmation.js +80 -0
  19. package/lib/db-init.js +123 -0
  20. package/lib/deployed-state.js +141 -0
  21. package/lib/direction-labels.js +265 -0
  22. package/lib/error-codes.js +104 -0
  23. package/lib/infra.js +594 -0
  24. package/lib/llm-wiki.js +109 -0
  25. package/lib/material-db.js +149 -0
  26. package/lib/path-guard.js +150 -0
  27. package/lib/projects.js +400 -0
  28. package/lib/scraper-utils.js +305 -0
  29. package/lib/surreal-server.js +338 -0
  30. package/lib/topic-decision.js +860 -0
  31. package/lib/topic-fields.js +251 -0
  32. package/lib/topic-schema.js +225 -0
  33. package/lib/workspace.js +501 -0
  34. package/package.json +62 -5
  35. package/plugins/fancy-analyze/analyze-definitions.md +519 -0
  36. package/plugins/fancy-analyze/command-input.js +65 -0
  37. package/plugins/fancy-analyze/index.js +2024 -0
  38. package/plugins/fancy-analyze/ingest-coverage.js +107 -0
  39. package/plugins/fancy-analyze/schema-analyze.md +627 -0
  40. package/plugins/fancy-analyze/schema-write.md +178 -0
  41. package/plugins/fancy-analyze/scripts/append-summary-chapter.js +612 -0
  42. package/plugins/fancy-analyze/scripts/split_source.js +292 -0
  43. package/plugins/fancy-analyze/summary-progress.js +495 -0
  44. package/plugins/fancy-analyze/templates.js +1179 -0
  45. package/plugins/fancy-bootstrap/index.js +313 -0
  46. package/plugins/fancy-bootstrap/scripts/init.js +177 -0
  47. package/plugins/fancy-bootstrap/scripts/path-utils.js +21 -0
  48. package/plugins/fancy-bootstrap/templates.js +71 -0
  49. package/plugins/fancy-db/index.js +172 -0
  50. package/plugins/fancy-douyin/deploy.js +134 -0
  51. package/plugins/fancy-douyin/index.js +551 -0
  52. package/plugins/fancy-douyin/prompts/01-analysis-prompt.md +84 -0
  53. package/plugins/fancy-douyin/scripts/crawl-note.cjs +194 -0
  54. package/plugins/fancy-douyin/scripts/lib.cjs +197 -0
  55. package/plugins/fancy-douyin/scripts/scan-account.cjs +128 -0
  56. package/plugins/fancy-douyin/scripts/start-chrome.cjs +203 -0
  57. package/plugins/fancy-douyin/state.js +197 -0
  58. package/plugins/fancy-douyin/templates.js +127 -0
  59. package/plugins/fancy-export/exporter.js +805 -0
  60. package/plugins/fancy-export/index.js +63 -0
  61. package/plugins/fancy-import/import-core.js +1118 -0
  62. package/plugins/fancy-import/import-driver.js +604 -0
  63. package/plugins/fancy-import/index.js +738 -0
  64. package/plugins/fancy-import/prompts/01-import-prompt.md +131 -0
  65. package/plugins/fancy-import/templates.js +58 -0
  66. package/plugins/fancy-material/exporter.js +153 -0
  67. package/plugins/fancy-material/genres.js +256 -0
  68. package/plugins/fancy-material/index.js +835 -0
  69. package/plugins/fancy-material/inventory.js +143 -0
  70. package/plugins/fancy-material/kinds.js +313 -0
  71. package/plugins/fancy-material/queue.js +55 -0
  72. package/plugins/fancy-material/scripts/query.js +254 -0
  73. package/plugins/fancy-material/templates.js +258 -0
  74. package/plugins/fancy-material/tool-deploy.js +138 -0
  75. package/plugins/fancy-material/validate.js +149 -0
  76. package/plugins/fancy-project/index.js +133 -0
  77. package/plugins/fancy-scan/existing-block.js +100 -0
  78. package/plugins/fancy-scan/index.js +708 -0
  79. package/plugins/fancy-scan/prompts/01-analysis-prompt.md +302 -0
  80. package/plugins/fancy-scan/scripts/append-block.js +725 -0
  81. package/plugins/fancy-scan/scripts/report-validate.js +824 -0
  82. package/plugins/fancy-scan/scripts/run-scan.js +667 -0
  83. package/plugins/fancy-scan/scripts/scrapers/fanqie-rank-scraper.js +923 -0
  84. package/plugins/fancy-scan/scripts/scrapers/jjwxc-rank-scraper.js +469 -0
  85. package/plugins/fancy-scan/scripts/scrapers/qimao-rank-scraper.js +629 -0
  86. package/plugins/fancy-scan/templates/blocks.js +155 -0
  87. package/plugins/fancy-scan/templates/platforms.js +372 -0
  88. package/plugins/fancy-scan/templates/report-schema.js +90 -0
  89. package/plugins/fancy-scan/templates.js +694 -0
  90. package/plugins/fancy-scan/tool-deploy.js +335 -0
  91. package/plugins/fancy-scan/wait-turn.js +46 -0
  92. package/plugins/fancy-story-builder/db/README.md +106 -0
  93. package/plugins/fancy-story-builder/db/client.js +228 -0
  94. package/plugins/fancy-story-builder/db/commands.js +145 -0
  95. package/plugins/fancy-story-builder/db/ids.js +39 -0
  96. package/plugins/fancy-story-builder/db/import.js +798 -0
  97. package/plugins/fancy-story-builder/db/project.js +299 -0
  98. package/plugins/fancy-story-builder/db/query.js +361 -0
  99. package/plugins/fancy-story-builder/db/schema.js +417 -0
  100. package/plugins/fancy-story-builder/db/stage-sync.js +238 -0
  101. package/plugins/fancy-story-builder/deploy-manifest.js +239 -0
  102. package/plugins/fancy-story-builder/deslop-driver.js +821 -0
  103. package/plugins/fancy-story-builder/flesh-output.js +168 -0
  104. package/plugins/fancy-story-builder/index.js +6861 -0
  105. package/plugins/fancy-story-builder/patch-driver.js +390 -0
  106. package/plugins/fancy-story-builder/prompts/01-skeleton-prompt.md +563 -0
  107. package/plugins/fancy-story-builder/prompts/02-flesh-prompt.md +602 -0
  108. package/plugins/fancy-story-builder/prompts/03-rhythm-prompt.md +539 -0
  109. package/plugins/fancy-story-builder/prompts/04-writing-prompt.md +225 -0
  110. package/plugins/fancy-story-builder/prompts/05-deslop-prompt.md +96 -0
  111. package/plugins/fancy-story-builder/purpose-template.md +83 -0
  112. package/plugins/fancy-story-builder/references/formulas-rhythm.json +302 -0
  113. package/plugins/fancy-story-builder/references/formulas-skeleton.json +402 -0
  114. package/plugins/fancy-story-builder/references/genre-profiles.json +3514 -0
  115. package/plugins/fancy-story-builder/references/glossary.md +594 -0
  116. package/plugins/fancy-story-builder/references/index.md +581 -0
  117. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/00-index.md +174 -0
  118. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/01-scene.md +150 -0
  119. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/02-chapter-workflow.md +99 -0
  120. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/03-opening-chapter.md +104 -0
  121. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/04-dialogue-mastery.md +274 -0
  122. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/05-genre-formulas.md +432 -0
  123. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/06-tone-ensemble.md +259 -0
  124. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/07-ledger-audit.md +222 -0
  125. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/08-diagnosis-revision.md +205 -0
  126. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/09-reading-power.md +135 -0
  127. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/10-deslop.md +129 -0
  128. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/00-index.md +98 -0
  129. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/01-upgrade-rhythm.md +300 -0
  130. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/02-arc-rhythm.md +168 -0
  131. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/03-highpoint-hooks.md +189 -0
  132. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/04-satisfaction.md +226 -0
  133. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/05-foreshadow-density.md +195 -0
  134. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/06-chapter-outline.md +226 -0
  135. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/07-audit.md +181 -0
  136. package/plugins/fancy-story-builder/references//350/241/200/350/202/211/346/214/207/345/257/274/00-index.md +100 -0
  137. package/plugins/fancy-story-builder/references//350/241/200/350/202/211/346/214/207/345/257/274/01-character.md +243 -0
  138. package/plugins/fancy-story-builder/references//350/241/200/350/202/211/346/214/207/345/257/274/02-worldbuilding.md +245 -0
  139. package/plugins/fancy-story-builder/references//350/241/200/350/202/211/346/214/207/345/257/274/03-relations.md +185 -0
  140. package/plugins/fancy-story-builder/references//350/241/200/350/202/211/346/214/207/345/257/274/04-emotion-methods.md +286 -0
  141. package/plugins/fancy-story-builder/references//350/241/200/350/202/211/346/214/207/345/257/274/05-audit.md +187 -0
  142. package/plugins/fancy-story-builder/references//351/252/250/346/236/266/346/214/207/345/257/274/00-index.md +91 -0
  143. package/plugins/fancy-story-builder/references//351/252/250/346/236/266/346/214/207/345/257/274/01-positioning.md +209 -0
  144. package/plugins/fancy-story-builder/references//351/252/250/346/236/266/346/214/207/345/257/274/02-packaging.md +135 -0
  145. package/plugins/fancy-story-builder/references//351/252/250/346/236/266/346/214/207/345/257/274/03-entities.md +305 -0
  146. package/plugins/fancy-story-builder/references//351/252/250/346/236/266/346/214/207/345/257/274/04-conflict.md +328 -0
  147. package/plugins/fancy-story-builder/references//351/252/250/346/236/266/346/214/207/345/257/274/05-quota.md +187 -0
  148. package/plugins/fancy-story-builder/references//351/252/250/346/236/266/346/214/207/345/257/274/06-audit.md +160 -0
  149. package/plugins/fancy-story-builder/rhythm-output.js +140 -0
  150. package/plugins/fancy-story-builder/schema-setting.json +1100 -0
  151. package/plugins/fancy-story-builder/schema-setting.md +232 -0
  152. package/plugins/fancy-story-builder/scripts/ai-patterns.js +619 -0
  153. package/plugins/fancy-story-builder/scripts/brief-validate.js +164 -0
  154. package/plugins/fancy-story-builder/scripts/check-guide-compliance.js +289 -0
  155. package/plugins/fancy-story-builder/scripts/content-quality.js +416 -0
  156. package/plugins/fancy-story-builder/scripts/deslop-validate.js +143 -0
  157. package/plugins/fancy-story-builder/scripts/error-classes.js +112 -0
  158. package/plugins/fancy-story-builder/scripts/flesh-validate.js +1312 -0
  159. package/plugins/fancy-story-builder/scripts/formula-engine.js +112 -0
  160. package/plugins/fancy-story-builder/scripts/graph-utils.js +1484 -0
  161. package/plugins/fancy-story-builder/scripts/label-coverage.js +171 -0
  162. package/plugins/fancy-story-builder/scripts/prompt-drift-check.js +441 -0
  163. package/plugins/fancy-story-builder/scripts/reading-power.js +298 -0
  164. package/plugins/fancy-story-builder/scripts/reference-log.js +110 -0
  165. package/plugins/fancy-story-builder/scripts/rhythm-validate.js +1312 -0
  166. package/plugins/fancy-story-builder/scripts/schema-pages.js +2668 -0
  167. package/plugins/fancy-story-builder/scripts/semantic-lint.js +381 -0
  168. package/plugins/fancy-story-builder/scripts/skeleton-quota.js +145 -0
  169. package/plugins/fancy-story-builder/scripts/skeleton-validate.js +1973 -0
  170. package/plugins/fancy-story-builder/scripts/stage-batches.js +1405 -0
  171. package/plugins/fancy-story-builder/scripts/stage-contract.js +429 -0
  172. package/plugins/fancy-story-builder/scripts/story-artifacts.js +933 -0
  173. package/plugins/fancy-story-builder/scripts/upstream-query.js +198 -0
  174. package/plugins/fancy-story-builder/scripts/v2/baseline.js +112 -0
  175. package/plugins/fancy-story-builder/scripts/v2/cast.js +517 -0
  176. package/plugins/fancy-story-builder/scripts/v2/context.js +434 -0
  177. package/plugins/fancy-story-builder/scripts/v2/contracts.js +493 -0
  178. package/plugins/fancy-story-builder/scripts/v2/core.js +419 -0
  179. package/plugins/fancy-story-builder/scripts/v2/engine.js +1068 -0
  180. package/plugins/fancy-story-builder/scripts/v2/export-markdown.js +794 -0
  181. package/plugins/fancy-story-builder/scripts/v2/genre.js +195 -0
  182. package/plugins/fancy-story-builder/scripts/v2/knowledge.js +321 -0
  183. package/plugins/fancy-story-builder/scripts/v2/macro.js +409 -0
  184. package/plugins/fancy-story-builder/scripts/v2/manifest.js +538 -0
  185. package/plugins/fancy-story-builder/scripts/v2/migrate.js +137 -0
  186. package/plugins/fancy-story-builder/scripts/v2/prompts.js +1335 -0
  187. package/plugins/fancy-story-builder/scripts/v2/rhythm.js +618 -0
  188. package/plugins/fancy-story-builder/scripts/v2/scale.js +843 -0
  189. package/plugins/fancy-story-builder/scripts/v2/snapshot.js +121 -0
  190. package/plugins/fancy-story-builder/scripts/v2/stages.js +273 -0
  191. package/plugins/fancy-story-builder/scripts/v2/writing.js +216 -0
  192. package/plugins/fancy-story-builder/scripts/writing-rules.js +167 -0
  193. package/plugins/fancy-story-builder/scripts/writing-validate.js +682 -0
  194. package/plugins/fancy-story-builder/skeleton-output.js +199 -0
  195. package/plugins/fancy-story-builder/stage-driver.js +1049 -0
  196. package/plugins/fancy-story-builder/storydb/README.md +271 -0
  197. package/plugins/fancy-story-builder/storydb/cli.js +458 -0
  198. package/plugins/fancy-story-builder/storydb/client.js +351 -0
  199. package/plugins/fancy-story-builder/storydb/compile.js +452 -0
  200. package/plugins/fancy-story-builder/storydb/context.js +288 -0
  201. package/plugins/fancy-story-builder/storydb/definitions.js +699 -0
  202. package/plugins/fancy-story-builder/storydb/driver.js +106 -0
  203. package/plugins/fancy-story-builder/storydb/dsh-tools.js +313 -0
  204. package/plugins/fancy-story-builder/storydb/export.js +175 -0
  205. package/plugins/fancy-story-builder/storydb/ids.js +31 -0
  206. package/plugins/fancy-story-builder/storydb/impact.js +170 -0
  207. package/plugins/fancy-story-builder/storydb/import.js +559 -0
  208. package/plugins/fancy-story-builder/storydb/mcp.js +99 -0
  209. package/plugins/fancy-story-builder/storydb/prompts.js +952 -0
  210. package/plugins/fancy-story-builder/storydb/stage-command.js +379 -0
  211. package/plugins/fancy-story-builder/storydb/stage.js +426 -0
  212. package/plugins/fancy-story-builder/storydb/store.js +891 -0
  213. package/plugins/fancy-story-builder/storydb/tools.js +592 -0
  214. package/plugins/fancy-story-builder/storydb/validation.js +183 -0
  215. package/plugins/fancy-story-builder/templates/v2/10-scale/scale-template.json +144 -0
  216. package/plugins/fancy-story-builder/templates/v2/20-macro/emotion-template.json +15 -0
  217. package/plugins/fancy-story-builder/templates/v2/20-macro/endings-template.json +16 -0
  218. package/plugins/fancy-story-builder/templates/v2/20-macro/lines-template.json +28 -0
  219. package/plugins/fancy-story-builder/templates/v2/20-macro/roles-template.json +10 -0
  220. package/plugins/fancy-story-builder/templates/v2/20-macro/story-template.json +19 -0
  221. package/plugins/fancy-story-builder/templates/v2/20-macro/volumes-template.json +24 -0
  222. package/plugins/fancy-story-builder/templates/v2/20-macro/world-template.json +24 -0
  223. package/plugins/fancy-story-builder/templates/v2/30-cast/characters-template.json +49 -0
  224. package/plugins/fancy-story-builder/templates/v2/30-cast/climaxes-template.json +14 -0
  225. package/plugins/fancy-story-builder/templates/v2/30-cast/conflicts-template.json +30 -0
  226. package/plugins/fancy-story-builder/templates/v2/30-cast/factions-template.json +18 -0
  227. package/plugins/fancy-story-builder/templates/v2/30-cast/foreshadows-template.json +29 -0
  228. package/plugins/fancy-story-builder/templates/v2/30-cast/information-template.json +29 -0
  229. package/plugins/fancy-story-builder/templates/v2/30-cast/items-template.json +13 -0
  230. package/plugins/fancy-story-builder/templates/v2/30-cast/locations-template.json +12 -0
  231. package/plugins/fancy-story-builder/templates/v2/30-cast/payoffs-template.json +16 -0
  232. package/plugins/fancy-story-builder/templates/v2/30-cast/relations-template.json +44 -0
  233. package/plugins/fancy-story-builder/templates/v2/40-rhythm/chapter-map-template.json +81 -0
  234. package/plugins/fancy-story-builder/templates/v2/40-rhythm/outline-template.json +162 -0
  235. package/plugins/fancy-story-builder/templates/v2/50-writing/ledger-template.json +46 -0
  236. package/plugins/fancy-story-builder/templates/v2/60-deslop/report-template.json +10 -0
  237. package/plugins/fancy-story-builder/templates//350/212/202/345/245/217//346/227/266/345/272/217/346/230/240/345/260/204/346/250/241/346/235/277.json +427 -0
  238. package/plugins/fancy-story-builder/templates//350/212/202/345/245/217//347/253/240/350/212/202/347/273/206/347/272/262/346/250/241/346/235/277.json +34 -0
  239. package/plugins/fancy-story-builder/templates//350/212/202/345/245/217//347/253/240/350/212/202/350/247/204/345/210/222/346/250/241/346/235/277.json +24 -0
  240. package/plugins/fancy-story-builder/templates//350/212/202/345/245/217//350/212/202/345/245/217/345/217/202/346/225/260/346/250/241/346/235/277.json +27 -0
  241. package/plugins/fancy-story-builder/templates//350/241/200/350/202/211//344/270/226/347/225/214/350/247/202/350/247/204/345/210/231/346/250/241/346/235/277.json +168 -0
  242. package/plugins/fancy-story-builder/templates//350/241/200/350/202/211//345/205/263/351/224/256/351/201/223/345/205/267/346/250/241/346/235/277.json +184 -0
  243. package/plugins/fancy-story-builder/templates//350/241/200/350/202/211//345/205/266/344/273/226/345/256/236/344/275/223/346/250/241/346/235/277.json +62 -0
  244. package/plugins/fancy-story-builder/templates//350/241/200/350/202/211//345/206/262/347/252/201/346/250/241/346/235/277.json +131 -0
  245. package/plugins/fancy-story-builder/templates//350/241/200/350/202/211//345/211/247/346/203/205/346/250/241/346/235/277.json +85 -0
  246. package/plugins/fancy-story-builder/templates//350/241/200/350/202/211//345/212/277/345/212/233/346/250/241/346/235/277.json +103 -0
  247. package/plugins/fancy-story-builder/templates//350/241/200/350/202/211//345/234/260/347/202/271/346/250/241/346/235/277.json +68 -0
  248. package/plugins/fancy-story-builder/templates//350/241/200/350/202/211//347/273/223/345/261/200/346/250/241/346/235/277.json +142 -0
  249. package/plugins/fancy-story-builder/templates//350/241/200/350/202/211//350/247/222/350/211/262/346/250/241/346/235/277.json +292 -0
  250. package/plugins/fancy-story-builder/templates//351/252/250/346/236/266//345/205/263/347/263/273/346/250/241/346/235/277.json +266 -0
  251. package/plugins/fancy-story-builder/templates//351/252/250/346/236/266//345/256/236/344/275/223/346/250/241/346/235/277.json +336 -0
  252. package/plugins/fancy-story-builder/templates//351/252/250/346/236/266//345/261/202/347/272/247/346/250/241/346/235/277.json +65 -0
  253. package/plugins/fancy-story-builder/templates//351/252/250/346/236/266//346/241/206/346/236/266/346/250/241/346/235/277.json +308 -0
  254. package/plugins/fancy-story-builder/templates.js +1446 -0
  255. package/plugins/fancy-story-builder/wiki-references.js +540 -0
  256. package/plugins/fancy-story-builder/writing-driver.js +1388 -0
  257. package/plugins/fancy-topic/index.js +1057 -0
  258. package/plugins/fancy-topic/prompts/01-exploration-prompt.md +115 -0
  259. package/plugins/fancy-topic/scripts/save-suggestion.js +219 -0
  260. package/plugins/fancy-topic/scripts/select-topic.js +317 -0
  261. package/plugins/fancy-topic/templates.js +476 -0
  262. package/plugins/fancy-topic/tool-deploy.js +200 -0
  263. package/commands/bootstrap/index.js +0 -164
  264. package/commands/bootstrap/init-project.js +0 -121
  265. package/commands/scan/index.js +0 -283
  266. package/commands/scan/platforms/fanqie.js +0 -146
  267. package/commands/scan/platforms/jinjiang.js +0 -143
  268. package/commands/scan/platforms/qidian.js +0 -102
  269. package/commands/scan/platforms/qimao.js +0 -127
  270. package/commands/scan/scraper.js +0 -195
  271. package/infra.js +0 -160
@@ -0,0 +1,232 @@
1
+ # 故事设定分析规范
2
+
3
+ ## Page Types
4
+
5
+ | Type | Directory | Purpose |
6
+ |------|-----------|---------|
7
+ | 书 | wiki/书/ | 全书根对象 |
8
+ | 卷 | wiki/卷/ | 分卷 |
9
+ | 幕 | wiki/幕/ | 幕 |
10
+ | 章 | wiki/章/ | 章节元数据 |
11
+ | 细纲要求 | wiki/细纲要求/ | 一条细纲要求 |
12
+ | 场景 | wiki/场景/ | 场景 |
13
+ | 人物 | wiki/人物/ | 角色 |
14
+ | 其他实体 | wiki/其他实体/ | 灵魂/神魂/器灵等题材特有存在 |
15
+ | 势力 | wiki/势力/ | 势力 |
16
+ | 地点 | wiki/地点/ | 地点 |
17
+ | 道具 | wiki/道具/ | 关键道具 |
18
+ | 冲突 | wiki/冲突/ | 冲突 |
19
+ | 伏笔 | wiki/伏笔/ | 伏笔 |
20
+ | 高潮 | wiki/高潮/ | 高潮点 |
21
+ | 爽点 | wiki/爽点/ | 爽点 |
22
+ | 结局 | wiki/结局/ | 结局 |
23
+ | 世界观 | wiki/世界观/ | 世界观规则 |
24
+ | 主线 | wiki/主线/ | 主线 |
25
+ | 支线 | wiki/支线/ | 支线 |
26
+ | 关系 | wiki/关系/ | 角色关系 |
27
+ | 势力关系 | wiki/势力关系/ | 势力关系 |
28
+ | 势力成员 | wiki/势力成员/ | 势力成员关系 |
29
+ | 主题 | wiki/主题/ | 主题 |
30
+ | 角色弧光 | wiki/角色弧光/ | 角色弧光 |
31
+ | 角色状态 | wiki/角色状态/ | 角色状态快照 |
32
+ | 时间线 | wiki/时间线/ | 时间线事件 |
33
+ | 正文 | wiki/正文/ | 章节正文 |
34
+ | 来源 | wiki/来源/ | 来源摘要(辅助页) |
35
+ | 信息差 | wiki/信息差/ | 一条信息差及其知情范围 |
36
+ | 章节细纲 | wiki/细纲/ | 每章写作硬约束(时间线/伏笔/爽点/人物/信息差/必须与禁止) |
37
+
38
+ ---
39
+
40
+ ## 核心原则
41
+
42
+ 1. 2.0 项目里 `设定/00-baseline/`、`10-scale/`、`20-macro/`、`30-cast/`、`40-rhythm/`、`50-writing/` 下的阶段 JSON 是**事实源**;`wiki/` 是确定性派生视图。旧 1.x 项目仍以 `设定/raw/sources/骨架|血肉|节奏|写作/` 为事实源。
43
+ 2. 上表中的故事对象页由插件的 `schemaingest` 从阶段 JSON 生成。LLM **禁止**创建、改名、移动、删除这些对象页,也**禁止**手工补写它们的 frontmatter。
44
+ 3. LLM ingest 只做两件事:
45
+ - 为每个来源文件写一个 `wiki/来源/*.md` 摘要页(`type: 来源`);
46
+ - 写无法结构化归类的补充说明,但不得新增故事对象页。
47
+ 4. type 系统是封闭的:只能使用上表定义的值,禁止新增 type 或目录。
48
+ 5. 每条人物关系、势力关系、势力成员都生成**独立页面**,供 llm_wiki 做语义检查。关系类型 `kind` 是自由文本,**不设枚举**;插件只校验两端存在、不能自指、变化节点完整,关系是否自洽交给语义检查。
49
+ 6. 所有输出必须是中文。唯一例外:代码块、JSON、YAML 中的英文字段名。
50
+
51
+ ---
52
+
53
+ ## ID 规则
54
+
55
+ | Type | ID 格式 | 示例 |
56
+ |------|---------|------|
57
+ | 书 | `BOOK` | BOOK |
58
+ | 卷 | `V{NNN}` | V001 |
59
+ | 幕 | `A{NNN}` | A001 |
60
+ | 章 | `CH{NNN}` | CH001 |
61
+ | 细纲要求 | `RQ-CH{NNN}-{NN}` | RQ-CH001-01 |
62
+ | 场景 | `SCN-CH{NNN}-{NN}` | SCN-CH001-01 |
63
+ | 人物 | `C{NNN}` | C001 |
64
+ | 其他实体 | `O{NNN}` | O001 |
65
+ | 势力 | `F{NNN}` | F001 |
66
+ | 地点 | `L{NNN}` | L001 |
67
+ | 道具 | `P{NNN}` | P001 |
68
+ | 冲突 | `X{NNN}` | X001 |
69
+ | 伏笔 | `FS{NNN}` | FS001 |
70
+ | 高潮 | `CL{NNN}` | CL001 |
71
+ | 爽点 | `PL{NNN}` | PL001 |
72
+ | 结局 | `E{NNN}` | E001 |
73
+ | 世界观 | `SR{NNN}` / `R{NNN}` / `I{NNN}` | R001 |
74
+ | 主线 | `M{NNN}` | M001 |
75
+ | 支线 | `B{NNN}` | B001 |
76
+ | 关系 | `REL{NNN}` | REL001 |
77
+ | 势力关系 | `FREL{NNN}` | FREL001 |
78
+ | 势力成员 | `MEM{NNN}` | MEM001 |
79
+ | 主题 | `TH{NNN}` | TH001 |
80
+ | 角色弧光 | `ARC-C{NNN}-V{NNN}` | ARC-C001-V001 |
81
+ | 角色状态 | `CS-C{NNN}-CH{NNN}` | CS-C001-CH001 |
82
+ | 时间线 | `T{NNN}` | T001 |
83
+ | 正文 | `TXT-CH{NNN}` | TXT-CH001 |
84
+ | 来源 | `SRC-{slug}` | SRC-skeleton-entity |
85
+ | 信息差 | `IG-X{NNN}-{NN}` | IG-X001-01 |
86
+ | 章节细纲 | `OB-CH{NNN}` | OB-CH001 |
87
+
88
+ ID 一经生成必须稳定。后续阶段只能更新同一 ID 的正文或字段,不能换 ID 重建。
89
+
90
+ ---
91
+
92
+ ## 标题规则
93
+
94
+ 所有页面标题必须是:
95
+
96
+ ```text
97
+ <ID>_<中文标题>
98
+ ```
99
+
100
+ 例如:
101
+
102
+ - `BOOK_香火簿`
103
+ - `V001_除夕分岁`
104
+ - `CH001_第1章`
105
+ - `RQ-CH001-01_CH001 主功能`
106
+ - `C001_陆守拙`
107
+ - `F001_陆氏宗族`
108
+
109
+ ID 前缀用于排序和定位,后面的中文标题用于阅读。
110
+
111
+ ---
112
+
113
+ ## 链接规则
114
+
115
+ - 页面之间的关系只写在 frontmatter 的 `related` 里。
116
+ - `related` 必须使用 `[[ID|完整标题]]`:链接目标是**文件名里的 ID**,`|` 后面是给人看的标题。
117
+ 只写 `[[完整标题]]` 会让 llm_wiki 去找 `C001_陆守拙.md`,但实际文件是 `C001.md`,UI 会显示 “Related page not found”。
118
+
119
+ ```yaml
120
+ related:
121
+ - "[[V001|V001_除夕分岁]]"
122
+ - "[[CH001|CH001_第1章]]"
123
+ - "[[C001|C001_陆守拙]]"
124
+ ```
125
+
126
+ - 不要写 `related: [F001]`,也不要写 `related: [陆氏宗族]`。
127
+ - 正文不要再生成“关系网 / 上级 / 下级 / 相邻”这类区块。
128
+ 如果正文确实需要内联链接,只使用 `[[ID]]` 占位符作为覆盖锚点,不要用关系表表达关系。
129
+ - 每个页面至少要链接到一个相关页面;所有页面最终要能连成一张网,不能有孤立页面。
130
+
131
+ ### `related` 应该包含什么
132
+
133
+ | 页面类型 | 建议链接到 |
134
+ |----------|------------|
135
+ | 书 | 卷、主题、主线、世界观、势力、地点、冲突、来源索引 |
136
+ | 卷 | 书、幕、相邻卷 |
137
+ | 幕 | 卷、章、相邻幕 |
138
+ | 章 | 幕、卷、细纲要求、章节细纲、场景、正文、伏笔、高潮、爽点、结局、时间线、相邻章 |
139
+ | 细纲要求 | 章、同章相邻要求 |
140
+ | 场景 | 章、地点、人物、冲突、同章相邻场景 |
141
+ | 正文 | 章、本章细纲要求、相邻正文 |
142
+ | 人物 | 势力、关系、势力成员、角色弧光、角色状态、道具、其他实体、相关章节 |
143
+ | 势力 | 书、人物、势力成员、势力关系 |
144
+ | 地点 | 书、场景、冲突 |
145
+ | 道具 | 拥有者人物/势力、相关场景或章节 |
146
+ | 冲突 | 书、人物、场景、时间线 |
147
+ | 伏笔 | 埋设章、回收章、相关人物 |
148
+ | 高潮 | 章、人物 |
149
+ | 爽点 | 章 |
150
+ | 结局 | 章、人物、相关伏笔 |
151
+ | 世界观 | 书、相关势力/人物/章节 |
152
+ | 主线 | 书、支线、时间线 |
153
+ | 支线 | 主线、相关章节、主角 |
154
+ | 其他实体 | 相关人物、其他实体、关系页 |
155
+ | 关系 | from 人物、to 人物 |
156
+ | 势力关系 | from 势力、to 势力 |
157
+ | 势力成员 | 人物、势力 |
158
+ | 主题 | 书、相关卷 |
159
+ | 角色弧光 | 人物、卷、角色状态 |
160
+ | 角色状态 | 人物、章、地点、关系 |
161
+ | 时间线 | 章、人物、地点、冲突、主线/支线 |
162
+ | 来源 | 来源索引、相关对象页 |
163
+ | 信息差 | 冲突、知情/不知情人物、创建章、解决章 |
164
+ | 章节细纲 | 章、卷、幕、视角人物、出场人物、地点、冲突、伏笔、高潮、爽点、信息差 |
165
+
166
+ 同类型页面(卷、幕、章、细纲要求、场景、正文、时间线等)要互相链接相邻项,形成有序链。
167
+
168
+ ---
169
+
170
+ ## 正文要求
171
+
172
+ - 故事对象页的正文由插件从 JSON 生成,LLM 不要改写;需要补充说明时写入 `来源` 摘要页或在对话中说明。
173
+ - 正文不要生成“关系网 / 上级 / 下级 / 相邻”区块;关系只放在 `related` 里。
174
+ - 来源摘要页正文第一块必须是 `## 来源`,列出源文件、生成时间和摘要;`related` 至少包含 `[[SRC-INDEX_来源索引]]` 和一个相关对象页。
175
+ - 禁止空页、占位页、只有标题的页面。
176
+ - 禁止把同一对象拆成多个 type 或多个目录的重复页。
177
+
178
+ ---
179
+
180
+ ## 来源摘要页(type: 来源)
181
+
182
+ 来源摘要页是 LLM ingest 唯一可以创建的类型,用于记录“这个源文件讲了什么”。`SRC-INDEX` 由插件维护,LLM 不要创建或改写它。来源页没有 schema link 字段,但仍需通过 `related` 接入关系网。
183
+
184
+ ```markdown
185
+ ---
186
+ type: 来源
187
+ id: SRC-skeleton-entity
188
+ title: SRC-skeleton-entity_骨架-实体
189
+ source_file: raw/sources/骨架/实体.json
190
+ related:
191
+ - "[[SRC-INDEX|来源索引]]"
192
+ - "[[BOOK|香火簿]]"
193
+ - "[[C001|C001_陆守拙]]"
194
+ - "[[F001|F001_陆氏宗族]]"
195
+ created: 2026-01-01
196
+ ---
197
+
198
+ ## 来源
199
+
200
+ | 字段 | 值 |
201
+ |------|----|
202
+ | 来源文件 | raw/sources/骨架/实体.json |
203
+ | 生成时间 | 2026-01-01 12:00:00 |
204
+
205
+ ## 摘要
206
+
207
+ 用中文概括该来源文件的结构、数量和需要人工关注的问题。
208
+ ```
209
+
210
+ ---
211
+
212
+ ## 禁止行为
213
+
214
+ 1. 禁止创建上表之外的 type 或目录。
215
+ 2. 禁止手工创建/修改故事对象页;对象页只由 `schemaingest` 写入。
216
+ 3. 禁止用标题、文件名或路径代替 ID 填 link 字段。
217
+ 4. 禁止生成“无”“待补充”这类占位页。
218
+ 5. 禁止跳过来源摘要;每个被 ingest 的源文件都应有对应的 `来源` 页。
219
+ 6. 禁止产生孤立页面或无出站链接页面。
220
+
221
+ ---
222
+
223
+ ## 2.0 阶段门禁与同步
224
+
225
+ - `10-scale` 不同步 wiki、不跑 lint:它只有数字,没有页面。
226
+ - `20-macro` 默认不跑 lint:此时还没有人物/势力/地点页面。
227
+ - `30-cast` 是第一次正式同步点;同步时必须带 `20-macro` 闭包,否则人物页链接的势力/地点会 broken-link。
228
+ - `40-rhythm` 同步 `20-macro + 30-cast + 40-rhythm` 闭包后才跑 schema/link lint。
229
+ - semantic lint 只在 `40-rhythm` PASSED 后开启,避免把“还没写到”误判成矛盾。
230
+ - `schema.json` 的全局 `minimums` 保持为空;阶段最低页数由插件按 `stage_minimums` 检查。
231
+
232
+ 关系类型 `kind` 不设枚举;每条关系独立成页,页面正文的“语义验证点”交给 llm_wiki 语义检查。