How to Set Up a Development Environment for no-mistakes

To set up a development environment for no-mistakes, clone the repository, ensure Go 1.22+ is installed, run go mod tidy, and use make build to compile the binary.

no-mistakes is a Go-based CLI tool that intercepts Git push operations to run an AI-driven validation pipeline. The source code is organized under an internal/ package hierarchy and uses a conventional Makefile for build automation.

Prerequisites

Before compiling the project, verify your system meets the following requirements:

  • Go 1.22 or higher – The project uses modern Go features and requires version 1.22 minimum.
  • Git – Required for worktree manipulation and subcommand execution.
  • Make – Used to invoke build targets defined in the repository root.

You can check your Go version with:

go version

Repository Structure

Understanding the package layout helps navigate the codebase effectively. The project follows a standard Go structure with internal packages:

Build System Overview

The project uses a Makefile to coordinate compilation, testing, and code generation. Key targets include:

  • make build – Compiles the binary to bin/no-mistakes with version information baked in.
  • make test – Runs all unit tests with race detection enabled (go test -race ./...).
  • make e2e – Executes the end-to-end suite (agents + pipeline) behind the e2e build tag.
  • make lint – Verifies generated skill files are up-to-date and runs go vet.
  • make fmt – Formats the entire source tree using gofmt -w ..
  • make skill – Regenerates the Markdown skill file from the source constant after any skill body changes.

Step-by-Step Setup

Follow these commands to build no-mistakes from source:


# Clone the repository

git clone https://github.com/kunchenguid/no-mistakes.git
cd no-mistakes

# Install dependencies

go mod tidy

# Build the binary

make build

This produces bin/no-mistakes in your working directory. Initialize the tool to create the gate directory in ~/.no-mistakes:

./bin/no-mistakes init

Development Workflow

After modifying code under internal/, follow this verification sequence:

  1. Run make fmt – Ensures consistent formatting across all Go files.
  2. Run make lint – Confirms generated skills are synchronized and code passes static analysis.
  3. Run make test – Catches regressions with the unit test suite.
  4. Run make e2e – Validates the complete push → pipeline → PR flow (requires network access for agent CLIs).

If you modify the AI skill definitions, regenerate the skill file:

make skill

Key Source Files

Summary

  • no-mistakes requires Go 1.22+ and uses standard make targets for building.
  • The codebase is organized under internal/ with clear separation between CLI parsing, daemon lifecycle, and pipeline execution.
  • Use make build to compile, make test for unit tests, and make e2e for full integration testing.
  • Run make skill after editing AI skill constants to regenerate the Markdown skill file.
  • The binary initializes its state in ~/.no-mistakes when you run ./bin/no-mistakes init.

Frequently Asked Questions

What Go version is required to build no-mistakes?

Go 1.22 or higher is recommended. The project uses modern language features and the go.mod file specifies a compatible version. Verify your installation with go version before running make build.

How do I run the full test suite including AI agent integration?

Use make e2e to execute the end-to-end suite. This target requires the e2e build tag and network access to download agent CLIs. Unit tests alone can be run with make test, which executes go test -race ./... to detect race conditions.

Why is there a make skill command and when should I use it?

The cmd/genskill tool generates the /no-mistakes Markdown skill file from a source constant. You must run make skill after editing the skill body in the Go source to keep the generated documentation synchronized. The make lint target will fail if the skill file is out of date.

Where does no-mistakes store its configuration and worktrees?

The daemon creates a gate directory at ~/.no-mistakes when you run ./bin/no-mistakes init. This location stores the singleton lock, disposable worktrees, and cached configuration. The internal/daemon/daemon.go and internal/config/config.go files handle these paths according to the XDG Base Directory specification where applicable.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →