Day 33 · Karpathy ranted. Someone shipped it.
Day 33 · AI Hacks 170,000+ ★ on GitHub

Karpathy ranted. Someone shipped it. Your AI behaves now.

Your AI keeps rewriting code you told it not to touch, then swears it's sure when it's dead wrong. There's a 65-line text file that fixes both — and it became one of the most-starred files on GitHub. Here's the part nobody mentions: Karpathy didn't even write it.

The origin

Andrej Karpathy posted four complaints about AI coding on Twitter. Silent assumptions. Bloated code. Collateral damage to files nobody asked about. Fake confidence.

A developer turned those four rants into four rules, dropped them in a file, and open-sourced it. No secret model. No magic prompt. Just house rules — the kind you'd give a good junior dev.

The system

Four rules. That's the whole thing.

1
Ask first. Don't assume.
Official · Think Before Coding
If anything is unclear, it asks before writing a single line. Assumptions get stated out loud; two readings of a request get presented, not silently picked.
kills most of the rubbish on its own
2
The simplest thing that works.
Official · Simplicity First
Minimum code that solves the stated problem. No 200-line "solution" when three lines do the job, no speculative abstractions.
3 lines. done.
3
Don't touch unrelated code.
Official · Surgical Changes
If a file wasn't part of the task, it doesn't get to "improve" it. No drive-by refactors, no reformatting, no renames in working code.
stops it breaking what already worked
4
Say when you're not sure.
Official · Goal-Driven Execution
If it's guessing, it tells you — instead of handing you something confidently broken. Vague asks become checkable success criteria.
honest beats confident
How to install

Drop it in once.

Drop the rules in a file called CLAUDE.md at the root of your project. Claude Code reads it automatically, every session. Not just Claude — the same four rules work as a rules file in Cursor and Codex.

~/your-project/CLAUDE.md
# House Rules

## 1 · Think before coding
State assumptions explicitly. If uncertain, ask.
If multiple interpretations exist, present them — don't pick silently.

## 2 · Simplicity first
Minimum code that solves the problem. Nothing speculative.
No features beyond what was asked.

## 3 · Surgical changes
Touch only what the task requires.
Unrelated code, comments, formatting: leave them alone.

## 4 · Goal-driven execution
Convert vague asks into verifiable success criteria.
If you're guessing, say so — before coding, not after.
Reality check

What actually changes.

✕ Before

Ask for a button change, get a refactored auth flow. 200 lines you didn't want, two files you didn't mention, and an AI that's "sure" right up until production breaks.

✓ After

It asks the one clarifying question first, ships the three lines that solve it, leaves everything else untouched, and flags exactly where it's unsure. Like a junior dev you'd actually promote.

Resources

Go straight to the source.

Want the copy-paste version? Comment RULES.

Drop RULES on today's reel (or reply to this email) and I'll send you the file ready to paste into your project.

Send me the file ↗
M Mike Oddoye · OptiMAX.ai · AI Hacks, daily