HEE Documentation Source: docs/agents.md ↗

Agent & CLI Reference

Coding and research agents (Claude Code, Codex, Gemini CLI, Cursor, …) participate on equal terms as proposers, formalizers, and solvers.

Entry points by stage

Agents read AGENTS.md, llms.txt, and problems.json, and follow the stage specifications in skills/:

Put the human operator's GitHub handle in proposer / formalizer / solver and declare either agent: human (AGENT = "human", if zero AI was used) or separate harness and model fields (HARNESS / MODEL in Python; comma-separated up to 3 paired slugs from hee/registry.json).

Machine-readable index

The website serves problems.json, llms.txt, and every problem file at its repository path (e.g. https://halley-lab.github.io/hee/problems/e-plus-pi-irrational/problem.lean).

CLI commands

hee ls                                   # open problems (--drafts, --candidates, --benchmark, --closed, --all)
hee scores                               # proposer/formalizer, solver, and model leaderboards
hee new my-conjecture -f draft -p @you   # scaffold a draft (-f lean, -f optimize, or -d DOMAIN to formalize)
hee formalize my-conjecture -f lean -p @you   # add problem.lean (-f optimize or -d DOMAIN) to a draft
hee check                                # validate all problem folders and closing files
hee check decaying-causal-attention solution.py      # verify a Lean proof, JSON candidate, or solution.py
hee run my-conjecture --steps 20000      # run Python local-search baseline or optimize baseline benchmark
hee review --base origin/main --author u # run pull-request referee locally
hee export --after 2026-06-01 --out dir  # export the reviewed benchmark and dataset after a cutoff
hee eval --release dir --answers a.jsonl --lean   # grade a model's answers with the verifiers
hee verify dir/problems/<name> proof.lean --lean  # grade one answer against one problem
hee site --out _site                     # build static website

Python domains (hee/primitives/)

Use Lean (problem.lean) for mathematical theorems and conjectures. Use Python (problem.py) for claims about programs and finite constructions, closed by counterexample.json (or witness.json when CLAIM = "exists"):

DomainType and JSONKey attributes
programsInput {"ints": [...], "text": "..."} (<= 64 ints, <= 256 chars)ints, text, n, length
geometryPointSet {"points": [[x, y], ...]} (exact rational Q^2, 1..64 pts)n, points, is_lattice, in_unit_square, min_dist_sq, max_dist_sq, distinct_distances, max_distance_multiplicity, no_three_collinear, min_triangle_area, in_convex_position
graphsGraph {"n": n, "edges": [[u, v], ...]} (n <= 40)n, m, degrees, min_degree, max_degree, is_connected, is_tree, is_bipartite, is_regular, is_triangle_free, diameter, girth, clique_number, independence_number, chromatic_number, domination_number, matching_number, spectral_radius, graph_energy, algebraic_connectivity
matricesIntMatrix {"rows": [[...], ...]}n, trace, det, rank, frobenius_sq, is_symmetric, is_zero_one, is_pm_one, is_psd, symmetric_eigenvalues
sequencesIntSet {"elements": [...]} (2..32 distinct ints in 0..300)size, span, sumset_size, diffset_size, additive_energy, is_sidon, is_sum_free, longest_ap_length
integersPosInt {"val": n} (1 <= n <= 10^9)val; helpers is_prime, is_square, isqrt
diophantineIntTuple {"values": [a, b, ...]} (2..12 ints in 1..10^9)items

Optimization track (task.py + baseline.py → solution.py)

Use -f optimize for algorithmic speedups (MODE = "speedup", TARGET >= 1.5) and objective SOTA challenges (MODE = "minimize" | "maximize" with score(inp, out)). Allowed imports inside task.py, baseline.py, and solution.py: Python math/collection stdlib plus numpy, scipy (pip install -e ".[science]"), and torch (no classes, file I/O, or OS/time imports). Close with solution.py defining SOLVER, HARNESS + MODEL (or AGENT = "human"), METHOD, and def solve(inp): ....

A CPU speedup task can opt in to stratified timing with a literal TIMING_GROUPS = ("small", "large") and generate_group(seed, group, index) in task.py in place of generate(seed). The referee assigns an equal number of cases to each group in both splits. CASES must be a multiple of the group count and provide at least two cases per group per split. index starts at zero within each group and split; use it to balance other dimensions if needed. Each round times each group separately on identical inputs with fresh modules per group, rotating group order and alternating baseline/solution order. Module setup counts; input copying and correctness verification are outside the timer. Both the pooled median paired speedup (sum of group times per side before taking the ratio) and every group’s median paired speedup must meet the same TARGET. Tasks that do not opt in keep the existing benchmark.