At one of my old teams, our automated code build failed if unit test coverage fell below 80%, and we had added static code analyzers to catch code smells. As the team changed, those checks were switched off to move faster, and nobody put them back. The coverage, and the code, slowly degraded, though the latter is my reading, not something we measured.
Code reviews were delicate too. When someone pushed back on a colleague’s work, egos got hurt. A hard check has no face. A reviewer does.
I prefer to use a more elaborate set of hard checks, but the teams I was part of usually resisted. The reason was the extra effort, and it is a good reason. The checks created friction in our daily work, and friction is a real cost. Some of it was motivation: not everyone cared about writing tests, and not everyone wanted their code reviewed. Much of it was pressure to ship faster, some of it lack of familiarity or disagreement with the benefits of the discipline the check imposes.
Who pays for a hard check
Here is how I read it now. Keeping a hard check costs a little every day: a failed build, an argument in a review. Removing it costs nothing that day. The bill arrives later and slowly, as code that degrades. Under pressure to move faster, the daily price is the one people see.
Look at two costs in my story: the friction of working under the checks, and what a pushback costs in a delicate review. People paid both. An AI assistant pays neither, but it has its own problem. In my use it fails in many small ways. I write in its instructions file, where they are appended to all prompts, that code must follow SOLID principles, and it often produces code that does not. The same happens if I write that it should run the tests, or the linters, before committing. A rule in a document reaches it as advice, which it might follow or not.
To solve this, I set hooks that check conditions that must be cleared before committing, and I keep those checks in a pyramid with different levels of determinism. At the base, a script answers yes or no every time. Above it, checks that mix a script with a reading by an assistant. At the top, an assistant reads the change against the rule, and its answer is an opinion. Hooks are not fully deterministic either, but in my experience they work much better than instructions in the prompt. The pyramid runs the checks for the assistant, and it then fixes the failures itself. When a check fails, nobody’s ego is involved and I do not have to persuade anyone, nor spend time fixing each issue or expanding coverage.
A case where instructions alone are not enough is CI on GitHub Actions, which only runs after a push. I wrote in the instructions file, or in the prompt, that the assistant must read a failure with the gh command line tool and fix it. Sometimes it does and sometimes it does not. A hook can instead refuse to open a pull request until the last CI run on the branch is green. Pushes to the red branch stay allowed so it can be fixed. Then the assistant has to read the failure to get past it, and it does not depend on its remembering.
On my daily work the friction did not disappear. It moved. The check still says no and the failure still gets fixed, but the one saying no is a check, not a colleague, and the one fixing it has no ego on the line. It is not free: the assistant spends tokens and CI time, but it feels cheaper, and faster, than doing it yourself.
For years the reasons not to do this were real: the effort of writing the checks, the daily friction, the delicate reviews and the pressure to ship. An assistant should take much of the force out of those reasons. What does not go away is owning the checks. Someone still has to decide what they say, tune them and watch over them.
What has to stay true
Rules sit on a scale. Countable rules, like a file-length limit, you can ask the assistant to write as a check, and the check answers yes or no every time. Some rules need a dependency tool, such as ArchUnit or dependency-cruiser. Judgment calls, like whether a design is elegant, cannot be counted. There the assistant’s answer is an opinion that can be wrong. That is review, not enforcement, and a person stays the final reader. Start with one countable rule, and in an old codebase freeze today’s violations and fail only on new ones.
All of this needs command-line tools with a token configured on your machine, like gh, aws, railway or a database client. That makes automation easier and more powerful, and it also makes destructive or out-of-process commands possible, so you want more hooks that block them.
Counting proxies can be gamed, and so can my own 80% gate: coverage says which lines ran, not whether a test would catch a bug, and we never ran mutation tests in that project. An assistant asked to make a check pass can take the cheap route too, so the checks need a guard. An assistant that a check blocks can edit the check as easily as the code. So changes to the check, and any waiver, need a named person’s approval, and the assistant must not be able to approve its own changes (its token or bot account is not a code owner, an admin or on a bypass list). I have not tested how often an assistant skips or edits a check, which is why the guard is there.
On a hosted repository the guard usually means a code-owners rule over the check’s files, the workflow that runs it and the CODEOWNERS file itself, with review by those owners required before anything merges to the main branch and direct pushes closed. None of that is on until someone sets it up, and some of it sits behind paid plans: on private GitHub repositories, and for code-owner approval on GitLab. On GitHub, a classic branch protection rule does not apply to administrators unless you tick “Do not allow bypassing the above settings”, and rulesets have their own bypass list.
A check on one laptop can be skipped with `git commit --no-verify`, and hooks in the .git folder are not part of a clone. So the check that counts runs where everyone’s work arrives: on GitHub, a required status check on a protected branch, written so that a skipped run does not count as a pass; on GitLab, “Pipelines must succeed” together with a restriction on direct pushes to the main branch.
The lesson
**Give the friction of hard checks to the assistant, and keep the decisions about those checks with people.**
The team and I were responding to the same cost. In my use, an assistant does not make it vanish. It moves much of it off the people. This is one of the natural premises of Generative Specification (GS), the free and open method I work on.
Which check did your team drop because of friction, and would you bring it back if the friction landed on the assistant?
---
*I work on Generative Specification, a free and open method for writing down the rules AI-assisted work should follow, and for turning them into checks. I run PragmaWorks. White paper v4.0 (preprint): https://doi.org/10.5281/zenodo.21726017 · pragmaworks.dev*
