I Added an AI Gate Before Every git push with no-mistakes ️

I Added an AI Gate Before Every git push with no-mistakes ️

2
calendar_today agoschedule3 min read
— Originally published at dev.to

We are all using AI to write code now. Whether it's Claude Code, Aider, or Copilot, the speed is incredible. But there is a glaring bottleneck we don't talk about enough: AI code is often just slightly broken.

It forgets an import, misses a type definition, or fails a test.

Usually, you only find out after you push to GitHub. Your CI/CD pipeline turns red , and you end up polluting your Git history with a dozen commits titled fix: linting or fix: missing test variable.

I recently found a repository called no-mistakes that solves this brilliantly. It acts as a local proxy between your terminal and GitHub, forcing AI to test and fix its own code before anyone else sees it.

Here is why it's worth a look.


The Problem With Traditional Workflows

Right now, developers handle broken code in two ways:

  1. The CI/CD Walk of Shame : You push code, wait 5 minutes for GitHub Actions to fail, pull the error locally, fix it, and push again.
  2. Pre-commit Hooks (Husky) : You set up local hooks. When you try to commit, it yells at you about formatting and blocks the commit until you manually fix it.

Both methods are passive. They tell you something is broken, but they leave the cleanup to you. When you're using an AI coding agent to generate the code in the first place, manually babysitting its output defeats the purpose.


Enter no-mistakes

no-mistakes is a CLI tool that intercepts your git push. Instead of sending your code straight to origin, it routes it through a localized validation pipeline.

⚙️ How it actually works:

  1. The Hidden Sandbox: When you trigger it, it creates a temporary git worktree in the background. Your active editor stays completely undisturbed.
  2. Validation: It runs your tests, linter, and build steps inside that isolated sandbox.
  3. The AI Feedback Loop: If a test fails, it captures the error log and hands it back to an AI agent, essentially saying: "You broke this test. Fix it."
  4. The Clean Push: Once the AI patches the code and all tests pass, it pushes the clean code to GitHub and auto-opens a Pull Request. It then deletes the temporary sandbox.

What Makes It Stand Out

The biggest differentiator is that it is active, not passive.

If a pre-commit hook fails, the process stops. If no-mistakes fails, it initiates an agentic review loop. It uses an interactive Terminal UI (TUI) to show you exactly what the AI is trying to fix. If the AI gets stuck, you can step in and provide guidance right in the terminal.

It also integrates natively with tools like Claude Code. You can literally tell your agent, "Use the /no-mistakes skill to verify and gate these changes," and it will handle the entire lifecycle.


✨ Key Features at a Glance

  • Non-Blocking: Because it uses hidden worktrees, you can immediately start working on your next feature while it tests and fixes the last one in the background.
  • Auto-Rebase: It automatically rebases your code on top of the latest main branch before testing, preventing hidden merge conflicts.
  • Auto-Documentation: It reviews the code changes and updates your README.md to keep documentation from going stale.
  • Clean PRs: You never push failing builds upstream.

️ How to Get Started

Setup takes about 30 seconds. ⚡

1. Install the CLI tool globally:

curl -fsSL https://raw.githubusercontent.com/kunchenguid/no-mistakes/main/docs/install.sh | sh

2. Initialize it in your project folder:

no-mistakes init

This wires up a new git remote proxy called no-mistakes.

3. Change how you push:

The next time you (or your AI) finish a feature, skip git push origin. Instead, run:

git push no-mistakes

The tool will take over, spin up the worktree, run your suites, fix the AI's slop, and open the PR for you.


Let's Discuss

As AI agents write more of our code, our tooling needs to shift from writing to verifying.

How are you currently handling AI-generated bugs in your workflow? Are you still manually running tests and fixing the AI's mistakes, or have you started automating the review loop? Let me know in the comments!

🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

I’m a Senior Dev and I’ve Forgotten How to Think Without a Prompt

Karol Modelskiverified - Mar 19

TypeScript Complexity Has Finally Reached the Point of Total Absurdity

Karol Modelskiverified - Apr 23

How I Built a React Portfolio in 7 Days That Landed ₹1.2L in Freelance Work

Dharanidharan - Feb 9

Why Prompt Engineering Is Just an Expensive Way to Be Incompetent

Karol Modelskiverified - May 21

The Sovereign Vault — A Comprehensive Guide to Protocol-Driven AI

Ken W. Algerverified - Jun 4
chevron_left
141 Points2 Badges
Ahemedabad, Gujaratdivyesh-codes.netlify.app
2Posts
0Comments
Software Engineer at Zuru Tech | Turning Lines of Code into Elegant Experiences ✨

Related Jobs

Commenters (This Week)

3 comments
2 comments
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!