# CLSA - one command entry points. # POSIX shell assumptions (Git Bash on Windows, sh in Docker). PY ?= python export PYTHONPATH := src # AI-use statement option: a = results only, b = + drafting, c = + drafting and # code, d = Elsevier template. Choose with `make statement N=b`. N ?= a .PHONY: help setup bench train experiments figures test reproduce tier1 tier2 tier3 clean statement paper publish submission help: @echo "make setup install pinned dependencies" @echo "make bench build PreAct-Bench and audit it" @echo "make train harvest activations and train all artefacts" @echo "make experiments run E1-E9, write results/INDEX.md" @echo "make figures regenerate all figures from results/" @echo "make reproduce bench + train + experiments + figures (one command)" @echo "make test run the test suite" @echo "make tier1|tier2|tier3 standalone smoke tests for each adoption tier" @echo "make statement N=a|b|c|d choose the AI-use wording, then make paper" @echo "make paper rebuild paper/main.pdf" @echo "make publish upload benchmark + artefacts to Hugging Face" @echo "make submission build paper/dist/clsa-aij-submission.zip" setup: $(PY) -m pip install -r requirements.txt bench: $(PY) -m clsa.envs.bench_build $(PY) -m clsa.envs.bench_io $(PY) -m clsa.envs.supplementary train: $(PY) experiments/harvest.py --model primary $(PY) experiments/train_all.py --model primary # Secondary backbone uses a reduced, stratified harvest (eval + probe_train). $(PY) experiments/harvest.py --model secondary --limit 200 $(PY) experiments/train_all.py --model secondary experiments: $(PY) experiments/run_all.py figures: $(PY) experiments/build_figures.py reproduce: $(MAKE) bench $(MAKE) experiments $(MAKE) figures $(PY) experiments/check_numbers.py statement: @case "$(N)" in \ a) f=option_a_results_only.tex ;; \ b) f=option_b_drafting.tex ;; \ c) f=option_c_drafting_and_code.tex ;; \ d) f=option_d_elsevier_template.tex ;; \ *) echo "N must be a, b, c or d"; exit 1 ;; \ esac; \ cp paper/ai_statements/$$f paper/ai_statement.tex; \ echo "AI statement -> $$f" paper: cd paper && pdflatex -interaction=nonstopmode main.tex > /dev/null \ && bibtex main > /dev/null \ && pdflatex -interaction=nonstopmode main.tex > /dev/null \ && pdflatex -interaction=nonstopmode main.tex > /dev/null \ && echo "paper/main.pdf rebuilt" publish: $(PY) hf/publish.py submission: paper $(PY) paper/build_submission.py test: $(PY) -m pytest tests -q tier1: $(PY) tiers/tier1_dropin_monitor/test_tier1.py tier2: $(PY) tiers/tier2_world_controller/test_tier2.py tier3: $(PY) tiers/tier3_full_clsa/test_tier3.py clean: rm -rf results/*.json results/INDEX.md figures/*.pdf figures/*.png data/activations data/derived