feat(skills): wire HyperFrames as a video provider#43
Merged
Conversation
Add hyperframes (https://github.com/wesleysimplicio/hyperframes), an HTML→MP4 local renderer, as a first-class video provider following the three-step "Adding a Provider" contract in CLAUDE.md. Lets the engine emit deterministic, parametrized motion typography, data-viz reels, and programmatic shorts re-renderable from declared variables — no API charge per re-render. - skills: add .skills/hyperframes (authoring), .skills/hyperframes-cli (lint/inspect/render dev loop), .skills/hyperframes-prompt-builder (specialist invoked by video-prompt-builder when the matrix resolves to hyperframes); update video-prompt-builder dispatcher. - routing: add motion-typography, data-viz-reel, programmatic-short to VideoTask, EMBEDDED_DEFAULTS, TASK_LABEL_MAP, and the PROVIDERS.md Video Routing table — all three default to hyperframes. - provider: add HyperframesVideoProvider (stub gated on HYPERFRAMES_ACTIVE=true) and MockHyperframesVideoProvider; register both in the real and mock registries in lib/providers/video.ts. - env: add HYPERFRAMES_ACTIVE=false to .env.example with a note about the npx hyperframes doctor preflight. - docs: update CLAUDE.md Stack table and Skills Available list; checkpoint the change in PROGRESS.md. https://claude.ai/code/session_01H7AkCb3czV1qAwvUjPGWJC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds HyperFrames — an HTML→MP4 local renderer — as a first-class video provider, following the three-step Adding a Provider contract in
CLAUDE.md.The motor can now emit deterministic, parametrized motion typography, data-viz reels, and programmatic shorts that re-render byte-identically from declared variables (e.g. weekly KPI reel, daily price update) without re-prompting an AI generator.
What changed
Skills
.skills/hyperframes/— composition authoring rules adapted from upstream (layout-before-animation, timelines paused + registered onwindow.__timelines, noMath.random()/time-based logic, variables declared viadata-composition-variables)..skills/hyperframes-cli/— wrapsnpx hyperframeslint → inspect → render. Pipeline always renders with--strict --strict-variables..skills/hyperframes-prompt-builder/— specialist invoked byvideo-prompt-builderwhen the matrix resolves tohyperframes; loads brand tokens fromclients/<slug>/design.md, picks a template pertask_kind, and returns a composition spec + render args..skills/video-prompt-builder/SKILL.md— dispatcher now recognizes the new task kinds and the new specialist.Provider layer
lib/providers/types.ts—VideoTaskaddsmotion-typography,data-viz-reel,programmatic-short.lib/providers/video.ts— addsHyperframesVideoProvider(gated onHYPERFRAMES_ACTIVE=true) and registers it in the real registry.lib/providers/__mocks__/video.ts— addsMockHyperframesVideoProvider(DRY_RUN-safe).lib/providers/matrix.ts— extendsEMBEDDED_DEFAULTSandTASK_LABEL_MAP.Routing & docs
.specs/architecture/PROVIDERS.md— three new rows in the Video Routing table, all defaulting tohyperframeswith rationale..env.example— addsHYPERFRAMES_ACTIVE=falsewith a note about thenpx hyperframes doctorpreflight (Node ≥ 22, FFmpeg on PATH).CLAUDE.md— Stack table and Skills Available list updated.PROGRESS.md— Checkpoint 3 recorded.Routing matrix (Video) after this change
Provider-agnostic contract
hyperframesdirectly; selection flows throughPROVIDERS.md+lib/router.ts+ per-pieceprovider_override.video.DRY_RUN=truekeeps everything on the mock; only flipHYPERFRAMES_ACTIVE=trueafternpx hyperframes doctorpasses locally.Test plan
npm run typecheck(note: repo currently has a pre-existing missing-@types/nodewarning unrelated to this PR — should be fixed separately)..specs/architecture/PROVIDERS.mdvialib/providers/matrix.tsand assert the three new task kinds resolve tohyperframes(verified locally via the parser logic).task_kind: programmatic_shortresolves throughvideo-prompt-builder→hyperframes-prompt-builderand writes a mock MP4 underoutputs/.../mock-hyperframes-*.mp4.HYPERFRAMES_ACTIVE=true+npx hyperframes doctorpasses, then a real render produces an MP4 next to amanifest.json.npm run test:e2estays green.https://claude.ai/code/session_01H7AkCb3czV1qAwvUjPGWJC
Generated by Claude Code