@cloud411716/fancy-webnovel 1.0.45 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/client.js +183 -0
  2. package/cordis.patch.yml +0 -14
  3. package/index.js +21 -37
  4. package/lib/chinese-num.js +111 -0
  5. package/lib/deployed-state.js +141 -0
  6. package/lib/error-codes.js +104 -0
  7. package/lib/infra.js +569 -0
  8. package/lib/llm-wiki.js +109 -0
  9. package/lib/safe-rm.js +94 -0
  10. package/lib/scraper-utils.js +165 -0
  11. package/package.json +37 -5
  12. package/plugins/fancy-analyze/command-input.js +65 -0
  13. package/plugins/fancy-analyze/index.js +973 -0
  14. package/plugins/fancy-analyze/schema-analyze.md +379 -0
  15. package/plugins/fancy-analyze/schema-write.md +178 -0
  16. package/plugins/fancy-analyze/scripts/split_source.js +292 -0
  17. package/plugins/fancy-analyze/summary-progress.js +431 -0
  18. package/plugins/fancy-analyze/templates.js +881 -0
  19. package/plugins/fancy-bootstrap/index.js +168 -0
  20. package/plugins/fancy-bootstrap/scripts/init.js +143 -0
  21. package/plugins/fancy-bootstrap/scripts/path-utils.js +21 -0
  22. package/plugins/fancy-bootstrap/templates.js +54 -0
  23. package/plugins/fancy-import/import-core.js +1118 -0
  24. package/plugins/fancy-import/import-driver.js +581 -0
  25. package/plugins/fancy-import/index.js +730 -0
  26. package/plugins/fancy-import/prompts/01-import-prompt.md +106 -0
  27. package/plugins/fancy-import/templates.js +49 -0
  28. package/plugins/fancy-scan/index.js +319 -0
  29. package/plugins/fancy-scan/scripts/run-scan.js +520 -0
  30. package/plugins/fancy-scan/scripts/scrapers/fanqie-rank-scraper.js +794 -0
  31. package/plugins/fancy-scan/scripts/scrapers/jjwxc-rank-scraper.js +339 -0
  32. package/plugins/fancy-scan/scripts/scrapers/qimao-rank-scraper.js +611 -0
  33. package/plugins/fancy-scan/templates.js +295 -0
  34. package/plugins/fancy-story-builder/deploy-manifest.js +239 -0
  35. package/plugins/fancy-story-builder/deslop-driver.js +821 -0
  36. package/plugins/fancy-story-builder/flesh-output.js +155 -0
  37. package/plugins/fancy-story-builder/index.js +3152 -0
  38. package/plugins/fancy-story-builder/prompts/01-skeleton-prompt.md +553 -0
  39. package/plugins/fancy-story-builder/prompts/02-flesh-prompt.md +540 -0
  40. package/plugins/fancy-story-builder/prompts/03-rhythm-prompt.md +504 -0
  41. package/plugins/fancy-story-builder/prompts/04-writing-prompt.md +188 -0
  42. package/plugins/fancy-story-builder/prompts/05-deslop-prompt.md +96 -0
  43. package/plugins/fancy-story-builder/purpose-template.md +107 -0
  44. package/plugins/fancy-story-builder/references/formulas-rhythm.json +302 -0
  45. package/plugins/fancy-story-builder/references/formulas-skeleton.json +229 -0
  46. package/plugins/fancy-story-builder/references/glossary.md +585 -0
  47. package/plugins/fancy-story-builder/references/index.md +490 -0
  48. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/00-index.md +174 -0
  49. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/01-scene.md +150 -0
  50. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/02-chapter-workflow.md +99 -0
  51. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/03-opening-chapter.md +104 -0
  52. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/04-dialogue-mastery.md +274 -0
  53. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/05-genre-formulas.md +432 -0
  54. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/06-tone-ensemble.md +259 -0
  55. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/07-ledger-audit.md +222 -0
  56. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/08-diagnosis-revision.md +205 -0
  57. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/09-reading-power.md +135 -0
  58. package/plugins/fancy-story-builder/references//345/206/231/344/275/234/346/214/207/345/257/274/10-deslop.md +129 -0
  59. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/00-index.md +98 -0
  60. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/01-upgrade-rhythm.md +300 -0
  61. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/02-arc-rhythm.md +168 -0
  62. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/03-highpoint-hooks.md +189 -0
  63. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/04-satisfaction.md +226 -0
  64. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/05-foreshadow-density.md +195 -0
  65. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/06-chapter-outline.md +226 -0
  66. package/plugins/fancy-story-builder/references//350/212/202/345/245/217/346/214/207/345/257/274/07-audit.md +163 -0
  67. package/plugins/fancy-story-builder/references//350/241/200/350/202/211/346/214/207/345/257/274/00-index.md +100 -0
  68. package/plugins/fancy-story-builder/references//350/241/200/350/202/211/346/214/207/345/257/274/01-character.md +239 -0
  69. package/plugins/fancy-story-builder/references//350/241/200/350/202/211/346/214/207/345/257/274/02-worldbuilding.md +245 -0
  70. package/plugins/fancy-story-builder/references//350/241/200/350/202/211/346/214/207/345/257/274/03-relations.md +181 -0
  71. package/plugins/fancy-story-builder/references//350/241/200/350/202/211/346/214/207/345/257/274/04-emotion-methods.md +286 -0
  72. package/plugins/fancy-story-builder/references//350/241/200/350/202/211/346/214/207/345/257/274/05-audit.md +177 -0
  73. package/plugins/fancy-story-builder/references//351/252/250/346/236/266/346/214/207/345/257/274/00-index.md +91 -0
  74. package/plugins/fancy-story-builder/references//351/252/250/346/236/266/346/214/207/345/257/274/01-positioning.md +208 -0
  75. package/plugins/fancy-story-builder/references//351/252/250/346/236/266/346/214/207/345/257/274/02-packaging.md +135 -0
  76. package/plugins/fancy-story-builder/references//351/252/250/346/236/266/346/214/207/345/257/274/03-entities.md +305 -0
  77. package/plugins/fancy-story-builder/references//351/252/250/346/236/266/346/214/207/345/257/274/04-conflict.md +328 -0
  78. package/plugins/fancy-story-builder/references//351/252/250/346/236/266/346/214/207/345/257/274/05-quota.md +187 -0
  79. package/plugins/fancy-story-builder/references//351/252/250/346/236/266/346/214/207/345/257/274/06-audit.md +142 -0
  80. package/plugins/fancy-story-builder/rhythm-output.js +140 -0
  81. package/plugins/fancy-story-builder/schema-setting.md +324 -0
  82. package/plugins/fancy-story-builder/scripts/ai-patterns.js +619 -0
  83. package/plugins/fancy-story-builder/scripts/check-guide-compliance.js +289 -0
  84. package/plugins/fancy-story-builder/scripts/content-quality.js +413 -0
  85. package/plugins/fancy-story-builder/scripts/deslop-validate.js +143 -0
  86. package/plugins/fancy-story-builder/scripts/error-classes.js +112 -0
  87. package/plugins/fancy-story-builder/scripts/flesh-validate.js +1189 -0
  88. package/plugins/fancy-story-builder/scripts/formula-engine.js +112 -0
  89. package/plugins/fancy-story-builder/scripts/graph-utils.js +1385 -0
  90. package/plugins/fancy-story-builder/scripts/label-coverage.js +171 -0
  91. package/plugins/fancy-story-builder/scripts/prompt-drift-check.js +441 -0
  92. package/plugins/fancy-story-builder/scripts/reading-power.js +298 -0
  93. package/plugins/fancy-story-builder/scripts/rhythm-validate.js +1216 -0
  94. package/plugins/fancy-story-builder/scripts/semantic-lint.js +377 -0
  95. package/plugins/fancy-story-builder/scripts/skeleton-quota.js +145 -0
  96. package/plugins/fancy-story-builder/scripts/skeleton-validate.js +1832 -0
  97. package/plugins/fancy-story-builder/scripts/stage-batches.js +1371 -0
  98. package/plugins/fancy-story-builder/scripts/stage-contract.js +417 -0
  99. package/plugins/fancy-story-builder/scripts/upstream-query.js +198 -0
  100. package/plugins/fancy-story-builder/scripts/writing-rules.js +167 -0
  101. package/plugins/fancy-story-builder/scripts/writing-validate.js +682 -0
  102. package/plugins/fancy-story-builder/skeleton-output.js +199 -0
  103. package/plugins/fancy-story-builder/stage-driver.js +1049 -0
  104. 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 +204 -0
  105. 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
  106. 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
  107. 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
  108. 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 +66 -0
  109. 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 +76 -0
  110. 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 +72 -0
  111. 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 +37 -0
  112. 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 +53 -0
  113. 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 +40 -0
  114. 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 +79 -0
  115. 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 +132 -0
  116. 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 +133 -0
  117. 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 +160 -0
  118. 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
  119. 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 +134 -0
  120. package/plugins/fancy-story-builder/templates.js +1248 -0
  121. package/plugins/fancy-story-builder/wiki-references.js +204 -0
  122. package/plugins/fancy-story-builder/writing-driver.js +1061 -0
  123. package/plugins/fancy-topic/index.js +704 -0
  124. package/plugins/fancy-topic/scripts/select-topic.js +274 -0
  125. package/plugins/fancy-topic/templates.js +373 -0
  126. package/commands/bootstrap/index.js +0 -160
  127. package/commands/bootstrap/init-project.js +0 -121
  128. package/commands/scan/index.js +0 -275
  129. package/commands/scan/platforms/fanqie.js +0 -146
  130. package/commands/scan/platforms/jinjiang.js +0 -143
  131. package/commands/scan/platforms/qidian.js +0 -102
  132. package/commands/scan/platforms/qimao.js +0 -127
  133. package/commands/scan/scraper.js +0 -195
  134. package/infra.js +0 -160
