render-qa-and-surgical-changes
Verify final video renders and make tiny safe edits without breaking approved sync, including proof frames, contact sheets, media probing, stale theme scans, exact timestamp checks, carryover-frame refreshes, and re-render-only-affected-scenes workflows. Use when a user asks for final QA, HD/render verification, a small text/audio/color change, or regression checks after approved timing.
1How It Works & Mechanism
Establish boundaries with the five surgical rules first: modify source instead of finished renders, re-render only affected scenes, rebuild assembly from the current approved timeline, do not redesign/retime/resync unrelated segments, and search for duplicate and carryover frames before declaring completion.
- Patch source artifacts, not the final MP4, when source scenes and assembly scripts exist.
The QA sequence is fixed to five stages: probe finished renders (duration/resolution/fps/audio track/sample rate/channels) → extract proof frames (scene boundaries, change moments, caption style frames, ending CTA) → generate contact sheets (including before/after comparisons) → inspect audio (voiceover present, music audible where intended, ending silence or fade correct, no truncated words after clipping) → check themes and text (stale colors, carryover duplicate tags, verifying logos and product screen recordings were not accidentally recolored).
5. Check theme and text.
Capture three-frame evidence (exact moment + slightly before + slightly after) for user-specified timestamps, and verify directly against the finished render rather than only source scenes; if the same visual appears in the next scene, boundary frames must also be extracted.
- Extract a frame at that exact time.
Follow specific procedures for three types of safe replacements: Audio (probe old vs. new duration → replace path and rebuild if identical, decide between tempo adjustment or visual retiming if slightly different, confirm downstream scene start times remain unchanged unless requested, regenerate captions if wording changed); Text (edit source → search next scene for carryover copy → re-render → rebuild → extract frames at visible moments); Theme (use theme scanner, edit only editable sources, never touch logos or screen recordings, check SVGs, check next scene carryovers).
- Search next scene for carryover copy.
Search before acting: search all source scene files for text or colors, assembly scripts for audio paths and durations, and caption scripts for old wording; search templates/examples only when public documentation needs updating; never search generated artifacts (unless conducting visual QA).
- Ignore generated renders unless doing visual QA.
Standardize the QA output package: probe text or console summary, proof-*.png, contact-sheet.jpg, preview-*.mp4 for moving sync, and final render path; explicitly note that artifacts must not be committed to Git (unless they are public examples).
preview-*.mp4` for moving sync checks.
Define stop conditions: stop and ask when changes conflict with locked scene approvals, source assets for visible end frames cannot be found, text or audio changes imply unapproved script changes, or a logo is recolored with ambiguous brand ownership; otherwise, make the minimal safe change and verify.
- A text/audio change implies a script change the user has not approved.
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| cli | ffprobe / ffmpeg(经仓库脚本间接依赖:探针与抽帧、接触表合成;缺失即 SystemExit) |
| package | 仓库根脚本 scripts/probe_media.py(ffprobe JSON 封装:时长/体积/码率/视频编码与分辨率/帧率/像素格式/音频编码/采样率/声道) |
| package | 仓库根脚本 scripts/extract_proof_frames.py(按 -ss 精确抽帧并可拼接触表)与 scripts/make_contact_sheet.py |
| package | 仓库根脚本 scripts/scan_theme_colors.py(按允许色白名单扫文本源文件,跳过 node_modules/.git/renders/snapshots/assembly/dist/build,发现 review 项时退出码 1) |
| package | 仓库根脚本 scripts/build_ass_captions.py(字幕)与 scripts/timeline_manifest_to_ffmpeg.py(清单转装配计划) |
| package | 模板 templates/change-request.md(收尾小改动前必须先填:改动内容、保留项、实现规则、证明表、验收标准) |
4Recommended Governance & Evidence
- scripts/: Execute local scripts or commands: (executed by host agent, located in repository root scripts/, not bundled in skill directory) scripts/probe_media.py — invokes ffprobe
- 本地工作目录: File read/write and artifact output: probe text or console summary (QA output package)
5Second-Pass Verification
- [ok] 本 skill 的执行面「无网络」是否成立(逐个脚本核对) — 六个脚本的 import 只有 argparse/csv/json/re/shutil/subprocess/pathlib(scan_theme_colors 另用 re/pathlib),无 urllib/requests/socket/http;子进程调用仅 ffprobe/ffmpeg,参数为本地路径。故无素材外发、无端点查询,不构成黄档或橙档。
- [ok] SKILL.md 点名的六个脚本是否都真实存在 — pin 内 scripts/ 下有 build_ass_captions.py、extract_proof_frames.py、make_contact_sheet.py、probe_media.py、scan_theme_colors.py、timeline_manifest_to_ffmpeg.py——与 SKILL.md 的 Use repo scripts when available 清单逐项对应。
- [ok] 「抽该时刻 + 略前 + 略后」是否可用脚本实现 — extract_proof_frames.py 接受可重复的 --time(label=timestamp 形式),每个时刻用 ffmpeg -ss 精确抽一帧并按序号与标签命名,可直接表达 0.05s 级的前后帧;--contact-sheet 可一次拼出对比表。
- [discrepancy] 本 skill 是否点名了 ffmpeg/ffprobe 本身 — SKILL.md 全文只点名仓库脚本(含名字里带 ffmpeg 的 timeline_manifest_to_ffmpeg.py),未直接写 ffprobe/ffmpeg 命令;CLI 依赖由脚本内部承担(probe_media.py 的 shutil.which("ffprobe")、extract_proof_frames.py 的 shutil.which("ffmpeg") 缺失即报错退出)。使用者需知道脚本依赖 PATH 上的 ffmpeg/ffprobe。
- [ok] 「生成物不入库」与仓库实际忽略规则是否一致 — SKILL.md 的 Generated QA files do not need to be committed unless they are public examples. 与仓库 .gitignore(忽略 renders/、snapshots/、assembly/、captions/*.ass、captions/*.json 与各类视频扩展名)一致。
- [ok] QA 输出包的五个产物是否都有生成路径 — probe 摘要来自 probe_media.py;proof-*.png 来自 extract_proof_frames.py;contact-sheet.jpg 来自 extract_proof_frames.py 的 --contact-sheet 或 make_contact_sheet.py;preview-*.mp4 由宿主用 ffmpeg 生成(文档未点名脚本,属流程项);最终渲染路径由项目输出。除 preview 外均有随包工具。
6Verdict & Scenarios
47a9915a5d91b665…