Picture your agents clearing a backlog in a week: say, 200 pull requests, all green, all merged. The number is hypothetical, but the volume is real. Organizations are pushing code through, so volume has gone up. Review has become the bottleneck, and comprehension falls behind. A wall of shipped PRs looks like success. But if those changes weren’t necessary, they’re waste, and the only way to tell is to ask what each one was in service of.
My proposal is a change of perspective, because your role has changed. When you wrote the code, you were a builder. Now an agent writes it, and your job looks more like a scientist’s. That means treating the work like an experiment: start from the need, form a hypothesis, run it, observe what comes back, and update. We used to construct software, and now we discover it. That costs a little speed, and I think it’s worth it.
The idea sits underneath the software expedition. That post was about where to go. This one is about the science underneath it.
You’ve moved from logic to observation
When I build a system myself, I hold a model of it in my head. I can theorize about it from its rules, its patterns, and my familiarity with it. That model lets me reason about what a change will do before I run it. It’s similar to theory-building: I carry a working theory of how the system behaves, and I reason from it. That’s deductive reasoning, and it lives in a mathematical, logical space.
Working with an AI model is a different job. You can still read the code it writes and reason about it, and you can ask the model to reason about it for you. But models are non-deterministic, so the same prompt can give you three different solutions on three different runs. Deduction still works on the code an agent writes, but in practice that’s not what you do when you use an agent. You can point an agent at the code to investigate it, and that helps. Its answer is still output from a non-deterministic system, though. Your day fills with other work instead: validating output, finding patterns across runs, improving the setup a little at a time, and steering. That work lives in an observational, experimental space, which is where science lives. It still takes comprehension. Pushing PRs through without understanding them builds comprehension debt. And an experiment only works when a human understands enough to make each judgment call.
Software suits this unusually well. Fields like civil engineering model heavily up front, because their cost of failure is so high: you can’t build a bridge, watch it fall, and build it again. In software development, the cost of failure is low, because it’s just code on your machine. A test goes red, you fix it, and you run it again until it’s green. Testing something means running a command, not building a bridge. That sets software engineering apart from most engineering fields, and it’s why our processes can be experimental and iterative. The cost does climb as a change moves toward release. Production failures can be expensive, and the closer a change gets to customers, the higher its impact, risk, and consequences.
Three layers, three instruments
A task can be done many ways, and most of them are fine. So the experiment asks whether an answer holds up at three layers, and each layer has its own instrument.
Requirements: tests, git hooks, and CI
We already have this layer, and it’s already scientific. Tests, git hooks, CI, and the other guardrails are falsifiable claims about the code. The agent’s change passes or it doesn’t, and nobody has to take its word for anything.
The hypothesis at this layer is the acceptance test. An acceptance test is a spec. In the test-driven development (TDD) loop it’s also a hypothesis: you write down what the change has to do before the change exists. Then you run the experiment and see. Most agent workflows stop here.
Agent output: evals
Passing tests isn’t enough, because you have opinions about design. So does your team, and they’re probably strong ones. Two solutions can pass the same suite while one reads like your codebase and the other reads like a stranger’s.
Evals cover this layer. An eval validates what the agent produced, and it tests your hypotheses about the levers that shape that output: context, rules, agent hooks, deterministic checks, and scripts. Change one lever, hold a representative task fixed, and compare the output. If the result got better, you have evidence the change worked. If it didn’t, you’ve learned the lever wasn’t doing what you thought.
Run it more than once. One run before and one after can’t separate your change from the model’s own variation. Around 30 runs is the usual threshold for statistical significance, but runs cost money. That leaves each team to choose its own number, and I won’t recommend one.
At work, we run evals to prove that a rule produces more of the results we prefer. That’s how we confirm our constraints are effective, rather than assuming they work because they’re written down. Until it’s tested, a rule is only a hope.
The need: metrics and customer feedback
Code can pass every test and every eval and still solve nothing at all for the person who asked for it. This layer checks the reason the code exists, and it needs observational data from the field: metrics, and feedback from customers.
I want to be careful with the claim that customer feedback counts, because numbers tend to win arguments in engineering. But a conversation with a customer is data, and it counts as much as a metric. XP has built on that for decades, and plenty of products are shaped by it. On my team, direct customer feedback gave us much clearer direction on what mattered most to our customers. Our product is a dashboard, and we designed it around that feedback so it surfaces what they actually need. The metrics alone wouldn’t have told us what to put at the top.
This layer runs on a slower clock. Some work has to ship in slices, and you won’t see its impact until all of them land, because the early slices are dependencies of the later ones. In the meantime, metrics help. Those slices can also shape design direction while you wait for customer data. Build the API first and defer the client, and what you learn from the API shapes the client, because each side’s design and assumptions affect the other. You model the design as you go.
None of this means working without a plan. It means that when reality tells you something, you update the plan. Apply the lesson and change course, in service of the actual business goal or need.
Findings feed the next run
An experiment nobody records teaches nobody, so the loop doesn’t end when a change ships. Every layer produces learnings: a test that caught something, an eval that showed a rule wasn’t doing anything, or a customer who told you what mattered. Those learnings become context, and context shapes what the agent does on the next run.
This feedback loop is important, because it’s how results improve over time. That loop can turn a finding from an eval into a sharper rule, or a finding from a customer into the next acceptance test. Then the next experiment starts from what the last one discovered, instead of from scratch.
Construction ends when the thing is built. Discovery keeps going, because each result feeds the next question.
Waste is work that serves nothing
Lean already has a name for the changes nobody needed. Its roots are in Taiichi Ohno’s Toyota Production System, which counted overproduction among its seven wastes. Then Mary and Tom Poppendieck carried that list into software in 2003, in Lean Software Development. There, overproduction became extra features: work nobody asked for, which someone still has to build and maintain.
When code was slow to write, the cost of writing it put a ceiling on overproduction. You couldn’t build ten features nobody needed, because you barely had time for the two somebody did. Agents removed that ceiling. In my experience, producing code is nearly free now, so overproduction has become the default failure instead of an occasional one.
Speed doesn’t fix waste. It multiplies it. Every unneeded PR still has to be reviewed and kept running, and someday someone has to delete it.
Maintenance and refactoring aren’t waste, though, because they answer needs too. An acceptance test can validate them: the page got faster, or the vulnerability is gone. What’s different is that their success is quiet. Bug fixes and features show their value when they ship, but maintenance shows its value only when it’s missing, through a missed SLA or a security breach.
The test for waste, then, is what a change is in service of. A change answers a need or it doesn’t ship, and that holds no matter how fast an agent made it.
Yes, this is XP
The strongest objection to all of this is that it’s just XP (Extreme Programming). Short cycles, tests first, and the customer close to the work: XP had all of it decades ago. And as I’ve thought about this idea, I’ve come to agree, which means I didn’t invent any of the parts.
Our process at work today is closer to Lean than to XP. But the more I think about discovery, the more it reminds me of XP, and I suspect XP may be a very good way to work with agents. I’m not running it now, so I can’t tell you that from experience.
In other words, this isn’t a new process. It’s a perspective change, and that’s the whole of what I’m contributing. Our work is discovery, and it’s scientific. We don’t build the thing we think the customer wants and construct it in isolation. We find out what the customer needs, and we deliver experiments that give us more data. Then the data tells us the next best choice in order to meet that customer need.
The cost is a little speed
The business wants speed, and discovery is slower. True, a little. Still, delivering better quality at a slightly slower rate is better than delivering slop quickly. A pile of PRs is fast, sure. But whether they were worth anything is the part speed can’t answer.
Write the hypothesis first
The frame changes the question you start with. “What do I need to build?” becomes “What’s the need, and what did I discover along the way?”
A change with no hypothesis is construction. A change with one is an experiment, and you learn from it whether it succeeds or fails. You already have the instruments for both kinds of hypothesis: the acceptance test for the code, and the eval for the agent’s output.
So try this on the next change you hand an agent: write the acceptance test before the prompt, and make it say what the change should do for whom. If you’re changing a lever, run a representative task several times before and after, and compare. Then write down what you learned, somewhere the agent will read it next time. Your role has moved from builder to scientist, and a scientist’s job is to come back with findings.
Top comments (0)