diff --git a/packages/cli/src/capture/agentPromptGenerator.ts b/packages/cli/src/capture/agentPromptGenerator.ts index 89f69b9a47..d7a3cc8961 100644 --- a/packages/cli/src/capture/agentPromptGenerator.ts +++ b/packages/cli/src/capture/agentPromptGenerator.ts @@ -48,17 +48,9 @@ export function generateAgentPrompt( hasLottie?: boolean, hasShaders?: boolean, _catalogedAssets?: CatalogedAsset[], // reserved for future asset inventory - detectedLibraries?: string[], + _detectedLibraries?: string[], ): void { - const prompt = buildPrompt( - outputDir, - url, - tokens, - hasScreenshot, - hasLottie, - hasShaders, - detectedLibraries, - ); + const prompt = buildPrompt(outputDir, url, tokens, hasScreenshot, hasLottie, hasShaders); writeFileSync(join(outputDir, "AGENTS.md"), prompt, "utf-8"); writeFileSync(join(outputDir, "CLAUDE.md"), prompt, "utf-8"); writeFileSync(join(outputDir, ".cursorrules"), prompt, "utf-8"); @@ -71,7 +63,6 @@ function buildPrompt( hasScreenshot: boolean, hasLottie?: boolean, hasShaders?: boolean, - detectedLibraries?: string[], ): string { const title = tokens.title || new URL(url).hostname.replace(/^www\./, ""); @@ -124,9 +115,6 @@ function buildPrompt( tableRows.push( "| `screenshots/scroll-*.png` | Individual viewport screenshots if you need detail on a specific section. |", ); - tableRows.push( - "| `screenshots/full-page.png` | Entire page as one tall image. For scrolling website animation videos. |", - ); } tableRows.push( `| \`extracted/tokens.json\` | Design tokens: ${tokens.colors.length} colors, ${tokens.fonts.length} fonts, ${tokens.headings?.length ?? 0} headings, ${tokens.ctas?.length ?? 0} CTAs |`, @@ -148,11 +136,6 @@ function buildPrompt( if (hasShaders) { tableRows.push("| `extracted/shaders.json` | WebGL shader source (GLSL). |"); } - if (detectedLibraries && detectedLibraries.length > 0) { - tableRows.push( - `| \`extracted/detected-libraries.json\` | Libraries: ${detectedLibraries.join(", ")} |`, - ); - } // Asset contact sheets — dynamically list all pages const assetSheetRows = contactSheetRows( @@ -188,9 +171,6 @@ function buildPrompt( const brandLines: string[] = []; brandLines.push(`- **Colors**: ${colorSummary || "see tokens.json"}`); brandLines.push(`- **Fonts**: ${fontSummary}`); - if (detectedLibraries && detectedLibraries.length > 0) { - brandLines.push(`- **Built with**: ${detectedLibraries.join(", ")}`); - } return `# ${title} diff --git a/packages/cli/src/capture/index.ts b/packages/cli/src/capture/index.ts index 1032f93630..b54870380a 100644 --- a/packages/cli/src/capture/index.ts +++ b/packages/cli/src/capture/index.ts @@ -483,23 +483,7 @@ export async function captureWebsite( writeFileSync(join(outputDir, "extracted", "visible-text.txt"), visibleTextContent, "utf-8"); } - // Save cataloged assets as JSON for AI agent - if (catalogedAssets.length > 0) { - writeFileSync( - join(outputDir, "extracted", "assets-catalog.json"), - JSON.stringify(catalogedAssets, null, 2), - "utf-8", - ); - } - - // Save detected libraries - if (detectedLibraries.length > 0) { - writeFileSync( - join(outputDir, "extracted", "detected-libraries.json"), - JSON.stringify(detectedLibraries, null, 2), - "utf-8", - ); - } + // detected-libraries and assets-catalog removed — 0/8 agents read them in v6 testing // AI-powered image captioning via Gemini (optional — enriches asset descriptions) const geminiCaptions = await captionImagesWithGemini(outputDir, progress, warnings); diff --git a/packages/cli/src/capture/screenshotCapture.ts b/packages/cli/src/capture/screenshotCapture.ts index 9d4aa1f464..3f49be5a86 100644 --- a/packages/cli/src/capture/screenshotCapture.ts +++ b/packages/cli/src/capture/screenshotCapture.ts @@ -136,20 +136,7 @@ export async function captureScrollScreenshots(page: Page, outputDir: string): P await page.evaluate(`window.scrollTo(0, 0)`); await new Promise((r) => setTimeout(r, 200)); - // Full-page screenshot — single tall image of the entire page. - // Useful for scrolling website animation videos where the whole page - // pans vertically as one continuous surface. - try { - const fullPagePath = join(screenshotsDir, "full-page.png"); - const fullPageBuffer = await page.screenshot({ - type: "png", - fullPage: true, - }); - writeFileSync(fullPagePath, fullPageBuffer); - filePaths.push("screenshots/full-page.png"); - } catch { - /* full-page screenshot can fail on very tall pages — non-critical */ - } + // full-page.png removed — 1/8 agents read it, contact sheet covers the same content } catch { /* scroll screenshots are non-critical */ } diff --git a/skills/website-to-hyperframes/SKILL.md b/skills/website-to-hyperframes/SKILL.md index 86e54ae358..b65ae359b8 100644 --- a/skills/website-to-hyperframes/SKILL.md +++ b/skills/website-to-hyperframes/SKILL.md @@ -50,9 +50,11 @@ Run the capture, read ALL extracted data (screenshots, tokens, design styles, te **Read:** [references/step-1-design.md](references/step-1-design.md) -Write DESIGN.md — a brand cheat sheet with 8 sections: Visual Theme, Color Palette, Typography, Component Stylings (buttons + cards), Layout Principles, Depth & Elevation, Do's/Don'ts, Agent Prompt Guide. Use `design-styles.json` for exact computed values. +Write DESIGN.md — a brand cheat sheet covering the visual identity: colors, typography, component styles, layout principles. Use `design-styles.json` for exact computed values. -**Gate:** `DESIGN.md` exists in the project directory with all 9 sections complete. User review done (colors/fonts/tone confirmed or corrected). +**Speed option:** For fast-pacing videos (billboard-per-beat), DESIGN.md can be a 50-line summary of colors + fonts + do's/don'ts — not a 300-line document. The sub-agent prompt in Step 5 pastes brand values directly, so DESIGN.md depth only matters for complex compositions. + +**Gate:** `DESIGN.md` exists (any length) with at minimum: color palette, font choices, and do's/don'ts. --- @@ -91,7 +93,7 @@ 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 each beat composition. Use captured screenshots at full frame size, not CSS recreations. Hero beats use HTML-in-Canvas for cinematic treatment. Every beat needs 25+ GSAP calls with continuous motion. +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). **Gate:** Every composition self-reviewed. Frames are full, elements readable, concept clear. diff --git a/skills/website-to-hyperframes/references/step-3-storyboard.md b/skills/website-to-hyperframes/references/step-3-storyboard.md index cdfa9a8afb..ebf502ecb8 100644 --- a/skills/website-to-hyperframes/references/step-3-storyboard.md +++ b/skills/website-to-hyperframes/references/step-3-storyboard.md @@ -13,7 +13,7 @@ If you can't answer it, you haven't thought enough. The answer must come from th - **The Creative Direction Summary** from Step 2 — the user's confirmed video type, style, specific requests, and format. Every creative decision must honor what the user asked for. - **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. -- **`capture/extracted/asset-descriptions.md`** — read EVERY line. This is your menu of available visuals. Each line describes what the image actually shows. Assets you don't understand from the description — view them directly before assigning. It is very important you fully understand what you have to work with +- **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. These are the website's own marketing assets (hero images, illustrations, icons) — they're designed content, not raw screenshots. The scroll screenshots (`screenshots/`) are for understanding the site layout, not for putting into the video. - **[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. @@ -189,7 +189,7 @@ Decide the number of beats and their durations based on the pacing from the Crea | Pacing | Beat count | Beat duration | Total | Architecture | When | | ------------ | ---------- | ------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | -| **Fast** | 8–15 | 0.7–1.8s | 15–25s | Stacked divs, hard cuts, one focus per frame. Load `/launch-video` skill for the billboard-per-beat pattern. | Social ads, hype launches, product drops | +| **Fast** | 8–15 | 0.7–1.8s | 15–25s | Single-file stacked divs, hard cuts via `tl.set()`. One focus per frame — billboard-per-beat pattern. No sub-compositions, no HyperShader. | Social ads, hype launches, product drops | | **Moderate** | 4–6 | 3–5s | 20–35s | Sub-compositions with CSS crossfade transitions. Multiple elements per beat, sequential entrances. | Product tours, demos, explainers | | **Slow** | 3–4 | 5–8s | 20–35s | Sub-compositions with long crossfades (0.8–1.2s). Ken Burns drift, parallax layers, breathing room before text enters. Continuous subtle motion — nothing is ever static. | Cinematic, premium brand, Apple-keynote style | | **Arc** | 5–7 | varies | 25–40s | Slow opening (5–8s) → building middle beats (3–4s) → fast peak (1–2s) → resolved close (4–6s). Mix architectures per section. | Launch announcements, narrative storytelling | diff --git a/skills/website-to-hyperframes/references/step-5-build.md b/skills/website-to-hyperframes/references/step-5-build.md index 53d024d85c..f75dbc5716 100644 --- a/skills/website-to-hyperframes/references/step-5-build.md +++ b/skills/website-to-hyperframes/references/step-5-build.md @@ -92,12 +92,65 @@ SFX were assigned in the storyboard (Step 3) — implement exactly what STORYBOA **Choose architecture based on pacing (from Step 3)** -| Pacing | Architecture | Why | -| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| **Fast** (billboard-per-beat) | Single `index.html`, stacked `
` elements, GSAP opacity sequencing. NO sub-compositions, NO HyperShader. Hard cuts via `tl.set()`. Load `/launch-video` skill. | Sub-compositions add latency; hard cuts need instant swaps. One file = zero load delay. | -| **Moderate / Slow / Arc** | Sub-compositions with `HyperShader.init()`. Each beat in `compositions/beat-N.html`. CSS crossfades or shader transitions between scenes. | Transitions need HyperShader's compositing. Sub-agents build each beat independently. | +| Pacing | Architecture | Why | +| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------- | +| **Fast** (billboard-per-beat) | Single `index.html`, stacked `
` elements, GSAP opacity sequencing. NO sub-compositions, NO HyperShader. Hard cuts via `tl.set()`. See stacked-beats pattern below. | Sub-compositions add latency; hard cuts need instant swaps. One file = zero load delay. | +| **Moderate / Slow / Arc** | Sub-compositions with `HyperShader.init()`. Each beat in `compositions/beat-N.html`. CSS crossfades or shader transitions between scenes. | Transitions need HyperShader's compositing. Sub-agents build each beat independently. | -If the storyboard says "fast" pacing: use the stacked-beats pattern from `/launch-video`. Do not use HyperShader — it adds scene registration overhead that creates gaps between hard cuts. Every frame is content, no transition frames. +If the storyboard says "fast" pacing: use the stacked-beats pattern below. Do not use HyperShader — it adds scene registration overhead that creates gaps between hard cuts. Every frame is content, no transition frames. + +**Stacked-beats pattern (fast pacing):** + +```html +
+
+ +
Opening statement
+
+
+ +
+ +
+``` + +```css +.beat { + position: absolute; + inset: 0; + width: 1920px; + height: 1080px; + display: flex; + align-items: center; + justify-content: center; + opacity: 0; + overflow: hidden; +} +``` + +```javascript +var beats = [ + { id: "b01", at: 0, dur: 1.8 }, + { id: "b02", at: 1.8, dur: 1.0 }, + // ... +]; +beats.forEach(function (b) { + var el = document.getElementById(b.id); + if (b.id !== "b01") tl.set(el, { opacity: 1 }, b.at); + gsap.set(el, { scale: 1.012 }); + tl.to(el, { scale: 1, duration: 0.25, ease: "power2.out" }, b.at); + if (b !== beats[beats.length - 1]) tl.set(el, { opacity: 0 }, b.at + b.dur); +}); +``` + +Each beat gets its own visual world — different background, different color, different energy. No two consecutive beats should look alike. Scale pulse (1.012→1.0) on every beat entry is subtle but felt. 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: @@ -311,6 +364,28 @@ Brand values are in the BRAND VALUES section above — no need to read DESIGN.md - Use tl.fromTo() not tl.from() for entrance animations - No CSS transform for centering — use flexbox - Never stack two transform tweens on same element + +═══ EASING — stop using power2.out on everything ═══ +Generic power2.out on every tween is the hallmark of AI-generated video. +Pick easing per INTENT: + +| Intent | GSAP Ease | When to use | +|---------------------|------------------------|------------------------------------------------| +| Snap (iOS-like) | power4.out | Hero text landing, UI elements clicking in | +| Whip overshoot | back.out(1.7) | Numbers, badges, anything that needs impact | +| Soft land | expo.out | Per-word text reveals, gentle entrances | +| Mechanical | power1.out or "none" | Terminal text, code typing, linear motion | +| Bounce settle | elastic.out(1, 0.5) | Stats, counters, CTA pills | +| Dramatic entrance | expo.inOut | Full-screen statements, hero reveals | +| Subtle drift | "none" | Background parallax, Ken Burns, camera drift | + +Apply per beat type: +- Statement text → expo.out (dramatic) or power4.out (snap) +- Product screenshots → no easing on Ken Burns (linear drift) +- Numbers/stats → back.out(1.7) (whip overshoot for impact) +- Rapid-fire category words → tl.set() (hard cut, no easing) +- CTA pill → elastic.out(1, 0.5) (bounce settle, last thing viewer sees) +- Staggered items → power4.out with 0.08-0.15s stagger ``` The storyboard beat already contains everything — the concept, the visual choreography with exact timings, the CSS values, the SFX cues. The sub-agent's job is to translate that description into working HTML/CSS/GSAP, not to re-invent the creative direction. If you want, you can also paste any other relative and useful context to subagents if think it's good, why not.