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

multica-ai/andrej-karpathy-skills

GitHub Trending (daily)

A single CLAUDE.md file that implements four principles to improve Claude Code's coding behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.