# Main Features of the no-mistakes Project Explained

> Discover the main features of no-mistakes, a Go CLI tool for reproducible development pipelines. Explore its daemon architecture, AI agents, and data loss prevention.

- Repository: [Kun Chen/no-mistakes](https://github.com/kunchenguid/no-mistakes)
- Tags: main-features
- Published: 2026-07-20

---

**The no-mistakes project is a Go-based CLI tool that orchestrates safe, reproducible development pipelines through a daemon-based architecture, pluggable AI agents, and strict safety mechanisms that prevent data loss.**

The no-mistakes repository from kunchenguid/no-mistakes delivers a comprehensive development workflow automation system designed to eliminate accidental mistakes in software engineering. By combining apersistent daemon process with a rich command-line interface and isolated package architecture, this open-source tool provides enterprise-grade safety guarantees while integrating modern AI capabilities for code review and analysis.

## Command-Line Interface and Daemon Architecture

The project centers on a dual-mode architecture that separates user interaction from long-running coordination tasks.

### The no-mistakes CLI Entry Point

The `no-mistakes` binary serves as the primary user interface, exposing subcommands including `init`, `run`, `axi`, `daemon`, and `sync`. In [`cmd/no-mistakes/main.go`](https://github.com/kunchenguid/no-mistakes/blob/main/cmd/no-mistakes/main.go), the application parses flags and dispatches to appropriate handlers, providing immediate feedback while delegating complex operations to the background daemon.

To initialize a repository for no-mistakes workflows:

```bash
no-mistakes init

```

This command sets up the `NM_HOME` directory, writes a default [`.no-mistakes.yaml`](https://github.com/kunchenguid/no-mistakes/blob/main/.no-mistakes.yaml) configuration file, and establishes the daemon lock file structure.

### Singleton Daemon with OS-Level Locking

A critical feature ensures only one daemon instance runs per user through an OS file lock mechanism implemented in [`internal/daemon/lock.go`](https://github.com/kunchenguid/no-mistakes/blob/main/internal/daemon/lock.go). The daemon coordinates all pipeline runs, manages worktrees, and handles IPC communication, preventing resource conflicts and maintaining state consistency across operations.

Users interact with the daemon through the `axi` CLI:

```bash

# List current runs

axi status

# Abort a specific run

axi abort --run 42

```

These commands communicate via Unix sockets in `internal/ipc`, returning structured JSON responses.

## Pipeline Execution and Agent Framework

The core automation engine processes development workflows through ordered steps with integrated AI assistance.

### Multi-Step Pipeline Executor

The [`internal/pipeline/executor.go`](https://github.com/kunchenguid/no-mistakes/blob/main/internal/pipeline/executor.go) file implements a strict execution engine that processes sequences of **intent**, **review**, **lint**, **test**, **document**, **push**, and **CI** steps. The executor maintains context propagation across stages and handles automatic re-run logic when recoverable failures occur.

To execute a full development cycle:

```bash
no-mistakes run --intent "Add a health-check endpoint"

```

This spawns the daemon, creates a fresh worktree, and executes the complete pipeline with context propagation between each step.

### Pluggable AI Agent Support

The `internal/agent` package provides an abstraction layer supporting multiple LLM backends including **Codex**, **Claude**, and **fakeagent**. Agents parse structured output from model responses and feed findings back into the pipeline for human review.

For offline testing without API calls:

```bash
no-mistakes run --agent fakeagent

```

The `fakeagent` adapter in `internal/agent/fakeagent` returns deterministic JSON responses, enabling reliable pipeline testing without external dependencies.

## Safety Mechanisms and Trust Boundaries

The project implements multiple layers of protection against data loss and supply-chain attacks.

### Safe Branch Synchronization and Recovery

The branch synchronization service in [`internal/branchsync/sync.go`](https://github.com/kunchenguid/no-mistakes/blob/main/internal/branchsync/sync.go) safely fast-forwards, resets, or recovers local branches against the canonical "gate" branch. When operations fail or runs crash, the system preserves work through SHA-based anchoring:

```bash
no-mistakes sync --recover

```

The `--recover` flag re-anchors the gate branch to the saved SHA and safely relocates the local worktree, preventing the data loss common in aggressive Git operations.

### Repository Configuration Trust Verification

Security-critical configuration loading occurs in [`internal/daemon/manager.go`](https://github.com/kunchenguid/no-mistakes/blob/main/internal/daemon/manager.go), which validates that commands and settings originate from the **trusted default-branch SHA** rather than unverified pushes. This prevents supply-chain attacks where malicious configuration might execute in untrusted repository states.

### Lifecycle Guards and Graceful Shutdown

The [`internal/lifecycle/guard.go`](https://github.com/kunchenguid/no-mistakes/blob/main/internal/lifecycle/guard.go) implementation enforces strict shutdown policies. Commands like `daemon stop`, `restart`, and `update` refuse to execute while active runs exist unless explicitly overridden with `--force`:

```bash
no-mistakes daemon stop --force

```

This prevents accidental termination of running pipelines that could leave repositories in inconsistent states.

## Cross-Platform Reliability and Observability

The project maintains consistent behavior across operating systems while respecting user privacy.

### Process Hygiene and Resource Management

All spawned commands route through `shellenv.ConfigureShellCommand` (or `winproc.Harden` on Windows) as implemented in `internal/shellenv`. This ensures child-process trees are properly reaped and resource leaks are prevented across Linux, macOS, and Windows environments.

### Privacy-First Telemetry

According to [`internal/agent/invocationmetrics.go`](https://github.com/kunchenguid/no-mistakes/blob/main/internal/agent/invocationmetrics.go), the telemetry system distinguishes between read-only and mutation surfaces. Read-only operations emit minimal data, while mutation surfaces capture only aggregate counts—never raw prompts, file paths, or sensitive repository content.

### Comprehensive Test Coverage

Every public contract undergoes verification through unit, integration, and end-to-end tests marked with the `e2e` build tag. Security-critical paths receive additional scrutiny across the `internal/.../*_test.go` files, ensuring the safety guarantees remain valid through code evolution.

## Summary

The main features of the no-mistakes project include:

- **Singleton daemon architecture** with OS-level file locking to prevent duplicate processes
- **Multi-step pipeline execution** supporting intent parsing, linting, testing, and CI integration
- **Pluggable AI agent framework** supporting OpenAI Codex, Anthropic Claude, and deterministic fake agents
- **Safe Git operations** with branch synchronization and crash recovery mechanisms
- **Trust boundary enforcement** that loads configuration only from verified default-branch commits
- **Lifecycle guards** preventing daemon shutdown during active pipeline execution
- **Cross-platform process management** ensuring resource cleanup on all supported operating systems
- **Privacy-preserving telemetry** that aggregates metrics without capturing sensitive data

## Frequently Asked Questions

### What is the no-mistakes project used for?

The no-mistakes project automates development workflows by orchestrating code review, linting, testing, and Git operations through a safe, daemon-based architecture. It prevents accidental data loss while integrating AI agents to assist with code analysis and documentation generation.

### How does no-mistakes prevent data loss during Git operations?

The system implements multiple safeguards including the branch synchronization service in [`internal/branchsync/sync.go`](https://github.com/kunchenguid/no-mistakes/blob/main/internal/branchsync/sync.go) that supports recovery modes, lifecycle guards in [`internal/lifecycle/guard.go`](https://github.com/kunchenguid/no-mistakes/blob/main/internal/lifecycle/guard.go) that prevent shutdown during active runs, and worktree isolation that keeps uncommitted changes separate from automated operations.

### What AI agents does the no-mistakes project support?

The pluggable agent framework in `internal/agent` supports OpenAI Codex, Anthropic Claude, and a fakeagent for testing. Each agent adapter parses structured LLM output and feeds findings into the pipeline executor, allowing teams to integrate their preferred AI models for automated code review.

### How does the daemon architecture improve development workflows?

The singleton daemon, locked via [`internal/daemon/lock.go`](https://github.com/kunchenguid/no-mistakes/blob/main/internal/daemon/lock.go), maintains persistent state across commands, manages worktree creation, and coordinates IPC between the CLI and background processes. This architecture enables long-running operations like complete CI pipelines while providing status monitoring through the `axi` command interface.