Skip to content

tools: scriptc surface-manifest diff and service-capability gate - #328

Merged
ctate merged 7 commits into
mainfrom
scriptc-manifest-tooling
Aug 12, 2026
Merged

tools: scriptc surface-manifest diff and service-capability gate#328
ctate merged 7 commits into
mainfrom
scriptc-manifest-tooling

Conversation

@ctate

@ctate ctate commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Adds tooling that turns scriptc compiler upgrades into a mechanical, checkable step instead of a hand audit.

  • packages/core/scripts/surface_manifest_diff.mjs diffs two surface manifests by stable id: entries flipped to static, tier regressions, new entries, and semantic-note changes, with a --json mode. 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.mjs generates skill-data/ts-services/references/service-surface.md — the author-facing "what services can use" tables — byte-derived from the pinned manifest, and its --check mode 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.sh gains a surface-claims step (<1s; fast tier runs it only when docs/skills/package paths changed).
  • 4 tests cover diff categorization, schema-version refusal, the empty diff, and that the committed reference passes the check.

scripts/gate.sh fast green across zig-test, zig-validate, ts-services suites, and the new step.

- 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.
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
native-sdk Ready Ready Preview Aug 12, 2026 2:01pm

@ctate
ctate merged commit ed84e35 into main Aug 12, 2026
28 checks passed
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