Field Guide · Building With AI ·
YAGNI · DRY · KISS · +5 More

8 Rules Every Vibe Coder Should Steal

You don't need to be a software engineer to vibe code. But you can steal decades of lessons from the people who already made all the mistakes. They gave the lessons silly names, which helps them stick. Here are the eight that'll save you the most fights with AI, what each one looks like when Claude or Cursor breaks it, and a prompt to paste so it doesn't.

How To Use This Page

Read the three big ones first. Then skip to Your Rules File and paste all eight into your project in one go. Already have an app? Run The Audit and fix what it finds, worst first.

8
Rules, Each With A Prompt
8
Honorable Mentions
1
Rules File For Your Project
Building Alone?

AI Writes The Code. Someone Has To Say No.

Claude will build whatever you ask for, and plenty you didn't. Knowing what not to build is most of the job, and it's hard to see from inside your own project.

The Solo Founder Lab · Opening Soon

I'm building a place where you learn to build products that work like a real company's on your own, and get them in front of people who pay, with a CTO who's built two seven-figure software companies in your corner.

Lab.exeWaitlist Open

A CTO Who Says "You Don't Need That."

  • Live product teardowns. Your app, your landing page and your pricing, reviewed in front of everyone.
  • Weekly CTO office hours. Live, hot-seat style. Bring the feature Claude talked you into, and we'll decide if you need it.
  • Launch Pad. When you launch, the room shows up.
  • The 30-Day Launch Plan. Validate, plan, build and launch, one week at a time. Members only.

Free to join the waitlist. Opens at $49/mo, and the price goes up as seats fill, so first in pays the least.

Why Bother

AI Makes The Old Mistakes Faster.

Someone Already Paid For These

Every rule here came out of projects that got too big, too tangled or too fragile to change. Engineers learned them the expensive way, then gave them names like KISS and YAGNI so nobody would forget. You get them for free.

Your AI Is An Eager Junior

Claude Code and Cursor write like a junior engineer who types 1,000 words a minute and never says no. They overbuild, copy and paste, and pile on packages, because nobody told them not to. These rules are how you tell them.

When Two Rules Disagree

Squeeze every repeat into one clever shared function (DRY) and you can end up with code nobody understands (KISS). When in doubt, simple wins. A little copy and paste is cheaper than the wrong shortcut.

Session.log✣
You Asked ForThe AI Built
A simple invoicing tool.Microservices for your future 10 million customers.YAGNI
The price changed to $29.Fixed in two of the five places it lives.DRY
A button.14 new files and six new packages.KISS
A fix for the welcome email.A fix that broke checkout. Same 2,400-line file.SRP
A discount code box.Pricing rules and a database query inside the button.SoC
A "Pro" badge for paid users.A badge that disagrees with Stripe.SSOT
"Is it working?""Yes!" (It was not.)TDD
A way to cancel.A Cancel button that deletes the account.POLA

Every row is a rule below. Every rule has a prompt that stops it happening again.

01–03 · The Big Three

Build Less. Write It Once. Keep It Boring.

If you only remember three, make it these. They're easy to say, a little bit funny, and each one stops a different way AI makes a mess.

01 · OverbuildingSince The Late 1990s

YAGNIYou Aren't Gonna Need It

Extreme Programming · Kent Beck and Ron Jeffries

Don't build it until somebody needs it.

Every feature you build "for later" costs you now. It's more code to read, more to break, and more for the AI to trip over next time. And later usually never comes, or it shows up looking nothing like you guessed. Build for the users you have this week, not the ones you hope to have next year.

When The AI Does It✣

You ask for a simple invoicing tool. Claude decides you need microservices, user roles and a job queue to support your future 10 million customers. Brother, you don't have one customer yet.

You're Breaking It If

  • You have an admin panel, team accounts and an API. And no users.
  • There's a settings page full of settings nobody has ever changed.
  • You've said "we'll need this when we scale."

Do This Instead

Ask for the smallest version that works, and make the AI write down its "you'll probably want" ideas instead of building them. Build one when a real user asks for it twice.

Paste This

Build only what I asked for. Don't add features, settings, user roles, abstractions or infrastructure for future needs. If you think I'll need something later, don't build it. List it at the end under "Not built (yet)" with one line on why, and I'll decide.

02 · Copy And PasteSince 1999

DRYDon't Repeat Yourself

