Skip to content

Add get_motion_recipe (on-demand recipes + 13 looks) and validator self-review - #24

Merged
jasp402 merged 3 commits into
mainfrom
feat/motion-recipes
Oct 25, 2026
Merged

jasp402 merged 3 commits into
mainfrom
feat/motion-recipes

Conversation

@jasp402

@jasp402 jasp402 commented Oct 25, 2026

Copy link
Copy Markdown
Owner

What

One new on-demand tool in the existing connector (no second connector or endpoint; the 4 publishing tools are untouched): get_motion_recipe(name?), plus a self-review step in validate_json.

  • get_motion_recipe() returns an index (~240 tokens). With a name it returns a recipe built from a composition fragment that is the same JSON shown to the model: riso, choreography, audio, camera, code-texture, ui-mockup, scene-bg, looks (13 looks in one table) and look:<id> ×13 (ported from Studio lookSample, contract c75a0b3). Plain-text result, no outputSchema. Useful content arrives in tool results, not in initialize.instructions, so it works with the connector alone on claude.ai Free.
  • Validator: kf-text TEXT_DOES_NOT_FIT false positive fixed (measures every value); TEXT_OVERLAP; UNKNOWN_EASE (kf ease, kf spring mode, animEase); TEXT_FIT_UNEVALUATED for expression text.
  • A short checklist is added to validate_json / create_hcmotion results only when the composition is valid / created (never next to errors).
  • get_capabilities START has one line pointing to get_motion_recipe; SKILL.md has one added line (header unchanged).

Tokens (tiktoken cl100k, an estimate; Claude's tokenizer counts a bit higher)

  • Fixed load (tool descriptions + schemas + initialize.instructions + SKILL.md header): 3706 → 3844 (+138, ceiling +150).
  • On demand: index 239; recipes 537–1191 each (audio 537, camera 595, scene-bg 602, code-texture 641, choreography 712, ui-mockup 807, looks 836, riso 1191); look: 638–945; checklist 134 per valid result. Most recipes exceed the 150–600 target: they carry real JSON/HTML, and I did not cut tested content to hit a number.

Validation

  • tests/recipes.test.js: every recipe fragment passes validateJson (0 errors, 0 warnings other than CONTRACT_NOT_CHECKED) and the text contains the tested JSON. npm test: 122 pass, 0 fail.
  • Rendered in the Studio (dev server): 20 compositions, no page errors. Studio-side checkComposition clean on all; normalizeAudio on the audio recipe: 3 tracks and 4 sfx kept, 0 warnings.
  • Gallery sweep (39 templates): 0 TEXT_OVERLAP, 0 UNKNOWN_EASE.

Not verified / risks

  • Audio was checked structurally only (nobody listened).
  • TEXT_OVERLAP does not measure flow/flex/CSS-class html pieces: it missed the overlaps in the A experiment.
  • src/looks.js is a copy of the Studio looks; it needs a refresh when they change.
  • Real claude.ai behaviour was not tested.

…e, ui-mockup, scene-bg, 13 looks), TEXT_OVERLAP, UNKNOWN_EASE, review checklist, kf-text fit fix
@vercel

vercel Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hypercodemotion-mcp-service Ready Ready Preview Oct 25, 2026 4:34am UTC

@jasp402
jasp402 merged commit 142bdb6 into main Oct 25, 2026
4 checks passed
@jasp402
jasp402 deleted the feat/motion-recipes branch October 25, 2026 04:41

This branch was successfully deployed

1 active deployment
Preview — 72031d81 Deployed Oct 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant