From 01af799eb1cacea12fabaa2a7ceb9d6da342a626 Mon Sep 17 00:00:00 2001 From: ukimsanov Date: Wed, 20 May 2026 11:11:25 -0700 Subject: [PATCH] feat(skill,cli): verify-beats gate + concept-first restructure + TS fix Bundles the remaining session work: - TS2538 fix in renderOrchestrator.ts (pre-existing, unblocks build hook) - verify-beats CLI: structural verification gate sub-agents cannot bypass. Cross-checks compositions/beat-N-verify.json claims against actual HTML and snapshot files on disk. 11 gates incl. lint exit, frame observations, brand hex grep-able, asset paths grep-able, headline >=80px. - Skill restructure: concept-first ordering, video-as-medium grammar, brand-floor 'must' rules (logo in opener+closer), step-1-design.md component CSS restored (3 -> 6 sections, 165 -> 317 lines). - step-5/step-6 wire the verify-beats gate into Definition of Done. - Beat-builder-guide rewritten so sub-agents write verify.json instead of chat-report 'looks good'. Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/cli/src/cli.ts | 1 + packages/cli/src/commands/verify-beats.ts | 340 ++++++++++++++++++ packages/cli/src/help.ts | 1 + .../src/services/renderOrchestrator.ts | 3 +- skills/website-to-hyperframes/SKILL.md | 55 ++- .../references/beat-builder-guide.md | 113 +++++- .../references/step-0-capture.md | 18 +- .../references/step-1-design.md | 178 ++++++++- .../references/step-2-brief.md | 83 ++--- .../references/step-3-storyboard.md | 149 ++++++-- .../references/step-4-vo.md | 2 +- .../references/step-5-build.md | 92 ++++- .../references/step-6-validate.md | 3 + 13 files changed, 909 insertions(+), 129 deletions(-) create mode 100644 packages/cli/src/commands/verify-beats.ts diff --git a/packages/cli/src/cli.ts b/packages/cli/src/cli.ts index 9d8e23b960..911c980504 100644 --- a/packages/cli/src/cli.ts +++ b/packages/cli/src/cli.ts @@ -80,6 +80,7 @@ const subCommands = { validate: () => import("./commands/validate.js").then((m) => m.default), snapshot: () => import("./commands/snapshot.js").then((m) => m.default), capture: () => import("./commands/capture.js").then((m) => m.default), + "verify-beats": () => import("./commands/verify-beats.js").then((m) => m.default), }; const main = defineCommand({ diff --git a/packages/cli/src/commands/verify-beats.ts b/packages/cli/src/commands/verify-beats.ts new file mode 100644 index 0000000000..f0ae55f35b --- /dev/null +++ b/packages/cli/src/commands/verify-beats.ts @@ -0,0 +1,340 @@ +/** + * `hyperframes verify-beats ` — cross-check per-beat verification artifacts. + * + * Why this command exists: Step 5 sub-agents historically self-reported "0 errors, + * looks good" without doing the work. The main agent trusted those reports and + * shipped slideshow-quality videos. This command makes verification machine-checkable: + * each sub-agent writes a `compositions/beat-N-verify.json` declaring what it built + * (lint exit, snapshots taken, brand values used, assets referenced). This command + * then cross-checks every claim against ground truth (composition HTML on disk, + * snapshot PNGs on disk, re-running lint) and exits non-zero if any beat fails. + * + * The main agent's Step 5 gate becomes: `hyperframes verify-beats ` exits 0. + * Sub-agents cannot fake verification because the CLI reads the actual files. + */ + +import { defineCommand } from "citty"; +import { existsSync, readdirSync, readFileSync } from "node:fs"; +import { join, resolve } from "node:path"; +import type { Example } from "./_examples.js"; + +export const examples: Example[] = [ + ["Verify all beats in a project", "hyperframes verify-beats videos/raycast-launch"], + ["Verify the current directory", "hyperframes verify-beats ."], + ["Print machine-readable JSON output", "hyperframes verify-beats . --json"], +]; + +interface BeatVerification { + beat: number; + composition_file: string; + lint?: { exit: number; errors: number; warnings: number }; + snapshots_taken_at_seconds?: number[]; + snapshot_files?: string[]; + frame_observations?: Array<{ t: number; describes: string }>; + brand_check?: { + primary_bg_hex_used?: string; + primary_bg_hex_design_md?: string; + matches_bg?: boolean; + accent_hex_used?: string; + accent_hex_design_md?: string; + matches_accent?: boolean; + headline_min_font_px?: number; + captured_assets_referenced?: string[]; + no_assets_reason?: string; + }; + concept_alignment?: string; +} + +interface BeatCheckResult { + beat: string; + pass: boolean; + failures: string[]; + warnings: string[]; +} + +const MIN_OBSERVATIONS = 3; +const MIN_HEADLINE_PX = 80; + +export default defineCommand({ + meta: { + name: "verify-beats", + description: + "Cross-check per-beat verification artifacts against composition HTML and snapshots", + }, + args: { + project: { + type: "positional", + description: "Path to the project directory containing compositions/", + default: ".", + required: false, + }, + json: { + type: "boolean", + description: "Output machine-readable JSON instead of human-readable text", + default: false, + }, + }, + async run({ args }) { + const projectDir = resolve(args.project); + const compositionsDir = join(projectDir, "compositions"); + + if (!existsSync(compositionsDir)) { + printOrJson( + args.json, + { pass: false, error: `No compositions/ directory at ${projectDir}` }, + () => console.error(`error: no compositions/ directory at ${projectDir}`), + ); + process.exit(2); + } + + const beatFiles = readdirSync(compositionsDir) + .filter((f) => /^beat-.*\.html$/.test(f)) + .sort(); + + if (beatFiles.length === 0) { + printOrJson( + args.json, + { pass: false, error: "No beat-*.html files found in compositions/" }, + () => console.error("error: no beat-*.html files in compositions/"), + ); + process.exit(2); + } + + const results: BeatCheckResult[] = []; + + for (const beatFile of beatFiles) { + const beatName = beatFile.replace(/\.html$/, ""); + const verifyPath = join(compositionsDir, `${beatName}-verify.json`); + const compositionPath = join(compositionsDir, beatFile); + const result: BeatCheckResult = { + beat: beatName, + pass: true, + failures: [], + warnings: [], + }; + + // Gate 1: verify.json exists + if (!existsSync(verifyPath)) { + result.failures.push( + `Missing ${beatName}-verify.json. The sub-agent that built this beat did not produce a verification artifact. Re-dispatch the sub-agent with the beat-builder-guide.md verify.json requirement enforced.`, + ); + result.pass = false; + results.push(result); + continue; + } + + // Gate 2: verify.json parses + let verify: BeatVerification; + try { + verify = JSON.parse(readFileSync(verifyPath, "utf-8")) as BeatVerification; + } catch (err) { + result.failures.push( + `verify.json is malformed JSON: ${err instanceof Error ? err.message : err}`, + ); + result.pass = false; + results.push(result); + continue; + } + + // Gate 3: composition HTML exists (sanity check) + if (!existsSync(compositionPath)) { + result.failures.push(`Composition file ${beatFile} not found on disk`); + result.pass = false; + results.push(result); + continue; + } + + const compositionHtml = readFileSync(compositionPath, "utf-8"); + + // Gate 4: lint result claims exit 0 + if (!verify.lint) { + result.failures.push("verify.json missing 'lint' field (must include exit code)"); + result.pass = false; + } else if (verify.lint.exit !== 0) { + result.failures.push( + `lint reported exit ${verify.lint.exit} with ${verify.lint.errors ?? "?"} errors. Lint must pass before this beat is complete.`, + ); + result.pass = false; + } + + // Gate 5: at least MIN_OBSERVATIONS frame observations + const obs = verify.frame_observations ?? []; + if (obs.length < MIN_OBSERVATIONS) { + result.failures.push( + `Only ${obs.length} frame observations provided (need ≥${MIN_OBSERVATIONS}). The sub-agent did not visually verify the beat at enough timestamps. View snapshot PNGs and write a concrete observation per frame.`, + ); + result.pass = false; + } + for (const o of obs) { + if (!o.describes || o.describes.trim().length < 20) { + result.failures.push( + `Frame observation at t=${o.t}s is too short or empty: "${o.describes}". Each observation must describe what's actually visible (≥20 chars).`, + ); + result.pass = false; + } + } + + // Gate 6: snapshot files exist on disk + const snapshotFiles = verify.snapshot_files ?? []; + if (snapshotFiles.length === 0) { + result.failures.push( + "No snapshot_files listed. Sub-agents must run hyperframes snapshot and list the resulting PNG paths.", + ); + result.pass = false; + } + for (const snapPath of snapshotFiles) { + const abs = snapPath.startsWith("/") ? snapPath : join(projectDir, snapPath); + if (!existsSync(abs)) { + result.failures.push( + `Snapshot file claimed but missing on disk: ${snapPath}. Sub-agent did not actually take this snapshot.`, + ); + result.pass = false; + } + } + + // Gate 7: cross-check bg + accent hex appear in the composition HTML + const brand = verify.brand_check ?? {}; + if (!brand.primary_bg_hex_used) { + result.failures.push("brand_check.primary_bg_hex_used missing"); + result.pass = false; + } else if (!compositionHtml.toLowerCase().includes(brand.primary_bg_hex_used.toLowerCase())) { + result.failures.push( + `brand_check claims primary_bg_hex_used="${brand.primary_bg_hex_used}" but that color does not appear in ${beatFile}. Sub-agent reported a color it did not actually use.`, + ); + result.pass = false; + } + if (!brand.accent_hex_used) { + result.warnings.push( + "brand_check.accent_hex_used missing (allowed if beat has no accent color)", + ); + } else if (!compositionHtml.toLowerCase().includes(brand.accent_hex_used.toLowerCase())) { + result.failures.push( + `brand_check claims accent_hex_used="${brand.accent_hex_used}" but that color does not appear in ${beatFile}.`, + ); + result.pass = false; + } + + // Gate 8: DESIGN.md alignment — bg and accent should match what DESIGN.md says + if (brand.matches_bg === false) { + result.warnings.push( + `primary_bg differs from DESIGN.md (used="${brand.primary_bg_hex_used}", design.md="${brand.primary_bg_hex_design_md}"). If this is intentional, note the override in concept_alignment.`, + ); + } + + // Gate 9: headline font size meets minimum + if ( + brand.headline_min_font_px !== undefined && + brand.headline_min_font_px < MIN_HEADLINE_PX + ) { + result.failures.push( + `Headline min font size is ${brand.headline_min_font_px}px (must be ≥${MIN_HEADLINE_PX}px for video readability).`, + ); + result.pass = false; + } + + // Gate 10: cross-check that captured assets claimed are actually referenced in HTML + const assetsClaimed = brand.captured_assets_referenced ?? []; + for (const asset of assetsClaimed) { + if (!compositionHtml.includes(asset)) { + result.failures.push( + `brand_check claims captured_assets_referenced contains "${asset}" but that path does not appear in ${beatFile}. Sub-agent reported an asset it did not actually use.`, + ); + result.pass = false; + } + } + if (assetsClaimed.length === 0 && !brand.no_assets_reason) { + result.warnings.push( + "No captured assets referenced in this beat. If intentional, add brand_check.no_assets_reason explaining why (e.g., 'opener is pure kinetic typography; brand logo lands in closer beat').", + ); + } + + // Gate 11: concept_alignment is non-empty and substantive + if (!verify.concept_alignment || verify.concept_alignment.trim().length < 30) { + result.failures.push( + "concept_alignment must be a non-empty sentence (≥30 chars) describing how this beat serves the storyboard's message and arc.", + ); + result.pass = false; + } + + results.push(result); + } + + // ── Brand-floor checks across the whole video ───────────────────────── + // The skill's minimum-utilization rule: logo should appear in opener AND closer. + // We check by looking at every composition's claimed captured_assets_referenced. + const overallWarnings: string[] = []; + const firstBeat = beatFiles[0]?.replace(/\.html$/, ""); + const lastBeat = beatFiles[beatFiles.length - 1]?.replace(/\.html$/, ""); + const logoLikePattern = /logo|brand|mark|wordmark/i; + function beatReferencesLogo(beat: string | undefined): boolean { + if (!beat) return false; + const verifyPath = join(compositionsDir, `${beat}-verify.json`); + if (!existsSync(verifyPath)) return false; + try { + const v = JSON.parse(readFileSync(verifyPath, "utf-8")) as BeatVerification; + const refs = v.brand_check?.captured_assets_referenced ?? []; + return refs.some((r) => logoLikePattern.test(r)); + } catch { + return false; + } + } + if (!beatReferencesLogo(firstBeat)) { + overallWarnings.push( + `First beat (${firstBeat}) does not reference a logo/brand asset. The brand mark should appear in the opener unless STORYBOARD.md explicitly overrides this.`, + ); + } + if (!beatReferencesLogo(lastBeat) && lastBeat !== firstBeat) { + overallWarnings.push( + `Last beat (${lastBeat}) does not reference a logo/brand asset. The brand mark should appear in the closer unless STORYBOARD.md explicitly overrides this.`, + ); + } + + // ── Report ─────────────────────────────────────────────────────────── + const failedCount = results.filter((r) => !r.pass).length; + const overallPass = failedCount === 0 && overallWarnings.length === 0; + + if (args.json) { + console.log( + JSON.stringify( + { + pass: overallPass, + beats: results, + overall_warnings: overallWarnings, + summary: { + total: results.length, + passed: results.length - failedCount, + failed: failedCount, + warnings: results.reduce((n, r) => n + r.warnings.length, 0) + overallWarnings.length, + }, + }, + null, + 2, + ), + ); + } else { + console.log(); + for (const r of results) { + const icon = r.pass ? "✓" : "✗"; + console.log(`${icon} ${r.beat}`); + for (const f of r.failures) console.log(` ✗ ${f}`); + for (const w of r.warnings) console.log(` ! ${w}`); + } + if (overallWarnings.length > 0) { + console.log(); + console.log("Brand-floor warnings:"); + for (const w of overallWarnings) console.log(` ! ${w}`); + } + console.log(); + const summary = `${results.length - failedCount}/${results.length} beats passed`; + console.log(overallPass ? `✓ ${summary}` : `✗ ${summary} (${failedCount} failed)`); + console.log(); + } + + process.exit(failedCount > 0 ? 1 : 0); + }, +}); + +function printOrJson(json: boolean, payload: unknown, humanFallback: () => void): void { + if (json) console.log(JSON.stringify(payload, null, 2)); + else humanFallback(); +} diff --git a/packages/cli/src/help.ts b/packages/cli/src/help.ts index 8dd52c2ccf..9858d766b6 100644 --- a/packages/cli/src/help.ts +++ b/packages/cli/src/help.ts @@ -34,6 +34,7 @@ const GROUPS: Group[] = [ ["lint", "Validate a composition for common mistakes"], ["inspect", "Inspect rendered visual layout across the timeline"], ["snapshot", "Capture key frames as PNG screenshots for visual verification"], + ["verify-beats", "Cross-check per-beat verification artifacts against actual files"], ["info", "Print project metadata"], ["compositions", "List all compositions in a project"], ["docs", "View inline documentation in the terminal"], diff --git a/packages/producer/src/services/renderOrchestrator.ts b/packages/producer/src/services/renderOrchestrator.ts index c7026c55de..c70adbdc02 100644 --- a/packages/producer/src/services/renderOrchestrator.ts +++ b/packages/producer/src/services/renderOrchestrator.ts @@ -3483,7 +3483,8 @@ export async function executeRenderJob( // linear, wiping out the bottom portion of dark video content. // SDR compositions use 16-bit-expanded sRGB, which matches the // shader design space. - const transitionFn: TransitionFn = TRANSITIONS[activeTransition.shader] ?? crossfade; + const transitionFn: TransitionFn = + TRANSITIONS[activeTransition.shader ?? ""] ?? crossfade; transitionFn(transBufferA, transBufferB, transOutput, width, height, progress); addHdrTiming(hdrPerf, "transitionCompositeMs", transitionTimingStart); diff --git a/skills/website-to-hyperframes/SKILL.md b/skills/website-to-hyperframes/SKILL.md index 6dd463247e..aceabd676a 100644 --- a/skills/website-to-hyperframes/SKILL.md +++ b/skills/website-to-hyperframes/SKILL.md @@ -50,15 +50,34 @@ You're not making _a video_. You're making something that **stops scrollers** in **The screenshot trap:** if the user's prompt pulls you toward using a product screenshot of an interface (kanban, chat, dashboard, terminal, etc.) as the primary visual of any beat — STOP. Build that UI from divs/SVG/CSS instead. Every prior eval round showed agents defaulting to "screenshot + Ken Burns + voiceover" regardless of what the prompt asked for, never reaching for HTML-in-canvas, SVG path drawing, counter animations, kinetic typography, or any of HyperFrames' powerful capabilities. Don't be that agent. +**This is a VIDEO, not a webpage rebuilt in divs.** Composing from divs is the right _medium_ (no screenshots) — but the WRONG outcome is to build a webpage-style layout and animate it 2 pixels. Videos use cinematic grammar: framing, depth, camera movement, scale, atmosphere. A kanban in a video is not "a kanban board centered in the frame at 80% scale with cards breathing 1px" — it's a SHOT: extreme close-up on a card sliding home, then the camera pulls back to reveal the full board, ambient particles + glow + depth give it weight. The composed divs are the subject; the cinematography is what makes it feel like film. + +**Specific anti-patterns to refuse, every time:** + +- **macOS window chrome** (traffic-light dots, address bars, browser tabs, breadcrumbs) unless the beat IS about the window/browser as the subject +- **Centered layout with chrome around it** — sidebar + header + content area + footer — that's a screenshot reproduced in CSS, not a shot +- **"Breathing" micro-animations** (y: ±1–2px, scale: 1.01) — invisible at 1080p/4K video scale, useless as motion, a sign the sub-agent ran out of ideas +- **Page-level navigation** — sidebars, headers, footers, breadcrumbs, "back" arrows unless the beat is specifically demonstrating navigation +- **"Settled" beats** where nothing moves except a counter pulse — every beat must have continuous, _visible_ motion across the entire duration + +**Video grammar to USE in every beat:** + +- **Frame the beat as a SHOT** — close-up / medium / wide / over-the-shoulder / Dutch angle. Pick deliberately, not "centered." +- **Camera motion is a primary element** — dolly in, push, parallax pan, orbit, pull-back. The camera moves THROUGH the composition; the composition doesn't sit still in front of the camera. +- **Scale as energy** — enter at 1.4× and settle to 1.0; extreme close-up that pulls back to wide; the subject grows or shrinks through the beat +- **Depth layers** — ambient background atmosphere, focal midground subject, accent foreground element — each moving at different parallax speed +- **Light as choreography** — glow tracks the subject, key moments lit with bloom, transitions happen through light shifts +- **Real motion magnitudes** — 30–100px movements, 0→1 opacity reveals, 0.7→1.0 scale changes — values that READ at video scale. Tiny micro-movements feel like a still image with twitches. + --- -## Step 0: Capture +## Step 0: Capture & Understand the Brand **Read:** [references/step-0-capture.md](references/step-0-capture.md) -Run the capture, read ALL extracted data (screenshots, tokens, design styles, text, assets, animations), write a site summary. +Capture the site, then read the extracted data to understand the **brand and product** — what it does, who it's for, what voice it speaks in, what mood it lives in. The captured assets are a brand toolkit for later, not the building blocks the video is made from. -**Gate:** Site summary printed. Capture data fully read and summarized. +**Gate:** Site summary printed — strategy-first (what the product does, who it's for, brand voice) before the asset / color / font inventory. --- @@ -74,13 +93,13 @@ Write DESIGN.md — a brand cheat sheet covering the visual identity: colors, ty --- -## Step 2: Creative Brief +## Step 2: Strategy & Messaging **Read:** [references/step-2-brief.md](references/step-2-brief.md), [references/visual-vocabulary.md](references/visual-vocabulary.md), [references/capabilities.md](references/capabilities.md) (scan the Table of Contents — deep-dive sections only as needed) -Parse what the user already told you in their prompt. Most prompts already specify video type, style, and what to show. Only ask about things genuinely missing — don't re-ask what they said. +Align with the user on **what the video must communicate** before talking visuals or assets. Parse the user's prompt — they probably already gave you the video type and style. Ask only what's missing: the ONE thing this video must say, the narrative arc, and the audience. -**Gate:** You know the video type, duration, style, and format — either from the user's prompt or by deciding yourself. +**Gate:** Video type, duration, format, and — critically — the message and narrative arc are locked. Without those, Step 3 can't write a concept-first storyboard. --- @@ -88,7 +107,7 @@ Parse what the user already told you in their prompt. Most prompts already speci **Read:** [references/step-3-storyboard.md](references/step-3-storyboard.md) -Write the storyboard (concept-first beats, asset assignments, transitions, depth layers), then the narration script to match — both live in this step because they're coupled. Present both to the user with a beat-by-beat summary. Iterate until they approve. +Write the storyboard concept-first: message → narrative arc → beats that serve the arc → techniques per beat → brand accents pass at the end. Then write the narration script to match. Present both to the user with a beat-by-beat summary. Iterate until they approve. **Gate:** `STORYBOARD.md` + `SCRIPT.md` exist AND the user has approved the plan. @@ -98,7 +117,7 @@ Write the storyboard (concept-first beats, asset assignments, transitions, depth **Read:** [references/step-4-vo.md](references/step-4-vo.md) -If the Creative Brief says no narration — ask about background music, then skip to Step 5. Otherwise: ask the user which TTS provider (HeyGen TTS, ElevenLabs, or Kokoro), generate audio, transcribe, map timestamps to beats. Then ask about captions. +If Step 2 said no narration — ask about background music, then skip to Step 5. Otherwise: ask the user which TTS provider (HeyGen TTS, ElevenLabs, or Kokoro), generate audio, transcribe, map timestamps to beats. Then ask about captions. **Gate:** Either (a) no narration was requested and storyboard has manual beat timings, or (b) `narration.wav` + `transcript.json` exist and beat timings updated with real durations. @@ -109,9 +128,9 @@ If the Creative Brief says no narration — ask about background music, then ski **Read:** The `hyperframes` skill (load it — every rule matters) **Read:** [references/step-5-build.md](references/step-5-build.md) -Build index.html and compositions following the architecture and pacing chosen in the storyboard (Step 3). See step-5 for code patterns for both architectures (stacked beats vs HyperShader sub-compositions). +Build index.html and compositions following the architecture and pacing chosen in the storyboard (Step 3). Each sub-agent writes a `compositions/beat-N-verify.json` artifact (see [beat-builder-guide.md](references/beat-builder-guide.md)) declaring what they built. **The main agent does NOT trust sub-agents' chat reports** — it runs `npx hyperframes verify-beats ` which cross-checks every claim against the composition HTML and snapshot files on disk. -**Gate:** Every composition self-reviewed. Frames are full, elements readable, concept clear. +**Gate:** `npx hyperframes verify-beats ` exits 0. Every beat passes structural and brand-floor checks. If it fails, re-dispatch the failing beats with the verifier output quoted in the prompt — do not advance to Step 6 until the verifier passes. --- @@ -151,19 +170,19 @@ Beat count is not in this table intentionally — it should come from the storyb ### User Interaction Points -| Step | What to ask | Why | -| ---------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------- | -| Step 2 (Brief) | Video type, style, specific requests, format | Creative direction sets everything. Wrong direction = wasted build time. | -| Step 3 (Storyboard + Script) | Beat-by-beat approval, script review | Cheapest place to iterate. 30s to change a beat, 5min to rebuild a composition. | -| Step 4 (VO) | TTS provider choice, API key if needed | Voice quality makes or breaks the video. User may have provider preferences. | +| Step | What to ask | Why | +| ---------------------------- | ----------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| Step 2 (Strategy) | Message, narrative arc, audience, video type, style, format | The story is what every downstream choice flows from. Without it, beats are arbitrary. | +| Step 3 (Storyboard + Script) | Beat-by-beat approval, script review | Cheapest place to iterate. 30s to change a beat, 5min to rebuild a composition. | +| Step 4 (VO) | TTS provider choice, API key if needed | Voice quality makes or breaks the video. User may have provider preferences. | ### Reference Files | File | When to read | | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| [step-0-capture.md](references/step-0-capture.md) | Step 0 — capture, read extracted data, write site summary | -| [step-1-design.md](references/step-1-design.md) | Step 1 — write DESIGN.md brand cheat sheet (9 sections, 200-400 lines) | -| [step-2-brief.md](references/step-2-brief.md) | Step 2 — creative brief conversation with user | +| [step-0-capture.md](references/step-0-capture.md) | Step 0 — capture, understand the brand and product, write strategy-first site summary | +| [step-1-design.md](references/step-1-design.md) | Step 1 — write DESIGN.md brand cheat sheet (6 sections, 250-350 lines) | +| [step-2-brief.md](references/step-2-brief.md) | Step 2 — align on message, narrative arc, audience with user | | [capabilities.md](references/capabilities.md) | Steps 2 & 5 — full inventory of what HyperFrames can do (24 sections). Scan the TOC during the brief, deep-dive specific sections during build | | [visual-vocabulary.md](references/visual-vocabulary.md) | Step 2 & 3 — translate subjective terms to concrete techniques. Composable building blocks, not rigid presets | | [step-3-storyboard.md](references/step-3-storyboard.md) | Step 3 — storyboard + script (combined) with user review gate | diff --git a/skills/website-to-hyperframes/references/beat-builder-guide.md b/skills/website-to-hyperframes/references/beat-builder-guide.md index 61ca90742c..685166ad1a 100644 --- a/skills/website-to-hyperframes/references/beat-builder-guide.md +++ b/skills/website-to-hyperframes/references/beat-builder-guide.md @@ -103,21 +103,118 @@ npx tsx packages/cli/src/cli.ts snapshot . --frames 3 **If anything is wrong:** fix, re-snapshot, re-check. You are done ONLY when every frame matches the spec. -## Step 5: Report back +## Step 5: Write the verification artifact -Tell the main agent: +**You don't "report back" with a chat message. You write a file.** The main agent will run `npx hyperframes verify-beats` against your output; if the file is missing, malformed, or the claims inside don't match what's actually in your composition HTML, the build fails and a sub-agent is re-dispatched. There is no way to fake this — the verifier reads the actual files. -1. **File:** path to saved composition -2. **Lint:** pass/fail + error count -3. **What each snapshot frame shows** — be specific: "Frame 1 at 0.5s: dark bg, blue glow center, headline 'Everything App' in white Inter 120px, subtitle fading in below." Not "looks good." -4. **Issues found and fixed** during snapshot review -5. **Issues you couldn't fix** (if any) +Write `compositions/beat-N-name-verify.json` (matching your composition filename + `-verify.json`) with this exact shape: + +```json +{ + "beat": 3, + "composition_file": "compositions/beat-3-kanban.html", + "lint": { + "exit": 0, + "errors": 0, + "warnings": 12 + }, + "snapshots_taken_at_seconds": [0.2, 1.5, 3.8, 5.0], + "snapshot_files": [ + "snapshots/beat-3/frame-00-at-0.2s.png", + "snapshots/beat-3/frame-01-at-1.5s.png", + "snapshots/beat-3/frame-02-at-3.8s.png", + "snapshots/beat-3/frame-03-at-5.0s.png" + ], + "frame_observations": [ + { + "t": 0.2, + "describes": "Dark canvas (#07080A) with grain overlay. No cards yet — opening empty state." + }, + { + "t": 1.5, + "describes": "Three kanban columns visible, 4 cards each. First active card highlighted in Raycast red (#FF6363). Counter chip on In-Progress reads '3'." + }, + { + "t": 3.8, + "describes": "All 12 cards settled. Brand logo SVG appears top-left at 60×60. Narration sync moment: 'crush your sprint' lands." + }, + { + "t": 5.0, + "describes": "Hold frame — cards breathe with y±2px parallax. Logo still visible. Ready for transition." + } + ], + "brand_check": { + "primary_bg_hex_used": "#07080A", + "primary_bg_hex_design_md": "#07080A", + "matches_bg": true, + "accent_hex_used": "#FF6363", + "accent_hex_design_md": "#FF6363", + "matches_accent": true, + "headline_min_font_px": 96, + "captured_assets_referenced": ["capture/assets/raycast-logo.svg"], + "no_assets_reason": null + }, + "concept_alignment": "Serves the 'Problem → Solution' arc — chaotic backlog organizes itself, narration lands the value prop on the settle. Brand mark stamps identity without being the content." +} +``` + +### Field requirements (the verifier checks every one of these) + +- **`lint.exit`** — must be `0`. Run `npx hyperframes lint .` from the project root and record the exit code. Fix all errors before writing this number. +- **`snapshots_taken_at_seconds`** — at least 3 timestamps spread across the beat's duration (entrance, hold, near-exit minimum). +- **`snapshot_files`** — actual PNG paths. The verifier checks each file exists on disk. If you list a path that doesn't exist, the beat fails. +- **`frame_observations`** — at least 3 entries, each describing concrete visible content at that timestamp. Generic statements like "looks good" or "content visible" will fail the verifier's length check (need ≥20 chars per observation). Quote the headline text, name the colors, describe the layout. +- **`brand_check.primary_bg_hex_used`** — must literally appear in the composition HTML (the verifier greps for it). If you claim `#07080A` but the file uses `#000000`, the beat fails. +- **`brand_check.matches_bg`** — `true` if your `primary_bg_hex_used` equals what DESIGN.md says for this brand. `false` if you intentionally deviated (note why in `concept_alignment`). +- **`brand_check.accent_hex_used`** — same rule as bg. Same grep check. +- **`brand_check.headline_min_font_px`** — must be ≥80. Smaller headlines fail readability at video scale. +- **`brand_check.captured_assets_referenced`** — list every `capture/assets/` path you actually used in the composition. The verifier greps the HTML for each. Don't list paths you didn't use — that's lying and the verifier catches it. +- **`brand_check.no_assets_reason`** — required ONLY if `captured_assets_referenced` is empty. Explain why (e.g., "opener is pure kinetic typography; brand logo lands in closer beat"). Most beats need 0-1 accent, but if every beat across the video has zero, the brand-floor check will flag the video. +- **`concept_alignment`** — one substantive sentence (≥30 chars) describing how this beat serves the storyboard's message and arc. Not "shows the kanban" — _why_ this beat exists in _this_ video. + +### Why this exists + +Earlier sessions had sub-agents reply "0 errors, looks good" without reading the HTML they wrote. Videos shipped with mismatched brand colors, missing logos, headlines too small to read, and beats that didn't serve the storyboard. The verifier exists because chat-message reports cannot be trusted. Producing the JSON forces you to actually open the composition, run lint, look at the snapshots, and check DESIGN.md. + +If you find yourself wanting to write `"describes": "looks good"` — stop. Open the snapshot PNG, see what's visible, write that. --- ## Continuous motion — the most important rule -A beat is a SCENE, not a single entrance animation. Your GSAP timeline should have events spread across the ENTIRE beat duration — not just entrance tweens in the first 1-2 seconds followed by nothing. If an element is on screen, it should be doing something: drifting, breathing, parallaxing, revealing new details, transforming. Nothing sits unchanged for more than ~2 seconds. After elements enter, add continuous hold motion: Ken Burns drift on images, subtle y/scale breathing on text, parallax layers moving at different speeds, secondary elements appearing mid-beat. +A beat is a SHOT in a film, not a webpage with entrance animations. Your GSAP timeline should have events spread across the ENTIRE beat duration — not just entrance tweens in the first 1-2 seconds followed by nothing. If an element is on screen, it should be doing something. After elements enter, add continuous hold motion: camera dolly, parallax layers moving at different speeds, secondary elements appearing mid-beat, real depth shifts. + +## You are building a SHOT, not a webpage + +The storyboard tells you the shot framing (close-up / medium / wide / etc.) and the camera move. Implement them. **If your composition looks like a webpage centered in the canvas with elements that "breathe" by 1-2px, you misread the beat.** Re-read it. + +**Specific patterns to refuse:** + +- ❌ **macOS / browser window chrome** as a frame around the content — traffic-light dots (`.red`, `.yellow`, `.green` circles), URL bars, browser tabs, breadcrumbs — UNLESS the storyboard explicitly says the chrome is the subject of the shot. If you build a window with chrome around a UI, you've built a screenshot equivalent in CSS, defeating the entire purpose of composing from divs. +- ❌ **Sidebars + headers + footers** (the standard webpage layout) — these are page navigation, not video subjects. The beat is about _the kanban moment_, not _the kanban app_. +- ❌ **Centered card / panel / window with 60–120px margin on all sides** — that's a webpage layout. Videos use the full frame with intentional negative space. +- ❌ **"Hold with breathing"** implemented as `y: ±1–2px` or `scale: 1.01` — invisible at 1920×1080+ scale. If continuous motion is required, use camera dolly (scale 1.0 → 1.05), parallax pan (x/y ±30–80px), or progressive reveals. +- ❌ **Hover-state simulations** — videos have no hover. If the brand uses hover effects, show the BEFORE and AFTER as discrete frames in the timeline. +- ❌ **Counter pulses + dot pulses + tiny scale wobbles** as the only motion during the hold — these are "I ran out of ideas" filler. + +**Required motion magnitudes** (anything smaller is invisible at video scale): + +| Motion type | Minimum magnitude | +| --------------- | ------------------------------------------- | +| Translate (y/x) | 30px (entrance) / 8px (drift during hold) | +| Scale | 0.05 change (1.0 → 1.05 or larger) | +| Opacity | full 0 → 1 or vice versa for reveals | +| Rotate | 4° minimum to read (Dutch angles, ticks) | +| Camera dolly | scale 1.0 → 1.06 minimum over beat duration | + +**Required cinematography per beat** (the storyboard should give you these; if it doesn't, escalate): + +- A **shot type** (close-up / medium / wide / over-the-shoulder / Dutch) +- A **camera move** (dolly in/out, push, parallax pan, orbit, rack focus) +- A **depth strategy** (what's foreground / midground / background) +- A **purpose** (what specific feeling or noticing the shot delivers) + +If any are missing from the beat spec, the beat is under-defined. Don't fill the gap with "centered layout + breathing" — re-read the spec, and if it's genuinely missing, ask the main agent. ## Rules diff --git a/skills/website-to-hyperframes/references/step-0-capture.md b/skills/website-to-hyperframes/references/step-0-capture.md index f6b91b6a3a..243d405ec9 100644 --- a/skills/website-to-hyperframes/references/step-0-capture.md +++ b/skills/website-to-hyperframes/references/step-0-capture.md @@ -1,4 +1,6 @@ -# Step 0: Capture & Understand +# Step 0: Capture & Understand the Brand + +You're capturing the site **to understand a brand and a product** — not to inventory building blocks. Reading the assets tells you what the product is, who it's for, what voice the brand speaks in, and what mood it lives in. That understanding is the strategic foundation for the video; the assets themselves are decoration the storyboard will reach for late, only where they serve the concept. **The video is not a recombination of the captured assets.** ## Run the capture @@ -45,6 +47,8 @@ Read every file below. After each one, **write a 3-4 sentence summary** of what 5. **`capture/extracted/asset-descriptions.md`** — One-line-per-file summary of all downloaded assets. Note which assets are most visually striking or useful for video. +6. **`capture/extracted/fonts-manifest.json`** — Each downloaded font identified by its real family name (read from the binary's OpenType `name` table, so hashed Next.js/Webpack filenames are resolved automatically). Lists per-family aggregates with weights, variable-font axes, and file counts. Read this in Step 1 instead of guessing fonts from filenames. If the manifest's `unidentified[]` is empty, every captured font has a known identity. Skip the file if it doesn't exist (older captures). + ### Required to check and read IF they exist 6. **`capture/extracted/animations.json`** — See for yourself if the site uses scroll-triggered animations, marquees, canvas/WebGL, or named CSS animations. Just good to know. @@ -75,11 +79,17 @@ After reading `tokens.json` and `design-styles.json` here, **summarize the key v ## Gate -Print your site summary before proceeding to Step 1 (DESIGN.md): +Print your site summary before proceeding to Step 1. The summary is **strategy-first, not asset-first**: - **Site:** [name] +- **What the product does:** [one sentence — the product's actual job, what problem it solves] +- **Who it's for:** [audience — developers, designers, ops teams, consumers, enterprise, etc.] +- **Core value prop:** [the one promise the homepage makes — what the brand is selling, in their own words if visible-text supports it] +- **Brand voice:** [one phrase — confident/playful/clinical/premium/urgent/etc., grounded in the copy you read] +- **Visual identity:** [one sentence — dominant mood, e.g. "dark cinematic with single saturated accent" or "white-and-color clean consumer"] - **Colors:** [top 3-5 HEX values with roles] - **Fonts:** [font families] - **Sections:** [count] sections, [count] headings, [count] CTAs -- **Key assets:** [3-5 most useful assets for video] -- **Vibe:** [one sentence describing the visual identity] +- **Notable captured assets:** [3-5 assets worth remembering as potential brand accents — typically logo, hero illustration, gradient, brand mark. Note these are candidates, not assignments. Most won't make it into the final video.] + +The first 5 bullets are the strategic frame — they tell you what video to make. The last 4 are the brand toolkit you'll inflect that video with. diff --git a/skills/website-to-hyperframes/references/step-1-design.md b/skills/website-to-hyperframes/references/step-1-design.md index e8a02c799e..64bb667d3e 100644 --- a/skills/website-to-hyperframes/references/step-1-design.md +++ b/skills/website-to-hyperframes/references/step-1-design.md @@ -4,23 +4,31 @@ DESIGN.md is a **brand-truth cheat sheet** — colors and fonts you'll **weave i DESIGN.md is the brand inflection sub-agents layer on top of every composed beat: which color is "primary," which font is "headlines," what tone the brand carries — the load-bearing knobs they flip while building. The beats themselves are composed from divs/SVG/CSS at build time; DESIGN.md tells them in which colors and which fonts. -**Target length: 60–120 lines.** Sub-agents read the Quick Reference and the Iteration Guide; everything else is over-investment. +**Target length: 250–350 lines.** Sub-agents in Step 5 compose UIs from scratch (divs/SVG/CSS) using your DESIGN.md as the spec — the more precise the component CSS values you encode here, the more brand-faithful the composed beats will look. Going under 200 lines tends to produce generic-looking dark-cinematic videos because sub-agents have no brand component DNA to compose with. **User preferences always override brand rules.** If the user says "make it bright even though the site is dark" or "use serif fonts even though the brand is sans" — follow the user. DESIGN.md describes the captured website. The video might deliberately break that. You read `tokens.json` and `design-styles.json` in Step 0. If you remember the values, use them; if not, re-read. Don't guess. -**Font availability check — do this before writing anything else.** Check `capture/assets/fonts/` and cross-reference with what the site uses: +**Font availability check — do this before writing anything else.** Read `capture/extracted/fonts-manifest.json`. The capture pipeline reads the OpenType `name` table embedded in every downloaded font file, so even hash-renamed Next.js/Webpack fonts are identified by their real family name (Inter, JetBrains Mono, Geist Mono, etc.). No guessing required. -- Hashed filenames (`f266e704...woff`) = Google Fonts subsets → auto-resolve, no `@font-face` needed -- Recognizable filenames (`BrandSans-Bold.woff2`) = brand fonts. **Check the weight** — if the site uses 700/Bold but only Light/Thin was captured, the bold doesn't exist. Note this explicitly: "GT Walsheim — only Light (300) captured; for Bold use Inter 700 fallback." -- Commercial fonts (GT Walsheim, Söhne, Graphik, Canela) are NEVER captured — they're on brand CDNs. Flag explicitly: "Söhne not in capture; use Inter 600 as substitute." +The manifest gives you two views: -Sub-agents try to use the fonts you list. If you claim "Charlie Display 700" and the file doesn't exist, they silently fall back to system-ui. Be honest about what's available. +- `families[]` — one entry per distinct family with the weights captured, whether it's a variable font, and the files belonging to it +- `files[]` — one entry per downloaded font with family, subfamily, weight, style, and any variation axes + +**How to use it:** + +- For each family you'll reference in DESIGN.md, name it by what's in `families[].family` (e.g. "Inter", not "f266e704 hashed font"). The hashed filenames are the `@font-face src` paths — they stay as-is on disk; only the display name comes from the manifest. +- If a family has `variable: true` and `variationAxes` includes `"wght"`, you can use any weight 100-900 via `font-variation-settings: 'wght' ` even if only one static weight appears in the captured files. Note this in DESIGN.md so sub-agents know they have the full weight range available. +- If the manifest's `unidentified[]` is non-empty, those files failed name-table extraction (rare — heavily subset fonts that strip metadata). Flag them as `unknown` in DESIGN.md and suggest a fallback rather than guessing. +- Commercial fonts hosted on brand CDNs (GT Walsheim, Söhne, Graphik, Canela) won't be in the manifest because they aren't downloaded. Detect this by checking what the site uses (from `design-styles.json`) against what's in the manifest — anything used but missing is a CDN-hosted font. Flag explicitly: "Söhne not in capture; use Inter 600 as substitute." + +Sub-agents try to use the fonts you list. The manifest tells you exactly what's available — there's no excuse for claiming "Charlie Display 700" when no such file exists. --- -## The 3 sections to write +## The 6 sections to write ### `## 1. Visual Theme (one paragraph)` @@ -79,7 +87,159 @@ That's the whole typography section. If sub-agents need exact line-heights or le --- -### `## 3. Iteration Guide` (the load-bearing section) +### `## 3. Component Stylings` (the build-step's spec sheet) + +This is the section sub-agents consult most when composing UIs from divs in Step 5. **Without exact per-component CSS, sub-agents fall back to generic "dark bg + glow + centered text" patterns regardless of brand** — which is why every video starts looking the same. Encode the brand's actual component DNA here. + +Target **6-12 distinct components**. Document what the site actually uses; skip categories the brand doesn't have. For each component, name it descriptively ("Stripe Primary Button" not "Button 1") and provide exact CSS-level properties: background, text color, padding, border-radius, border, font size/weight, height, box-shadow, and any hover/active/disabled states. + +#### Buttons (always required) + +Cover every variant the site uses — typically Primary, Secondary/Ghost, and Icon. **Example:** + +```markdown +#### Primary Button (Stripe Purple) + +- **Background:** `#533AFD` +- **Text color:** `#FFFFFF` +- **Font:** sohne-var 16px / 400 +- **Padding:** `15.5px 24px 16.5px 24px` +- **Border radius:** `4px` +- **Border:** none +- **Height:** `48px` (with padding) +- **Box shadow:** none +- **Hover:** background `#4329E8`, opacity `0.95` +- **Active:** background `#3720D4`, scale `0.98` +- **Disabled:** background `#C9C3F0`, cursor `not-allowed` + +#### Secondary Button (outline) + +- **Background:** `#FFFFFF` +- **Text color:** `#533AFD` +- **Border:** `1px solid #533AFD` +- **Padding / radius / font:** same as Primary +- **Hover:** background `#F3F0FF`, border `#4329E8` + +#### Ghost Button (text-only link) + +- **Background:** transparent +- **Text color:** `#533AFD` +- **Font:** sohne-var 14px / 400 +- **Padding:** `12px 0` +- **Hover:** background `rgba(83, 58, 253, 0.08)`, optional underline +``` + +#### Cards & Containers (always required if the site uses any) + +Document each distinct card type — Standard, Feature Highlight, Glass, Pricing, Testimonial — whatever this brand actually uses. **Example:** + +```markdown +#### Standard Card + +- **Background:** `#FFFFFF` +- **Border:** `1px solid #D4DEE9` +- **Border radius:** `5px` +- **Padding:** `32px` +- **Box shadow:** `0 1px 2px rgba(0, 0, 0, 0.04)` (default), `0 4px 12px rgba(0, 0, 0, 0.08)` (hover) +- **Hover:** border `#B8CCDB` + +#### Feature Highlight Card (gradient backdrop) + +- **Background:** linear-gradient(180deg, rgba(83, 58, 253, 0.05) 0%, rgba(255, 97, 24, 0.03) 100%) +- **Border:** `1px solid #E5EDF5` +- **Padding:** `36px` +- **Box shadow:** none +``` + +#### Distinctive components (anything else the brand actually shows) + +Logo marquees, testimonial carousels, pricing tables, gradient overlays, glassmorphism panels, bento grids, code blocks, terminal UIs, dashboard mockups — name and document anything visually distinctive. Sub-agents will reach for these specs when the storyboard calls for "compose the X UI." + +```markdown +#### Glass Container (frosted overlay) + +- **Background:** `rgba(255, 255, 255, 0.9)` +- **Border:** `1px solid rgba(255, 255, 255, 0.2)` +- **Backdrop filter:** `blur(8px)` +- **Use:** floating chat widgets, modal overlays, hero callouts only — the only place transparent fills appear in the system +``` + +**The rule:** if a sub-agent in Step 5 has to invent CSS values for a component this brand actually uses, you under-documented this section. The values should be lookup-able, not guessable. + +--- + +### `## 4. Spacing & Layout` + +The brand's rhythm. Three sub-sections, kept tight. + +#### Spacing scale + +Identify the **base unit** (typically `4px` or `8px`) and the full scale with usage context. **Example:** + +```markdown +**Base unit:** `4px` + +| Token | Value | Used for | +| ----- | ------- | --------------------------------------------------------- | +| xs | `4px` | Inline icon gaps, tight badge padding | +| sm | `8px` | Button-group gaps, small component padding | +| md | `16px` | Card padding, form-field gaps, standard component spacing | +| lg | `32px` | Section vertical spacing, large card padding | +| xl | `60px` | Major section separation | +| 2xl | `100px` | Page-level rhythm, hero section padding | + +Never use odd values (`13px`, `17px`) — the system only uses multiples of 4. +``` + +#### Border-radius scale + +Every radius the site uses, with what uses it. + +```markdown +- `0px`: Form labels, technical UI markers +- `4px`: Primary buttons, inputs, small badges +- `8px`: Standard cards, dropdowns +- `12px`: Feature cards, larger callouts +- `40px`: Icon buttons (square pill) +- `9999px`: Pill-shaped CTAs, status chips +``` + +#### Whitespace philosophy (one paragraph) + +How does this brand use whitespace — generous and architectural? Tight and information-dense? Section gaps in the 60–100px range, or 20–40px? Document the brand's actual rhythm. + +```markdown +Generous whitespace as confidence. Section gaps are always `60–100px`. Content never touches viewport edges — minimum `40px` horizontal padding on mobile, `80–160px` on desktop. The brand uses negative space as active design, not emptiness. +``` + +--- + +### `## 5. Depth & Elevation` + +Document the brand's shadow philosophy and the actual shadow values used. + +#### Shadow table + +```markdown +| Level | Value | Used for | +| ------------ | -------------------------------- | ----------------------------------------------- | +| Flat (0) | none | Default — most surfaces, inputs, body text | +| Raised (1) | `0 2px 8px rgba(0, 0, 0, 0.1)` | Cards on white, hovered surfaces, floating CTAs | +| Elevated (2) | `0 4px 12px rgba(0, 0, 0, 0.15)` | Dropdown menus, popovers | +| Floating (3) | `0 8px 24px rgba(0, 0, 0, 0.2)` | Modals, important overlays | +``` + +#### Shadow philosophy (one paragraph) + +How does this brand use shadows? Sparingly with soft falloff, or dramatically with hard edges? Are they present by default or only on hover? On dark backgrounds, do shadows invert to glow effects? + +```markdown +Shadows are minimal — used only to signal interactivity (hover) or layering (modals). All shadows are soft-edged (blur ≥ 8px). On dark backgrounds, shadows convert to subtle glow (`0 0 24px rgba(255, 99, 99, 0.15)` using the brand's accent color). Hard shadows do not exist in this system. +``` + +--- + +### `## 6. Iteration Guide` (the load-bearing section) 5–10 numbered rules that encode the most important brand decisions. Each rule is a **single actionable sentence stating what to do, with the specific values from this site.** These are the "if in doubt, do this" rules sub-agents consult while composing beats. @@ -122,7 +282,7 @@ If your draft has a rule like "all interactive elements require visible focus st - Use **exact values** from `capture/extracted/tokens.json`. Cross-reference with screenshots when needed. - Name colors and components descriptively — "Stripe Purple" not "Accent 1." - When you can't extract exact values, estimate from visual inspection and note it. -- Target **60–120 lines total.** This is a cheat sheet, not a system audit. Length is not virtue. +- Target **250–350 lines total.** Component CSS specs and the brand's spacing/depth values are load-bearing — sub-agents need them to compose UIs faithfully. Going much over 350 lines means you're over-investing in prose; going much under 200 means you've under-documented the component DNA and sub-agents will fall back to generic patterns. - No "Assets" section — `capture/extracted/asset-descriptions.md` is the asset index. - No "Motion" section — the storyboard specifies motion per-beat. - No "Components" section beyond what fits in Quick Reference — sub-agents compose UIs at build time from divs/SVG/CSS using the brand colors and fonts from this doc, not from CSS specs encoded here. diff --git a/skills/website-to-hyperframes/references/step-2-brief.md b/skills/website-to-hyperframes/references/step-2-brief.md index fe00e60cea..276e83d466 100644 --- a/skills/website-to-hyperframes/references/step-2-brief.md +++ b/skills/website-to-hyperframes/references/step-2-brief.md @@ -1,8 +1,8 @@ -# Step 2: Creative Brief +# Step 2: Strategy & Messaging **First, scan the Table of Contents in [capabilities.md](capabilities.md)** — the 24-row TOC tells you everything HyperFrames can do. You need this to tell users what's possible. Deep-dive specific sections only if a beat needs them. -You've captured the site, read all the data, written DESIGN.md. Now you know what you're working with — the brand's colors, assets, animations, typography. Before making any creative decisions, **ask the user what they want.** +You've captured the site and you now understand the brand — what the product does, who it's for, what voice it speaks in, what mood it lives in. Before any creative decisions, **align with the user on the story this video must tell.** Captured assets exist as a brand toolkit you'll reach for late in Step 3; they are not what the conversation in this step is about. **Parse the user's prompt first.** Read what they already told you — video type, style, specific requests, duration. Only ask about things they DIDN'T specify. If they said "product demo, show me the kanban board and chat, moderate pace" — that's most of the brief already. Don't ask "what type of video?" when they literally said "product demo." @@ -46,42 +46,38 @@ Instead, ask them across the six axes from [visual-vocabulary.md](visual-vocabul Their answers modify the brand-derived baseline you built in Step 1. Don't override the brand with their words — let the brand and their direction converge. See [visual-vocabulary.md](visual-vocabulary.md) for how to handle conflicts. -### Question 3: What do you SPECIFICALLY want to see? +### Question 3: What's the ONE thing this video must communicate? -This is the open-ended question, but guide the user toward specificity. Frame the options around **composed beats with brand inflection** — not around "what asset gets used where." The video's load-bearing visuals will be composed from scratch (kanban from divs, dashboards from layered panels, transitions from shaders); the captured assets are accents that decorate those composed beats with this brand's identity. +This is the strategy question. Every effective marketing video has a single core message — the one idea that has to land. Every beat serves that idea, or it doesn't belong. Get the user to articulate this BEFORE talking about visuals, assets, or specific scenes. Frame it like this: -> "Now that I've analyzed your site, here's what I have to work with: +> "From your site, here's the brand frame I'm working from: > -> - **Brand inflection** — [2-3 sentences on what makes this brand's visual language distinctive: dominant colors, font character, mood] -> - **What I can compose** — every product UI, transition, counter, sparkline, and effect can be built from scratch with HyperFrames (kanban, chat, dashboard, terminal, code editor, shader transitions, particle fields, 3D scenes, audio-viz, etc.). Browse the [capabilities table](capabilities.md) for the full menu. -> - **Brand accents available** — [1-2 most distinctive captured assets that earn a place: SVG logo for stroke-draw opener, hero illustration for a depth layer, gradient image for ambient wash] -> - **Anything genuinely worth using as content** (rare) — [If the capture has something truly unique that can't be composed: a custom Lottie, real product video, a one-of-a-kind illustration — name it] +> - **What the product does:** [one sentence from the site summary — not features, the actual job] +> - **Audience:** [who it's for, derived from copy and visual tone] +> - **Brand voice:** [confident / playful / clinical / urgent / premium — what tone the brand speaks in] > -> Based on this, the most interesting beats I could compose for you: +> Before we plan visuals, two questions to anchor the story: > -> - [Compose-first example grounded in the brand — e.g., "Build the kanban board from cards-as-divs in your brand palette, with the captured logo stamped top-left and your hero gradient washing the background as ambient depth."] -> - [Another — e.g., "Open with your SVG logo drawing itself stroke-by-stroke over a shader bloom that recreates your site's hero gradient — composed motion, brand colors woven in."] -> - [Another — e.g., "Six product feature panels composed from scratch — kanban, dashboard, terminal, file tree, calendar, chat — each in your palette, with your wordmark stamped on each as identity."] +> 1. **What's the ONE thing this video must communicate?** If a viewer remembers only one sentence after watching, what should it be? (the value prop, a launch announcement, a specific feature claim, a brand feeling, a problem-solution pair, etc.) +> 2. **What's the narrative shape?** Possible arcs: _Problem → Solution_ (most demos), _Reveal_ (launches, teasers), _Demonstration_ (feature showcase, walkthroughs), _Vibe piece_ (brand reels — feeling over information), _Comparison_ (vs. competitor / before-after). Pick or describe your own. > -> Beyond what's in the capture, I can also create additional assets — 3D models, custom shaders, illustrations, stock footage — if anything would make the video go further. The goal is something that stops scrollers and feels alive in every frame, not something that crossfades through screenshots. Read [capabilities.md](capabilities.md) for the full picture of what's possible. -> -> Do you have any specific moments, beats, or effects you want to see? To help you think about it, here are a few directions that would work for your specific brand: -> -> [Generate 2–3 example direction prompts grounded in _this_ brand's identity. Each should describe a **composed beat** that weaves in the brand inflection (color / font / accent asset). Model the _specificity_ — name the composed reference + the brand accent that decorates it. -> -> Good compose-first examples have the form: "[Compose X UI/element from divs/SVG] in [this brand's palette/font], with [captured accent] [decorating it in this specific way]." -> -> Bad examples — what NOT to write here: -> -> - "I want the hero screenshot to come in on a rotating MacBook" (asset-primary thinking — instead: "Compose the dashboard from divs and animate it inside a 3D MacBook") -> - "Show the pricing tiers flying in one by one" (vague — instead: "Compose 3 pricing tier cards from divs with hover-style elevation, staggered entrance, brand purple on the Pro tier, counter-up on the price") -> - "Start with the logo drawing itself" (might be valid as an accent on a composed opener, but it can't be the whole opener — what else is happening?)] -> -> You don't need a complete vision — even one or two specific moments helps me build something you'll love. Or say 'surprise me' and I'll make the creative calls based on your brand." +> Either give me your own answers, or say 'surprise me' and I'll make the call based on the brand and what you said in Question 1 ([video type])." -**Important:** The directions you propose must lead with **composed beats**, with captured assets as accents. If you find yourself describing "the [asset] flying in" or "the [screenshot] mapped onto [thing]" — flip it. Lead with what gets composed and built, mention the brand accent as decoration second. Generic capability lists feel like a sales pitch; asset-primary lists feel like a slideshow. +Once those answers exist, **then** sketch the composed-beat directions — but ground each one in the message and arc, not in the asset list: + +> "Given [the message] and [the arc], here's how I'd shape it: +> +> - [Compose-first sketch grounded in the answer to Q1, e.g., "Open with the problem stated as kinetic typography — 'You waste 4 hours a week on context switches.' Cut to a composed kanban board where cards animate from chaos into organization. Close on the brand mark + tagline."] +> - [Alternative sketch with a different arc, e.g., "Reveal arc: dark canvas → particles converging → product wordmark drawn stroke-by-stroke as the first feature lands. No problem statement — pure announcement energy."] +> - [If user wants demo: "Three composed UI panels — kanban, AI chat, command palette — each in your palette with the brand logo stamped top-left. Narration walks through each. Closer holds the wordmark."] +> +> Brand accents I could layer in: [list 1-3 captured assets that *might* earn a place: the SVG logo for opener/closer, a hero illustration as a depth layer in one scene, a gradient image as an ambient bg wash. Note these are candidates, not assignments — most beats won't need any.]" + +**Important:** Lead every direction with **what the beat communicates and what it's composed of** — never with "the [asset] does X." If your first instinct is "the dashboard screenshot flies in," flip it: "Compose the dashboard from divs and animate it inside a 3D MacBook." If your first instinct is "the hero illustration centers the opener," flip it: "Open with kinetic typography of the value prop; the hero illustration can wash behind it as ambient depth." + +The captured assets are a brand toolkit you reach for late, where they serve the concept — never the starting point. Present options: @@ -138,13 +134,15 @@ Note these per-beat overrides — they go into the storyboard. ### "Let me see options" -Propose 2–3 brief creative directions (3–4 sentences each) with different vibes. Example: +Propose 2–3 brief creative directions (3–4 sentences each) with different **narrative arcs** — what story the video tells, not what assets it shows. Each option leads with the message and the arc; visuals are composed scenes that serve them. -> **Option A — Cinematic Launch:** something like dark atmosphere, slow dramatic reveal of the dashboard on a 3D MacBook. Shader transitions between scenes. Bass impacts on key moments. Premium, Apple-keynote energy. or something similar +> **Option A — Problem → Solution (cinematic, narrated):** Open with the problem stated as kinetic typography over a dark canvas with a single accent glow. Cut to a composed kanban board where chaotic cards animate into organized columns as narration lands the value prop. Closer: brand mark drawn stroke-by-stroke on a shader bloom of the brand gradient. Apple-keynote register. ~25s with full VO. > -> **Option B — Fast Social Ad:** something like rapid feature showcase — screenshots flying in one after another, bold typography, vibrant accent colors. hook in 2-3 seconds. Instagram-ready. +> **Option B — Reveal arc (announcement, music-led):** Cold open: particles converging in darkness, no copy. The product wordmark draws itself across the frame as the first beat lands. Three composed feature panels each unveiled by a hard cut — kinetic typography labels, brand color washes, no screenshots. Closes on the mark + tagline + macOS hint. ~15s, music-driven, minimal narration. > -> **Option C — Clean Product Tour:** something like professional walkthrough of key features. Screenshots at full-bleed with smooth transitions. Narrated, moderate pace. LinkedIn/website embed ready. or some conceptual visuals (not screenshots) or something similar +> **Option C — Demonstration (narrated walkthrough):** Three composed UI scenes — kanban from cards-as-divs, AI chat with typewriter narration sync, command palette with character-typed search — each in the brand palette with the captured logo stamped top-left as identity. CSS crossfades between. Narration walks each one. ~35s, full VO. + +Each option states: the arc, the composed visuals carrying it, where (if anywhere) a captured asset shows up as an accent. **Never** an option whose primary content is "the screenshot of X" — if you find yourself writing one, flip it: name what gets composed, then where the brand accent lands on top. Let the user pick one or combine elements. @@ -152,13 +150,16 @@ Let the user pick one or combine elements. ## Gate -Extract these from the user's prompt — most are already there: +Lock all of these before moving to Step 3. The first three are the strategic frame Step 3 builds the storyboard from — without them, the storyboard cannot land. -1. **Video type** — infer from prompt ("product demo", "promo", "launch video", etc.) -2. **Duration** — infer from type if not stated (demo: 30-45s, social: 15-20s, teaser: 15-25s) -3. **Style direction** — map their words to visual-vocabulary dimensions -4. **Specific requests** — any scenes/effects they mentioned -5. **Narration** — stated or infer (if they said "no narration" or "just visuals", respect it) -6. **Format** — landscape unless they specified otherwise +1. **Message** — the ONE thing this video must communicate, in a single sentence. (Required. Step 3 fails without this.) +2. **Narrative arc** — Problem→Solution / Reveal / Demonstration / Vibe / Comparison / custom. (Required.) +3. **Audience** — who's watching, where they're watching. (Required.) +4. **Video type** — social ad / product demo / launch teaser / brand reel / feature announcement / etc. Infer from prompt. +5. **Duration** — infer from type if not stated (demo: 30-45s, social: 15-20s, teaser: 15-25s). +6. **Style direction** — map their words to visual-vocabulary dimensions. +7. **Specific requests** — any scenes/effects/beats they explicitly asked for. +8. **Narration** — yes / no / minimal. +9. **Format** — landscape unless specified otherwise. -**Do not ask the user to confirm what they already said.** If the prompt was "make a product demo for huly.io, show the kanban board, dark cinematic feel, full narration" — you already have type (demo), style (dark cinematic), specific requests (kanban board), and narration (full). Proceed to Step 3. +**Do not ask the user to confirm what they already said.** If the prompt was "make a product demo for huly.io, show the kanban board, dark cinematic feel, full narration" — you already have type (demo), style (dark cinematic), specific requests (kanban board), and narration (full). Still need to derive or ask: the **message** ("the everything app for teams that hate context switches"), the **arc** (Demonstration), and the **audience** (small teams / fast-moving orgs). Proceed to Step 3 only when all 9 are locked. diff --git a/skills/website-to-hyperframes/references/step-3-storyboard.md b/skills/website-to-hyperframes/references/step-3-storyboard.md index dc10b3b251..59fe15e6d3 100644 --- a/skills/website-to-hyperframes/references/step-3-storyboard.md +++ b/skills/website-to-hyperframes/references/step-3-storyboard.md @@ -1,10 +1,30 @@ # Step 3: Storyboard + Script -## First decision: PACING +Marketing videos are made concept-first. **The order is: message → narrative arc → beats that serve the arc → which techniques bring each beat to life → which brand accents decorate it.** Captured assets enter LAST — they're a brand toolkit you reach for where they serve the concept, not the starting material you build from. If you find yourself opening `asset-descriptions.md` to decide what beats to write, stop and go back to the message. -Decide pacing BEFORE anything else. This determines beat count, beat duration, and architecture — everything flows from it. +## First decision: CONCEPT -Read the user's prompt and the style direction from Step 2. Map to one of these: +Before pacing, before beats, before anything else — write the concept block at the top of `STORYBOARD.md`. Carry forward what was decided in Step 2's brief: + +```markdown +**Message:** [the ONE thing this video must communicate — one sentence] +**Arc:** [Problem→Solution / Reveal / Demonstration / Vibe / Comparison — and a one-sentence shape of how it unfolds] +**Audience:** [who's watching, where they're watching — TikTok scrollers, LinkedIn viewers, embedded on landing page] +**Brand voice:** [confident / playful / clinical / urgent / premium — pulled from DESIGN.md] +**Why this matters now:** [GTM context if relevant — launch, feature ship, brand reposition, ongoing demo] +``` + +If any of those rows are blank, the storyboard cannot land. Go back to the brief — don't substitute "show the kanban" for a message. + +**The single-sentence test:** _"What makes this video different from a generic [video type] for any [industry] brand?"_ If you can't answer it from the rows above, the concept isn't sharp enough. Sharpen it before writing pacing or beats. + +--- + +## Second decision: PACING + +With the concept locked, pick the pacing that serves it. This determines beat count, beat duration, and architecture — every downstream choice flows from here. + +Read the message and arc from the concept block above plus the style direction from Step 2's brief. Map to one of these: | User says | Pacing | Beat count | Beat duration | Architecture | | ----------------------------------------------------------- | ------------ | ---------- | ------------- | ---------------------------------------------------------- | @@ -36,19 +56,11 @@ Beat 3: composed kanban (4 cards-as-divs per column) + counter chip on In-Progre --- -**Before writing beats, answer this in one sentence:** - -> "What makes this video different from a generic [video type] for any [industry] brand?" - -If you can't answer it, you haven't thought enough. - ---- - **Re-read these files before writing:** - **DESIGN.md** — your color palette, font rules, components, Do's/Don'ts. Every visual must be grounded in this brand identity. If it says "white backgrounds with purple accent" — plan light scenes, not dark moody ones. - **[visual-vocabulary.md](visual-vocabulary.md)** — translate the user's style direction into concrete dimension values (pacing, density, transitions, mood, motion, audio). Note any per-beat overrides the user requested. -- **Asset discovery — use the contact sheets.** View `capture/assets/contact-sheet-*.jpg` and `capture/assets/svgs/contact-sheet-*.jpg`. Each grid cell is labeled with the filename. This is how you browse what's available without opening 50 individual files. When you find an asset you want to use, note the filename from the label and reference it as `capture/assets/`. If an asset looks promising but you need to check resolution or detail, THEN open the individual file. Also read `capture/extracted/asset-descriptions.md` for one-line summaries. **Understand what each asset IS before using it.** Product screenshots (dashboards, UI, features) show what the product does — strongest visuals. Decorative assets (abstract gradients, illustrations) can work as backgrounds or atmospheric elements, but don't make them THE beat content — a gradient filling a frame says nothing. Every asset should serve the beat's concept. **Never use contact sheets or scroll screenshots in the video** — contact sheets have grid labels and headers baked in, scroll screenshots are raw browser captures. Both are for AI to BROWSE and understand the site, not to place in compositions. +- **Asset discovery — use the contact sheets.** View `capture/assets/contact-sheet-*.jpg` and `capture/assets/svgs/contact-sheet-*.jpg`. Each grid cell is labeled with the filename. This is how you browse what's available without opening 50 individual files. When you find an asset that earns its place as a brand accent, note the filename from the label and reference it as `capture/assets/`. If an asset looks promising but you need to check resolution or detail, THEN open the individual file. Also read `capture/extracted/asset-descriptions.md` for one-line summaries. **Understand what each asset IS before using it.** Product screenshots show what the product does — useful for understanding the brand, but **compose the UI from divs/CSS in your beats rather than pasting the screenshot** (see Per-Beat Direction below). The strongest captured assets for video accents are usually the brand logo (SVG), the hero illustration, and gradient/texture backgrounds. **Never use contact sheets or scroll screenshots in the video** — contact sheets have grid labels and headers baked in, scroll screenshots are raw browser captures. Both are for AI to BROWSE and understand the site, not to place in compositions. - **[techniques.md](../../hyperframes/references/techniques.md)** — 20 visual techniques with code patterns. Pick for beats, these are starting points to adapt, not templates to copy. - **[text-effects.md](../../hyperframes/references/text-effects.md)** — 24 named text animation effects bundled in the repo. Read the catalog now and assign a specific effect ID to every headline, label, and copy element in every beat — not generic "fades in" descriptions. @@ -97,7 +109,7 @@ Apple keynote register — economy of words, silence between sentences is a feat **Global guardrails** — read [video-composition.md](../../hyperframes/references/video-composition.md) first. It defines the medium rules: density, color presence, scale, frame composition, and how design.md is brand truth not layout spec. Then apply these capture-specific additions: -- Use as many captured assets as the creative vision allows. The assets exist — use them generously. +- Captured assets are accents on composed beats, not the beats themselves — see Asset Audit below for which assets earn a place (typically 2-4 across the whole video). - Use different techniques from techniques.md — not across the whole video, per beat. Don't default to basic fade/scale/opacity — mix in SVG path drawing, HTML-in-canvas, shaders, scrolling effects or movement effect, CSS 3D transforms, typing effects, counter animations, canvas procedural art. Each beat should feel like its own visual world. Use as many as makes sense for the storyboard. **Underscore/music direction** (if applicable): @@ -175,32 +187,65 @@ Do NOT hand-code a Three.js device scene from scratch. The registry block handle --- -## Asset Audit (decoration only — composed beats carry the visual) +## Per-Beat Direction -Audit captured assets to pick **the ones that will decorate your composed beats** — the brand logo for opener and closer, a hero illustration as a depth layer behind composed UI, a gradient image as an ambient wash, the brand wordmark stamped onto a composed product UI. **The composed builds carry the visual story; the assets garnish them.** Aim for 2-4 accent assets total across the whole video — accent count, not content count. The brand mark almost always earns a place; everything else has to justify itself. +Each beat is a SHOT, not a layout. Write what the CAMERA does and what the FRAME reveals — not "what's positioned where on the page." -Print this table — but the "Role" column should always read as "accent / decoration / brand inflection," never as "primary visual for this beat": +### A beat is a shot — pick the framing before writing CSS -| Asset | Type | Use it as | Role | -| ------------------------------ | -------- | --------------- | ------------------------------------------------------------------------------- | -| stripe-logo.svg | SVG | Beat 1 + Beat N | Brand mark (opener stroke-draw, closer hold) | -| wave-fallback-desktop.png | Gradient | Beat 3 bg layer | Ambient depth wash behind composed dashboard | -| datavizstatic3x.png | Data viz | SKIP | Compose the stats from divs + counter animations instead | -| enterprise-accordion-hertz.png | Photo | SKIP | Compose the customer-story UI from divs with the brand's testimonial card style | -| icon-3.svg | Icon | SKIP | Decorative, too small to matter | +Every beat header should declare its shot type in the first line. **Shot types:** -Mark assets `SKIP` when a composed equivalent (dashboards, kanban, chat, terminal, file tree, calendar, pricing cards, etc.) does a better job — that's the strong default for product UI. Use the brand's _real_ data (project names, real metrics, real product copy) — not the placeholder labels a screenshot would have. +| Shot | Use for | What the frame contains | +| --------------------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | +| **Extreme close-up** | a single card / number / character / cursor / button as the entire subject | one element fills 60–90% of frame, everything else blurred or absent | +| **Close-up** | a small UI region (a single column, a card stack, a chart, a code block) | the subject fills 40–60% of frame with depth-layered context behind | +| **Medium** | a section of UI — kanban with 3 columns, chat with 3 messages, dashboard with 2-3 panels | the subject fills 60–80% of frame, edges of nearby UI bleed in | +| **Wide** | full UI assembly visible — only when the WHOLE thing is the point | full UI at 70–90% scale with deliberate negative space | +| **Over-the-shoulder** | viewer "behind" the user — cursor / hands / device foreground, UI midground | foreground element bottom 1/3, UI fills upper 2/3 with parallax depth | +| **Dutch angle** | tension, urgency, "something's off" | the frame is tilted 4–8°, content composed to feel unstable | -**Composed bar:** +**The "wide shot" trap:** _Every_ beat at wide framing looks like a screenshot in CSS. Most product-demo videos should be 60% close-up + close-up + 20% medium + 10% wide + 10% extreme close-up. Wide is the rare establishing shot, not the default. -- Every beat's primary visual is composed from divs / SVG / CSS / GSAP at build time, not pasted from a screenshot -- Accents are layered on top — the brand mark, gradient washes, hero illustrations — to give the composed beat this brand's inflection -- Every beat must feel alive in every frame (continuous motion — see Per-Beat Direction below) -- Every beat must justify its place in the bigger picture (full video) +### Camera motion is the subject, not the elements + +In website thinking: elements animate in, then sit still while the user reads. In video thinking: the camera moves THROUGH the scene. The composition shifts. + +Every beat needs at least one camera-style move. Pick from: + +- **Dolly in** — composition scales 1.0 → 1.08 over the beat duration, slight x/y drift +- **Dolly out / pull-back** — composition scales 1.15 → 1.0, revealing more context +- **Push** — fast scale-up (1.0 → 1.05, ~0.5s power3.out) on a key moment +- **Parallax pan** — background drifts opposite to foreground at different speeds +- **Orbit** — the subject rotates in 3D, or the camera circles it +- **Rack focus** — blur shifts from one element to another (background blurs as foreground sharpens) + +If a beat has NO camera-style move and elements only animate inward at the start, it will read as a webpage with entrance animations. That's not a video beat. + +### Forbidden patterns (the video-as-webpage failures) + +These appear in nearly every iteration where sub-agents revert to website thinking. Refuse to write any beat that includes: + +- ❌ **macOS / browser window chrome** as a frame around the content — traffic-light dots, URL bars, browser tabs, breadcrumbs — UNLESS the beat IS specifically about that chrome (e.g., "the macOS window itself is the subject of the shot") +- ❌ **Sidebars, navigation rails, page headers, page footers** unless the beat demonstrates navigation as its concept +- ❌ **"Centered card / panel / window with 60–120px margin on all sides"** — that's the standard webpage layout; videos use the full frame and meaningful negative space +- ❌ **"Hold with breathing" micro-animations** where elements move y: ±1–2px or scale 1.01 — invisible at video resolution; this is sub-agents pretending the beat has motion when it doesn't +- ❌ **Settled holds longer than 1.5s** with no continuous camera or compositional change — fix by adding camera dolly, depth-layer parallax, or new sub-elements entering mid-beat +- ❌ **Hover-state demonstrations** — videos have no hover; if the brand has a hover effect to communicate, find a way to show the BEFORE and AFTER as discrete frames, not a hover simulation +- ❌ **Tooltips and modal cards "for context"** that explain what something is — videos communicate through visual language, not popup hint text + +### Required for every beat (the floor for video grammar) + +Every beat must specify, in its visual description: + +1. **Shot type** (one of the six above) +2. **Camera move** (which one, when it starts, how long it lasts) +3. **Depth strategy** (what's in foreground / midground / background, how they parallax) +4. **Motion magnitudes** that read at video scale (30px+ y/x movements, scale changes ≥0.05, opacity transitions ≥0.5) +5. **The shot's purpose** — what specifically is the viewer supposed to feel or notice in this 3–5 seconds? --- -## Per-Beat Direction +### Existing beat-level fields (below) layer on top of the shot grammar above Each beat is a WORLD, not a layout. Write what the viewer EXPERIENCES before you write CSS specs. @@ -251,7 +296,7 @@ Which narration line plays over this beat (Also keep in mind the whole narration What the viewer sees — described cinematically, not as CSS specs. Use camera language and production motion designer vocabulary (pan, zoom, drift, settle, and more of those words). Think in layers — what's supposed to happen in the foreground, midground, background simultaneously? -**For the rare beat where a captured asset is the primary visual** (e.g., a homepage-reveal beat where the literal site IS the subject, or a customer-photo beat where the photo is the content): specify which asset, how much of the frame it fills (%), and where text/labels go relative to its safe zones. Don't blindly center text over busy product UI. **These beats should be the exception, not the rule** — if every beat's primary visual is a captured asset, you've defaulted to the slideshow pattern the library exists to break. +**For the rare beat where a captured asset is the primary visual** (e.g., a homepage-reveal beat where the literal site IS the subject, or a customer-photo beat where the photo is the content): specify which asset, how much of the frame it fills (%), and where text/labels go relative to its safe zones. Don't blindly center text over busy product UI. **These beats should be the exception, not the rule** — if every beat's primary visual is a captured asset, you've defaulted to the slideshow pattern this workflow exists to break. ### Composition + Accents @@ -300,6 +345,44 @@ Describe the feel precisely: "snappy overshoot bounce settling into place" → b --- +## Brand Accents Pass (LAST creative decision — happens after beats are written) + +Your beats are now conceptually defined. Each one has a composed visual that carries it. **Now**, do a single pass to decide which captured assets — if any — earn an accent role on which beat. + +This is the LAST creative pass before file-tree time. It comes here intentionally: assets decorate concept-defined beats; they do not seed them. If you find yourself wanting to add a beat _because_ an asset would look cool, the asset is doing the storyboarding — go back and rewrite that beat from the message instead. + +### The brand-inflection floor (REQUIRED minimums) + +Two hard rules — `verify-beats` checks them at Step 5, and the deliverable fails the brand-floor check if they're missing: + +1. **The brand mark (logo / wordmark SVG) MUST appear in the opener AND the closer beat.** A brand video that doesn't show the brand mark in the first and last frame is failing its job. The only exception is when STORYBOARD.md explicitly overrides this with a written reason (e.g., "opener is pure kinetic typography to delay brand reveal until beat 3 for narrative tension"). If you override, write the reason in that beat's Composition + Accents section so the verifier sees it. + +2. **The site's signature visual MUST appear somewhere in the video.** Every captured site has one: the gradient wave, the hero illustration, the distinctive product UI mark, the wordmark animation, the color combination, the hero photograph. It's whatever a viewer who knows the brand would point at and say "that's them." Find it during Step 0; place it as an accent in at least one beat. + +These are floors, not ceilings. Beyond them, aim for 2-4 brand accents total across the whole video, not per beat. Most beats need 0-1. Everything beyond the floor has to justify itself against the question: _"Does this asset make the beat MORE this brand, or is it filler?"_ + +Print this table once your beats are written: + +| Asset | Type | Where (beat #) | Role | +| ------------------------------ | -------- | --------------- | ------------------------------------------------------------------------------- | +| stripe-logo.svg | SVG | Beat 1 + Beat N | Brand mark (opener stroke-draw, closer hold) | +| wave-fallback-desktop.png | Gradient | Beat 3 bg layer | Ambient depth wash behind composed dashboard | +| datavizstatic3x.png | Data viz | SKIP | Compose the stats from divs + counter animations instead | +| enterprise-accordion-hertz.png | Photo | SKIP | Compose the customer-story UI from divs with the brand's testimonial card style | +| icon-3.svg | Icon | SKIP | Decorative, too small to matter | + +Mark assets `SKIP` when a composed equivalent (dashboards, kanban, chat, terminal, file tree, calendar, pricing cards, etc.) does a better job — that's the strong default for product UI. Use the brand's _real_ data (project names, real metrics, real product copy) in composed beats — never the placeholder labels a screenshot would have. + +**Update each beat's Composition + Accents section** based on what this pass produced. Most beats stay accent-free. The few that earn one get a single line under "Accents" with the file, position, opacity, and motion. + +**The bar:** + +- Every beat's primary visual stays composed from divs / SVG / CSS / GSAP at build time +- Accents are a thin layer of brand inflection on top — never the carrier +- A beat with no obvious accent need stays accent-free. The composed visual is enough. + +--- + ## Production Architecture Include this file tree at the bottom of the storyboard: @@ -396,7 +479,7 @@ The script and storyboard are one step. Every beat already has a VO cue — the The script serves the storyboard — write words that fit the visual plan, not the other way around. Reference real product features, real stats, and real components from `capture/extracted/visible-text.txt`. Use exact numbers. -**Script length depends on the creative direction, not a formula.** A cinematic video with dramatic pauses and visual-only moments might have 40 words across 30 seconds. A rapid feature showcase might pack 100 words into 30 seconds. The storyboard's pacing and style (from Step 2's Creative Brief) determine how much narration vs. silence the video needs. Some beats are narrated; some are pure visual. Let the creative plan drive the word count, not the other way around. +**Script length depends on the creative direction, not a formula.** A cinematic video with dramatic pauses and visual-only moments might have 40 words across 30 seconds. A rapid feature showcase might pack 100 words into 30 seconds. The storyboard's pacing and style (from Step 2's brief) determine how much narration vs. silence the video needs. Some beats are narrated; some are pure visual. Let the creative plan drive the word count, not the other way around. The key constraint: don't pad with dead silence where nothing is happening. If a beat has no narration, something visual must be carrying the viewer's attention. Empty frames = lost viewers. @@ -438,7 +521,7 @@ Summarize the plan clearly. Don't dump the full STORYBOARD.md — give the user - **"Looks good" / approval** → proceed to Step 4 (VO) - **Specific feedback** ("make beat 3 longer", "change the opening to be faster", "I don't want the typing effect") → update STORYBOARD.md and SCRIPT.md, re-present -- **Major direction change** ("actually I want it more playful, not cinematic") → revisit the creative brief dimensions, rewrite storyboard +- **Major direction change** ("actually I want it more playful, not cinematic") → revisit Step 2's brief dimensions, rewrite storyboard - **Iterate until the user is satisfied.** This is the cheapest place to make changes — changing a storyboard beat costs 30 seconds. Changing a built composition costs 5 minutes. ### Gate diff --git a/skills/website-to-hyperframes/references/step-4-vo.md b/skills/website-to-hyperframes/references/step-4-vo.md index 6e9e173ed8..b7c3056959 100644 --- a/skills/website-to-hyperframes/references/step-4-vo.md +++ b/skills/website-to-hyperframes/references/step-4-vo.md @@ -1,6 +1,6 @@ # Step 4: VO, Timing + Captions -## If the Creative Brief says "no narration" +## If Step 2 said "no narration" Skip the TTS sections below. The storyboard already has beat durations planned based on pacing and rhythm — those become `data-start` and `data-duration` values directly in Step 5. diff --git a/skills/website-to-hyperframes/references/step-5-build.md b/skills/website-to-hyperframes/references/step-5-build.md index c28ea987d2..c99c3c39cc 100644 --- a/skills/website-to-hyperframes/references/step-5-build.md +++ b/skills/website-to-hyperframes/references/step-5-build.md @@ -101,6 +101,8 @@ If the storyboard says "fast" pacing: use the stacked-beats pattern below. Do no **Stacked-beats pattern (fast pacing):** +Each beat is a composed scene — composed from divs, SVG, canvas, and CSS. Never a full-bleed screenshot. Each beat's structure (cards, panels, layered text, SVG-drawn mark, etc.) comes from the storyboard's Composition + Accents spec. + ```html
+
- -
Opening statement
+
+ Stop + context-switching. +
+ +
- +
+
+
Triage tickets
+
Review PR
+
+
+
Design spec
+
+
+
Ship v2.1
+
+
- + + +
+ +
+
``` +If you ever find yourself writing `` as a beat's primary visual, stop. That's the slideshow pattern this skill exists to break. Build the UI element from divs and CSS using the brand colors from DESIGN.md. The only legitimate `` uses are: (a) the brand logo when it's purely raster, (b) a hero illustration layered as ambient depth behind composed content, (c) a gradient/texture image as a background wash. Never a product UI screenshot as the load-bearing visual. + ```css .beat { position: absolute; @@ -154,7 +179,7 @@ Each beat gets its own visual world — different background, different color, d If the storyboard says "slow" or "cinematic": build each beat as a sub-composition. Use long crossfades (0.8–1.2s `duration` with no `shader` key = CSS crossfade). Inside each beat, use continuous subtle motion — nothing is static: -- Ken Burns drift on screenshots: `tl.fromTo(img, {scale:1.05, x:20}, {scale:1, x:-20, duration: BEAT, ease:"none"})` +- Slow camera drift on the composed scene root: `tl.fromTo(scene, {scale:1.05, x:20}, {scale:1, x:-20, duration: BEAT, ease:"none"})` (Ken-Burns style, but on your composed elements — not on a screenshot) - Parallax text layers: `tl.fromTo(text, {y:30}, {y:-30, duration: BEAT, ease:"power1.inOut"})` - 1–2s breathing room before text enters (don't animate everything at t=0) - Soft easing: `expo.out` for entrances, `power1.inOut` for drifts @@ -251,10 +276,10 @@ Full working `index.html` pattern — every field matters: **Brand font @font-face:** If the storyboard's BRAND VALUES lists a brand-specific font with a path in `capture/assets/fonts/`, add the `@font-face` block at the top of each composition that uses it — sub-agents won't do this unless you tell them explicitly. Paste the exact `@font-face` declaration in the sub-agent prompt's BRAND VALUES section. Without this, every composition falls back to `system-ui` and the brand typeface never loads. -**⚠ ASSET PATHS — most common sub-agent mistake (5+ agents per run):** All asset paths in compositions must be relative to the **PROJECT ROOT**, not to the composition file. `compositions/beat-N.html` lives one directory deep, but paths must be written as if from the root. +**⚠ ASSET PATHS — most common sub-agent mistake (5+ agents per run):** When a composition references a captured accent (logo, gradient layer, hero illustration), the path must be relative to the **PROJECT ROOT**, not to the composition file. `compositions/beat-N.html` lives one directory deep, but paths must be written as if from the root. -- ✅ `capture/assets/hero.png` -- ❌ `../capture/assets/hero.png` +- ✅ `capture/assets/logo.svg` +- ❌ `../capture/assets/logo.svg` The Studio preview server rewrites base URLs to the project root — `../` paths that seem to work locally will 404 in preview and in renders. Add this verbatim to every sub-agent prompt's RULES section. @@ -268,15 +293,25 @@ The Studio preview server rewrites base URLs to the project root — `../` paths In either case, use the template. Do not skip it and build from memory. -Each sub-agent reads [beat-builder-guide.md](beat-builder-guide.md) — it has everything: rules, easing, file references, validation commands, and the report-back protocol. **Do not try to paste all rules into the prompt yourself.** Instead, tell the sub-agent to read the guide file. You paste only the beat-specific context: the storyboard sections, brand values, and asset paths. +Each sub-agent reads [beat-builder-guide.md](beat-builder-guide.md) — it has everything: rules, easing, file references, validation commands, and the **required verification artifact spec**. **Do not try to paste all rules into the prompt yourself.** Instead, tell the sub-agent to read the guide file. You paste only the beat-specific context: the storyboard sections, brand values, and asset paths. ``` Build the composition for Beat N. Save to compositions/beat-N-name.html. -FIRST: Read skills/website-to-hyperframes/references/beat-builder-guide.md -It has your full workflow, all rules, easing vocabulary, file references, -and the report-back protocol. Follow its 5-step workflow exactly: -build → lint (`npx hyperframes lint .`) → snapshot (`npx tsx packages/cli/src/cli.ts snapshot . --frames 3`) → view contact sheet → fix issues → report back with specific frame descriptions. +FIRST: Read skills/website-to-hyperframes/references/beat-builder-guide.md end to end. +It has your full workflow, all rules, easing vocabulary, file references, and the +VERIFICATION ARTIFACT SPEC. Follow its workflow exactly: + build → lint (`npx hyperframes lint .`) + → snapshot (`npx tsx packages/cli/src/cli.ts snapshot . --frames 3`) + → view contact sheet AND read snapshots/descriptions.md + → fix issues + → write compositions/beat-N-name-verify.json (REQUIRED — see beat-builder-guide.md §5 for exact schema) + +The main agent runs `hyperframes verify-beats` after your work. It cross-checks +your verify.json claims against the actual composition HTML and snapshot files +on disk. You CANNOT pass verification by claiming things you didn't do — the +CLI greps the HTML for every hex color, every asset path you listed, and checks +every snapshot file exists. Do the work; write the truth. ═══ PREVIOUS BEAT (Beat N-1) ═══ [paste the FULL previous beat section from STORYBOARD.md] @@ -350,4 +385,33 @@ For every `.html` file in `compositions/`, confirm that `index.html` has a `data **Captions stub rule:** Never create a `compositions/captions.html` with an empty transcript (`const script = [];`). If the VO/transcript step was skipped or failed, do not create the captions composition at all. An empty captions file that returns immediately is worse than no captions file — it silently does nothing and wastes a track slot. -Once all compositions are built and all `compositions/` files are wired into `index.html`, move to Step 6 (Validate & Deliver) for lint, validate, snapshots, and visual review. +## 5. Run verify-beats — REQUIRED gate before Step 6 + +**Do not declare Step 5 complete on sub-agents' word.** Run the verifier: + +```bash +npx hyperframes verify-beats +``` + +This reads each `compositions/beat-N-verify.json` (which sub-agents wrote per the beat-builder-guide.md verification artifact spec) and **cross-checks every claim against the actual composition HTML and snapshot files on disk.** It catches: + +- Missing verify.json files (sub-agent skipped the verification step entirely) +- `lint.exit !== 0` (lint errors hidden) +- Fewer than 3 frame observations (sub-agent didn't actually look at the snapshots) +- Snapshot PNG paths that don't exist on disk (lied about taking snapshots) +- Brand colors claimed but absent from the composition HTML (lied about using them) +- Asset paths claimed but absent from the composition HTML (lied about using them) +- Headlines under 80px (unreadable at video scale) +- Missing or empty `concept_alignment` (no reason the beat exists in this video) +- Brand-floor violations: first or last beat doesn't reference the brand logo + +**If verify-beats exits non-zero, do NOT proceed to Step 6.** For each failing beat: + +1. Read the specific failure from the verifier output +2. Re-dispatch a sub-agent for that beat with the failure quoted in the prompt +3. The sub-agent must rebuild OR rewrite the verify.json (after actually doing the work it claimed) +4. Re-run `npx hyperframes verify-beats` until exit code is 0 + +This is the gate. Earlier sessions had sub-agents reply "looks good" and the main agent trusted them — that's why videos shipped with mismatched colors and missing logos. The verifier removes that trust path. There is no way for a sub-agent to fake the verify.json because the CLI reads the actual files it would have to write. + +Once `npx hyperframes verify-beats` exits 0, move to Step 6 (Validate & Deliver) for lint, validate, snapshots, and visual review. diff --git a/skills/website-to-hyperframes/references/step-6-validate.md b/skills/website-to-hyperframes/references/step-6-validate.md index 483533fc86..c3905ec538 100644 --- a/skills/website-to-hyperframes/references/step-6-validate.md +++ b/skills/website-to-hyperframes/references/step-6-validate.md @@ -9,6 +9,7 @@ This is the quality gate. Before the user sees anything, YOU verify that the vid Score each item 1–5. If any item scores below 3, fix it before continuing. ``` +[ ] verify-beats exits 0 → paste the summary line ("✓ N/N beats passed") [ ] Lint: zero errors → paste the lint output (not "lint passed") [ ] Snapshot taken, N frames confirmed → state the exact frame count [ ] descriptions.md read in full → quote the WORST frame Gemini described @@ -18,6 +19,8 @@ Score each item 1–5. If any item scores below 3, fix it before continuing. [ ] Critic sub-agent run → paste its single biggest quality gap finding ``` +The first item is the new structural gate: `npx hyperframes verify-beats ` must exit 0. This catches the failure mode where sub-agents claim "done" without doing the work — it re-checks every beat's verification artifact (lint, snapshots taken, brand colors used, captured assets referenced, frame observations, concept alignment) against the actual files on disk. If a sub-agent lied about using `#FF6363` and the file uses `#000000`, the verifier catches it. Re-dispatch failing beats before continuing. + **Why this matters:** The natural tendency is to look at a contact sheet, see that content is present, and declare it done. That is not verification — that is pattern-matching to a completion signal. Verification means running each check and reporting the raw result. "Frame 7 at 14.2s shows the logo in the top-left against a dark blue background, text is centered" is evidence. "The video looks great" is not. ---