Can no-mistakes Automatically Update Documentation? A Deep Dive into the Document Step

Yes, no-mistakes includes a dedicated Document step that automatically synchronizes project documentation with code changes, committing updates only for files directly affected by the change while adhering to a strict authoritative owner policy.

The open-source tool no-mistakes (kunchenguid/no-mistakes) automates code quality workflows through a pipeline-based architecture. When you need to ensure your docs stay accurate as code evolves, the repository provides built-in functionality to automatically update documentation through its specialized Document step.

How the Document Step Works in no-mistakes

The Document step operates as an integrated component of the no-mistakes pipeline, triggered during execution when documentation-relevant file changes are detected.

The Authoritative Owner Policy

In internal/pipeline/steps/document.go (lines 28-34), the implementation enforces a strict "authoritative owner" policy. This constraint ensures the document agent only modifies documentation surfaces that the specific code change rendered stale. The system never performs unrelated "corpus-sweep" edits or broad documentation rewrites that exceed the scope of the current change.

Integration with the Lint Step

When your repository configuration supplies a commands.lint value, the Document step combines with the Lint step into a single "document + lint housekeeping pass" (see internal/pipeline/steps/document.go lines 24-29 and 118-125). The outcome of this combined pass is stored as "documentation" findings, which are presented to the user for approval before automatic commit.

Running Documentation Updates

You can trigger documentation updates through the no-mistakes CLI using either the full pipeline or a targeted step execution.

Run the complete pipeline to automatically invoke the Document step when relevant changes are detected:

no-mistakes run

Execute only the documentation step for a quick doc-only update:

no-mistakes axi run --step=document

What Happens During Execution

When the Document step executes, the pipeline follows a precise sequence defined in the source code:

  1. Detection: The executor evaluates changed files to identify modifications affecting documented facts.
  2. Agent Invocation: The system assembles a prompt for the document agent with the instruction "Keep the project documentation accurate for this change."
  3. Auto-Commit: Upon user approval of the findings, no-mistakes automatically commits the updates with a conventional commit message like no-mistakes(document): update README (as confirmed in internal/pipeline/steps/document_test.go lines 49-52).

Key Implementation Files

The automatic documentation functionality is implemented across several critical files in the kunchenguid/no-mistakes repository:

  • internal/pipeline/steps/document.go – Core implementation of the Document step, including policy definitions and agent interaction logic.
  • internal/pipeline/steps/document_test.go – Test suite confirming that documentation updates are automatically committed and restricted to relevant documentation only.
  • internal/skill/skill.go – Defines the document skill name used within the pipeline (alongside intent, rebase, review, test, etc.).
  • AGENTS.md – High-level architectural description of the Document step's purpose and its interaction with other pipeline agents.

Summary

  • no-mistakes automatically updates documentation through a dedicated Document step integrated into its execution pipeline.
  • The system follows an authoritative owner policy that restricts edits to only documentation affected by the current code change.
  • When commands.lint is configured, the Document step merges with the Lint step for efficient housekeeping.
  • Documentation updates are auto-committed with conventional commit messages after user approval of the findings.
  • The implementation resides primarily in internal/pipeline/steps/document.go and is tested in internal/pipeline/steps/document_test.go.

Frequently Asked Questions

Can no-mistakes update all project documentation at once?

No. According to the source code in internal/pipeline/steps/document.go (lines 28-34), no-mistakes enforces a strict scope policy that prevents "corpus-sweep" edits. The Document step only touches documentation surfaces that the specific code change directly affects, preserving the one-authoritative-owner discipline and preventing unintended large-scale rewrites.

How do I run only the documentation step in no-mistakes?

Use the targeted step execution command: no-mistakes axi run --step=document. This invokes only the Document step without running the full pipeline, which is useful for quick documentation-only updates or when you need to specifically regenerate docs outside the standard change detection workflow.

What git commit message does no-mistakes use for documentation updates?

When documentation findings are approved, no-mistakes automatically commits changes using a conventional commit format like no-mistakes(document): update README. This behavior is verified in internal/pipeline/steps/document_test.go (lines 49-52), ensuring consistent commit history tracking for automated documentation maintenance.

Is the documentation step configurable in no-mistakes?

Yes. The Document step checks for a commands.lint configuration value in your repository settings. If present, it combines documentation updates with linting into a single housekeeping pass (as implemented in internal/pipeline/steps/document.go lines 24-29 and 118-125), allowing you to customize how documentation maintenance integrates with your existing quality checks.

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 →