phase2-onboarding: adopt Phase 0 contract for m-stdlib-vscode#2
Merged
Conversation
Tier-2 onboarding per AI-discoverability-plan.md §3.4. This repo had no CLAUDE.md to rename — AGENTS.md is authored from scratch with the container-tier frontmatter style (kind / status / languages / distribution / exposes / consumes / companions / incompatibilities) and the five required Phase-0 sections (Setup / Test / Build / Verify / Guardrails). CLAUDE.md is a symlink. dist/extension-info.json mirrors the relevant package.json values (name, publisher, version, license, marketplace_id, engines, settings, manifest_discovery_order, snippets_path) — hand-authored, sorted keys, 2-space indent, trailing newline. dist/repo.meta.json is the Phase-0 contract entry: exposes extension_info + package_json, consumes tool:m-stdlib, verification_commands = make check-manifest, license MIT. tools/check-manifest.py is the same stdlib-only validator that landed in tree-sitter-m + m-test-engine. Makefile carries the three Phase-0 targets (manifest informational no-op, check-manifest, check-docs-prose). .github/workflows/ci.yml is this repo's first CI workflow: the Phase-0 manifest + docs-prose gates run before npm install, then npm test + npm run compile. .gitignore did not ignore dist/ — no exception line needed.
`npm test` is `tsc --noEmit && node --test --experimental-strip-types tests/*.test.ts`. Node 20 rejects --experimental-strip-types; Node 22 ships it as a recognised flag (stable since 22.6). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Tier-2 onboarding per
AI-discoverability-plan.md§3.4 andphase1-plan.md§9. This repo had no CLAUDE.md to rename — same starting state as m-test-engine PR #2 — so the AGENTS.md is authored from scratch.What landed
AGENTS.mdCLAUDE.mdsymlinked to it.dist/extension-info.jsonpackage.json— name, publisher, version (0.2.0), license, marketplace_id (rafael5.m-stdlib-vscode), engines (vscode ^1.85.0), the fourm-stdlib.*settings keys, the four-stepmanifest_discovery_order,snippets_path. Sorted keys, 2-space indent, trailing newline.dist/repo.meta.jsonextension_info(dist/extension-info.json) +package_json(package.json).consumes: ["tool:m-stdlib"]. LicenseMIT.verification_commands: ["make check-manifest"].tools/check-manifest.pyMakefilemanifest(informational — dist files are hand-authored, not regenerated),check-manifest,check-docs-prose..github/workflows/ci.ymlnpm ci+npm test+npm run compile.Verification (all green locally)
make check-manifest→dist/repo.meta.json valid; all exposes.* present ✓make check-docs-prose→no docs/ directory ✓.github/profile/build/validate-repo-meta.py) →OK: dist/repo.meta.jsonDesign notes
dist/extension-info.json(not generated). The values it mirrors (version, publisher, engine pin, settings schema, marketplace id) live inpackage.json. Generating would mean parsingpackage.jsonto emit a re-shaped subset — for a four-key settings block that ships once per release, a hand-authored mirror with an AGENTS.md guardrail ("update in the same commit") is cheaper than a generator. Same pattern m-test-engine uses fordist/lifecycle.json.m-stdlibhas architectural priority overm-stdlib-vscode. Captured in AGENTS.md § Guardrails: if a needed manifest field is missing, propose adding it to m-stdlib first; do not synthesise it client-side.$M_CLI_MANIFEST→ workspace walk-up → bundled assets) is referenced by m-stdlib's docs and by m-cli's--manifestflag story. Reordering = breaking change. Captured in AGENTS.md § Guardrails and pinned indist/extension-info.json.npm ci+ tsc. The CI ordering reflects this.Surprises
.gitignore— unlike the sibling tree-sitter-m-vscode case the planning doc warned about, this repo's.gitignoredoes not ignoredist/. It only ignoresnode_modules/,out/,*.vsix,.vscode-test/,*.tsbuildinfo,.DS_Store. So no!dist/repo.meta.json/!dist/extension-info.jsonexception lines were needed.origin/docs/readme-refreshcarrying an unrelatedv0.1 → v0.2Status-line tweak. That change is not in this PR — restored README.md to main's HEAD before staging so the diff stays scoped to the Phase-0 contract.Test plan
npm ci, thennpm test+npm run compile)