agentleFS
charlesmsiegelcharlesmsiegel/hardy/AGENTS.md

hardy

AGENTS.md2 starsChanged 2 months agoApache-2.0View on GitHub

This file is the contract for any coding agent working in this repository. It applies whatever model or harness is driving the session; CLAUDE.md points here and adds nothing. 1. README.md, for what Hardy is and what it refuses to claim. 2. the architecture overview, the trust boundary, and the output contract, for the rules every change must keep. 3. the reference pages for what the commands, settings, and artifacts are today. The reference pages are tested against the code;…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 33,315 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository2 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never describe them as safe.

    line 63
  2. Distinctive:

    Prefer the shortest vertical slice that tests a design assumption.

    line 65
  3. Distinctive:

    When code is introduced, add the smallest tests and commands that reproduce the experiment.

    line 68
  4. Very specific:

    Add every new page under docs/ to the documentation map.

    line 76
  5. Distinctive:

    Never make a code change on the corpus branch:

    line 88

≈ “Common” is an estimate: at least 1 in 5 of the 42,283 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Agent instructions

This file is the contract for any coding agent working in this repository. It applies whatever model or harness is driving the session; CLAUDE.md points here and adds nothing.

Read first

  1. README.md, for what Hardy is and what it refuses to claim.
  2. the architecture overview, the trust boundary, and the output contract, for the rules every change must keep.
  3. the reference pages for what the commands, settings, and artifacts are today. The reference pages are tested against the code; trust them over memory.

The decision record records what was chosen over what and why. Read the entry for an area before proposing to change it.

Working on the code

scripts/install.sh                          # full environment from a clone
uv run --extra test pytest -m "not real_toolchain and not live"
uvx ruff check src tests
uv run hardy doctor                         # what this machine is still missing

A bare pytest on a machine with a configured Lean project runs a whole-corpus real sweep; use the marker filter above. CONTRIBUTING.md describes the test tiers, coverage floor, CI, and releases.

Source ownership

Implementations live under src/hardy/agents, algebra, app, corpus, documents, evals, formal, foundation, literature, prompts and workflows. The package root holds only __init__.py, __main__.py and the cli.py, mcp_server.py, cas_driver.py entry-point shims. Import from the owning package; the former root modules are gone. src/hardy/corpus/ is code and follows the code rules; the repository-level corpus/ directory is mathematical content and follows the branch rule below.

Dependencies point one way: app to workflows to the capability packages (formal, documents, algebra, literature, corpus) to foundation, with agents, evals and prompts beside them. tests/unit/test_module_boundaries.py enforces the direction; module boundaries explains it. The interactive coordinator is workflows/interactive/session.py; record, formal save, admission, document, and turn responsibilities each have their own owner beside it, and collaborators receive named operations and snapshots, never the whole session.

Repository rules

  • The Lean kernel is the authority for formal verification. Preserve the frozen statement, audit axioms, and keep kernel verification distinct from heuristic review and document compilation.
  • Partial results are valid only when their remaining holes and assumptions are explicit. Never silently weaken or strengthen a theorem to make it pass.
  • Nothing confines generated Lean, TeX, downloaded papers, or helper processes. Never describe them as safe. Run only trusted output in disposable environments.
  • Prefer the shortest vertical slice that tests a design assumption. Do not restore milestone machinery, a container sandbox, framework abstractions, or a warm worker pool unless current evidence requires them.
  • When code is introduced, add the smallest tests and commands that reproduce the experiment. Record model, toolchain, configuration, and source identities when they can affect results.
  • Status lives only in the roadmap. Reference pages under docs/reference/ are tested against the code: when you change a command, flag, slash command, or setting, tests/unit/test_docs.py names the page to update. Design pages carry reasoning and no status markers. Planning artifacts, reports, and session notes do not belong in the tree.
  • Add every new page under docs/ to the documentation map; the same test checks it.

Branching: code on main, statements on corpus/curation

Two kinds of change live here and move at different speeds. The harness (src/, tests/, tooling, docs) is code. The corpus is mathematical content: corpus/problems/*.json, corpus/CHANGELOG.md, corpus/sources.json, corpus/tombstones.json, and corpus/EVALS.md.

main carries everything that is not corpus content. corpus/curation branches off main and carries only the statements and the measurements over them. Never make a code change on the corpus branch:

git checkout main
# edit src/, tests/, docs
git commit
git checkout corpus/curation
git rebase main

A change that is both, such as a harvest that also improves the ingestion skill, is split: the code half onto main, the statements onto the corpus branch. A corpus harvest can be tens of thousands of JSON lines; a harness change buried in one cannot be reviewed, and keeping them apart lets a code change be tested against the base corpus before the statements that exercise it exist. corpus/EVALS.md is on the corpus side even though it is generated: it reports on the active corpus. evals/ is ignored and holds no committed evidence; hardy evals baseline and hardy evals run regenerate it, as the evaluation guide describes.

Digest coupling

Two digests decide whether earlier measurements can be reused, and a rebase is exactly when the edits that move them land:

  • Editing any of the deciding sources named in src/hardy/evals/sweep.py (the sweep itself, formal/audit.py, formal/lean.py, every module in formal/syntax/, corpus/problems.py, corpus/identity.py, formal/contracts.py, foundation/process.py, and foundation/truncation.py) moves procedure_digest and makes the whole tier file non-reusable; the next sweep re-elaborates every entry.
  • Editing anything under src/hardy/ not excluded by the denylist in src/hardy/evals/identity.py moves run_procedure_digest and orphans every scoreboard on disk, so boards stop pooling and hardy evals todo reports boards_counted: 0.

Neither is a reason not to make a change. Both are reasons to batch such edits rather than trickle them, never to make one while a sweep or a run is in flight, and never to restamp old evidence with a new digest to regain reuse.

The unit tests that assert the shipped corpus's counts (tests/unit/test_evals_corpus.py, test_evals_problems.py, test_evals_viewer.py) need their own values on each branch and are hand-edited when the corpus grows; expect them red on the corpus branch between a harvest and its release.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.