# What Kind of Analysis Does no-mistakes Perform? AI-Driven Git Validation Explained

> No-mistakes performs AI code review, test execution, documentation compliance, and lint validation on Git pushes before they reach the remote repository. Learn about its AI-driven Git validation.

- Repository: [Kun Chen/no-mistakes](https://github.com/kunchenguid/no-mistakes)
- Tags: deep-dive
- Published: 2026-07-11

---

**no-mistakes performs four core types of analysis—AI code review, test execution, documentation compliance, and lint validation—through a multi-stage pipeline that intercepts Git pushes before they reach the remote repository.**

The no-mistakes project functions as a local Git proxy that runs comprehensive analysis on every proposed change. According to the kunchenguid/no-mistakes source code, this open-source tool implements a sequential validation pipeline in Go that ensures only clean, reviewed code creates pull requests.

## The Four Core Analysis Steps

The validation pipeline executes distinct analysis steps defined in `internal/pipeline/steps/`. Each step produces **findings** that either trigger automatic fixes or require human approval before the push proceeds.

### 1. AI Code Review Analysis

The **Review** step leverages configurable AI agents to perform intelligent code analysis of your changes. Implemented in [`internal/pipeline/steps/review.go`](https://github.com/kunchenguid/no-mistakes/blob/main/internal/pipeline/steps/review.go), this step supports multiple providers including Claude, Codex, and Opencode.

The analysis produces structured findings that identify potential bugs, security issues, or code quality problems. Some findings are auto-fixable, while others require explicit human approval through the interactive TUI.

### 2. Test Execution Analysis

Before any code reaches the remote, no-mistakes runs the repository’s full test suite inside a **disposable worktree**. The **Test** step, located in [`internal/pipeline/steps/test.go`](https://github.com/kunchenguid/no-mistakes/blob/main/internal/pipeline/steps/test.go), isolates test execution from your working directory to prevent contamination.

Test failures are converted into blocking findings that must be resolved or explicitly skipped. This analysis ensures that broken builds never create pull requests.

### 3. Documentation Compliance Analysis

The **Documentation** step enforces strict policies on markdown files changed in the commit. Defined in [`internal/pipeline/steps/document.go`](https://github.com/kunchenguid/no-mistakes/blob/main/internal/pipeline/steps/document.go), this analysis verifies:
- One owner per fact
- Proper citation formatting
- No duplicate facts across the repository

Violations become findings that block the push until corrected, ensuring documentation quality remains consistent.

### 4. Lint and Style Analysis

Language-specific linting runs via the **Lint** step in [`internal/pipeline/steps/lint.go`](https://github.com/kunchenguid/no-mistakes/blob/main/internal/pipeline/steps/lint.go). This analysis executes appropriate tools for the codebase—such as `go vet`, `golint`, or `eslint`—on all modified files.

Lint warnings are categorized as either auto-fixable or manual-review findings, allowing the pipeline to resolve straightforward style issues automatically while surfacing complex problems for developer attention.

## How the Analysis Pipeline Executes

The **Executor** in [`internal/pipeline/executor.go`](https://github.com/kunchenguid/no-mistakes/blob/main/internal/pipeline/executor.go) orchestrates these analysis steps sequentially. Each step runs in isolation using temporary git worktrees created through `git.Run` in `internal/git`, ensuring your original working directory remains untouched.

The system maintains durable state across analysis runs using an embedded SQLite database (`internal/db`). The **Daemon** (`internal/daemon`) enforces singleton locks so only one analysis pipeline runs per repository at a time, while the **TUI** (`internal/cli`) streams real-time events over IPC, allowing you to interact with findings as they appear.

Configuration in `internal/config` controls which analysis gates are active, which AI agent handles reviews, and whether session context persists across multiple rounds.

## Running the Analysis Pipeline

Initialize the gate in your repository to begin local analysis:

```bash

# Install the gate and create configuration

$ no-mistakes init

```

Push through the analysis pipeline instead of directly to origin:

```bash

# Triggers: review → test → docs → lint → remote push + PR

$ git push no-mistakes my-feature

```

Launch the interactive TUI to handle findings:

```bash

# Review auto-fixes and approve manual findings

$ no-mistakes

```

## Summary

no-mistakes performs comprehensive pre-push analysis through four specialized stages:

- **AI Code Review**: Intelligent analysis of logic and security using configurable agents
- **Test Execution**: Isolated validation of the full test suite in disposable worktrees
- **Documentation Compliance**: Policy enforcement for markdown structure and ownership
- **Lint Validation**: Language-specific style and error checking with auto-fix capabilities

All analysis occurs locally before any code reaches the remote, guaranteeing that only validated, clean pull requests are created.

## Frequently Asked Questions

### What types of analysis does no-mistakes perform?

no-mistakes performs four distinct analysis types: AI-powered code review, test suite execution, documentation policy compliance, and language-specific linting. Each analysis step runs sequentially in `internal/pipeline/steps/` and must report green before the push proceeds to the remote repository.

### How does no-mistakes isolate the analysis environment?

The tool creates disposable git worktrees using `git.Run` from `internal/git` to run all analysis steps. This isolation ensures that test execution, linting, and AI review occur in clean environments that do not modify your original working directory or interfere with uncommitted changes.

### Can no-mistakes automatically fix issues found during analysis?

Yes, the pipeline distinguishes between auto-fixable findings and those requiring manual approval. Lint errors and certain AI-suggested improvements can be applied automatically, while complex issues or documentation violations surface in the TUI for explicit developer review.

### Which AI agents does no-mistakes support for code review?

The analysis pipeline supports multiple AI agents through the abstraction layer in [`internal/agent/agent.go`](https://github.com/kunchenguid/no-mistakes/blob/main/internal/agent/agent.go). You can configure Claude, Codex, Opencode, or other compatible providers to perform the code review analysis, with settings controlled via `internal/config`.