When AI makes the same mistake twice, don't just fix the output. Fix the instructions.
I run my dad Bill's Mahjong Tarot business as a one person company. Claude builds the site, writes the emails and ships the code. I ask, judge and approve. That only works if Claude doesn't make me correct the same thing every morning. So every mistake that happens twice becomes a written rule, in a file Claude reads before it starts work. This guide is how I do it, with the real rules and the one that went wrong anyway.
The method: correct it once, write it down the second time
I didn't invent this. It's in Anthropic's own guide to Claude Code memory. Every project can have a CLAUDE.md file, and Claude loads it at the start of every session. The guide says to add a rule when "Claude makes the same mistake a second time", or when you type the same correction you typed last session. The best practices page adds two more ideas that shaped how I work:
- Keep the file short. Every line takes a little of Claude's attention on every task. Anthropic suggests under 200 lines.
- Procedures go in skills. A skill is a file of instructions for one kind of job. Claude sees its name every session, and reads the whole thing only when the job comes up.
And one warning: if you keep adding emphasis to a rule and Claude still misses it, the rule belongs in something that checks it, not in more words.
That gives four places for a lesson to live. The project rules, for things that are true on every task. A skill, for how to do one job. A check in the code, for a rule that can never break. And for one-off mistakes, nowhere: correct it and move on.
Step 1: The second time, have Claude write the rule
On Day 2, Claude got a few things wrong more than once. The brand is "Mahjong Tarot", never "The Mahjong Tarot". The Facebook Page is English only. The Toad isn't the money card. Jade, Phoenix or Pearl are.
The first time, I corrected it. The second time, I told Claude to write the rule into the project's CLAUDE.md, and it did, in one commit. This is what landed:
Brand name: "Mahjong Tarot", exactly as the site's wordmark shows it. Never "The Mahjong Tarot", and never describe it as a method ("Mahjong Tarot is divination with tiles"): it is the brand. [...] Applies to videos, watermarks, end cards, posts, pitches and briefs.
Facebook Page is English-only (US/UK/AU audience): no translation step, no Vietnamese celebrities or asides.
Notice what Claude put in. Not just the rule, but where it applies and what wrong looks like. "Never describe it as a method" came from a real wrong sentence. A rule with the bad example in it is much harder to break than a rule that only says what's right.
I don't write these myself. I say what went wrong and what I want, Claude drafts the rule, and I read it before it goes in. My job is to judge whether the rule is right, not to type it.
Step 2: Write the reason and the date with the rule
A bare rule gets broken the first time a case looks a little different. So my rules say who decided, when, and why.
Here is the start of one from the Mahjong Tarot project file:
One element per animal (Dave, 2026-11-20). Use Bill's fixed elements [...]. Never the BaZi branch element [...] in scoring or copy [...]: two elements for one animal confuses customers.
"Dave, 2026-11-20" tells Claude this is a decision, not a guess it can improve on. "Two elements for one animal confuses customers" tells it why, so it can apply the rule to a case I never thought of.
The same goes for skills. My email-writing skill opens with a hard rule, and the reason is right under it: on 21 November, template emails were merged and 31 leads were enrolled before I had read them, and they had to be paused. Now the skill says Claude shows me the actual emails before any code that sends them can merge. The story is the reason the rule holds.
Step 3: Keep the rules file a map, not a manual
A rules file grows. Mahjong Tarot's had reached 325 lines by August. Claude rewrote it as a short map: where the design system lives, which database is the real one, how a change ships, and which skill to read for each job. The old file is archived in the repo, so nothing was lost.
A map works because most of what Claude needs is already in the code. The rules file should hold only what Claude can't work out by reading: decisions, traps, and "never do this again". One line from it says the database credentials file at the root is stale "and has burned a session before". That line exists because a session wasted time on the wrong file. Now none do.
Step 4: Put how-to-do-the-job in skills
Rules that only matter for one job go in a skill, not the project file. I write my blog series with a skill called day-outline. It changed twice on 29 November alone, each time after a miss:
- "Always 'I', never 'we'." I'm a one-person business, and early posts kept saying "we".
- Never run the post builder on an existing day folder. It deletes the folder first, including my raw files and the outline.
- The two editing rounds became checklists. The skill said to run an edit round and an SEO round before publishing. A post went out with only the SEO numbers checked. Now each round is a list of boxes, and Claude must say in its reply what each round changed, or why it changed nothing.
That last one is the pattern to copy. When a written step gets skipped, don't write it louder. Turn it into something Claude has to show it did.
Step 5: When a rule can never break, make it a check
On Day 8, one unclear rule sent about 570 people the wrong Chinese sign. I had told the email recipes to "use the reader's sign" and never said which element. Claude picked a sensible one. It wasn't the one I meant. Worse, the fact check that should have caught it was built from the same instructions, so it passed every email.
The fix had two parts. Claude wrote the rule clearly: a reader's sign is their birth year, so someone born in 1951 is a Metal Rabbit. And it changed the fact check so it only passes a sign that matches the reader's own birth year, and fails if it doesn't know their birthday.
Then it happened again. On 29 November, a weekend sale email was built by a one-off script that went around the checker, and every Sheep reader was told they were a Fire Sheep, including people born in a Wood year. The rule was written down. The check existed. The script just didn't use it.
So Claude moved the check to the one place every email passes through: the sender. Now any broadcast that pairs an element with an animal goes back to draft with the reason, and every recipient's email is checked against their own birth year before it sends. The rules file now ends that rule with: "a one-off script that bypasses the sender must call it too."
That's the lesson I took from it. A written rule stops Claude from making a mistake. A check stops anything from making it, including Claude on a day it skips the rule.
Fix the instructions, not the output
Every time something goes wrong, there are two fixes. One fixes this email. The other fixes every email after it. The first is faster today. The second is the only one that compounds.
It works the same for an agent that isn't Claude. When my customer service agent made a mistake, the fix wasn't in the agent, it was one more line in its SOP. I wrote that up in How I Built a Customer Service Agent With Grokbot.
And when the rule was unclear, the mistake was mine, not the AI's. Claude filled the gap with a reasonable guess. Clear rules are part of leading AI, the same way clear expectations are part of leading people.
Do it yourself
- Create a CLAUDE.md in your project. Ask Claude to draft it from your code, then cut it to what Claude can't learn by reading.
- The first time Claude gets something wrong, correct it. The second time, tell Claude to write the rule into CLAUDE.md, with the wrong example in it.
- Make every rule say who decided, when, and why.
- When the file passes a page or two, ask Claude to turn it into a map and archive the old one.
- Move how-to-do-one-job rules into a skill. When a step in a skill gets skipped, turn it into a checklist Claude has to report on.
- For any rule that can never break, like a price, a name or a customer's sign, have Claude build a check where every piece of work passes through, not just a line in a file.