Every Rule I Wrote Started as a Mistake
AI told me I was brilliant today.
Walked me so far down a rabbit hole that what we built looked amazing from the outside. Then I looked at the code. Spaghetti. Architecture built to chase how it looked instead of how it worked.
Then you go to deploy. You go to commit. And reality hits.
The rule file problem
I had 45 rule files governing my AI agents. Style rules. Safety rules. Anti-patterns. Deployment checklists. Naming conventions. Conflict resolution hierarchies.
Every time something went wrong, I wrote another rule. AI hallucinated a file path? New rule. AI skipped a test? New rule. AI used the wrong import? New rule.
At some point the rules started contradicting each other. The AI was trying to follow 45 files of instructions and making worse decisions than when it had five.
The governance I built to prevent mistakes was creating new ones.
Reverse engineering the problem
The best way I learned to use AI is to reverse engineer the problem. Ask more questions instead of assuming you already know the answer.
In that process you actually learn. You understand the mechanics. Stuff you never got before becomes a concept. That concept becomes better architecture. You refactor. You approach it differently. You actually own what you built.
I stopped writing rules for every failure and started asking why the failure happened in the first place.
Document your anti-patterns
The thing that made the biggest difference wasn't more instructions. It was documenting what NOT to do.
AI will always try to solve the problem. The question is whether it solves it the way you already learned the hard way doesn't work.
When you feed it the anti-patterns — the bad shortcuts, the traps, the architectural decisions that looked smart at 2am and broke everything by morning — you stop repeating history. The AI stops repeating it with you.
That documentation becomes your memory. It becomes the guardrails. It's better than a style guide. It's institutional knowledge from real failures.
I added Husky for pre-commits because of an anti-pattern. Workspace rules and knowledge items in Antigravity because of an anti-pattern. CI with GitHub Actions because of an anti-pattern. Every feature needs a PR before it touches prod because of an anti-pattern.
None of that came from reading best practices. It came from breaking things and writing it down.
Stay grounded
I've probably solved the same problem with AI ten times already. Each time a different way. Each time thinking that was the version that would stick. Most of them didn't.
The thing that felt like a breakthrough yesterday is usually the thing I'm refactoring tomorrow. And the anti-patterns I documented last month? Half of them came from decisions I was confident about at the time.
I don't know what I don't know yet. That's the whole point of writing it down.