@adia-ai/adia-ui-forge 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +2 -2
- package/CHANGELOG.md +8 -0
- package/agents/README.md +209 -0
- package/agents/a2ui-engineer.md +57 -0
- package/agents/author.md +56 -0
- package/agents/release-engineer.md +85 -0
- package/agents/repo-steward.md +56 -0
- package/agents/routing-corpus.json +89 -0
- package/agents/spec-architect.md +53 -0
- package/agents/tech-lead.md +57 -0
- package/agents/verifier.md +55 -0
- package/package.json +3 -2
- package/skills/adia-ui-authoring/SKILL.md +2 -2
- package/skills/adia-ui-authoring/assets/case-studies/theme-panel-promotion.md +1 -1
- package/skills/adia-ui-authoring/references/module-promotion.md +2 -2
- package/skills/adia-ui-gen-review/skill.json +1 -0
- package/skills/adia-ui-ops/CHANGELOG.md +291 -0
- package/skills/adia-ui-ops/SKILL.md +401 -0
- package/skills/adia-ui-ops/references/INDEX.md +158 -0
- package/skills/adia-ui-ops/references/audit-cadence.md +263 -0
- package/skills/adia-ui-ops/references/audit-patterns/archive-link-sweep.md +96 -0
- package/skills/adia-ui-ops/references/audit-patterns/audit-history-ledger.md +162 -0
- package/skills/adia-ui-ops/references/audit-patterns/browser-bundle-node-imports.md +154 -0
- package/skills/adia-ui-ops/references/audit-patterns/changelog-unreleased-bloat.md +75 -0
- package/skills/adia-ui-ops/references/audit-patterns/coverage-gaps.md +187 -0
- package/skills/adia-ui-ops/references/audit-patterns/entry-file-coverage.md +122 -0
- package/skills/adia-ui-ops/references/audit-patterns/format-hygiene.md +217 -0
- package/skills/adia-ui-ops/references/audit-patterns/lockstep-versioning.md +113 -0
- package/skills/adia-ui-ops/references/audit-patterns/memory-fragmentation.md +180 -0
- package/skills/adia-ui-ops/references/audit-patterns/orphan-detection.md +202 -0
- package/skills/adia-ui-ops/references/audit-patterns/pointer-validation.md +180 -0
- package/skills/adia-ui-ops/references/audit-patterns/redundancy-detection.md +210 -0
- package/skills/adia-ui-ops/references/audit-patterns/spec-dating-sweep.md +91 -0
- package/skills/adia-ui-ops/references/audit-patterns/stale-content.md +182 -0
- package/skills/adia-ui-ops/references/audit-patterns/staleness-tooling.md +156 -0
- package/skills/adia-ui-ops/references/audit-patterns/token-waste-detection.md +196 -0
- package/skills/adia-ui-ops/references/deploy-playbooks.md +259 -0
- package/skills/adia-ui-ops/references/doc-types/adr-pattern.md +210 -0
- package/skills/adia-ui-ops/references/doc-types/architecture-md.md +190 -0
- package/skills/adia-ui-ops/references/doc-types/changelog.md +183 -0
- package/skills/adia-ui-ops/references/doc-types/decisions-log.md +146 -0
- package/skills/adia-ui-ops/references/doc-types/plan-roadmap.md +182 -0
- package/skills/adia-ui-ops/references/doc-types/postmortem-pattern.md +206 -0
- package/skills/adia-ui-ops/references/genres/prose-and-writing.md +149 -0
- package/skills/adia-ui-ops/references/guidance/context-budget.md +137 -0
- package/skills/adia-ui-ops/references/guidance/llm-doc-writing.md +116 -0
- package/skills/adia-ui-ops/references/guidance/reliability-dial.md +186 -0
- package/skills/adia-ui-ops/references/recipes/adr-introduction.md +211 -0
- package/skills/adia-ui-ops/references/recipes/audit-existing-repo.md +234 -0
- package/skills/adia-ui-ops/references/recipes/cold-start-harvest.md +263 -0
- package/skills/adia-ui-ops/references/recipes/concurrent-learnings-merge.md +158 -0
- package/skills/adia-ui-ops/references/recipes/continuous-learning-loop.md +169 -0
- package/skills/adia-ui-ops/references/recipes/external-reference-verification.md +158 -0
- package/skills/adia-ui-ops/references/recipes/findings-index-readout.md +126 -0
- package/skills/adia-ui-ops/references/recipes/greenfield-setup.md +252 -0
- package/skills/adia-ui-ops/references/recipes/harvest-repo-brain.md +169 -0
- package/skills/adia-ui-ops/references/recipes/import-repo-brain-harvest.md +153 -0
- package/skills/adia-ui-ops/references/recipes/memory-organization.md +182 -0
- package/skills/adia-ui-ops/references/recipes/recommend-then-validate.md +199 -0
- package/skills/adia-ui-ops/references/recipes/self-healing-hooks.md +366 -0
- package/skills/adia-ui-ops/references/recipes/skill-stewardship-loop.md +113 -0
- package/skills/adia-ui-ops/references/standards/agents-md-spec.md +138 -0
- package/skills/adia-ui-ops/references/standards/claude-md-convention.md +123 -0
- package/skills/adia-ui-ops/references/standards/cross-tool-matrix.md +85 -0
- package/skills/adia-ui-ops/references/standards/readme-conventions.md +232 -0
- package/skills/adia-ui-ops/references/teach-protocol.md +215 -0
- package/skills/adia-ui-ops/scripts/audit-ops-roster.mjs +104 -0
- package/skills/adia-ui-ops/skill.json +65 -0
- package/skills/adia-ui-release/CHANGELOG.md +43 -0
- package/skills/adia-ui-release/SKILL.md +34 -6
- package/skills/adia-ui-release/references/independent-package-release.md +129 -0
- package/skills/adia-ui-release/references/recovery-paths.md +49 -2
- package/skills/adia-ui-release/scripts/dispatch-publish.mjs +68 -5
- package/skills/adia-ui-release/scripts/insert-stub.mjs +5 -3
- package/skills/adia-ui-release/scripts/make-ledger.mjs +22 -1
- package/skills/adia-ui-release/scripts/package-paths.mjs +44 -0
- package/skills/adia-ui-release/scripts/promote-unreleased.mjs +3 -2
- package/skills/adia-ui-release/scripts/release-pack.mjs +36 -7
- package/skills/adia-ui-release/scripts/tag-lockstep.mjs +10 -2
- package/skills/adia-ui-release/skill.json +9 -7
- package/skills/dogfood-sweep/CHANGELOG.md +37 -0
- package/skills/dogfood-sweep/README.md +105 -0
- package/skills/dogfood-sweep/SKILL.md +1000 -0
- package/skills/dogfood-sweep/analyze.mjs +600 -0
- package/skills/dogfood-sweep/skill.json +31 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
---
|
|
2
|
+
date: 2026-04-27
|
|
3
|
+
coverage: extended
|
|
4
|
+
peers:
|
|
5
|
+
- adr-pattern.md
|
|
6
|
+
- decisions-log.md
|
|
7
|
+
primary_sources:
|
|
8
|
+
- https://sre.google/workbook/postmortem-culture/ — Google SRE postmortem culture
|
|
9
|
+
- https://sre.google/sre-book/example-postmortem/ — Google SRE example postmortem
|
|
10
|
+
- https://www.atlassian.com/incident-management/postmortem/templates — Atlassian postmortem templates
|
|
11
|
+
- https://github.com/dastergon/postmortem-templates — most-cited template catalog
|
|
12
|
+
status: research-verified
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Post-mortem pattern
|
|
16
|
+
|
|
17
|
+
> **Storage convention.** This skill recommends `.brain/postmortems/` (most common) or `.brain/incidents/` (also common). Avoid `.brain/traces/` — "traces" risks being read as observability traces (OpenTelemetry / Jaeger), which is a different concept.
|
|
18
|
+
|
|
19
|
+
## What a post-mortem is
|
|
20
|
+
|
|
21
|
+
A **dated write-up of an incident**: what happened, what the impact was, what caused it, what we did, what we learned. Filed after the incident is resolved; serves as **memory** so the same failure doesn't repeat.
|
|
22
|
+
|
|
23
|
+
The load-bearing principle is **blameless**: post-mortems describe systems failures, not personal failures. People did what felt reasonable given the information they had. The post-mortem looks for systemic improvements — process, tooling, alerting, documentation — not someone to blame.
|
|
24
|
+
|
|
25
|
+
Source: [Google SRE — Postmortem Culture: Learning from Failure](https://sre.google/workbook/postmortem-culture/).
|
|
26
|
+
|
|
27
|
+
## Two canonical templates
|
|
28
|
+
|
|
29
|
+
### Google SRE postmortem (the gold standard)
|
|
30
|
+
|
|
31
|
+
Sections (per Google's [example postmortem](https://sre.google/sre-book/example-postmortem/)):
|
|
32
|
+
|
|
33
|
+
- **Summary** — one paragraph
|
|
34
|
+
- **Impact** — users affected, duration, severity
|
|
35
|
+
- **Root causes** — the underlying *why* (often plural)
|
|
36
|
+
- **Trigger** — the proximate event that fired the latent bug
|
|
37
|
+
- **Resolution** — what stopped the bleeding
|
|
38
|
+
- **Detection** — how we noticed (monitoring? user report? both?)
|
|
39
|
+
- **Action items** — concrete follow-ups, with owners + due dates
|
|
40
|
+
- **Lessons learned** — what went well / what went poorly / where we got lucky
|
|
41
|
+
- **Timeline** — chronological log with timestamps
|
|
42
|
+
|
|
43
|
+
Stored internally at Google as Google Docs, not Markdown — but the structure ports directly to Markdown.
|
|
44
|
+
|
|
45
|
+
### Atlassian postmortem template
|
|
46
|
+
|
|
47
|
+
Sections (per [Atlassian](https://www.atlassian.com/incident-management/postmortem/templates)):
|
|
48
|
+
|
|
49
|
+
- **Summary**
|
|
50
|
+
- **Leadup** — what was happening before
|
|
51
|
+
- **Fault** — the specific failure
|
|
52
|
+
- **Impact**
|
|
53
|
+
- **Detection**
|
|
54
|
+
- **Response**
|
|
55
|
+
- **Recovery**
|
|
56
|
+
- **Five Whys** — recursive root-cause drill
|
|
57
|
+
- **Action items**
|
|
58
|
+
|
|
59
|
+
Atlassian's split between *Detection / Response / Recovery* maps cleanly to incident-management process steps; the skill recommends this structure for teams with formal IM tooling.
|
|
60
|
+
|
|
61
|
+
## Filename + storage
|
|
62
|
+
|
|
63
|
+
Recommended:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
.brain/postmortems/
|
|
67
|
+
├── 2026-04-12-checkout-outage.md
|
|
68
|
+
├── 2026-03-08-payment-double-charge.md
|
|
69
|
+
├── 2026-01-22-search-degradation.md
|
|
70
|
+
└── README.md # index, sorted newest-first
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Filename pattern: `YYYY-MM-DD-short-incident-name.md`. The date prefix sorts chronologically.
|
|
74
|
+
|
|
75
|
+
`.brain/incidents/` is an accepted alias. `.brain/post-mortems/` (with hyphen) also works. Pick one and stick with it.
|
|
76
|
+
|
|
77
|
+
## File template (Google SRE flavor)
|
|
78
|
+
|
|
79
|
+
```markdown
|
|
80
|
+
---
|
|
81
|
+
date: 2026-04-12
|
|
82
|
+
status: resolved
|
|
83
|
+
severity: SEV-2
|
|
84
|
+
duration: 47 minutes
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
# Checkout outage — 2026-04-12
|
|
88
|
+
|
|
89
|
+
## Summary
|
|
90
|
+
|
|
91
|
+
For 47 minutes on April 12 starting at 14:23 UTC, the checkout endpoint
|
|
92
|
+
returned 500s for ~30% of requests due to a database connection-pool
|
|
93
|
+
exhaustion triggered by a bot scrape.
|
|
94
|
+
|
|
95
|
+
## Impact
|
|
96
|
+
|
|
97
|
+
- ~12,000 affected users
|
|
98
|
+
- ~$40K in dropped revenue
|
|
99
|
+
- SEV-2 declared at 14:31 UTC
|
|
100
|
+
|
|
101
|
+
## Root causes
|
|
102
|
+
|
|
103
|
+
1. Connection pool sized for normal load only; no headroom.
|
|
104
|
+
2. Bot scrape was not detected by rate-limiter (User-Agent allow-listed
|
|
105
|
+
in legacy config from 2024).
|
|
106
|
+
3. No alert on connection-pool saturation; alert fired only on response-
|
|
107
|
+
latency p95.
|
|
108
|
+
|
|
109
|
+
## Trigger
|
|
110
|
+
|
|
111
|
+
GoogleBot-impersonating scrape from AS12345, 14:21 UTC, 800 req/s.
|
|
112
|
+
|
|
113
|
+
## Resolution
|
|
114
|
+
|
|
115
|
+
- Killed scrape via WAF rule (14:55 UTC).
|
|
116
|
+
- Connection pool drained naturally over 90s.
|
|
117
|
+
|
|
118
|
+
## Detection
|
|
119
|
+
|
|
120
|
+
User report at 14:27 UTC. Internal alert fired 14:29 UTC.
|
|
121
|
+
|
|
122
|
+
## Action items
|
|
123
|
+
|
|
124
|
+
- [ ] (Alice, due 2026-04-19) Add connection-pool-saturation alert.
|
|
125
|
+
- [ ] (Bob, due 2026-04-26) Review WAF allow-list; remove stale entries.
|
|
126
|
+
- [ ] (Charlie, due 2026-05-03) Right-size connection pool with headroom.
|
|
127
|
+
|
|
128
|
+
## Lessons learned
|
|
129
|
+
|
|
130
|
+
### What went well
|
|
131
|
+
- Time-to-resolution was 32 minutes once root cause identified.
|
|
132
|
+
- WAF tooling was usable without a vendor escalation.
|
|
133
|
+
|
|
134
|
+
### What went poorly
|
|
135
|
+
- 4 minutes between user report and our alert firing.
|
|
136
|
+
- WAF allow-list hadn't been reviewed in 18 months.
|
|
137
|
+
|
|
138
|
+
### Where we got lucky
|
|
139
|
+
- Scrape happened at 14:23 UTC (low-traffic window). At peak we'd have
|
|
140
|
+
exhausted the pool faster.
|
|
141
|
+
|
|
142
|
+
## Timeline (UTC)
|
|
143
|
+
|
|
144
|
+
- 14:21 — bot scrape begins
|
|
145
|
+
- 14:23 — first checkout 500
|
|
146
|
+
- 14:27 — user report in #incidents
|
|
147
|
+
- 14:29 — internal latency alert fires
|
|
148
|
+
- 14:31 — SEV-2 declared
|
|
149
|
+
- 14:48 — root cause identified (DB connection pool)
|
|
150
|
+
- 14:55 — scrape blocked at WAF
|
|
151
|
+
- 15:10 — incident resolved
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## How AGENTS.md should reference post-mortems
|
|
155
|
+
|
|
156
|
+
In the `Where to find things` section:
|
|
157
|
+
|
|
158
|
+
```markdown
|
|
159
|
+
- **Post-mortems:** `.brain/postmortems/` — newest-first; read when investigating recurring issues
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
In the `Memory primitives` section:
|
|
163
|
+
|
|
164
|
+
```markdown
|
|
165
|
+
- **When debugging a production issue**, search `.brain/postmortems/` for prior occurrences. Many "new" bugs are repeats of fixed-and-forgotten issues.
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Audit checks for post-mortems
|
|
169
|
+
|
|
170
|
+
1. **Folder exists** at `.brain/postmortems/` (or `.brain/incidents/` — accepted alias).
|
|
171
|
+
2. **Filename pattern is consistent** (`YYYY-MM-DD-name.md`).
|
|
172
|
+
3. **Each post-mortem has a `status:` field** (resolved / ongoing / blocked) and `date:`.
|
|
173
|
+
4. **An index file (`README.md`) exists** in the folder, sorted newest-first.
|
|
174
|
+
5. **`.brain/postmortems/` is referenced from AGENTS.md**.
|
|
175
|
+
|
|
176
|
+
The audit should NOT flag a missing `.brain/postmortems/` folder for projects that haven't had production incidents — heuristic: search commit log for `revert`, `incident`, `outage`, `hotfix` to estimate whether the project should have post-mortems.
|
|
177
|
+
|
|
178
|
+
## Trigger rules — when to write a post-mortem
|
|
179
|
+
|
|
180
|
+
A post-mortem is *not* required for every bug. The skill recommends writing one when **any one** of:
|
|
181
|
+
|
|
182
|
+
1. **A `release(.*hotfix` commit lands within 24h of a non-hotfix `release(` commit.** This is the canonical trigger — the hotfix exists *because* something escaped the prior release. The mechanism that allowed the escape needs writing down.
|
|
183
|
+
2. **A consumer-facing bug spent more than 1h in `latest` on npm** (or equivalent — the user-visible default channel for the package). The lag-to-detection is the unit of regret; capture how it happened and shorten the next loop.
|
|
184
|
+
3. **An audit emits a `severity: high` finding affecting anything outside `[Unreleased]`.** OPEN findings on shipped artifacts are incidents-in-waiting; if they trace to a published version, write the post-mortem.
|
|
185
|
+
4. **A trip-wire (CI gate, pre-commit hook) failed silently and the failure mode was discovered post-hoc.** "The check that should have caught this didn't" is exactly the class of process lesson post-mortems exist to capture.
|
|
186
|
+
5. **A user-reported runtime error against a tagged release.** External-detected runtime failures are the cleanest signal that internal verification missed.
|
|
187
|
+
|
|
188
|
+
The point isn't ceremony — it's that the *mechanism* of failure is captured *once*, in plain text, so the next session inherits the diagnosis instead of re-walking it. A post-mortem that says "we'll be more careful" is failing the test; one that says "we'll add `<specific trip-wire>`" passes.
|
|
189
|
+
|
|
190
|
+
**Mapping to `ops-repo` artifacts.** When a post-mortem identifies a structural fix (new trip-wire, new convention, new generator), record the finding-to-fix pairing in `.brain/findings/INDEX.md` under `## Graduations`. The post-mortem is the narrative; the graduations table is the structured index. See [`../recipes/findings-index-readout.md`](../recipes/findings-index-readout.md).
|
|
191
|
+
|
|
192
|
+
## Common anti-patterns
|
|
193
|
+
|
|
194
|
+
- **Folder named `.brain/traces/`** — confused with observability traces.
|
|
195
|
+
- **No date prefix on filename** — files don't sort chronologically.
|
|
196
|
+
- **Post-mortem is a finger-pointing exercise** — violates blameless principle. Convert to systems-language.
|
|
197
|
+
- **Action items without owners or due dates** — they don't get done.
|
|
198
|
+
- **No timeline section** — losing the "what happened when" loses the chance to improve detection.
|
|
199
|
+
- **Not linked from AGENTS.md** — agent doesn't know to check.
|
|
200
|
+
|
|
201
|
+
## Cross-references
|
|
202
|
+
|
|
203
|
+
- ADR pattern (architecture decisions, separate concept): `adr-pattern.md`
|
|
204
|
+
- Decision log (collection of ADRs): `decisions-log.md`
|
|
205
|
+
- AGENTS.md "Memory primitives" section: `../standards/agents-md-spec.md`
|
|
206
|
+
- Memory-organization recipe: `../recipes/memory-organization.md`
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
date: 2026-04-27
|
|
3
|
+
coverage: extended
|
|
4
|
+
peers:
|
|
5
|
+
- ../recipes/greenfield-setup.md
|
|
6
|
+
- ../recipes/memory-organization.md
|
|
7
|
+
- ../doc-types/adr-pattern.md
|
|
8
|
+
- ../doc-types/postmortem-pattern.md
|
|
9
|
+
primary_sources:
|
|
10
|
+
- https://diataxis.fr/
|
|
11
|
+
- https://www.amwa.org/page/style_guides
|
|
12
|
+
- https://en.wikipedia.org/wiki/Series_bible
|
|
13
|
+
- https://github.com/errata-ai/vale
|
|
14
|
+
status: research-verified
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Genre: prose and writing
|
|
18
|
+
|
|
19
|
+
> **Premise.** ops-repo was designed for code repositories, but five of the six promises (less-wasteful, token-and-context-optimized, less-prone-to-staleness, self-healing partial, continuously-learning) translate cleanly to prose, fiction, journalism, and documentation projects. The skill works — with a vocabulary swap and one fewer trip-wire.
|
|
20
|
+
|
|
21
|
+
_Last reviewed: 2026-04-27_
|
|
22
|
+
|
|
23
|
+
## Where it fits
|
|
24
|
+
|
|
25
|
+
| Genre | Fit | Why |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| Technical documentation | Excellent | Drift-vs-code is the same concern; ADRs map 1:1 to documentation decisions |
|
|
28
|
+
| Long-form non-fiction (book) | Excellent | Voice EDRs, source-of-fact registries, revision retrospectives all matter |
|
|
29
|
+
| Long-form fiction (novel/series) | Excellent | "Series bible" is exactly the brain metaphor; EDRs become world-building decisions |
|
|
30
|
+
| Academic / research writing | Strong | Citation-stale (papers retracted, replaced) is the same as live-link-stale-content |
|
|
31
|
+
| Journalism / essays | Partial | Revision retrospectives become "what I'd revise"; EDRs less natural for one-off pieces |
|
|
32
|
+
| Screenplay / playwriting | Partial | Character-bible decisions are EDR-shaped; but writers' rooms don't usually want the process ceremony |
|
|
33
|
+
| Marketing / SEO copy | Low | Optimization is dominated by A/B testing; not a docs problem |
|
|
34
|
+
| Poetry | Poor | Wrong tool. Voice is not decomposable into decision records. |
|
|
35
|
+
|
|
36
|
+
## Vocabulary translation
|
|
37
|
+
|
|
38
|
+
| ops-repo (code) | Prose equivalent |
|
|
39
|
+
|---|---|
|
|
40
|
+
| `AGENTS.md` | `STYLE.md` or `VOICE.md` (the canonical style/voice guide) |
|
|
41
|
+
| ADR (Architecture Decision Record) | EDR (Editorial Decision Record) — voice/POV/structure decisions |
|
|
42
|
+
| Postmortem | Revision retrospective — "what broke in this draft" |
|
|
43
|
+
| Runbook | Process ritual — "how I plan a chapter," "submission checklist" |
|
|
44
|
+
| Architecture overview | Series bible / world bible (fiction) or content map (docs) |
|
|
45
|
+
| Trip-wire | Editorial gate (e.g., "no draft published without sensitivity check") |
|
|
46
|
+
| Audit | Manuscript health check |
|
|
47
|
+
| Browserslist baseline | House-style baseline (AP, Chicago, NYT, brand-specific) |
|
|
48
|
+
|
|
49
|
+
## Folder layout (prose adaptation)
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
.brain/
|
|
53
|
+
├── config.toml
|
|
54
|
+
├── edrs/ # editorial decision records (was adrs/)
|
|
55
|
+
│ ├── 0001-pov-third-limited.md
|
|
56
|
+
│ ├── 0002-no-second-person.md
|
|
57
|
+
│ └── 0003-style-guide-AP-not-Chicago.md
|
|
58
|
+
├── retrospectives/ # was postmortems/
|
|
59
|
+
│ ├── draft-1-feedback-synthesis.md
|
|
60
|
+
│ └── reader-survey-q1.md
|
|
61
|
+
├── rituals/ # was runbooks/
|
|
62
|
+
│ ├── chapter-planning.md
|
|
63
|
+
│ └── pre-submission-checklist.md
|
|
64
|
+
├── bible/ # was architecture/
|
|
65
|
+
│ ├── characters.md
|
|
66
|
+
│ ├── world.md
|
|
67
|
+
│ └── timeline.md
|
|
68
|
+
├── archive/ # superseded EDRs, abandoned drafts (not deleted)
|
|
69
|
+
└── audit-history/ # manuscript-health JSON ledgers
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The dotfile prefix is *more* useful for prose than for code: drafts live at the repo root or in `chapters/` / `posts/`, and `.brain/` is structurally clearly the "out of band" memory layer that humans curate but don't read every day.
|
|
73
|
+
|
|
74
|
+
## Promise-by-promise applicability
|
|
75
|
+
|
|
76
|
+
| Promise | Applies to prose? | How |
|
|
77
|
+
|---|---|---|
|
|
78
|
+
| 1. Less-wasteful | Yes | Style-guide drift detection (one canonical, no duplicated style rules across files) |
|
|
79
|
+
| 2. Token-and-context-optimized | Yes | Prose has the same agent-context-window problem; STYLE.md ≤200 lines |
|
|
80
|
+
| 3. Less-prone-to-staleness | Yes | Citation rot, character-name conflicts across drafts, world-bible vs current-draft drift |
|
|
81
|
+
| 4. Self-healing | Partial | Pre-commit hooks for spelling/style work (Vale, markdownlint); but most prose tooling is editor-internal not git-hook-internal |
|
|
82
|
+
| 5. Continuously-learning | Yes | Voice/POV decisions accumulate; series spans years; humans curate the editorial log |
|
|
83
|
+
| Reliability dial | Yes | A novelist working alone uses `lax`; a magazine staff with multiple writers uses `strict` |
|
|
84
|
+
|
|
85
|
+
## What translates as-is
|
|
86
|
+
|
|
87
|
+
- `../standards/agents-md-spec.md` — replace `AGENTS.md` → `STYLE.md`; the 8-section skeleton works (Project overview = book/series overview, Build/test/run = build commands for the manuscript build, Conventions = style rules, etc.)
|
|
88
|
+
- `../audit-patterns/orphan-detection.md` — orphan files in `.brain/` not reachable from STYLE.md
|
|
89
|
+
- `../audit-patterns/redundancy-detection.md` — same style rule repeated in two files
|
|
90
|
+
- `../audit-patterns/format-hygiene.md` — every EDR has a date and status
|
|
91
|
+
- `../audit-patterns/staleness-tooling.md` — Vale, lychee work for prose too (Vale is *primarily* a prose tool)
|
|
92
|
+
- `../audit-patterns/token-waste-detection.md` — STYLE.md bloat is the same problem
|
|
93
|
+
- `../recipes/self-healing-hooks.md` — Vale + spell + style-rule hooks instead of code linters
|
|
94
|
+
- `../recipes/audit-existing-repo.md` — survey an existing manuscript repo
|
|
95
|
+
- `../recipes/cold-start-harvest.md` — same procedure for an old manuscript with style notes scattered everywhere
|
|
96
|
+
- `../guidance/context-budget.md` — same math; agent context is finite
|
|
97
|
+
- `../guidance/reliability-dial.md` — strictness picker
|
|
98
|
+
|
|
99
|
+
## What needs translation
|
|
100
|
+
|
|
101
|
+
- `../doc-types/adr-pattern.md` → EDR pattern. Change the `## Status` allowed values to `Drafted | Adopted | Superseded | Abandoned`. Keep the Y-statement / MADR templates.
|
|
102
|
+
- `../doc-types/postmortem-pattern.md` → revision retrospective. Replace "incident timeline" with "draft timeline"; keep "blameless" and "what we'd do differently."
|
|
103
|
+
- `../doc-types/architecture-md.md` → series bible. matklad's pattern translates: "what is where in this story-world."
|
|
104
|
+
- `../doc-types/decisions-log.md` → editorial decision log.
|
|
105
|
+
|
|
106
|
+
## What doesn't apply
|
|
107
|
+
|
|
108
|
+
- `../standards/cross-tool-matrix.md` — Cursor/Codex/Devin don't have prose equivalents. Use Claude/ChatGPT/Cursor-for-prose; one entry file (STYLE.md) plus one tool-specific pointer is enough.
|
|
109
|
+
- `../audit-patterns/entry-file-coverage.md` — partial. Fewer entry-file conventions in prose; just STYLE.md.
|
|
110
|
+
- `../audit-patterns/memory-fragmentation.md` — partial. Less likely to fragment when one author works alone.
|
|
111
|
+
|
|
112
|
+
## When NOT to use ops-repo for prose
|
|
113
|
+
|
|
114
|
+
- Single short essay or a one-week project. Overhead exceeds benefit.
|
|
115
|
+
- Pure ideation / brainstorming. Premature structuring kills exploration.
|
|
116
|
+
- Marketing copy where the "right answer" comes from A/B tests, not editorial decisions.
|
|
117
|
+
- Poetry. Voice is not decomposable into decision records.
|
|
118
|
+
|
|
119
|
+
## Examples in the wild
|
|
120
|
+
|
|
121
|
+
- **Fiction series bibles** — Brandon Sanderson's wikis, the WGA "showrunner bible" pattern — these are exactly `architecture-md.md` content, just predating the convention.
|
|
122
|
+
- **House style guides** — Chicago, AP, NYT, The Economist — these are STYLE.md / EDR collections.
|
|
123
|
+
- **Diátaxis / Divio documentation framework** — already practices most of ops-repo's promises; this skill names what's already happening in well-run docs orgs.
|
|
124
|
+
|
|
125
|
+
## Greenfield prose setup (analogue of `recipes/greenfield-setup.md`)
|
|
126
|
+
|
|
127
|
+
Drop these files at the repo root of a manuscript or docs repo:
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
STYLE.md # canonical style/voice guide (≤200 lines)
|
|
131
|
+
.brain/
|
|
132
|
+
├── config.toml
|
|
133
|
+
├── edrs/0001-record-editorial-decisions.md # bootstrap EDR
|
|
134
|
+
├── retrospectives/.gitkeep
|
|
135
|
+
├── rituals/.gitkeep
|
|
136
|
+
├── bible/.gitkeep
|
|
137
|
+
└── archive/.gitkeep
|
|
138
|
+
.github/pull_request_template.md # "Editorial impact" checkbox
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
The 5 promises ship from day one. EDR 0001 records the decision to use EDRs, exactly mirroring ADR 0001 in the code-greenfield recipe.
|
|
142
|
+
|
|
143
|
+
## Cross-references
|
|
144
|
+
|
|
145
|
+
- AGENTS.md spec (the analogue of STYLE.md): `../standards/agents-md-spec.md`
|
|
146
|
+
- Greenfield setup (procedural): `../recipes/greenfield-setup.md`
|
|
147
|
+
- Memory organization (folder layout rationale): `../recipes/memory-organization.md`
|
|
148
|
+
- ADR pattern (the EDR template): `../doc-types/adr-pattern.md`
|
|
149
|
+
- Reliability dial: `../guidance/reliability-dial.md`
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
date: 2026-04-27
|
|
3
|
+
coverage: canonical
|
|
4
|
+
peers:
|
|
5
|
+
- llm-doc-writing.md
|
|
6
|
+
- ../audit-patterns/token-waste-detection.md
|
|
7
|
+
- ../standards/agents-md-spec.md
|
|
8
|
+
primary_sources:
|
|
9
|
+
- https://code.claude.com/docs/en/best-practices — Anthropic's CLAUDE.md guidance
|
|
10
|
+
- https://docs.anthropic.com/en/docs/about-claude/models — Claude model context windows
|
|
11
|
+
- https://github.blog/ai-and-ml/github-copilot/how-to-write-a-great-agents-md-lessons-from-over-2500-repositories/
|
|
12
|
+
status: research-verified
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Context budget (delivers Promise 2)
|
|
16
|
+
|
|
17
|
+
> **The premise.** Every token in AGENTS.md / CLAUDE.md / loaded docs is a token *not* available for the actual code being worked on. "Token-and-context-optimized" means treating the agent's context window as a budget — and refusing to spend it on prose that could be a link.
|
|
18
|
+
|
|
19
|
+
## The math
|
|
20
|
+
|
|
21
|
+
Claude model context windows (April 2026):
|
|
22
|
+
|
|
23
|
+
| Model | Context window |
|
|
24
|
+
|---|---|
|
|
25
|
+
| Claude Opus 4.7 | **1M tokens** (1,000,000) |
|
|
26
|
+
| Claude Sonnet 4.6 | 200K tokens |
|
|
27
|
+
| Claude Haiku 4.5 | 200K tokens |
|
|
28
|
+
|
|
29
|
+
That sounds like a lot. It isn't — once you load:
|
|
30
|
+
|
|
31
|
+
- AGENTS.md / CLAUDE.md (load every session — Anthropic loads CLAUDE.md automatically)
|
|
32
|
+
- The files the agent is editing (often 3-10 files, 200-2000 lines each)
|
|
33
|
+
- The files the agent is *reading* to make decisions (10-50 files easily)
|
|
34
|
+
- Tool-call results (test output, lint errors, build logs)
|
|
35
|
+
- The conversation transcript itself (can grow to 30K+ tokens in long sessions)
|
|
36
|
+
|
|
37
|
+
A naked 800-line AGENTS.md costs **~10K tokens** — 5% of Sonnet's window, just for the entry file. If `ARCHITECTURE.md` is 1500 lines and gets loaded too, that's another 18K. Now you've spent 14% of the window on metadata before doing any work.
|
|
38
|
+
|
|
39
|
+
The Opus 4.7 1M window changes the math but not the principle. **Token economy is good engineering regardless of window size** — bigger window means tokens are cheaper, not free.
|
|
40
|
+
|
|
41
|
+
## Anthropic's load-bearing rule
|
|
42
|
+
|
|
43
|
+
> Keep CLAUDE.md under ~200 lines. Instruction quality decreases as count increases.
|
|
44
|
+
>
|
|
45
|
+
> — [Anthropic Claude Code best practices](https://code.claude.com/docs/en/best-practices)
|
|
46
|
+
|
|
47
|
+
The **same ergonomic ceiling applies to AGENTS.md.** This isn't an arbitrary number — it's where empirical observation says adherence drops. Long files are skimmed, ignored, or contradicted by their own later sections.
|
|
48
|
+
|
|
49
|
+
GitHub's [analysis of 2,500+ AGENTS.md files](https://github.blog/ai-and-ml/github-copilot/how-to-write-a-great-agents-md-lessons-from-over-2500-repositories/) confirms this — the most-effective files cluster around 50-150 lines.
|
|
50
|
+
|
|
51
|
+
## Layered docs (the navigability principle)
|
|
52
|
+
|
|
53
|
+
The ceiling forces a structural choice: **detail goes into linked subfolders, not into the entry file**.
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
AGENTS.md (~150 lines: agent persona, build/test/run, conventions, trust
|
|
57
|
+
boundaries, where-to-find-things, memory primitives)
|
|
58
|
+
↓ links to
|
|
59
|
+
ARCHITECTURE.md (~500 lines: system overview, component map,
|
|
60
|
+
data-flow diagrams, deployment topology)
|
|
61
|
+
↓ links to
|
|
62
|
+
.brain/adrs/0001-*.md (each ADR ~100 lines: one decision in depth)
|
|
63
|
+
.brain/postmortems/2026-04-*.md (each ~150 lines: one incident)
|
|
64
|
+
.brain/runbooks/*.md (each ~100 lines: one procedure)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The agent loads AGENTS.md every session (~150 lines, ~2K tokens). It loads ARCHITECTURE.md *only when needed* (~7K tokens). It loads a specific ADR *only when about to make a related decision* (~1K tokens).
|
|
68
|
+
|
|
69
|
+
**Total cost in the common case: 2K tokens. Total cost when deeply needed: ~10K tokens.** Compare to a flat 800-line AGENTS.md (10K every session, even when not relevant).
|
|
70
|
+
|
|
71
|
+
## The budget breakdown for a healthy repo
|
|
72
|
+
|
|
73
|
+
A target shape:
|
|
74
|
+
|
|
75
|
+
| Surface | Line ceiling | Token cost (approx) | When loaded |
|
|
76
|
+
|---|---|---|---|
|
|
77
|
+
| AGENTS.md | 200 | 2-3K | Every session |
|
|
78
|
+
| CLAUDE.md | 15 (thin pointer or symlink) | 0-200 | Every session (Claude Code) |
|
|
79
|
+
| README.md | 200-300 | 3-5K | Sometimes (human-facing) |
|
|
80
|
+
| ARCHITECTURE.md | 500 | 6-8K | When agent needs system overview |
|
|
81
|
+
| .brain/PLAN.md | 200 | 2-3K | When agent needs current priorities |
|
|
82
|
+
| .brain/adrs/<one>.md | 100-200 | 1-3K each | When agent makes architectural decisions |
|
|
83
|
+
| .brain/postmortems/<one>.md | 100-200 | 1-3K each | When agent debugs production issues |
|
|
84
|
+
| .brain/runbooks/<one>.md | 100-200 | 1-3K each | When agent runs operational procedures |
|
|
85
|
+
| `CHANGELOG.md` | (any) | varies | When agent needs version history |
|
|
86
|
+
|
|
87
|
+
The rule of thumb: **anything an agent needs *every session* must be tiny; everything else can be large but must be reachable on demand**.
|
|
88
|
+
|
|
89
|
+
## What violates the budget (the trip-wires)
|
|
90
|
+
|
|
91
|
+
The token-waste-detection audit (Promise 2) flags these specifically:
|
|
92
|
+
|
|
93
|
+
1. **AGENTS.md or CLAUDE.md > 200 lines** — hard cap.
|
|
94
|
+
2. **AGENTS.md or CLAUDE.md > 150 lines** — warning (approaching cap).
|
|
95
|
+
3. **A `.brain/` file > 500 lines that isn't in `.brain/adrs/`, `.brain/postmortems/`, or `.brain/architecture/`** — likely a place where one big doc should be a folder of smaller ones.
|
|
96
|
+
4. **Repeated content** — the same command listed in AGENTS.md, README.md, AND CONTRIBUTING.md. Pick one canonical, link from the others.
|
|
97
|
+
5. **Verbose prose where bullets would work** — 8 paragraphs explaining what could be a 3-bullet checklist.
|
|
98
|
+
6. **Generated content checked in** — TypeDoc / JSDoc / API reference generated docs that should be regenerated, not committed.
|
|
99
|
+
|
|
100
|
+
## What does NOT violate the budget
|
|
101
|
+
|
|
102
|
+
- **Long ADRs** — an ADR should be as long as the decision warrants. Some are 30 lines; some are 300. Don't compress for compression's sake.
|
|
103
|
+
- **Long post-mortems** — same: an incident with a complex root cause needs depth.
|
|
104
|
+
- **CHANGELOG.md** — append-only history, expected to grow without bound. Agents rarely load all of it.
|
|
105
|
+
- **Long ARCHITECTURE.md** — within reason; if it gets >1500 lines, split into `.brain/architecture/`.
|
|
106
|
+
|
|
107
|
+
## How to reduce a bloated AGENTS.md (the recipe)
|
|
108
|
+
|
|
109
|
+
Bloated AGENTS.md is the most common failure. Recipe to compress:
|
|
110
|
+
|
|
111
|
+
1. **Strip "we use TypeScript" lines.** If `tsconfig.json` is present, the agent already knows.
|
|
112
|
+
2. **Strip personal preferences.** Move to `CLAUDE.local.md` (gitignored) or `~/.claude/CLAUDE.md` (user-global).
|
|
113
|
+
3. **Strip TODOs / WIP notes.** Move to `.brain/PLAN.md` and link.
|
|
114
|
+
4. **Strip long history / motivation.** Move to `README.md` or `ARCHITECTURE.md`.
|
|
115
|
+
5. **Compress prose to bullets.** "Run tests with Vitest, our preferred test runner" → "Tests: Vitest".
|
|
116
|
+
6. **Replace inline detail with a link.** "Our deployment uses Cloud Run with the following 14 steps..." → "Deployment: see `.brain/runbooks/deploy.md`".
|
|
117
|
+
7. **Audit for self-contradictions.** A file that contradicts itself is worse than incomplete.
|
|
118
|
+
8. **Re-read the file as if you were the agent.** Anything that doesn't change behavior gets cut.
|
|
119
|
+
|
|
120
|
+
A 600-line AGENTS.md typically reduces to 120-150 lines without losing instructional value.
|
|
121
|
+
|
|
122
|
+
## The Anthropic feedback loop applied to context budget
|
|
123
|
+
|
|
124
|
+
When AGENTS.md grows past 200 lines, two patterns work:
|
|
125
|
+
|
|
126
|
+
**Pattern A — extract to a linked file.** A "Conventions" section growing past 30 lines becomes `.brain/CONVENTIONS.md` linked from AGENTS.md. The link is permanent; the file can grow.
|
|
127
|
+
|
|
128
|
+
**Pattern B — ask Claude to compress.** "AGENTS.md is 280 lines. Compress to 180 while preserving all instructional content. Move detail to linked subfolders if needed." This is the inverse of the iterate-pattern: instead of *adding* corrections, *delete* what no longer earns its tokens.
|
|
129
|
+
|
|
130
|
+
Run pattern B quarterly. The audit can prompt this with a finding: `WARN: AGENTS.md is 240 lines. Run quarterly compression pass.`
|
|
131
|
+
|
|
132
|
+
## Cross-references
|
|
133
|
+
|
|
134
|
+
- LLM-doc-writing (companion guidance on content quality): `llm-doc-writing.md`
|
|
135
|
+
- Token-waste detection (the audit pattern that catches violations): `../audit-patterns/token-waste-detection.md`
|
|
136
|
+
- AGENTS.md spec: `../standards/agents-md-spec.md`
|
|
137
|
+
- Self-healing hooks (the pre-commit length check): `../recipes/self-healing-hooks.md`
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
date: 2026-04-27
|
|
3
|
+
coverage: extended
|
|
4
|
+
peers:
|
|
5
|
+
- ../standards/agents-md-spec.md
|
|
6
|
+
- ../standards/claude-md-convention.md
|
|
7
|
+
primary_sources:
|
|
8
|
+
- https://code.claude.com/docs/en/best-practices — Anthropic Claude Code best practices
|
|
9
|
+
- https://github.blog/ai-and-ml/github-copilot/how-to-write-a-great-agents-md-lessons-from-over-2500-repositories/ — empirical study of 2,500+ AGENTS.md files
|
|
10
|
+
- https://www.humanlayer.dev/blog/writing-a-good-claude-md
|
|
11
|
+
status: research-verified
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Writing AGENTS.md / CLAUDE.md content well
|
|
15
|
+
|
|
16
|
+
> **The empirical case for short, specific, navigable.** Not a style guide — a set of load-bearing constraints distilled from Anthropic's own best practices and GitHub's analysis of 2,500+ AGENTS.md files in the wild.
|
|
17
|
+
|
|
18
|
+
## Length
|
|
19
|
+
|
|
20
|
+
**Anthropic's own guidance for CLAUDE.md is "under ~200 lines."** The same ergonomic ceiling applies to AGENTS.md — instruction quality drops as count rises. Long files are skimmed, ignored, or contradicted by their own later sections.
|
|
21
|
+
|
|
22
|
+
If you have more than 200 lines of relevant content, push detail into linked subfolders (`ARCHITECTURE.md`, `.brain/adrs/`, `.brain/runbooks/`). The entry file should *navigate to* depth, not *contain* depth.
|
|
23
|
+
|
|
24
|
+
## What to include (per GitHub's 2,500-repo study)
|
|
25
|
+
|
|
26
|
+
The most-effective AGENTS.md files share these sections:
|
|
27
|
+
|
|
28
|
+
1. **Project overview** — one paragraph, what + who + why.
|
|
29
|
+
2. **Build / test / run commands** — exact shell commands, no prose. Wrong commands are worse than missing commands.
|
|
30
|
+
3. **Coding conventions** — short bullets. Style, types, formatting.
|
|
31
|
+
4. **Trust boundaries** — what to modify, what not to. Critical for preventing destructive edits.
|
|
32
|
+
5. **Where to find things** — pointers to subfolders. The skill's load-bearing recommendation.
|
|
33
|
+
6. **Memory primitives** — when to read ADRs, when to check post-mortems.
|
|
34
|
+
|
|
35
|
+
Sections that don't help LLM agents (move elsewhere):
|
|
36
|
+
|
|
37
|
+
- Long history / motivation / vision (move to `README.md` or `ARCHITECTURE.md`).
|
|
38
|
+
- Detailed architecture diagrams (move to `ARCHITECTURE.md`; reference from AGENTS.md).
|
|
39
|
+
- Personal preferences (move to `CLAUDE.local.md` or `~/.claude/CLAUDE.md`, gitignored).
|
|
40
|
+
|
|
41
|
+
## What to delete
|
|
42
|
+
|
|
43
|
+
Per Anthropic's best-practices doc and HumanLayer's writeup:
|
|
44
|
+
|
|
45
|
+
- **Delete instructions Claude already follows correctly without being told.** "Use TypeScript" in a TS-only repo is noise.
|
|
46
|
+
- **Delete instructions that contradict each other.** Diff your own AGENTS.md for self-contradictions.
|
|
47
|
+
- **Delete TODOs, comments, work-in-progress notes.** Use `.brain/PLAN.md` instead.
|
|
48
|
+
- **Delete commands that fail.** A wrong `npm test` is worse than no `npm test`.
|
|
49
|
+
|
|
50
|
+
## Iteration pattern
|
|
51
|
+
|
|
52
|
+
Anthropic recommends treating AGENTS.md as **live, not frozen**: when the agent makes a mistake, ask it to add a correction to AGENTS.md itself. Over a few weeks the file converges on what's load-bearing.
|
|
53
|
+
|
|
54
|
+
Don't write AGENTS.md from scratch in one session — author the skeleton, then iterate by **deleting** as Claude proves it doesn't need a given line.
|
|
55
|
+
|
|
56
|
+
## Hooks > advisory text (where possible)
|
|
57
|
+
|
|
58
|
+
Per Anthropic: prefer **hooks** for deterministic behavior, not AGENTS.md text. A hook always executes; advisory text is suggestion.
|
|
59
|
+
|
|
60
|
+
Examples:
|
|
61
|
+
- "Run `pnpm typecheck` before committing" → write a `pre-commit` hook in `.husky/pre-commit`.
|
|
62
|
+
- "Don't edit `db/migrations/`" → enforce via CODEOWNERS or branch protection, not AGENTS.md prose.
|
|
63
|
+
|
|
64
|
+
AGENTS.md should explain *why* and reference the hook; the hook does the work.
|
|
65
|
+
|
|
66
|
+
## The "agent persona + boundaries + commands" pattern
|
|
67
|
+
|
|
68
|
+
GitHub's empirical study found this three-part shape works well:
|
|
69
|
+
|
|
70
|
+
```markdown
|
|
71
|
+
# AGENTS.md
|
|
72
|
+
|
|
73
|
+
## You are
|
|
74
|
+
A senior Rust engineer working on a high-throughput web service.
|
|
75
|
+
Prioritize correctness over cleverness.
|
|
76
|
+
|
|
77
|
+
## Boundaries
|
|
78
|
+
- DO NOT: modify `migrations/`, generated code under `gen/`, `Cargo.lock`
|
|
79
|
+
- DO: write tests for every public function; run `cargo fmt` and `cargo clippy` before committing
|
|
80
|
+
- ASK: before changing anything in `crates/core/`
|
|
81
|
+
|
|
82
|
+
## Commands
|
|
83
|
+
build: `cargo build --release`
|
|
84
|
+
test: `cargo test --workspace`
|
|
85
|
+
lint: `cargo clippy --all-targets -- -D warnings`
|
|
86
|
+
fmt: `cargo fmt --all -- --check`
|
|
87
|
+
run: `cargo run --bin server`
|
|
88
|
+
|
|
89
|
+
## Where to find things
|
|
90
|
+
- Architecture overview: `ARCHITECTURE.md`
|
|
91
|
+
- ADRs: `.brain/adrs/`
|
|
92
|
+
- Postmortems: `.brain/postmortems/`
|
|
93
|
+
- Runbooks: `.brain/runbooks/`
|
|
94
|
+
- Active plan: `.brain/PLAN.md`
|
|
95
|
+
|
|
96
|
+
_Last reviewed: 2026-04-27_
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
50-60 lines. Sufficient for most repos.
|
|
100
|
+
|
|
101
|
+
## Anti-patterns (what shows up in stale AGENTS.md / CLAUDE.md)
|
|
102
|
+
|
|
103
|
+
1. **The 800-line dump.** Nobody reads it; the agent doesn't either.
|
|
104
|
+
2. **The "we use TypeScript" file.** Noise — it's already in `tsconfig.json`.
|
|
105
|
+
3. **Stale build commands.** Repo migrated to pnpm a year ago; AGENTS.md still says `npm`. The audit catches this by comparing to the lockfile.
|
|
106
|
+
4. **The duplicated CLAUDE.md.** AGENTS.md and CLAUDE.md both fat, drifted apart.
|
|
107
|
+
5. **No "Where to find things."** Naked entry; agent has nothing to navigate to.
|
|
108
|
+
6. **Personal preferences in the committed file.** "I like 2-space indents" → move to `CLAUDE.local.md` (gitignored).
|
|
109
|
+
7. **TODOs that never got done.** "// TODO: document the auth flow" sitting in AGENTS.md for a year.
|
|
110
|
+
|
|
111
|
+
## Cross-references
|
|
112
|
+
|
|
113
|
+
- AGENTS.md spec: `../standards/agents-md-spec.md`
|
|
114
|
+
- CLAUDE.md as thin pointer / symlink: `../standards/claude-md-convention.md`
|
|
115
|
+
- Audit checks: `../audit-patterns/entry-file-coverage.md`
|
|
116
|
+
- Staleness detection tooling: `../audit-patterns/staleness-tooling.md`
|