no-mistakes — Self-Hosted AI-Powered Git Gate for Clean Pull Requests
no-mistakes — Self-Hosted AI-Powered Git Gate for Clean Pull Requests
Getting a pull request ready takes more than just writing code. You need to rebase, review, test, update docs, lint, and make sure CI won't immediately fail. Most of this validation happens after the push — when the branch is already public and the CI queue is filling up.
no-mistakes flips that model. It inserts a local git proxy between your working tree and your remote. Push to no-mistakes instead of origin, and it spins up a disposable worktree, runs an AI-driven validation pipeline, and only forwards the branch to your configured push target once every check passes. The result: clean PRs, every time.
Created by Kun Chen (former engineer at Meta, Microsoft, and Atlassian), no-mistakes is written in Go and licensed under MIT. It supports Claude, Codex, Rovo Dev, Opencode, Pi, and Copilot as validation agents.
Why It's Trending
AI coding agents can produce code faster than any team can validate it. The bottleneck has shifted from writing diffs to reviewing and testing them. no-mistakes sits exactly in that gap — a deliberate local gate that runs the full validation suite before the branch becomes public.
With 3,500+ GitHub stars in under three months, it's resonating with teams that want systematic PR quality without relying on cloud CI for every check.
Architecture Overview
The architecture follows a clean pipeline model:
- Your repo — push to the
no-mistakesremote (a local bare repo) instead oforigin - Post-receive hook — fires when the push lands, notifies the background daemon
- Daemon — background process that manages pipeline runs, worktrees, and agent orchestration
- Disposable worktree — an isolated Git worktree where the pipeline runs without touching your working directory
- Pipeline — nine steps in fixed order: Intent → Rebase → Review → Test → Document → Lint → Push → PR → CI
- Push target — only after all checks pass does the daemon forward the branch to the real remote and open a PR
All of this runs locally. There is no dependency on a remote CI service for the core validation.
Prerequisites
- Linux, macOS, or Windows
- Git
- One supported AI agent:
claude,codex,acli(Rovo Dev),opencode,pi, orcopilot ghCLI (GitHub) orglabCLI (GitLab) for PR/CI integration (optional)
Installation
The recommended install method is the official one-liner:
curl -fsSL https://raw.githubusercontent.com/kunchenguid/no-mistakes/main/docs/install.sh | sh
This drops the binary in ~/.no-mistakes/bin, creates a symlink in ~/.local/bin, and restarts the background daemon. On macOS it uses launchd; on Linux it uses a systemd user service.
Go install (for those who prefer building from source):
go install github.com/kunchenguid/no-mistakes@latest
Verify the installation:
no-mistakes --version
Quick Start
1. Initialize a Repository
Navigate to any Git repo with an origin remote:
cd /path/to/your/project
no-mistakes init
This creates:
- A local bare gate repo at
~/.no-mistakes/repos/<id>.git - A
no-mistakesGit remote in your working repo - A post-receive hook that notifies the daemon on each push
- A
/no-mistakesskill file for Claude Code / Codex
2. Push Through the Gate
Instead of git push origin, push to the gate:
git checkout -b feature/my-feature
# make changes, commit...
git push no-mistakes
The daemon picks up the push, creates a disposable worktree, and starts the pipeline.
3. Watch the Pipeline
no-mistakes
This opens the TUI where you see each step's progress, stream agent output, and approve/fix/skip findings. Steps that can auto-fix will do so (up to a configurable limit per step).
4. Let Your Agent Drive (Agent Mode)
If you're inside Claude Code or Codex, use the /no-mistakes skill:
/no-mistakes add a --json flag to the status command
The agent inspects scope, commits changes to a feature branch, gates them through the pipeline, and reports findings.
Pipeline Steps
The pipeline runs these nine steps in strict order:
| Step | What it does | Auto-fix limit |
|---|---|---|
| Intent | Use agent-supplied intent or infer from recent local agent transcripts | — |
| Rebase | Fetch fresh upstream, rebase your branch, raise findings if local default commits aren't pushed | 3 |
| Review | AI code review of your diff | 0 (requires approval) |
| Test | Run baseline tests and gather evidence for available intent | 3 |
| Document | Update docs when needed and report unresolved gaps | initial pass |
| Lint | Run lint/static analysis | 3 |
| Push | Safely push the validated branch to the configured target | — |
| PR | Create or update the pull request | — |
| CI | Watch CI + mergeability, auto-fix failures | 3 |
Only after all local checks pass does the gate push the branch and open the PR. If CI fails, it loops back through auto-fix attempts.
Configuration
no-mistakes supports global and per-repo configuration. The config file is at ~/.no-mistakes/config.yaml globally and .no-mistakes.yaml per repo.
Key configuration options:
- Agent selection: Set the default agent with
agent:(e.g.,claude,codex) - Auto-fix limits: Per-step limits for how many auto-fix iterations to attempt (e.g.,
review.auto_fix: 3) - Provider integration: Configure GitHub, GitLab, or Bitbucket for PR and CI
- Lint commands: Override the default lint step with custom commands
- Telemetry: Set
NO_MISTAKES_TELEMETRY=0to disable usage telemetry
Example per-repo config:
agent: claude
steps:
review:
auto_fix: 1
test:
auto_fix: 3
lint:
auto_fix: 1
Fork Workflow
For GitHub fork contributions, keep origin pointed at the parent repository and initialize with:
no-mistakes init --fork-url git@github.com:you/my-fork.git
The gate pushes validated branches to your fork while opening PRs against the parent. Regular git push origin still works for direct pushes.
Verification Checklist
no-mistakes doctorreports all prerequisites greenno-mistakes initcreates the gate remote and agent skillgit push no-mistakes <branch>triggers the pipeline in a worktree- The TUI opens and shows pipeline progress
- Findings pause for approval (review, test, doc, lint)
- Branch reaches
originonly after all checks pass - PR is opened automatically with clean description
- CI failures trigger auto-fix loops
Resources
- GitHub: github.com/kunchenguid/no-mistakes
- Documentation: kunchenguid.github.io/no-mistakes
- Discord: discord.gg/Wsy2NpnZDu
- X / Twitter: @kunchenguid
- License: MIT