Execution (2): Building a Product with Agents#

Once you have chosen an idea, it is time to build. This chapter covers the process of building a product alone with coding agents. It is not about which language or framework to use. It is about where a person should stand in an era when agents write the code, what to leave behind and what to review, and what you should not build yourself. It draws on the debates I went through while reworking the development process at my company, and on the decisions I made in my own personal projects.
When the Cost of Building Falls, the Bottleneck Moves Elsewhere#
The first thing you notice when coding agents arrive is that “code comes out fast.” A few weeks later, you discover something else: the things that need reviewing pile up just as fast. The volume of change an agent produces easily outpaces the speed at which a person can read it line by line. In a one-person startup, the only person reading is the founder.
So product development in the agent era is not a question of “how do we build faster” but of “what do we review, and what do we guarantee automatically?” Everything in this chapter flows from that one sentence.
The Boundary Between Executable Drafts and Production#
Let me start with a case from my company. A product manager became able to use a coding agent to make screen changes and add features directly in the The frontend is the code for the screens users see and operate; the backend is the server-side code behind it that stores and processes data. The two exchange data through APIs. A line of work split off in git so you can work separately without affecting the main code. You can change things freely on a branch, then merge it into the main line after review or throw it away. Data put in temporarily to fill screens instead of a real server or database. It is useful for building screens before the API exists, but if you forget to replace it with real data, it goes out to users as is.
But problems appeared at the same time. Engineering concerns such as reusing internal modules, consistency with the existing structure, API boundaries, and Deciding where to keep, and how to change, the values a screen has to remember (whether the user is logged in, what is being typed, a loaded list, and so on). Because several screens use the same values, changing things without structure easily breaks one side when you change the other.
It is not that there was no effort to leave intent behind. Agents add comments to the code, write a plan before working, and leave handoff documents for the next session. The problem is that these records work well between agents but do not get through to people. They are written around file paths, steps, and status so the next agent can pick up the work, and there is a lot of them, so a person reading them for the first time struggles to see the whole picture.
Of course, you can ask the agent. And when a person who already grasps the context to some degree asks to fill in what is missing, the agent answers well. But when you have not grasped the context itself, there are times when you do not even know what to ask. The agent’s answers cannot rise above the quality of the questions.
Volume is a problem too. When someone with an intent has gone too far alone and another person then tries to understand that intent, there is not one intent to understand but several. You have to untangle which change came from which intent, and how the intents are intertwined. In the case above, too, the developers were not handed intent; they had to reverse-engineer it from the A side-by-side view of a file before and after a change, with added and removed lines marked in color. It is used to see at a glance what the agent changed, and to accept or revert only part of the changes.
And once too much has been done, even if another person sees a problem, no one dares to fix it at the root. Reluctant to throw away screens that already work and the changes that have piled up, people tend to patch things by adding an exception wherever a problem shows. It looks fast for now, but the exceptions accumulate, the structure grows harder to understand, and the long-term maintenance cost ends up far larger than the cost of fixing it at the start. Code full of exceptions confuses agents too, so the next change breeds yet another exception.
Does this problem disappear in a one-person startup where you work alone? If anything, it shows up more subtly. Since the planner and the developer are the same person, there seems to be no intent-handoff problem, but you three weeks from now are a different person. Once dozens of changes pile up where you told the agent “change it like this” and simply accepted the result, even you cannot remember which decisions were final and which were temporary, or why you chose that structure. Even with the plans and handoff documents the agent left, those are records for the agent to continue its work, not writing for you to recover the context. So you three weeks from now end up in the same position as the other person above: unsure what to ask, and leaning toward adding exceptions even when you see what should be fixed.
So the first principle I set was to treat the agent’s output as an “executable draft.” The draft is built quickly and used to validate intent, and there is a separate promotion path that raises it to The live environment real users use, or a state finished enough to be released into it. Code under development goes through testing and review before it goes to production.
- Product intent review: which user flows does this change affect?
- Design consistency review: does it fit the existing structure, modules, and
A set of rules and parts that define how to use colors, fonts, spacing, and screen elements such as buttons and input fields. When every screen uses the same parts, the whole product looks like one product, and new screens can be built quickly.
? - API and data
A promise two parts of a system agree to keep. For example, what format comes back when you send something to an API, or which data must never be empty. When contracts are clear, you can check automatically whether changing one side breaks the other.
cleanup: which APIs are needed, and what changes from the current ones? - Fake data removal plan: where does temporary data remain?
The execution environment that wraps a model and puts it to actual work. It decides which tools to give, in what order to load context, how to block dangerous commands, and how to retry on failure. Even with the same model, results differ greatly depending on the harness. In this chapter it mainly refers to the verification devices that check an agent’s results automatically, such as tests, type checks, and contract checks.
verification: types, tests, contract checks,A test that takes screenshots of screens and compares them with how they looked before, to find unintended visual changes. It catches buttons that shift or text that overlaps even when nothing looks wrong in the code.
,A test environment set up to be as close as possible to the live production environment. You check behavior here one last time before releasing to real users.
- Deployment and
Returning to the previous version when a newly deployed version has a problem. When even the data structure has changed, rolling back can be hard, so decide how to roll back before you deploy.
plan
When you work alone, these steps are not meetings but a checklist. And to address the problems above, add three things.
- Leave a separate intent document for people to read. Keep the agent’s plans and handoff documents as they are, but ask separately for a write-up for people. The key is to name a person as the reader, as in “summarize, in one page someone seeing this for the first time can read, the user flows this change affects, why it was decided this way and which alternatives were dropped, which decisions are final and which are still open, and where temporary data lives.” The
A mode in which a coding agent first reads the code and only lays out a plan of what it will change and how, before editing any files. The person reviews and approves the plan before the actual changes begin.
most coding agents have lets you get this write-up and review it before implementation. But since the result usually stays only in the conversation or the tool’s local records, move it into a file in theA project folder that git manages. It holds code and documents together with their change history. An agent running in the cloud works on a clone of this repository, so it cannot see files that are not in it.
. - Show it before going too far. Stop when one intent maps to one batch of changes, and check that another person, or your future self, can follow it. Once several intents pile up in one lump, untangling them costs more than building them.
- When you see a root problem, rebuild instead of patching. Working with agents, drafts are cheap. Rather than adding exceptions because you are reluctant to throw away the changes you have stacked up, rebuilding the draft to reflect your new understanding is far cheaper in the long run.
That intent document, written for people, is the spec you send to yourself three weeks from now.
Review Does Not Disappear; It Changes#
The important question in agent-based development is not “do we review or not” but “what do we review?” Having a person read every diff does not last long. Review has to move from being code-centered to being centered on intent, contracts, risk, and harness results. What a person should examine looks like this:
- Which user flows does this feature change?
- Which APIs are needed, and what differs from the existing APIs?
- Which data states and tables does it affect?
- Does it affect authentication, authorization, or billing?
- Where does temporary data remain?
- Can it be rolled back if it fails?
- What do the tests, type checks,
A test that opens a browser like a real user and follows a flow from start to finish, from logging in to paying. It checks not each part on its own but whether everything works together.
, and visual regression actually guarantee?
Then who looks for bugs line by line? The first gate can be handed to an agent. Have a coding agent review the change, or turn on a feature that reviews automatically when a The unit for requesting that code you changed be merged into the main repository. The changes and a description go up together, and they are merged after another person or an agent reviews and approves them. Coding agents running in the cloud usually return their work as a PR.
There is an opposing view: trust the harness more, merge first, and fix what turns out to be wrong. There is real truth in it, since the premise that a person must understand and approve all code is itself the bottleneck. But it rests on a precondition. A harness verifies only what has been specified. Tests cannot invent the correct answer on their own. Someone has to define first what correct behavior is and which data states must never break. If you go “merge first, improve later” while that definition is weak, the harness does not get stronger; you get tests that lock in wrong behavior as normal.
So we are in a transition period now. The direction to go is toward trusting the harness and merging automatically, but what the harness should treat as correct is not yet defined well enough. The principles for crossing that gap are these.
- Merge in sizes you can review in one sitting. Split large changes by user flow, page, or API and merge them separately. A change that has already grown large can be harder to split than it looks; in that case, rather than struggling to split it, it is faster to reimplement it from scratch in small units.
- Leave success criteria with every change. In addition to the intent document from the previous section, write down “what counts as done” and the edge cases that are easy to miss (when data is empty, when the user lacks permission, when the network fails). These criteria later become tests.
- Manage fake data as a list. Write down where the fake data you put in to build screens first is located, and turn each item into a task to build the real API. Fake data that is not on the list ships to production as is.
- Move the criteria people applied in review into the harness. When review produces a judgment like “this must work this way,” turn it into a test, write it as a rule in the documents and
A bundle of instructions describing how an agent should do a particular task. Put a Markdown file describing the procedure, plus any scripts it needs, in a folder, and the agent loads and follows it when that task comes up. Once made, you no longer have to explain the same job every time.
the agent reads, or fix it as a contract such as an API’s input and output format. This is the core work of the transition. If you make the harness see tomorrow what a person saw today, the range a person has to check directly keeps shrinking, and the range that can be merged automatically keeps widening.
“Merge first and deal with it later” must not become the default principle. That approach does not increase speed; it defers review cost and incident cost to the production environment, and when too many changes land at once, it becomes hard to tell where things went wrong. Experiment freely, but manage production merges in small, clear units.
Design Is a Matter of Defaults, Not Ability#
Hand screen design to a coding agent and you get reasonably decent results. But they look vaguely familiar and the details are clumsy. This is not because the agent lacks ability. Without direction, an LLM produces the most probable answer. The mode of “a decent screen” is a particular font, a purple gradient, a card grid, and a white background. That is why AI-generated designs tend to look alike. A vague request like “make it prettier” just summons the vague average again.
The solution is not to add ability but to deliberately steer the model away from its defaults. After surveying design tools and comparing mockups I generated myself, the structure I settled on has three layers.
| Layer | Role | Example |
|---|---|---|
| Guidance pack / skill | Changes the agent’s judgment and taste (divergence) | A skill that names clichés and bans them, and makes the agent decide colors, fonts, and signature elements before writing code |
| Design document | Freezes the adopted direction (convergence) | A DESIGN.md at the root: colors, typography, spacing, component rules, a banned list |
| Verification loop | Wires up the build → look → fix loop | Instructions to take screenshots via a browser An open standard that defines how AI agents connect to external services and tools. Once a service has an MCP server, any agent that supports the standard can read that service’s data and use its features. or the agent’s built-in browser and self-correct against the design document |
The generator (the skill) produces direction, but it is stateless, so it yields slightly different results every time. It does not remember that “we decided on this.” So you write the adopted direction into a design document and reference that document from the instruction file the agent always reads. The generator is the art director; the design document is the brand guideline the director signed off on. It is the single point of consistency that makes the fifth and the twentieth page still look like the same product.
The last layer is the one most often missing. Having a tool installed is different from having that tool wired into the loop. Even with a browser tool connected, without an instruction that says “after building the screen, take a screenshot, look at your own result, and fix it against the design document,” the agent builds with its eyes closed. The diagrams in this book were made the same way. The agent wrote the SVG, served it on a local server, took screenshots to check, and ran a loop fixing whatever was broken.
What You Should Not Build Yourself#
The temptation a one-person startup falls into most easily is the thought that “the core is important, so I have to build all of it myself.” This is especially true when building a product that contains an AI agent. There is a question I ran into while sketching out an AI-agent-based web service: “If this service’s agent is really going to do work, where should its coding ability come from?”
At first it is easy to think you can just attach a model API, build a file-editing feature, run The program in a terminal that takes the commands a person types and passes them to the operating system to run. An agent that can run shell commands can create and delete files and install and run programs. A general term for values that must not leak, such as API keys, passwords, and access tokens. If such a value leaks, anyone can use services with your account or access your data. Agents often see secrets while reading configuration files during work, so you need safeguards that stop them from sending those values out in logs or external requests. How well you can tell from outside what happened inside a system. If you keep logs, metrics, and records of execution flow, you can later trace what an agent was doing and where it failed.
My conclusion is that implementing coding ability itself from scratch is, for a solo developer, mostly irrational. It is more realistic to take an existing coding agent The environment in which a program actually runs, or the program in charge of running it. A coding agent runtime is the program that handles the loop of calling the model, running tools, and passing the results back to the model; Claude Code and Codex are examples. A bundle of tools and code that makes a particular service or platform easy to use. Calling an API directly means matching request formats and authentication by hand, while an SDK lets you do the same thing with a single function such as client.responses.create(). OpenAI, Anthropic, and Google all provide SDKs for major languages such as Python and JavaScript.
In this setup, the first use case should be narrow. Connect a repository, pick one issue, fix it in an isolated environment, show the test results and the diff, and create a PR when the user approves. If that one flow works well, it is a strong enough starting point. On top of it you can add a reviewer agent, cost policy, and long-term memory one at a time. The infrastructure does not need to be grand from the start either. Begin with the simplest configuration, one independent A technology that bundles a program and the environment it needs, and runs it in a space separated from everything else. Docker is the representative example. Inside a container only the folders you connect (mount) are visible, so it is used to narrow the agent’s range of access.
This is not only about coding runtimes. Features every product needs but that are not what sets yours apart, such as authentication, payments, sending email, file storage, and error monitoring, are also better taken from proven services. Because an agent builds such features quickly, it is tempting to build them yourself, but the cost of building is far smaller than the ongoing cost of carrying security incidents and edge cases. Authentication and payments in particular are areas where a mistake turns straight into an incident. A solo builder’s time should go where no one else can stand in, that is, user experience and domain knowledge.
A Checklist for the Solo Builder#
Compressed into a checklist, this chapter looks like the following. This is the order in which I set up the development environment when starting a new project.
- Instruction files first: put project rules (
Instruction files for agents kept in the repository. Write down the project structure, how to build and test, and rules to follow, and the agent reads them each time it starts work. AGENTS.md is a common format shared by many agents, and CLAUDE.md is the file Claude Code reads.
or CLAUDE.md), structure documents, and the design document in the repository and make the agent always read them. (Key AI Concepts, Chapter 3, Chapter 4) - Define the end first: for each feature, write down “the standard for correct behavior” as tests or a checklist. Run the agent until it passes that standard.
- Separate draft from production: the agent’s output is a draft. Keep the promotion path (intent review → design review → contract cleanup → fake data removal → harness verification → deployment) as a checklist.
- Leave intent for people: before implementation, have the agent lay out the user flows, the reasons and dropped alternatives, temporary data, and what is final versus open in one page a person can read.
- Split small, and rebuild instead of patching: do not create a change you cannot review in one sitting. When you see a root problem, rebuild the draft instead of adding exceptions.
- Change what gets reviewed: hand the first-pass code review to an agent, and have people look at contracts and risk points. What a person saw today moves into the harness the next day.
- Freeze design in a document: set the direction with a generator, lock it in a design document, and verify it with a screenshot loop.
- Borrow the loop and the common features: do not build the coding agent loop, sandbox, execution environment, or common features such as authentication and payments yourself. The product owns the control plane.
The next chapter covers the choices involved in putting AI features inside the product you built this way: who pays for them and the cost structure, caching, model placement, and how to bring your product into the user’s agent.