The Pragmatic Programmer · Andy Hunt and Dave Thomas

Write it once. Use it everywhere.

If the same piece of code is copied into five places, congratulations: you now have five places to fix when it breaks, and you'll find four of them. AI is the fastest copy and paster ever built. It rarely goes looking for the function you already have. It just writes a new one. Put shared logic in one place and call it from everywhere else.

When The AI Does It✣

You ask Claude to change how prices are shown. It fixes the checkout page. The pricing page, the receipt email, the invoice and the dashboard each had their own copy. Your customer now sees $29.00, $29 and 29.

You're Breaking It If

  • Fixing one bug means hunting through several files.
  • You've found three functions that do the same thing with different names.
  • The same bug keeps coming back, from a copy you missed.

Do This Instead

Make the AI search before it writes. And don't overdo it: two copies is fine. When you see the third, make it shared. That's the Rule Of Three.

Paste This

Before writing anything new, search this codebase for functions, components or helpers that already do this or something close, and reuse them. Don't create a new helper if one exists. If you find the same logic copied in more than one place, tell me where and suggest one shared version before changing it.

03 · OverengineeringSince Around 1960

KISSKeep It Simple, Stupid

Kelly Johnson · Lockheed Skunk Works, building jets a mechanic could fix with basic tools

The boring version is usually the right one.

If there's a way to solve it in 20 lines, you don't need the 300-line version with six new dependencies. Simple code is easier to read, easier to debug, and easier to hand back to the AI next week. Every package you add is one more thing that can break, need updating or get hacked.

When The AI Does It✣

You ask Claude to add a button to your page. It creates 14 files, installs six packages and sets up a state management library. Something has gone horribly wrong.

You're Breaking It If

  • A small change touched more than a handful of files.
  • Packages show up in your project that you never asked for.
  • You can't explain what a file does in one sentence, and neither can the AI.

Do This Instead

Ask for the simplest version first, and set a tripwire: if it needs lots of files or a new package, it has to stop and explain why before it goes ahead.

Paste This

Use the simplest approach that works. Prefer fewer files, fewer lines and the tools already in this project. Don't add a new dependency without asking me first and telling me why what we already have won't do. If your change needs to touch more than 3 files, stop and explain why before you start.

04–08 · Five More

The Ones That Save You Later

These sound more like a computer science class, but they're just as simple. They matter most once your app has real users and real data, and you need to change it without breaking it.

04 · The Junk DrawerSince The Early 2000s

SRPSingle Responsibility Principle

Robert C. Martin · The S in SOLID

Every piece of code gets one job.

A function that looks up the user, checks their plan, writes the email and sends it has four different reasons to break. Split it up, and when emails go out wrong, you know exactly where to look. It helps the AI too: a small file with one job fits in its head. A 2,000-line file doesn't, so it guesses.

When The AI Does It✣

Your app has a file called utils.ts. It's 2,400 lines long. It handles dates, payments, emails and, for some reason, the dark mode toggle. Every time Claude edits it, something unrelated breaks.

You're Breaking It If

  • You can't describe a file without using the word "and".
  • Some files are over a few hundred lines and still growing.
  • Changing the email wording somehow broke payments.

Do This Instead

Name things for the one job they do. If the name needs an "and" in it, it's two things. Split big files slowly, one at a time, with tests in place first.

Paste This

Keep each function and file to one clear job. If a function does more than one thing, split it into smaller functions whose names say exactly what they do. If you're working in a file over 300 lines that does several jobs, point it out and suggest how to split it, but don't split it without asking me.

05 · The TangleSince 1974

SoCSeparation of Concerns

Edsger Dijkstra · One of the founding fathers of computer science

Keep the screen, the rules and the data apart.

Most apps have three layers: what people see, the rules of your business (who can do what, what costs how much), and where the data lives. When they're tangled together, redesigning a button can break billing. Keep them in separate places, and you can change one without touching the other two.

When The AI Does It✣

Claude puts a database query, the discount math and your Stripe secret key inside the "Buy" button. It works. Until somebody opens their browser's dev tools and finds the key.

You're Breaking It If

  • Your page components talk straight to the database.
  • Prices, limits and permissions are written inside your UI code.
  • A design change means touching payment code.

Do This Instead

Let the screen ask for things and show them. Put the rules in their own functions, and keep database calls and secret keys on the server. The Security Checklist covers the keys.

Paste This

