Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,13 @@ jobs:

- name: Test with coverage
run: uv run pytest --cov --cov-report=term-missing

- name: Manifest drift gate (Phase 0 / Track D)
# Regenerates dist/commands.json, dist/lint-rules.json,
# dist/fmt-rules.json from the live argparse / Rule / FmtRule
# registries and asserts the working tree is unchanged. If a
# contributor adds a subcommand or a rule but forgets to
# `make manifest`, this step fails the build. Invokes the
# Makefile directly — its targets call `.venv/bin/m`, which
# `uv sync --frozen` populated above.
run: make check-manifest
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ __pycache__/
.env
!.env.example
*.log
/dist/
# Ignore generated dist/ contents broadly, but keep the tier-1
# AI-discoverability manifest + its derived JSON artifacts under
# version control (they are the contract surface for repo.meta.json).
/dist/*
!/dist/repo.meta.json
!/dist/commands.json
!/dist/lint-rules.json
!/dist/fmt-rules.json
/build/
*.egg-info/
.mypy_cache/
Expand Down
509 changes: 509 additions & 0 deletions AGENTS.md

Large diffs are not rendered by default.

456 changes: 0 additions & 456 deletions CLAUDE.md

This file was deleted.

1 change: 1 addition & 0 deletions CLAUDE.md
41 changes: 40 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
.PHONY: install test test-lf watch lint format mypy cov check lint-modern lint-modern-baseline lint-modern-setup push pull hooks seed unseed test-vista engine-up engine-down engine-status
.PHONY: install test test-lf watch lint format mypy cov check lint-modern lint-modern-baseline lint-modern-setup push pull hooks seed unseed test-vista engine-up engine-down engine-status manifest check-manifest

PYTHON := .venv/bin/python
PYTEST := .venv/bin/pytest
PTW := .venv/bin/ptw
RUFF := .venv/bin/ruff
MYPY := .venv/bin/mypy
M := .venv/bin/m
PRECOMMIT := .venv/bin/pre-commit

# Sources that drive each generated dist artifact. The capabilities tree
# is built from every `cli.py` under src/m_cli/ (one per subcommand
# package, plus the dispatcher itself), so any change there should
# regenerate dist/commands.json.
CLI_SOURCES := $(shell find src/m_cli -name cli.py -type f) src/m_cli/cli.py
LINT_SOURCES := $(shell find src/m_cli/lint -name '*.py' -type f) src/m_cli/lint/list_rules.py
FMT_SOURCES := $(shell find src/m_cli/fmt -name '*.py' -type f)

# Default corpus for whole-corpus validation gates (round-trip, canonical,
# lint). Override per-invocation: `make vista CORPUS=/path/to/other/corpus`,
# or via environment: `CORPUS=... make vista`. Defaults to the in-org
Expand Down Expand Up @@ -79,6 +88,36 @@ lint-modern-setup:

check: lint mypy cov

# ── Tier-1 manifest artifacts (Phase 0 / Track D) ────────────────────
#
# `make manifest` regenerates every machine-readable view exposed by
# dist/repo.meta.json. Each artifact is derived from a live registry —
# capabilities from the argparse parser tree, lint-rules / fmt-rules
# from the in-process Rule / FmtRule registries — so there is nothing
# to hand-curate.
#
# `make check-manifest` is the drift gate: it regenerates everything
# and asserts the working tree is clean. CI runs this on every push.

dist/commands.json: $(CLI_SOURCES)
@mkdir -p dist
$(M) capabilities --json > $@

dist/lint-rules.json: $(LINT_SOURCES)
@mkdir -p dist
$(M) lint --list-rules --json > $@

dist/fmt-rules.json: $(FMT_SOURCES)
@mkdir -p dist
$(M) fmt --list-rules --json > $@

manifest: dist/commands.json dist/lint-rules.json dist/fmt-rules.json

check-manifest: manifest
git diff --exit-code dist/



pull:
git pull origin main

Expand Down
Loading
Loading