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.
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
| Field | Value |
|---|---|
| Name | Project Docs Freshness |
| Category | Engineering |
| Trigger | Nightly or after meaningful code changes |
| Objective | Keep documentation synced with what the product actually does. |
| Allowed inputs | Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop |
| Allowed actions | Review 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. |
| Verification | Changed behavior, APIs, CLI commands, config, and workflows are reflected in docs. Docs checks pass. |
| Stop condition | Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required. |
| Budget | Set a time, turn, token, retry, file, or dollar cap before running the loop. |
| Approval boundary | Human approval required before public, destructive, financial, legal, account, or production-impacting actions. |
| Safe output | Pull request, patch, report, or evidence log |
| Works with | Claude Code, OpenAI Codex, Cursor, Gemini CLI, any tool-using coding agent |
Steps
- Review 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.
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.