1实现原理 · 为什么它能做到
批量机制:一个数据驱动模板 × CSV = N 个变体,每行一个已 message-matched 的完整广告,逐行渲染。
The payoff: author the ad once, then let a CSV drive the matrix. Each row is one fully-formed, message-matched variant. Render once per row.
确定性渲染纪律:模板只读一个 variant 对象,所有动画值必须是 useCurrentFrame() 的纯函数。
Make every animated value a pure function of `useCurrentFrame()` so each frame renders deterministically (no CSS transitions, no library timers — they desync the render).
实验可解释性纪律:一次只变一个字段,其余布局/动效/配色/时长全部锁死。
Hold layout, motion, colors, and timing constant; swap *only* the field under test (hook, or offer, or CTA). Mixing two changes makes the winner uninterpretable.
hook 与 CTA 必须消息对齐:3 秒内的承诺=按钮兑现的承诺。
The promise made in the first 3 seconds must be the promise the button pays off.
多比例导出:hook/产品/CTA 全部设计在 1:1 中心方块内,靠重新居中而不是 letterbox。
Design the hook text, product, and CTA inside the **1:1 center square** so they survive every crop.
平台安全区是真规格:9:16 底部三分之一被平台 UI 占据,必须预留 bottomSafe。
The 9:16 bottom third is the single most violated zone — captions, the CTA button, and the handle stack there.
坏数据必须 fail loud:解析器累计错误后 exit 1,不产出任何坏广告。
error(s) — no broken ads written.
验证环:先渲染便宜 PNG stills,再用 shipped props(真实数据行)判定而非 defaultProps。
Cheap PNGs first, full encode only once they're clean. Render with the **shipped** props (the real row), not just `defaultProps`.
2核心能力
3外部依赖
| Kind | Dependency / Endpoint |
|---|---|
| package | remotion(帧驱动渲染框架) |
| cli | npx remotion render / still |
| package | zod(输出契约要求的 props schema) |
| cli | ffmpeg / ffprobe(仓库共享 contact-sheet.sh、probe-mp4.sh) |
| network | iart.ai(reference 尾部推广链接,具 utm 参数;仅读者点击才请求) |
4管控建议与判定依据
- scripts/: 执行本地脚本或命令: skill 目录内无自带脚本;SKILL.md 指示 agent 执行 `node csv-to-props.js variants.csv ./pr
- 网络端点: 声明外部网络访问: 执行期无业务 API 调用、无业务端点查询;广告数据与素材全部来自本地。
- 本地工作目录: 文件读写与工件输出: 在用户工程内写 `props/<id>.json`、`out/<id>.mp4`、`out/demo.gif`;contact-sheet.sh 写
5第二遍独立确认
- [ok] skill 目录内是否藏脚本或凭证读取 — 目录只有 README.md(0B)/SKILL.md/references/*.md;全仓 token 扫描 process.env|API_KEY|TOKEN|cookie|keychain|Bearer 零实质命中(唯一命中是 product-demo reference 的 `.cookie-banner{display:none!important}`,属 UI 清理样式,非凭证读取)。
- [ok] SKILL.md 与 reference 的渲染命令是否自洽 — SKILL.md 走「扁平 props/ + --props-merge 传 aspect」,reference 走「props/<ar>/ 目录 + calculateMetadata 解析尺寸」;两条路线实现同一目标,非矛盾。
- [discrepancy] CSV 解析器校验的真实行为 — `if (errors) return;` 用的是全局错误计数:首个坏行之后,后续原本合法的行也不会写盘(注释宣称的语义是「不产出坏广告」)。行为偏保守、不会产出错误广告,但会让使用者误以为只有 1 行坏。
- [ok] hook 长度告警阈值与平台规格是否一致 — 解析器 `if (row.hook && row.hook.length > 60) console.warn(...)` 与 platform-specs 的 hook 在 9:16 ≤ ~60 chars 的规格对得上。
- [discrepancy] `Packaged helper (scripts/)` 的路径可解析性 — SKILL.md 写 `scripts/contact-sheet.sh` / `scripts/probe-mp4.sh` 这类相对路径,但这些脚本位于**仓库根** scripts/,skill 目录内并无 scripts/(skill 位于 skills/ad-creative-video/);从 skill 目录直接执行会找不到文件。
- [ok] 跨 skill 指名与边界声明 — SKILL.md 用结构描述而非 skill 名排除促销与证言类("Not for sale/discount countdown promos, and not for testimonial/review-driven ads"),不存在跨仓库依赖或指纹不明的外部 skill 调用。
6结论
6cc9db5805b68bad…