Glossary · CLAUDE.md

CLAUDE.md.

Claude Code's standing orders.

The short answer

CLAUDE.md is the auto-loaded instruction file Claude Code reads at session start and preserves across compaction: project rules, architecture notes, commands.

Read the full answer

Treat it like code (versioned, reviewed, tested by observing behavior shifts) and keep it short, since bloated files get ignored and every line re-bills each turn. Durable facts live here; accumulating session knowledge belongs in a memory layer, not a growing markdown file.

CLAUDE.md, working

Session 1 asks. Session 47 already knows.

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.

In Anvaya

How we implement it.

CLAUDE.mdAnvaya respects CLAUDE.md as the Write layer and adds the memory layer beneath: weighted, decaying, drift-checked nodes served under budget.

Questions

Asked about CLAUDE.md.

How long should CLAUDE.md be?

As short as honesty allows: only non-inferable constraints. If it exceeds a page, move workflows to on-demand skills and history to memory.

Why do agents ignore long instruction files?

Attention dilution plus lost-in-the-middle: rules sandwiched between file dumps read as background noise. Front-load, repeat critical constraints at the end.

Does it survive compaction?

Yes, auto-loaded files persist across compaction, unlike one-off prompts. Another reason to keep them curated.

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.