Post by Stefan Wintermeyer

Testing this self-improvement rule for my Claude Code setup:

  • Treat every mistake as a trigger to improve the rules, so they self-improve over time. Whenever you get something wrong (caught by me, by a failing test, by CI, by a linter or formatter, or noticed yourself), don’t just fix the one instance. Ask what rule, had it existed, would have prevented it, then add or sharpen that rule so the same or a very similar mistake can’t recur. Put it at the right scope: project-specific lessons go in that project’s CLAUDE.md or .claude/rules/, general lessons go here in my global CLAUDE.md, and durable per-project facts can also go to memory. Write each new rule as a concrete instruction that says what to do and why, not a vague reminder, and fold it into an existing bullet when one already covers the area instead of duplicating. Keep the signal high: only codify mistakes that are generalizable and likely to recur, and skip one-off slips or things already covered elsewhere. In the same turn that you fix the mistake, tell me which rule you added or changed and why.

Other formats