Files
hyperframes/skills/website-to-hyperframes/scripts
ukimsanov f293d9daf3 feat(skill): preview-beat.mjs + _beat-skeleton.html for faster beat iteration
Two friction-reducers from the real-AI-test feedback list:

1. scripts/preview-beat.mjs (~100 LOC)
   - Snapshot ONLY the frames inside a single beat's window. Solves the
     "I built beat-3, I want to see only beat-3's frames" iteration loop
     without scanning past sibling beats in a full-timeline snapshot.
   - Walks compositions/ in the same sort order as w2h-prep's
     scanCompositionsDir (readdirSync.sort, skip captions.html), sums each
     beat's data-duration to compute the target's cumulative start_s,
     then invokes `hyperframes snapshot . --at <t1>,<t2>,...,<tN>` with
     frames evenly spaced inside [start_s, start_s+duration_s).
   - Beat arg accepts: a path under compositions/, a bare filename, OR
     the composition-id slug (case-insensitive). Whichever the agent has
     handy.
   - Required project state: index.html must exist (assembler ran at
     least once); otherwise dies with a clear "run assemble-index first"
     message.
   - Smoke-tested against synthetic 3-beat fixture: target by filename,
     target by id slug, missing-beat error, missing-index error — all
     four paths behave as expected.

2. templates/_beat-skeleton.html (~80 LOC)
   - File copy of the starter template from beat-builder-guide.md Step 2,
     so the agent can `cp` instead of paste-from-docs when starting a new
     beat. Faster, less chance of drift between docs and on-disk content.
   - Pre-wires the patterns each landmine defuses, with inline comments
     pointing to the landmine number in step-5-build.md. Specifically
     honors: #10 full-bleed bg child div (not root background:), the
     frame-0 black trap (inline style="opacity:1"), GSAP transform-only
     tween whitelist, the three-string match (root id / __timelines key /
     dispatch slug), no inline <script src=...> for GSAP / HyperShader
     (assembler emits both at root).
   - Lives under templates/ not compositions/ so w2h-prep's scanner
     doesn't pick it up as a beat in a real project.

beat-builder-guide.md:
   - Step 2 now points at the on-disk skeleton (alongside the existing
     paste-from-docs option).
   - Step 4 adds the per-beat-window preview command next to the full
     `snapshot` command, with the contract (assemble-index must have run)
     spelled out.
2026-06-11 19:56:20 -07:00
..