New: outcomized services. Pay per result, with a monthly cap you set. See pricing →
Engineering

The Four Rules We Give Every AI Coding Agent

Updated 2026-10 · 9 min read · By the Founder of Outcomizer, former CTO and co-founder

Every coding agent we run starts with the same four rules loaded before it reads a single file. They come from Andrej Karpathy's public notes on how language models fail at coding, and we turned them into a skill our agents load on every write, review, or refactor. None of the four is clever. All of them exist because we watched an agent break one of them and cost us a day.

The rules are: think before coding, simplicity first, surgical changes, and goal-driven verification. Below is what each one means in practice, what the agent does without it, and why together they are the reason a 15-day MVP is a real schedule for us and not a slogan.

Want this built, not just scoped?A live AI MVP on your domain in 15 days for $4,500. Then $1,500 a week sprints.

Rule 1: Think before coding

The default behavior of a coding model is to pick an interpretation silently and start typing. Ask for "export users to CSV" and you get a full export of every column, including the ones you did not want leaving the database, with a guess at the date format. The model was not confused. It hid the ambiguity from you.

Our rule tells the agent to state its assumptions, list the interpretations when there is more than one, say so when a simpler approach exists, and stop and ask when something is unclear. In practice the agent replies with three lines first: "I am assuming admin-only access, these six columns, ISO dates. Two options for large exports: stream now, or queue a job. Streaming is simpler for under 50k rows. Proceed?" That costs thirty seconds of reading and saves a rewrite.

The point is not politeness. A wrong assumption caught before code exists is free. The same assumption caught in review costs the diff, the review, and the trust you had in the next diff.

Rule 2: Simplicity first

Left alone, agents build for a future nobody asked for. A request for one webhook handler comes back as a handler registry, a plugin interface, a config file for retry policies, and error handling for cases that cannot happen. Each piece looks reasonable. Together they triple the surface you have to read, test, and own.

The rule is blunt: minimum code that solves the problem. No features beyond the request, no abstraction for single-use code, no configurability nobody requested, no handling for impossible states. If the agent wrote 200 lines and it could be 50, it rewrites. The check we ask it to run on itself is the one we run in review: would a senior engineer call this overcomplicated?

Before the rule, a "save draft" feature arrived with a generic persistence layer. After the rule, it arrived as one function, one table column, and one test. The second version is the one you can still change in week two of an MVP.

Rule 3: Surgical changes

This is the rule that protects your codebase from helpfulness. An agent fixing a null check will also reformat the file, rename two variables it finds unclear, and delete a function it thinks is dead. The fix is three lines. The diff is three hundred, and the real change is now hidden inside it.

So the agent touches only what the task needs. It matches existing style even when it would write it differently. It mentions unrelated dead code instead of deleting it. It removes imports and helpers that its own change made unused, and nothing else. The test we apply to every diff: each changed line should trace directly to the request.

If your team is spending more time reading AI diffs than writing code, this is usually the rule that is missing. Small diffs are the reason we can review every change a human did not write, every day, without it becoming the bottleneck.

Want this built, not just scoped?

A live AI MVP on your domain in 15 days for $4,500. Then $1,500 a week sprints.

See the 15-day AI MVP

Rule 4: Goal-driven verification

"Make it work" is not a goal an agent can check. It will declare success the moment the code compiles. The fourth rule turns every task into something verifiable before work starts. "Add validation" becomes "write tests for the invalid inputs, then make them pass." "Fix the bug" becomes "write a test that reproduces it, then make it pass." "Refactor this" becomes "tests pass before and after."

For anything with more than one step, the agent writes a short plan where each step has its own check: create the migration, verify it applies on a copy of the schema; add the endpoint, verify the test hits it; wire the UI, verify the happy path in the browser. Strong success criteria let the agent loop on its own. Weak ones send it back to you every ten minutes.

This is also where most of the speed comes from. An agent that knows how to prove it is done does not need a human watching it. It needs a human reading the proof.

How the rules turn into a 15-day MVP

A fixed 15-day build only works if the days are not spent undoing work. Rule 1 front-loads the questions into day one, when scope is still cheap. Rule 2 keeps the product small enough to finish. Rule 3 keeps each day's diffs reviewable, so review happens daily instead of in a panic at the end. Rule 4 means every feature arrives with its own proof, so the last three days go to polish and launch, not to discovering what broke.

We pair the rules with a plain cut list. Anything not needed for the first paying user waits for an iteration sprint. That is why we can price an AI MVP at a fixed $4,500 and keep the schedule honest.

Adopting the rules on your own team

Put the four rules in the instructions file your agent always loads, in plain words, with one example each. Keep it short. A rule file that runs to ten pages gets skimmed by models and humans alike.

Then enforce them in review, not in the prompt alone. Reject diffs with unrelated changes. Reject features with no stated check. Ask "what did you assume?" when a pull request has no assumptions written down. Within a couple of weeks the agent output changes because the feedback loop changed. The rules bias toward caution over speed, so use judgment on trivial tasks: a one-line typo fix does not need a plan.

Key takeaways

  • Make the agent state assumptions and options before it writes code. Wrong assumptions are free to fix before the diff exists.
  • Minimum code that solves the request. No speculative abstraction, configuration, or impossible-case handling.
  • Every changed line should trace to the request. Small diffs are what make daily human review possible.
  • Turn every task into a check the agent can run itself: a failing test first, then a passing one.
  • Enforce the rules in review, not just in the prompt, and the agent output changes with the feedback.

Frequently asked questions

On trivial tasks, slightly. On anything real, they make it faster end to end, because the time saved on rewrites and long reviews is far larger than the time spent stating assumptions and writing a check first.

In whatever file your agent loads on every session, such as a CLAUDE.md or a skill that triggers on write, review, and refactor tasks. Keep them short enough that they are read in full every time.

No. They make review cheaper. The agent still does not verify its own work. A human reads the diff and the proof it produced.

For a focused first version aimed at the first paying users, usually yes. If your v1 needs complex integrations, regulated data handling, or several user roles, we will tell you on the first call that it needs a different scope or a different engagement.

Free playbook

The 15-Day AI MVP Playbook

Day-by-day plan, a starter CLAUDE.md, the Lovable-to-production checklist, eval and cost worksheets, and 10 prompts. Pure value, no pitch.

Get the playbook →
Next step

Book 20 minutes, or send a brief

A former CTO replies. You leave with a written plan and a fixed estimate.

No spam. One reply within one business day. Or skip the form and book a call.

Thank you. Your brief is on its way. Grab a time now so we can talk it through.

Prefer LinkedIn? Connect with Harish.

HG
Harish Ganapathi, Founder of Outcomizer, former CTO and co-founder

I started Outcomizer because hourly billing rewards the wrong thing. As a CTO I led an 18-engineer team and shipped the products in these case studies, including a Fortune 100 shipping system and a SaaS we later sold. Now I put my fee on the result. I still do the work. You work with me, not a sales layer on top of a bench.

Connect on LinkedIn →
Book a callFree lead test