Sources#
Summary#
Robert C. Martin (Uncle Bob on Software Fundamentals in the Age of AI, 2026-08-19, practitioner-opinion) states the principle in one sentence:
"It's probably a mistake to impose a human discipline on an agent. It is not a mistake to impose human values on the agent, but there may be thresholds that we need to change. But the disciplines themselves, the behaviors, I don't think it's wise to impose those."
The cut is between a value (what a practice is for — every branch covered, complexity bounded, the test actually constrains the code) and a discipline (the human-ergonomic ritual that reliably produces it). Values transfer to agents. Disciplines are adaptations to a specific cognitive architecture, and the agents have a different one.
The costly instance: he will not make agents do TDD#
Martin is the corpus's loudest advocate of test-driven development, and this is where the principle costs him something:
"I'm a big advocate of test-driven development. But that's a human discipline that's done because humans are wired a certain way. I cannot and will not enforce that on the agents. I don't think it makes any sense to make an agent write a single line of a test and then write a single line of the production code and then the next line of the test."
The diagnosis is working memory. Red-green-refactor's tight alternation exists because a human can hold one failing assertion and its implementation in mind at once and not much more; Matt Pocock puts it back to him as "TDD is great when you have very low short-term memory, like humans," and he accepts it. Agents have "a huge short-term memory and a perfectly accurate short-term memory," so the ritual buys nothing and the value — code whose branches are all pinned by tests — has to be bought some other way. In Martin's setup it is bought by a mutation-testing gate at the end (Reviving Impractical Quality Tools).
The behavioral evidence: they revert anyway#
The strongest support he offers is that the discipline does not stick even when instructed:
"So I allow the agents to behave more like John Ousterhout would, which is to write a function and then write the test for that function and then write the next function and write the test for that function. I allow them to do that even when I have told them to do test-driven development at high discipline. They always fall back on doing that. They always end up doing that. So I figure that's probably okay."
This is a second, independent reason to stop paying for discipline-level instructions: they are among the instructions that decay. Whether that is instruction decay under load, the lost-in-the-middle effect he blames elsewhere (Context Window Smart Zone), or a training-distribution prior pulling toward the more common code-then-test ordering, he does not distinguish — and the three have different fixes. His response is to stop fighting it and enforce the value downstream, which works under all three.
Thresholds move, values do not#
The principle's second half is that the same value can need a different setting:
"The agents can deal with different levels of complexity than humans… So one of the things that I do is I widen the allowed size of a function and I do that by adjusting the CRAP score. For a human I would keep CRAP numbers below four. But for the agents I've set this at six and I'm thinking maybe I'll push it to eight."
With 100% coverage, a CRAP score of six means six tested paths through the function. The value ("every path through this function is exercised, and there are not too many paths") is unchanged; the number that counts as "too many" is a property of the reader, and the reader changed. He has no principled method for finding the new number and says so — "I'm trying to find where the threshold is and it's not an easy threshold to find" — and he explicitly discounts the agents' own endorsement of six: "you can't trust any debate you have with an agent, but I still have them anyway."
Why this is a general test, not one opinion about TDD#
The distinction gives a cheap audit for any practice being carried into an agent workflow. Ask what the practice is for, then ask whether the mechanism that delivers it is about the code or about the person:
| Practice | Value it delivers | Is the ritual human-ergonomic? |
|---|---|---|
| Red-green-refactor | Every branch pinned by a test that once failed | Yes — alternation sized to human working memory. Replace with a mutation gate. |
| Small functions | Bounded paths per unit of comprehension | Partly — the value survives, the threshold moves (4 → 6 → 8) |
| Code review by a second person | An adversarial reader who did not write it | No — the value is the independence, which a fresh-context reviewer also supplies (Deep Modules for Agents) |
| Deep modules / narrow interfaces | A reader can use the module without reading its body | No — agents benefit for the same reason humans do, and Martin says so directly |
| Pair programming | Continuous review plus knowledge transfer | Yes on the transfer half — the second half has no agent analogue |
The audit is what makes the principle load-bearing rather than a nice phrase: it predicts which existing practices should be enforced as gates, which should be re-tuned, and which should be dropped as scaffolding for a cognitive limit the new worker does not have.
Standing tension#
The principle sits awkwardly against Martin's own apprenticeship proposal, which runs it in reverse. He wants juniors "treated like an agent" — given agent-shaped tasks under agent-shaped gates for several months (Returns to Expertise in Agentic Coding). If disciplines are human adaptations that agents should be spared, it is not obvious why the training regime for humans should be the agent one. He does not address the asymmetry, and it is the clearest unforced gap in his position.
Connections#
- Robert C. Martin (Uncle Bob) — whose principle this is, and what it costs him to hold
- Reviving Impractical Quality Tools — the mutation gate is how he buys TDD's value without TDD
- Verification as the New Bottleneck — which already records that "TDD loses its tax" under agents; this is the sharper version of why
- Agent-Generated Test Quality — measures what agents actually do when left to their own ordering
- Instruction Compounding — one candidate explanation for why the discipline instruction fails to stick
- Context Window Smart Zone — his own explanation for why long rule documents decay
- Deep Modules for Agents — a value that transfers unchanged, by his account and Ousterhout's
- Latent vs. Deterministic Space — the enforcement half: values become checkers, not prompt text
- Returns to Expertise in Agentic Coding — where he inverts the principle for human trainees
Open Questions#
- Do agents revert from instructed TDD to write-then-test because of instruction decay, a training prior, or both? The three have different fixes and no source separates them.
- Is there any principled way to set the complexity threshold for an agent reader, or is 4 → 6 → 8 pure practitioner feel?
Sources#
- Uncle Bob on Software Fundamentals in the Age of AI — Robert C. Martin with Matt Pocock, 2026-08-19,
practitioner-opinion
Cited by 10
- Agent-Generated Test Quality×2
Impose Values Not Disciplines — why Martin enforces the outcome instead of the test-first ordering…
- Returns to Expertise in Agentic Coding×2
It inverts Martin's own principle. He argues elsewhere that human disciplines should not be imposed…
- Robert C. Martin (Uncle Bob)×2
Impose values, not disciplines. "It's probably a mistake to impose a human discipline on an agent.…
- Deep Modules for Agents
Impose Values Not Disciplines — a value that transfers to agents unchanged, by both Ousterhout's…
- Instruction Compounding
Impose Values Not Disciplines — a case where the instruction fails not by compounding but by…
- Latent vs. Deterministic Space
Impose Values Not Disciplines — what belongs in the checker once you accept the boundary: the…
- AI Coding Practice
Impose Values Not Disciplines — Robert C. Martin's distinction between the outcomes a practice is…
- Open Questions Backlog
Impose Values Not Disciplines ×2 (oldest 9d) — Do agents revert from instructed TDD to…
- Reviving Impractical Quality Tools
Impose Values Not Disciplines — the companion principle: the gates enforce the value the discarded…
- Verification as the New Bottleneck
Impose Values Not Disciplines — the corollary for TDD, which this page already records as losing…
Related articles
- Review as the Control Point
Agarwal et al. (CMU, arXiv 2607.07980): a 26-construct/67-relationship causal theory synthesized from 3,100 coded pract…
- Reviving Impractical Quality Tools
Robert C. Martin's mechanism for why agents change code quality: CRAP score and mutation testing were sound ideas aroun…
- Agentic Technical Debt
Debt that *compounds* (not just accumulates) because each agentic-coding session re-derives architectural decisions wit…
- Robert C. Martin (Uncle Bob)
Author of Clean Code, 50-year programmer, and since December 2025 an agent operator whose stated goal is never to read…
- Deterministic Engineering for Agent Code Review
OpenCodeReview (Alibaba / Nanjing / Peking, arXiv 2608.09290): three deterministic injections into a review agent — rul…
