1仕組みと動作原理
一括処理メカニズム:データ駆動型テンプレート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.
決定論的レンダリング規律:テンプレートは1つの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).
実験の解釈可能性に関する規律:一度に変更するフィールドは1つのみとし、それ以外のレイアウト/アニメーション/配色/再生時間はすべて固定する。
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.
複数アスペクト比での書き出し:フック/製品/CTAをすべて1:1の中心スクエア内に配置し、レターボックスではなくリセンタリング(再中央揃え)で対応。
Design the hook text, product, and CTA inside the **1:1 center square** so they survive every crop.
プラットフォームのセーフゾーンは厳格な仕様:9:16の下部3分の1はプラットフォームの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静止画を先にレンダリングし、defaultPropsではなくshipped props(実データ行)で判定する。
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.mdがエージェントに `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…