Docs Sweep Loop
Keeps documentation aligned with the current codebase and opens a reviewable pull request on every pass.
Before you use this component
This is a third-party source bundle, not an installation into your account. UI Discovery has checked the available redistribution license evidence; runtime behavior has not been tested. Review all files, use a disposable project first, and do not enable scripts or hooks until you understand their permissions.
Some integrations require separately installed software, API keys or paid services. Credentials and subscriptions are not included. These are Claude Code resources; other clients may require adaptation.
Extract the ZIP into a temporary folder, inspect its entry file and supporting resources, then follow the original instructions. Do not overwrite an existing project configuration blindly. Keep the bundled license and attribution notices.
- Source publisher
- Claude Code Templates
- Creator supplied by source
- Not listed in source
- Pinned source version
- a344359459263d73d8948651c789244093c02e4e
- License evidence
- LICENSE
Source preview
cli-tool/components/loops/engineering/docs-sweep-loop.md
--- name: docs-sweep-loop description: Keeps documentation aligned with the current codebase and opens a reviewable pull request on every pass. category: engineering interval: 30m stop-condition: Every public API, command and config option is documented and the docs build passes with no warnings. components: [agent:documentation/documentation-engineer, command:documentation/update-docs, command:git-workflow/create-pr] tags: [documentation, automation, ci, loop] --- # Docs Sweep Loop > **Loop Engineering** — instead of prompting the agent by hand, you define a recurring goal and let Claude observe, plan, act and verify until a stop condition is true. This loop keeps documentation continuously in sync with the code. ## 🎯 Goal Keep the project's documentation accurate and complete as the codebase changes, and surface every update as a small, reviewable pull request rather than a giant batch. ## ⏱️ Schedule Suggested interval: `30m` (or run after each merge to `main`). ## ▶️ Run it ``` /loop 30m "Compare the docs against the current code. Find any public API, CLI flag, config option, or behavior that changed or is undocumented. Update the docs to match, then open a focused PR. Continue until docs and code fully agree." ``` ## 🔁 Iteration steps 1. **Perceive** — diff the docs against the current source (signatures, flags, env vars, examples). 2. **Reason** — list concrete drift: missing pages, stale snippets, broken links, renamed APIs. 3. **Plan** — pick the smallest meaningful slice to fix this pass. 4. **Act** — update the docs with the `documentation-engineer` agent and `/update-docs`. 5. **Observe** — build the docs; if it passes with no warnings, open a PR with `/create-pr`. Otherwise fix and repeat. ## 🛑 Stopping condition All public surfaces are documented, examples compile, links resolve, and the docs build is warning-free. ## 🧩 Referenced components - `agent:documentation/documentation-engineer` — drives the doc edits. - `command:documentation/update-docs` — refreshes generated docs. - `command:git-workflow/create-pr` — opens the reviewable PR. ## 💡 Example After a release that renamed three CLI flags, the loop detects the drift, rewrites the affected pages and examples, verifies the build, and opens `docs: sync CLI flag renames` for review.
Preview capped at 60,000 characters. Download the bundle for every original file and notice.
Read the redistribution license
MIT License Copyright (c) 2025 Daniel (San) Ávila Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Bundle SHA-256: 53c24a9549a1ecda6e1870a78404ca94825445a4d6da1fa3d6e8ef7b3f7a1d56. Files are served as downloads and are never executed by this page.