Agents don't need memory, they need documentation
TL;DR Highlight
Swap RAG memory plugins for Markdown docs the agent reads before and updates after each task.
Who Should Read
Developers whose coding agents forget project context each session and who are weighing memory plugins.
Core Mechanics
- Every memory plugin is just RAG
- They extract snippets from session transcripts and store them in a RAG (retrieval) database.
- They inject the top 5 on each prompt and offer a search tool for more.
- Recall has five problems
- Similarity ranking cannot tell what is correct or current.
- Snippets lose context, treat the past as truth, cannot search unknowns, and are hard to audit.
- The fix is a structured doc 'brain'
- A workspace of instructions, specs, research and mappings that the agent reads before work and updates after.
- The author grew an internal/ folder into the Operator Memory plugin.
- Document only what code cannot say
- Record requirements, decisions, constraints, mappings, reusable research and standards.
- Otherwise each session burns about 80k tokens of exploration reverse-engineering intent.
- A catalog opens only needed docs
- Only a lean catalog with per-document descriptions and when to open them is injected at session start.
- Codebase indexes and subindexes replace repeated ls and grep loops.
- The working agent keeps docs fresh
- The agent doing the task writes docs with full context and rewrites facts instead of appending.
- Bloat is handled with tuned instructions and review; since it is Markdown, review works like code review and Git reverts.
Community Reactions
- Docs go stale too
- One commenter kept many decision docs that went stale and now confuse the LLM.
- Reconciliation sessions did not stop the confusion.
- Same weakness applies to docs
- Some argued the 'can't search what you don't know' critique also hits index-based docs.
- Another said the GitHub repo's catalogs and read_if conditions are better designed than the article suggests.
- Token cost and lifecycle concerns
- One person who built something similar said token cost balloons for small tasks as docs grow.
- Others noted time-limited facts, preference vs. fact, and server-side agents are not covered.
- Alternative setups
- One uses a docs folder with an archive for stale plans and says it works well.
- Others suggested per-folder README.md files or lint rules whose error messages explain the fix.
- No evidence offered
- Commenters asked for evals rather than assertions.
- Some called it a promotional post and said it is Karpathy's LLM Wiki pattern.
How to Apply
- Create a docs index file
- Today, write docs/INDEX.md with a one-line description and 'when to open' for each doc.
- Tell AGENTS.md to read only this index at session start.
- Add a post-task doc update rule
- In AGENTS.md, require rewriting changed facts in place, not appending.
- State that anything derivable from code must not be documented.
- Include doc changes in PR review
- Review agent-written doc diffs alongside code.
- Ask directly to split or merge docs that have bloated.
- Move stale docs to an archive
- Move finished plans and handoff docs into an archive folder.
- Tell the agent to ignore the archive.
Try It
# Paste into a Claude Code or other coding agent session (simplified version of the article's method)
You maintain this repo's documentation 'brain'. Rules:
1. Before work, read docs/INDEX.md and open only docs whose description and read_if match.
2. Do not write what code already shows. Record only requirements, decisions and reasons, constraints, and reusable research.
3. After work, while you still have full context, update the relevant docs. When a fact changes, rewrite it instead of appending.
4. Split or consolidate docs that grow long or drift out of scope.
5. Keep in INDEX.md one line per doc: what it covers and 'read_if: when to open it'.
Task now: {{task description}}
First, create docs/INDEX.md if missing, and propose candidate decisions and constraints that the code alone cannot tell.
Next to try: after the task, review the docs with git diff docs/ as if it were codeTerminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques