A2X← Back to A2XWorkshop resource
The Agent Dispatch No. 04 — Coding Discipline

Sixty-Five Lines
That Fixed the Robot

A plain text file — no install, no config — that drags AI coding agents back from guessing, bloating, and breaking the code they were never asked to touch.

65
Lines of plain text
65 → 94%
Reported accuracy jump
220k+
Developers on GitHub

You ask the AI to add a button. It rewrites three files, invents a configuration system you never wanted, and breaks your tests on the way out. Sound familiar?

The complaint is old and the source is credible. Andrej Karpathy — ex-Tesla AI, OpenAI co-founder — called out coding agents for the same recurring sins: they make wrong assumptions and run with them, overcomplicate everything in sight, and edit code they don't understand as a side effect of an unrelated task.

The fix was not a new model or a paid tool. Developer Forrest Chang distilled the complaints into four rules and dropped them into a single CLAUDE.md file. Claude Code reads it automatically at the start of every session. Cursor reads its equivalent too. No setup, no flags — drop it in the project root and the rules apply instantly.

"Don't tell it what to do, give it success criteria and watch it go."
The Four Rules

Tap any rule to open it.

1
Think Before Coding
Kills · wrong assumptions, hidden confusion
+
Don't assume. Don't hide confusion. Surface tradeoffs.
  • State your assumptions explicitly. If uncertain, ask.
  • If multiple interpretations exist, present them — don't pick silently.
  • If a simpler approach exists, say so. Push back when warranted.
  • If something is unclear, stop. Name what's confusing. Ask.
2
Simplicity First
Kills · overcomplication, bloated abstractions
+
Minimum code that solves the problem. Nothing speculative.
  • No features beyond what was asked.
  • No abstractions for single-use code.
  • No "flexibility" or "configurability" that wasn't requested.
  • No error handling for impossible scenarios.
  • If you write 200 lines and it could be 50, rewrite it.
The testWould a senior engineer say this is overcomplicated? If yes, simplify.
3
Surgical Changes
Kills · orthogonal edits, touching code you shouldn't
+
Touch only what you must. Clean up only your own mess.
When editing existing code
  • Don't "improve" adjacent code, comments, or formatting.
  • Don't refactor things that aren't broken.
  • Match existing style, even if you'd do it differently.
  • If you notice unrelated dead code, mention it — don't delete it.
When your changes create orphans
  • Remove imports/variables/functions that YOUR changes made unused.
  • Don't remove pre-existing dead code unless asked.
The testEvery changed line should trace directly to the user's request.
4
Goal-Driven Execution
Kills · vague "make it work" loops
+
Define success criteria. Loop until verified.

Transform vague tasks into verifiable goals:

"Add validation"Write tests for invalid inputs, then make them pass
"Fix the bug"Write a test that reproduces it, then make it pass
"Refactor X"Ensure tests pass before and after
For multi-step tasks, state a brief plan
1. [Step] → verify: [check] 2. [Step] → verify: [check] 3. [Step] → verify: [check]
Why it worksStrong success criteria let the agent loop independently. Weak criteria require constant clarification.
Seeing It In Action

Same request. Two agents.

One follows the rules. One doesn't. Watch the diff.

$ "Add a button that clears the search input."
# 3 files changed, 147 insertions(+), 22 deletions(-)
+ src/config/ButtonThemeProvider.tsx   (new, 68 lines)
+ src/hooks/useClearableInput.ts       (new, 41 lines)
- // legacy comment removed "for clarity"
- const handleSubmit = ...  // refactored, unrelated
+ <Button variant={theme.resolve('ghost')} ... />
It invented a theme system, a custom hook, and quietly refactored an unrelated submit handler. Your tests are now red.
# 1 file changed, 4 insertions(+)
  Assumption: clear = reset input to empty string. Confirm?
+ <button onClick={() => setQuery('')}>Clear</button>
  Verify: typing text then clicking Clear empties the field. ✓
It stated its one assumption, changed four lines, and named how to verify success. Nothing else moved.

Take the Rules Home

Grab our adapted version for whichever tool you use. Each file is purpose-built for how that tool actually loads instructions.

For Claude Code · Cursor
CLAUDE.md
Drop in your project root. Read automatically at the start of every session — zero setup.
For Claude Cowork
SKILL.md
Skill-formatted with frontmatter so Cowork triggers it on any non-trivial coding task.