test(skills): pin the catalog exemption as a capability and lint the templates list - #3838
Conversation
…templates list The two skills exempt from the catalog search were pinned only by the sentence that declares the exemption, so the exemption would go stale the day either gained a way to install a registry item. The test now also asserts neither skill contains an install command or a registry path. The templates list in the scaffold reference claimed to be lint-checked but lacked the marker that arms the check, so a misspelt template would have passed. It now carries the marker with its presets and skill names allowlisted, and a misspelt template fails the lint.
terencecho
left a comment
There was a problem hiding this comment.
APPROVE at 3b7dc6b8abb38966ca74e12105b5c5f71e871540. Test + docs follow-up that turns both #3829 follow-up notes into enforceable tripwires.
Author + head. Sole commit by miguel-heygen. 3 files, +20/-7. mergeStateStatus=BLOCKED (missing approval), mergeable=MERGEABLE.
1. Exemption inverse-invariant test (coreSkillContent.test.ts:190-207).
New helper skillTextFiles(dir) recursively enumerates every .md|.mjs|.cjs|.js|.ts|.json|.html file in a skill directory. For each of the two exempt skills (embedded-captions, talking-head-recut) the test iterates every text file and asserts:
expect(readFileSync(file, "utf8")).not.toMatch(/hyperframes add\b|registry\/(blocks|components)\//);
A planted hyperframes add or a registry/blocks/… / registry/components/… path in either exempt skill's directory now fails the test with the offending file cited. Turns the FU-2 capability claim into a load-bearing invariant.
Deliberate omission — data-composition-src is NOT in the ban regex. Miguel's comment explains: talking-head-recut mounts its own chapters with it (card-timeline chunking, not registry mount), so banning it would false-positive. Ban regex is precise, not over-broad.
The \b after add correctly ensures hyperframes address / hyperframes added don't match. The alternation with registry/(blocks|components)/ catches direct path references to registry-item paths.
2. Init-and-scaffold.md lint marker (skills/hyperframes-cli/references/init-and-scaffold.md:3).
Adds <!-- registry-items: allow=blank,landscape-4k,portrait-4k,square-4k,product-launch-video,hyperframes-core,media-use --> — covers the file's Templates list. blank (CLI-hardcoded, not a registry item) explicitly allowlisted alongside the four *-4k presets and three registry examples. A misspelt template in the file now fails the lint with file+line+id per Miguel's tripwire proof on #3829. Closes the exact doc/lint asymmetry I flagged (self-claim of "checked by lint" without the marker).
3. skills-manifest.json. Hash regenerated to match the init-and-scaffold.md change. Mechanical.
Scope. Docs + tests only. No engine/runtime/studio touch. No test removals.
Reviews at head. Empty.
CI. BLOCKED reflects the missing approval; check green-state expected to match #3829's shape (skills lane, no runtime touch).
— tai
Why
Two follow-ups from the review of #3829.
What changed
data-composition-srcis deliberately not the signal: talking-head-recut mounts its own chapters with it, which is not a registry item.registry-itemsmarker, with its size presets and skill names allowlisted as legitimate non-items.Verification
hyperframes add caption-glitch-rgbto an exempt skill's catalog doc fails the test.nyt-graphasnyt-graphsin the templates list fails the lint.