no-mistakes: a gate in front of git push
no-mistakes, that sits in front of your real one. Pushing to it starts a pipeline in a throwaway copy of the repo: rebase, an AI code review, tests, a docs pass and lint, and only then the real push, the PR and CI watching. Mechanical problems get fixed automatically; anything that touches what you meant to build stops and waits for you. The bet behind it is that writing code is no longer the slow part. Checking it is.Coding agents produce diffs faster than anyone can read them. The usual safety nets don’t fit that pace well. Pre-commit hooks have to stay fast and they block your working tree while they run. CI runs only after the branch is already public, so every failure costs another push and another round of waiting. no-mistakes is Kun’s answer to that gap: one deliberate checkpoint, on your machine, before anything leaves it.
The bottleneck moved
The project’s docs open with the premise that runs through most of Kun’s tooling:
The bottleneck isn’t writing code anymore. It’s reviewing and validating it.
If generating a diff is cheap, the expensive part is everything around it: is the branch rebased on current main, did anyone look at it with fresh eyes, do the tests cover what changed, are the docs still true, will lint complain. A human reviewer usually ends up doing all of that by hand, often by rediscovering bugs the author should have caught. no-mistakes moves that work earlier and hands most of it to agents, so that by the time a person sees the PR, the routine questions already have answers attached.
A second remote, not a hook
The core design choice is that no-mistakes is a named remote, not something that hijacks origin. Running no-mistakes init creates a local bare git repo (a repo with history but no checked-out files) under ~/.no-mistakes/repos/, installs receive hooks in it, starts a background daemon, and adds a remote called no-mistakes to your project that points at that bare repo. git push origin still does exactly what it always did. git push no-mistakes is the explicit way to say “this one goes through the gate.”
The point is not to hide Git. The point is to create one deliberate place where validation can happen before a branch is shared.
When a push lands in the gate, the daemon creates a disposable worktree for the run. A worktree is a second checkout of the same repository in a different directory, so the pipeline can edit files, run tests and commit fixes without touching the checkout you are working in. You keep coding; the gate works on its own copy.
The contract is stated plainly in the README:
The initial change reaches the configured push target only after every local gate is green.
Nine steps, in a fixed order
The pipeline is deliberately not configurable in shape. A repository can choose the lint, format and test commands, tune how many auto-fix attempts each step gets, and add extra gates after a core step, but it cannot remove or reorder the core steps. That rigidity is the point: “passed the gate” should mean the same thing in every repo.
| intent | Work out what the change was for: taken from the task you gave, or inferred from recent local agent session transcripts. Later prompts and the PR body use it. |
| rebase | Fetch fresh upstream and rebase, so every later check runs against current code. If nothing is left after the rebase, the run stops. |
| review | An AI code review of the diff in its own fresh context. Its default auto-fix limit is 0: review findings need your approval. |
| test | Targeted checks of the change against the intent, with recorded evidence when intent is known. Not a substitute for a full CI suite. |
| document | Update docs the change made stale; report the gaps it can’t close. |
| lint | Lint and formatting last among local checks, so it doesn’t churn over code that is still moving. |
| push · pr · ci | Push to the real target (refusing a force-push that would drop commits it never saw), open or update the PR, then watch CI and mergeability and repair failures. |
The order has reasons, and the pipeline page spells them out: review comes before test so the reviewer reads the code as written, not code the pipeline has already patched; docs follow tests so they describe code known to work. The CI step is careful about its own repairs. A fix it can prove builds on the commit you already reviewed is published directly; anything else, including every merge-conflict repair, goes back through review first.
Auto-fix versus parked
Every finding carries a severity and an action: auto-fix, ask-user or no-op. The split is the most interesting idea in the tool. A missing import, a formatter diff, a stale README line or a red CI job is mechanical. There is one right answer, and an agent can apply it and re-run the check. A reviewer saying “this changes the default behaviour for existing users” is not mechanical. It is a question about what you meant, and no amount of retrying will answer it.
So the pipeline fixes the first kind and parks the second. A parked run waits in the TUI (terminal UI) with the finding in front of you, and you approve, fix, skip, or abort. In a talk walking through his workflow, Kun describes it the same way: obvious problems get self-corrected, while ambiguous ones with product implications are escalated to a human after review (video, 30:19). The human’s attention is spent only where a human is actually needed.
Three ways in
no-mistakes init # gate + remote + agent skill, once per repo
git push no-mistakes my-branch # explicit path, committed branch
no-mistakes # TUI: wizard commits/pushes, then attaches
/no-mistakes add a --json flag # inside a coding agent: do the task, then gate it
The third entry point matters most for agent workflows. init installs a /no-mistakes skill for Claude Code and other agents; the skill drives no-mistakes axi, a non-interactive interface that prints TOON (Token-Oriented Object Notation, a compact JSON alternative designed for model context) following Kun’s AXI principles. So an agent reaches the same approval points you see in the TUI and relays the parked ones to you. The pipeline itself is agent-agnostic: claude, codex, grok, opencode, copilot, pi and several others are supported directly, others via ACP (Agent Client Protocol) through acpx, with ordered fallbacks if one is unavailable.
When Kun turns it on, and what it says about PRs
Kun does not run it on everything. His rule of thumb, repeated across his videos, is about stakes rather than complexity: if this is a change you would otherwise ask a human peer to review, gate it; if you would not, don’t bother (video, 52:54; video, 40:13). The pipeline is slow and token-hungry, so prototypes and toy projects skip it, and his orchestrator carries a per-project policy for which repos need it. For his open-source repos he goes further: he says he requires PRs to be raised through no-mistakes so there is a minimum quality bar before he looks (video, 12:26).
That fits a broader view of where pull requests are heading. The automated distillation of his opinions in his public kun repo summarises it as PRs becoming less central as review shifts from a second human reading code to the author steering and checking agent output, with CI babysitting delegated to agents. You can see the same idea in how he uses the output: he says he never watches the pipeline run, and comes back only when it reports all checks passed, then reads a PR that states the original intent, what changed, how it was tested, with clickable evidence (video, 31:46). The PR becomes a report to judge rather than a diff to rediscover.
Limits and caveats
- Cost and time. A full run is several agent passes plus tests and CI. Kun himself calls it long and expensive in tokens, which is why he reserves it for changes that deserve a reviewer.
- Needs a working agent. Every gate requires a runnable configured pipeline agent; there is no agent-free mode.
- Opinionated by design. The nine core steps cannot be removed or reordered. If your team’s process differs, you add gates around them, not instead of them.
- The test step is targeted. It validates the change and intent locally; it is explicitly not a full CI suite, so CI still owns cross-platform coverage.
- Trust is earned, not assumed. An AI reviewer can miss things. The tool keeps you in the loop for judgment calls, but whether its review is good enough for a given repo is something to calibrate against your own reviews over time.