feat(snapshot): font verification + pacing-first + creative summary removal

snapshot: report loaded vs failed fonts via document.fonts API
step-3: pacing is FIRST decision at top of file
step-2 + SKILL.md: no more creative summary confirmation
step-5: sub-agent prompt includes explicit snapshot + lint commands
This commit is contained in:
ukimsanov
2026-05-18 01:45:06 -07:00
parent 7a283b6c40
commit ec5edfa1df
5 changed files with 61 additions and 28 deletions
+23
View File
@@ -198,6 +198,29 @@ async function captureSnapshots(
// Extra settle time for media, fonts, and animations to initialize
await new Promise((r) => setTimeout(r, 1500));
// Font verification — report which fonts loaded vs fell back
const fontReport = await page
.evaluate(() => {
const loaded: string[] = [];
const failed: string[] = [];
(document as any).fonts.forEach((f: any) => {
const entry = `${f.family} (${f.weight} ${f.style})`;
if (f.status === "loaded") loaded.push(entry);
else failed.push(entry + ` [${f.status}]`);
});
return { loaded, failed };
})
.catch(() => ({ loaded: [] as string[], failed: [] as string[] }));
if (fontReport.loaded.length > 0 || fontReport.failed.length > 0) {
console.log(
`\n ${c.dim("Fonts loaded:")} ${fontReport.loaded.length > 0 ? fontReport.loaded.join(", ") : "none"}`,
);
if (fontReport.failed.length > 0) {
console.log(` ${c.error("Fonts FAILED:")} ${fontReport.failed.join(", ")}`);
}
}
// Get composition duration
const duration = await page.evaluate(() => {
const win = window as any;
+3 -3
View File
@@ -62,13 +62,13 @@ Write DESIGN.md — a brand cheat sheet covering the visual identity: colors, ty
---
## Step 2: Creative Brief 💬
## Step 2: Creative Brief
**Read:** [references/step-2-brief.md](references/step-2-brief.md), [references/visual-vocabulary.md](references/visual-vocabulary.md), [references/capabilities-overview.md](references/capabilities-overview.md)
You now know the brand inside-out. Before making any creative decisions, talk to the user. Show them what you found, what assets are available, what HyperFrames can do with them, and ask what they want. Map their words to concrete visual-vocabulary dimensions.
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.
**Gate:** User has confirmed the Creative Direction Summary — video type, duration, style direction, specific requests, format.
**Gate:** You know the video type, duration, style, and format — either from the user's prompt or by deciding yourself.
---
@@ -155,13 +155,13 @@ Let the user pick one or combine elements.
## Gate
You have all of these before proceeding:
Extract these from the user's prompt — most are already there:
1. **Video type** — social ad, demo, launch teaser, brand reel, or custom
2. **Duration** — explicit or inferred from type
3. **Style direction** — mapped to visual-vocabulary dimensions
4. **Specific requests** — any particular scenes/effects the user wants (can be empty if "surprise me")
5. **Narration** — yes (full), minimal (hook only), or no (visual-only)
6. **Format** — landscape, portrait, or square
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
Proceed directly to Step 3. The storyboard's Global Direction section captures the creative plan — no separate summary needed.
**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.
@@ -1,16 +1,34 @@
# Step 3: Storyboard + Script
**Before writing a single beat, answer this in one sentence:**
## First decision: PACING
> "What makes this video different from a generic [video type] for any [industry] brand?"
Decide pacing BEFORE anything else. This determines beat count, beat duration, and architecture — everything flows from it.
If you can't answer it, you haven't thought enough. The answer must come from this brand's specific DESIGN.md, captured assets, and what the user said — not from a lookup table. If the only thing you can say is "it uses their colors," that's not enough.
Read the user's prompt and the style direction from Step 2. Map to one of these:
| User says | Pacing | Beat count | Beat duration | Architecture |
| ----------------------------------------------------------- | ------------ | ---------- | ------------- | ---------------------------------------------------------- |
| "fast", "punchy", "rapid cuts", "energetic", "social ad" | **Fast** | 8–15 | 0.7–1.8s | Single-file stacked beats, hard cuts |
| "demo", "walkthrough", "product tour", "show features" | **Moderate** | 4–6 | 3–5s | Sub-compositions, CSS crossfades |
| "cinematic", "premium", "slow", "let it breathe", "elegant" | **Slow** | 3–4 | 5–8s | Sub-compositions, long crossfades |
| "launch", "announcement", "story", "narrative" | **Arc** | 5–7 | varies | Slow opener → building middle → fast peak → resolved close |
**Write your pacing choice at the top of STORYBOARD.md.** Example: `**Pacing: Fast** — 12 beats, stacked divs, hard cuts.`
If the user said "dark cinematic feel" — that's SLOW, not fast. If they said "rapid cuts, bold typography" — that's FAST. Don't default to moderate when the prompt gives you a clear signal.
---
**Before writing anything, fully re-read these files:**
**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:**
- **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.
- **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/<filename>`. 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.
@@ -185,16 +203,7 @@ Each beat is a WORLD, not a layout. Write what the viewer EXPERIENCES before you
**Rhythm** — declare your scene rhythm before implementing: fast-fast-SLOW-fast-SHADER-hold. The rhythm comes from the brand and content, not a template.
Decide the number of beats and their durations based on the pacing from the Creative Brief (Step 2). The pacing dimension maps directly to beat count and duration:
| Pacing | Beat count | Beat duration | Total | Architecture | When |
| ------------ | ---------- | ------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| **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 |
**Do not default to moderate.** Read the pacing dimension from the Creative Brief. If the user said "cinematic" or "premium," that's slow — 3–4 beats at 5–8s each. If they said "punchy" or "social ad," that's fast — load `/launch-video`. Most agents default to 5 beats at 3–4s regardless of direction. That's the mushy middle and it produces generic videos.
Use the pacing you decided at the top of this step. The beat count, duration, and architecture are already set.
**Cut the video to match the narration length** — if the script produces 22 seconds of audio, the video should be 24 seconds with a 2-second CTA hold, not 30 seconds with 8 seconds of dead silence. Empty time at the end where nothing is happening loses the viewer.
@@ -274,8 +274,9 @@ Each sub-agent reads [beat-builder-guide.md](beat-builder-guide.md) — it has e
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, validation commands,
file references to read, and the report-back protocol.
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.
═══ PREVIOUS BEAT (Beat N-1) ═══
[paste the FULL previous beat section from STORYBOARD.md]