Keep UI, business logic and data access separate. Components only display data and handle clicks. Business rules (pricing, permissions, limits) live in their own functions. Database and API calls live on the server, and secret keys never go in front-end code. Follow the structure this project already uses. If there isn't one, propose a simple one before writing code.

06 · Two TruthsDatabase Lore

SSOTSingle Source of Truth

From database design · Learned by everyone whose two numbers disagreed

Every fact lives in exactly one place.

Your plan prices, a user's subscription status, the features on each tier. Store any of these in two places and they will disagree eventually. Then you've got a customer who's "Pro" in your app and "cancelled" in Stripe. Pick one home for each fact and have everything else read from it. DRY is about not repeating code. SSOT is about not repeating facts.

When The AI Does It✣

The Pro plan is $29 on your landing page, $39 in your database, $19 in Stripe and "contact us" in the FAQ. Claude updated one of them.

You're Breaking It If

  • Every update comes with "oh, and change it in the other place too."
  • Your app and your payment provider disagree about who's paid.
  • The same number is typed into several files.

Do This Instead

Decide who owns each fact. Stripe owns who's paid. One config file owns prices and limits. Everything else reads from those and never keeps its own copy.

Paste This

Every piece of data and config should have one home. Before adding a value (a price, a limit, a plan name, a status), check whether it's already stored somewhere and read it from there. Don't copy it into a new constant, file or table. If you find the same fact stored in more than one place, list every place and tell me which one should be the source of truth.

07 · "It Works!"Since 2002

TDDTest-Driven Development

Kent Beck · Test-Driven Development: By Example

Decide what "working" means before you build it.

Write a test that describes what the code should do, watch it fail, then write code until it passes. For vibe coders it's a superpower. The test gives the AI a clear finish line, and it tells you in seconds whether today's change broke something from last week. You don't have to write the tests yourself. You just have to ask for them first.

When The AI Does It✣

Claude says "Done! Everything's working." You open the app. The login page is blank. "You're absolutely right!" Without a test, "done" just means it stopped typing.

You're Breaking It If

  • The only way you check it works is clicking around.
  • Fixing one bug brings back an old one.
  • You're scared to ask for changes to the parts that work.

Do This Instead

Start every feature with "write the tests first." Start with the things that cost you money or users if they break: sign-up, login and payments. And watch for the classic cheat, where the AI edits the test until it passes.

Paste This

