mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-11 14:50:02 +00:00
fix(skill): w2h enforcement round 2 — close the deeper shirking patterns
A second agent debrief (different session, with the prior enforcement edits
applied) revealed the most damning failure yet: the agent used 1 of 65
captured assets. They wrote their own "Asset Audit" table saying SKIP for
64 hero illustrations, brand SVGs, and signature visuals. The entire point
of capture is to USE the brand's assets — that gate was bypassed entirely.
The debrief also revealed 5 other patterns the prior enforcement missed.
This commit closes all 6.
**Pattern A — Asset Audit gate (step-3-storyboard.md)** — BIGGEST FIX
Adds a non-skippable Asset Audit section in Step 3 that requires viewing
every page of capture/assets/contact-sheet-*.jpg + svgs/contact-sheet-*.jpg,
pasting 5 distinctive assets per page (with descriptions of what's actually
pictured), and choosing USE/SKIP per asset with one-sentence justification
for each SKIP. Brand-defaults floor: at least one beat MUST use a captured
hero illustration/photograph/signature diagram — not just the logo. The
forbidden list explicitly calls out: reading asset-descriptions.md alone
without opening the contact sheets, and rebuilding signature graphics in
CSS when the brand's own SVG of that graphic is in capture/assets/.
**Pattern B — Auto mode scope (SKILL.md + step-2-brief.md)**
Clarifies that auto mode covers user-PREFERENCE gates (TTS provider,
voice, beat count, captions yes/no — where the agent decides on the
user's behalf) but NOT quality-VERIFICATION gates (Asset Audit, per-beat
HTML read, DoD checklist, honest disclosure). Adds explicit test for
distinguishing: if the answer changes the content of the video, it's a
preference; if the answer is "did the verification happen?", it's a
quality gate. The agent that skipped the captions question by reasoning
"auto mode says bias toward action" was misusing auto mode.
**Pattern C — 3-path audio/motion verification (step-6-validate.md)**
Replaces the prior "Path 1 or explicit deferred" with three explicit
paths: (1) Play preview in Playwright, (2) render low-res MP4 and read
frames at ≥5fps, or (3) explicit deferred disclosure with QUANTIFIED
coverage gap ("18/900 frames = 2% coverage"). The percentage in Path 3 is
mandatory — vague "deferred to user" was the loophole. Forbidden: claiming
"confirmed via snapshot" as audio/motion evidence; 18 PNGs from a 900-
frame video is 2% coverage, not verification.
**Pattern D — Sub-agent diagnoses are hypotheses (beat-builder-guide.md)**
When a sub-agent reports "this is a linter false positive" / "this is a
known bug", that is a HYPOTHESIS from one symptom — not a verified
finding. Before propagating the workaround to other beats, main agent
must EITHER read the source to confirm OR explicitly disclose the
unverified claim. The debrief showed the main agent applied beat-2's
"linter false positive" diagnosis to beat-4 without ever reading
packages/core/src/lint/utils.ts to confirm.
**Pattern E — Re-snapshot after parallel sub-agents (step-5-build.md)**
When sub-agents run in parallel, each snapshots a project where sibling
beats may not exist yet. Their snapshots at beat boundaries or during
shader transitions show the WRONG content (typically previous beat).
Required after all complete: a canonical project-wide snapshot via the
CLI — that's what Step 6's DoD uses. Sub-agents' intermediate snapshots
are sanity checks, not the deliverable.
**Pattern F — STORYBOARD.md must be updated when divergence accepted
(beat-builder-guide.md)**
When a sub-agent diverges from spec ("the real brand mark is lowercase
'huly' not uppercase 'HULY'") AND the main agent accepts the divergence,
the main agent MUST patch STORYBOARD.md to reflect reality. Otherwise
the spec lies and the next session reading it as ground truth gets the
wrong information. Examples covered: brand mark casing, cell size at
scale, SFX timing alignment.
6 files changed, +131/-11 (net +120 lines of enforcement).
Format checks pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
18444decde
commit
5594a8286c
@@ -173,27 +173,52 @@ If you cannot find any problems and want to score everything 4–5, you are not
|
||||
|
||||
Read every score. Fix anything below 3 before showing the user. If the CTA scores below 3, fix the CTA. Do not rationalize low scores as "the user can decide."
|
||||
|
||||
## Audio + motion verification — separate from snapshot verification
|
||||
## Audio + motion verification — three paths, pick one
|
||||
|
||||
Snapshots are silent stills. They prove what FRAMES look like, but they do NOT prove:
|
||||
Snapshots are silent stills. 18 PNG snapshots from a 30s 30fps video = 18/900 = 2% of frames. The other 98% — including all motion, all transitions, all audio — is unverified by snapshots alone. "Confirmed via snapshot" is not coverage.
|
||||
|
||||
- That audio fires at all
|
||||
- That SFX lands exactly when the visual moment lands (target: ±0.1s, hard limit: ±0.5s)
|
||||
- That narration syncs to per-beat content
|
||||
- That transitions feel right in motion
|
||||
You MUST do ONE of these three paths before declaring done:
|
||||
|
||||
After snapshot DoD items pass, **play the preview Studio URL in a browser** (or via Playwright if available). Don't scrub — actually play it from start to end at 1.0× speed. Then verify:
|
||||
### Path 1 (preferred): Play the preview
|
||||
|
||||
Open the Studio URL in a browser via Playwright (or another browser tool you have). Play start-to-end at 1.0× speed (NOT scrubbed). Confirm:
|
||||
|
||||
```
|
||||
[ ] Played full video front-to-back at 1.0× — actually played, not scrubbed
|
||||
[ ] For each SFX in STORYBOARD.md: sound lands at the visual moment within ±0.1s
|
||||
(Beat N SFX `<file>`: storyboard says t=<x>s → heard at t=<y>s → drift <z>s)
|
||||
[ ] Narration delivers the right line per beat (no off-by-one or missing lines)
|
||||
[ ] No moments where audio is present but visual is unintentionally mid-transition
|
||||
[ ] No moments where audio is present but visual is mid-transition unintentionally
|
||||
[ ] Audio audible and not clipped/peaked
|
||||
```
|
||||
|
||||
**If you cannot play the preview** (no Playwright in this session, CLI-only environment), state this explicitly: "Audio + motion verification deferred to user — no preview tool available in this session." That is honest disclosure. **Silently skipping this check while presenting a "looks good" verdict fails the gate.**
|
||||
### Path 2: Render a low-res MP4 and read it frame-by-frame
|
||||
|
||||
When Playwright isn't available, render at 540p (fast — ~30s for a 30s video) and read the MP4:
|
||||
|
||||
```bash
|
||||
node /<repo-root>/packages/cli/dist/cli.js render <project-dir> \
|
||||
--width 960 --height 540 --quality medium
|
||||
```
|
||||
|
||||
Then sample the resulting MP4 at minimum 5fps (use `ffmpeg -i <mp4> -r 5 frames/frame-%04d.png` if needed). Read those frames sequentially. For each SFX moment in STORYBOARD.md, find the corresponding frame and confirm the visual matches.
|
||||
|
||||
### Path 3 (last resort): Explicit deferred disclosure with quantified gap
|
||||
|
||||
If neither Path 1 nor Path 2 is possible in this session, your final summary MUST contain this verbatim:
|
||||
|
||||
```
|
||||
**Audio + motion verification: NOT POSSIBLE in this session.**
|
||||
- Snapshots cover: <N> frames out of <video_duration × fps> total (<percentage>% coverage)
|
||||
- NOT verified: motion between snapshots, SFX/visual timing alignment, shader transition smoothness, audio mix levels, narration sync to beats
|
||||
- Recommended user action: open the preview URL above and play start-to-end; flag anything that feels off
|
||||
```
|
||||
|
||||
**Forbidden everywhere:**
|
||||
|
||||
- "Confirmed via snapshot" or "snapshots look right" as audio/motion evidence
|
||||
- "Preview is running, looks good" without actually playing it
|
||||
- Path 3 disclosure that omits the quantified coverage gap (the percentage is mandatory)
|
||||
|
||||
## Preview (always do this)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user