# CONTINUOUS-WORLD DECK — MISSION TEMPLATE (fill the {{SLOTS}}, paste into a fresh Claude Code session)

> **PORTABILITY NOTE (added 2026-07-27).** This process doc is published from Imperium's
> internal operating system. The METHOD is fully portable: prompts, model choices and
> parameters, CSS/SVG recipes, QA gates, and cost discipline all work anywhere. Paths that
> start with `~/.claude/`, `<repo-root>/`, `presentations/`, `scripts/`, or `memory/` are
> internal conveniences on the author's machine; substitute your own equivalents (any
> headless-browser screenshot loop, any image toolchain). Same for internal distribution
> steps (Google Drive folder IDs, Telegram bots) and `<your-vercel-team>` deploy scopes:
> use your own storage, messaging, and hosting. Working style anchors ship WITH this kit
> in `../cards/`, `../console/`, and `../folder/` — start from those, not from zero.

> Reusable version of the prompt that built https://aios-v2.imperiumos.ai in one overnight run (2026-06-12→13). Technique dossier: `presentations/continuous-world-kit/TECHNIQUE.md`. Fill every {{SLOT}}; delete instructions in (parentheses). Run end-to-end: generate, build, test, screenshot-iterate, deploy to Vercel, send the link to Telegram. Do not stop at "pretty good."

---

## FILL BEFORE PASTING (the parameter block)

