feat(video-from-script): 重构工作流为子Agent分步执行并新增提示词模板系统

将视频制作工作流拆分为独立子步骤:分镜 → 图片提示词 → 生图 → 视频提示词 → 生视频 → 成片,每步由子Agent独立执行。引入prompts/目录统一管理提示词模板(分镜.md、图片提示词.md、视频提示词.md),通过account.json的storyboardPrompt/imageStylePrompt/videoStylePrompt字段引用。

变更内容:
- 新增confirmed机制和pipeline.js confirm命令,生图后必须人工确认才能继续
- manifest schema改用shotDesc/narration/duration/directorRef替代旧字段
- 文件命名规则从keyword改为slug(从shotDesc/narration派生)
- 删除旧的storyboard-rules.md和prompt-rules.md
- pipeline.js脚本拆分为lib/目录下的独立模块(cmd-init/cmd-confirm/cmd-validate/phase-*)
- 新增cmd-create-account支持一键创建带prompts目录的账号
- capcut_assemble支持narration字段替代text作为字幕源
- 新增.gitclaude/settings.json权限配置
This commit is contained in:
2026-04-30 21:18:31 +08:00
parent 7f955647fe
commit 86b9b7948d
32 changed files with 2826 additions and 1292 deletions

View File

@@ -165,7 +165,7 @@ node .claude/skills/video-from-script/scripts/gemini-image-generator.js edit \
# 批量带参考图pipeline init + run
node .claude/skills/video-from-script/scripts/pipeline.js init \
--account forbidden-emperor --mode single \
--items '[{"text":"...","imagePrompt":"...","keyword":"关键词"}]'
--items '[{"shotDesc":"...","narration":"...","duration":5,"imagePrompt":"...","directorRef":"tarantino"}]'
node .claude/skills/video-from-script/scripts/pipeline.js run \
--manifest ./output/forbidden-emperor_XXXXXXXX_001/manifest.json \
--phase images
@@ -328,14 +328,14 @@ const r = await mjGen('prompt', { outputDir: './out', aspectRatio: '9:16' })
## 文件命名规则
Pipeline 生成的文件统一命名,keyword 来自 manifest item 的 `keyword` 字段slugify: 保留中文和字母数字,最多 20 字符,其余变 `_`
Pipeline 生成的文件统一命名,slug 来自 manifest item 的 `narration``shotDesc` 字段slugify: 保留中文和字母数字,最多 20 字符,其余变 `_`
| 模式 | 文件名 | 示例 |
|------|--------|------|
| 单图首帧 | `scene_{NN}_{keyword}.jpeg` | `scene_01_崛起.jpeg` |
| 首尾帧首帧 | `scene_{NN}_{keyword}.jpeg` | `scene_01_觉醒.jpeg` |
| 首尾帧尾帧 | `scene_{NN}_{keyword}_last.jpeg` | `scene_01_觉醒_last.jpeg` |
| MJ 候选图 | `scene_{NN}_{keyword}_cand{1-4}.jpeg` | `scene_01_崛起_cand1.jpeg` |
| 单图首帧 | `scene_{NN}_{slug}.jpeg` | `scene_01_崛起.jpeg` |
| 首尾帧首帧 | `scene_{NN}_{slug}.jpeg` | `scene_01_觉醒.jpeg` |
| 首尾帧尾帧 | `scene_{NN}_{slug}_last.jpeg` | `scene_01_觉醒_last.jpeg` |
| MJ 候选图 | `scene_{NN}_{slug}_cand{1-4}.jpeg` | `scene_01_崛起_cand1.jpeg` |
`{NN}` = 两位场景编号01, 02, ...),对应 items 数组索引。

View File

@@ -51,12 +51,12 @@ digraph batch_gen {
```
output/{name}_{YYYYMMDD}_{NNN}/
├── manifest.json # 主清单(贯穿全流程)
├── images/ # scene_{NN}_{keyword}.jpeg
├── videos/ # scene_{NN}_{keyword}.mp4
├── images/ # scene_{NN}_{slug}.jpeg
├── videos/ # scene_{NN}_{slug}.mp4
└── audio/ # seg_001.mp3
```
命名:图片 `scene_01_悬浮.jpeg` → 视频 `scene_01_悬浮.mp4`keyword 支持中文)
命名:图片 `scene_01_悬浮.jpeg` → 视频 `scene_01_悬浮.mp4`slug 从 narration/shotDesc 派生,支持中文)
## manifest.json
@@ -71,7 +71,7 @@ node scripts/gemini-image-generator.js edit "prompt" -i ./references/ref1.png -o
# Pipeline 批量生图(推荐)
node scripts/pipeline.js init \
--account {account} --mode single \
--items '[{"text":"...","imagePrompt":"...","keyword":"关键词"}]'
--items '[{"shotDesc":"...","narration":"...","duration":5,"imagePrompt":"...","directorRef":"tarantino"}]'
node scripts/pipeline.js run \
--manifest ./output/{account}_XXXXXXXX_001/manifest.json \
--phase images