Skip to content

Show it a video you love. Get a new video in the same style. An AI crew (Claude Code or Codex) plans, builds and reviews it with you.

Setup prompt: skip cast sheets when there are no characters; test retry of a stuck project

許元豪6c7763e98272
diff --git a/app/server/pipeline.test.ts b/app/server/pipeline.test.ts
index 5a0923c..12ccb04 100644
--- a/app/server/pipeline.test.ts
+++ b/app/server/pipeline.test.ts
@@ -272,6 +272,17 @@ describe('no characters', () => {
assert.ok(!calls.some((c) => c.startsWith('cast_')), calls.join(', '));
});
+ test('a project already stuck at setup (missing cast sheet) finishes on retry', async () => {
+ S = base({ chars: [] });
+ const id = newProject('error', { failed: 'producing', error: '缺少輸出:out/check/cast/sheet.jpg', pipeline: { phase: 'setup' } });
+ writeFileSync(join(J.dirOf(id), 'plan.json'), JSON.stringify({ title: 'T', version: 1, characters: [] }));
+ mkdirSync(join(J.dirOf(id), 'build'), { recursive: true }); // the setup turn itself had succeeded
+ writeFileSync(join(J.dirOf(id), 'build', 'production.json'), JSON.stringify({ chunks: S.chunks, characters: [] }));
+ await J.retry(id);
+ assert.equal(J.load(id).stage, 'done', J.load(id).error || '');
+ assert.ok(!calls.includes('setup') && !calls.some((c) => c.startsWith('cast_')), calls.join(', '));
+ });
+
test('a note while paused in the shot line goes to the shots, not to a cast fix', async () => {
let s2 = 0; // S2 fails its first three reviews (the round limit), then passes after the note
S = base({ chars: [], shotPass: (shot) => shot !== 'S2' || ++s2 > 3 });
diff --git a/app/server/prompts.ts b/app/server/prompts.ts
index 8ffb8a6..742d3a7 100644
--- a/app/server/prompts.ts
+++ b/app/server/prompts.ts
@@ -149,6 +149,7 @@ ${ENGINE(p)}
3. **角色設定圖**:每個角色一張 out/check/cast/sheet_<角色id>.jpg(全解析度):正面、3/4、側面、5 個以上表情、
6 個以上本片會用到的動作姿勢(舉手、揮手、拿東西、坐、跑、驚嚇…)。再加一張所有角色並排的 out/check/cast/sheet.jpg(比例、互動姿勢)。
每張都要有可以重新輸出的指令(寫進 production.json 的 characters[].render)。自己先打開看過。
+ plan.characters 是空的(純字卡、動態圖像這類沒有角色的片)就跳過 2、3:不做設定圖,production.json 的 "characters" 寫 [],不要自己加角色。
4. 寫 build/production.json:
{ "cast_sheet": "out/check/cast/sheet.jpg",
"characters": [ { "id": "dou", "name": "豆豆", "file": "build/assets/cast/dou.js", "sheet": "out/check/cast/sheet_dou.jpg", "render": "重新輸出這張設定圖的指令" } ],