- **{{DECK_NAME}}** — e.g. "canaan-investor-walkthrough"
- **{{AUDIENCE_AND_OCCASION}}** — who sits in the room, what the deck must achieve
- **{{COPY_SOURCE}}** — where the verbatim slide copy lives (file/folder). Copy is LOCKED input; the mission restyles pixels and motion, never words. No new numbers.
- **{{ASSETS_PROVIDED}}** — folder of Alex's new input assets + one line each on what it is (brand refs? photos of a real place? logos? a live product URL?). State for each: REFERENCE (feeds generation) or VERBATIM (displayed as-is, e.g. logos, real UI).
- **{{WORLD_CONCEPT}}** — the ONE continuous place all slides live in, and its narrative arc from cover to close (v2: dusk cliffside estate, dark → fully lit; the arc should BE the deck's message)
- **{{SLIDE_TABLE}}** — one row per slide: # / copy source / scene (the still to generate, incl. WHERE the reserved text zone sits) / HTML overlay content
- **{{TRANSITION_TABLE}}** — one row per adjacent pair: the single-sentence camera move
- **{{PALETTE_AND_STYLE_FILTER}}** — brand hexes + the style-filter paragraph appended VERBATIM to every image prompt (grade, light, mood, grain, bans). Imperium default: see `assets/imperium/brand-v5/` (BRAND-BOOK.md + tokens) + the v2 filter in `presentations/aios-walkthrough-v2/00-REBUILD-PROMPT.md` §Visual System
- **{{FONTS}}** — Imperium default: Emilio Light headlines (kit `fonts/`) 72-110px tracking -1 to -2.5px, Switzer Medium labels 12-13px tracking 4-5px uppercase, numbers Switzer tnum. (Zero-webfont fallback for non-Imperium worlds only: `ui-serif, Georgia, serif` + ui-monospace labels.)
- **{{LIVE_IFRAME}}** — real product URL to project into a slide, or "none". If set: real UI is ALWAYS a live iframe, never generated fake UI, and the URL must be neutralised/client-safe before shipping.
- **{{CREDIT_CEILING}}** — hard spend cap for this run (v2 real cost: ~969 cr for 10 stills + loop + 9 films + retries; budget ~100 cr/transition + ~15 cr/still, then add 30% retry margin)
- **{{VERCEL_PROJECT}}** — new project name, deployed with `--scope <your-vercel-team>` (public; NEVER the imperium-vercel team, it SSO-walls)

---

## WHO YOU ARE

Senior creative director + front-end/motion engineer on an overnight shift. The deliverable is ONE thing: {{DECK_NAME}} as a single continuous cinematic world — every slide a generated frame of {{WORLD_CONCEPT}}, every slide change a generated camera move (start-frame = slide N's background, end-frame = slide N+1's background). Apple keynote register: huge serif type, vast negative space, one idea per slide, motion that feels inevitable.

## HARD RULES (Alex's OS, non-negotiable)

1. Never mention or reference Alex's age anywhere.
2. Imperium = "AI consultancy" / "AI software company", NEVER "AI agency."
3. No fabricated numbers. Copy from {{COPY_SOURCE}} stays EXACTLY as written; add nothing new.
4. No em dashes in slide copy.
5. Real product UI = live iframe ({{LIVE_IFRAME}}), never generated fake UI. Audit the embedded URL for client-identifying data before deploy.
6. YouTube (if ever needed): `cd <repo-root>/automations/youtube && node transcripts.js "<url>"`. Never WebFetch YouTube.

## STEP 0 — READ THESE (all under <repo-root>/)

1. `presentations/continuous-world-kit/TECHNIQUE.md` — the full technique dossier. Governs everything below.
2. `presentations/aios-walkthrough-v2/web/` — the reference implementation. You will COPY this app, not write one from zero. Read `components/Presentation.tsx` (the engine), `components/SlideShell.tsx`, `components/slides/*` (slide pattern + entrance timing), `components/slides/_premiumCard.ts` (glass), `app/globals.css` (token pattern).
3. {{COPY_SOURCE}} — the copy, verbatim.
4. {{ASSETS_PROVIDED}} — study every provided asset before generating anything; provided REFERENCE assets are attached to generations, VERBATIM assets are placed in HTML.
5. `memory/business/aireos/website/v3-research/higgsfield-asset-playbook.md` — generation doctrine (universal prompt template §2, loop rule §4, credit discipline §7).

## STEP 1 — ASSET INTAKE

Inventory {{ASSETS_PROVIDED}}. For each: REFERENCE or VERBATIM, and which slide(s) it serves. If a provided photo IS the world (a real building/venue/product), the world stills are generated FROM it (attach as reference image on still 01 and inherit down the chain) so the generated world stays recognisably that place. THIRD CASE — provided images ARE the slide backgrounds themselves: skip still generation for those slides entirely; upscale to 4k if needed (`upscale_image`), match grade across them, and generate ONLY the transition films between them (start/end frames = the provided images). Log the inventory in BUILD-LOG.md before any generation.

## STEP 2 — GENERATION (playbook governs; discipline summary)

- CHECK BALANCE FIRST (`balance` tool). Ceiling for this run: {{CREDIT_CEILING}}. Log every generation + spend in BUILD-LOG.md as you go.
- **Stills:** `gpt_image_2`, 4k, high, 16:9. VERIFY `response.model === "gpt_image_2"` (+ resolution/quality) on EVERY call; mismatch = discard unjudged, re-route. (Known quirk: nested `params.model` may read `videotape-alpha`; top-level fields are the truth.) Structured prompt every time: SUBJECT / COMPOSITION (name the reserved text zone from {{SLIDE_TABLE}}) / LIGHTING / LENS / GRADE / SECTION CONTEXT / {{PALETTE_AND_STYLE_FILTER}} appended verbatim.
- **Consistency by inheritance:** still 01 first, 2-3 candidates, pick best. Every subsequent still generated WITH a previous still attached as reference. One place, one grade.
- **Transitions:** `seedance_2_0`, **1080p stated explicitly on every call** (default slips to 720p), std, ~5s, `start_image` = still N, `end_image` = still N+1. Prompt = one sentence naming the camera move + "smooth continuous camera move, no cuts, no new subjects, cinematic, slow ease-in-out, no sound."
- **Ambient loop (cover):** same still as both start and end frame, 1080p, "ambient environmental motion only … perfect seamless loop."
- **Filter false-positives:** Seedance rejects harmless prompts (avoid "ignition/comes alive/sculpture"); rejected attempts STILL BILL. Two strikes on one film → Kling 3.0 for that film. Pass `declined_preset_id` past MCP preset interception.
- **Pilot, then batch:** still 01 → approve grade → batch stills. T1 → approve motion → batch transitions.
- **Previz tier (6+ transitions):** render ALL transitions on `seedance_2_0_mini` first (same start/end frames + prompts), wire the drafts into the deck, click through to judge motion + pacing, THEN re-render finals on `seedance_2_0` 1080p. Drafts validate everything at a fraction of the spend; verify mini's real per-job cost after the first job (the estimator under-reports video ~5x).
- **Idempotent generation:** before ANY generation, check `raw/` for the asset — present = skip, absent = generate; save each job's JSON beside its asset. Crash/re-roll/restart never regenerates (or re-bills) finished work.
- **Ceiling ladder** as {{CREDIT_CEILING}} nears: 4s films → 720p → only the highest-impact transitions (cover-in + the payoff) with 700ms crossfades elsewhere. Ship regardless; log what was cut.
- **Encode:** films `ffmpeg -y -i in.mp4 -an -c:v libx264 -preset slow -crf 22 -pix_fmt yuv420p -movflags +faststart` → `web/public/world/` (≤4MB each). Stills → webp 2560×1440 q88 (≤450KB). Raws stay in `raw/`.

## STEP 3 — THE APP (copy, don't create)

Copy `presentations/aios-walkthrough-v2/web/` → `presentations/{{DECK_NAME}}/web/`, then rework:

1. **Pin `framer-motion@^11.18.2`** (11.11 breaks under React 19). `npm run build` must pass before QA.
2. `Presentation.tsx`: swap the SLIDES array (id/title/bg/idleLoop/toNext/Component per {{SLIDE_TABLE}}). The engine (phase machine, HEAD-probe crossfade fallback, skip protection, 12s safety, preloading, back-nav crossfade, reduced-motion) is proven — do not redesign it.
3. Slides: new components per {{SLIDE_TABLE}}, copy VERBATIM from {{COPY_SOURCE}}, entrance choreography per the v2 pattern (eyebrow 0.35s → headline 0.5s → sub 0.95s → cards 1.2s + i×0.18 stagger, ease [0.22,1,0.36,1]). {{FONTS}}. Glass cards via `_premiumCard.ts` — never opaque cards on photography.
4. Legibility armour stays ON: the always-on scrim gradient, h1 text-shadow, ink tokens. Text never sits on busy photography without glass or reserved negative space.
5. {{LIVE_IFRAME}} if set: absolutely position the iframe into its screen rect in the still (measure the rect from a screenshot, per-pixel), `data-no-nav-click`, LIVE badge.
6. `layout.tsx` metadata: title = the deck's real name.

## STEP 4 — QA LOOP (relentless; Playwright against `npm run dev`)

0. **SSIM seam gate first (script in TECHNIQUE.md §8.0):** every encoded film's first frame vs still N and last frame vs still N+1, plus the ambient loop's first-vs-last. ≥0.90 pass, 0.75–0.90 eyeball, <0.75 = regenerate or demote to crossfade. Re-run after every re-roll. Log all scores in BUILD-LOG.md.
1. Screenshot every slide at 1920×1080 (text settled) → `qa/screenshots/`.
2. Verify film↔still frame-matching on 3 key transitions (first/mid/last frame captures) — motion feel only; frame identity is the SSIM gate's job.
3. Console: zero app errors. `npm run build` clean.
4. Score each slide: (a) brand bar, (b) Apple-keynote register, (c) **LEGIBILITY — the criterion v2 lost on. Every word readable at a glance; if text fights the photo, fix with scrim/glass/negative-space regen, never smaller type.**
5. Max 3 passes per slide; then a full click-through; then click through the LIVE deployed URL.

## STEP 5 — DELIVERY

- Deploy: `cd presentations/{{DECK_NAME}}/web && npx vercel deploy --prod --scope <your-vercel-team>` to NEW project {{VERCEL_PROJECT}}. Verify the live URL via Playwright (3-slide click-through).
- `BUILD-LOG.md`: every generation (prompt, model-field verification, credits, keep/reject), the chain map, every QA pass, final balance.
- `MORNING-REPORT.md`: live URL, what shipped, honest deviations + judgement calls, credits start→end, Alex's next actions.
- Telegram: `node <repo-root>/scripts/notify-alex.js "{{DECK_NAME}} LIVE: <url>" --summary "<3-line result>"`.
- Git: commit at every phase boundary, push at the end (media is globally gitignored; Vercel uploads the working dir).

## ENDURANCE

- Tool fails twice → route around, log it, keep moving. Film still rendering at close-out → ship with the crossfade fallback and log the one-command morning pickup. Credits hit the ceiling → finish remaining transitions as crossfades, ship anyway.
- Done = all slides + transitions live on Vercel + QA clean + reports written + Telegram sent. Until then, keep looping.

GO: read Step 0 → asset intake → check balance → pilot still 01 → batch stills → pilot T1 → batch films + loop → copy the app → build slides → QA loops → deploy → report → notify.
