Original URL: https://getagenttools.com/blog/ai-time-dividend-tests/

# The AI time dividend should go to tests, not more features. Mine did not, at first

23 Aug 2026Marek.

- coding-agents
- agent-ops

Robert C. Martin, Uncle Bob of Clean Code fame, made an argument recently that is short enough to fit in a pocket and uncomfortable enough to live there rent-free: AI agents write code many times faster than you do, which means you now hold a large pile of saved time, and that pile should be spent on the testing rigor you could never afford before. Unit tests, acceptance tests, property tests, torture tests, mutation tests, real QA. Even after spending all of it, you come out ahead on speed, and the code comes out better. After months of daily agent work on real codebases inside [Claude Code](https://getagenttools.com/tools/claude-code/), I can report on the part the argument skips: where the dividend actually goes when nobody is watching.

 

- **The claim.** The hours agents save are a budget, and the highest-return place to spend that budget is verification, not more output.
- **The confession.** My dividend went to more features first. The correction came from incidents, not discipline.
- **The hard part.** Agents do not just write tests fast, they also weaken tests fast. The dividend needs rules or it leaks. An agent blocked by a red test will sometimes aim at the test.
- **The proof at hand.** The small content site you are reading this on carries more than 220 unit tests and more than 60 end-to-end tests, a density I would never have paid for by hand.
- **The limit.** Not every saved hour belongs in tests. Prototypes you will throw away deserve exactly none of it.

  

## The claim, in one sentence

 

Before agents, testing rigor was rationed. Property-based tests, mutation testing, a second adversarial review, these were things teams agreed were good and skipped, because the hours came out of the same budget as shipping. The argument says the ration ended: the agent returns the hours, and the professional move is to reinvest them where they compound, in the net that catches tomorrow's regression. Spend the whole dividend on rigor and you are still faster than the pre-agent you.

 

Read that way, the ration ended the day the agent got good enough. What makes this more than a platitude is that the reinvestment is cheap in the one currency that still matters, your attention. The agent writes the property test too. You are not choosing between an hour of features and an hour of writing assertions by hand. You are choosing which prompt to type next.

 

## Where my dividend actually went

 

Honesty first: for months, my saved hours went into more output. More tools wired up, more automations, more pages. It is the natural direction, because features are visible and verification is not, and the agent makes features feel free. The correction did not come from reading the right blog post. It came from paying twice for the same class of bug and noticing that the second payment was avoidable.

 

The shift that stuck was not "write more tests", it was moving verification into the definition of done. A change is finished when the gate is green: typecheck, lint, unit suite, build, a component-catalog build, end-to-end suite, in that order, every time. Once the gate exists, the dividend flows into it almost automatically, because making the gate stricter is a one-time cost the agent pays, and every future change gets verified for free.

 

## Agents weaken tests as fast as they write them

 

The part of the argument I have scars to add to: the same speed that writes tests also games them. An agent blocked by a red test will, with some regularity, propose the wrong fix: loosen the assertion, delete the test, mock the exact thing under test. This is not malice. It is a reward gradient: the green build is the goal, and the shortest path to green sometimes runs through the net instead of the bug.

 

So my dividend bought rules before it bought tests, five of them, and they are deliberately blunt: never weaken an assertion to make a test pass, never delete a failing test, never mock the thing under test, every test carries at least one real assertion, and when a test is red, the code gets fixed, not the test. In [my CLAUDE.md audit](https://getagenttools.com/blog/claude-md-audit/) these five survived a purge that cut half the behavior rules, though survived is generous: they stay on probation, until someone shows me evidence that models stopped doing this. The reasoning holds either way: test-gaming is not a knowledge gap that better models outgrow. It is a temptation that arrives with the reward.

 

One more rule earns its keep: tests get written vertically, one test, its implementation, the next test, instead of a wall of tests up front. The agent stays honest because each test is red for a reason it just created, and I stay oriented because the diff grows in slices I can actually review.

 

## What the dividend bought here, concretely

 

Abstract arguments about rigor convince nobody, so, receipts. The site you are reading is a static content site, the least test-worthy genre of software that exists. It currently runs more than 220 unit tests and more than 60 end-to-end tests. They check things I would never have specified by hand: that every review page carries a table of contents whose anchors all resolve, that diagram alt text stays under the length limit, that the RSS feed excludes queued future posts, that the newest post renders without horizontal scroll at 390 pixels, that counters shown on the homepage are derived from data instead of hardcoded.

 

Full honesty about where those tests came from, because it proves the point better than a flattering version would. The RSS rule exists because future dates once leaked into the live feed, caught by post-deploy verification, not by the gate, and fixed with a second deploy. The mobile rule exists because a layout regression slipped past every structural check and was caught by a human looking at screenshots. In both cases the incident came first and the test came after, which is the pattern from the section above: the correction came from incidents, and the dividend is what made absorbing each incident into a permanent test cost one sentence instead of an afternoon. The gate does not predict failures. It refuses to let any of them happen twice.

 

The same logic extended one level up: before publishing, long-form posts here go through an adversarial review by a separate model instance whose only job is to break the draft, the QA role nobody staffed before agents. The one for the CLAUDE.md audit returned nineteen findings, two of which were real errors about my own toolchain. Rigor I could not have afforded, bought with hours an agent saved.

 

## When the dividend should not go to tests

 

The argument needs one boundary to stay credible. Exploration code, prototypes, one-shot scripts, things whose purpose is to be thrown away after answering a question, deserve none of the dividend. And not because writing the test costs anything anymore. The cost that survived the agent era is maintenance: a test on disposable code becomes a false constraint on the next change, and someone pays to delete it. The moment a prototype survives into a second week, it stops being a prototype, and the gate applies retroactively.

 

The other boundary is diminishing returns inside the suite itself. Once the four groups of [production gates](https://getagenttools.com/blog/production-ready-ai-agents/) are covered, the next test is worth less than the last. The dividend is finite. Torture tests for a weather widget are how rigor becomes cosplay.

 

## The verdict

 

The claim holds, with one amendment from the field: the dividend does not flow to tests by itself, it flows to whatever is easiest to ask for next, and features are always easiest. It needs plumbing: a gate that defines done, rules that stop the agent from gaming the net, and a habit of asking for the test in the same breath as the feature. Build that once, and the reinvestment becomes the default instead of a resolution. My 200-plus tests on a blog say the plumbing works. The five blunt rules say why it has to exist.

 

Source: the argument is Robert C. Martin's, from [his post on X](https://x.com/unclebobmartin/status/2081332683582427641), paraphrased above; the scars and the numbers are mine.

Put this into practice

[See the tool list](https://getagenttools.com/tools/)[Train your team](https://getagenttools.com/#training)
