Inigo AnguloContact
Work01How I think02Lab03Writing04
Writing

How to build an MVP with AI agents: the full method, from scope to production

Inigo AnguloNovember 4, 202612 min readBuilding with AI agents

This is the method I use to build a production MVP with a team of AI coding agents, written as steps you can follow. It is not a weekend tutorial and it is not a warning. It is what produced 445 merged pull requests, 15 gated releases and a product in production in seven weeks, with one person scoping, deciding and approving, and no engineers on payroll. Every step links to a deeper piece.

7steps, in the order they have to happen
1page of scope before the first prompt
5checks before main accepts a merge
0agents with production credentials

Step 0: decide whether agents are the right tool

Agents compress the writing of code. They do not compress deciding what to write, verifying that what was written works, or designing something a customer wants to look at. If your product's risk is in the code (a hard algorithm, a novel integration), agents help less than you hope. If the risk is in the product (will anyone pay, does the workflow hold up), agents are the cheapest way ever invented to find out, because the first version costs weeks instead of quarters.

The test: can you write, in one page, what the product must do, what it must never do, and who may see what? If yes, go. If no, the week you would spend building is better spent writing that page, and you should not touch an agent until it exists.

Step 1: scope the MVP as invariants, not features

A feature list tells an agent what to add. An invariant tells it what it may never break. The second is what keeps a fast build from turning into a pile of features that contradict each other.

My scope document has four parts: the thesis in one sentence (what the user can trust the product for), the one workflow the MVP must prove, the invariants (the things that must hold in every state, each marked as enforced in the database, in the application, or both), and the explicit list of what is not built. That last list is the one that saves the most money, because agents will happily build everything you do not forbid.

Read the detail in how to scope an MVP for AI agents.

Step 2: write the project rules file before the first line of code

Every agent session starts by reading one file at the root of the repository. In Claude Code it is called CLAUDE.md; other tools have an equivalent. It is the single highest leverage artefact of the whole build, because it is the only thing that is true in every session, for every agent, after every context reset.

Mine holds: the thesis, the fixed stack with an explicit "nothing else", the hard rules (numbered, each with the incident that produced it), what counts as proof, the states a task can be reported in, and how an agent escalates a decision to me. It grew from 12 rules to 29 over seven weeks, and every addition has a date and a reason. A rules file without reasons gets argued with; one with reasons gets followed.

The structure, with a neutral example, is in CLAUDE.md example: the project rules file.

Step 3: turn the scope into tickets agents cannot misread

An agent given "add user invitations" will invent the half of the requirement you did not write. A ticket with a measurable acceptance criterion, a list of what is out of scope, and the decisions that are already taken cannot be invented around. The template is short and the discipline is total: no ticket, no work; no acceptance criterion, the ticket goes back.

The template, and the three fields that stop the most expensive mistakes, are in writing tickets for AI agents.

Step 4: structure the team so that trust comes from the edges

One agent doing everything works for a demo and fails at the first week of real scope, because it cannot review its own work and it holds every credential. The structure that held: a lead that decomposes tickets, assigns work and integrates but does not merge; workers with a mandate each (frontend, backend, data, design) that write only in the files they are assigned; a reviewer that returns a list of concrete faults; a security agent that runs a full penetration test before every release; and a verifier that can only answer from the output of a script.

The rule that mattered most: the orchestrator does not write code, and no agent to the right of it holds production credentials. The detail is in AI agent team structure for a solo builder, and the operating model with its numbers is in AI agent teams for software development.

scope rules tickets team gates release measure green: human work that does not compress / amber: where agents are checked / the first three steps happen before any code
The order is the method. Teams that start at "team" or "gates" rebuild the first three steps later, at ten times the price.

Step 5: put gates between the agents and main

Volume is the problem agents create. Ten times the pull requests, the same number of eyes. The answer is not reading faster, it is gates that mean something: lint with house rules, strict types, unit and database tests, a secrets scan on every commit of the branch, browser tests on every change that is not documentation. And the rule under all of them: a skipped check does not count as green, and nothing is declared, everything is produced by a script with an identifier.

Why that matters, with the incident that taught it, is in why a green check is not proof. The specific case of database security, where the test has to run as the user who must not get in, is in row level security with AI agents.

Step 6: release through one human gate, in numbered sets

Agents deploy to production through a workflow that holds the secrets; they never see them. Before each promotion, a security agent runs a full penetration test against local and staging, never production, and writes a verdict. A FAIL blocks the release like a red check. Then one human command, logged with who and when. Releases are batched into numbered sets because verification is a fixed cost per release and it is the cost that does not compress.

The two gates where a human must sit, and why those two and not more, are in human in the loop for coding agents. The full path from ticket to production is in from ticket to production in five hours.

Step 7: measure the build, not the activity

Four numbers told me whether the method was working: pull requests merged per week (volume), the share of CI runs that went red for a reason that was not the code (noise), decisions escalated per week (whether the scope was holding), and releases with a PASS verdict (trust). Lines of code and agent hours are activity; none of them predicts whether a customer can use the product.

What the whole thing costs, split into agent usage, infrastructure and human time, is in how much it costs to build an MVP with AI agents.

Where it goes wrong

Every failure I hit in seven weeks fits one of eight patterns, and each has a gate now. The three most expensive: a check that reported green without running; a ticket that contradicted itself eighty lines apart and an agent that built on the wrong half; and a test written to document a bug, which then protected the bug. The full list, with the gate for each, is in where AI coding agents fail on real products.

Want this run for your product? I scope, design and build MVPs this way in fixed price sprints, with the agent costs passed through. See AI product builder, or book thirty minutes.

Kit

Copy the template: MVP scope one pager, with a prompt to use it and its changelog.

Questions people ask

Can a non technical founder build an MVP with AI agents?

Yes, up to a point. Agents write the code; they do not decide what the product is, what it must never do, or whether a green check means anything. If you can write a one page scope and read a test result, you can run the method. If you cannot, you need one person who can, part time.

How long does it take to build an MVP with AI agents?

For a focused product with one core workflow, two to four weeks of calendar time is realistic when scope is written before the first prompt. The build I ran for a private client went from first commit to a first gated release in 17 days and to 15 releases in seven weeks. The time that does not compress is deciding, verifying and design.

Which tool do you use, Claude Code or Cursor?

The method does not depend on the tool. I use Claude Code because it runs multiple agents with their own mandate files and worktrees, which is what the team structure needs. The rules file, ticket template and gates work with any agent that reads files from the repository.

What is the biggest mistake people make?

Starting to build before writing what the product must never do. Agents are excellent at adding features and terrible at knowing which feature breaks the thesis. Every expensive failure I have seen traces back to a missing invariant, not to a wrong line of code.

Working on something like this?

This is how I build products with AI agent teams, from scope to production. Discuss a product idea → Or email me.