no-mistakes
"git push no-mistakes" — the local gate that runs an AI review, test, document, lint pipeline before forwarding a branch and opening a clean PR. firstmate's validation layer.
git push no-mistakes — that's not a joke - it's the real command i run when i push my changes nowadays, and it's what allows me to ship 50-100 good PRs a day. — @kunchenguid, 2026-04-20
no-mistakes puts a local git proxy in front of your real remote. You push to no-mistakes instead of origin. It spins up a disposable worktree, runs an AI-driven validation pipeline, forwards the branch only after every check passes, and opens the PR itself. It is Kun's most-starred project (~8.6k), and it is firstmate's entire validation story. VISION.md: "validation belongs to no-mistakes".
a whopping 68% of the changes made by agents had a mistake in it, and got saved by no-mistakes. biggest source of gaps was a change made without updating related documentation, followed by problems caught via code review — @kunchenguid, 2026-05-10
Install and init#
curl -fsSL https://raw.githubusercontent.com/kunchenguid/no-mistakes/main/docs/install.sh | sh
cd your-repo
no-mistakes init
init does the following, idempotently:
- creates a bare gate repo at
~/.no-mistakes/repos/<id>.gitwithpre-receiveandpost-receivehooks, - adds a
no-mistakesremote to your repo.originis never touched. - installs the
/no-mistakesskill (~/.claude/skills/,~/.agents/skills/), - starts the daemon.
--fork-url handles fork contributions. An explicit --base-remote binds a run to another integration remote. It is stored on the run, supplies its push and PR-base routing, and leaves the repo's registration unchanged (0a283bf). --skip-user-skill skips installing or refreshing the user-level skill for that run only. no-mistakes skill install installs or refreshes the skill on its own. It works outside a Git repository and does not register a gate or start the daemon.
Three ways in#
git push no-mistakes # explicit git path
no-mistakes # TUI wizard (branch/commit/push for you; -y to automate)
/no-mistakes <task> # agent skill; drives `no-mistakes axi` (TOON, non-interactive)
At submission, no-mistakes saves the submitter's effective git author and committer with the run. Every pipeline commit uses them, across retries and daemon restarts. Missing or invalid identity refuses the launch. A plain git push no-mistakes has no such snapshot, so every live checkout must resolve the same identity. Otherwise the launch is refused after Git has already accepted the push. Use no-mistakes axi run then (823a4ee).
The pipeline#
The order is fixed. You can't reorder steps, permanently skip one, or replace one. "A pass has the same core guarantees across repositories."
intent → rebase → review → test → document → lint → push → pr → ci
| Step | Does | Auto-fix limit |
|---|---|---|
| Intent | uses the supplied intent, or infers it from recent agent transcripts | — |
| Rebase | fetches fresh upstream, rebases, and ends early if no diff remains | 3 |
| Review | AI code review of the diff | 0 (needs approval) |
| Test | targeted validation of the change and intent, plus evidence | 3 |
| Document | updates docs, reports gaps | initial pass |
| Lint | lint / static analysis | 3 |
| Push | safely pushes to the real target without discarding unincorporated commits | — |
| PR | creates or updates the PR | — |
| CI | watches CI and mergeability, auto-fixes failures | 3 |
A paused step is resolved from the TUI or with no-mistakes axi respond (approve, fix or skip). With --action fix, --instructions-file and --add-finding-file read from a file, and --instructions - or --add-finding - reads stdin. Prefer the file flags for text with backticks, quotes or newlines: they bypass shell expansion. axi respond --run <id> answers that exact run's gate from any directory. no-mistakes axi abort cancels the run. no-mistakes axi retry --run <id> continues a run from its failed step when it failed before Push only because an agent invocation failed. It also continues a run that pushed and then failed in PR or CI: the new run carries every step through Push, never pushes, and runs only PR and CI. It refuses unless the remote branch still has exactly the run's pushed head, and a CI step that already ran a fix round is refused (35850db). It refuses when continuing isn't provably safe.
no-mistakes axi pr-verify --repo <remote-url> --pr <n> is a read-only check of a live PR's owned appendix. It prints a verdict of match, mismatch, malformed or absent, all with exit 0. It never edits the PR or starts a run (e4ab9d4).
Declines are explicit. A fix response must list every finding the gate shows in --findings or --ignore, unless an earlier round of the step already decided it; otherwise it is refused and the gate stays parked. --ignore can't decline a finding an earlier round chose to fix.
What you can configure:
- the agent and its fallbacks (claude, codex, grok, opencode, pi, cursor, devin,
acp:<target>, ...), commands.lint,commands.formatand a targetedcommands.test,test.base_attribution(trusted default branch only, off by default): a failingcommands.testis re-run on the base commit, and the findings split failures into introduced, pre-existing and ambiguous (1.86.0),- machine-local
repository_overridesin your global config:additionaltest/lint checks run after the repo's own, and anicepriority forprepare/test/lint/format(1.86.0). A matching entry also accepts a machine-localtest.instructions, added before the repo's trusted runbook in the Test step's repair and evidence prompts, - trusted
test.instructions_fileandtest.path_instructions(trusted default branch only): the file is read from the pinned trusted commit and fails the step closed if unreadable; path rules matching the full changed-file list render after the runbook, - machine-local
repository_overrides.<url>.pr.update_text:keeporregenerate(the default).keepleaves an existing PR's title and the narrative above the appendix unchanged, and still refreshes the appendix (or theminimalrisk line) and the attestation for the current head. A configuredpr.title_formatstill redrafts the title. A repo.no-mistakes.yamlcan't set it, - opt-in still-working caps
agent_working_timeout,review_agent_working_timeoutandtest_agent_working_timeout: with a cap set, an agent still producing output, or waiting on a live child process, can run past its 30m stall budget up to the cap; unset (the default), the budget stays an absolute cutoff, review.agent_timeout(trusted default branch only): a shorter Review stall budget for one repo. The smaller of it and the globalreview_agent_timeoutapplies, so a repo can tighten it but never raise it,--closesonaxi run(repeatable,95orowner/repo#95): the PR step adds oneClosesline per issue in an## Issuessection, so merging closes them. GitHub and GitLab only (GitLab also takes nestedgroup/subgroup/repo#95); closure is never inferred,--pr-titleand--pr-body-file <path|->onaxi runandrerun: used when the run creates the PR, with the usual appendix and attestation after them. Freshly passed on an existing PR, each overrides its field once per run; a supplied description replaces the author narrative and refreshes the appendix. Either works alone. There is no inline body flag, because the shell would expand it. Rerun andaxi retryinherit them, but inherited text never rewrites an existing PR; pass the flag again to update it,--caller-restrictions <file>onaxi run(opt-in, UTF-8, at most 16 KiB): the caller's action restrictions are captured once as an immutable run record, and every agent turn receives them. They can only tighten trusted configuration and gates, and agents are told to keep them out of PR text.reruninherits them unless a new file is given;axi retrypreserves them. They are instructions, not enforced containment (c4a98b2),- auto-fix limits and ignore paths,
review.max_fix_rounds(trusted default branch only, opt-in): a total Review fix-round limit for automatic and explicit fixes together. Exhaustion parks the gate and refuses further fixes; it never approves,review.prepare(trusted default branch only, defaultfalse): runscommands.prepareonce, lazily, before the first Review fix turn, so the fixer can verify against installed dependencies. Later Test, Lint and Format commands reuse it; a preparation failure fails Review before the fixer launches,ci.instructions(trusted default branch only, off by default): repo guidance added to every CI repair prompt after the built-in rules, which it never relaxes,ci.remote_only_verification(opt-in, defaultfalse; global config sets the machine default, a trusted repo config overrides it either way): the CI repair agent skips local tests and checks and leaves verification to the next CI run. A repair that advances the head addsVerification was left to CI.to its summary,- extra repo
gatesafter a core step. Trustedauto_fix.gates.<name>(default0) can authorize bounded fix rounds, but today a failing gate is anask-userfinding, so the budget has no effect yet, - per-run skips:
--skip, orgit push -o no-mistakes.skip=<steps>, - global
provider_plugins: an operator-installed, AXI-shaped CLI takes over PR and CI work for hosts the built-in providers don't cover. It is global config only; a repo can't add one. A host can't be claimed by both a plugin and a forge profile.
CI repairs: a repair is republished directly only if it provably builds on the already-reviewed head. Otherwise it goes back through Review. ci.revalidate_repairs: true forces re-review every time.
Ending at green checks: by default the CI step keeps watching the PR after checks pass, until it is merged, closed, or ci_timeout elapses. Opt-in ci.release_after_checks_pass (global config, off by default, a trusted repo config can override it) ends the step at the green verdict. The run completes as checks_passed and releases its worktree, and nothing watches the PR after that (on main, 42d7c79).
Readable squash-merge commits: a docs guide makes the squash commit carry the PR description, not a list of pipeline fix commits. Set the GitHub squash message to PR title and description. Then set pr.appendix: minimal and pr.publish_intent: false in .no-mistakes.yaml on the default branch. The commit then holds the title, ## What Changed, one risk line, the signature and the attestation comment (d3c38fb).
Behind a strict base: on GitHub, a green PR that is BEHIND a base requiring up-to-date branches reports checks-passed and waits for a human. Trusted ci.rebase_behind (off by default) changes that. If the PR is still green and BEHIND at the same base tip on the next poll, no-mistakes rebases it through the merge-conflict repair and revalidates it from Review.
Pure-replay rebases: trusted opt-in ci.carry_review_on_replay (off by default) covers merge-conflict and ci.rebase_behind repairs. If the rebase is proven a pure replay of the reviewed commits, the approval moves to the replayed head and the run restarts at Test, not Review. Any mismatch falls back to Review. It has no effect under ci.revalidate_repairs: true.
Review-bot comments: by default (ci.review_bot_comments: on_failure) a review bot's comments, currently Greptile's, are read only when its check fails. Opt-in always also turns a green bot's unresolved comments into ask-user findings, so the step parks instead of reporting checks-passed. On GitLab the comments are the bot's unresolved merge request discussion notes (Greptile's login there is greptileai). CodeRabbit is an opt-in review bot: it counts only when trusted ci.required_reviews names it (on main, ad48863). Opted-in CodeRabbit also works on GitHub Enterprise Server and GitLab. GHES checks use the configured app ID. On GitLab its completion check uses the configured account ID plus an MR-version-bound discussion note, and unresolved threads block completion (on main, e0815ec). On GitHub.com, copilot in ci.required_reviews opts in GitHub Copilot reviews. Copilot publishes no check, so no-mistakes builds an ExternalReview: copilot check from Copilot's latest bot-ID-verified review of the exact head. Its summary items and unresolved thread comments become ask-user findings. The adapter is read-only (on main, ecb10b6).
PR Testing section: test.evidence.compact (default true, a repo config can override it) keeps the PR Testing section compact. false adds inline screenshot/GIF previews, video embeds, visible log/text blocks and per-command bullets. Those sections are taller and can hit GitHub's PR body limit sooner. The setting enables no uploads or evidence publication by itself (on main, 15ff6d8).
Test oracles: agents that write or review tests require an independent oracle. The expected result must come from a specification, worked example, published constant or external contract, not the code under test. Review flags new or changed in-scope tests that lack one.
Under the hood#
Everything lives under ~/.no-mistakes/ (NM_HOME):
- a Unix socket and JSON-RPC daemon,
state.sqlite, which holds runs and steps but never prompts, outputs, diffs or credentials,- gate repos, run worktrees at
worktrees/<repo>/<run>/, and per-step logs atlogs/<run>/<step>.log.
A new push to the same branch cancels the in-flight run.
Opt-in global max_concurrent_runs (default 0, unlimited) caps how many runs execute at once. Runs past the cap wait in submission order. A run parked at an approval gate still holds its slot (on main, 51e9d94).
A clean stop (SIGTERM, daemon stop, daemon restart) keeps a run that is fully recorded as waiting at an approval gate, and the next start resumes it at that gate. A run in the middle of a step still fails (on main, 82747bc).
A plain no-mistakes update still refuses while runs are active. update --when-idle installs the new binary and restarts the daemon once no run is executing. daemon restart --when-idle schedules the same restart without an update. Gate pushes that arrive meanwhile are held and run after the restart (90ff92e).
How firstmate uses it#
- It is the default delivery mode. Unregistered projects use it.
- The worker drives it. A
no-mistakescrewmate pushes to the gate and answers gates withno-mistakes axi respond. It never passes--yes/-y, because that would auto-resolve ask-user findings, which is a hard-rule violation. - Ask-user findings go up. The worker reports
needs-decision [key=nm-<run>-<step>]: ask-user findings=<ids> file=<path>. The first mate decides or escalates (Decisions). - Current state.
fm-crew-state.shtreats a matching no-mistakes run as the authority:awaiting_approval→parked, passed →done. - Brief rule 7. Workers must never restart the shared daemon. The
stuck-crewmate-recoveryskill verifies "pipeline is dead" claims withno-mistakes daemon status. - firstmate itself ships this way. CI checks a
no-mistakes-pipeline-attestationbound to the exact PR head.
When to use it (and when not)#
not every change! ... you can ask yourself 'would i ask another human to do code review for this change' and if the answer is no, then you probably don't need no-mistakes. — @kunchenguid, 2026-09-22
it'll cost more than not doing any validation at all but will cost less than doing the same validations all in the same main agent session. i think most importantly catching bugs early is a lot less costly to the business than finding them in production. — @kunchenguid, 2026-06-08 thread
That is why direct-PR and no-mistakes-prod-only exist as delivery modes.
Kun also tuned it against over-engineering in review loops. Scope expansion is now escalated to a human more often, and auto-fixes are biased toward simplification (2026-08-30).