@cloud411716/fancy-webnovel 4.30.4 → 4.30.7
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/backlog.md +11 -0
- package/docs/material-library/inspiration-sources.md +580 -0
- package/docs/material-library/prompt.md +185 -35
- package/docs/material-library/quality-spec.md +501 -0
- package/package.json +1 -1
- package/plugins/fancy-douyin/index.js +14 -4
- package/plugins/fancy-material/builtin-styles.js +20 -6
- package/plugins/fancy-material/genre-playbooks.js +22 -3
- package/plugins/fancy-material/index.js +2 -0
- package/plugins/fancy-material/kinds.js +4 -4
- package/plugins/fancy-material/styles.js +249 -24
- package/plugins/fancy-material/templates.js +4 -2
- package/plugins/fancy-material/world.js +8 -5
|
@@ -16,6 +16,7 @@ export const BUILTIN_STYLES = [
|
|
|
16
16
|
account_names: ['宿辞'],
|
|
17
17
|
genre_tags: ['仙侠', '古风', '悬疑', '志怪', '言情'],
|
|
18
18
|
dna: '短、含蓄、谜面式;古典留白;克制不张扬;名字像一句没说完的话。',
|
|
19
|
+
concept_examples: ["无灯巷:路灯坏掉的那一晚,巷子才会出现;走进去的人,影子会留在巷口。", "借灯人:借你一盏灯,灯灭之前不能回头;回头的人,会看见自己的背影还站在原地。"],
|
|
19
20
|
naming_mode: 'image',
|
|
20
21
|
generation_chain: ['抓一个情绪缺口或未尽之事', '把话停在半截,不解释完整', '名字只保留意象/状态,规则藏进 note'],
|
|
21
22
|
image_pool: ['灯', '骨', '纸', '镜', '棺', '香', '渡', '雪', '灰', '门', '影'],
|
|
@@ -51,6 +52,7 @@ export const BUILTIN_STYLES = [
|
|
|
51
52
|
account_names: ['疯狂小鱼'],
|
|
52
53
|
genre_tags: ['仙侠', '玄幻', '悬疑', '都市', '幻境'],
|
|
53
54
|
dna: '意象拼接式命名;名字是场景而不是技能;偏幻境、水域、梦境、轮回、归墟;空灵留白。',
|
|
55
|
+
concept_examples: ["沉眠海:海面像睡着了,船桨划下去没有声音;掉进海里的人,会在别人的梦里醒来。", "忘川渡:渡船不收费,只收一个你不想忘的名字;名字交出去,你还会记得那个人,但不再记得为什么难过。"],
|
|
54
56
|
naming_mode: 'image',
|
|
55
57
|
generation_chain: ['选一个带边界/生死/梦境属性的母题意象', '给它一层可逆、朦胧的轮回规则', '名字只保留意象,规则藏进 note'],
|
|
56
58
|
image_pool: ['海', '镜', '梦', '归墟', '渡', '潮', '雾', '星', '廊', '汀', '潭'],
|
|
@@ -86,6 +88,7 @@ export const BUILTIN_STYLES = [
|
|
|
86
88
|
account_names: ['Ael冷空气'],
|
|
87
89
|
genre_tags: ['科幻', '都市', '悬疑', '西幻', '哲思'],
|
|
88
90
|
dna: '抽象哲学/认知悖论;记忆、观测、虚妄、因果;冷、抽象、精神向;名字本身是一条未解的问题。',
|
|
91
|
+
concept_examples: ["观测盲区:只要没有人看见你,你就不存在;被看见的那一刻,你才被迫拥有一段过去。", "失忆环:每天醒来都会忘记昨天;但昨天的那个人,已经替你记住了今天。"],
|
|
89
92
|
naming_mode: 'image',
|
|
90
93
|
generation_chain: ['选一个认知悖论:观测、记忆、因果、自证', '让名字本身成为一个没有答案的问题', 'note 只给悖论的边界,不给标准答案'],
|
|
91
94
|
image_pool: ['观测', '记忆', '因果', '虚妄', '回声', '盲区', '校准', '悖论', '删除', '昨日'],
|
|
@@ -120,16 +123,17 @@ export const BUILTIN_STYLES = [
|
|
|
120
123
|
style_type: 'naming',
|
|
121
124
|
account_names: ['充电进度条'],
|
|
122
125
|
genre_tags: ['都市', '悬疑', '科幻', '仙侠', '规则怪谈'],
|
|
123
|
-
dna: '
|
|
126
|
+
dna: '日常载体 + 非常规边界;平凡物件/场所/职业被推歪一格,产生极端后果;名字是载体上的残留/边界,不是流程说明书。',
|
|
127
|
+
concept_examples: ["末班电梯:末班之后多停一层没有编号的楼层;走出去的人,会在监控里多一个同名替身。", "负一层便利店:没有客流,却一直营业;店员不收钱,只收“你明天还会来”的承诺。", "共享充电宝·第七号:第七号永远满电,但借的人会少一天。"],
|
|
124
128
|
naming_mode: 'hybrid',
|
|
125
|
-
generation_chain: ['
|
|
129
|
+
generation_chain: ['选一个日常载体:电梯、排队、门禁、回执、便利店', '找它的默认预期和边界:末班、负一层、过期、第七号', '把边界推歪一格,写出极端后果', '补不可逆代价和一条更危险的漏洞', '名字只保留载体+边界/残留,规则藏进 note'],
|
|
126
130
|
image_pool: ['电梯', '物业', '门禁', '打卡', '加班', '调休', '充电宝', '便利店', '末班车', '监控'],
|
|
127
|
-
hook_rule: '
|
|
131
|
+
hook_rule: '名字是载体上的一个不对劲的残留/边界;note 才揭示规则、代价和漏洞。',
|
|
128
132
|
naming_rules: {
|
|
129
133
|
length: [3, 8],
|
|
130
|
-
syntax: ['
|
|
134
|
+
syntax: ['载体+边界/残留', '场所/职业+异常属性', '制度词+超自然后果'],
|
|
131
135
|
suffixes: [],
|
|
132
|
-
forbidden: ['纯工具名词直接入库', '
|
|
136
|
+
forbidden: ['纯工具名词直接入库', '无边界修饰的机务段/信号楼/电梯/业委会/快递柜', '裸载体当名字'],
|
|
133
137
|
tone: '日常、冷静、略带荒诞',
|
|
134
138
|
},
|
|
135
139
|
lexicon: {
|
|
@@ -145,7 +149,7 @@ export const BUILTIN_STYLES = [
|
|
|
145
149
|
power_rank: ['实习生', '正式工', '项目经理', '业委会主任'],
|
|
146
150
|
world_rule: ['每晚 23:00,电梯会停靠不存在的负一层。'],
|
|
147
151
|
},
|
|
148
|
-
anti_examples: ['
|
|
152
|
+
anti_examples: ['电梯(裸词,没有边界和规则)', '业委会(裸词)', '信号楼(裸词)', '神秘电梯(空形容词+载体)', '异能门禁(功能直译)', '物业法则(说明书词)'],
|
|
149
153
|
compatibility: { 都市: 'native', 悬疑: 'native', 科幻: 'native', 仙侠: 'adaptable', 玄幻: 'adaptable', 言情: 'weak', 历史: 'weak', 西幻: 'adaptable' },
|
|
150
154
|
confidence: 0.85,
|
|
151
155
|
},
|
|
@@ -156,6 +160,7 @@ export const BUILTIN_STYLES = [
|
|
|
156
160
|
account_names: ['鱼望川', '月不亮〖主页娶图〗', '选择档案局'],
|
|
157
161
|
genre_tags: ['仙侠', '玄幻', '洪荒', '都市', '超能力'],
|
|
158
162
|
dna: '用“请选择你的修仙道/修派/灵根/超能力”组织内容;名字短、有判词感;选项之间是不同道路,不是同义换皮。',
|
|
163
|
+
concept_examples: ["坐忘道:入门先忘掉自己的名字;还记得名字的人,会被道门当成叛徒。", "问剑崖:崖上插着历代剑修的本命剑;拔出一把,就要替剑主还一个未了的因果。"],
|
|
159
164
|
naming_rules: {
|
|
160
165
|
length: [2, 6],
|
|
161
166
|
syntax: ['道途名', '灵根/派系名', '神兵名+判词'],
|
|
@@ -187,6 +192,7 @@ export const BUILTIN_STYLES = [
|
|
|
187
192
|
account_names: ['我家狗伴我岁岁年年'],
|
|
188
193
|
genre_tags: ['悬疑', '都市', '民俗', '灵异', '生活'],
|
|
189
194
|
dna: '从民间规矩、生活细节、口耳相传的禁忌里提炼;短句像老人叮嘱;不讲大道理,只给一条不能做的事。',
|
|
195
|
+
concept_examples: ["夜里听见有人叫全名,不能答应;答应的人,会替叫名字的东西活到天亮。", "床头不能放空碗;空碗过夜,会自己盛满你明天要说的话。"],
|
|
190
196
|
naming_rules: {
|
|
191
197
|
length: [4, 14],
|
|
192
198
|
syntax: ['时间/场景+禁止动作', '日常物件+禁忌', '身份+规矩'],
|
|
@@ -218,6 +224,7 @@ export const BUILTIN_STYLES = [
|
|
|
218
224
|
account_names: ['万山听籁写作屋', '晚时见', '栖屿.'],
|
|
219
225
|
genre_tags: ['古风', '仙侠', '言情', '历史', '诗词'],
|
|
220
226
|
dna: '古典意象、词库、取名、情绪与江南物候;短词为主,重视语感、画面和留白;不解释,只给词。',
|
|
227
|
+
concept_examples: ["月照花林:月光照到的地方,花会开;花开的那一夜,林子里会多一个没有影子的人。", "半盏灯:灯只剩半盏油,照不亮整间屋;但灯灭之前,屋里的人不能说“我走了”。"],
|
|
221
228
|
naming_rules: {
|
|
222
229
|
length: [2, 6],
|
|
223
230
|
syntax: ['名词+名词', '形容词+意象', '姓氏/名字组合'],
|
|
@@ -249,6 +256,7 @@ export const BUILTIN_STYLES = [
|
|
|
249
256
|
account_names: ['怪物档案管理员', '我愿'],
|
|
250
257
|
genre_tags: ['神话', '玄幻', '悬疑', '志怪', '洪荒'],
|
|
251
258
|
dna: '编号档案、原典引用、神格/种族/谱系;先记录,再解释;有“档案已解密”的冷感。',
|
|
259
|
+
concept_examples: ["M-050 蒲牢:龙生九子,唯它畏鲸;鲸一叫,它就会替所有钟声哭。", "M-025 精卫:她先死在了东海,才变成填海的鸟;所以每一次填海,都是她在埋自己。"],
|
|
252
260
|
naming_rules: {
|
|
253
261
|
length: [2, 8],
|
|
254
262
|
syntax: ['编号+名称', '种族+神格', '原典名+档案编号'],
|
|
@@ -280,6 +288,7 @@ export const BUILTIN_STYLES = [
|
|
|
280
288
|
account_names: ['兀清小说素材库'],
|
|
281
289
|
genre_tags: ['仙侠', '道教', '历史', '修真', '悬疑'],
|
|
282
290
|
dna: '道教术语、内丹、灵茶灵膳、修真地名;像从古籍和科仪里抄出来的词条;有术语密度,但不生僻到读不懂。',
|
|
291
|
+
concept_examples: ["上丹田:不是穴位,是一间只在打坐时出现的屋子;屋里坐着另一个你。", "灵茶·松风:喝下去能听见松风;风停之前不能说话,说话的人会把风吞进肺里。"],
|
|
283
292
|
naming_rules: {
|
|
284
293
|
length: [2, 8],
|
|
285
294
|
syntax: ['术语+注释', '功法阶段+意象', '灵物+用途'],
|
|
@@ -311,6 +320,7 @@ export const BUILTIN_STYLES = [
|
|
|
311
320
|
account_names: ['AI视觉实战库', '就是薯条君(ai漫剧可带', '奇点会作'],
|
|
312
321
|
genre_tags: ['视觉', 'AI漫剧', '古风', '仙侠', '分镜'],
|
|
313
322
|
dna: '神兵、法宝、角色、场景、灵力、打斗分镜;为画面服务,强调视觉资产和镜头感,不是纯文字命名。',
|
|
323
|
+
concept_examples: ["水墨山河:每一座山都是一笔未干的墨;走进画里的人,会变成下一笔。", "剑光分镜:剑光不是特效,是镜头;被剑光扫过的人,会从画面里被剪掉。"],
|
|
314
324
|
naming_rules: {
|
|
315
325
|
length: [3, 10],
|
|
316
326
|
syntax: ['物件+视觉特征', '角色+风格标签', '场景+镜头元素'],
|
|
@@ -342,6 +352,7 @@ export const BUILTIN_STYLES = [
|
|
|
342
352
|
account_names: ['玄宸'],
|
|
343
353
|
genre_tags: ['仙侠', '玄幻', '修真', '宗门'],
|
|
344
354
|
dna: '体质、秘境、秘术、宗门黑幕成组出现;四字词组为主,后接一条规则/代价;有“设定图鉴”的完整感。',
|
|
355
|
+
concept_examples: ["烬日熔城:城是活的;太阳落山时会把整座城熔成一条河,河里漂着没烧完的名字。", "焚风祭塔:塔里供的不是神,是历代被烧死的祭师;风一停,他们就开始点名。"],
|
|
345
356
|
naming_rules: {
|
|
346
357
|
length: [3, 6],
|
|
347
358
|
syntax: ['四字意象+名词', '秘境名+地貌', '秘术名+效果'],
|
|
@@ -373,6 +384,7 @@ export const BUILTIN_STYLES = [
|
|
|
373
384
|
account_names: ['水饺(码字版)'],
|
|
374
385
|
genre_tags: ['悬疑', '规则怪谈', '惊悚', '无限流', '克苏鲁'],
|
|
375
386
|
dna: '规则怪谈、诡异道具、童话副本、犯罪心理;先给一条规则,再让规则产生恐怖后果;强调信息差和代价。',
|
|
387
|
+
concept_examples: ["永恒的循环:每天醒来都是同一天;唯一的区别是,今天多了一个昨天的你。", "活体地图:地图会记住走过的人;走到地图上没有的地方,地图会开始记住你。"],
|
|
376
388
|
naming_rules: {
|
|
377
389
|
length: [3, 10],
|
|
378
390
|
syntax: ['现象+编号', '规则+后果', '日常场景+异常'],
|
|
@@ -404,6 +416,7 @@ export const BUILTIN_STYLES = [
|
|
|
404
416
|
account_names: ['游渔'],
|
|
405
417
|
genre_tags: ['OC', '花语', '都市', '奇幻', '言情', '悬疑'],
|
|
406
418
|
dna: '花语、动物、神位、异能、心理缺陷、犯罪心理;像在给一个 OC 找“象征物”;名字短,后面跟一条性格/命运解释。',
|
|
419
|
+
concept_examples: ["玫瑰庭:每一朵玫瑰都记得一个死者的名字;摘花的人,会替那个死者活一天。", "知更鸟笼:鸟笼里关的不是鸟,是主人说不出口的那句话;笼门一开,话就会替主人说。"],
|
|
407
420
|
naming_rules: {
|
|
408
421
|
length: [2, 6],
|
|
409
422
|
syntax: ['花/动物名+象征', '异能+心理', '神位+缺陷'],
|
|
@@ -435,6 +448,7 @@ export const BUILTIN_STYLES = [
|
|
|
435
448
|
account_names: ['牛哥网文指导'],
|
|
436
449
|
genre_tags: ['写作', '教学', '网文', '方法论'],
|
|
437
450
|
dna: '写作方法、打斗描写、章末钩子、爽点桥段;像老作者带新人,讲可执行的手艺,不讲空泛灵感。',
|
|
451
|
+
concept_examples: ["开篇前三章:不是三章,是读者给你的三次机会;第三次还没钩住,后面写再好也没人看。", "章末钩子:不是悬念,是“下一章非看不可”的欠条;欠条不兑现,读者就会来讨债。"],
|
|
438
452
|
naming_rules: {
|
|
439
453
|
length: [4, 20],
|
|
440
454
|
syntax: ['方法名+动作', '问题+解法', '经验判断'],
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
const CLUSTERS = [
|
|
8
8
|
{
|
|
9
9
|
title: '玄幻仙侠',
|
|
10
|
+
source_blocks: ['1 中国古典诗词','2 中国典籍与博物','3 中国神话/道教/民俗'],
|
|
11
|
+
sources: ['山海经','楚辞','淮南子','抱朴子','太平广记','聊斋志异','封神演义','道教上清/灵宝','民间丧葬/行业禁忌'],
|
|
10
12
|
aliases: ['仙侠', '修真', '玄幻', '东方仙侠', '传统玄幻', '玄幻脑洞', '玄幻言情', '都市修真', '洪荒', '封神', '西游'],
|
|
11
13
|
formula: '修仙体系规则 × 世俗行业逻辑:把宗门、修炼、丹器阵换成人间行业(账房、医馆、工程队、科举、商行、镖局)的底层规则。',
|
|
12
14
|
cliches: '废柴退婚、随身老爷爷、丹药全是极品、越级毫发无伤、反派全是智障、灵根只分五属性、秘境捡神装。',
|
|
@@ -14,6 +16,8 @@ const CLUSTERS = [
|
|
|
14
16
|
},
|
|
15
17
|
{
|
|
16
18
|
title: '都市异能',
|
|
19
|
+
source_blocks: ['8 日常/职业/城市','5 历史/制度/律法','6 科学/技术/医学','9 心理学/哲学','11 成套符号'],
|
|
20
|
+
sources: ['城市传说','民俗禁忌','心理学','制度史','职业行话','科技史','社会新闻'],
|
|
17
21
|
aliases: ['都市', '异能', '脑洞', '都市高武', '都市脑洞', '都市日常', '都市种田', '战神赘婿', '超能力', '现代', '校园'],
|
|
18
22
|
formula: '市井日常运行规则 × 超自然能力规则:能力规则必须和日常物品/行为的原生逻辑一致,不是把物品当武器。',
|
|
19
23
|
cliches: '校花倒贴、透视眼、医圣兵王、无脑打脸、豪门认亲、系统无限抽奖、异能只有打打杀杀。',
|
|
@@ -21,6 +25,8 @@ const CLUSTERS = [
|
|
|
21
25
|
},
|
|
22
26
|
{
|
|
23
27
|
title: '西方奇幻与哲思',
|
|
28
|
+
source_blocks: ['4 外国文学/神话/宗教','11 成套符号'],
|
|
29
|
+
sources: ['希腊罗马神话','北欧神话','圣经','亚瑟王','炼金术','哥特文学','克苏鲁'],
|
|
24
30
|
aliases: ['西幻', '奇幻', '西方奇幻', '哲思', '克苏鲁', '神话'],
|
|
25
31
|
formula: '神话/哲学规则 × 世俗运行逻辑:把七宗罪、神性、契约、律法嫁接现代/中世纪日常规则,不是换皮打怪。',
|
|
26
32
|
cliches: '勇者斗恶龙、元素对轰、精灵矮人模板、开局废柴、系统召唤、神魔无脑站边。',
|
|
@@ -28,6 +34,8 @@ const CLUSTERS = [
|
|
|
28
34
|
},
|
|
29
35
|
{
|
|
30
36
|
title: '科幻末世',
|
|
37
|
+
source_blocks: ['6 科学/技术/医学','5 历史/制度/经济'],
|
|
38
|
+
sources: ['科技史','经济学','军事史','生物学','控制论','灾难史','材料学'],
|
|
31
39
|
aliases: ['科幻', '末世', '赛博朋克', '蒸汽朋克', '废土', '星际', '游戏', '电竞', '游戏体育', '动漫衍生', '男频衍生'],
|
|
32
40
|
formula: '生存/竞技规则 × 经营管理逻辑:末世、游戏、竞技的压力和仓储、运维、排班、成本核算结合,爽点来自秩序建立。',
|
|
33
41
|
cliches: '无限空间无脑通关、末世全靠主角、丧尸背景板、系统送神装、队友全是拖油瓶。',
|
|
@@ -35,6 +43,8 @@ const CLUSTERS = [
|
|
|
35
43
|
},
|
|
36
44
|
{
|
|
37
45
|
title: '历史古代',
|
|
46
|
+
source_blocks: ['5 历史/制度/律法','2 中国典籍与博物'],
|
|
47
|
+
sources: ['史记','汉书','资治通鉴','齐民要术','天工开物','本草纲目','地方志','官制/律法'],
|
|
38
48
|
aliases: ['历史', '古代', '民国', '年代', '抗战', '谍战', '历史古代', '历史脑洞', '抗战谍战'],
|
|
39
49
|
formula: '历史背景规则 × 现代专业思维:用会计、工程、法律、传媒、医学等专业逻辑解决古代/近代问题,制造规则错位。',
|
|
40
50
|
cliches: '背古诗装逼、造玻璃肥皂一统天下、皇帝言听计从、后宫全收、金手指直接改历史。',
|
|
@@ -42,6 +52,8 @@ const CLUSTERS = [
|
|
|
42
52
|
},
|
|
43
53
|
{
|
|
44
54
|
title: '言情情感',
|
|
55
|
+
source_blocks: ['1 中国古典诗词','5 历史/制度/社会','9 心理学/哲学'],
|
|
56
|
+
sources: ['诗经','唐诗宋词','世说新语','家族史','心理学','社会新闻'],
|
|
45
57
|
aliases: ['言情', '古言', '现言', '青春', '甜宠', '虐恋', '豪门', '婚恋', '宫斗', '宅斗', '古风世情', '现言脑洞', '青春甜宠', '星光璀璨', '职场婚恋', '豪门总裁', '民国言情', '种田', '女频衍生'],
|
|
46
58
|
formula: '情感关系张力 × 身份/规则错位:感情拉扯来自身份、规则、立场的天然冲突,不靠误会和恶毒配角。',
|
|
47
59
|
cliches: '替身梗、带球跑、恶毒女配、霸总强制爱、误会一百章不解、落水必接吻、生病必照顾。',
|
|
@@ -49,6 +61,8 @@ const CLUSTERS = [
|
|
|
49
61
|
},
|
|
50
62
|
{
|
|
51
63
|
title: '悬疑灵异',
|
|
64
|
+
source_blocks: ['3 中国神话/民俗/术数','4 外国文学/怪谈','8 日常/城市','9 心理学/哲学'],
|
|
65
|
+
sources: ['民俗','地方志','刑侦档案','法医','宗教禁忌','怪谈','太平广记'],
|
|
52
66
|
aliases: ['悬疑', '灵异', '惊悚', '恐怖', '志怪', '民俗', '规则怪谈', '刑侦', '推理', '探案', '悬疑脑洞', '女频悬疑', '悬疑灵异'],
|
|
53
67
|
formula: '异常规则 × 日常场所运行逻辑:诡异现象遵循自洽规则,和日常场所秩序绑定;恐怖来自规则的未知性,不是血腥 jump scare。',
|
|
54
68
|
cliches: '红衣女鬼、精神病结局、做梦结局、祖传阴阳眼、道士做法秒破局、凶手全是变态。',
|
|
@@ -56,6 +70,8 @@ const CLUSTERS = [
|
|
|
56
70
|
},
|
|
57
71
|
{
|
|
58
72
|
title: '宅斗快穿',
|
|
73
|
+
source_blocks: ['5 历史/制度/社会','9 心理学/哲学','10 叙事母题/戏剧'],
|
|
74
|
+
sources: ['家族史','宫廷制度','管理学','博弈论','地方志'],
|
|
59
75
|
aliases: ['宫斗', '宅斗', '快穿', '宫斗宅斗'],
|
|
60
76
|
formula: '内宅/任务规则 × 职场/项目管理逻辑:把宅斗、快穿博弈换成绩效考核、项目交付、规则利用,不靠下毒打胎。',
|
|
61
77
|
cliches: '麝香打胎、落水失贞、姐妹反目、系统强制任务、宿主全能、反派全是蠢货。',
|
|
@@ -80,17 +96,20 @@ export function selectGenreClusters(genres = []) {
|
|
|
80
96
|
* 只渲染本次相关题材簇。没有命中时给一段通用兜底,不输出全部题材规则。
|
|
81
97
|
*/
|
|
82
98
|
export function renderGenreBlock(genres = []) {
|
|
99
|
+
const prefix = '> 题材块只提供词汇、俗套黑名单和可用方向,优先级低于世界母体、kind 硬规则和主命名风格;不要用题材公式覆盖世界母体。';
|
|
83
100
|
const selected = [...new Set((Array.isArray(genres) ? genres : []).map(clean).filter(Boolean))];
|
|
84
|
-
if (!selected.length) return '(本次未限制题材;按世界母体和本批 kind 要求执行。)';
|
|
101
|
+
if (!selected.length) return prefix + '\n\n(本次未限制题材;按世界母体和本批 kind 要求执行。)';
|
|
85
102
|
const clusters = selectGenreClusters(selected);
|
|
86
103
|
if (!clusters.length) {
|
|
87
|
-
return '(本次题材未命中内置题材簇;以世界母体、facet 交集和本批 kind 要求为准,不要套用未选中的题材体例。)';
|
|
104
|
+
return prefix + '\n\n(本次题材未命中内置题材簇;以世界母体、facet 交集和本批 kind 要求为准,不要套用未选中的题材体例。)';
|
|
88
105
|
}
|
|
89
|
-
const lines = ['本次题材:' + selected.join('、')];
|
|
106
|
+
const lines = [prefix, '', '本次题材:' + selected.join('、')];
|
|
90
107
|
for (const cluster of clusters) {
|
|
91
108
|
lines.push('');
|
|
92
109
|
lines.push('### ' + cluster.title);
|
|
93
110
|
lines.push('- 创意公式:' + cluster.formula);
|
|
111
|
+
lines.push('- 优先来源库:' + cluster.source_blocks.join('、'));
|
|
112
|
+
lines.push('- 具体来源:' + cluster.sources.join('、'));
|
|
94
113
|
lines.push('- 俗套黑名单:' + cluster.cliches);
|
|
95
114
|
lines.push('- 可用方向:' + cluster.directions);
|
|
96
115
|
}
|
|
@@ -1113,6 +1113,7 @@ function kindBlockForItem(item) {
|
|
|
1113
1113
|
const list = Array.isArray(item.kinds) && item.kinds.length ? item.kinds : [];
|
|
1114
1114
|
return [
|
|
1115
1115
|
'本批是能力核心组:六条记录必须指向同一个能力,且互相解释。',
|
|
1116
|
+
'如果本组取材自成套符号体系(七宗罪、塔罗、四体液、十二宫等),六条必须同源、互相制衡;不要把多个体系拼在一起。',
|
|
1116
1117
|
...list.map((kind) => renderKindBlock(kind)),
|
|
1117
1118
|
].join('\n\n');
|
|
1118
1119
|
}
|
|
@@ -1120,6 +1121,7 @@ function kindBlockForItem(item) {
|
|
|
1120
1121
|
return [
|
|
1121
1122
|
renderKindBlock(item.kind),
|
|
1122
1123
|
'本批是一套完整等级阶梯:每级一条,rank_order 从 1 开始连续递增。',
|
|
1124
|
+
'如果本套取材自成套符号体系,按原体系的阶数/顺序完整生成;成套体系优先整组使用,不要零散单抽。',
|
|
1123
1125
|
].join('\n\n');
|
|
1124
1126
|
}
|
|
1125
1127
|
return renderKindBlock(item.kind);
|
|
@@ -158,10 +158,10 @@ export const KIND_QUALITY = {
|
|
|
158
158
|
surname: '有典籍出处或历史渊源;避免极生僻字、多音易误读字;辨识度高于普通大姓,但读者能顺畅认读;严格匹配题材时代与地域背景,禁止跨文化乱入。',
|
|
159
159
|
given_name: '有画面感与意象底色;不用生僻字堆砌文雅感;读音顺口、字形协调,符合对应题材的时代语感;禁止三个字全是生僻字、读音拗口的组合。',
|
|
160
160
|
nickname: '贴合人物能力/身份/标志性动作,有记忆点,不低俗;有对应题材的专属语感(江湖/组织/赛博/教会);顺口好记,喊出来有气场。',
|
|
161
|
-
place_name: '都市类必须有二重身份:name 写内层隐秘地名,note 写表层日常地址/伪装名;非都市类要有地域质感。名字自带场景感与故事钩子,不是“XX路/XX
|
|
162
|
-
faction_name: '
|
|
163
|
-
skill_name: '
|
|
164
|
-
ability_name: '
|
|
161
|
+
place_name: '都市类必须有二重身份:name 写内层隐秘地名,note 写表层日常地址/伪装名;非都市类要有地域质感。名字自带场景感与故事钩子,不是“XX路/XX楼”通用地址;严格匹配题材文化体系。平庸黑名单(裸词):机务段、信号楼、冷库、锅炉房、快递柜这类没有异常边界的纯写实地名。',
|
|
162
|
+
faction_name: '分三级+分题材命名:顶级用使命意象名、中层用行业/地盘名、底层用特征代号;体例后缀严格匹配题材。禁止全用直白职业名,禁止跨题材乱用词缀。平庸黑名单(裸词):业委会、家政、电梯班、路灯班、绿化队这类没有异常边界的现实职业名。',
|
|
163
|
+
skill_name: '核心规则藏在 note 或名字的残留里,不直白喊功能;体例后缀严格匹配题材体系(中式诀/式/令,西幻契/印/律,科幻协议/阈值);不用生僻典故,能猜出效果方向;不是“XX拳/XX掌”的大路货。',
|
|
164
|
+
ability_name: '走「世界母体动作/意象 + 规则凝练」路线;禁止把现实流程/业务词裸写成能力名;日常系统只能做载体,名字必须落到世界母体的动作、物件、状态或异常边界上。都市类 name 写内层能力名,note 写表层日常功能名;内层名从世界母体的能力类别/命名逻辑取,不能反客为主。平庸黑名单只是示例:免单、占线、静音、折叠、撤回、取号、窗口、回执、闸机、副卡、拼单、分期、转租、加盟;不要用同义词换皮。',
|
|
165
165
|
item_name: '走痕迹感路线,名字带数字/缺损/年代/主人痕迹至少一项;材质与命名风格匹配题材;不是“形容词+通用名词”;有专属感,换名字功能不成立。',
|
|
166
166
|
monster_name: '有生态感,能脑补外形与习性;不猎奇、不堆恐怖词;贴合生存环境与题材世界观。',
|
|
167
167
|
mythic_being: '有氛围感与分量感,自带传说底色;不照搬现有神话本名,做原创化改编;风格匹配题材神话体系,不用极端生僻字。',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 风格注册表:内置风格 + 数据库 douyin_style。
|
|
3
3
|
*
|
|
4
|
-
* 风格是跨 kind
|
|
4
|
+
* 风格是跨 kind 的写法倾向;世界母体和 kind 的硬规则优先。
|
|
5
5
|
* 这里不处理具体生成,只负责加载、合并、按题材选择、渲染成提示词。
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -11,6 +11,162 @@ import { BUILTIN_STYLES, SELECTABLE_STYLE_TYPES } from './builtin-styles.js';
|
|
|
11
11
|
|
|
12
12
|
export const STYLE_TABLE = 'douyin_style';
|
|
13
13
|
|
|
14
|
+
const FALLBACK_EXAMPLES = {
|
|
15
|
+
'elegant-alias': {
|
|
16
|
+
concept: [
|
|
17
|
+
'扶摇:风的名字;叫一声“扶摇”,风会替你翻过一页书,但书页上的人会少一个。',
|
|
18
|
+
'寒酥:雪的名字;在掌心写“寒酥”,雪会落在你写的那个人门口。',
|
|
19
|
+
],
|
|
20
|
+
anchors: {
|
|
21
|
+
skill_name: ['扶摇', '寒酥', '望舒'],
|
|
22
|
+
item_name: ['碧落帖', '半盏灯'],
|
|
23
|
+
place_name: ['月照花林', '江南旧巷'],
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
'elegant-decay': {
|
|
27
|
+
concept: [
|
|
28
|
+
'银餐具:越精致的餐具,越会记住上一任主人的死法;用它吃饭的人,会梦见那把刀。',
|
|
29
|
+
'白手套:戴上它,手不会脏;但摘下来时,手上会多一道不属于你的伤。',
|
|
30
|
+
],
|
|
31
|
+
anchors: {
|
|
32
|
+
item_name: ['银餐具', '白手套'],
|
|
33
|
+
skill_name: ['晚宴礼仪', '拆骨刀'],
|
|
34
|
+
faction_name: ['守丧会'],
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
'everyday-dungeon': {
|
|
38
|
+
concept: [
|
|
39
|
+
'末班地铁:末班车不是回家,是去一个每天重置的副本;乘客必须在下一站前找到自己的座位。',
|
|
40
|
+
'24小时便利店:凌晨三点后,店门只进不出;货架上的商品会开始叫你的名字。',
|
|
41
|
+
],
|
|
42
|
+
anchors: {
|
|
43
|
+
place_name: ['末班地铁', '24小时便利店', '负一层停车场'],
|
|
44
|
+
skill_name: ['存档点', '读档'],
|
|
45
|
+
monster_name: ['夜班店员'],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
'honghuang-scale': {
|
|
49
|
+
concept: [
|
|
50
|
+
'不周山:天柱断处;站在山下的人,会听见自己祖先的名字。',
|
|
51
|
+
'归墟:万水所归;掉进去的东西不会死,会从另一个人的梦里浮出来。',
|
|
52
|
+
],
|
|
53
|
+
anchors: {
|
|
54
|
+
place_name: ['不周山', '归墟'],
|
|
55
|
+
faction_name: ['洪荒祖庭'],
|
|
56
|
+
skill_name: ['开天', '补天'],
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
'folk-rule-list': {
|
|
60
|
+
concept: [
|
|
61
|
+
'夜路三条:走夜路时,第一不要回头,第二不要答应,第三不要数台阶。',
|
|
62
|
+
'空屋规矩:进空屋前先敲三下;第三下之后,屋里如果有人应,立刻走。',
|
|
63
|
+
],
|
|
64
|
+
anchors: {
|
|
65
|
+
world_rule: ['夜里听见有人叫全名,不能答应。'],
|
|
66
|
+
place_name: ['不回头巷', '空门槛'],
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
'canon-twist': {
|
|
70
|
+
concept: [
|
|
71
|
+
'美杜莎:不是她把人变成石头,是你不敢直视真相;石像里还留着他们的意识。',
|
|
72
|
+
'精卫:她先死在了东海,才变成填海的鸟;每一次填海,都是她在埋自己。',
|
|
73
|
+
],
|
|
74
|
+
anchors: {
|
|
75
|
+
monster_name: ['美杜莎', '精卫'],
|
|
76
|
+
world_rule: ['被观看者,才拥有被改写的命运。'],
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
'character-dossier': {
|
|
80
|
+
concept: [
|
|
81
|
+
'角色档案:先写他最怕别人知道的一件事,再写他每天怎么掩饰;档案越完整,越像一个活人。',
|
|
82
|
+
'关系档案:不要写“他们相爱”,写“他们每次见面都要先确认对方还记不记得自己”。',
|
|
83
|
+
],
|
|
84
|
+
anchors: {
|
|
85
|
+
world_rule: ['档案里不能写“爱”,只能写他为你做过什么。'],
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
'cultivation-notebook': {
|
|
89
|
+
concept: [
|
|
90
|
+
'修炼笔记:每升一境,先写“我失去了什么”,再写“我得到了什么”;失去的那一栏不能空。',
|
|
91
|
+
'功法批注:同一本功法,三个人批注出三种死法;第四个人照着练,会死在他们没写的那一页。',
|
|
92
|
+
],
|
|
93
|
+
anchors: {
|
|
94
|
+
skill_name: ['养气', '产药', '周天'],
|
|
95
|
+
world_rule: ['功法批注不能写“必胜”,写了的人会先输一次。'],
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
'institution-slice': {
|
|
99
|
+
concept: [
|
|
100
|
+
'正祀司办事大厅:神像坐在取号机后面,号码纸就是符;窗口只办愿,不办人。',
|
|
101
|
+
'夜班业委会:白天管物业,晚上管这栋楼里不交物业费的东西。',
|
|
102
|
+
],
|
|
103
|
+
anchors: {
|
|
104
|
+
faction_name: ['正祀司', '夜班业委会'],
|
|
105
|
+
place_name: ['办事大厅', '负一层便利店'],
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
'ranking-board': {
|
|
109
|
+
concept: [
|
|
110
|
+
'等级榜:榜上不是最强的人,而是“最不能被替代的人”;第一名每年换一次,换下来的人会消失。',
|
|
111
|
+
'悬赏榜:赏金最高的不是最危险的怪物,是最像人的那个。',
|
|
112
|
+
],
|
|
113
|
+
anchors: {
|
|
114
|
+
power_rank: ['未入榜', '末位', '榜首'],
|
|
115
|
+
faction_name: ['榜单管理处'],
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
'term-entry': {
|
|
119
|
+
concept: [
|
|
120
|
+
'愿孔:借香不还愿,掌心烫出一个孔;先失味觉,再失嗅觉,最后认不出亲人。',
|
|
121
|
+
'金身:九个愿孔之后,人变成一尊不会哭、不会饿、不会拒绝的神。',
|
|
122
|
+
],
|
|
123
|
+
anchors: {
|
|
124
|
+
item_name: ['愿器', '香牌'],
|
|
125
|
+
world_rule: ['愿孔不能补,只能拿另一个人的愿来填。'],
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
'mirror-pair': {
|
|
129
|
+
concept: [
|
|
130
|
+
'白事铺/黑市:白事铺卖活人的葬礼,黑市卖死人的户口;两家开在同一条街,中间只隔一扇门。',
|
|
131
|
+
'光明道/黑暗道:两条道共用一套功法;选一条,另一条的代价会落在你最爱的人身上。',
|
|
132
|
+
],
|
|
133
|
+
anchors: {
|
|
134
|
+
faction_name: ['白事铺', '黑市'],
|
|
135
|
+
skill_name: ['白刃/黑刃', '生契/死契'],
|
|
136
|
+
world_rule: ['白事铺与黑市不能在同一天开门。'],
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
function fallbackExampleSource(style) {
|
|
142
|
+
const key = String(style && style.style_key || '');
|
|
143
|
+
if (FALLBACK_EXAMPLES[key]) return FALLBACK_EXAMPLES[key];
|
|
144
|
+
const base = BUILTIN_STYLES.find((item) => key === item.style_key || key.endsWith('_' + item.style_key));
|
|
145
|
+
if (base) {
|
|
146
|
+
return {
|
|
147
|
+
concept: asArray(base.concept_examples),
|
|
148
|
+
anchors: asObject(base.cross_kind_examples),
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function styleConceptExamples(style) {
|
|
155
|
+
const own = asArray(style.concept_examples).filter(Boolean);
|
|
156
|
+
if (own.length) return own;
|
|
157
|
+
return asArray(fallbackExampleSource(style)?.concept);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function styleAnchorExamples(style) {
|
|
161
|
+
const own = asObject(style.cross_kind_examples);
|
|
162
|
+
if (Object.keys(own).length) return own;
|
|
163
|
+
return asObject(fallbackExampleSource(style)?.anchors);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function hasStyleExamples(style) {
|
|
167
|
+
return styleConceptExamples(style).length > 0 || Object.keys(styleAnchorExamples(style)).length > 0;
|
|
168
|
+
}
|
|
169
|
+
|
|
14
170
|
function asArray(value) {
|
|
15
171
|
return Array.isArray(value) ? value : [];
|
|
16
172
|
}
|
|
@@ -68,6 +224,7 @@ function normalizeStyle(raw, origin = 'database') {
|
|
|
68
224
|
generation_chain: unique(asArray(merged.generation_chain).map((v) => String(v || '').trim())),
|
|
69
225
|
image_pool: unique(asArray(merged.image_pool).map((v) => String(v || '').trim())),
|
|
70
226
|
hook_rule: String(merged.hook_rule || '').trim(),
|
|
227
|
+
concept_examples: unique(asArray(merged.concept_examples).map((v) => String(v || '').trim())),
|
|
71
228
|
naming_rules: asObject(merged.naming_rules),
|
|
72
229
|
lexicon: asObject(merged.lexicon),
|
|
73
230
|
cross_kind_examples: crossKindExamples,
|
|
@@ -99,6 +256,7 @@ function mergeStyle(base, patch) {
|
|
|
99
256
|
generation_chain: unique([...a.generation_chain, ...b.generation_chain]),
|
|
100
257
|
image_pool: unique([...a.image_pool, ...b.image_pool]),
|
|
101
258
|
hook_rule: b.hook_rule || a.hook_rule,
|
|
259
|
+
concept_examples: unique([...a.concept_examples, ...b.concept_examples]),
|
|
102
260
|
naming_rules: mergeObject(a.naming_rules, b.naming_rules),
|
|
103
261
|
lexicon: mergeObject(a.lexicon, b.lexicon),
|
|
104
262
|
cross_kind_examples: mergeObject(a.cross_kind_examples, b.cross_kind_examples),
|
|
@@ -266,7 +424,23 @@ export function selectStyles(styles, {
|
|
|
266
424
|
.map((style) => ({ style, score: compatibilityLevel(style, genres) }))
|
|
267
425
|
.filter((item) => item.score > 0)
|
|
268
426
|
.sort((a, b) => (b.score - a.score) || (b.style.confidence - a.style.confidence));
|
|
269
|
-
|
|
427
|
+
|
|
428
|
+
// 先保两个命名风格,再保一个结构风格,最后按分数补足。
|
|
429
|
+
// 旧逻辑会让两个 structure 占满名额,只剩一个日常 naming 风格,
|
|
430
|
+
// 结果整个批次都被那一个风格锁死。
|
|
431
|
+
const naming = ranked.filter((item) => item.style.style_type === 'naming');
|
|
432
|
+
const namingWithExamples = naming.filter((item) => hasStyleExamples(item.style));
|
|
433
|
+
const namingPool = namingWithExamples.length ? namingWithExamples : naming;
|
|
434
|
+
const structure = ranked.filter((item) => item.style.style_type === 'structure');
|
|
435
|
+
const chosen = [];
|
|
436
|
+
const push = (item) => {
|
|
437
|
+
if (item && !chosen.includes(item) && chosen.length < Math.max(1, limit)) chosen.push(item);
|
|
438
|
+
};
|
|
439
|
+
push(namingPool[0]);
|
|
440
|
+
push(namingPool[1]);
|
|
441
|
+
push(structure[0]);
|
|
442
|
+
for (const item of ranked) push(item);
|
|
443
|
+
return chosen.slice(0, Math.max(1, limit)).map((item) => item.style);
|
|
270
444
|
}
|
|
271
445
|
|
|
272
446
|
export function stylesForAccount(styles, account) {
|
|
@@ -297,61 +471,111 @@ export function styleIndexLines(styles, { limit = 20 } = {}) {
|
|
|
297
471
|
.map((style) => `- \`${style.style_key}\`(${style.style_name})|${(style.genre_tags || []).join('、') || '通用'}|${style.dna}`);
|
|
298
472
|
}
|
|
299
473
|
|
|
474
|
+
|
|
475
|
+
function dedupeAntiExamples(values) {
|
|
476
|
+
const list = unique(asArray(values).map((value) => String(value || '').trim()).filter(Boolean));
|
|
477
|
+
return list.filter((item) => !list.some((other) => (
|
|
478
|
+
other !== item && other.startsWith(item) && /[((]/.test(other)
|
|
479
|
+
)));
|
|
480
|
+
}
|
|
481
|
+
|
|
300
482
|
/**
|
|
301
483
|
* 生成注入 prompt 的风格块。
|
|
302
484
|
* 只展开本次选中的风格;其余只给索引,避免上下文爆炸。
|
|
303
485
|
*/
|
|
304
486
|
export function stylePromptBlock(styles, selected, { genres = [] } = {}) {
|
|
305
487
|
const picked = Array.isArray(selected) ? selected : [];
|
|
488
|
+
const naming = picked.filter((style) => style.style_type === 'naming');
|
|
489
|
+
const structure = picked.filter((style) => style.style_type === 'structure');
|
|
490
|
+
const primary = naming[0] || null;
|
|
491
|
+
const ordered = primary
|
|
492
|
+
? [primary, ...picked.filter((style) => style.style_key !== primary.style_key)]
|
|
493
|
+
: picked;
|
|
494
|
+
|
|
306
495
|
const lines = [
|
|
307
|
-
'##
|
|
496
|
+
'## 风格锁定(写法层,不覆盖世界母体)',
|
|
308
497
|
'',
|
|
309
|
-
'
|
|
310
|
-
'
|
|
498
|
+
'世界母体的命名逻辑、公理、代价、禁忌优先;kind 的硬规则和平庸黑名单优先。',
|
|
499
|
+
'风格只决定:句式、长度、语气、意象密度、命名模式。',
|
|
500
|
+
'风格不能把世界母体的核心词替换成现实职业词/流程词;日常载体只能做底层逻辑,不能直接当名字。',
|
|
311
501
|
'',
|
|
312
502
|
];
|
|
313
503
|
if (!picked.length) {
|
|
314
|
-
lines.push('
|
|
504
|
+
lines.push('本次未选择账号风格。按世界母体和 kind 规则命名;命名模式默认 image,但世界母体优先。');
|
|
315
505
|
return lines.join('\n');
|
|
316
506
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
507
|
+
|
|
508
|
+
lines.push('### 本次风格分工');
|
|
509
|
+
lines.push('- 主命名风格:' + (primary ? `\`${primary.style_key}\`(${primary.style_name})` : '无(按世界母体和 kind 规则命名)'));
|
|
510
|
+
if (structure.length) {
|
|
511
|
+
lines.push('- 结构参考(不参与命名):' + structure.map((style) => `\`${style.style_key}\``).join('、'));
|
|
512
|
+
}
|
|
513
|
+
lines.push('');
|
|
514
|
+
|
|
515
|
+
for (const style of ordered) {
|
|
516
|
+
const isPrimary = primary && style.style_key === primary.style_key;
|
|
517
|
+
const isNaming = style.style_type === 'naming';
|
|
518
|
+
const role = isPrimary
|
|
519
|
+
? '主命名风格'
|
|
520
|
+
: isNaming
|
|
521
|
+
? '辅助命名风格(只提供辅助意象,不改变主命名模式)'
|
|
522
|
+
: style.style_type === 'structure'
|
|
523
|
+
? '结构参考(不参与命名)'
|
|
524
|
+
: '非命名参考(不参与命名)';
|
|
320
525
|
lines.push(`#### \`${style.style_key}\`(${style.style_name})`);
|
|
526
|
+
lines.push('- 角色:' + role);
|
|
321
527
|
lines.push('- 风格类型:' + style.style_type);
|
|
322
|
-
lines.push('-
|
|
528
|
+
lines.push('- 命名模式:' + (isNaming ? '`' + (style.naming_mode || 'image') + '`' : '不参与命名'));
|
|
323
529
|
lines.push('- 适用题材:' + (style.genre_tags || []).join('、'));
|
|
324
530
|
lines.push('- DNA:' + style.dna);
|
|
325
|
-
if (style.generation_chain && style.generation_chain.length) {
|
|
531
|
+
if (isNaming && style.generation_chain && style.generation_chain.length) {
|
|
326
532
|
lines.push('- 生成链路:');
|
|
327
533
|
for (const step of style.generation_chain) lines.push(' - ' + step);
|
|
328
534
|
}
|
|
329
535
|
if (style.image_pool && style.image_pool.length) {
|
|
330
|
-
lines.push('-
|
|
536
|
+
lines.push('- 载体池(只做底层逻辑,不直接当名字):' + style.image_pool.join('、'));
|
|
331
537
|
}
|
|
332
|
-
if (style.hook_rule) lines.push('- 钩子要求:' + style.hook_rule);
|
|
538
|
+
if (isNaming && style.hook_rule) lines.push('- 钩子要求:' + style.hook_rule);
|
|
333
539
|
const rules = style.naming_rules || {};
|
|
334
540
|
if (rules.length) lines.push('- 长度:' + (Array.isArray(rules.length) ? rules.length.join('–') + ' 字' : rules.length));
|
|
335
541
|
if (rules.syntax) lines.push('- 句式:' + asArray(rules.syntax).join(';'));
|
|
336
542
|
if (rules.suffixes) lines.push('- 可用后缀:' + (asArray(rules.suffixes).join('、') || '无固定后缀'));
|
|
337
|
-
if (rules.forbidden) lines.push('-
|
|
543
|
+
if (rules.forbidden) lines.push('- 禁用写法(不是禁用载体):' + asArray(rules.forbidden).join('、'));
|
|
338
544
|
if (rules.tone) lines.push('- 语气:' + rules.tone);
|
|
339
545
|
const preferred = asArray(style.lexicon && style.lexicon.preferred);
|
|
340
546
|
const forbidden = asArray(style.lexicon && style.lexicon.forbidden);
|
|
341
|
-
if (preferred.length) lines.push('-
|
|
342
|
-
if (forbidden.length) lines.push('-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
547
|
+
if (preferred.length) lines.push('- 偏好词/意象:' + preferred.join('、'));
|
|
548
|
+
if (forbidden.length) lines.push('- 禁用词/意象:' + forbidden.join('、'));
|
|
549
|
+
|
|
550
|
+
const anchors = [];
|
|
551
|
+
for (const [kind, values] of Object.entries(styleAnchorExamples(style))) {
|
|
552
|
+
const list = asArray(values).slice(0, 4);
|
|
553
|
+
if (list.length) anchors.push(` - \`${kind}\`:${list.join('、')}`);
|
|
554
|
+
}
|
|
555
|
+
if (anchors.length) {
|
|
556
|
+
lines.push('- 名字锚点(只校准命名风格,不抄词):');
|
|
557
|
+
lines.push(...anchors);
|
|
347
558
|
}
|
|
348
|
-
|
|
349
|
-
|
|
559
|
+
const concepts = styleConceptExamples(style);
|
|
560
|
+
if (concepts.length) {
|
|
561
|
+
lines.push('- 概念示例(只校准张力,不抄设定):');
|
|
562
|
+
for (const example of concepts.slice(0, 4)) lines.push(' - ' + example);
|
|
350
563
|
}
|
|
564
|
+
const anti = dedupeAntiExamples(style.anti_examples);
|
|
565
|
+
if (anti.length) {
|
|
566
|
+
lines.push('- 反例(失败形态,不是禁用词):' + anti.slice(0, 10).join('、'));
|
|
567
|
+
}
|
|
568
|
+
lines.push('');
|
|
351
569
|
}
|
|
352
|
-
|
|
570
|
+
|
|
353
571
|
lines.push('本批题材:' + (genres.join('、') || '通用'));
|
|
354
|
-
|
|
572
|
+
if (primary) {
|
|
573
|
+
lines.push('本批以 `' + primary.style_key + '` 为主命名风格;其他 naming 风格只提供辅助意象;structure 风格不参与命名。');
|
|
574
|
+
} else {
|
|
575
|
+
lines.push('本批没有命名风格;按世界母体和 kind 规则命名,结构风格只做结构参考。');
|
|
576
|
+
}
|
|
577
|
+
lines.push('世界母体和 kind 的硬规则优先;风格不能豁免。');
|
|
578
|
+
lines.push('示例只校准强度;如果示例与世界母体/kind 冲突,以世界母体/kind 为准。示例中的名字和设定不得原样出现;写出同名/近义就重写。');
|
|
355
579
|
return lines.join('\n');
|
|
356
580
|
}
|
|
357
581
|
|
|
@@ -449,6 +673,7 @@ export async function upsertStyleProfiles(db, profiles, { account = null } = {})
|
|
|
449
673
|
generation_chain: merged.generation_chain,
|
|
450
674
|
image_pool: merged.image_pool,
|
|
451
675
|
hook_rule: merged.hook_rule,
|
|
676
|
+
concept_examples: merged.concept_examples,
|
|
452
677
|
naming_rules: merged.naming_rules,
|
|
453
678
|
lexicon: merged.lexicon,
|
|
454
679
|
cross_kind_examples: merged.cross_kind_examples,
|