Infographic Voice-Over Video
Location and Delivery Layout (Architecture v1.11)
- The delivery repository root must have
AGENTS.md(how to use this template); this skill is fixed at.agents/skills/remotion-infographic-video/. tests/is at the repository root (same level as.agents/), belongs to development gate/CI, and is not part of the skill runtime. It is not copied when installing only the skill..envis only in this skill directory, not at the repository root.
Preparation Before Use (Copy and Use)
- Copy:
- Full repository use: Clone/copy the delivery repository root and open it (including root
AGENTS.mdandtests/). - Install only the skill: Copy
.agents/skills/remotion-infographic-video/to the same relative path in the target project (includingscripts/and itslib/). - The skill package itself does not require
pip/npminstallation;scripts/uses only the Python standard library. After configuring.env, steps 0–5 can be run.
- Full repository use: Clone/copy the delivery repository root and open it (including root
- Configure
.env: In the skill directory, runcp .env.example .env, then edit.envto fill in:- Required:
DOUBAO_TTS_API_KEY=(write the Key after the equals sign, no quotes) - Optional:
DOUBAO_SPEAKER=(default voice, see VOICE) .envis ignored by.gitignore. Do not paste the Key into the chat, and do not switch to other TTS engines.
- Required:
- Environment Prerequisites (install yourself, the script does not install them): Node 18+, Python 3, ffmpeg, ffprobe, internet.
- Start Production: When the user says "Start production" or an equivalent intent:
- First run
python3 scripts/check_env.py(can use--skill-dir <absolute path to this skill package>; default is this directory). - Exit code 3: Prompt to fill in
DOUBAO_TTS_API_KEYin.env(located at.agents/skills/remotion-infographic-video/.envor the absolute path of this skill), wait for the user to reply "filled" and rerun; do not proceed with TTS or project creation before that. - If passed: If the topic is already in the message, go directly into the fixed steps; otherwise ask only one question for the topic (can specify "portrait"; default landscape 1920×1080, portrait 1080×1440, rules in LAYOUT). Platform name does not affect aspect ratio.
- First run
Hard Rules
- The Key is read only from
DOUBAO_TTS_API_KEYin.envin this skill directory (for delivery repository:.agents/skills/remotion-infographic-video/.env); do not let the user paste the Key in chat, do not switch TTS engines, do not display the Key in any output. - Do not publish or upload: Only produce the final video, cover, and copy files.
- All numbers must have a source; numbers on screen must have a source badge; schematic icons must be labeled "schematic".
- The last line of each script's stdout is a JSON summary; handle by exit code: 3 = missing Key (prompt to fill
.env, stop), 4 = authentication failure (stop), 5 = fix upstream output, 6 = re-run only failed items, 7 = enter repair.
Fixed Steps
- Pre-check:
python3 scripts/check_env.py. If exit code 3, prompt to fill.envas above and rerun. - Topic collection: Determine topic, slug, and aspect ratio; write
<slug>/job.json(default landscape if not specified). When the user mentions a platform, writeplatforms; otherwise, use default platforms per PUBLISH. - Write script: Write
script.md(## Sxx section name+- [01] text {context: … | rate: 0 | pause: 300}) andsources.md(JSON block at the end); runpython3 scripts/validate.py sources <slug>/script.md <slug>/sources.md. Numbers without sources must be removed or have sources added. - Voiceover: If an MCP TTS tool (
tts_synthesize) with equivalent input/output is available in the environment, use it; otherwise, runpython3 scripts/tts_doubao.py <slug>/script.md --out-dir <slug>/voice. Validate the resultingtimeline.jsonusing the same Schema (assets/schemas/):python3 scripts/validate.py timeline <slug>/voice/timeline.json. Rerun failed sentences with--only. - Storyboard: Write
storyboard.json(each sentence must be covered by at least one shot; segment transitions and shot entrances take enum values); runpython3 scripts/validate.py storyboard <slug>/storyboard.json --timeline <slug>/voice/timeline.json. - Assets: Use
python3 scripts/fetch_asset.py'saddcommand to register each asset; usepruneto remove unused assets. Do not use assets with unclear licensing. - Build project:
python3 scripts/scaffold_project.py --job <slug>/job.json --out <slug>/projectgenerates the project; write each segment's scene following the example (assets/example/). Then runpython3 scripts/build_timeline.py --timeline <slug>/voice/timeline.json --storyboard <slug>/storyboard.json --subtitles <slug>/voice/subtitles.json --manifest <slug>/assets-manifest.json --project <slug>/project. Then runnpm ciinside the project. - Self-check: Run
bash scripts/check_project.sh <slug>. On failure, readcheck/report.json, fix, and rerun; maximum 3 attempts. If still failing, stop and report. - Render: Run
bash scripts/render.sh <slug>to produce the final video (<slug>/out/video.mp4) and cover (<slug>/publish/cover_<W>x<H>.png), with automatic validation. - Publish copy and delivery: Per PUBLISH, write a set of
publish/<platform>/title.txt,description.txtfor each target platform; write tags per platform inpublish/<platform>/tags.txt(one per line). Runpython3 scripts/validate.py publish <slug>,python3 scripts/validate.py deliverable <slug>,python3 scripts/validate.py leak <slug>. Then runpython3 scripts/fetch_asset.py credits-diff --manifest <slug>/assets-manifest.json --slug-dir <slug>to verify credits.
Style Hard Rules Summary
- Colors, font sizes, and animation values come only from
assets/tokens.json; background color base is #070A0F. Scene code must not hardcode color values (STYLE). - Entrances are uniformly spring; segment transitions have 5 types, shot entrances have 3 types; use the storyboard enums (MOTION).
- Use only the 15 registered components; for components not in the registry, write them inside the project using tokens +
useLayout()(COMPONENTS). - Only four layers: background / scene / hud / subtitle. No end credits screen. Video length = voiceover length.
- Randomness uses only
random(seed);Math.randomis forbidden. - Layout is derived from canvas width and height; only
src/layout/presets.tsinsrc/may contain canvas dimensions (LAYOUT). - Script format per SCRIPT; voiceover parameters per VOICE; asset licensing and credits per ASSETS.
Prohibited Actions
- Do not publish or upload to any platform.
- Do not leak the Key: do not display it, do not write it into output files, do not let the user paste it in chat, do not switch TTS engines.
- Do not use assets with unclear licensing. Do not include links in credits, descriptions, or titles.
- Do not fabricate data: numbers without sources must not appear in the script or on screen.
- Do not ask the user any questions between topic collection and delivery, and do not request any assets.
Delivery
Return the contents of deliverable.json in one go: final video path and duration, aspect ratio, cover, titles and descriptions per platform, tags, asset credits, output directory, and notes.