What I keep in CLAUDE.md, and what I stopped putting in it A developer documented a revised approach to maintaining CLAUDE.md files for Claude Code on a mixed Python and TypeScript codebase, cutting the file from roughly 300 lines to under 80 and organizing it into four sections. The developer reports that long files with contradictory examples caused the agent to pick conventions at random, and now caps routine replies at about 50 words to conserve context in long sessions. The file is reviewed in the same pull request as the code, with review-comment rationale moved into it, and the advice is to start with ten lines and add one only after the same mistake happens twice. Writing a CLAUDE.md is easy. Keeping it useful three months later is the part nobody documents, so here is what changed for us after a few rounds with Claude Code on a mid-sized codebase that mixes Python services and a TypeScript frontend. Four sections, in this order: We deliberately left out tutorials. Anything that repeats the README drifts out of sync with it and teaches the model the wrong version. The file stayed under about 80 lines. The first draft was 300, and the results were worse. Long files with contradictory examples made Claude Code pick a convention at random, and the longer the file, the harder it was for a human reviewer to notice the contradiction. Every line we keep has to justify itself against a real mistake. Context accumulates: tool outputs, diffs, and repeated explanations. When working on a small, mechanical change, tell the agent to work in short, direct terms and skip restating the plan. We settled on a routine that caps each reply at roughly 50 words unless the task is exploratory. It fits especially well in long sessions, where verbose answers crowd out the code the model actually needs to read. CLAUDE.md goes through the same pull request as the code it describes. When a review comment explains why something must be done a certain way, that is a signal to move the reason into the file, not just resolve the thread. Over two months the file turned into a short, accurate record of our decisions, and answers about the project do not start from zero. I keep the same habit for my own notes on Python services: the checks I run before an upgrade live in npmjs.com/package/uvicorn-teardown-notes https://www.npmjs.com/package/uvicorn-teardown-notes , because writing them down was how I found out which ones I actually follow. Start with ten lines. Add one only after the same mistake happens twice. The file you end up with is smaller than you expect and used far more than the 300-line one.