Commit 9bf1a65
committed
Docs: introduce the two-tier colocated docs convention (CLAUDE.md push tier + DETAILS.md pull tier)
Colocated `CLAUDE.md`s auto-inject into context whenever an agent reads files in their directory, so every word there costs tokens in every session touching the area; the repo carries ~206k words of them. The new contract caps the push tier at must-knows and gives depth a designated colocated home:
- `CLAUDE.md`: invariants, gotchas, don't-do-X-because-Y, a 2–3 line module map, and a pointer; target ~400–600 words. Litmus: could an agent editing a random file here silently break something without this line?
- `DETAILS.md`: the area's real docs (architecture narrative, data flows, decision rationale, edge-case catalogs), read on demand; in whole before structural changes.
- Never `@`-import `DETAILS.md` from a `CLAUDE.md` (would rebuild the auto-load cost).
Wired into `AGENTS.md` § File structure, `docs/architecture.md`'s framing, and the `docs-maintenance` rule (Gotcha/Why → CLAUDE.md, Decision/Why → DETAILS.md, evidence → docs/notes/).1 parent e1cc9ba commit 9bf1a65
3 files changed
Lines changed: 23 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
8 | | - | |
9 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
16 | | - | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
100 | 107 | | |
101 | 108 | | |
102 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
0 commit comments