@cloud411716/fancy-webnovel 4.30.34 → 4.30.36
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.
- package/docs/material-library/manual/00-core.md +12 -79
- package/docs/material-library/manual/01-carrier.md +8 -38
- package/docs/material-library/manual/04-naming.md +11 -44
- package/docs/material-library/manual/07-surprise.md +10 -84
- package/docs/material-library/prompt.md +58 -144
- package/docs/material-library/quality-spec.md +2 -2
- package/package.json +1 -1
- package/plugins/fancy-material/builtin-styles.js +9 -9
- package/plugins/fancy-material/genre-playbooks.js +3 -3
- package/plugins/fancy-material/index.js +22 -22
- package/plugins/fancy-material/kinds.js +1 -1
- package/plugins/fancy-material/manual.js +2 -20
- package/plugins/fancy-material/prompts/world-mother.md +5 -5
- package/plugins/fancy-material/styles.js +16 -28
- package/plugins/fancy-material/team.js +2 -2
- package/plugins/fancy-material/templates.js +14 -14
- package/plugins/fancy-material/world.js +24 -26
|
@@ -371,7 +371,7 @@ note 没产生的痕迹,不能写进 name。
|
|
|
371
371
|
- ❌ 交通卡余额、澡堂旧牌、餐盘余汁、桌角分筷。
|
|
372
372
|
- ✅ 异界里程、鬼市手牌、末班鬼公交、剑冢余诺、龙契余烬、时间存根、死者回执。
|
|
373
373
|
|
|
374
|
-
|
|
374
|
+
名字不能只是日常物件 + 普通状态;遮住 note 只读名字,也要能感觉到一处不对劲。note 负责展开设定、代价和漏洞,但不能替名字补精彩。
|
|
375
375
|
|
|
376
376
|
关系词不是题材词,任何题材都能用:
|
|
377
377
|
|
|
@@ -380,7 +380,7 @@ note 没产生的痕迹,不能写进 name。
|
|
|
380
380
|
- 制度/登记:单、条、据、状、书、印、章、戳、票、券、档、案、册、簿、账、款、罚、税、押、保、征信、公告、登记、合同、存根、回执、通知、决定、调解、判决、公证、委托、授权、申请、体检、签收、酒测、行程、户籍、拍卖、生死、死亡、离婚、结婚、房产、营业、许可、通行、身份、工作、学生、社保、医保。
|
|
381
381
|
- 祀域/材质:香、火、炉、金、漆、孔、隅、限、期、签。
|
|
382
382
|
|
|
383
|
-
|
|
383
|
+
能力名背后必须有一个具体设定:它是什么、哪里反常、代价/限制、边界/漏洞。只有“物件 + 个人倒霉”,废。
|
|
384
384
|
|
|
385
385
|
每条 note 还必须有一句能被复述的**标志性异常规则**:负数、倒数、颜色变化、多出的一站、禁止的动作、特殊硬币、坟场、异世界入口。第一个想到的规则丢掉,至少写三个候选,选最具体、最有画面的那个。只是“某机构 + 某代价”的,重写。
|
|
386
386
|
|
package/package.json
CHANGED
|
@@ -123,12 +123,12 @@ export const BUILTIN_STYLES = [
|
|
|
123
123
|
style_type: 'naming',
|
|
124
124
|
account_names: ['充电进度条'],
|
|
125
125
|
genre_tags: ['都市', '悬疑', '科幻', '仙侠', '规则怪谈'],
|
|
126
|
-
dna: '
|
|
126
|
+
dna: '日常物件/场所 + 一个不正常的设定 + 具体后果;名字只保留这个设定留下的痕迹,不写事件摘要,也不写“日常物件 + 普通状态”。',
|
|
127
127
|
concept_examples: ["末班电梯:末班之后多停一层没有编号的楼层;走出去的人,会在监控里多一个同名替身。", "负一层便利店:没有客流,却一直营业;店员不收钱,只收“你明天还会来”的承诺。", "共享充电宝·第七号:第七号永远满电,但借的人会少一天。", "异界里程:公交卡余额其实是异界里程;刷一次能上一条只在午夜出现的公交线,车上都是拿愿换座的乘客。", "鬼市手牌:澡堂手牌是鬼市摊位号;池水下面是交易桌,洗掉的是霉运,留下的是皮相。", "灯烬留愿:路灯熄灭后,灯座里剩下一撮金色灯灰;把灰抹在掌心,能听见昨夜没说完的愿。", "站牌余诺:站牌背面的旧愿词被雨泡开后,最下面一行会浮出下一个等车人的名字。", "炉底残签:香炉底压着一截没烧完的签;抽出来,签上的判词会替你记住一个不该记住的人。"],
|
|
128
128
|
naming_mode: 'hybrid',
|
|
129
|
-
generation_chain: ['
|
|
129
|
+
generation_chain: ['从当前世界设定和十一个来源库里找 1–2 个能互相解释的元素,选一个日常物件或场所作为落点', '写清这个物件/场所哪里不正常:异常规则、代价、限制', '推歪一格,写出具体后果和边界', '从这个设定留下的痕迹取 name;先写 note,再定名字', '校验:name 不能描述事件过程,也不能只是日常物件 + 普通状态'],
|
|
130
130
|
image_pool: ['电梯', '物业', '门禁', '打卡', '加班', '调休', '充电宝', '便利店', '末班车', '监控'],
|
|
131
|
-
hook_rule: '
|
|
131
|
+
hook_rule: '名字本身要有一个具体的异常点,能让人停一下;note 再展开设定,但不能替名字补精彩。',
|
|
132
132
|
naming_rules: {
|
|
133
133
|
length: [3, 8],
|
|
134
134
|
syntax: ['载体+边界/残留', '场所/职业+异常属性', '制度词+超自然后果'],
|
|
@@ -136,11 +136,11 @@ export const BUILTIN_STYLES = [
|
|
|
136
136
|
forbidden: ['纯工具名词直接入库', '无边界修饰的机务段/信号楼/电梯/业委会/快递柜', '裸载体当名字'],
|
|
137
137
|
trace_hints: ['隅', '痕', '烬', '赊', '契', '诺', '印', '留', '封', '录', '据', '牌'],
|
|
138
138
|
trace_forbidden: ['分钟', '刻', '一日', '一次', '满格', '最后', '持续'],
|
|
139
|
-
trace_diversity: ['同一批 10 条:同一结尾痕迹字最多 2 条,同一双字后缀最多 2 条', '
|
|
140
|
-
trace_grounding: ['
|
|
141
|
-
trace_high_concept: ['
|
|
142
|
-
trace_hidden_world: ['note
|
|
143
|
-
trace_surprise: ['每条 note
|
|
139
|
+
trace_diversity: ['同一批 10 条:同一结尾痕迹字最多 2 条,同一双字后缀最多 2 条', '同一分系累计 20 条:同一开头字最多 4 条,同一结尾字最多 4 条,至少 8 种结尾,四字名最多 18 条,至少 2 条五字以上', '不得原样复用示例名'],
|
|
140
|
+
trace_grounding: ['名字里的痕迹必须在 note 里能找到对应的物件、动作或后果', 'note 没产生的痕迹,不能写进 name'],
|
|
141
|
+
trace_high_concept: ['名字不能只是“日常物件 + 普通状态”', '遮住 note 只读名字,要能感觉到一处不对劲;不要靠 note 补精彩'],
|
|
142
|
+
trace_hidden_world: ['note 要写清这个设定:它是什么、哪里反常、代价或限制是什么', '不要只写“物件 + 个人倒霉”,也不要把设定写成事件过程'],
|
|
143
|
+
trace_surprise: ['每条 note 要有一句能被读者复述的异常规则', '规则里至少有一个具体可感的细节(数字、颜色、动作、空间变化等)', '如果规则只是“某机构 + 某代价”,重写'],
|
|
144
144
|
tone: '日常、冷静、略带荒诞',
|
|
145
145
|
},
|
|
146
146
|
lexicon: {
|
|
@@ -346,7 +346,7 @@ export const BUILTIN_STYLES = [
|
|
|
346
346
|
item_name: ['青冥点星笔', '流云玉扇'],
|
|
347
347
|
monster_name: ['墨色黑龙', '白骨冥妃'],
|
|
348
348
|
power_rank: ['远景', '中景', '特写', '高光镜头'],
|
|
349
|
-
world_rule: ['
|
|
349
|
+
world_rule: ['每一次施法都必须有一个具体可拍的画面。'],
|
|
350
350
|
},
|
|
351
351
|
anti_examples: ['AI视觉系统', '分镜协议', '神兵模块'],
|
|
352
352
|
compatibility: { 视觉: 'native', AI漫剧: 'native', 古风: 'native', 仙侠: 'native', 玄幻: 'native', 都市: 'adaptable', 科幻: 'adaptable', 言情: 'weak' },
|
|
@@ -96,12 +96,12 @@ 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
|
-
if (!selected.length) return prefix + '\n\n
|
|
101
|
+
if (!selected.length) return prefix + '\n\n(本次未限制题材;按世界设定和本批 kind 要求执行。)';
|
|
102
102
|
const clusters = selectGenreClusters(selected);
|
|
103
103
|
if (!clusters.length) {
|
|
104
|
-
return prefix + '\n\n
|
|
104
|
+
return prefix + '\n\n(本次题材未命中内置题材簇;以世界设定、facet 交集和本批 kind 要求为准,不要套用未选中的题材体例。)';
|
|
105
105
|
}
|
|
106
106
|
const lines = [prefix, '', '本次题材:' + selected.join('、')];
|
|
107
107
|
for (const cluster of clusters) {
|
|
@@ -176,18 +176,18 @@ function renderBasePrompt({
|
|
|
176
176
|
: '下面素材类型总表之一;builtin 素材必须在表内';
|
|
177
177
|
return renderPrompt(readPrompt(), {
|
|
178
178
|
MATERIAL_MODE: mode,
|
|
179
|
-
GENRES: (genres || []).join('、') || '
|
|
179
|
+
GENRES: (genres || []).join('、') || '(未限制,按世界设定推导)',
|
|
180
180
|
TOPIC_FILE: topicFile || '(无)',
|
|
181
181
|
KIND_TABLE: renderKindTable(),
|
|
182
182
|
KIND_BLOCK: kindBlock || '(本批未指定 kind;按本次运行说明执行。)',
|
|
183
|
-
GENRE_BLOCK: genreBlock || '
|
|
183
|
+
GENRE_BLOCK: genreBlock || '(本次未提供题材专属规则;按世界设定和 kind 要求执行。)',
|
|
184
184
|
FOCUS_BLOCK: focusBlockText || focusBlock(focus),
|
|
185
185
|
TARGET_PER_KIND: String(targetPerKind),
|
|
186
186
|
BATCH_SIZE: String(batchSize),
|
|
187
187
|
AUDIENCE: audience || '男频 / 女频 / 通用',
|
|
188
188
|
STYLE_RULES: styleRules || '未指定(执行通用创作标准)',
|
|
189
189
|
STYLE_BLOCK: styleBlock || '(本次未选择账号风格,按通用规则生成。)',
|
|
190
|
-
WORLD_BLOCK: worldBlock || '
|
|
190
|
+
WORLD_BLOCK: worldBlock || '(本次未指定世界设定,按通用规则生成。)',
|
|
191
191
|
BATCH_ID: batchId || 'material-YYYYMMDD-01',
|
|
192
192
|
SEED: batchId || 'material-v4',
|
|
193
193
|
EXISTING_INDEX: existingIndex || '(运行 /fancy-material 时由插件提供)',
|
|
@@ -283,7 +283,7 @@ async function checkFile(file) {
|
|
|
283
283
|
|
|
284
284
|
/**
|
|
285
285
|
* 本版 facet 是交集语义:每条记录的 genres 必须原样包含本次选中的**全部**
|
|
286
|
-
*
|
|
286
|
+
* 题材。只要缺一个,就不能算满足本次世界设定。
|
|
287
287
|
*/
|
|
288
288
|
function genreCoverageProblem(file, genres) {
|
|
289
289
|
const selected = [...new Set((genres || []).filter(Boolean))];
|
|
@@ -356,8 +356,8 @@ export function chargingBarNameHighConceptProblem(records, primaryStyleKey = '')
|
|
|
356
356
|
if (!CHARGING_BAR_HIGH_CONCEPT.test(name)) bad.push(`「${name}」`);
|
|
357
357
|
}
|
|
358
358
|
if (!bad.length) return '';
|
|
359
|
-
return '
|
|
360
|
-
+ '
|
|
359
|
+
return '名字缺少具体异常:' + [...new Set(bad)].slice(0, 8).join('、')
|
|
360
|
+
+ '。名字不能只是日常物件 + 普通状态;遮住 note 只读名字,要能感觉到一处不对劲。请换一个能体现这个设定异常的落点,或重写名字。';
|
|
361
361
|
}
|
|
362
362
|
|
|
363
363
|
const NOUN_FORM_KINDS = new Set([
|
|
@@ -1023,7 +1023,7 @@ async function generateWorldCandidates({
|
|
|
1023
1023
|
for (let attempt = 1; attempt <= 2; attempt += 1) {
|
|
1024
1024
|
if (abortRequested(invocation)) return { ok: false, aborted: true, message: '用户中断' };
|
|
1025
1025
|
if (taskList && typeof taskList.progress === 'function') {
|
|
1026
|
-
taskList.progress('
|
|
1026
|
+
taskList.progress('生成世界设定候选(第 ' + attempt + ' 次)');
|
|
1027
1027
|
}
|
|
1028
1028
|
let before = null;
|
|
1029
1029
|
try { before = fs.readFileSync(file, 'utf8'); } catch { /* first attempt */ }
|
|
@@ -1047,7 +1047,7 @@ async function generateWorldCandidates({
|
|
|
1047
1047
|
}
|
|
1048
1048
|
const sent = await llmFollowup(invocation, prompt, { appendTempRule: false });
|
|
1049
1049
|
if (!sent || sent.ok !== true) {
|
|
1050
|
-
return { ok: false, message: '向 LLM
|
|
1050
|
+
return { ok: false, message: '向 LLM 发送世界设定提示词失败:' + ((sent && sent.error) || '未知错误') };
|
|
1051
1051
|
}
|
|
1052
1052
|
taskList.watchTurns(invocation);
|
|
1053
1053
|
const waitForTurn = makeWaitForTurn(invocation, {
|
|
@@ -1064,7 +1064,7 @@ async function generateWorldCandidates({
|
|
|
1064
1064
|
});
|
|
1065
1065
|
const waited = await waitForTurn([file], before);
|
|
1066
1066
|
if (!waited.ok) {
|
|
1067
|
-
failure = waited.reason || waited.code || '
|
|
1067
|
+
failure = waited.reason || waited.code || '等待世界设定结果失败';
|
|
1068
1068
|
continue;
|
|
1069
1069
|
}
|
|
1070
1070
|
try {
|
|
@@ -1076,7 +1076,7 @@ async function generateWorldCandidates({
|
|
|
1076
1076
|
failure = err && err.message ? err.message : String(err);
|
|
1077
1077
|
}
|
|
1078
1078
|
}
|
|
1079
|
-
return { ok: false, message: '
|
|
1079
|
+
return { ok: false, message: '世界设定生成失败:' + (failure || '未知错误') };
|
|
1080
1080
|
}
|
|
1081
1081
|
|
|
1082
1082
|
async function chooseWorldCandidate(ctx, invocation, candidates, { allowReroll = true } = {}) {
|
|
@@ -1089,7 +1089,7 @@ async function chooseWorldCandidate(ctx, invocation, candidates, { allowReroll =
|
|
|
1089
1089
|
if (exact) return { ok: true, candidate: exact };
|
|
1090
1090
|
const prefixed = candidates.find((candidate) => selected.startsWith(candidate.title + '('));
|
|
1091
1091
|
if (prefixed) return { ok: true, candidate: prefixed };
|
|
1092
|
-
return { ok: false, message: '
|
|
1092
|
+
return { ok: false, message: '未识别世界设定选择:' + selected };
|
|
1093
1093
|
}
|
|
1094
1094
|
|
|
1095
1095
|
function makeFlow({
|
|
@@ -1141,11 +1141,11 @@ async function runInteractive(ctx, invocation, session, taskList, opts = {}) {
|
|
|
1141
1141
|
const asked = await askOne(ctx, invocation, {
|
|
1142
1142
|
id: 'material-existing-flow',
|
|
1143
1143
|
header: '素材 · 上次世界',
|
|
1144
|
-
question: '
|
|
1144
|
+
question: '检测到上次生成过素材。本次要沿用上次的世界设定,还是重新构建?',
|
|
1145
1145
|
detail: flowSummaryText(previousFlow),
|
|
1146
1146
|
options: [
|
|
1147
|
-
{ label: '
|
|
1148
|
-
{ label: '
|
|
1147
|
+
{ label: '沿用上次世界设定(推荐)', description: '只确认追加范围和数量,不重问 facet' },
|
|
1148
|
+
{ label: '重新构建世界设定', description: '重新选择 facet 和世界设定;旧素材保留' },
|
|
1149
1149
|
{ label: '取消', description: '不生成素材' },
|
|
1150
1150
|
],
|
|
1151
1151
|
});
|
|
@@ -1255,7 +1255,7 @@ async function runInteractive(ctx, invocation, session, taskList, opts = {}) {
|
|
|
1255
1255
|
try {
|
|
1256
1256
|
writeMaterialFlow(root, flow);
|
|
1257
1257
|
} catch (err) {
|
|
1258
|
-
return notify(session, 'error', '❌
|
|
1258
|
+
return notify(session, 'error', '❌ 写入世界设定状态失败:' + (err && err.message ? err.message : String(err)));
|
|
1259
1259
|
}
|
|
1260
1260
|
|
|
1261
1261
|
return runGenerationWithPlan(ctx, invocation, session, taskList, {
|
|
@@ -1285,13 +1285,13 @@ async function runContinue(ctx, invocation, session, taskList, opts = {}) {
|
|
|
1285
1285
|
if (!flow || !flow.world) {
|
|
1286
1286
|
return notify(session, 'error', [
|
|
1287
1287
|
'⚠️ 没有可沿用的上次选择。',
|
|
1288
|
-
'先运行 /fancy-material 选择 facet
|
|
1288
|
+
'先运行 /fancy-material 选择 facet 和世界设定;之后再用 /fancy-material continue 追加。',
|
|
1289
1289
|
].join('\n'));
|
|
1290
1290
|
}
|
|
1291
1291
|
if (opts.fresh) {
|
|
1292
1292
|
return runInteractive(ctx, invocation, session, taskList, opts);
|
|
1293
1293
|
}
|
|
1294
|
-
taskList.progress('
|
|
1294
|
+
taskList.progress('读取上次世界设定选择');
|
|
1295
1295
|
taskList.advance(1);
|
|
1296
1296
|
const scope = scopeQuestion({ currentKinds: flow.scope?.kinds || [] });
|
|
1297
1297
|
scope.detail = flowSummaryText(flow) + '\n\n' + scope.detail;
|
|
@@ -1329,7 +1329,7 @@ async function runContinue(ctx, invocation, session, taskList, opts = {}) {
|
|
|
1329
1329
|
try {
|
|
1330
1330
|
writeMaterialFlow(root, nextFlow);
|
|
1331
1331
|
} catch (err) {
|
|
1332
|
-
return notify(session, 'error', '❌
|
|
1332
|
+
return notify(session, 'error', '❌ 更新世界设定状态失败:' + (err && err.message ? err.message : String(err)));
|
|
1333
1333
|
}
|
|
1334
1334
|
taskList.advance(2);
|
|
1335
1335
|
return runGenerationWithPlan(ctx, invocation, session, taskList, {
|
|
@@ -1414,7 +1414,7 @@ export async function runGenerationWithPlan(ctx, invocation, session, taskList,
|
|
|
1414
1414
|
}
|
|
1415
1415
|
const styleBlock = stylePromptBlock(styleRegistry.styles, selectedStyles, { genres });
|
|
1416
1416
|
const styleRules = selectedStyles.length
|
|
1417
|
-
? '本次使用账号风格:' + styleSummaryText(selectedStyles) + '
|
|
1417
|
+
? '本次使用账号风格:' + styleSummaryText(selectedStyles) + ';世界设定和 kind 硬规则优先,风格只决定写法。'
|
|
1418
1418
|
: '未指定账号风格(执行通用创作标准)。';
|
|
1419
1419
|
const styleSummary = styleBatchSummary(selectedStyles);
|
|
1420
1420
|
|
|
@@ -1452,7 +1452,7 @@ export async function runGenerationWithPlan(ctx, invocation, session, taskList,
|
|
|
1452
1452
|
facetLabels,
|
|
1453
1453
|
constraintGenres: genres,
|
|
1454
1454
|
});
|
|
1455
|
-
const scopeBlockText = '
|
|
1455
|
+
const scopeBlockText = '世界设定总生成范围(仅用于了解后续队列,不是本批):'
|
|
1456
1456
|
+ planned.all.map((item) => `\`${item.kind || item.mode}\`(${item.label})`).join('、')
|
|
1457
1457
|
+ '。本批只写下面“本批 kind”指定的 kind,不要生成其它 kind。';
|
|
1458
1458
|
const baseForItem = (item) => renderBasePrompt({
|
|
@@ -2046,9 +2046,9 @@ function materialTaskTitles(invocation) {
|
|
|
2046
2046
|
if (command === 'init') return ['检查素材库', '初始化 schema 并部署查询脚本'];
|
|
2047
2047
|
if (command === 'remove') return ['确认删除范围', '删除素材库数据'];
|
|
2048
2048
|
if (command === 'continue' || command === '继续') {
|
|
2049
|
-
return ['
|
|
2049
|
+
return ['读取上次世界设定', '确认本次追加范围', '分批生成并导入素材', '汇总生成结果'];
|
|
2050
2050
|
}
|
|
2051
|
-
return ['读取选题建议与 facet', '
|
|
2051
|
+
return ['读取选题建议与 facet', '选择世界设定', '分批生成并导入素材', '汇总生成结果'];
|
|
2052
2052
|
}
|
|
2053
2053
|
|
|
2054
2054
|
function teamText(root, config) {
|
|
@@ -161,7 +161,7 @@ export const KIND_QUALITY = {
|
|
|
161
161
|
place_name: '都市类必须有二重身份:name 写内层隐秘地名,note 写表层日常地址/伪装名;非都市类要有地域质感。名字自带场景感与故事钩子,不是“XX路/XX楼”通用地址;严格匹配题材文化体系。平庸黑名单(裸词):机务段、信号楼、冷库、锅炉房、快递柜这类没有异常边界的纯写实地名。',
|
|
162
162
|
faction_name: '分三级+分题材命名:顶级用使命意象名、中层用行业/地盘名、底层用特征代号;体例后缀严格匹配题材。禁止全用直白职业名,禁止跨题材乱用词缀。平庸黑名单(裸词):业委会、家政、电梯班、路灯班、绿化队这类没有异常边界的现实职业名。',
|
|
163
163
|
skill_name: '核心规则藏在 note 或名字的残留里,不直白喊功能;体例后缀严格匹配题材体系(中式诀/式/令,西幻契/印/律,科幻协议/阈值);不用生僻典故,能猜出效果方向;不是“XX拳/XX掌”的大路货。',
|
|
164
|
-
ability_name: '
|
|
164
|
+
ability_name: '走「世界设定里的动作/意象 + 规则」路线;名字是名词性短语,能放进“我看见了___”或“这是___”;不要写成事件过程、动作+时长或操作说明。名字不能只是“日常物件 + 普通状态”;遮住 note 只读名字,要能感觉到一处不对劲。note 写清设定本身:它是什么、哪里反常、代价或限制、边界或漏洞。题材由世界设定决定,仙侠/西幻/科幻/悬疑同样适用。',
|
|
165
165
|
item_name: '走痕迹感路线,名字带数字/缺损/年代/主人痕迹至少一项;材质与命名风格匹配题材;不是“形容词+通用名词”;有专属感,换名字功能不成立。',
|
|
166
166
|
monster_name: '有生态感,能脑补外形与习性;不猎奇、不堆恐怖词;贴合生存环境与题材世界观。',
|
|
167
167
|
mythic_being: '有氛围感与分量感,自带传说底色;不照搬现有神话本名,做原创化改编;风格匹配题材神话体系,不用极端生僻字。',
|
|
@@ -126,35 +126,17 @@ export function renderManualBlock({ kind = '', subkind = '', genres = [], seed =
|
|
|
126
126
|
const carrier = compact ? '' : readFile(path.join(MANUAL_DIR, '01-carrier.md'));
|
|
127
127
|
const naming = compact ? '' : readFile(path.join(MANUAL_DIR, '04-naming.md'));
|
|
128
128
|
const surprise = compact ? '' : readFile(path.join(MANUAL_DIR, '07-surprise.md'));
|
|
129
|
-
|
|
130
|
-
const palettes = selectPalettes({ genres, limit: compact ? 1 : 2 });
|
|
131
|
-
const patterns = compact ? [] : selectPatterns({ caseId: selectedCase?.id || '', limit: 3 });
|
|
132
|
-
const failures = selectFailures({ kind, limit: compact ? 1 : 2 });
|
|
133
|
-
if (!core && !selectedCase && !palettes.length) return '';
|
|
129
|
+
if (!core && !carrier && !naming && !surprise) return '';
|
|
134
130
|
|
|
135
131
|
const lines = [
|
|
136
132
|
'# 创作手册(本批必读)',
|
|
137
133
|
'',
|
|
138
|
-
'本手册优先于旧的创作段。字段、schema、kind
|
|
134
|
+
'本手册优先于旧的创作段。字段、schema、kind 硬规则、世界设定仍然优先。',
|
|
139
135
|
'',
|
|
140
136
|
];
|
|
141
137
|
if (core) lines.push(core, '');
|
|
142
138
|
if (carrier) lines.push(carrier, '');
|
|
143
139
|
if (naming) lines.push(naming, '');
|
|
144
140
|
if (surprise) lines.push(surprise, '');
|
|
145
|
-
if (selectedCase?.content) {
|
|
146
|
-
lines.push('## 本批结构案例:' + selectedCase.id, '', selectedCase.content, '');
|
|
147
|
-
}
|
|
148
|
-
for (const palette of palettes) {
|
|
149
|
-
lines.push('## 题材调色板:' + palette.id, '', palette.content, '');
|
|
150
|
-
}
|
|
151
|
-
if (patterns.length) {
|
|
152
|
-
lines.push('## 参考模式(只学结构,不抄名字)', '');
|
|
153
|
-
for (const pattern of patterns) lines.push(pattern, '');
|
|
154
|
-
}
|
|
155
|
-
if (failures.length) {
|
|
156
|
-
lines.push('## 失败诊断(写之前先对照)', '');
|
|
157
|
-
for (const failure of failures) lines.push(failure, '');
|
|
158
|
-
}
|
|
159
141
|
return lines.join('\n').trim();
|
|
160
142
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 世界设定候选生成
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
你是一位网文世界的总设定师。你现在的任务不是写素材,而是先造一个能长出素材的世界设定。
|
|
4
4
|
|
|
5
5
|
工作区:`{{WORKSPACE}}`
|
|
6
6
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
{{STYLE_BLOCK}}
|
|
18
18
|
|
|
19
|
-
## 四、生成 3
|
|
19
|
+
## 四、生成 3 个世界设定候选
|
|
20
20
|
|
|
21
21
|
必须生成**恰好 3 个**候选,三个候选的差异要落在世界运转方式上,而不是只换名字:
|
|
22
22
|
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
### 命名质量红线
|
|
31
31
|
|
|
32
|
-
-
|
|
32
|
+
- 世界设定不是现实公司的换皮。不要用“夜班、值班、保安、物业、工单、培训手册”直接当世界观核心。
|
|
33
33
|
- 不要生成“试岗、替班、带班、值守”这种现实职级名。
|
|
34
34
|
- 不要生成“包月令、静音条”这种“日常词 + 后缀”的字面功能名。
|
|
35
35
|
- `positioning` 是读者承诺,不是词表;先把它翻译成世界公理、代价、禁忌,再让名字从公理里长出来。
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
{
|
|
50
50
|
"candidate_type": "suggestion_anchor",
|
|
51
51
|
"world_id": "stable_ascii_slug",
|
|
52
|
-
"title": "
|
|
52
|
+
"title": "世界设定名",
|
|
53
53
|
"logline": "一句话世界",
|
|
54
54
|
"core_conflict": "这个世界最核心、无法调和的矛盾",
|
|
55
55
|
"reader_promise": "读者会得到的核心体验",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 风格注册表:内置风格 + 数据库 douyin_style。
|
|
3
3
|
*
|
|
4
|
-
* 风格是跨 kind
|
|
4
|
+
* 风格是跨 kind 的写法倾向;世界设定和 kind 的硬规则优先。
|
|
5
5
|
* 这里不处理具体生成,只负责加载、合并、按题材选择、渲染成提示词。
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -493,20 +493,20 @@ export function stylePromptBlock(styles, selected, { genres = [] } = {}) {
|
|
|
493
493
|
: picked;
|
|
494
494
|
|
|
495
495
|
const lines = [
|
|
496
|
-
'##
|
|
496
|
+
'## 风格锁定(写法层,不覆盖世界设定)',
|
|
497
497
|
'',
|
|
498
|
-
'
|
|
498
|
+
'世界设定的命名逻辑、公理、代价、禁忌优先;kind 的硬规则优先。',
|
|
499
499
|
'风格只决定:句式、长度、语气、意象密度、命名模式。',
|
|
500
|
-
'
|
|
500
|
+
'风格不能把世界设定的核心词替换成现实职业词/流程词;日常物件/场所只能做底层逻辑,不能直接当名字。',
|
|
501
501
|
'',
|
|
502
502
|
];
|
|
503
503
|
if (!picked.length) {
|
|
504
|
-
lines.push('
|
|
504
|
+
lines.push('本次未选择账号风格。按世界设定和 kind 规则命名;命名模式默认 image,但世界设定优先。');
|
|
505
505
|
return lines.join('\n');
|
|
506
506
|
}
|
|
507
507
|
|
|
508
508
|
lines.push('### 本次风格分工');
|
|
509
|
-
lines.push('- 主命名风格:' + (primary ? `\`${primary.style_key}\`(${primary.style_name})` : '
|
|
509
|
+
lines.push('- 主命名风格:' + (primary ? `\`${primary.style_key}\`(${primary.style_name})` : '无(按世界设定和 kind 规则命名)'));
|
|
510
510
|
if (structure.length) {
|
|
511
511
|
lines.push('- 结构参考(不参与命名):' + structure.map((style) => `\`${style.style_key}\``).join('、'));
|
|
512
512
|
}
|
|
@@ -533,19 +533,15 @@ export function stylePromptBlock(styles, selected, { genres = [] } = {}) {
|
|
|
533
533
|
for (const step of style.generation_chain) lines.push(' - ' + step);
|
|
534
534
|
}
|
|
535
535
|
if (isNaming) {
|
|
536
|
-
lines.push('-
|
|
536
|
+
lines.push('- 物件/场所来源:从当前世界设定 + 十一个来源库的映射里找;日常物件只做底层逻辑,不直接当名字。');
|
|
537
537
|
}
|
|
538
538
|
if (isNaming && style.hook_rule) lines.push('- 钩子要求:' + style.hook_rule);
|
|
539
539
|
const rules = style.naming_rules || {};
|
|
540
540
|
if (rules.length) lines.push('- 长度:' + (Array.isArray(rules.length) ? rules.length.join('–') + ' 字' : rules.length));
|
|
541
|
-
if (rules.syntax) lines.push('- 句式:' + asArray(rules.syntax).join(';'));
|
|
542
|
-
if (rules.suffixes) lines.push('- 可用后缀:' + (asArray(rules.suffixes).join('、') || '无固定后缀'));
|
|
543
|
-
if (rules.forbidden) lines.push('- 禁用写法(不是禁用载体):' + asArray(rules.forbidden).join('、'));
|
|
544
541
|
if (isNaming) {
|
|
545
|
-
lines.push('-
|
|
546
|
-
lines.push('- note
|
|
542
|
+
lines.push('- 名字:先写 note;再从 note 里已经发生的规则、代价、物件反推名字,不要先选后缀。');
|
|
543
|
+
lines.push('- note 结构:不要固定“表层→规则→代价→漏洞”的同一顺序;同批至少 3 条从不同入口写(代价现场/受害者视角/失败交易/规则漏洞/物件残留)。');
|
|
547
544
|
}
|
|
548
|
-
if (rules.trace_forbidden) lines.push('- 禁用引导词(出现在 name 里即重写):' + asArray(rules.trace_forbidden).join('、'));
|
|
549
545
|
if (rules.trace_diversity) {
|
|
550
546
|
lines.push('- 痕迹多样性(硬要求):');
|
|
551
547
|
for (const item of asArray(rules.trace_diversity)) lines.push(' - ' + item);
|
|
@@ -559,7 +555,7 @@ export function stylePromptBlock(styles, selected, { genres = [] } = {}) {
|
|
|
559
555
|
for (const item of asArray(rules.trace_high_concept)) lines.push(' - ' + item);
|
|
560
556
|
}
|
|
561
557
|
if (rules.trace_hidden_world) {
|
|
562
|
-
lines.push('-
|
|
558
|
+
lines.push('- 设定(硬要求):');
|
|
563
559
|
for (const item of asArray(rules.trace_hidden_world)) lines.push(' - ' + item);
|
|
564
560
|
}
|
|
565
561
|
if (rules.trace_surprise) {
|
|
@@ -567,28 +563,21 @@ export function stylePromptBlock(styles, selected, { genres = [] } = {}) {
|
|
|
567
563
|
for (const item of asArray(rules.trace_surprise)) lines.push(' - ' + item);
|
|
568
564
|
}
|
|
569
565
|
if (rules.tone) lines.push('- 语气:' + rules.tone);
|
|
570
|
-
const forbidden = asArray(style.lexicon && style.lexicon.forbidden);
|
|
571
|
-
if (forbidden.length) lines.push('- 禁用词/意象:' + forbidden.join('、'));
|
|
572
|
-
|
|
573
566
|
const anchors = [];
|
|
574
567
|
for (const [kind, values] of Object.entries(styleAnchorExamples(style))) {
|
|
575
568
|
const list = asArray(values).slice(0, 4);
|
|
576
569
|
if (list.length) anchors.push(` - \`${kind}\`:${list.join('、')}`);
|
|
577
570
|
}
|
|
578
|
-
if (anchors.length) {
|
|
579
|
-
lines.push('-
|
|
571
|
+
if (anchors.length && !isNaming) {
|
|
572
|
+
lines.push('- 结构锚点(不参与命名):');
|
|
580
573
|
lines.push(...anchors);
|
|
581
|
-
lines.push(' -
|
|
574
|
+
lines.push(' - 只校准结构;与世界设定冲突时以世界设定为准,不要复用锚点里的名词。');
|
|
582
575
|
}
|
|
583
576
|
const concepts = styleConceptExamples(style);
|
|
584
577
|
if (concepts.length) {
|
|
585
578
|
lines.push('- ' + (isNaming ? '概念示例(只校准张力,不抄设定):' : '结构示例(不参与命名):'));
|
|
586
579
|
for (const example of concepts.slice(0, 4)) lines.push(' - ' + example);
|
|
587
580
|
}
|
|
588
|
-
const anti = dedupeAntiExamples(style.anti_examples);
|
|
589
|
-
if (anti.length) {
|
|
590
|
-
lines.push('- 反例(失败形态,不是禁用词):' + anti.slice(0, 10).join('、'));
|
|
591
|
-
}
|
|
592
581
|
lines.push('');
|
|
593
582
|
}
|
|
594
583
|
|
|
@@ -596,10 +585,10 @@ export function stylePromptBlock(styles, selected, { genres = [] } = {}) {
|
|
|
596
585
|
if (primary) {
|
|
597
586
|
lines.push('本批以 `' + primary.style_key + '` 为主命名风格;其他 naming 风格只提供辅助意象;structure 风格不参与命名。');
|
|
598
587
|
} else {
|
|
599
|
-
lines.push('
|
|
588
|
+
lines.push('本批没有命名风格;按世界设定和 kind 规则命名,结构风格只做结构参考。');
|
|
600
589
|
}
|
|
601
|
-
lines.push('
|
|
602
|
-
lines.push('
|
|
590
|
+
lines.push('世界设定和 kind 的硬规则优先;风格不能豁免。');
|
|
591
|
+
lines.push('示例只校准强度;如果示例与世界设定/kind 冲突,以世界设定/kind 为准。示例中的名字和设定不得原样出现;写出同名/近义就重写。');
|
|
603
592
|
return lines.join('\n');
|
|
604
593
|
}
|
|
605
594
|
|
|
@@ -627,7 +616,6 @@ export function styleBatchSummary(styles) {
|
|
|
627
616
|
];
|
|
628
617
|
if (style.style_type === 'naming') bits.push('命名模式 `' + (style.naming_mode || 'image') + '`');
|
|
629
618
|
if (rules.length) bits.push(`长度 ${Array.isArray(rules.length) ? rules.length.join('–') + ' 字' : rules.length}`);
|
|
630
|
-
if (rules.forbidden && rules.forbidden.length) bits.push('禁用 ' + rules.forbidden.join('、'));
|
|
631
619
|
return bits.join(';');
|
|
632
620
|
}).join('\n');
|
|
633
621
|
}
|
|
@@ -228,9 +228,9 @@ PASS 仅当没有 blocker/major。minor 可以记录但不阻塞。
|
|
|
228
228
|
2. 规则能不能一句话复述?有没有具体画面/数字/颜色/动作?
|
|
229
229
|
3. 是否先有规则、再有舞台,而不是先选物件再贴后缀?
|
|
230
230
|
4. 代价是否是这条能力内生的,而不是只复用愿孔/金漆?
|
|
231
|
-
5. note
|
|
231
|
+
5. note 是否写清了这个设定本身:它是什么、哪里反常、代价/限制/漏洞?
|
|
232
232
|
6. 把舞台换掉,名字还成立吗?成立则说明名字没有咬住规则。
|
|
233
|
-
7.
|
|
233
|
+
7. 同批是否有明显重复的物件/关系模板/命名形态?
|
|
234
234
|
8. 同批 note 是否大量复用同一结构/同一句式?超过一半要求重写。
|
|
235
235
|
|
|
236
236
|
返回 JSON:
|
|
@@ -21,15 +21,15 @@ export function helpText() {
|
|
|
21
21
|
}).join('\n');
|
|
22
22
|
return `🧩 素材库 用法
|
|
23
23
|
|
|
24
|
-
/fancy-material 交互式:逐步选择 6 层 facet → 3
|
|
25
|
-
/fancy-material continue
|
|
24
|
+
/fancy-material 交互式:逐步选择 6 层 facet → 3 个世界设定候选 → 生成范围/数量 → 生成素材
|
|
25
|
+
/fancy-material continue 沿用上次的世界设定、facet、风格和范围,继续追加素材
|
|
26
26
|
/fancy-material team show 查看双生成 + 交叉审查 + 裁判的配置
|
|
27
27
|
/fancy-material team models [provider] 查看当前可用模型(默认 opencode-go)
|
|
28
28
|
/fancy-material team set a|b|judge <provider> <model> [thinking] 设置模型和 thinking 等级(三者必须不同)
|
|
29
29
|
/fancy-material team set rounds <1-10> 设置最多交叉审查轮次(默认 5)
|
|
30
30
|
/fancy-material team set max-calls <6-40> 设置整个 workflow 最多 agent 调用
|
|
31
31
|
/fancy-material team on|off 开/关 Team 模式
|
|
32
|
-
/fancy-material --fresh
|
|
32
|
+
/fancy-material --fresh 重新构建世界设定(旧素材保留,不删除)
|
|
33
33
|
/fancy-material --style <key> ... 手动指定账号风格;多个用逗号分隔,例如 --style suci,crazy-fish
|
|
34
34
|
不指定时在交互流程里选择:自动 / 不使用 / 具体 key
|
|
35
35
|
/fancy-material load <文件.jsonl> 导入 JSONL;导入前先校验格式
|
|
@@ -53,7 +53,7 @@ export function helpText() {
|
|
|
53
53
|
- facet 多选是**交集**:同一层选中的每一项都必须同时满足,不是任选其一。例如题材选 都市+异能+脑洞,素材必须同时满足三种。
|
|
54
54
|
- 选「都市异能」会同时按「都市」和「异能」处理;选「悬疑脑洞」会同时按「悬疑」和「脑洞」处理,两个条件都必须满足。
|
|
55
55
|
- 题材/方向/定位来自 _novel_topic_suggestion.json 时只做推荐值;用户本次选择优先,fancy-material 不修改该文件。
|
|
56
|
-
-
|
|
56
|
+
- 世界设定保存在 <工作区>/.fancy/material/flow.json;continue 会沿用它,不删除旧素材。
|
|
57
57
|
- 风格来源:内置风格库 + 数据库 douyin_style;交互流程里可选自动、不使用或具体 key,也可用 --style 预填。
|
|
58
58
|
- 用 /fancy-douyin list 查看账号的 style_key、风格名和示例。
|
|
59
59
|
- 不设库内上限:运行两次就是每个 kind 累计追加;已有素材只用于去重。
|
|
@@ -101,7 +101,7 @@ function compactRules(genres, queryScript, workspace, sourceFixed = 'builtin') {
|
|
|
101
101
|
'- 好素材 = 熟悉锚点 × 一处不对劲 × 未解问题 × 会咬人的后果;只停在“规则必须遵守”视为废稿。',
|
|
102
102
|
'- 单条素材最多 1–2 个来源库;不要多源大杂烩,不要直接照搬名句/神名/塔罗/七宗罪标签。',
|
|
103
103
|
'- 成套体系(七宗罪/塔罗/四体液/十二宫)整组使用;不要零散单抽。',
|
|
104
|
-
'-
|
|
104
|
+
'- 名字是设定留下的痕迹/边界,不是流程说明书;现实流程词只能做底层逻辑。',
|
|
105
105
|
'- 名词性 kind 的名字必须能放进“我看见了___”;动作+时长、条件+结果、状态+动作不算名字。',
|
|
106
106
|
'- charging-bar 主风格:名字只能是痕迹/印记/边界/债契;事件、时长、效果全部进 note。',
|
|
107
107
|
'- 字段只能是 id / kind / name / tags / genres / world_id / group_id / subkind / rank_order / note / source;'
|
|
@@ -166,7 +166,7 @@ export function generationPrompt({
|
|
|
166
166
|
lines.push('## 继续生成(同一素材库)', '');
|
|
167
167
|
lines.push('继续遵守最初提示词中的角色、写作原则、质量红线、命名标准、描写标准、查询与追加规则。不要重新解释规则,直接写本批素材。', '');
|
|
168
168
|
lines.push(...compactRules(genres, queryScript, workspace, sourceFixed), '');
|
|
169
|
-
if (worldSummary) lines.push('##
|
|
169
|
+
if (worldSummary) lines.push('## 本批世界设定锁定(必须保持)', '', worldSummary, '');
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
if (styleSummary && !includeBase) {
|
|
@@ -184,7 +184,7 @@ export function generationPrompt({
|
|
|
184
184
|
: mode === 'suggestion'
|
|
185
185
|
? 'suggestion(_novel_topic_suggestion.json)'
|
|
186
186
|
: mode === 'world'
|
|
187
|
-
? 'world
|
|
187
|
+
? 'world(世界设定 + facet 交集)'
|
|
188
188
|
: mode === 'builtin'
|
|
189
189
|
? 'builtin(内置全题材)'
|
|
190
190
|
: mode === 'other'
|
|
@@ -192,14 +192,14 @@ export function generationPrompt({
|
|
|
192
192
|
: String(mode || '未指定');
|
|
193
193
|
lines.push('- 题材模式:' + modeLabel);
|
|
194
194
|
if (worldBlock && includeBase) {
|
|
195
|
-
//
|
|
196
|
-
lines.push('-
|
|
195
|
+
// 世界设定已经包含在 base 里;这里只提醒本批仍受它约束。
|
|
196
|
+
lines.push('- 世界设定:见上方「世界设定(最高优先级)」;本批所有素材都必须从该世界设定推导。');
|
|
197
197
|
}
|
|
198
198
|
if (Array.isArray(genres) && genres.length) {
|
|
199
199
|
lines.push('- 本次题材(全部同时满足):' + genres.join('、'));
|
|
200
200
|
lines.push('- 题材交集规则:以上每一项都必须出现在素材的 genres 里;不是任选其一。');
|
|
201
201
|
} else {
|
|
202
|
-
lines.push('-
|
|
202
|
+
lines.push('- 本次题材:无限制;按世界设定推导,但每条素材仍要写 1–10 个 genres。');
|
|
203
203
|
}
|
|
204
204
|
if (custom) {
|
|
205
205
|
lines.push('- 用户素材类型:' + (custom.allKinds ? 'all(全部 ' + MATERIAL_KINDS.length + ' 个素材类型)' : custom.materialType));
|
|
@@ -284,7 +284,7 @@ function groupHeader({ base, includeBase, worldSummary, styleSummary, modes = ''
|
|
|
284
284
|
} else {
|
|
285
285
|
lines.push('## 继续生成(同一素材库)', '');
|
|
286
286
|
lines.push('继续遵守最初提示词中的角色、写作原则、质量红线、命名标准、描写标准、查询与追加规则。不要重新解释规则,直接写本批素材。', '');
|
|
287
|
-
if (worldSummary) lines.push('##
|
|
287
|
+
if (worldSummary) lines.push('## 本批世界设定锁定(必须保持)', '', worldSummary, '');
|
|
288
288
|
}
|
|
289
289
|
if (styleSummary && !includeBase) lines.push('## 本批风格锁定(写法层,必须保持)', '', styleSummary, '');
|
|
290
290
|
if (modes) lines.push(modes, '');
|
|
@@ -487,7 +487,7 @@ export function generationRunText({
|
|
|
487
487
|
lines.push('本次新增:' + importedTotal + ' 条');
|
|
488
488
|
if (Number.isFinite(total)) lines.push('库中素材:' + total + ' 条');
|
|
489
489
|
if (batches) lines.push('已导入批次:' + batches + ' 批');
|
|
490
|
-
if (worldTitle) lines.push('
|
|
490
|
+
if (worldTitle) lines.push('本次世界设定:' + worldTitle);
|
|
491
491
|
if (Array.isArray(styles) && styles.length) {
|
|
492
492
|
lines.push('本次风格:' + styles.map((style) => `${style.style_key}(${style.style_name})`).join('、'));
|
|
493
493
|
}
|
|
@@ -496,9 +496,9 @@ export function generationRunText({
|
|
|
496
496
|
if (progressFile) lines.push('进度文件:' + progressFile);
|
|
497
497
|
if (flowFile) lines.push('世界状态:' + flowFile);
|
|
498
498
|
if (aborted || incomplete.length || notStarted.length || stopReason) {
|
|
499
|
-
lines.push('继续追加:/fancy-material continue
|
|
499
|
+
lines.push('继续追加:/fancy-material continue(沿用本次世界设定);已导入素材不会撤销。');
|
|
500
500
|
} else {
|
|
501
|
-
lines.push('素材不够?运行 /fancy-material continue
|
|
501
|
+
lines.push('素材不够?运行 /fancy-material continue 沿用本次世界设定继续生成。');
|
|
502
502
|
}
|
|
503
503
|
return lines.join('\n');
|
|
504
504
|
}
|