One bug, one line: the rules file your AI reads every session
A rules file template (CLAUDE.md, AGENTS.md, or GEMINI.md) with a lessons section, three example lines, and the prompt that has your AI add them when you close the session.
The shape of each lesson
Your AI reads the rules file when the session opens. If every bug that already cost you time sits there in one line, the next session starts out knowing where to look.
If [what you saw], check [what] first.
Start with the symptom, because that’s all you know when the bug comes back. End with where to look, not with how it got fixed.
- 1“We fixed the cache thing.”
- The first one doesn’t say what you saw or where to look. Your AI recognizes the second one as soon as the symptom comes back.
- “If a screen shows yesterday’s data, check that screen’s cache first.”
| Tool | Where it goes |
|---|---|
| Claude Code | CLAUDE.md in the project root |
| Codex (OpenAI) | AGENTS.md in the root |
| Gemini CLI | GEMINI.md in the root |
| Cursor | An .mdc file in .cursor/rules/ (it also reads AGENTS.md and CLAUDE.md) |
| ChatGPT | In your Project’s instructions |
- 01Download the PDF and copy the template into your tool’s rules file: CLAUDE.md, AGENTS.md, GEMINI.md, or .cursor/rules. In ChatGPT, into your Project’s instructions.
- 02Fill in “What this is” and “How to run it.” Leave “Lessons” empty.
- 03Every time you fix something, paste the prompt before closing the session. Your AI writes the line and shows it to you before saving it.
The PDF has the full template to copy as is, three well-written example lines, the prompt that has your AI add the lessons when you close the session (plus its short version), and three rules to keep the file from growing too much.
I’ll email it to you.
Leave your email and it’ll arrive in a minute. No spam: I only write when I post something new worth your time.