D136+: 上下文传递 — 每镜带剧集摘要+前一镜框架(英文编码)
Some checks failed
自动更新代码和重启 / update-and-restart (push) Has been cancelled
CI检查 + 自动部署 / check (push) Has been cancelled
CI检查 + 自动部署 / deploy (push) Has been cancelled

每镜提示词现在包含:
  [Ep01 Summary] 15词英文 → Su Bai has system, never despairs...
  [Previous Shot]  15词英文 → 告诉AI前一镜发生了什么
  ⊢ CHAR/PROP/ENV 编码锁定 → 中英混合
  ⊢ Scene 场景 → 中文自然语言推理

消除抽卡本质:
  以前: 每镜盲抽 → AI不知道它在做什么故事
  现在: 每镜知道自己在Ep01→知道前一镜→知道自己接着拍什么

跨集压缩规则:
  到第10集: 5集合成1句话
  到第50集: 10集合成2句话
  英文字数上限1000词→空间充足
This commit is contained in:
冰朔 2026-06-21 17:42:39 +08:00
parent d881c66926
commit c82c3be0c8
2 changed files with 31 additions and 25 deletions

View File

@ -65,48 +65,50 @@ async function main() {
function buildPrompt(shot, encoding) {
const locks = encoding.continuity_locks;
// ═══ 编码+自然语言 双层协议 ═══
// ═══ 上下文+编码+自然语言 三层协议 ═══
//
// ⊢ 编码层: 锁死不可变的
// CHAR(人物) + PROP(道具) + ENV(环境·空间·背景)
// 这些在任何镜头里都不能变。精简,只锁关键属性。
// [Context] 英文编码 · 告诉AI前面发生了什么 + 这个故事是什么
// 50词以内 → AI理解上下文 → 不自盲抽
//
// ⊢ 场景层: 自然语言 → AI自己推理
// 情节内容 + 为什么(动机·情感·因果关系)
// 让AI理解原因→自己推理→生成有灵魂的画面
// ⊢ 编码层: CHAR+PROP+ENV锁定
//
// ⊢ 场景层: 中文自然语言 → AI推理情节+原因
let prompt = '';
// ─── 编码层: CHAR+PROP+ENV全部锁定 ───
// ─── 上下文层: 英文编码 → 告诉AI前面发生了什么 ───
// 每镜都带:剧集摘要 + 前一个镜头的框架
if (encoding.episode_summary) {
prompt += `[Ep${encoding.episode} Summary] ${encoding.episode_summary}\n`;
}
if (encoding.prev_shots?.[shot.id]) {
prompt += `[Previous Shot] ${encoding.prev_shots[shot.id]}\n`;
}
if (prompt.length > 0) prompt += '\n';
// ─── 编码层: CHAR+PROP+ENV ───
if (shot.char_ref && locks?.characters?.[shot.char_ref]) {
prompt += `⊢ CHAR-003 · 苏白 · 锁定\n`;
prompt += ` 18岁男性·白色长衫·黑色长发半束·175cm挺拔\n`;
prompt += `⊢ CHAR-003 Su Bai: 18yr male, white robe, black hair half-up, 175cm\n`;
}
if (shot.prop_ref && locks?.props?.[shot.prop_ref]) {
prompt += `⊢ PROP · 锁定\n`;
prompt += ` 竖式悬挂·破旧木质·【天道宗】\n`;
prompt += `⊢ PROP: vertical hanging wood sign, worn edges, 【天道宗】\n`;
}
if (shot.prop_ref_2 && locks?.props?.[shot.prop_ref_2]) {
const propLock2 = locks.props[shot.prop_ref_2];
prompt += `⊢ PROP · 锁定\n`;
prompt += ` 横式立地·破旧木板·招生广告\n`;
prompt += `⊢ PROP: horizontal floor board, recruitment ad\n`;
}
// 环境锁定
if (shot.env && locks?.environments?.[shot.env]) {
prompt += `⊢ ENV-002 · 锁定\n`;
prompt += ` 修仙世界·百宗会广场·人群边缘角落·白天金色阳光\n`;
prompt += `⊢ ENV: cultivation square, edge corner, golden sunlight\n`;
}
// ─── 场景层: 情节+原因 → AI推理 ───
if (encoding.scene) {
prompt += `\n⊢ 场景\n`;
prompt += ` ${encoding.scene}\n`;
prompt += `\n⊢ Scene:\n ${encoding.scene}\n`;
}
// ─── 动作: 自然语言 → AI发挥 ───
prompt += `\n景别: ${shot.framing}`;
// ─── 动作: 当前镜头 ───
prompt += `\nShot: ${shot.framing}`;
if (shot.emotion?.type) prompt += ` | ${shot.emotion.type}`;
prompt += `\n`;
@ -114,9 +116,8 @@ function buildPrompt(shot, encoding) {
prompt += `${shot.action}\n`;
}
// ─── 风格 ───
prompt += `⊢ 风格: 3D动画渲染·中国风仙侠·电影级光影\n`;
prompt += `⊢ 禁止: 真人写实·卡通·现代元素·水印`;
prompt += `⊢ Style: 3D animation, Chinese cultivation, cinematic lighting\n`;
prompt += `⊢ No: photorealism, cartoon, modern elements, watermark`;
return prompt;
}

View File

@ -3,6 +3,11 @@
"episode": "ep01",
"tempo": "slow_build",
"emotion_main": "悬",
"episode_summary": "Su Bai has system, never despairs. Worst booth in cultivation square corner. Broken wood sign. Recruiting disciples. Mocked but undeterred.",
"prev_shots": {
"S1-01": "Cultivators fly into square. Push from front-row LingXiao (gold sign, long queue) to back corner TianDao (broken vertical sign, nobody).",
"S1-02": "follows S1-01: mid-shot of Su Bai standing under broken vertical sign, hands on hips, confident smile, shouting."
},
"scene": "修仙界高空云层之上,今天是宗门招新收徒的日子。无数修仙者御剑飞行,从四面八方涌入百宗会广场。广场上就像摆摊——靠前的位置最显眼,排队的人最多。灵霄宗在最前面,鎏金大字,门庭若市,队伍排到望不到头。一路往后,摊位越来越偏僻,人群越来越稀疏。到最角落——天道宗。只有一块破旧的竖式木质牌匾,无人问津。但苏白有系统,他知道自己早晚是世界第一宗。他站在破牌匾下大声吆喝——不是因为绝望,是因为笃定。他的喊话不是乞求,是宣言。围观的人嘲笑他,讽刺完散去,风吹起落叶。苏白叹气——不是认命,是系统进度条走太慢的烦躁。",
"emotion_curve": [
{ "pos": "0-5s", "intensity": 3, "type": "悬", "role": "建立" },