From f293d9daf327d4e0689584df110eb5777f40c348 Mon Sep 17 00:00:00 2001 From: ukimsanov Date: Thu, 11 Jun 2026 19:56:20 -0700 Subject: [PATCH] feat(skill): preview-beat.mjs + _beat-skeleton.html for faster beat iteration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 ,,...,` 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 + +