Skip to content

phase2-onboarding: adopt Phase 0 contract for tree-sitter-m#4

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

phase2-onboarding: adopt Phase 0 contract for tree-sitter-m#4
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. 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

Surface Contents
AGENTS.md Canonical agent guidance (renamed from CLAUDE.md, symlinked back). Frontmatter refreshed (github: rafael5 → m-dev-tools, location: ~/projects → ~/m-dev-tools). Five Phase-0 sections (Setup/Test/Build/Verify/Guardrails) appended.
dist/repo.meta.json Phase-0 contract. Exposes 3 already-committed, tree-sitter-generated artefacts under src/: node-types.json, grammar.json, grammar-metadata.json. License AGPL-3.0. Consumes tool:m-standard.
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.
Makefile Three new targets: manifest (informational no-op — payloads are tree-sitter-generated), check-manifest, check-docs-prose.
.github/workflows/ci.yml Two new steps in the existing grammar job: "Phase-0 manifest contract gate" + "docs/ prose-only gate", placed next to the existing parser-drift gate.
.gitignore dist/* ignored except !dist/repo.meta.json (same pattern m-standard used during Phase 0).

Verification (all green)

  • make manifest — informational pointer prints the regen commands
  • make check-manifest — manifest valid + all 3 exposes.* paths present ✓
  • make check-docs-prosedocs/ holds only prose ✓
  • Canonical Track-A validator (.github/profile/build/validate-repo-meta.py) — OK: dist/repo.meta.json

Phase 1 hook

Once .github ships build-catalog.py (Phase-1 Track B) and adds tree-sitter-m to its TIER_2 list, the org catalog picks up the manifest automatically.

Test plan

  • All local gates green
  • Canonical Track-A validator green
  • dist/repo.meta.json actually tracked in git (caught the silent .gitignore drop in commit `ade59d6`)
  • CI green on this PR (grammar job's two new steps + existing parser/lib/coverage checks)

rafael5 added 2 commits May 10, 2026 21:55
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.
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