Engineering

Project Docs Freshness

Keep documentation synced with what the product actually does.

Use when

Code changed and the docs are probably now lying by omission.

difficultyBeginner
categoryEngineering
sourcePaul-created

Cadence

Nightly or after meaningful code changes

Verification

Changed behavior, APIs, CLI commands, config, and workflows are reflected in docs. Docs checks pass.

Structured loop spec

FieldValue
NameProject Docs Freshness
CategoryEngineering
TriggerNightly or after meaningful code changes
ObjectiveKeep documentation synced with what the product actually does.
Allowed inputsRelevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop
Allowed actionsReview code changes since the last pass.; Find docs contradicted by changed behavior, config, commands, examples, or APIs.; Patch the highest-risk stale docs first.; Run docs build or link checks and produce a no-change report if clean.
VerificationChanged behavior, APIs, CLI commands, config, and workflows are reflected in docs. Docs checks pass.
Stop conditionStop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.
BudgetSet a time, turn, token, retry, file, or dollar cap before running the loop.
Approval boundaryHuman approval required before public, destructive, financial, legal, account, or production-impacting actions.
Safe outputPull request, patch, report, or evidence log
Works withClaude Code, OpenAI Codex, Cursor, Gemini CLI, any tool-using coding agent

Steps

  1. Review code changes since the last pass.
  2. Find docs contradicted by changed behavior, config, commands, examples, or APIs.
  3. Patch the highest-risk stale docs first.
  4. Run docs build or link checks and produce a no-change report if clean.

Prompt

Review recent code changes and update stale, missing, or contradicted documentation. Cover public APIs, CLI commands, config behavior, user-facing workflows, and examples. Run docs verification and return the diff or a no-change report.

Run in Claude Code

Paste this into Claude Code (or any tool-using agent) to run the loop bounded: one change per round, the same verification every round, durable state files, and explicit stop conditions.

Run the "Project Docs Freshness" loop from AI Loop Library (https://ailooplibrary.com/loops/project-docs-freshness/) as a bounded loop.
Goal: Keep documentation synced with what the product actually does.
Rules: one change per round; run the same verification every round (Changed behavior, APIs, CLI commands, config, and workflows are reflected in docs. Docs checks pass.); append each round to docs/loops/project-docs-freshness/progress.md and update docs/loops/project-docs-freshness/state.json; stop on verifier pass, 8 rounds, 3 consecutive failed verifications, no progress, a blocker, or anything needing human approval (money, production, outbound, deletion). Finish with a proof report: rounds used, changes made, verification output, remaining risk, and the next human decision.

Get the MCP server + agent pack

Tags

docsmaintenanceAPIsrelease hygiene

Related loops

Browse all 68 loops