clay-borg/Makefile
tegwick 27016af216 Add the AM-1 rule-coverage gate
make coverage compares the GR-rule IDs defined in specs/GroundRules.md
against the covers: lists in scenarios/ground/*.yaml. It exits 1 if a
scenario claims a rule the spec does not define, so coverage cannot be
inflated by an invented ID, and exits 2 while rules remain uncovered.

Current reading: 34/58 (58%). AM-1 requires 100%.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 02:23:38 +02:00

38 lines
1.1 KiB
Makefile

# One command surface (InnerLoop §agentic-efficiency #3). Deterministic,
# greppable output; precursor of the `cb` CLI.
CARGO := cargo
.PHONY: check test sim bench deps loc all
## fmt + clippy (deny warnings) + HashMap deny-lint
check:
$(CARGO) fmt --all --check
$(CARGO) clippy --workspace --all-targets -- -D warnings
## unit + scenario-format tests
test:
$(CARGO) test --workspace
## run all GROUND scenarios through cb-sim
coverage:
python3 tools/rule-coverage.py
sim:
$(CARGO) run -q -p cb-sim -- scenarios/ground/*.yaml
## Criterion benches (AM-6/AM-7 wiring)
bench:
$(CARGO) bench -p games-ground
## AM-4: transitive crate count (excludes dev/build deps)
deps:
@$(CARGO) tree --workspace -e normal --prefix none | sed 's/ (\*)//' | sort -u | grep -vE '^(cb-|games-|cb_|$$)' | tee /dev/stderr | wc -l
## AM-2/AM-3 input: source LOC per crate (excludes tests would need tokei)
loc:
@for d in crates/cb-kernel crates/cb-events crates/cb-game-runtime games/ground tools/cb-sim; do \
printf '%-28s %s\n' $$d "$$(find $$d/src -name '*.rs' | xargs cat | grep -vcE '^\s*(//|$$)')"; \
done
all: check test sim