mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-12 07:09:59 +00:00
* chore(skills): package Codex plugin upload * chore(skills): harden Codex plugin content * fix(skills): satisfy plugin quality gates * fix(skills): address plugin packaging review * fix(plugin): simplify asset validation * fix(skills): correct embedded-captions catalog count to 35 after nightcity removal The nightcity theme removal left SKILL.md claiming 36 identities in four places, including the frontmatter description the router reads. The catalog now has 35 entries (10 classic + 25 themed). --------- Co-authored-by: Miao Yang <miao.yang@heygen.com>
2.7 KiB
2.7 KiB
PORTING — turning a cap_fx3 demo into a first-class theme DNA
One theme at a time. The demo is the spec; the engine is the law.
Inputs
- Demo:
~/Downloads/cap_fx3/<tNN_name>/— index.html (bg: scene-reaction + apex setpiece), rail.html (fg alpha: body + furniture + front fx), postfx.json, final_fx.mp4 + strip.png (ground truth of how it should look). - Engine:
scripts/make-theme.cjs— read the header + the existing paradigms (rail/panel/poem/takeover) and setpieces (detonation/decode/drawon/assembly/
Process
- DECOMPOSE the demo: body paradigm? body entrance/exit verbs? hero setpiece? front fx? plate budget? linkages? Map each piece to an existing registry entry or mark it NEW.
- EXTEND the engine for the NEW pieces only — port the demo's GSAP logic into
generator functions, parameterized (sizes, colors, counts, seeds become DNA
params). Registries stay generic: paradigms/setpieces are the unit of code,
the DNA json is the unit of identity. Match the file's existing code style.
node --check scripts/make-theme.cjsafter every edit. - WRITE
themes/<name>.json(drop the tNN_ prefix). voice/when/register/fonts/ palette/body/hero/fx/plate/linkages — follow anchor.json + ordnance.json shape. - VERIFY on the rooftop fixture:
- scaffold:
mkdir ~/Downloads/port_<name>+ symlink source.mp4 / frames_fg / frames_bg + cp matte.fps transcript.json safe-zones.json from~/Downloads/cap_multi/rooftop/(frames_bg from~/Downloads/cap_fx/_frames_bg). - theme.json: same lines/hero the demo used (read its rail.html data).
node scripts/make-theme.cjs <dir>→preview-frames.cjs <dir> <4 key times>→ READ the previews; compare against the demo's strip.png. Iterate ≤3 rounds.- full render:
bash scripts/render-theme.sh <dir>→ extract a 12-frame strip around the apex → view → compare to the demo strip. Small deviations OK, note them; the THEME must read identically at a glance.
- scaffold:
- REGRESSION: recompile one prior theme project (e.g.
~/Downloads/cap_anchor, plus the previous port in this batch) — make-theme must still compile and a 2-frame preview must look unchanged. - REGISTER: add the identity row to CATALOG.md (voice/when/needs, author → make-theme) and a line in themes/README.md if it has one.
Hard rules
- The CONTRACT.md disciplines apply verbatim (determinism, physics doctrine,
body stability, apex-owns-frame, equal-length keyframes, fonts whitelist,
≤ DUR scheduling):
~/Downloads/cap_fx3/CONTRACT.md. - Never edit existing setpieces'/paradigms' behavior unless fixing a bug — existing themes must not change appearance.
- Do NOT commit; the orchestrator reviews and commits per batch.