PYTHON ?= python3
CANON_CLI = PYTHONPATH=src:$(BENCH_SOURCE) $(PYTHON) -m info_tech_canon
# Optional development source override; installed distributions need no override.
BENCH_SOURCE ?= ../infospace-bench/src

.PHONY: validate index tree agent-briefs test

validate:
	$(CANON_CLI) validate --write infospace/validation/latest.json

index:
	$(CANON_CLI) index

tree:
	$(CANON_CLI) tree

agent-briefs:
	$(CANON_CLI) agent-briefs

test:
	$(PYTHON) -m pytest

.PHONY: check-generated refresh check
check-generated:
	$(CANON_CLI) check-generated

refresh: index tree agent-briefs

check: test check-generated
	$(CANON_CLI) validate
	$(CANON_CLI) profile validate small-saas
