From 9348d354013b68b5ccc6cbe15650b6ab2210a22e Mon Sep 17 00:00:00 2001 From: Vance Ingalls Date: Thu, 16 Apr 2026 23:31:05 -0700 Subject: [PATCH] feat(skills): pre-plan persistent-subject choreography (Addition C) User feedback from eval 5 exposed a real R4 failure mode: - p2 Thread: Maya's card persisted across scenes (good) but often landed in positions that didn't fit the scene's content hierarchy (bad). Semantic-mismatch. - p3 Vermeer: painting zoomed to 2.1x in scene 2, blocking the right-column metadata the scene subagent had authored. Size- collision. Root cause: expansion identifies the subject, scene subagents author their scenes INDEPENDENTLY (picking their own layouts), and the scaffold tweens the subject's position/scale across transitions as an afterthought. Scene subagents don't know how big the subject will be in THEIR scene, so they place their chrome wherever, and then the scaffold's tween scales the subject up or moves it into regions already filled. Fix: expansion pre-plans the choreography BEFORE the per-scene detailed breakdown. Per-scene block specifies: - position (center x, y) - scale - size_envelope (actual on-screen footprint in this scene) - role (focal / background anchor / data-point / glyph-slot / ...) - reserved_region (rectangle scene subagent must leave empty) - scene_must_avoid (short instruction) Orchestrator (multi-scene.md) passes each scene subagent its scene's choreography block plus the contract: - The scaffold owns the subject's DOM + timeline. - Your scene layout MUST respect the reserved region. - Design your scene chrome around the element's role in this scene. - Do NOT animate the persistent subject in your timeline. Invariants: - Size envelope reflects the SETTLED state (if the subject scales up during the scene, reserve for the larger size). - Scene-to-scene positions trace a visually-coherent path, not leapfrogs. - Role changes drive reserved-region size. Branch worktree only. Not synced to installed main skill path. --- skills/hyperframes/references/multi-scene.md | 188 ++++++++++++++++++ .../references/prompt-expansion.md | 58 ++++++ 2 files changed, 246 insertions(+) create mode 100644 skills/hyperframes/references/multi-scene.md diff --git a/skills/hyperframes/references/multi-scene.md b/skills/hyperframes/references/multi-scene.md new file mode 100644 index 000000000..7de628db1 --- /dev/null +++ b/skills/hyperframes/references/multi-scene.md @@ -0,0 +1,188 @@ +# Multi-Scene Build Pipeline + +For compositions with 2 or more scenes, build in phases instead of one pass. A single pass produces shallow results — detail drops as context fills with boilerplate, and the authoring agent tends to under-decorate later scenes. Giving each scene its own subagent keeps per-scene density and decoration consistent. + +Single-pass is reserved for true one-scene compositions: title cards, standalone overlays, single-clip animations. + +## Who runs this pipeline + +The parallel dispatch in Phase 1 and Phase 2b requires the `Agent`/`Task` tool. In Claude Code, only the **top-level conversation agent** (the one that received the user's `/hyperframes` invocation) has this tool. Dispatched subagents typically do not. + +- **If you're the top-level agent:** run the full pipeline. Fan out scene subagents and evaluator subagents in parallel. +- **If you're a nested subagent** (you were dispatched with a `/hyperframes` task): you cannot fan out further. Author all scene fragments sequentially yourself, strictly following the Scene Fragment Spec below, then run the assembler and lint gates. Do not silently skip the pipeline — note in your final report that parallel dispatch was unavailable and you built serially. + +The assembler, scaffold markers, fragment spec, and gates are the same either way; only the dispatch shape changes. + +## Scene Fragment Spec + +Every scene file (`.hyperframes/scenes/sceneN.html`) must be a **fragment**, not a standalone document. The assembler splits on markers and injects verbatim — non-compliant files break assembly. + +### Structure + +Exactly three sections, in this order, each appearing exactly once: + +``` + +
...
+... + + +.s3-heading { color: var(--fg); ... } +... + + +var S3 = 14.3; +tl.set('#s3-heading', { opacity: 0, y: 30 }, 0); +tl.to('#s3-heading', { opacity: 1, y: 0, duration: 0.4 }, S3 + 0.5); +... +``` + +### Required + +- **Three markers, one each:** ``, ``, `` — no duplicates +- **ID prefix:** All IDs and classes use `s{N}-` prefix (e.g., `#s3-heading`, `.s7-chart`) +- **GSAP pattern:** `tl.set()` at time 0 for initial state, `tl.to()` at scene time for animation +- **Scene start var:** Define `var SN = {start_time};` at top of GSAP section, reference it for all tweens +- **Finite repeats:** All `repeat` values must be explicit numbers, never `-1` or `Infinity` + +### Prohibited + +- `` or `` tags — the CSS section is raw CSS, not wrapped in style tags. The scaffold's `