From 4d074c423e1f8c502de6b335342f4572d935b1df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Sun, 26 Apr 2026 23:35:55 +0000 Subject: [PATCH] Sync hyperframes plugin skills with upstream main Pulls all skill content updates from heygen-com/hyperframes that have landed since the last openai/plugins sync. Net effect: the plugin's skills/ directory matches the source-of-truth heygen-com/hyperframes skills/ directory at the head of #504. Source PRs: - heygen-com/hyperframes#480 (Visual Inspect command) * skills/hyperframes/SKILL.md: adds Visual Inspect section + checklist * skills/hyperframes-cli/SKILL.md: adds Visual Inspect section, updates workflow ordering and description - heygen-com/hyperframes#364 + #490 (GSAP authoring rules + data-duration) * skills/website-to-hyperframes/references/step-6-build.md: adds Load-bearing rules for animation authoring section, refines data-duration phrasing - heygen-com/hyperframes#504 (preview handoff URL) * skills/hyperframes-cli/SKILL.md: adds Studio handoff URL guidance * skills/website-to-hyperframes/SKILL.md: Step 7 deliverable + gate * skills/website-to-hyperframes/references/step-7-validate.md: adds Handoff URL section The agents/openai.yaml manifests added by openai/plugins#189 are preserved as-is; they are openai-plugins-specific and have no upstream counterpart in heygen-com/hyperframes. --- .../skills/hyperframes-cli/SKILL.md | 44 +++++++++++-- .../hyperframes/skills/hyperframes/SKILL.md | 17 +++++ .../skills/website-to-hyperframes/SKILL.md | 7 +- .../references/step-6-build.md | 65 ++++++++++++++++++- .../references/step-7-validate.md | 26 ++++++++ 5 files changed, 152 insertions(+), 7 deletions(-) diff --git a/plugins/hyperframes/skills/hyperframes-cli/SKILL.md b/plugins/hyperframes/skills/hyperframes-cli/SKILL.md index ba14cfe64..ef4c231a7 100644 --- a/plugins/hyperframes/skills/hyperframes-cli/SKILL.md +++ b/plugins/hyperframes/skills/hyperframes-cli/SKILL.md @@ -1,6 +1,6 @@ --- name: hyperframes-cli -description: HyperFrames CLI tool — hyperframes init, lint, preview, render, transcribe, tts, doctor, browser, info, upgrade, compositions, docs, benchmark. Use when scaffolding a project, linting or validating compositions, previewing in the studio, rendering to video, transcribing audio, generating TTS, or troubleshooting the HyperFrames environment. +description: HyperFrames CLI tool — hyperframes init, lint, inspect, preview, render, transcribe, tts, doctor, browser, info, upgrade, compositions, docs, benchmark. Use when scaffolding a project, linting, validating, inspecting visual layout in compositions, previewing in the studio, rendering to video, transcribing audio, generating TTS, or troubleshooting the HyperFrames environment. --- # HyperFrames CLI @@ -12,10 +12,11 @@ Everything runs through `npx hyperframes`. Requires Node.js >= 22 and FFmpeg. 1. **Scaffold** — `npx hyperframes init my-video` 2. **Write** — author HTML composition (see the `hyperframes` skill) 3. **Lint** — `npx hyperframes lint` -4. **Preview** — `npx hyperframes preview` -5. **Render** — `npx hyperframes render` +4. **Visual inspect** — `npx hyperframes inspect` +5. **Preview** — `npx hyperframes preview` +6. **Render** — `npx hyperframes render` -Lint before preview — catches missing `data-composition-id`, overlapping tracks, unregistered timelines. +Lint and inspect before preview. `lint` catches missing `data-composition-id`, overlapping tracks, and unregistered timelines. `inspect` opens the rendered composition in headless Chrome, seeks through the timeline, and reports text spilling out of bubbles/containers or off the canvas. ## Scaffolding @@ -42,6 +43,27 @@ npx hyperframes lint --json # machine-readable Lints `index.html` and all files in `compositions/`. Reports errors (must fix), warnings (should fix), and info (with `--verbose`). +## Visual Inspect + +```bash +npx hyperframes inspect # inspect rendered layout over the timeline +npx hyperframes inspect ./my-project # specific project +npx hyperframes inspect --json # agent-readable findings +npx hyperframes inspect --samples 15 # denser timeline sweep +npx hyperframes inspect --at 1.5,4,7.25 # explicit hero-frame timestamps +``` + +Use this after `lint` and `validate`, especially for compositions with speech bubbles, cards, captions, or tight typography. It reports: + +- Text extending outside the nearest visual container or bubble +- Text clipped by its own fixed-width/fixed-height box +- Text extending outside the composition canvas +- Children escaping clipping containers + +Errors should be fixed before rendering. Warnings are surfaced for agent review; add `--strict` to fail on warnings too. Repeated static issues are collapsed by default so JSON output stays compact for LLM context windows. If overflow is intentional for an entrance/exit animation, mark the element or ancestor with `data-layout-allow-overflow`. If a decorative element should never be audited, mark it with `data-layout-ignore`. + +`npx hyperframes layout` remains available as a compatibility alias for the same visual inspection pass. + ## Previewing ```bash @@ -51,6 +73,20 @@ npx hyperframes preview --port 4567 # custom port (default 3002) Hot-reloads on file changes. Opens the studio in your browser automatically. +When handing a project back to the user, use the Studio project URL, not the +source `index.html` path: + +```text +http://localhost:/#project/ +``` + +Use the actual port from the preview output and the project directory name. For +example, after `npx hyperframes preview --port 3017` in `codex-openai-video`, +report `http://localhost:3017/#project/codex-openai-video`. + +Treat `index.html` as source-code context only. It is fine to link it as an +implementation file, but do not label it as the project or preview surface. + ## Rendering ```bash diff --git a/plugins/hyperframes/skills/hyperframes/SKILL.md b/plugins/hyperframes/skills/hyperframes/SKILL.md index 5584493f3..60f816e67 100644 --- a/plugins/hyperframes/skills/hyperframes/SKILL.md +++ b/plugins/hyperframes/skills/hyperframes/SKILL.md @@ -277,11 +277,28 @@ When no `visual-style.md` or animation direction is provided, follow [house-styl ## Output Checklist - [ ] `npx hyperframes lint` and `npx hyperframes validate` both pass +- [ ] `npx hyperframes inspect` passes, or every reported overflow is intentionally marked - [ ] Contrast warnings addressed (see Quality Checks below) +- [ ] Layout issues addressed (see Quality Checks below) - [ ] Animation choreography verified (see Quality Checks below) ## Quality Checks +### Visual Inspect + +`hyperframes inspect` runs the composition in headless Chrome, seeks through the timeline, and maps visual layout issues with timestamps, selectors, bounding boxes, and fix hints. Run it after `lint` and `validate`: + +```bash +npx hyperframes inspect +npx hyperframes inspect --json +``` + +Failures usually mean text is spilling out of a bubble/card, a fixed-size label is clipping dynamic copy, or text has moved off the canvas. Fix by increasing container size or padding, reducing font size or letter spacing, adding a real `max-width` so text wraps inside the container, or using `window.__hyperframes.fitTextFontSize(...)` for dynamic copy. + +Use `--samples 15` for dense videos and `--at 1.5,4,7.25` for specific hero frames. Repeated static issues are collapsed by default to avoid flooding agent context. If overflow is intentional for an entrance/exit animation, mark the element or ancestor with `data-layout-allow-overflow`. If a decorative element should never be audited, mark it with `data-layout-ignore`. + +`hyperframes layout` is the compatibility alias for the same check. + ### Contrast `hyperframes validate` runs a WCAG contrast audit by default. It seeks to 5 timestamps, screenshots the page, samples background pixels behind every text element, and computes contrast ratios. Failures appear as warnings: diff --git a/plugins/hyperframes/skills/website-to-hyperframes/SKILL.md b/plugins/hyperframes/skills/website-to-hyperframes/SKILL.md index 8a96b5bb1..2233ffdae 100644 --- a/plugins/hyperframes/skills/website-to-hyperframes/SKILL.md +++ b/plugins/hyperframes/skills/website-to-hyperframes/SKILL.md @@ -83,9 +83,12 @@ Build each composition following the storyboard. After each one: self-review for **Read:** [references/step-7-validate.md](references/step-7-validate.md) -Lint, validate, snapshot, preview. Deliver the preview to the user first — only render to MP4 on explicit request. +Lint, validate, snapshot, preview. Deliver the localhost Studio project URL +(`http://localhost:/#project/`) to the user first — only +render to MP4 on explicit request. Do not treat `index.html` as the project +handoff link; it is source-code context only. -**Gate:** `npx hyperframes lint` and `npx hyperframes validate` pass with zero errors. +**Gate:** `npx hyperframes lint` and `npx hyperframes validate` pass with zero errors, and the final response includes the active Studio project URL. --- diff --git a/plugins/hyperframes/skills/website-to-hyperframes/references/step-6-build.md b/plugins/hyperframes/skills/website-to-hyperframes/references/step-6-build.md index c04c5991e..0021ccaf2 100644 --- a/plugins/hyperframes/skills/website-to-hyperframes/references/step-6-build.md +++ b/plugins/hyperframes/skills/website-to-hyperframes/references/step-6-build.md @@ -114,7 +114,7 @@ After building the composition, check WITH ACTUAL CODE: - [ ] No full-screen dark linear gradients (H.264 creates visible banding — use solid + localized radial glows) - [ ] Timeline registered: `window.__timelines["comp-id"] = tl` - [ ] Colors match DESIGN.md exactly (paste the HEX value, don't approximate) -- [ ] **Every `