Branded Reel Pipeline
Reusable framework that produces a premium short-form brand reel end to end. It is the
premium layer on top of media/short-form-video-production (ideation, hook,
retention, captions craft).
Use those for the creative craft; use this for the premium branded assembly with real
on-brand visuals and live data.
The proven stack (do not deviate without reason)
- Script — hook-first, retention-structured. Borrow craft from
content-creation
(Hook→Tension→Payload→CTA) and short-form-video-production. Beat table: t | OST | VO.
- Visuals + music —
higgsfield-generate skill. GPT Image 2 for hero frames (9:16,
2k, brand palette), sonilo_music for the bespoke bed. Frames are premium connective
tissue; live screens carry conversion.
- Voiceover — ElevenLabs
eleven_v3, stability 0.30, default voice id
cjVigY5qzO86Huf0OWal ("Eric"). Key from environment. Calm-operator delivery.
- Live-data capture —
reference/live-data-capture.py (Playwright). Parameterized:
URL + auth method + selector / API path. The differentiator: real dashboards, real
numbers count up on screen.
- Assembly — Remotion with brand-preset tokens (
templates/remotion-template/).
Parameterized by aspect ratio. Count-ups, curve-draws, glass device frames, the
audio-reactive orb. 1080x1920 @ 30fps for 9:16.
- Render + verify —
remotion render → ffprobe confirms duration/resolution/codec.
Input: the brief
A reel is driven by a brief object:
{
"subject": "Our AI agent that posts daily and tracks every number",
"brand_preset": "my-brand",
"format": "9:16",
"mode": "gated",
"live_data_source": {
"url": "https://your-dashboard.example.com/api/analytics?days=30",
"auth": { "method": "session_token", "mint": "node scripts/mint-session-token.js" },
"capture": "json",
"selector": null
},
"script": null
}
subject (required): what the reel is about.
brand_preset (required): a dir under presets/ matching your brand.
format: 9:16 (default) | 1:1 | 16:9.
mode: gated (default) | auto.
live_data_source (optional): { url, auth, capture: json|screenshot, selector }.
script (optional): pre-written beat table; if null the pipeline writes one in Stage 1.
A brief can originate from a Notion Content Factory database that appie-content-intelligence feeds: pull a row (subject + angle + target), map it onto this schema, run the pipeline.
Staged workflow (default mode: gated)
A run lives in a workspace dir projects/reels/<brief-hash>/ (or
projects/<name>-reel/ for a one-off). Cache keyed by brief hash (see Token optimization).
STAGE 1 — Script + assets plan
Hash the brief → workspace dir. If cache hit on script, reuse.
Resolve the brand preset (presets/<name>/preset.json + prompt fragments).
If script not supplied, write the beat table (script.md): t | OST | VO rows,
target 18-24s, hook in first 1.5-3s, abrupt end. Pull retention craft from
short-form-video-production. Honour brand voice rules.
Write the shot list / assets plan (assets-plan.md): which beats are generated
hero frames vs live-screen proof; the Higgsfield prompts (brand palette baked in);
the music brief; the VO script.
Confirm the live-data source is reachable (dry probe), but do NOT generate paid assets yet.
GATE 1 (gated mode): stop. Present script.md + assets-plan.md for approval.
In auto mode, continue without pausing.
STAGE 2 — Generate assets + capture live data
Generate hero frames via higgsfield-generate (one prompt per generated beat, brand
palette + 9:16). Cache by (brief-hash, beat-id, prompt-hash) so re-runs reuse.
Generate the music bed via sonilo_music (brand music brief). Cache.
Generate VO via ElevenLabs (reference/elevenlabs-vo.sh). Cache by VO-text hash.
Capture live data via reference/live-data-capture.py (URL + auth + capture).
Output live-data.json and/or capture.png. Crop screenshots if needed.
Place all assets into remotion/public/.
GATE 2 (gated mode): stop. Present the hero frames, the captured data/screens, the
VO file, and the music for approval before the (compute-heavy) render.
In auto mode, continue.
STAGE 3 — Assemble + render + verify
- Copy
templates/remotion-template/ into the workspace remotion/ (if not present),
wire the preset theme + brief data (beats, KPIs, captured json) into src/.
npm i (first run) then npm run render → MP4 (preset-driven aspect/fps).
ffprobe verify: duration within target, resolution matches format, h264/aac.
- Emit
RUN-REPORT.md: assets used, cache hits, token budget, ffprobe output, MP4 path.
Reel is delivered for posting (posting is a separate runtime step — never auto-post).
Flipping to auto
Set "mode": "auto" in the brief (or pass --mode auto). The two gates become
no-ops and the pipeline runs Stage 1→3 unattended. Flip this once a brand preset
has produced a clean reel 1-2x. Quality floor still applies: if Stage 3 verify fails,
stop and report, never ship a broken MP4.
Token optimization (priority)
Documented budget per run, and the levers that keep re-runs near-free:
- Brief-hash cache. Everything generated (script, each hero frame, music, VO) is
cached under
cache/<brief-hash>/ keyed by content hash. A re-run with an unchanged
brief regenerates nothing — it re-assembles from cache. Editing one beat only
invalidates that beat's frame + that VO line.
- Reuse hero frames across formats. 1:1 and 16:9 re-use the same 2k hero frames; only
the Remotion composition re-renders. No new Higgsfield calls for a format change.
- Cheapest competent tier for non-creative steps. Brief parsing, hashing, cache
lookups, ffprobe checks, JSON reshaping → plain shell / python, no model.
Script writing is the only step that wants a strong model; route the rest cheap.
- Single-pass generation. One Higgsfield prompt per generated beat (no iterate-loops
unless a gate rejects). One VO pass. One music pass.
- Reference, don't inline. Pass asset paths between stages, not asset bytes.
Token budget per run (design target):
| Step |
Tokens (orchestrator) |
Cost driver |
Cached re-run |
| Brief parse + hash |
~0 (shell) |
— |
~0 |
| Script write |
1-3k |
model (1 pass) |
0 (cache) |
| Higgsfield frames (N~5) |
~0 orchestration |
Higgsfield credits (~1/frame) |
0 (cache) |
| Music (sonilo) |
~0 |
Higgsfield credits |
0 (cache) |
| VO (ElevenLabs) |
~0 |
EL chars |
0 (cache) |
| Live-data capture |
~0 (script) |
— |
re-run if data stale |
| Remotion render |
~0 (shell) |
local CPU |
re-render only on edit |
| Verify (ffprobe) |
~0 (shell) |
— |
~0 |
Net: a fresh reel costs ~1-3k orchestrator tokens + Higgsfield/EL credits. A re-run after
an approval tweak costs only the changed beat. A format add (1:1/16:9) costs zero
generation credits.
Brand presets
Each preset is a dir under presets/<name>/:
preset.json — the tokens (colors, fonts, easing, motion language, music brief, VO
voice id + settings, default format) consumed by the Remotion theme.
higgsfield.md — the visual-prompt fragment (palette + style) prepended to every hero
prompt so all frames are on-brand.
- (optional)
notes.md — brand voice / do-not rules.
Add a brand preset
cp -r presets/example presets/<your-brand>
- Edit
preset.json: colors, fonts (@remotion/google-fonts names), easing, music
brief, VO voice id, default format.
- Edit
higgsfield.md: the palette + style sentence for hero prompts.
- (optional)
notes.md for brand voice rules.
- Reference it in a brief:
"brand_preset": "<your-brand>". No code changes.
Add a live-data source
reference/live-data-capture.py is parameterized. In the brief's live_data_source:
url: the page or API endpoint.
auth.method: none | session_token | cookie | header. For session_token,
set auth.mint to a command that prints the token.
capture: json (fetch + parse an API response) | screenshot (render + crop a live
dashboard into a glass device frame).
selector: CSS selector to wait for / crop to (screenshot mode).
The captured live-data.json is wired into the Remotion composition as count-up KPIs and
per-channel tiles; capture.png drops in as an <Img>/<OffthreadVideo> proof layer.
Invocation examples
# 1. From a brief file (gated — default; pauses at GATE 1 and GATE 2)
python3 reference/run-pipeline.py --brief templates/brief.example.json
# 2. Auto mode (no gates) once a preset is proven
python3 reference/run-pipeline.py --brief my-brief.json --mode auto
# 3. Add a 16:9 cut of an already-rendered reel (zero new generation)
python3 reference/run-pipeline.py --brief my-brief.json --format 16:9 --reuse-assets
The orchestrator reads this SKILL, resolves the brief, and runs the stages: it calls
higgsfield-generate for visuals/music, elevenlabs-vo.sh for VO, live-data-capture.py
for data, and the Remotion template for assembly — pausing at the two gates in gated mode.
run-pipeline.py is the deterministic skeleton (hash, cache, dirs, gate prompts, render,
verify); the creative calls are delegated to the existing skills.
Verification checklist
Cross-references
media/short-form-video-production/SKILL.md — ideation, hook, retention, caption craft.
1---2name: branded-reel-pipeline-23description: Use when producing a PREMIUM short-form BRAND reel end to end with real on-brand visuals and (optionally) live dashboard/analytics data baked in — e.g. 'make a branded reel', 'cut a premium reel for <brand>', 'turn this dashboard into a reel', 'make an analytics reel', 'reel from the Content Factory brief', 'show our real numbers in a 9:16'. The reusable framework + presets + scripts: script → Higgsfield visuals + music → ElevenLabs VO → Playwright live-data capture → Remotion brand-preset assembly → MP4 + ffprobe verify. Runs gated (human approves script, then assets, before final render) or auto. This is the premium-reel LAYER on top of short-form-video-production; do not duplicate that skill — cross-reference it for ideation/hook/retention craft.4---56# Branded Reel Pipeline78Reusable framework that produces a premium short-form brand reel end to end. It is the9**premium layer** on top of `media/short-form-video-production` (ideation, hook,10retention, captions craft).11Use those for the *creative* craft; use this for the *premium branded assembly* with real12on-brand visuals and live data.1314## The proven stack (do not deviate without reason)15161. **Script** — hook-first, retention-structured. Borrow craft from `content-creation`17 (Hook→Tension→Payload→CTA) and `short-form-video-production`. Beat table: `t | OST | VO`.182. **Visuals + music** — `higgsfield-generate` skill. GPT Image 2 for hero frames (9:16,19 2k, brand palette), `sonilo_music` for the bespoke bed. Frames are premium connective20 tissue; live screens carry conversion.213. **Voiceover** — ElevenLabs `eleven_v3`, stability `0.30`, default voice id22 `cjVigY5qzO86Huf0OWal` ("Eric"). Key from environment. Calm-operator delivery.234. **Live-data capture** — `reference/live-data-capture.py` (Playwright). Parameterized:24 URL + auth method + selector / API path. The differentiator: real dashboards, real25 numbers count up on screen.265. **Assembly** — Remotion with brand-preset tokens (`templates/remotion-template/`).27 Parameterized by aspect ratio. Count-ups, curve-draws, glass device frames, the28 audio-reactive orb. 1080x1920 @ 30fps for 9:16.296. **Render + verify** — `remotion render` → `ffprobe` confirms duration/resolution/codec.3031## Input: the brief3233A reel is driven by a brief object:3435```json36{37 "subject": "Our AI agent that posts daily and tracks every number",38 "brand_preset": "my-brand",39 "format": "9:16",40 "mode": "gated",41 "live_data_source": {42 "url": "https://your-dashboard.example.com/api/analytics?days=30",43 "auth": { "method": "session_token", "mint": "node scripts/mint-session-token.js" },44 "capture": "json",45 "selector": null46 },47 "script": null48}49```5051- `subject` (required): what the reel is about.52- `brand_preset` (required): a dir under `presets/` matching your brand.53- `format`: `9:16` (default) | `1:1` | `16:9`.54- `mode`: `gated` (default) | `auto`.55- `live_data_source` (optional): `{ url, auth, capture: json|screenshot, selector }`.56- `script` (optional): pre-written beat table; if null the pipeline writes one in Stage 1.5758A brief can originate from a **Notion Content Factory** database that `appie-content-intelligence` feeds: pull a row (subject + angle + target), map it onto this schema, run the pipeline.5960## Staged workflow (default mode: gated)6162A run lives in a workspace dir `projects/reels/<brief-hash>/` (or63`projects/<name>-reel/` for a one-off). Cache keyed by brief hash (see Token optimization).6465### STAGE 1 — Script + assets plan661. Hash the brief → workspace dir. If cache hit on script, reuse.672. Resolve the brand preset (`presets/<name>/preset.json` + prompt fragments).683. If `script` not supplied, write the beat table (`script.md`): `t | OST | VO` rows,69 target 18-24s, hook in first 1.5-3s, abrupt end. Pull retention craft from70 `short-form-video-production`. Honour brand voice rules.714. Write the **shot list / assets plan** (`assets-plan.md`): which beats are generated72 hero frames vs live-screen proof; the Higgsfield prompts (brand palette baked in);73 the music brief; the VO script.745. Confirm the live-data source is reachable (dry probe), but do NOT generate paid assets yet.7576 **GATE 1 (gated mode): stop. Present `script.md` + `assets-plan.md` for approval.**77 In `auto` mode, continue without pausing.7879### STAGE 2 — Generate assets + capture live data806. Generate hero frames via `higgsfield-generate` (one prompt per generated beat, brand81 palette + 9:16). Cache by `(brief-hash, beat-id, prompt-hash)` so re-runs reuse.827. Generate the music bed via `sonilo_music` (brand music brief). Cache.838. Generate VO via ElevenLabs (`reference/elevenlabs-vo.sh`). Cache by VO-text hash.849. Capture live data via `reference/live-data-capture.py` (URL + auth + capture).85 Output `live-data.json` and/or `capture.png`. Crop screenshots if needed.8610. Place all assets into `remotion/public/`.8788 **GATE 2 (gated mode): stop. Present the hero frames, the captured data/screens, the89 VO file, and the music for approval before the (compute-heavy) render.**90 In `auto` mode, continue.9192### STAGE 3 — Assemble + render + verify9311. Copy `templates/remotion-template/` into the workspace `remotion/` (if not present),94 wire the preset theme + brief data (beats, KPIs, captured json) into `src/`.9512. `npm i` (first run) then `npm run render` → MP4 (preset-driven aspect/fps).9613. `ffprobe` verify: duration within target, resolution matches format, h264/aac.9714. Emit `RUN-REPORT.md`: assets used, cache hits, token budget, ffprobe output, MP4 path.98 Reel is delivered for posting (posting is a separate runtime step — never auto-post).99100### Flipping to auto101Set `"mode": "auto"` in the brief (or pass `--mode auto`). The two gates become102no-ops and the pipeline runs Stage 1→3 unattended. Flip this once a brand preset103has produced a clean reel 1-2x. Quality floor still applies: if Stage 3 verify fails,104stop and report, never ship a broken MP4.105106## Token optimization (priority)107108Documented budget per run, and the levers that keep re-runs near-free:109110- **Brief-hash cache.** Everything generated (script, each hero frame, music, VO) is111 cached under `cache/<brief-hash>/` keyed by content hash. A re-run with an unchanged112 brief regenerates **nothing** — it re-assembles from cache. Editing one beat only113 invalidates that beat's frame + that VO line.114- **Reuse hero frames across formats.** 1:1 and 16:9 re-use the same 2k hero frames; only115 the Remotion composition re-renders. No new Higgsfield calls for a format change.116- **Cheapest competent tier for non-creative steps.** Brief parsing, hashing, cache117 lookups, ffprobe checks, JSON reshaping → plain shell / python, no model.118 Script writing is the only step that wants a strong model; route the rest cheap.119- **Single-pass generation.** One Higgsfield prompt per generated beat (no iterate-loops120 unless a gate rejects). One VO pass. One music pass.121- **Reference, don't inline.** Pass asset paths between stages, not asset bytes.122123**Token budget per run (design target):**124125| Step | Tokens (orchestrator) | Cost driver | Cached re-run |126|------|----------------------|-------------|---------------|127| Brief parse + hash | ~0 (shell) | — | ~0 |128| Script write | 1-3k | model (1 pass) | 0 (cache) |129| Higgsfield frames (N~5) | ~0 orchestration | Higgsfield credits (~1/frame) | 0 (cache) |130| Music (sonilo) | ~0 | Higgsfield credits | 0 (cache) |131| VO (ElevenLabs) | ~0 | EL chars | 0 (cache) |132| Live-data capture | ~0 (script) | — | re-run if data stale |133| Remotion render | ~0 (shell) | local CPU | re-render only on edit |134| Verify (ffprobe) | ~0 (shell) | — | ~0 |135136Net: a fresh reel costs ~1-3k orchestrator tokens + Higgsfield/EL credits. A re-run after137an approval tweak costs only the changed beat. A format add (1:1/16:9) costs **zero**138generation credits.139140## Brand presets141142Each preset is a dir under `presets/<name>/`:143- `preset.json` — the tokens (colors, fonts, easing, motion language, music brief, VO144 voice id + settings, default format) consumed by the Remotion theme.145- `higgsfield.md` — the visual-prompt fragment (palette + style) prepended to every hero146 prompt so all frames are on-brand.147- (optional) `notes.md` — brand voice / do-not rules.148149### Add a brand preset1501. `cp -r presets/example presets/<your-brand>`1512. Edit `preset.json`: colors, fonts (`@remotion/google-fonts` names), easing, music152 brief, VO voice id, default format.1533. Edit `higgsfield.md`: the palette + style sentence for hero prompts.1544. (optional) `notes.md` for brand voice rules.1555. Reference it in a brief: `"brand_preset": "<your-brand>"`. No code changes.156157## Add a live-data source158`reference/live-data-capture.py` is parameterized. In the brief's `live_data_source`:159- `url`: the page or API endpoint.160- `auth.method`: `none` | `session_token` | `cookie` | `header`. For `session_token`,161 set `auth.mint` to a command that prints the token.162- `capture`: `json` (fetch + parse an API response) | `screenshot` (render + crop a live163 dashboard into a glass device frame).164- `selector`: CSS selector to wait for / crop to (screenshot mode).165166The captured `live-data.json` is wired into the Remotion composition as count-up KPIs and167per-channel tiles; `capture.png` drops in as an `<Img>`/`<OffthreadVideo>` proof layer.168169## Invocation examples170171```bash172# 1. From a brief file (gated — default; pauses at GATE 1 and GATE 2)173python3 reference/run-pipeline.py --brief templates/brief.example.json174175# 2. Auto mode (no gates) once a preset is proven176python3 reference/run-pipeline.py --brief my-brief.json --mode auto177178# 3. Add a 16:9 cut of an already-rendered reel (zero new generation)179python3 reference/run-pipeline.py --brief my-brief.json --format 16:9 --reuse-assets180```181182The orchestrator reads this SKILL, resolves the brief, and runs the stages: it calls183`higgsfield-generate` for visuals/music, `elevenlabs-vo.sh` for VO, `live-data-capture.py`184for data, and the Remotion template for assembly — pausing at the two gates in gated mode.185`run-pipeline.py` is the deterministic skeleton (hash, cache, dirs, gate prompts, render,186verify); the creative calls are delegated to the existing skills.187188## Verification checklist189- [ ] Brief validates against schema; brand_preset exists190- [ ] Script: hook in first 1.5-3s, abrupt end, brand voice191- [ ] Hero frames are native 9:16 (or target aspect), on-brand palette192- [ ] Live data captured is REAL (not fabricated); KPIs match the source193- [ ] Gates respected in gated mode; skipped cleanly in auto mode194- [ ] ffprobe: duration in target window, resolution = format, codecs h264/aac195- [ ] Cache populated so re-runs reuse; format-add uses zero generation credits196- [ ] RUN-REPORT.md written with token budget + asset manifest197198## Cross-references199- `media/short-form-video-production/SKILL.md` — ideation, hook, retention, caption craft.