Docs · Instruction Files (AGENTS.md, CLAUDE.md)

Instruction Files (AGENTS.md, CLAUDE.md).

Standing orders, kept short.

The short answer

Keep one cross-tool AGENTS.md plus tool natives (CLAUDE.md, .cursor/rules, copilot-instructions) thin: stack + versions, test/lint/build commands, non-obvious conventions, hard constraints. Everything the agent can infer from code stays out. Measured payoff for well-scoped files: ~29% faster PR tasks, ~17% fewer output tokens.

Instruction Files (AGENTS.md, CLAUDE.md)

Rules

Only the non-inferableIf the agent can read it from the tree, don't write it. Files carry what code can't say: why, never-dos, environment quirks.
Scope by locationRoot holds universal truths; packages hold specifics (nested AGENTS.md merge, specific-wins). Cursor rules scope by glob so agents load only their package.
Version like codePR-reviewed, diff-visible, pruned when behavior drifts. Test changes by watching the agent, not by hoping.
History goes to memoryDecisions, bug trails, and patterns belong in the Mind graph (weighted, decaying, drift-checked), not in a markdown file growing toward rot.

Beyond the instruction file

AGENTS.md is what you wrote down. Experience is what you did not.

The same request twice: first the agent explores, later the Mind serves what earlier sessions settled.

anv · session replayillustrative
  1. add a --json flag to `ledger export`
  2. grep "export" src/: ok, 14 matches
  3. read_file src/main.rs: ok, 212 lines
  4. read_file src/cli/mod.rs: ok, 148 lines
  5. read_file src/export/csv.rs: ok, 96 lines
  6. Formats implement Render. Adding a Json renderer beside csv.
  7. rewrite_file src/export/json.rs: ok, +38
  8. edit_file src/cli/mod.rs: ok, +6
  9. run_command cargo test -p ledger: failed, E0432 unresolved import serde_json
  10. serde_json is optional in Cargo.toml, behind the json feature.
  11. run_command cargo test -p ledger --features json: ok, 42 passed
  12. done · 8 tool calls · 1 failed run
Illustrative transcript; each recalled weight uses its kind's shipped decay rate at the age shown.

Questions

Asked about Instruction Files (AGENTS.md, CLAUDE.md).

AGENTS.md or CLAUDE.md?

Both if you use Claude Code heavily; converge on AGENTS.md as the cross-tool base with CLAUDE.md for Claude-specific extras.

How long is too long?

Past a page, split: workflows move to on-demand skills, history moves to memory. Bloated files get ignored and re-bill every turn.

Who owns the file?

The team, in PRs. Convention changes are diffs, not chat messages: ContextOps, not folklore.

Run agents that fit on your laptop.

23.4 MB median own-process memory, measured across 1030 runs (994 verified) and fourteen harnesses. One command installs the harness and the Mind together. Nothing leaves your machine on the Ollama path.

Developer beta. macOS on Apple Silicon and Linux on x86_64 or arm64. Memory figure: --no-mind, macOS/ARM, n=3 per cell. Pre-1.0, pricing not set.