Before writing the code, write tests that describe what it should do, including edge cases (empty input, bad input, a user who isn't logged in). Run them and show me they fail. Then write the code until they pass. Never change or delete a test just to make it pass. If you think a test is wrong, stop and tell me why.

08 · The SurpriseSince The 1960s

POLAPrinciple of Least Astonishment

Programming language and interface designers · Also called the Principle of Least Surprise

It should do what people expect.

If a button says Save, it saves. If it's red, it's dangerous. If I hit Back, I go back. Every time your software surprises someone, you lose a little trust, and probably gain a support email. It applies to code too: a function called getUser should get a user, not quietly change one.

When The AI Does It✣

The "Cancel" button cancels the subscription, not the pop-up. The logo links to the settings page. And getUser creates a new account if it can't find one. Nobody asked for any of this.

You're Breaking It If

  • Users email you asking how to do something basic.
  • You've watched a tester hover, hesitate and not click.
  • You've had to explain what a button does.

Do This Instead

Copy the patterns people already know from apps they use every day. Boring is good here. Then watch one stranger use it without helping them. Every pause is a surprise to fix.

Paste This

Make everything behave the way a normal user would expect. Use the standard patterns well-known apps use for buttons, forms, navigation and errors. Name functions for exactly what they do, with no hidden side effects. Anything destructive needs a clear label and a confirmation. When you're done, list anything in this feature that might surprise a first-time user.

Honorable Mentions

Eight More For The Group Chat

Engineers have been naming their mistakes for a long time. These didn't make the main list, but each one is worth knowing, and a couple are worth putting on a sticky note.

WET✣

Write Everything Twice

The opposite of DRY

Also "We Enjoy Typing." If an engineer calls your code WET, it isn't a compliment.

Rule Of 31999

The Rule Of Three

Don Roberts, via Martin Fowler's Refactoring

Copy it once, fine. The third time, make it shared. It's what keeps DRY from turning into clever code nobody can read.

GIGO1950s

Garbage In, Garbage Out

Early computing

The oldest rule for prompting, decades before prompts. A vague ask gets vague code. The AI can't build what you haven't described.

Scouts2008

The Boy Scout Rule

Robert C. Martin, Clean Code

Leave the code a bit cleaner than you found it. Ask the AI to tidy what it touched, not rewrite the whole app.

Fence1929

Chesterton's Fence

G.K. Chesterton

Don't take down a fence until you know why it was put up. When the AI wants to delete code it doesn't understand, ask what it does first.

Gall1975

Gall's Law

John Gall, Systemantics

Every complex system that works grew from a simple system that worked. Ship the small version first. You can't skip to the big one.

Work.Right.Fast✣

Make It Work, Make It Right, Make It Fast

Kent Beck

In that order. Most apps never need step three, and none of them need it first.

Knuth1974

Premature Optimization

Donald Knuth

"The root of all evil," in Knuth's words. Don't tune your app for a million users when you've got nine.

Your Rules File

Paste All Eight In Once

The prompts above work one at a time. This puts all eight in the file your AI reads at the start of every session, so you don't have to remember them. It's short on purpose. Long rules files get skimmed.

CLAUDE.md
## How to build in this project

Follow these rules on every change. If one of them gets in the way of what I asked for, ask me before breaking it.

- YAGNI: Build only what I asked for. No features, settings or infrastructure for "later". Put ideas under "Not built (yet)" instead.
- DRY: Search for existing code before writing new code, and reuse it. Don't copy logic into a second place.
- KISS: Use the simplest approach that works. No new dependencies without asking. If a change touches more than 3 files, explain why first.
- SRP: One job per function and per file. If it needs "and" to describe it, split it.
- SoC: Keep UI, business rules and data access in separate places. Secret keys never go in front-end code.
- SSOT: Every fact (prices, plans, limits, statuses) lives in one place. Read it from there. Never copy it.
- TDD: Write tests for what the code should do before writing the code. Never edit a test just to make it pass.
- POLA: Things should behave the way a normal user expects. Name functions for exactly what they do. Destructive actions need a confirmation.

When you finish, tell me what you changed, what you chose not to build, and any rule you had to bend.
Where It Goes

Claude Code reads CLAUDE.md in your project folder. Cursor reads files in .cursor/rules. Codex and most other agents read AGENTS.md. Same text works in all of them.

Add Your Own

Every time the AI makes the same mistake twice, add one line here. That's how this file gets good.

Still Check The Work

Rules make mistakes rarer, not impossible. Read the summary at the end of every change, and ask "why?" about anything you didn't ask for.

The Audit

Already Built It? Grade It.

If your app is already a few months of vibes deep, run this in Claude Code or Cursor from your project folder. It scores your code against all eight rules, in plain English, and tells you what to fix first. It doesn't change anything.

Audit.Prompt
You're a senior engineer reviewing a codebase that was built mostly by AI, for a solo founder who isn't a software engineer. Review this project against eight classic rules: YAGNI, DRY, KISS, SRP, SoC, SSOT, TDD and POLA.

Don't change any code yet.

For each rule:
- Give it a score from 1 to 5.
- Show me the worst 3 examples, with file paths and line numbers.
- Explain in plain English what could go wrong because of it: bugs, cost, security or confused users.

Then give me a top 5 fix list, ranked by how much each problem would hurt a business with real customers. For each fix, say how big the change is (small, medium or large), and whether it's safe to do now or needs tests first.

Be blunt and skip anything that's fine. Count over-engineering as a problem, not a strength.
Fix The Top One

Not all five. Fix the worst one, test it, commit it, then run the audit again. Big cleanups are how working apps get broken.

Tests Come First

If the audit says "needs tests first," believe it. Ask for tests around that part before you let the AI rearrange it.

Run It Monthly

Code drifts. A quick audit every month catches the junk drawer while it's still a drawer.

One More Thing

The Hardest Rule Is YAGNI.

Anybody can build software now. Not everybody can build a business.

The Solo Founder Lab

The AI will never tell you to stop building. The Lab is for Founders who want someone who will: weekly office hours with a CTO who's built two seven-figure software companies, and a room of other Founders who care whether anybody buys what you're making.

Lab.exe✣

Less Theater. More Customers.

Want my 30-Day Launch Plan? It's for Lab members only: validate, plan, build and launch, one week at a time.

See The Solo Founder Lab ▶