Skip to content

phase2-onboarding: adopt Phase 0 contract for m-stdlib-vscode#2

Merged
rafael5 merged 2 commits into
mainfrom
phase2-onboarding
May 11, 2026
Merged

phase2-onboarding: adopt Phase 0 contract for m-stdlib-vscode#2
rafael5 merged 2 commits into
mainfrom
phase2-onboarding

Conversation

@rafael5
Copy link
Copy Markdown
Collaborator

@rafael5 rafael5 commented May 11, 2026

Summary

Tier-2 onboarding per AI-discoverability-plan.md §3.4 and phase1-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

Surface Contents
AGENTS.md Authored from scratch. Frontmatter declares the extension's marketplace id, manifest-discovery contract, the m-stdlib upstream dependency, and the sibling-extension relationship with tree-sitter-m-vscode. Five Phase-0 sections present (Setup / Test / Build / Verify / Guardrails). CLAUDE.md symlinked to it.
dist/extension-info.json Hand-authored mirror of package.json — name, publisher, version (0.2.0), license, marketplace_id (rafael5.m-stdlib-vscode), engines (vscode ^1.85.0), the four m-stdlib.* settings keys, the four-step manifest_discovery_order, snippets_path. Sorted keys, 2-space indent, trailing newline.
dist/repo.meta.json Phase-0 contract entry. Exposes extension_info (dist/extension-info.json) + package_json (package.json). consumes: ["tool:m-stdlib"]. License MIT. verification_commands: ["make check-manifest"].
tools/check-manifest.py Stdlib-only validator — verbatim copy of the one in tree-sitter-m + m-test-engine.
Makefile New. Three targets: manifest (informational — dist files are hand-authored, not regenerated), check-manifest, check-docs-prose.
.github/workflows/ci.yml This repo's first CI workflow. Phase-0 manifest + docs-prose gates run before npm install so a broken manifest fails fast without spinning up Node; then npm ci + npm test + npm run compile.

Verification (all green locally)

  • make check-manifestdist/repo.meta.json valid; all exposes.* present ✓
  • make check-docs-proseno docs/ directory ✓
  • Canonical Track-A validator (.github/profile/build/validate-repo-meta.py) → OK: dist/repo.meta.json

Design notes

  • Hand-authored dist/extension-info.json (not generated). The values it mirrors (version, publisher, engine pin, settings schema, marketplace id) live in package.json. Generating would mean parsing package.json to 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 for dist/lifecycle.json.
  • m-stdlib has architectural priority over m-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.
  • Manifest-discovery order is contract. The four-step order (setting → $M_CLI_MANIFEST → workspace walk-up → bundled assets) is referenced by m-stdlib's docs and by m-cli's --manifest flag story. Reordering = breaking change. Captured in AGENTS.md § Guardrails and pinned in dist/extension-info.json.
  • Manifest gate before npm install. Cheaper to fail in 100ms on malformed JSON than to wait for npm ci + tsc. The CI ordering reflects this.

Surprises

  • None on .gitignore — unlike the sibling tree-sitter-m-vscode case the planning doc warned about, this repo's .gitignore does not ignore dist/. It only ignores node_modules/, out/, *.vsix, .vscode-test/, *.tsbuildinfo, .DS_Store. So no !dist/repo.meta.json / !dist/extension-info.json exception lines were needed.
  • The repo already has a remote branch origin/docs/readme-refresh carrying an unrelated v0.1 → v0.2 Status-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

  • All local gates green
  • Canonical Track-A validator green
  • CI green on this PR (manifest + docs-prose gates run before npm ci, then npm test + npm run compile)

rafael5 and others added 2 commits May 10, 2026 23:00
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>
@rafael5 rafael5 merged commit e92f660 into main May 11, 2026
1 check passed
@rafael5 rafael5 deleted the phase2-onboarding branch May 11, 2026 03:02
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