← Back to blog
AiAbout 6 min read

Uncle Bob's ub-mode makes a coding agent prove the work is done

Published Nov 15, 2026
Uncle Bob's ub-mode makes a coding agent prove the work is done

A skill file with four programs behind it

Every week another repo ships a personality for your coding agent. A markdown file with a name, a voice, a list of things the model should care about. You drop it into a skills folder, type a slash command, and the agent starts writing commit messages like a senior engineer who has seen things.

ub-mode sits at 7,989 stars on GitHub as of 15 Nov 2026, under unclebob/ub-mode. Installation follows the pattern exactly: copy SKILL.md into ~/.claude/skills/ub-mode/SKILL.md, or the Cursor equivalent, or the Grok equivalent, then type /ub-mode. Three phases. "First Make it Work" holds Laziness Protocol, Foundational Thinking, TDD, Redesign From First Principles, Attack the Premise, Subtract Before You Add, Outcome-Oriented Execution, Build the Lever, and an architecture section on modeling the domain, boundaries, type discipline, idempotent operations, and separating before serializing shared state. "Then Make it Right" holds Fix Root Causes, Sequence Work into Verifiable Units, Test Behavior Not Implementation, Refactoring. "Practice" is a log, context window hygiene, worktree cleanup, small ordered commits.

That list is what people will quote in screenshots. The part worth reading is what sits inside "Then Make it Right": four command line programs the author wrote to check the agent's work.

The sentence problem

Ask a coding agent whether it is finished and you get a sentence. "I implemented the endpoint, added tests, and the suite passes." That sentence was generated by the same process that wrote the code, so it carries no independent information. This is where slop comes from. It has little to do with the model's character and a lot to do with the loop it sits in. The agent's definition of done is a claim, and claims are cheap to produce.

The skill replaces the claim with numbers the agent has to move. Crapper computes cyclomatic complexity, test coverage, and a CRAP score for each function, and the rule is that every function stays under CRAP < 10. Dryer looks for structural duplication and requires blocks at 0.8 similarity or above to be removed. Mutator runs mutation testing: it breaks the code on purpose and checks whether the tests notice. UML-viewer draws components, coverage, CRAP scores, mutation scores, and dependency directions.

Three of those four can fail a build. You can argue with a paragraph. An exit code is harder to argue with, mostly because the counterargument has to be different code.

Attack the Premise

Among the nine principles in phase one, two behave differently when the reader is a model.

Attack the Premise is the one I would ship on its own. Agents are obedient in a specific and expensive way: they implement the request as written, competently, and never ask whether the request should exist. Tell one to add a caching layer and you get a caching layer. Tested, committed in small steps, with a clean boundary. Nobody checked whether the endpoint was slow because of the query plan. The agent will not notice that the ticket is a workaround for a decision made two years ago by someone who has since left.

A human reviewer pushes back because pushback is free and they carry the surrounding context in their head. An agent pushes back only when a rule tells it to, which makes Attack the Premise load bearing. Its position in phase one matters too, before any code exists, when changing the answer is still cheap.

Sequence Work into Verifiable Units is the second, and it is really about memory. Long sessions rot. A constraint from turn three is still in the window at turn ninety, but it no longer has the same weight, and the model begins confidently breaking a rule you set an hour ago. Cutting the work into units with a check at the end of each gives you a place to stop and look, and gives the gates something to bite on. A gate at the end of a four thousand line change tells you the change is bad. A gate at the end of forty lines tells you which forty.

Where the numbers stop helping

Here is where I stop trusting it.

CRAP < 10 came out of human code review. It was tuned for reviewers with limited patience reading code written by colleagues. An agent optimizing for the threshold can take one honest forty line function and split it into four twelve line functions with worse names and identical logic. Complexity per function falls, coverage holds, the score drops, the build goes green. Nothing about the code improved. The number did.

A steel go/no-go gauge with three machined slots, one polished bar passing through the first and stopped by the second.

Duplication fails from the other direction. Dryer flags blocks at 0.8 similarity or above. Extract a shared helper that takes nine parameters and a mode flag, and similarity falls below the threshold. You end up with one function that is harder to read than the two it replaced, plus a passing check. The tool measures shape, and shape is easy to game with worse shapes.

Mutation testing is the honest gate and the expensive one. It runs your suite once per mutant, so wall clock cost is suite runtime multiplied by the number of mutations. That is tolerable on a laptop and painful inside a loop where an agent is iterating on a fix. My guess, and it is only a guess, is that this is where agents will cut corners first: skip mutator, or write tests that kill mutants without asserting behavior. A test that asserts the function returns something non-null kills a surprising number of mutants while testing nothing a user would recognize.

The essayist who now ships gates

There is a joke inside this project that the README does not make. Robert C. Martin has been argued about for two decades, mostly over the style advice in Clean Code, over whether those rules were hard won experience or folklore with good marketing. That same author now ships the rules as programs with thresholds and exit codes, and asks you to install them rather than read them.

It reads like a concession, and a fair one. An essay cannot be executed. You can disagree with a chapter for years and never settle it. You can disagree with CRAP < 10 in an afternoon by running the tool on your own repo and looking at what it wants changed. Style arguments end when somebody produces a number, or at least they get quieter and more specific. The man famous for prose about code has decided that prose was the weak part.

What the gates cannot see

One limitation, stated plainly. This is a skill file plus four CLI tools. Nothing in the set verifies that a human read the diff. The gates inspect the code the agent produced. They say nothing about whether anyone agreed that code should exist, or whether the ticket was worth doing. Attack the Premise, the rule I would keep if I could keep one, remains a sentence in a markdown file, enforced by nothing except the model's willingness to follow instructions. The strongest item in the whole collection is the only one without a program behind it, which says something about which problems are actually hard.

Before installing, run crapper against the repo you plan to point the agent at. If two hundred functions already sit above the threshold, the first session will be refactoring, not features, and the agent will spend its budget on code you never asked it to touch. Better to see that number yourself than to let the agent discover it for you at 2am.

Related articles