@@ -0,0 +1,204 @@
1
+ /**
2
+ * wiki-references.js
3
+ * 对标参考(对标/wiki/)的目录清单与注入文本
4
+ *
5
+ * 抽出来单独成模块的理由:这段逻辑决定了"哪些对标文件真的可以读",
6
+ * 必须能被直接测。放在 index.js 里只能靠跑整个插件来覆盖,测不动。
7
+ */
8
+ import { existsSync } from 'fs';
9
+ import { join } from 'path';
10
+
11
+ // 各目录的作用说明(注入提示词时用)
12
+ export const DIRECTORY_DESCRIPTIONS = {
13
+ '叙事视角': '叙事视角:分析视角选择和切换策略',
14
+ '章节结构': '章节结构:分析章节的起承转合结构',
15
+ '节奏韵律': '节奏韵律:分析叙事节奏的张弛控制',
16
+ '对话技巧': '对话技巧:分析对话中的言外之意和潜台词',
17
+ '描写技法': '描写技法:分析环境、动作,心理描写的技巧',
18
+ '伏笔回收': '伏笔回收:分析伏笔的埋设和回收技巧',
19
+ '世界观构建': '世界观构建:分析世界观设定的呈现方式',
20
+ '角色弧光': '角色弧光:分析角色在不同章节的成长弧线变化',
21
+ '情节机制': '情节机制:分析情节推进的内在逻辑',
22
+ '开头钩子': '开头钩子:分析开篇吸引读者的技巧',
23
+ '结尾收束': '结尾收束:分析章节结尾的收束技法',
24
+ '句式变化': '句式变化:分析句子的长短和节奏变化',
25
+ '段落布局': '段落布局:分析段落的疏密和布局',
26
+ '场景转换': '场景转换:分析场景切换的技巧',
27
+ '情绪渲染': '情绪渲染:分析情感氛围的营造方式',
28
+ '张力构建': '张力构建:分析冲突和悬念的构建方式',
29
+ '来源摘要': '来源摘要:章节的完整分析和要点提炼'
30
+ };
31
+
32
+ // 各阶段对应的 wiki 目录
33
+ //
34
+ // 映射依据:**这一层产物要回答什么问题**,再挑对标技法里对得上的那些。
35
+ // 判据是"样本里的那招能不能直接指导本层的一个字段",不是"主题沾边"。
36
+ //
37
+ // 骨架:有哪些实体、怎么连、有多少、分几卷几幕
38
+ // → 情节机制(主线支线怎么构成)/ 张力构建(冲突与门槛怎么叠)
39
+ // → 伏笔回收(伏笔清单怎么埋)/ 角色弧光(成长型支线的走向)
40
+ // → 结尾收束(结局怎么设计)/ 世界观构建(规则与势力怎么成体系)
41
+ // 血肉:实体长什么样(角色卡、世界观、关系、情绪)
42
+ // → 世界观构建 / 描写技法 / 对话技巧 / 场景转换 / 情绪渲染
43
+ // → 角色弧光 / 伏笔回收 / 情节机制
44
+ // 节奏:什么时间发生(升级、弧线、高潮钩子、爽点、伏笔密度、章节切分)
45
+ // → 节奏韵律 / 张力构建 / 章节结构 / 伏笔回收 / 情绪渲染
46
+ // → 开头钩子 / 结尾收束 / 情节机制 / 角色弧光
47
+ // 写作:具体怎么写(场景、章节工作流、开篇、对话、句式、语气)
48
+ // → 开头钩子 / 结尾收束 / 对话技巧 / 描写技法 / 段落布局 / 句式变化
49
+ // → 叙事视角 / 场景转换 / 节奏韵律
50
+ export const PHASE_DIRECTORIES = {
51
+ skeleton: ['世界观构建', '情节机制', '张力构建', '伏笔回收', '角色弧光', '结尾收束'],
52
+ flesh: ['世界观构建', '描写技法', '对话技巧', '场景转换', '情绪渲染', '角色弧光', '伏笔回收', '情节机制'],
53
+ rhythm: ['节奏韵律', '张力构建', '章节结构', '伏笔回收', '情绪渲染', '开头钩子', '结尾收束', '情节机制', '角色弧光'],
54
+ // 写作阶段以前没有对应键 → readWikiReferences 会退回 skeleton 那套,
55
+ // 结果是写章节时拿到的是骨架阶段的目录(角色弧光/伏笔回收…),
56
+ // 真正该读的对话、句式、段落反而一个都没有(2026-10-27 查到)。
57
+ writing: ['开头钩子', '结尾收束', '对话技巧', '描写技法', '段落布局', '句式变化', '叙事视角', '场景转换', '节奏韵律'],
58
+ // 去味阶段不注入对标参考:改写的是"像不像人话",不是"写得好不好",
59
+ // 拿别人的写法当参照反而会把旧稿的毛病一起抄进去。
60
+ deslop: [],
61
+ analyze: ['角色弧光', '伏笔回收', '结尾收束', '张力构建', '情节机制', '开头钩子', '节奏韵律', '世界观构建', '章节结构', '情绪渲染', '对话技巧', '场景转换', '描写技法']
62
+ };
63
+
64
+ /**
65
+ * 各阶段的"插件指导目录"与本阶段重点。
66
+ *
67
+ * 用来在提示词里把两层参考分开讲清楚:
68
+ * references/<阶段>指导/ = 高维方法论(这一层该怎么设计)
69
+ * 对标/wiki/ = 市场验证过的落地样本(某招在成品里怎么生效)
70
+ */
71
+ export const PHASE_GUIDANCE = {
72
+ skeleton: {
73
+ guideDir: 'references/骨架指导',
74
+ focus: '有哪些实体、实体怎么连、有多少、分几卷几幕'
75
+ },
76
+ flesh: {
77
+ guideDir: 'references/血肉指导',
78
+ focus: '实体长什么样:目标、缺陷、资源、关系、情绪怎么落到实处'
79
+ },
80
+ rhythm: {
81
+ guideDir: 'references/节奏指导',
82
+ focus: '什么时间发生:升级、弧线、高潮钩子、爽点、伏笔密度、章节怎么切'
83
+ },
84
+ writing: {
85
+ guideDir: 'references/写作指导',
86
+ focus: '具体怎么写:场景、章节工作流、开篇、对话、句式、语气'
87
+ }
88
+ };
89
+
90
+ /**
91
+ * 找出当前阶段真正可读的对标总结文件。
92
+ *
93
+ * 只认 `<目录名>-总结.md`;目录在但总结文件不在的,记为 missing。
94
+ *
95
+ * @returns {{ available: Array<{dir:string, path:string}>, missing: string[] }}
96
+ */
97
+ export function collectWikiReferences(projectRoot, phase = 'skeleton') {
98
+ const wikiDir = join(projectRoot, '对标', 'wiki');
99
+ const phaseDirs = PHASE_DIRECTORIES[phase] || PHASE_DIRECTORIES.skeleton;
100
+ const available = [];
101
+ const missing = [];
102
+ for (const dir of Array.from(phaseDirs).sort()) {
103
+ const summaryFile = join(wikiDir, dir, dir + '-总结.md');
104
+ if (existsSync(summaryFile)) {
105
+ available.push({ dir, path: '对标/wiki/' + dir + '/' + dir + '-总结.md' });
106
+ } else {
107
+ missing.push(dir);
108
+ }
109
+ }
110
+ return { available, missing };
111
+ }
112
+
113
+ /**
114
+ * 生成注入提示词的对标参考文本。
115
+ *
116
+ * 只注入**实际存在**的文件;缺失的目录明确告知"没有",避免 LLM 去读不存在的
117
+ * 路径后自行编造内容。
118
+ */
119
+ export function readWikiReferences(projectRoot, phase = 'skeleton') {
120
+ const wikiDir = join(projectRoot, '对标', 'wiki');
121
+ if (!existsSync(wikiDir)) return '';
122
+
123
+ const { available, missing } = collectWikiReferences(projectRoot, phase);
124
+ if (available.length === 0 && missing.length === 0) return '';
125
+
126
+ const output = [];
127
+ output.push('## 对标参考(本次可读的对标分析文件)\n\n');
128
+ for (const a of available) {
129
+ const desc = DIRECTORY_DESCRIPTIONS[a.dir] || '写作技法分析';
130
+ output.push('- `' + a.path + '`:' + desc + '\n');
131
+ }
132
+ if (missing.length > 0) {
133
+ output.push('\n**以下对标目录没有对应的总结文件,本阶段请不要引用它们**:' + missing.join('、') + '\n');
134
+ }
135
+ return output.join('');
136
+ }
137
+
138
+ /**
139
+ * 生成"参考分层"说明段,注入到各阶段提示词的参考小节。
140
+ *
141
+ * ## 为什么要单独生成这一段
142
+ *
143
+ * 插件自带的 `references/<阶段>指导/` 和项目里的 `对标/wiki/` 是**两种性质
144
+ * 完全不同**的参考,模型很容易混着用:
145
+ *
146
+ * - `references/<阶段>指导/` = **高维方法论**:这一层该怎么设计的通则
147
+ * (数量怎么定、实体卡写什么、节奏怎么排)。是"怎么想"。
148
+ * - `对标/wiki/<技法>/<技法>-总结.md` = **市场验证过的落地样本**:
149
+ * 从真实商业小说里提炼的"某招在成品里怎么生效"。是"怎么落地"。
150
+ *
151
+ * 混用的后果不是文风问题,是**设定污染**:拿别人的成品当规则 → 照抄专名、
152
+ * 情节、句子、金手指 → 撞设定、涉嫌抄袭。所以这一段必须把两层的边界、
153
+ * 优先级和红线一次讲清楚,并给出"本阶段该读哪几个"的明确清单。
154
+ *
155
+ * ## 为什么还必须注入到批次提示词
156
+ *
157
+ * 以前这份对标参考只挂在**系统提示词**上,而系统提示词那几个生成函数
158
+ * (generateSkeletonSystemPrompt 等)**从来没有被调用** ——
159
+ * 真正派给模型的是每批的批次提示词。结果就是:对标参考一次都没到过模型手里
160
+ * (tt5 实测:39 条骨架批次指令里 0 条含"对标",整个会话 0 次"对标参考")。
161
+ *
162
+ * @param {string} projectRoot 项目根目录
163
+ * @param {string} phase 阶段(skeleton / flesh / rhythm / writing)
164
+ * @returns {string} 注入文本(没有对标目录时返回空串)
165
+ */
166
+ export function renderBenchmarkGuidance(projectRoot, phase = 'skeleton') {
167
+ const guide = PHASE_GUIDANCE[phase];
168
+ if (!guide) return '';
169
+ const wikiDir = join(projectRoot, '对标', 'wiki');
170
+ if (!existsSync(wikiDir)) return '';
171
+
172
+ const { available, missing } = collectWikiReferences(projectRoot, phase);
173
+
174
+ const lines = [];
175
+ lines.push('### 参考分三层,各读各的,别混\n');
176
+ lines.push('| 层 | 位置 | 是什么 | 怎么用 |');
177
+ lines.push('|---|---|---|---|');
178
+ lines.push('| 硬契约 | `模板/`、`references/glossary.md` | 字段、枚举、id 规则 —— 校验器就按它判 | **必读**,动笔前先对齐 |');
179
+ lines.push('| 高维方法论 | `' + guide.guideDir + '/` | ' + guide.focus + '的通则 | **必读**,按本批文件选篇 |');
180
+ lines.push('| 市场验证样本 | `对标/wiki/` 下的 `<技法名>-总结.md` | 真实商业小说里某一招怎么生效 | **选读**,用来校准手法 |');
181
+ lines.push('');
182
+ lines.push('**读法**:先读 `' + guide.guideDir + '/`(决定"该怎么想"),再按需翻对标样本(校准"怎么落地")。');
183
+ lines.push('');
184
+ lines.push('**红线**:对标样本是**别人的成品**,只学结构与手法 —— '
185
+ + '禁止照搬专名、情节、句子、金手指设定;'
186
+ + '样本里的角色名/地名/机构名一律不许进本项目。');
187
+ lines.push('');
188
+
189
+ if (available.length) {
190
+ lines.push('**本阶段可读的对标文件**(读哪些由你判断,读后不重读):\n');
191
+ for (const a of available) {
192
+ const desc = DIRECTORY_DESCRIPTIONS[a.dir] || '写作技法分析';
193
+ lines.push('- `' + a.path + '` —— ' + desc);
194
+ }
195
+ lines.push('');
196
+ } else {
197
+ lines.push('**本阶段没有可读的对标文件**(对标/wiki 下还没有总结文件):不要凭空编造"对标分析",照插件指导写。\n');
198
+ }
199
+ if (missing.length) {
200
+ lines.push('**以下对标目录本阶段没有总结文件,不要引用**:' + missing.join('、'));
201
+ lines.push('');
202
+ }
203
+ return lines.join('\n');
204
+ }