phase2-onboarding: adopt Phase 0 contract for tree-sitter-m#4
Merged
Conversation
Tier-2 onboarding per .github/docs/AI-discoverability-plan.md §3.4
and phase1-plan.md §9. tree-sitter-m now ships the same machine-
readable surface as the tier-1 repos.
What landed:
- AGENTS.md adopted as canonical (renamed from CLAUDE.md, symlinked
back). Frontmatter refreshed (github: rafael5 → m-dev-tools;
location: ~/projects → ~/m-dev-tools). The five Phase-0 required
sections (Setup / Test / Build / Verify / Guardrails) appended;
existing project context preserved verbatim.
- dist/repo.meta.json — Phase-0 contract. $schema points at the
org-level repo.meta.schema.json. exposes three already-committed
tree-sitter-generated artefacts:
- node_types → src/node-types.json (90 AST node entries)
- grammar → src/grammar.json (full tree-sitter grammar)
- grammar_metadata → src/grammar-metadata.json (m-standard-pinned)
Consumes m-standard (build-time data input). License AGPL-3.0.
- Makefile — three new targets:
- manifest no-op pointer (artifacts are tree-sitter-generated)
- check-manifest → tools/check-manifest.py
- check-docs-prose cross-repo prose-only gate
- tools/check-manifest.py — stdlib-only validator. Parses the
manifest, asserts required fields, asserts each exposes.* path
exists. Optional full jsonschema validation when the lib is
available + the canonical schema URL is reachable.
- .github/workflows/ci.yml — two new steps in the existing `grammar`
job: "Phase-0 manifest contract gate" + "docs/ prose-only gate".
Sits next to the existing parser-drift gate, same conceptual layer.
Verification, all green:
- make manifest informational pointer
- make check-manifest ✓ (manifest valid + all 3 paths present)
- make check-docs-prose ✓ (docs/ has only .md prose)
- canonical Track-A validator OK: dist/repo.meta.json
Once .github ships build-catalog.py (Phase-1 Track B) and adds
tree-sitter-m to its TIER_2 list, this repo's manifest will be picked
up by the org catalog automatically.
dist/ is ignored at line 20 for Python artifacts; the manifest got silently dropped from the previous commit. Adds a !dist/repo.meta.json exception so the Phase-0 contract file lands in git (the org catalog fetches it by raw URL). Same pattern m-standard used during its Phase-0 onboarding.
3 tasks
This was referenced May 11, 2026
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. tree-sitter-m now ships the same machine-readable surface as the tier-1 repos.Follows the pattern shipped in m-modern-corpus PR #2.
What landed
AGENTS.mdgithub: rafael5 → m-dev-tools,location: ~/projects → ~/m-dev-tools). Five Phase-0 sections (Setup/Test/Build/Verify/Guardrails) appended.dist/repo.meta.jsonsrc/:node-types.json,grammar.json,grammar-metadata.json. LicenseAGPL-3.0. Consumestool:m-standard.tools/check-manifest.pyexposes.*path exists. Optional fulljsonschemavalidation when the lib is available.Makefilemanifest(informational no-op — payloads are tree-sitter-generated),check-manifest,check-docs-prose..github/workflows/ci.ymlgrammarjob: "Phase-0 manifest contract gate" + "docs/ prose-only gate", placed next to the existing parser-drift gate..gitignoredist/*ignored except!dist/repo.meta.json(same pattern m-standard used during Phase 0).Verification (all green)
make manifest— informational pointer prints the regen commandsmake check-manifest— manifest valid + all 3exposes.*paths present ✓make check-docs-prose—docs/holds only prose ✓.github/profile/build/validate-repo-meta.py) —OK: dist/repo.meta.jsonPhase 1 hook
Once
.githubshipsbuild-catalog.py(Phase-1 Track B) and addstree-sitter-mto itsTIER_2list, the org catalog picks up the manifest automatically.Test plan
dist/repo.meta.jsonactually tracked in git (caught the silent.gitignoredrop in commit `ade59d6`)