most people write their CLAUDE.md backwards

Reddit r/AI_Agents Tools

Summary

The article argues that most CLAUDE.md files are written backwards, containing accumulated failure rules instead of a minimal forward-looking context, and advocates for a small set of current mission, identity, and non-obvious failure modes.

**every** **CLAUDE.md** **I've been handed (or found in a repo screenshot, or built from scratch) has the same shape: a list of things that went wrong.** **"don't use bare strings for IDs." "always check X before calling Y." "the database doesn't like concurrent writes." three months of production incidents, formatted like instructions.** **the file grows by accretion. every time something breaks, a new rule gets added. the agent reads all of them. every run. that's not context engineering. that's a scar register.** **the model doesn't need to know everything that went wrong. it needs to know:** **- what it's doing right now (mission + current task)** **- who it is (identity + constraints, 3-5 lines max)** **- the 3-5 failure modes that are genuinely non-obvious and still live** **everything else is noise it reads before doing actual work.** **the backwards problem:** **CLAUDE.md** **files are written from the past. "here's what I learned." good for a postmortem. bad for an operating context. an operating context is written from the forward — here's the minimum information you need to do this right, today, given where we actually are.** **the smallest** **CLAUDE.md** **that actually enables good work beats the largest one you're proud of every time.** **what does your structure look like? specifically: how do you decide what earns a permanent rule vs. what goes in a session-specific context file?**
Original Article

Similar Articles

How Claude Code works in large codebases

Hacker News Top

Anthropic's blog post details best practices for using Claude Code in large, complex codebases, explaining how agentic search and the 'harness' of extensions like CLAUDE.md files improve navigation and performance at scale.

@Mnilax: https://x.com/Mnilax/status/2053116311132155938

X AI KOLs Timeline

The article details an expanded 12-rule CLAUDE.md configuration template that builds upon Andrej Karpathy's original 4 rules to further reduce AI coding errors and handle complex agent orchestration issues.