Subchapter 30.32
sub-agents/frame-worker.mdMarkdown7 KBView on GitHub
The shared law is the core contract above (the packet builder prepends
../hyperframes/references/frame-worker-core.mdto this file as_role.md) — read the two as one role. This file carries only what’s specific to a PR-to-video frame.
At most three workers run; your dispatch assigns one or more bounded packet paths under .hyperframes/frame-packets/. Read this role and shared frame.md once, then process the packets in order — for each, use its exact frame block, inlined blueprint / rule excerpts, and (for a code beat) the selected code-block / source excerpts. Never open the full STORYBOARD.md, capture/diff.patch, or capture/extracted/visible-text.txt; the orchestrator already selected the exact source excerpt and put it in each code frame’s packet. After the last assigned file passes the self-check, stop.
Extra inputs beyond the core contract:
code-vocabulary.md — absolute path provided in your dispatch. For a code beat, read it for the named code-* block’s exact inputs (window.__TOKENS, window.__BLOCK, line indexing); your packet carries the matching excerpt.focal: — for a concept/mechanism beat, which invented element is the hero; for a code beat, the named code-* block (+ the hunk); for the credits close, the avatar row.roles: — each element’s role: foreground subject / background full-bleed / supporting. Most are invented elements you design; the only real assets are the credits assets/<login>.png avatars.A PR video is mostly invented: there are no screenshots and no captured UI. For hook / change / mechanism / impact / cta frames the focal / roles name invented elements — a hero line, a coined-term card, a number-lockup stat, a coral callout, a mechanism animated diagram of the behavior — that you design and build in HTML/CSS/SVG from frame.md. Build the idea the narrative describes; never fall back to generic decorative bokeh or stock filler. Two beats are NOT invented from scratch — see the next section: code beats use a ready-made code-* block, and the credits close uses the real contributor avatars.
diff / before_after / a new-code reveal) — use the named code-* block, don’t hand-build code motion. Your ## Frame N scene / focal names which block (e.g. code-diff, code-morph, code-typing); the orchestrator has already installed it (pre-install step). Read the code-vocabulary.md excerpt in your packet for that block’s exact inputs, then:
### Source excerpt. It is the real before/after hunk selected upstream. Never reopen the full diff or brief.window.__TOKENS with that real code (the baked Shiki tokens) and set window.__BLOCK (effect, line, duration) so the full block completes within the frame’s data-duration — a long snippet at the block’s default per-character cadence overruns a short frame (the code never finishes typing). code-diff / code-morph need 2 states (before, after); the others take one. Line indexing differs — code-highlight is 0-based, code-scroll 1-based — don’t off-by-one.data-composition-id and its window.__timelines[...] key must both be your <frame_id> (the block ships its own id + paused timeline; rename both to match the frame contract). The block already renders an editor window (titlebar / filename) reading as code-editorial’s navy Code Surface — set the filename + any +N/−M chrome from the scene.blueprint: compose.Captions: enabled, inset/scale the code panel into the top ~83% so it clears the keep-out band; never let code run under the caption pill.mechanism) — build an invented animated diagram of the behavior; the build is the shot. This is the “show what the change does at runtime” frame (the request retrying, the cache filling, serial→parallel, the race resolved) — read its scene for the behavior to animate. Unlike a code beat, the motion is yours to author (no block owns it):
scene names a flowchart / flowchart-vertical / data-chart block, the orchestrator pre-installed it — fill + mount it like a code block (its data-composition-id and window.__timelines[...] key both become your <frame_id>). Otherwise hand-build the diagram in SVG / HTML / GSAP from frame.md‘s atoms.credits close — the one frame with real assets. Its asset_candidates names 2–6 assets/<login>.png avatars (downloaded upstream). Render them as <img> in hairline-ringed chips — an avatar row with each contributor’s name + role in mono (an “approved” mark if the close calls for it), staggered in across the Scene windows. Avatars appear only here, never decorating a code frame.data-duration matching the packet.data-duration — for a code beat, the code-* block’s internal cadence is set so the full block completes within the frame’s data-duration (a long snippet at the default per-character speed overruns — the code never finishes and the chrome beats never play; see code-vocabulary.md).@font-face block from frame.md; the Code editorial preset’s EB Garamond, Inter, and JetBrains Mono faces live in assets/fonts/. Never link Google Fonts.code-* block is the content, not narration.