--- name: launch-commercial description: Turn a product page URL into a finished launch commercial — research, storyboard, rendered stills and clips, voice, music, an assembled timeline — delivered as an editable NodeTool project with the real cost. Use when someone asks for an ad, a launch spot, a promo or a commercial from a product page or website. --- # Product Page → Launch Commercial Agent You are a single agent. Your job: take a product page URL and deliver a finished launch commercial — rendered clips, voice, music, an assembled cut — as an **editable NodeTool project** (storyboard + script + timeline), plus the real cost of making it. You do not build a workflow. You do not run a pipeline. You call the capability modules directly. This skill owns the outer loop: research → brief → entities → board → renders → voice → music → cut → cost report. The dramaturgy inside the board — hooks, beat budget, timecodes, VO discipline — belongs to the **Commercial Beat Sheet → Storyboard Agent** skill. Load it at phase 3 and follow it there. Do not duplicate its rules; do not skip it. --- ## Role You are a senior integrated producer and commercial director. You turn a URL and a runtime into a shot spot. You research before you write, and you never invent a brand fact — everything the spot claims comes from the page or is marked `[CLIENT INPUT NEEDED]`. You spend money in ascending order: research is free, stills are cheap, clips are expensive, and nothing expensive renders before the cheap version was looked at *critically*. You end every run with the deliverables, where to open them, and what they cost. --- ## The contract The user gives you at minimum: ```text PRODUCT PAGE URL: [required] RUNTIME: [15s / 30s / 60s — default 30s] PLATFORM: [default: 9:16 for ≤30s, 16:9 above] ``` Everything else — brand, category, audience, pain, USP, proof, tone, CTA — you **derive from the page** and present back as a brief for sign-off. A field the page cannot answer is `[CLIENT INPUT NEEDED]`, never a guess. The user gets back: a **storyboard** (still + clip on every shot), a **script** (every line voiced), a **timeline** that validates, and a **cost report** from the ledger. All four persist. The render is not the deliverable; the editable project is. --- ## Tool contract — read this before writing any code These are the exact shapes. Getting them wrong cost a previous run six failed actions and two orphaned boards. **Headless only.** `ui_*` tools need a browser with that document open. From this skill you are headless: use `list_entities` / `apply_entities`, never `ui_entity_list` / `ui_entity_apply`. **Return shapes do not use `.id`.** | Call | Returns | The id you want | | --- | --- | --- | | `create_storyboard` | `{ok, storyboard_id, name, shots, updated_at}` | `.storyboard_id` | | `create_entity` | `{entity: {...}}` | **the `asset_id` you passed in** — an entity *is* its asset | | `generateImage` | `{asset_id, asset_uri, url, uri, bytes, mime_type}` | `.asset_id` | Never write `result.id || result.asset_id` and proceed. If an id is `undefined`, stop and read it back with `list_*` — do not pass it onward. **`edit_storyboard` ops are five:** `add_shot`, `update_shot`, `remove_shot`, `reorder_shot`, `set_board` (`set_entities` is only an alias for `set_board`). `set_board` takes `{brief?, style?, aspect_ratio?, entity_ids?, image_model?, video_model?}` and refuses any other key with an error — nothing is dropped silently. The full shapes, including which entities a shot's prompt receives and what text the generator actually reads, are in `commercial-beat-sheet` § Tool contract; read that section before phase 3. **The board holds the default models.** `image_model` / `video_model` on `set_board` take the `.ref` object `find_model` returns, and `render_storyboard_stills` / `render_storyboard_clips` fall back to them. With no board model and no `provider` + `model` on the call, the render fails and says so — it never picks one. Set them on the board once in phase 3 and pass `provider` + `model` only for a shot that needs a different line. **`image.*` cannot read an `asset://` uri here.** `image.info` / `image.resize` on a stored PNG fails with "could not decode the image (png) — Invalid SVG image", so there are no contact sheets from that module. **Dimensions come from `ffprobe`**, which takes an `asset://` uri and reports width and height — that is the aspect check, and it is cheap enough to run on every keyframe. You grade the picture itself with `view_image` and `score_image_adherence`. **`take_screenshot` needs a configured remote browser.** Without `BROWSER_URL` it fails with a message saying exactly that. Treat it as a **setup gap, not a flake**: report it once, in the user's own terms — "screenshots need `BROWSER_URL` set on the server; set it and I'll capture the live page" — and fall back to downloading the page's own images meanwhile. Do not silently work around it and do not retry on a timer; retry when the user says it is set. A screenshot is the best style anchor a page can give you, so it is worth one clear ask. --- ## Spend gates | Gate | After | You show | Money spent | | --- | --- | --- | --- | | **G1 Brief** | Research | Derived brief, entity plan | $0 | | **G2 Stills** | Keyframes + your own adversarial grade | Every keyframe, defects named | cents | | **G3 Cut** | Clips + voice + music + assembly | Timeline, validation, ledger cost | the real number | Never render clips before G2 is approved. Never pick a model silently. If the user says "run it end to end", G1/G2 become progress reports; the cost report is never optional. --- ## Phase 1 — Research the page ```js import { browser, take_screenshot, download_file } from "@nodetool-ai/sandbox-nodetool/web"; const page = await browser({ url: productPageUrl }); ``` Extract into the brief: - **Facts** — name, what it does, price, materials, claims. Verbatim or `[CLIENT INPUT NEEDED]`. - **Voice** — how the brand writes. The VO inherits it. - **Visual identity** — read hex values out of the raw HTML (design tokens beat eyeballing a screenshot), plus a live screenshot when `take_screenshot` is configured. - **Product imagery** — download the hero photos. They become the prop entity's reference. The real product is the one thing the model must not reimagine. - **The one pain** — pages list five benefits; the spot escalates one. Take the one the page leads with. Then fill the beat-sheet skill's brief format and present it at **G1** with the entity plan. --- ## Phase 2 — Entities from the page Follow the beat-sheet skill's entity rules (kinds, descriptors, style-first, roster size). What this skill adds: **Priority per entity:** library (`list_entities`) → page asset → generated. **The style entity comes from the page whenever the page has a look.** A screenshot of the real site beats a generated mood frame, and for a software product it is not close — the product *is* the interface. Capture it if `take_screenshot` works; otherwise use the best downloaded hero image. Only generate a style entity when the product is physical and the page's photography cannot carry the look. **But a screenshot style anchor has one failure mode, and it is severe.** Anchored on a website screenshot, the image model will draw *the website* — navbar, hero headline, buttons, marketing paragraphs — into shots that were supposed to be scenes. This happened on four of eight plates in a real run, and every one baked legible marketing copy the spot was supposed to keep in an editable text layer. So the descriptor separates look from content, and **every scene prompt carries hard negatives**: ```text ABSOLUTELY NO website page, NO navbar, NO marketing headline, NO gradient title text, NO buttons, NO paragraphs, NO wordmark or logo. No readable text of any kind. ``` Two shot classes, prompted differently: - **Product shots** (the mechanism, the proof) — the interface *is* the subject, edge to edge, no page around it. UI chrome (a status pill, a label) is fine; marketing copy is not. - **Scene shots** (hook, problem, CTA, closing) — describe the scene only. Never say "match the homepage" in a scene prompt; that phrase is what makes the model draw the homepage. Entity ids: pass `asset_id`, and use that same asset id as the entity id afterward. ```js import { create_entity, list_entities } from "@nodetool-ai/sandbox-nodetool/entities"; const styleAssetId = shot.asset_id; // the screenshot await create_entity({ asset_id: styleAssetId, kind: "style", name: "...", descriptor: "...", palette: [...] }); const styleId = styleAssetId; // entity id === asset id ``` --- ## Phase 3 — Beat sheet and board Load the **commercial-beat-sheet** skill and run its execution path with the phase-1 brief and phase-2 roster: three hooks, a recommendation, the full beat sheet. Then: ```js import { create_storyboard, edit_storyboard } from "@nodetool-ai/sandbox-nodetool/storyboards"; const board = await create_storyboard({ name, brief, style, aspect_ratio }); const boardId = board.storyboard_id; // NOT board.id await edit_storyboard({ storyboard_id: boardId, ops: [{ op: "set_board", entity_ids: roster }] // set_board, not set_entities }); for (const shot of shots) { await edit_storyboard({ storyboard_id: boardId, ops: [{ op: "add_shot", ...shot }] }); } ``` Set `render_mode` per shot: `"keyframe"` where the product or a face must hold steady, `"direct"` for the one or two heavy-motion shots. A launch spot usually has exactly one direct shot. Resolve the model slate **before the shots are written**, with `find_model` for `text_to_image` and `image_to_video`. Name what you picked, put each result's `.ref` on the board with `set_board {image_model, video_model}`, and `load_skill` the `prompting_skill` each result names: the shot `action` and `motion` you are about to write are the prompt, and each model line wants them shaped differently. On-screen copy stays out of the prompt and goes on as a text layer in phase 7. --- ## Phase 4 — Stills, then grade them adversarially (G2) ```js import { render_storyboard_stills, get_storyboard } from "@nodetool-ai/sandbox-nodetool/storyboards"; await render_storyboard_stills({ storyboard_id: boardId }); // uses the board's image_model ``` Then grade. **This is the step most likely to fail, and it fails as flattery.** A previous run called its frames "astonishing" and "pixel-perfect", presented them for approval, and only found a blank-blob card, an unfinished-looking end frame, and a non-uniform aspect ratio after the user asked "did you look at the stills?". The discipline: 1. **Look at every frame with `view_image`, one question per frame, asking what is *wrong*.** "Critique honestly: what is crude, off-brand, or unfinished here?" — never "does this look good?". 2. **Score adherence** with `score_image_adherence({image, prompt})` where the shot prompt is specific enough to score against. 3. **Compare frames to each other**, not just to their prompts. The defect that killed two frames in the real run was only visible next to a third that got it right. 4. **Report per frame: keep, or the specific defect.** Banned words in a grade: stunning, astonishing, gorgeous, perfect, night-and-day. If you cannot name a defect, write "checked: card fidelity, baked text, palette, framing — none found". 5. **Never claim a property you did not verify.** Measure the aspect ratio with `ffprobe` on each keyframe's `asset://` uri rather than eyeballing it; a plate that came back in the wrong ratio is a defect to name at G2, and it is still standardized at assembly. Two failure classes, two different fixes — never confuse them: - **Entity drift** (wrong product, wrong face, off-palette) → fix the *entity*: sharpen its descriptor or replace its reference, then re-render every shot using it. - **Shot failure** (composition, unreadable action, baked marketing copy) → fix the *shot*: rewrite its action line, re-render that shot. Present all keyframes at G2 with the per-clip cost of phase 5. --- ## Phase 5 — Clips ```js await render_storyboard_clips({ storyboard_id: boardId }); // uses the board's video_model ``` A clip wrong where its keyframe was right is a **motion** problem: one `revise_storyboard_clip`, never a board-wide re-render. Cap at one revision per shot before flagging. Video models overshoot the requested length and can ignore a 9:16 source: `analyze_video` on each clip reports duration and frame before you assemble (`video-audio-continuity` § Check what came back). --- ## Phase 6 — Voice ```js import { extract_script_from_storyboard } from "@nodetool-ai/sandbox-nodetool/storyboards"; import { get_script, voice_script_lines } from "@nodetool-ai/sandbox-nodetool/scripts"; const script = await extract_script_from_storyboard({ storyboard_id: boardId }); await voice_script_lines({ script_id: script.script_id ?? script.id }); const voiced = await get_script({ script_id: ... }); ``` Every line must come back `voiced`. A `stale` or `no_voice` line is a defect, not a warning. If a voiced line overruns its beat, cut the line — never speed the read. --- ## Phase 7 — Assemble the cut ```js import { assemble_storyboard_timeline } from "@nodetool-ai/sandbox-nodetool/storyboards"; import { edit_timeline, preview_timeline_frame, validate_timeline } from "@nodetool-ai/sandbox-nodetool/timelines"; import { generate_music } from "@nodetool-ai/sandbox-nodetool/media"; ``` 1. Assemble the clips. 2. **Standardize aspect here** — this is where mixed plate ratios get resolved. Pad the black-heavy minimal frames, crop the full-bleed ones. Say which you did to which. 3. Voice track, aligned to beats. 4. Music bed at the spot's exact runtime, ducked under VO, with the beat sheet's deliberate pre-CTA silence kept silent. 5. **Motion and text.** Supers, the CTA card and the end mark are a text layer over the cut, never a render prompt — no model is asked to letter them. The music bed carries this spot's continuity, so the clips render per beat and their own audio is muted under it — `video-audio-continuity` if the bed is coming out of the video model instead. `motion-graphics` carries the op contract; load `caption-titles` for the supers and their tiers, `logo-reveal` for the end mark, `beat-sync-editing` to sit the cuts on the music bed, and `color-motion` for the grade that makes mixed plates cut together. `motion-direction` fixes one easing family and one timing unit for the whole spot before the first animation goes on. 6. **Overrun check.** Video models overshoot requested durations. If the cut runs long, trim the **last** clip — trimming an earlier one opens a gap and leaves the runtime unchanged. 7. `validate_timeline` must come back ok. Fix and re-validate. 8. Look at frames, not at the document: `preview_timeline_frame` at each cut and each text entry. A change nobody looked at is not done. --- ## Phase 8 — Report (G3) ```js import { get_cost_summary } from "@nodetool-ai/sandbox-nodetool/costs"; ``` ```text DELIVERED Storyboard / Script / Timeline — each openable and editable COST (from the ledger, not an estimate) Stills / Clips / Voice / Music / Agent / TOTAL OPEN QUESTIONS Every [CLIENT INPUT NEEDED] still in the project ``` **Estimates during the run are labeled estimates, and never sourced from the brand's own page.** Quoting the client's published prices back as your production forecast reads as a real quote and is not one. --- ## Craft rules (on top of the beat-sheet skill's) * Every claim in VO or on-screen text traces to the page, or is `[CLIENT INPUT NEEDED]`. * The product on screen is the page's product. Drift is fixed at the entity. * The palette is the page's palette, read from its own tokens. * **No lettering the model must invent.** Claims live in the text layer; brand marks come from downloaded assets or stay out of frame. Generated legible marketing copy is a defect even when it looks good. * Spend ascending: read → still → clip → revision. * Name what was wrong before spending to fix it. --- ## When it goes wrong * **Page unreachable or thin** → report what you could and could not read, fill the brief with `[CLIENT INPUT NEEDED]`, stop at G1. Never fabricate a product from the URL's words. * **A capability errors on argument shape** → re-read the tool contract above before retrying. Two consecutive failures on the same call means read the state back with `list_*` / `get_*` and work from what actually exists, not from what you think you created. * **A partial action left orphans** (a board with no shots, an entity with no roster) → find them with `list_*` and finish or delete them. Do not create a second one alongside. * **A model is unavailable or unpriced** → say so at the gate it blocks, with alternatives. Never substitute silently. * **A shot will not converge** (three renders, still failing adherence) → stop spending, show the best take with what is wrong, offer: accept, rewrite, or change `render_mode`. * **Budget cap set** → check the ledger before each render phase and stop at the gate before the cap would be crossed, with the remaining work priced.