Files
hyperframes/skills/website-to-hyperframes/scripts
ukimsanov cba37a1250 feat(skill): PHASE C — asset-existence gate + shader-transitions auto-derive
PHASE C as originally planned didn't apply — our w2h-prep.mjs evolved
past the plan's "280-LOC stub" baseline (now 476 → 603 LOC), and 4/6
"takes" from plv2's prep.mjs are already done. The remaining 2 are
preset-architecture-specific to plv2 (anchor-walk of section_plan.md,
asset-copy to public/) and don't fit our HTML-as-truth pipeline.

Instead, ship two small targeted improvements that genuinely fill gaps:

(a) Asset-existence pre-flight gate (~50 LOC):
  - Scans each beat HTML for `capture/assets/X` refs in src=/xlink:href=/
    CSS url() and verifies each resolves to a file on disk.
  - Emits `asset_check: { total_references, unique_assets, missing[] }`
    in group_spec.json so preflight-finalize and perception can flag it.
  - Prints a console warning per missing asset (with the beat ids that
    reference it). Catches "logo 404 at render time" BEFORE the user
    waits for a 30-second MP4 to bake.

(b) Shader-transitions auto-derive from STORYBOARD.md (~45 LOC):
  - Parses a canonical "## Shader Transitions" block:
    `- between <beat-id> and <beat-id>: shader=<name>[, duration=<n>]`
  - When ANY transition is declared, emits the full scenes/transitions
    chain with declared shaders on the declared boundaries and CSS
    crossfade (no `shader` field) on the rest. Invariant
    `scenes.length === transitions.length + 1` is honored.
  - When NO transitions are declared, the field is omitted — assembler
    falls through to vanilla GSAP, same backward-compatible default.
  - bg_color + accent_color derived from parsed DESIGN.md tokens.
  - Canonical format documented in step-3-storyboard.md under "Shader
    Transitions — block name ≠ shader name" so the agent knows the
    exact syntax.

Smoke-tested with a 2-beat synthetic project: missing asset surfaced
as expected; shader_transitions emitted with the right bg_color +
shader name + computed time/duration.
2026-06-11 12:21:32 -07:00
..