product-launch-video

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

product-launch-video - dispatch entry

product-launch-video - 调度入口

Confirm the route before Step 0. This skill makes a video for a product being marketed / launched / promoted. If it's really a general (non-launch) site → video (site tour / showcase, not selling a product) →
/website-to-video
; a topic / concept with no product
/faceless-explainer
; a GitHub PR
/pr-to-video
; an existing video to caption / package
/embedded-captions
·
/graphic-overlays
. Out of scope (decline, don't fake): live / at-render-time data (every value is baked in at author time), or footage / screenshots / an avatar that doesn't exist yet (HyperFrames can't record or capture). Routed here on a vague "make a video", or unsure product-vs-topic / launch-vs-general-site? Read
/hyperframes-read-first
first.
All artifacts are written to
PROJECT_DIR = videos/<project-name>/
(created in Step 0). Paths below are relative to
PROJECT_DIR
. You (the orchestrator) run the Bash steps and dispatch the subagents; per-phase details live in the linked guides/agents/scripts — do not expand them here. Dispatch is harness-portable: before the first subagent dispatch, read
<SKILL_DIR>/../hyperframes-core/references/subagent-dispatch.md
once — it maps the dispatch verbs (parallel fan-out / background / wait) to your harness's primitives; a concurrency cap below N means waves of the cap size, never fewer scenes. This file is a binding runbook, not background reading: execute the steps in order and produce every phase artifact with its designated script or agent role — do not substitute a freestyle pipeline (hand-written narration, ad-hoc TTS calls, one hand-authored composition), and do not skip a pause step because the request seems clear. A step you cannot perform → stop and report; improvising past it breaks every downstream contract.
PhaseExecutionPrimary artifactDetailed flow
initBash directly
hyperframes.json
Step 0 (this file)
captureBash directly (
hyperframes capture
)
capture/extracted/tokens.json
phases/capture/guide.md
design-systemsubagent
design-system/design.html
+
chunks/
agents/design-system.md
story-designsubagent
narrator_scripts.json
agents/story-design.md
audioBash directly (
audio.mjs
)
audio_meta.json
phases/audio/guide.md
visual-designsubagent
section_plan.md
agents/visual-design.md
prepBash directly (
prep.mjs
)
group_spec.json
scripts/prep.mjs
header
captionsBash directly (
captions.mjs group
->
html
)
caption_groups.json
+
compositions/captions.html
scripts/captions.mjs
header
scenesN x subagent (parallel, one scene each)
compositions/scene_*.html
agents/hyperframes-scene.md
finalizeBash prelude (wait-bgm + assemble + transitions + hoist + sfx-verify) -> finalize subagent
renders/video.mp4
Step 7 /
agents/hyperframes-finalize.md
在步骤0前确认路径。本技能用于制作产品营销/发布/推广相关视频。如果需求是制作通用(非发布类)网站视频(网站导览/展示,而非产品销售)→
/website-to-video
;如果是无产品的主题/概念讲解
/faceless-explainer
;如果是GitHub PR相关视频
/pr-to-video
;如果是为现有视频添加字幕/包装
/embedded-captions
·
/graphic-overlays
超出范围的需求(直接拒绝,请勿伪造):实时/渲染时动态数据(所有值均在创作时固定),或不存在的素材/截图/虚拟形象(HyperFrames无法录制或抓取)。若需求模糊(如仅说“制作一个视频”),或无法区分产品类vs主题类、发布类vs通用网站类视频,请先查看**/hyperframes-read-first**。
所有产物均写入
PROJECT_DIR = videos/<project-name>/
(在步骤0中创建)。以下路径均为
PROJECT_DIR
的相对路径。你(协调器)需执行Bash步骤并调度子代理;各阶段的详细信息请参考链接的指南/代理/脚本——请勿在此处展开。调度与执行环境无关:在首次调度子代理前,请阅读
<SKILL_DIR>/../hyperframes-core/references/subagent-dispatch.md
一次——该文档将调度动词(并行分发/后台执行/等待)映射到你的执行环境原语;若并发上限低于N,则按上限分批次执行,场景数量不得少于要求。本文件为约束性运行手册,而非背景阅读材料:请按顺序执行步骤,并使用指定的脚本或代理角色生成每个阶段的产物——请勿替代为自由式流程(手写旁白、临时TTS调用、手动创作合成内容),也请勿因需求看似明确而跳过暂停步骤。若无法执行某一步骤,请停止并上报;擅自跳过会破坏后续所有依赖约定。
阶段执行方式主要产物详细流程
init直接执行Bash命令
hyperframes.json
步骤0(本文件)
capture直接执行Bash命令(
hyperframes capture
capture/extracted/tokens.json
phases/capture/guide.md
design-system子代理执行
design-system/design.html
+
chunks/
agents/design-system.md
story-design子代理执行
narrator_scripts.json
agents/story-design.md
audio直接执行Bash命令(
audio.mjs
audio_meta.json
phases/audio/guide.md
visual-design子代理执行
section_plan.md
agents/visual-design.md
prep直接执行Bash命令(
prep.mjs
group_spec.json
scripts/prep.mjs
头部注释
captions直接执行Bash命令(
captions.mjs group
->
html
caption_groups.json
+
compositions/captions.html
scripts/captions.mjs
头部注释
scenesN个场景子代理并行执行(每个场景一个子代理)
compositions/scene_*.html
agents/hyperframes-scene.md
finalizeBash前置步骤(wait-bgm + assemble + transitions + hoist + sfx-verify)→ finalize子代理执行
renders/video.mp4
步骤7 /
agents/hyperframes-finalize.md

Prerequisites (install before first run)

前置条件(首次运行前安装)

macOS Apple Silicon or Linux x64:
bash
brew install python@3.11 node ffmpeg                   # On Linux, use the apt/dnf equivalent
npx hyperframes doctor                                  # One-time check that Chrome / dependencies are ready
  • python@3.11
    Homebrew Python, not system
    /usr/bin/python3
    (PEP 668 blocks
    pip install
    otherwise); used by the MusicGen fallback
  • node >= 18
    +
    ffmpeg
    (
    audio.mjs
    uses
    ffprobe
    )
  • Chrome downloads automatically on first
    npx hyperframes capture
    .
    hoist-videos.mjs
    (Step 7, runs only when a scene declares footage) reuses that cached Chrome; if it reports deps missing, run
    node <SKILL_DIR>/scripts/hoist-videos.mjs --ensure-deps
    once (~5s)
Optional API keys (unset -> local fallbacks; injection in Step 0.5;
GEMINI_API_KEY
GOOGLE_API_KEY
):
KeyUsed forDefault voice / fallback
HEYGEN_API_KEY
(or
hyperframes auth login
)
TTS (cloud, with word-level timestamps)voice: auto (first English starfish voice; override
--voice
)
ELEVENLABS_API_KEY
TTS (cloud; requires
pip install elevenlabs
)
voice
21m00Tcm4TlvDq8ikWAM
(Rachel)
Neither, and not logged inTTSlocal Kokoro, voice
am_michael
(for non-English, pass
--voice
)
GEMINI_API_KEY
(one key for both uses)
Capture vision caption + Lyria BGMunset -> captions use DOM context only; BGM uses local MusicGen (first run downloads ~300 MB)
适用于macOS Apple Silicon或Linux x64:
bash
brew install python@3.11 node ffmpeg                   # 在Linux系统上,请使用apt/dnf对应的安装命令
npx hyperframes doctor                                  # 一次性检查Chrome及依赖是否就绪
  • python@3.11
    必须是Homebrew安装的Python,而非系统自带的
    /usr/bin/python3
    (PEP 668会阻止
    pip install
    操作);用于MusicGen备选方案
  • node >= 18
    +
    ffmpeg
    audio.mjs
    会使用
    ffprobe
  • 首次执行
    npx hyperframes capture
    时会自动下载Chrome。
    hoist-videos.mjs
    (步骤7,仅当场景声明需要素材时运行)会复用缓存的Chrome;若该命令报告依赖缺失,请执行一次
    node <SKILL_DIR>/scripts/hoist-videos.mjs --ensure-deps
    (约5秒)
可选API密钥(未设置则使用本地备选方案;在步骤0.5中注入;
GEMINI_API_KEY
等价于
GOOGLE_API_KEY
):
密钥用途默认语音/备选方案
HEYGEN_API_KEY
(或
hyperframes auth login
文本转语音(云端服务,支持单词级时间戳)语音:自动选择(首个英文starfish语音;可通过
--voice
参数覆盖)
ELEVENLABS_API_KEY
文本转语音(云端服务;需执行
pip install elevenlabs
语音
21m00Tcm4TlvDq8ikWAM
(Rachel)
未设置上述密钥且未登录文本转语音本地Kokoro语音,
am_michael
(非英文场景可通过
--voice
参数指定)
GEMINI_API_KEY
(一个密钥可用于两种用途)
抓取视觉字幕 + Lyria背景音乐未设置则字幕仅使用DOM上下文;背景音乐使用本地MusicGen(首次运行需下载约300MB数据)

Flow

流程

Step 0.0 - Confirm the brief (one round, then build)

步骤0.0 - 确认简报(一轮沟通后开始制作)

Before Step 0, in one message confirm only what materially shapes the launch video and you can't infer — lead with a recommended default, skip anything the user already gave: the angle / focus (the product overall, a headline feature, an offer / CTA), length (default ~30-90s; up to ~3 min), and — if
/hyperframes-read-first
did not already set them — aspect (default 16:9; 9:16 for vertical / social) and language. The preset is derived from brand capture, not asked. For a fully specified request, skip this and build.
在步骤0之前,仅用一条消息确认对发布视频有实质性影响且无法推断的信息——给出推荐默认值,跳过用户已提供的内容:角度/重点(产品整体、核心功能、优惠/行动号召)、时长(默认约30-90秒;最长约3分钟),以及——若
/hyperframes-read-first
未指定——宽高比(默认16:9;垂直/社交平台使用9:16)和语言。预设风格由品牌信息抓取结果推导,无需询问。若需求已完全明确,可跳过此步骤直接开始制作。

Step 0 - Initialize the video project

步骤0 - 初始化视频项目

cwd is the agent workspace root; all video artifacts go in
PROJECT_DIR = videos/<project-name>/
.
Naming
<project-name>
: an explicit user-given directory wins; otherwise choose a short kebab-case name like
<brand>-promo
(never the workspace basename or a timestamp). From a URL, derive it from the domain/page title; the name is fixed once
capture/
is written.
Initialization (only when
$PROJECT_DIR/hyperframes.json
does not exist):
bash
PROJECT_DIR="${LAUNCH_VIDEO_DIR:-videos/<project-name>}"
mkdir -p "$(dirname "$PROJECT_DIR")"
npx hyperframes init "$PROJECT_DIR" --non-interactive --skip-skills --example=blank
hyperframes init
drops a generic
AGENTS.md
/
CLAUDE.md
into
$PROJECT_DIR
; leave them in place but do not treat their generic guidance as run-time constraints — this skill is the source of truth.
Constraints (each violation breaks later phases):
  • Do not run
    hyperframes init
    (or generate
    AGENTS.md
    /
    CLAUDE.md
    ) in the workspace root; do not create a
    hyperframes/
    subproject inside
    PROJECT_DIR
    .
  • Every subagent dispatch context contains a
    PROJECT_DIR: <path>
    line; the subagent treats it as the project root.
  • cwd discipline (master too): every Bash command runs as a
    (cd "$PROJECT_DIR" && ...)
    subshell — never bare
    cd "$PROJECT_DIR" && ...
    (persistent cwd drift makes later relative paths wrong).
当前工作目录为代理工作区根目录;所有视频产物均存入
PROJECT_DIR = videos/<project-name>/
命名
<project-name>
:优先使用用户明确指定的目录名;否则选择简短的短横线分隔名称,如
<brand>-promo
切勿使用工作区基名或时间戳)。若来自URL,则从域名/页面标题推导;一旦写入
capture/
目录,名称即固定。
初始化操作(仅当
$PROJECT_DIR/hyperframes.json
不存在时执行):
bash
PROJECT_DIR="${LAUNCH_VIDEO_DIR:-videos/<project-name>}"
mkdir -p "$(dirname "$PROJECT_DIR")"
npx hyperframes init "$PROJECT_DIR" --non-interactive --skip-skills --example=blank
hyperframes init
会在
$PROJECT_DIR
中生成通用的
AGENTS.md
/
CLAUDE.md
文件;请保留这些文件,但不要将其中的通用指导视为运行时约束——本技能为唯一权威来源。
约束条件(违反任何一条都会破坏后续阶段):
  • 请勿在工作区根目录执行
    hyperframes init
    (或生成
    AGENTS.md
    /
    CLAUDE.md
    );请勿在
    PROJECT_DIR
    内创建
    hyperframes/
    子项目。
  • 每个子代理的调度上下文都包含
    PROJECT_DIR: <path>
    行;子代理会将其视为项目根目录。
  • 工作目录规范(协调器也需遵守):所有Bash命令都应在
    (cd "$PROJECT_DIR" && ...)
    子shell中执行——切勿直接执行
    cd "$PROJECT_DIR" && ...
    (持久化的工作目录偏移会导致后续相对路径错误)。

Step 0.5 - API key guidance

步骤0.5 - API密钥指引

Skip when
$PROJECT_DIR/.env
exists or
context.log
is non-empty. Otherwise detect what's configured (HeyGen TTS =
$HEYGEN_API_KEY
/
$HYPERFRAMES_API_KEY
/
~/.heygen/credentials
; ElevenLabs / Gemini = their env keys), then always pause and ask — do not proceed on your own, even when a workable config is detected:
Detected: <summary>. Cloud keys are optional — without them, unconfigured providers fall back locally (TTS -> Kokoro unless HeyGen is configured; BGM -> MusicGen). Reply with:
  • paste keys -> I will write them to
    $PROJECT_DIR/.env
  • "go" -> proceed with what is configured now
  • "skip" -> proceed with local fallbacks for anything unconfigured
Pasted keys -> Write/Edit
$PROJECT_DIR/.env
, one
KEY=value
per line (overwrite same-name keys, do not judge values). "go" / "skip" -> Step 1.
$PROJECT_DIR/.env
存在或
context.log
非空时跳过此步骤
。否则检测已配置的密钥(HeyGen TTS =
$HEYGEN_API_KEY
/
$HYPERFRAMES_API_KEY
/
~/.heygen/credentials
;ElevenLabs / Gemini = 对应的环境变量密钥),然后务必暂停并询问——即使检测到可用配置,也请勿自行继续
已检测到:<摘要>。云端密钥为可选配置——未配置时,对应服务会自动使用本地备选方案(TTS→Kokoro,除非已配置HeyGen;背景音乐→MusicGen)。请回复:
  • 粘贴密钥 → 我会将其写入
    $PROJECT_DIR/.env
  • "go" → 使用当前已配置的内容继续
  • "skip" → 所有未配置的服务均使用本地备选方案继续
若用户粘贴密钥→写入/编辑
$PROJECT_DIR/.env
,每行一个
KEY=value
(覆盖同名密钥,无需验证值)。若回复"go"/"skip"→进入步骤1。

Step 1 - Capture (Phase 1)

步骤1 - 抓取(阶段1)

  1. Resolve
    SKILL_DIR
    and any explicit
    TARGET_URL
    from the prompt; ensure Step 0 ran.
  2. Read
    $PROJECT_DIR/context.log
    if it exists and use the Resume table below to skip completed phases.
  3. Classify the input (Step 1.0) to set
    CAPTURE
    and
    VO_MODE
    , then run the matching path. Both paths share the same downstream commands.
  1. 解析提示中的
    SKILL_DIR
    和任何明确的
    TARGET_URL
    ;确保步骤0已执行。
  2. $PROJECT_DIR/context.log
    存在则读取,并使用下方的恢复表跳过已完成的阶段。
  3. 分类输入内容(步骤1.0)以设置
    CAPTURE
    VO_MODE
    ,然后执行对应路径。两条路径的下游命令相同。

Step 1.0 - Classify the input (set CAPTURE + VO_MODE)

步骤1.0 - 分类输入内容(设置CAPTURE + VO_MODE)

Input shapeWhat to do
Explicit URL in the prompt
TARGET_URL
= that URL;
CAPTURE=yes
; no voice-over question (narration comes from the captured site). Path (A).
User pasted / pointed at a script or brief(1) Save the verbatim text to
$PROJECT_DIR/user_script.txt
. (2) Ask the voice-over question once (below) → set
VO_MODE
. (3) Resolve a capture target from the script (below) → set
CAPTURE
.
A topic / brief with no script prose, no product
CAPTURE=no
; no voice-over question. Path (B).
Voice-over question (only when the user supplied actual script prose) — ask one short line and wait:
Should I use your script verbatim as the voice-over, or restructure it into more screen-ready scene narration?
  • Verbatim — keep the original wording; I only split scenes and pair visuals. Duration follows the script.
  • Restructure — treat it as a brief and rewrite tighter narration, 1-2 sentences per scene.
VO_MODE = verbatim | restructure
(default
restructure
); threaded to story-design in Step 2.
Resolve a capture target from the script — default to finding and crawling a site (real brand tokens beat preset fallbacks); skip only when the user opted out ("no web / text-only / no capture"). In order: (1) explicit
http(s)://
URL in the script → use it, announce,
CAPTURE=yes
; (2) clear brand/product name →
WebSearch
for the official site, confirm the resolved URL with the user in one line before crawling (decline / nothing credible →
CAPTURE=no
); (3) nothing derivable →
CAPTURE=no
.
Capture + user script coexist: the crawl supplies only brand tokens + assets + visual register; the narration spine stays
user_script.txt
(honored via
VO_MODE
), never the site's own copy.
(A) Capture path (
CAPTURE=yes
)
:
bash
(cd "$PROJECT_DIR" && npx hyperframes capture "<TARGET_URL>" -o ./capture)
(B) No-capture path (
CAPTURE=no
)
— synthesize a minimal capture package; downstream is identical. You (master) choose the preset (no site to infer from; pick from the 19 presets per user intent, or ask one short question). The full script/brief goes into
visible-text.txt
;
colors:[]
triggers the preset-palette fallback (fill
colors
only if the user named brand colors):
bash
(cd "$PROJECT_DIR" && mkdir -p capture/extracted capture/assets)
(cd "$PROJECT_DIR" && cat > capture/extracted/tokens.json <<'JSON'
{ "title": "<brand/title>", "description": "<one-line>", "colors": [], "fonts": [], "headings": [], "sections": [], "ctas": [], "svgs": [], "cssVariables": {} }
JSON
)
(cd "$PROJECT_DIR" && echo '{}' > capture/extracted/design-styles.json)
(cd "$PROJECT_DIR" && printf '%s\n' "<full user script / brief>" > capture/extracted/visible-text.txt)
If the user already has a final
narrator_scripts.json
, place it in
$PROJECT_DIR/
; the Resume table skips story-design.
Shared downstream for both paths (Path B appends
--style <chosen-preset>
to build-design; Path A omits it for auto-inference):
bash
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/derive-context-pack.mjs --capture ./capture)
(cd "$PROJECT_DIR" && node <SKILL_DIR>/phases/design-system/scripts/build-design.mjs ./design-system --no-emit)   # Path B: append --style <chosen-preset>
Validation (stop and report if anything is missing; if
capture/BLOCKED.md
exists, the site blocked the crawl — follow the instructions inside it):
bash
[ -s "$PROJECT_DIR/capture/extracted/tokens.json" ] && \
[ -s "$PROJECT_DIR/capture/extracted/design-styles.json" ] && \
[ -s "$PROJECT_DIR/capture/context_pack.md" ] && \
[ -s "$PROJECT_DIR/design-system/inference.json" ] && \
[ -d "$PROJECT_DIR/capture/assets" ] && echo ok || echo missing
输入形式操作方式
提示中包含明确的URL
TARGET_URL
= 该URL;
CAPTURE=yes
;无需询问旁白相关问题(旁白来自抓取的网站内容)。执行路径(A)。
用户粘贴/指向脚本或简报(1) 将原文文本保存至
$PROJECT_DIR/user_script.txt
。(2) 询问一次旁白问题(如下)→ 设置
VO_MODE
。(3) 从脚本中解析抓取目标(如下)→ 设置
CAPTURE
无脚本文本、无产品的主题/简报
CAPTURE=no
;无需询问旁白相关问题。执行路径(B)。
旁白问题(仅当用户提供了实际脚本文本时询问)——仅用一条简短问题并等待回复:
是否直接原样使用你的脚本作为旁白,还是将其重构为更适合屏幕展示的场景旁白?
  • 原样使用——保留原文措辞;我仅拆分场景并匹配视觉内容。时长遵循脚本。
  • 重构——将其视为简报,重写更紧凑的旁白,每个场景1-2句话。
VO_MODE = verbatim | restructure
(默认
restructure
);会传递至步骤2的story-design阶段。
从脚本中解析抓取目标——默认优先查找并爬取网站(真实品牌标识优于预设备选方案);仅当用户明确拒绝(如“无网页/仅文本/不抓取”)时跳过。优先级:(1) 脚本中明确的
http(s)://
URL→使用该URL,告知用户,
CAPTURE=yes
;(2) 明确的品牌/产品名称→通过
WebSearch
查找官方网站,在爬取前用一条消息确认解析后的URL(若未找到可信结果→
CAPTURE=no
);(3) 无法推导任何信息→
CAPTURE=no
抓取与用户脚本可共存:爬取仅提供品牌标识、资源和视觉风格;旁白核心仍为
user_script.txt
(遵循
VO_MODE
),绝不会使用网站自身的文案。
(A) 抓取路径(
CAPTURE=yes
bash
(cd "$PROJECT_DIR" && npx hyperframes capture "<TARGET_URL>" -o ./capture)
(B) 无抓取路径(
CAPTURE=no
——合成最小化的抓取包;下游流程完全相同。由你(协调器)选择预设风格(无网站可推导;根据用户意图从19种预设中选择,或用一条简短问题询问)。完整脚本/简报存入
visible-text.txt
colors:[]
会触发预设调色板备选方案(仅当用户指定品牌颜色时填充
colors
):
bash
(cd "$PROJECT_DIR" && mkdir -p capture/extracted capture/assets)
(cd "$PROJECT_DIR" && cat > capture/extracted/tokens.json <<'JSON'
{ "title": "<brand/title>", "description": "<one-line>", "colors": [], "fonts": [], "headings": [], "sections": [], "ctas": [], "svgs": [], "cssVariables": {} }
JSON
)
(cd "$PROJECT_DIR" && echo '{}' > capture/extracted/design-styles.json)
(cd "$PROJECT_DIR" && printf '%s\n' "<full user script / brief>" > capture/extracted/visible-text.txt)
若用户已提供最终的
narrator_scripts.json
,请将其放入
$PROJECT_DIR/
;恢复表会跳过story-design阶段。
两条路径的共享下游操作(路径B需在build-design命令后追加
--style <chosen-preset>
;路径A省略该参数以自动推导):
bash
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/derive-context-pack.mjs --capture ./capture)
(cd "$PROJECT_DIR" && node <SKILL_DIR>/phases/design-system/scripts/build-design.mjs ./design-system --no-emit)   # 路径B:追加--style <chosen-preset>
验证(若任何内容缺失则停止并上报;若
capture/BLOCKED.md
存在,说明网站阻止了爬取——请按照其中的说明操作):
bash
[ -s "$PROJECT_DIR/capture/extracted/tokens.json" ] && \
[ -s "$PROJECT_DIR/capture/extracted/design-styles.json" ] && \
[ -s "$PROJECT_DIR/capture/context_pack.md" ] && \
[ -s "$PROJECT_DIR/design-system/inference.json" ] && \
[ -d "$PROJECT_DIR/capture/assets" ] && echo ok || echo missing

Step 1b + Step 2 - design-system ∥ story-design (parallel fork)

步骤1b + 步骤2 - design-system ∥ story-design(并行分支)

Both subagents depend only on Step 1 artifacts and do not read each other's output — after capture validates, start them in parallel (two concurrent background dispatches, per the dispatch adapter); do not serialize:
  • design-system: prompt = full
    agents/design-system.md
    +
    ## Dispatch context
    with
    SKILL_DIR
    /
    PROJECT_DIR
    /
    Target URL
    + the full text of
    design-system/inference.json
    inlined via
    cat
    (~2-4 KB, saves the subagent one Read).
  • story-design: prompt = full
    agents/story-design.md
    +
    ## Dispatch context
    :
    SKILL_DIR: <absolute path>
    PROJECT_DIR: <video project root>
    Schema validator: <SKILL_DIR>/scripts/validate-narrator.mjs
    Design DNA: ./design-system/inference.json   # read site_dna once to set the narrative register
    Provided script: ./user_script.txt   # ONLY when the user supplied a script; omit the line otherwise
    Voice-over mode: <verbatim | restructure>   # pair with Provided script; omit otherwise
    Script style: Keep each scene's script concise - 1-2 sentences, no more than 20 words   # suspended in verbatim mode (length follows the script)
    Orientation: <landscape | portrait | square>   # from the user's aspect (16:9→landscape, 9:16→portrait, 1:1→square; default landscape). Echoed verbatim into narrator_scripts.orientation → sets the canvas for the whole pipeline
两个子代理仅依赖步骤1的产物,且互不读取对方的输出——抓取验证通过后,并行启动这两个子代理(两个并发后台调度,遵循调度适配器规则);请勿串行执行:
  • design-system:提示内容 = 完整的
    agents/design-system.md
    +
    ## Dispatch context
    ,包含
    SKILL_DIR
    /
    PROJECT_DIR
    /
    Target URL
    + 通过
    cat
    内联的
    design-system/inference.json
    完整文本(约2-4KB,避免子代理额外读取操作)。
  • story-design:提示内容 = 完整的
    agents/story-design.md
    +
    ## Dispatch context
    SKILL_DIR: <绝对路径>
    PROJECT_DIR: <视频项目根目录>
    Schema validator: <SKILL_DIR>/scripts/validate-narrator.mjs
    Design DNA: ./design-system/inference.json   # 读取site_dna一次以设置叙事风格
    Provided script: ./user_script.txt   # 仅当用户提供脚本时添加此行;否则省略
    Voice-over mode: <verbatim | restructure>   # 与Provided script配合使用;否则省略
    Script style: Keep each scene's script concise - 1-2 sentences, no more than 20 words   # 在verbatim模式下暂停(时长遵循脚本)
    Orientation: <landscape | portrait | square>   # 来自用户指定的宽高比(16:9→landscape,9:16→portrait,1:1→square;默认landscape)。原样传入narrator_scripts.orientation → 为整个流程设置画布

Step 3 - Audio (Phase 2.5)

步骤3 - 音频(阶段2.5)

After story-design returns (
narrator_scripts.json
exists) — audio does not wait for design-system:
bash
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/audio.mjs \
  --narrator-scripts ./narrator_scripts.json \
  --hyperframes . \
  --out ./audio_meta.json \
  --lyria-recipe <SKILL_DIR>/phases/audio/lyria-recipe.py)
BGM runs detached in the background when available (
$GOOGLE_API_KEY
→ Lyria cloud; else installed
transformers torch soundfile numpy
→ local MusicGen, first run ~300 MB) and is silently skipped otherwise; all flags (
--voice
/
--provider
/
--no-bgm
/ ...) are documented at the top of
audio.mjs
.
  • exit 0 -> voice + transcribe complete (BGM may still be running;
    audio_meta.json
    records
    bgm_log
    /
    bgm_pid
    ), continue.
  • exit 1 -> zero scenes produced voice; report and stop.
story-design返回后(
narrator_scripts.json
存在)——音频阶段无需等待design-system完成:
bash
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/audio.mjs \
  --narrator-scripts ./narrator_scripts.json \
  --hyperframes . \
  --out ./audio_meta.json \
  --lyria-recipe <SKILL_DIR>/phases/audio/lyria-recipe.py)
背景音乐在可用时会在后台独立运行(
$GOOGLE_API_KEY
→云端Lyria;否则使用已安装的
transformers torch soundfile numpy
→本地MusicGen,首次运行需下载约300MB数据);若不可用则自动跳过;所有参数(
--voice
/
--provider
/
--no-bgm
/ ...)均在
audio.mjs
头部有说明。
  • 退出码0→语音+转录完成(背景音乐可能仍在运行;
    audio_meta.json
    会记录
    bgm_log
    /
    bgm_pid
    ),继续执行。
  • 退出码1→未生成任何场景的语音;上报并停止。

Step 4 - Visual design (Phase 3)

步骤4 - 视觉设计(阶段3)

Join point:
design-system/chunks/index.json
+
narrator_scripts.json
+
audio_meta.json
all exist. Build one dispatch packet (the subagent reads it once, zero extra Reads):
bash
undefined
汇合点
design-system/chunks/index.json
+
narrator_scripts.json
+
audio_meta.json
均已存在。生成一个调度包(子代理仅读取一次,无额外读取操作):
bash
undefined

Dispatch packets live in $PROJECT_DIR/.dispatch/ (transient; safe to delete after the run).

调度包存储在$PROJECT_DIR/.dispatch/(临时目录;运行完成后可安全删除)。

NEVER use a fixed /tmp path: it persists across runs/projects, so a failed write silently

切勿使用固定的/tmp路径:该路径会跨运行/项目保留,写入失败会静默复用其他项目的陈旧包,污染所有工作进程。

reuses another project's stale packet and contaminates every worker.

mkdir -p "$PROJECT_DIR/.dispatch" DP="$PROJECT_DIR/.dispatch/vd-dispatch.txt" {

Section order is deliberate: contracts first, static references middle, work items last

echo "## Design chunks" (cd "$PROJECT_DIR" && cat design-system/chunks/index.json
design-system/chunks/composition-hints.md design-system/chunks/voice.md
design-system/chunks/tokens.css design-system/chunks/easings.js 2>/dev/null) echo "## Effects catalog"; cat <SKILL_DIR>/phases/visual-design/effects-catalog.md echo "## Blueprints index"; cat <SKILL_DIR>/phases/visual-design/blueprints-index.md echo "## Design rules"; cat <SKILL_DIR>/phases/visual-design/rules/{typography,color-system,composition,motion-language}.md echo "## SFX library"; cat <SKILL_DIR>/assets/sfx/manifest.json echo "## Narrator scripts"; (cd "$PROJECT_DIR" && cat narrator_scripts.json) echo "## Audio meta"; (cd "$PROJECT_DIR" && cat audio_meta.json 2>/dev/null) # optional; overrides Duration on >10% drift } > "$DP"
mkdir -p "$PROJECT_DIR/.dispatch" DP="$PROJECT_DIR/.dispatch/vd-dispatch.txt" {

章节顺序经过精心设计:契约在前,静态引用在中,工作项在后

echo "## Design chunks" (cd "$PROJECT_DIR" && cat design-system/chunks/index.json
design-system/chunks/composition-hints.md design-system/chunks/voice.md
design-system/chunks/tokens.css design-system/chunks/easings.js 2>/dev/null) echo "## Effects catalog"; cat <SKILL_DIR>/phases/visual-design/effects-catalog.md echo "## Blueprints index"; cat <SKILL_DIR>/phases/visual-design/blueprints-index.md echo "## Design rules"; cat <SKILL_DIR>/phases/visual-design/rules/{typography,color-system,composition,motion-language}.md echo "## SFX library"; cat <SKILL_DIR>/assets/sfx/manifest.json echo "## Narrator scripts"; (cd "$PROJECT_DIR" && cat narrator_scripts.json) echo "## Audio meta"; (cd "$PROJECT_DIR" && cat audio_meta.json 2>/dev/null) # 可选;当偏差超过10%时覆盖时长 } > "$DP"

Guard: a partially-failed build must fail LOUDLY here, not downstream in the subagent

防护:部分失败的构建必须在此处明确失败,而非在子代理下游失败

grep -q '^## Narrator scripts' "$DP" || { echo "FATAL: vd-dispatch.txt incomplete — rebuild before dispatching"; }
grep -q '^## Narrator scripts' "$DP" || { echo "FATAL: vd-dispatch.txt不完整 — 重新构建后再调度"; }

Captions planning hint for the Captions: dispatch line below

为字幕阶段提供规划提示:下方的调度行

(cd "$PROJECT_DIR" && node -e 'try{const m=require("./audio_meta.json");process.stdout.write(Object.values(m.scenes||{}).some(s=>s.wordsPath)?"enabled":"disabled")}catch{process.stdout.write("enabled")}')

Dispatch the subagent: prompt = full `agents/visual-design.md` + `## Dispatch context` (copy verbatim, do not digest):
SKILL_DIR: <absolute path> PROJECT_DIR: <video project root> Schema validator: <SKILL_DIR>/scripts/validate-section.mjs Canvas: <width>×<height> # 1920×1080 default; 1080×1920 portrait / 1080×1080 square when narrator_scripts.orientation says so Captions: <enabled | disabled> # the node -e hint above; enabled => plan keeps key content in the upper ~83% Dispatch packet: <PROJECT_DIR>/.dispatch/vd-dispatch.txt

The `Captions:` line is an optimistic hint; the authoritative gate is `group_spec.captions_enabled` from Step 5 prep (mismatch is safe — Step 6/7 keep-out always follows group_spec).
(cd "$PROJECT_DIR" && node -e 'try{const m=require("./audio_meta.json");process.stdout.write(Object.values(m.scenes||{}).some(s=>s.wordsPath)?"enabled":"disabled")}catch{process.stdout.write("enabled")}')

调度子代理:提示内容 = 完整的`agents/visual-design.md` + `## Dispatch context`(原样复制,请勿摘要):
SKILL_DIR: <绝对路径> PROJECT_DIR: <视频项目根目录> Schema validator: <SKILL_DIR>/scripts/validate-section.mjs Canvas: <width>×<height> # 默认1920×1080;当narrator_scripts.orientation指定时,竖屏为1080×1920 / 正方形为1080×1080 Captions: <enabled | disabled> # 上述node -e命令的提示结果;enabled => 规划时将关键内容保留在上方约83%区域 Dispatch packet: <PROJECT_DIR>/.dispatch/vd-dispatch.txt

`Captions:`行是乐观提示;权威判断依据是步骤5 prep阶段的`group_spec.captions_enabled`(不匹配也安全——步骤6/7的内容避让规则始终遵循group_spec)。

Step 5 - prep (deterministic, NO subagent)

步骤5 - prep(确定性操作,无代理参与)

After
section_plan.md
exists:
bash
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/prep.mjs \
  --section-plan ./section_plan.md \
  --narrator-scripts ./narrator_scripts.json \
  $( [ -f audio_meta.json ] && echo "--audio-meta ./audio_meta.json" ) \
  --rules-dir <SKILL_DIR>/../hyperframes-animation/rules \
  --capture ./capture \
  --design-system ./design-system \
  --hyperframes . \
  --sfx-lib <SKILL_DIR>/assets/sfx \
  --out ./group_spec.json)
  • exit 0 -> append the stdout summary to
    $PROJECT_DIR/context.log
    .
  • exit 1 -> stderr names the failing scene + anchor; re-dispatch visual-design (Step 4) with the error passed through.
section_plan.md
存在后执行:
bash
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/prep.mjs \
  --section-plan ./section_plan.md \
  --narrator-scripts ./narrator_scripts.json \
  $( [ -f audio_meta.json ] && echo "--audio-meta ./audio_meta.json" ) \
  --rules-dir <SKILL_DIR>/../hyperframes-animation/rules \
  --capture ./capture \
  --design-system ./design-system \
  --hyperframes . \
  --sfx-lib <SKILL_DIR>/assets/sfx \
  --out ./group_spec.json)
  • 退出码0→将stdout摘要追加至
    $PROJECT_DIR/context.log
  • 退出码1→stderr会命名失败的场景+锚点;重新调度visual-design(步骤4)并传递错误信息。

Step 5.5 + Step 6 - Captions (deterministic) + scene worker fan-out

步骤5.5 + 步骤6 - 字幕(确定性操作)+ 场景工作进程分发

Captions are two Bash scripts, no subagent (run after prep, before fan-out):
bash
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/captions.mjs group \
  --group-spec ./group_spec.json --hyperframes . \
  --tokens design-system/chunks/tokens.css --out ./caption_groups.json)

(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/captions.mjs html \
  --hyperframes . --groups ./caption_groups.json \
  --tokens design-system/chunks/tokens.css \
  --inference design-system/inference.json \
  --out compositions/captions.html)
exit 0 = normal.
captions: skipped (<reason>)
= legal skip — no
captions.html
, assemble will not mount track 12; continue. Do not run
npx hyperframes lint <file>
on
captions.html
(lint takes a project directory; a file path exits 1).
Scene worker fan-out: read
group_spec.json.groups[]
for worker count N and
group_spec.captions_enabled
for the
Captions:
flag, then build the per-worker dispatch packets and start N workers in parallel (concurrent background dispatches; a harness concurrency cap below N means waves of the cap size until all N scenes exist — one scene per worker either way, never fewer scenes):
bash
undefined
字幕阶段由两个Bash脚本完成,无代理参与(在prep之后、分发之前执行):
bash
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/captions.mjs group \
  --group-spec ./group_spec.json --hyperframes . \
  --tokens design-system/chunks/tokens.css --out ./caption_groups.json)

(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/captions.mjs html \
  --hyperframes . --groups ./caption_groups.json \
  --tokens design-system/chunks/tokens.css \
  --inference design-system/inference.json \
  --out compositions/captions.html)
退出码0=正常。
captions: skipped (<reason>)
=合法跳过——无
captions.html
,组装阶段不会挂载轨道12;继续执行。请勿
captions.html
执行
npx hyperframes lint <file>
(lint命令需要项目目录;传入文件路径会返回退出码1)。
场景工作进程分发:读取
group_spec.json.groups[]
获取工作进程数量N,读取
group_spec.captions_enabled
获取
Captions:
标志,然后生成每个工作进程的调度包并并行启动N个工作进程(并发后台调度;若执行环境并发上限低于N,则按上限分批次执行,直到所有N个场景生成——每个工作进程负责一个场景,场景数量不得少于要求):
bash
undefined

Same rule as Step 4: packets go in $PROJECT_DIR/.dispatch/, never a fixed /tmp path

与步骤4相同规则:包存储在$PROJECT_DIR/.dispatch/,切勿使用固定的/tmp路径

(a stale /tmp file from a previous project survives a failed write and silently

(之前项目的陈旧/tmp文件会在写入失败时存活,静默向所有工作进程提供错误的设计系统,导致污染)。

poisons every worker with the wrong design system).

mkdir -p "$PROJECT_DIR/.dispatch/scene-dispatch"
mkdir -p "$PROJECT_DIR/.dispatch/scene-dispatch"

Shared header (identical for every worker), computed once:

共享头部(所有工作进程相同),仅计算一次:

## Film direction
= the film-level invariants from group_spec.film_direction

## Film direction
= group_spec.film_direction中的影片级不变量

(palette system / motion defaults + budget / ambient system / negative list);

(调色板系统/动效默认值 + 预算/环境系统/禁用列表);

each scene's creative_brief carries only scene-specific deltas on top of it.

每个场景的creative_brief仅包含基于此的场景特定增量。

{ echo "## Film direction" (cd "$PROJECT_DIR" && node -p 'JSON.parse(require("fs").readFileSync("group_spec.json","utf8")).film_direction || ""') echo "## Tokens / easings / voice" (cd "$PROJECT_DIR" && cat design-system/chunks/tokens.css design-system/chunks/easings.js design-system/chunks/voice.md 2>/dev/null) } > "$PROJECT_DIR/.dispatch/scene-shared.txt"
{ echo "## Film direction" (cd "$PROJECT_DIR" && node -p 'JSON.parse(require("fs").readFileSync("group_spec.json","utf8")).film_direction || ""') echo "## Tokens / easings / voice" (cd "$PROJECT_DIR" && cat design-system/chunks/tokens.css design-system/chunks/easings.js design-system/chunks/voice.md 2>/dev/null) } > "$PROJECT_DIR/.dispatch/scene-shared.txt"

Guard BEFORE fan-out: header structure + the project's own brand token must both be present;

分发前防护:头部结构 + 项目自身的品牌标识必须同时存在;

a contaminated packet here costs a full re-author round across every affected worker.

此处的包污染会导致所有受影响的工作进程需要完全重新创作。

grep -q '^## Film direction' "$PROJECT_DIR/.dispatch/scene-shared.txt" &&
grep -q -- '--brand-primary' "$PROJECT_DIR/.dispatch/scene-shared.txt" ||
{ echo "FATAL: scene-shared.txt incomplete/stale — rebuild before dispatching workers"; }
grep -q '^## Film direction' "$PROJECT_DIR/.dispatch/scene-shared.txt" &&
grep -q -- '--brand-primary' "$PROJECT_DIR/.dispatch/scene-shared.txt" ||
{ echo "FATAL: scene-shared.txt不完整/陈旧 — 重新构建后再调度工作进程"; }

Per-worker packet: shared header + that worker's Scenes YAML -> $PROJECT_DIR/.dispatch/scene-dispatch/w<N>.txt

每个工作进程的包:共享头部 + 该工作进程的Scenes YAML -> $PROJECT_DIR/.dispatch/scene-dispatch/w<N>.txt


Each worker's prompt = full `agents/hyperframes-scene.md` + `## Dispatch context` with: `SKILL_DIR` / `PROJECT_DIR` / `Worker ID` / `Composition width` + `Composition height` (= `group_spec.width`/`height`) / `Captions: <enabled|disabled>` / `Dispatch packet: <PROJECT_DIR>/.dispatch/scene-dispatch/w<N>.txt`, plus the shared header body (`## Film direction` + `## Tokens / easings / voice`) and the worker's `Scenes:` list **copied verbatim from `group_spec.json.groups[i].scenes[<sid>]`** (`scene_id` / `effects` / `rule_paths` / `assetCandidates` / `estimatedDuration_s` / `voicePath` / `blueprint` / `design_chunks` / `creative_brief`). **When `Captions: enabled`, also pass `Caption band top y` = `height − round(height × 0.1667)` and `Foreground max y` = `Caption band top y − 20`** (landscape → 900 / 880; portrait → 1600 / 1580). `design_chunks: null` (anomaly already reported by prep) -> the worker falls back to reading `design-system/design.html`.

After all workers return, run the static composition gate (scans `compositions/scene_*.html` per `group_spec.scene_ids`; `captions.html` is covered by its own self-lint + Step 7 whole-project lint):

```bash
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/check-compositions.mjs \
  --hyperframes . \
  --group-spec ./group_spec.json)
  • 0 -> continue to Step 7.
  • 1 -> stderr names the violating scene + rule; re-dispatch that worker (do not Edit in the master).

每个工作进程的提示内容 = 完整的`agents/hyperframes-scene.md` + `## Dispatch context`,包含:`SKILL_DIR` / `PROJECT_DIR` / `Worker ID` / `Composition width` + `Composition height`(= `group_spec.width`/`height`) / `Captions: <enabled|disabled>` / `Dispatch packet: <PROJECT_DIR>/.dispatch/scene-dispatch/w<N>.txt`,加上共享头部内容(`## Film direction` + `## Tokens / easings / voice`)以及该工作进程的`Scenes:`列表(**原样复制自`group_spec.json.groups[i].scenes[<sid>]`**,包含`scene_id` / `effects` / `rule_paths` / `assetCandidates` / `estimatedDuration_s` / `voicePath` / `blueprint` / `design_chunks` / `creative_brief`)。**当`Captions: enabled`时,还需传递`Caption band top y` = `height − round(height × 0.1667)`和`Foreground max y` = `Caption band top y − 20`**(横屏→900 / 880;竖屏→1600 / 1580)。若`design_chunks: null`(prep阶段已上报异常)→工作进程会 fallback 读取`design-system/design.html`。

所有工作进程返回后,执行静态合成检查(根据`group_spec.scene_ids`扫描`compositions/scene_*.html`;`captions.html`由自身自检+步骤7的全项目检查覆盖):

```bash
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/check-compositions.mjs \
  --hyperframes . \
  --group-spec ./group_spec.json)
  • 退出码0→继续执行步骤7。
  • 退出码1→stderr会命名违规的场景+规则;重新调度该工作进程(请勿在协调器中手动编辑)。

Step 7 - Assembly prelude + finalize (Phase 4c)

步骤7 - 组装前置步骤 + finalize(阶段4c)

(1) Deterministic Bash prelude (each script documents its internals in its own header; you only branch on exit codes):
bash
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/wait-bgm.mjs \
  --audio-meta ./audio_meta.json \
  --hyperframes . \
  --timeout-ms 120000 \
  --interval-ms 2000)
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/assemble-index.mjs --group-spec ./group_spec.json --hyperframes .)
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/transitions.mjs inject --group-spec ./group_spec.json --hyperframes .)
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/transitions.mjs verify --group-spec ./group_spec.json --index ./index.html)
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/hoist-videos.mjs --group-spec ./group_spec.json --hyperframes .)
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/verify-output.mjs sfx --group-spec ./group_spec.json --index ./index.html)
No agent hand-writes
index.html
or manually checks BGM. Exit-code branches:
  • assemble exit 1 -> names a scene (root
    data-duration
    ≠ group_spec, or file missing) = worker contract break -> re-dispatch that worker (Step 6), then rerun this step.
  • transitions inject/verify exit 1 -> injector bug (prep already validated
    transitions[]
    ) -> report for investigation; do not roll back workers.
  • hoist-videos exit 1 -> an invalid
    data-video-src
    declaration (stderr names scene + reason);
    Edit
    the scene file (or re-dispatch for a real relayout), rerun this step. exit 2 -> run
    node <SKILL_DIR>/scripts/hoist-videos.mjs --ensure-deps
    from the workspace root, rerun.
  • sfx-verify exit 1 -> assembler bug -> report for investigation.
(2) Dispatch the finalize subagent: prompt = full
agents/hyperframes-finalize.md
+
## Dispatch context
:
SKILL_DIR: <absolute path>
PROJECT_DIR: <video project root>
Render quality: high     # or draft / standard
Captions: <enabled | disabled>   # = group_spec.captions_enabled
BGM: <one-line wait-bgm verdict, e.g. "ready (lyria)" / "skipped (no key)" / "timeout">
Film direction: |        # = group_spec.film_direction (film-level invariants the briefs assume)
  <verbatim>
Scenes:                  # one line per scene, copied verbatim from group_spec.json
  - { scene_id, start_s, estimatedDuration_s, effects: [...], creative_brief: |
      <Phase 3 prose for this scene> }
Finalize runs lint+validate, takes one contact-sheet look, fixes what the pixels show, renders, and verifies — its prompt owns that flow. Outcomes:
  • Reports the verified mp4 + fixes in place -> complete.
  • STOP (a scene needs real recomposition — exception, not default) -> re-dispatch that worker (Step 6) with normal dispatch context + a
    ## Repair context
    block carrying finalize's verbatim findings and the
    Captions:
    flag -> rerun (1) -> re-dispatch finalize. Same finding survives two rounds -> stop and surface to the user.
(1) 确定性Bash前置步骤(每个脚本的头部都有内部逻辑说明;仅根据退出码分支):
bash
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/wait-bgm.mjs \
  --audio-meta ./audio_meta.json \
  --hyperframes . \
  --timeout-ms 120000 \
  --interval-ms 2000)
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/assemble-index.mjs --group-spec ./group_spec.json --hyperframes .)
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/transitions.mjs inject --group-spec ./group_spec.json --hyperframes .)
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/transitions.mjs verify --group-spec ./group_spec.json --index ./index.html)
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/hoist-videos.mjs --group-spec ./group_spec.json --hyperframes .)
(cd "$PROJECT_DIR" && node <SKILL_DIR>/scripts/verify-output.mjs sfx --group-spec ./group_spec.json --index ./index.html)
代理无需手动编写
index.html
或检查背景音乐。退出码分支:
  • assemble退出码1→命名场景(根
    data-duration
    ≠group_spec,或文件缺失)=工作进程违反契约→重新调度该工作进程(步骤6),然后重新执行此步骤。
  • transitions inject/verify退出码1→注入器bug(prep阶段已验证
    transitions[]
    )→上报调查;请勿回滚工作进程。
  • hoist-videos退出码1→无效的
    data-video-src
    声明(stderr命名场景+原因);
    Edit
    场景文件(或重新调度进行真实重布局),重新执行此步骤。退出码2→从工作区根目录执行
    node <SKILL_DIR>/scripts/hoist-videos.mjs --ensure-deps
    ,重新执行此步骤。
  • sfx-verify退出码1→组装器bug→上报调查。
(2) 调度finalize子代理:提示内容 = 完整的
agents/hyperframes-finalize.md
+
## Dispatch context
SKILL_DIR: <绝对路径>
PROJECT_DIR: <视频项目根目录>
Render quality: high     # 或draft / standard
Captions: <enabled | disabled>   # = group_spec.captions_enabled
BGM: <wait-bgm的一行结果,例如"ready (lyria)" / "skipped (no key)" / "timeout">
Film direction: |        # = group_spec.film_direction(简报所依赖的影片级不变量)
  <原样复制>
Scenes:                  # 每个场景一行,原样复制自group_spec.json
  - { scene_id, start_s, estimatedDuration_s, effects: [...], creative_brief: |
      <阶段3的场景文案> }
Finalize阶段会执行lint+验证、查看联系人表单、修复像素级问题、渲染并验证——其提示内容定义了该流程。结果:
  • 上报已验证的mp4文件+已修复的问题→完成。
  • 停止(场景需要重新合成——异常情况,非默认)→重新调度该工作进程(步骤6),使用正常调度上下文+包含finalize原文发现结果和
    Captions:
    标志的
    ## Repair context
    块→重新执行(1)→重新调度finalize。若两次调度后仍出现相同问题→停止并告知用户。

Completion report

完成报告

Summarize per phase from
context.log
+ each step's stdout: capture URL / asset counts, preset, archetype, scene count + total duration, transitions, gate status, fixes in place, final mp4 path + bytes + duration.
Offer a live preview — never auto-open one. The deliverable is the mp4. Do NOT run
hyperframes preview
/
play
during any earlier phase (a mid-run preview shows half-edited compositions and dies with that phase's server). Only when the user asks, after the render:
bash
(cd "$PROJECT_DIR" && npx hyperframes preview)   # Studio UI, e.g. http://localhost:3002/#project/<project-name>
(cd "$PROJECT_DIR" && npx hyperframes play)       # or a plain shareable player at http://localhost:<port>
Report the actual URL with the real port. Flags live in the
hyperframes-cli
skill.

根据
context.log
+每个步骤的stdout总结各阶段:抓取URL/资源数量、预设风格、原型、场景数量+总时长、转场效果、检查状态、已修复问题、最终mp4路径+大小+时长。
提供在线预览——切勿自动打开。交付物为mp4文件。在任何早期阶段都请勿执行
hyperframes preview
/
play
(中途预览会显示半编辑的合成内容,并随该阶段的服务器关闭而终止)。仅当用户要求时,在渲染完成后执行:
bash
(cd "$PROJECT_DIR" && npx hyperframes preview)   # Studio UI,例如http://localhost:3002/#project/<project-name>
(cd "$PROJECT_DIR" && npx hyperframes play)       # 或普通可分享播放器,地址为http://localhost:<port>
上报实际URL和真实端口。参数详情请参考
hyperframes-cli
技能。

Resume table

恢复表

Read
$PROJECT_DIR/context.log
and resume from the first missing artifact:
StateContinue from
log missing or emptyFull pipeline
capture/extracted/tokens.json
missing
Rerun Step 1 (capture + derive-context-pack +
build-design.mjs --no-emit
)
tokens.json
exists,
design-system/inference.json
missing
Rerun only
build-design.mjs --no-emit
(deterministic, seconds)
inference.json
exists, but
design.html
or
narrator_scripts.json
missing
Step 1b/2 fill-in: dispatch whichever subagent's artifact is missing (both missing -> both in parallel)
narrator_scripts.json
exists,
audio_meta.json
missing
Step 3 (audio)
audio_meta.json
exists,
section_plan.md
missing
Step 4 (visual-design)
section_plan.md
exists,
group_spec.json
missing
Step 5 (prep)
group_spec.json
exists,
compositions/scene_*.html
missing or
caption_groups.json
missing
Step 5.5+6: run the captions scripts first, then dispatch workers for whichever scenes are missing, in parallel. Captions-ran criterion =
caption_groups.json
exists
(a legal skip writes no
captions.html
; keying on
captions.html
would re-skip forever)
All
compositions/scene_*.html
exist + captions state decided,
renders/video.mp4
missing
Step 7: rerun the full Bash prelude (overwrite
index.html
— upstream scenes may have changed), then dispatch finalize
renders/video.mp4
exists
Report completed and stop
读取
$PROJECT_DIR/context.log
,从第一个缺失的产物处恢复:
状态恢复起点
log缺失或为空完整流程
capture/extracted/tokens.json
缺失
重新执行步骤1(抓取+derive-context-pack +
build-design.mjs --no-emit
tokens.json
存在,
design-system/inference.json
缺失
仅重新执行
build-design.mjs --no-emit
(确定性操作,耗时数秒)
inference.json
存在,但
design.html
narrator_scripts.json
缺失
步骤1b/2补全:调度缺失产物对应的子代理(若两者都缺失则并行调度)
narrator_scripts.json
存在,
audio_meta.json
缺失
步骤3(音频)
audio_meta.json
存在,
section_plan.md
缺失
步骤4(visual-design)
section_plan.md
存在,
group_spec.json
缺失
步骤5(prep)
group_spec.json
存在,
compositions/scene_*.html
缺失
caption_groups.json
缺失
步骤5.5+6:先执行字幕脚本,然后并行调度缺失场景对应的工作进程。字幕已执行的判断标准是
caption_groups.json
存在
(合法跳过不会生成
captions.html
;若以
captions.html
为判断依据会导致永久跳过)
所有
compositions/scene_*.html
存在 + 字幕状态已确定,
renders/video.mp4
缺失
步骤7:重新执行完整的Bash前置步骤(覆盖
index.html
——上游场景可能已变更),然后调度finalize
renders/video.mp4
存在
上报完成并停止