tools: scriptc surface-manifest diff and service-capability gate - #328
Merged
Conversation
- Add surface_manifest_diff.mjs: mechanical diff of two scriptc surface manifests keyed by stable entry ids — flips to static (with the staging-transform/caveat retirements each flip makes due), tier regressions, easings, added/removed entries, SC-code and semantic note changes; human-readable and --json output. - Add gen_service_surface.mjs: generate the author-facing service compile-surface reference (skill-data/ts-services/references/ service-surface.md) byte-derived from the pinned compiler's manifest, plus a --check mode that fails on a stale or hand-edited reference, a manifest/pin version mismatch, any hand-written SC-code claim in docs/skills/skill-data prose, or a compiler version literal that does not match the pin. - Wire the check into scripts/gate.sh as the surface-claims step: fast tier when docs/, skills/, skill-data/, or packages/core/ change; always in full. - Point skill-data/ts-services/SKILL.md at the generated reference and cover the tooling in packages/core/test/surface_tools.test.ts.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Adds tooling that turns scriptc compiler upgrades into a mechanical, checkable step instead of a hand audit.
packages/core/scripts/surface_manifest_diff.mjsdiffs two surface manifests by stable id: entries flipped to static, tier regressions, new entries, and semantic-note changes, with a--jsonmode. Accepts a manifest path, directory,pinned, or an installed version; stays offline. A watched set of author-facing gaps (default exports, namespace imports, re-exports, destructuring, async/await, generators,typeof, spread arguments) gets an explicit call-out when one flips, since each flip retires a documented caveat. Run against 0.0.22 → 0.0.26 it reports 7 flips to static, 27 new entries, 0 regressions.packages/core/scripts/gen_service_surface.mjsgeneratesskill-data/ts-services/references/service-surface.md— the author-facing "what services can use" tables — byte-derived from the pinned manifest, and its--checkmode fails when the generated reference is stale, the installed manifest doesn't match the pin, or any hand-written SC-code or compiler-version claim appears in docs/skills prose outside the generated file. Capability facts are generated or gated, never remembered.scripts/gate.shgains asurface-claimsstep (<1s; fast tier runs it only when docs/skills/package paths changed).scripts/gate.sh fastgreen across zig-test, zig-validate, ts-services suites, and the new step.