Loop 001

The docs sweep

A reusable AI coding-agent workflow for comparing documentation with the current codebase, fixing drift, and opening a reviewable pull request.

Ready-to-use prompt

Copy the loop

Whenever a documentation pass is needed, review the codebase in full and make sure all documentation reflects the current implementation. Update stale documentation, verify the changes, then open a pull request.

Verify / stop

Documentation matches the current implementation.

Finish with a reviewable pull request.

Context and guidanceWhen to use it, steps, safety notes, and related loops
Published
Updated

Use this when

Use this whenever implementation changes may have left READMEs, setup guides, API references, examples, or runbooks behind.

How to run it

  1. Review implementation changes since the last documentation pass.
  2. Compare the repository's documentation with the code, configuration, commands, and behavior that now ship.
  3. Update only stale material, then verify commands, links, and examples against the current repository.
  4. Run the relevant checks and open a pull request that explains the documentation drift and the fixes.

Why it works

The loop ties documentation to the implementation instead of relying on memory. Requiring a pull request creates a visible diff, a review point, and a durable record of what changed.

Implementation note

Keep the scope tied to real implementation changes. Do not rewrite accurate documentation just to create activity.