hyperframes 0.4.22 → 0.5.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -277,11 +277,28 @@ When no `visual-style.md` or animation direction is provided, follow [house-styl
277
277
  ## Output Checklist
278
278
 
279
279
  - [ ] `npx hyperframes lint` and `npx hyperframes validate` both pass
280
+ - [ ] `npx hyperframes inspect` passes, or every reported overflow is intentionally marked
280
281
  - [ ] Contrast warnings addressed (see Quality Checks below)
282
+ - [ ] Layout issues addressed (see Quality Checks below)
281
283
  - [ ] Animation choreography verified (see Quality Checks below)
282
284
 
283
285
  ## Quality Checks
284
286
 
287
+ ### Visual Inspect
288
+
289
+ `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`:
290
+
291
+ ```bash
292
+ npx hyperframes inspect
293
+ npx hyperframes inspect --json
294
+ ```
295
+
296
+ 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.
297
+
298
+ 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`.
299
+
300
+ `hyperframes layout` is the compatibility alias for the same check.
301
+
285
302
  ### Contrast
286
303
 
287
304
  `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:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: hyperframes-cli
3
- 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.
3
+ 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.
4
4
  ---
5
5
 
6
6
  # HyperFrames CLI
@@ -12,10 +12,11 @@ Everything runs through `npx hyperframes`. Requires Node.js >= 22 and FFmpeg.
12
12
  1. **Scaffold** — `npx hyperframes init my-video`
13
13
  2. **Write** — author HTML composition (see the `hyperframes` skill)
14
14
  3. **Lint** — `npx hyperframes lint`
15
- 4. **Preview** — `npx hyperframes preview`
16
- 5. **Render** — `npx hyperframes render`
15
+ 4. **Visual inspect** — `npx hyperframes inspect`
16
+ 5. **Preview** — `npx hyperframes preview`
17
+ 6. **Render** — `npx hyperframes render`
17
18
 
18
- Lint before preview catches missing `data-composition-id`, overlapping tracks, unregistered timelines.
19
+ 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.
19
20
 
20
21
  ## Scaffolding
21
22
 
@@ -42,6 +43,27 @@ npx hyperframes lint --json # machine-readable
42
43
 
43
44
  Lints `index.html` and all files in `compositions/`. Reports errors (must fix), warnings (should fix), and info (with `--verbose`).
44
45
 
46
+ ## Visual Inspect
47
+
48
+ ```bash
49
+ npx hyperframes inspect # inspect rendered layout over the timeline
50
+ npx hyperframes inspect ./my-project # specific project
51
+ npx hyperframes inspect --json # agent-readable findings
52
+ npx hyperframes inspect --samples 15 # denser timeline sweep
53
+ npx hyperframes inspect --at 1.5,4,7.25 # explicit hero-frame timestamps
54
+ ```
55
+
56
+ Use this after `lint` and `validate`, especially for compositions with speech bubbles, cards, captions, or tight typography. It reports:
57
+
58
+ - Text extending outside the nearest visual container or bubble
59
+ - Text clipped by its own fixed-width/fixed-height box
60
+ - Text extending outside the composition canvas
61
+ - Children escaping clipping containers
62
+
63
+ 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`.
64
+
65
+ `npx hyperframes layout` remains available as a compatibility alias for the same visual inspection pass.
66
+
45
67
  ## Previewing
46
68
 
47
69
  ```bash