@cloud411716/fancy-webnovel 4.30.7 → 4.30.8
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.
|
@@ -25,21 +25,21 @@
|
|
|
25
25
|
- 查询脚本:`{{QUERY_SCRIPT}}`
|
|
26
26
|
- 校验脚本:`{{VALIDATE_SCRIPT}}`
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
**2.1 世界母体**
|
|
29
29
|
|
|
30
30
|
{{WORLD_BLOCK}}
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
**2.2 风格锁定**
|
|
33
33
|
|
|
34
34
|
{{STYLE_BLOCK}}
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
- 风格块会标明主命名风格、辅助命名风格和结构参考。只以主命名风格的 `naming_mode` 和 `generation_chain` 为准;结构风格不参与命名。世界母体和 kind 的硬规则优先。
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
**2.3 本批 kind 的专属要求**
|
|
39
39
|
|
|
40
40
|
{{KIND_BLOCK}}
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
**2.4 本批题材适配**
|
|
43
43
|
|
|
44
44
|
{{GENRE_BLOCK}}
|
|
45
45
|
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
|
|
53
53
|
不是“一个名词 + 一句解释”。是读者读完名字会停一下,读完 note 会想:
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
“如果我遇到它,我会怎么做?”
|
|
56
56
|
|
|
57
57
|
### 3.2 七维评分
|
|
58
58
|
|
package/package.json
CHANGED
|
@@ -96,7 +96,7 @@ export function selectGenreClusters(genres = []) {
|
|
|
96
96
|
* 只渲染本次相关题材簇。没有命中时给一段通用兜底,不输出全部题材规则。
|
|
97
97
|
*/
|
|
98
98
|
export function renderGenreBlock(genres = []) {
|
|
99
|
-
const prefix = '
|
|
99
|
+
const prefix = '题材块只提供词汇、俗套黑名单和可用方向,优先级低于世界母体、kind 硬规则和主命名风格;不要用题材公式覆盖世界母体。';
|
|
100
100
|
const selected = [...new Set((Array.isArray(genres) ? genres : []).map(clean).filter(Boolean))];
|
|
101
101
|
if (!selected.length) return prefix + '\n\n(本次未限制题材;按世界母体和本批 kind 要求执行。)';
|
|
102
102
|
const clusters = selectGenreClusters(selected);
|
|
@@ -106,7 +106,7 @@ export function renderGenreBlock(genres = []) {
|
|
|
106
106
|
const lines = [prefix, '', '本次题材:' + selected.join('、')];
|
|
107
107
|
for (const cluster of clusters) {
|
|
108
108
|
lines.push('');
|
|
109
|
-
lines.push('
|
|
109
|
+
lines.push('#### ' + cluster.title);
|
|
110
110
|
lines.push('- 创意公式:' + cluster.formula);
|
|
111
111
|
lines.push('- 优先来源库:' + cluster.source_blocks.join('、'));
|
|
112
112
|
lines.push('- 具体来源:' + cluster.sources.join('、'));
|
|
@@ -1161,7 +1161,7 @@ export async function runGenerationWithPlan(ctx, invocation, session, taskList,
|
|
|
1161
1161
|
}
|
|
1162
1162
|
const styleBlock = stylePromptBlock(styleRegistry.styles, selectedStyles, { genres });
|
|
1163
1163
|
const styleRules = selectedStyles.length
|
|
1164
|
-
? '本次使用账号风格:' + styleSummaryText(selectedStyles) + '
|
|
1164
|
+
? '本次使用账号风格:' + styleSummaryText(selectedStyles) + ';世界母体和 kind 硬规则优先,风格只决定写法。'
|
|
1165
1165
|
: '未指定账号风格(执行通用创作标准)。';
|
|
1166
1166
|
const styleSummary = styleBatchSummary(selectedStyles);
|
|
1167
1167
|
|
|
@@ -553,12 +553,13 @@ export function stylePromptBlock(styles, selected, { genres = [] } = {}) {
|
|
|
553
553
|
if (list.length) anchors.push(` - \`${kind}\`:${list.join('、')}`);
|
|
554
554
|
}
|
|
555
555
|
if (anchors.length) {
|
|
556
|
-
lines.push('- 名字锚点(只校准命名风格,不抄词):');
|
|
556
|
+
lines.push('- ' + (isNaming ? '名字锚点(只校准命名风格,不抄词):' : '结构锚点(不参与命名):'));
|
|
557
557
|
lines.push(...anchors);
|
|
558
|
+
lines.push(' - 只校准写法;与世界母体冲突时以世界母体为准,不要复用锚点里的名词。');
|
|
558
559
|
}
|
|
559
560
|
const concepts = styleConceptExamples(style);
|
|
560
561
|
if (concepts.length) {
|
|
561
|
-
lines.push('- 概念示例(只校准张力,不抄设定):');
|
|
562
|
+
lines.push('- ' + (isNaming ? '概念示例(只校准张力,不抄设定):' : '结构示例(不参与命名):'));
|
|
562
563
|
for (const example of concepts.slice(0, 4)) lines.push(' - ' + example);
|
|
563
564
|
}
|
|
564
565
|
const anti = dedupeAntiExamples(style.anti_examples);
|
|
@@ -586,11 +587,22 @@ export function styleSummaryText(styles) {
|
|
|
586
587
|
}
|
|
587
588
|
|
|
588
589
|
export function styleBatchSummary(styles) {
|
|
589
|
-
|
|
590
|
+
const list = Array.isArray(styles) ? styles : [];
|
|
591
|
+
const naming = list.filter((style) => style.style_type === 'naming');
|
|
592
|
+
const primary = naming[0] || null;
|
|
593
|
+
return list.map((style) => {
|
|
594
|
+
const role = style.style_type === 'structure'
|
|
595
|
+
? '结构参考(不参与命名)'
|
|
596
|
+
: primary && style.style_key === primary.style_key
|
|
597
|
+
? '主命名风格'
|
|
598
|
+
: style.style_type === 'naming'
|
|
599
|
+
? '辅助命名风格'
|
|
600
|
+
: '非命名参考';
|
|
590
601
|
const rules = style.naming_rules || {};
|
|
591
602
|
const bits = [
|
|
592
|
-
`- ${style.style_key}(${style.style_name}):${String(style.dna || '').replace(/[。;;]+$/u, '')}`,
|
|
603
|
+
`- [${role}] ${style.style_key}(${style.style_name}):${String(style.dna || '').replace(/[。;;]+$/u, '')}`,
|
|
593
604
|
];
|
|
605
|
+
if (style.style_type === 'naming') bits.push('命名模式 `' + (style.naming_mode || 'image') + '`');
|
|
594
606
|
if (rules.length) bits.push(`长度 ${Array.isArray(rules.length) ? rules.length.join('–') + ' 字' : rules.length}`);
|
|
595
607
|
if (rules.forbidden && rules.forbidden.length) bits.push('禁用 ' + rules.forbidden.join('、'));
|
|
596
608
|
return bits.join(';');
|
|
@@ -92,6 +92,10 @@ function compactRules(genres, queryScript, workspace, sourceFixed = 'builtin') {
|
|
|
92
92
|
'- 只写本批指定的一个 kind;不要把其它 kind 混进同一个文件。',
|
|
93
93
|
'- 每条必须独立、具体、可复用;拒绝“火红、耀眼、神秘、强大”这类空泛词。',
|
|
94
94
|
'- 命名类必须有具体锚点;拒绝“复原眼、章眼、旧仓单、神秘剑、黑色长刀”这类废名。',
|
|
95
|
+
'- 好素材 = 熟悉锚点 × 一处不对劲 × 未解问题 × 会咬人的后果;只停在“规则必须遵守”视为废稿。',
|
|
96
|
+
'- 单条素材最多 1–2 个来源库;不要多源大杂烩,不要直接照搬名句/神名/塔罗/七宗罪标签。',
|
|
97
|
+
'- 成套体系(七宗罪/塔罗/四体液/十二宫)整组使用;不要零散单抽。',
|
|
98
|
+
'- 名字是载体上的残留/边界,不是流程说明书;现实流程词只能做底层逻辑。',
|
|
95
99
|
'- 字段只能是 id / kind / name / tags / genres / world_id / group_id / subkind / rank_order / note / source;'
|
|
96
100
|
+ 'source 写 ' + sourceFixed + ';tags 3–8 个,genres 1–10 个。',
|
|
97
101
|
'- tags 和 genres 都是数组:一个素材能适配多个题材/标签时,把它们都写进去;'
|
|
@@ -156,8 +160,8 @@ export function generationPrompt({
|
|
|
156
160
|
if (worldSummary) lines.push('## 本批世界母体锁定(必须保持)', '', worldSummary, '');
|
|
157
161
|
}
|
|
158
162
|
|
|
159
|
-
if (styleSummary) {
|
|
160
|
-
lines.push('##
|
|
163
|
+
if (styleSummary && !includeBase) {
|
|
164
|
+
lines.push('## 本批风格锁定(写法层,必须保持)', '', styleSummary, '');
|
|
161
165
|
}
|
|
162
166
|
lines.push('## 本次运行', '');
|
|
163
167
|
lines.push('- 工作区目录:' + workspace);
|
|
@@ -270,7 +274,7 @@ function groupHeader({ base, includeBase, worldSummary, styleSummary, modes = ''
|
|
|
270
274
|
lines.push('继续遵守最初提示词中的角色、写作原则、质量红线、命名标准、描写标准、查询与追加规则。不要重新解释规则,直接写本批素材。', '');
|
|
271
275
|
if (worldSummary) lines.push('## 本批世界母体锁定(必须保持)', '', worldSummary, '');
|
|
272
276
|
}
|
|
273
|
-
if (styleSummary) lines.push('##
|
|
277
|
+
if (styleSummary && !includeBase) lines.push('## 本批风格锁定(写法层,必须保持)', '', styleSummary, '');
|
|
274
278
|
if (modes) lines.push(modes, '');
|
|
275
279
|
return lines;
|
|
276
280
|
}
|