- docs-sweep-loop.md 42 lines · 2.3 KB
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
- Perceive — diff the docs against the current source (signatures, flags, env vars, examples).
- Reason — list concrete drift: missing pages, stale snippets, broken links, renamed APIs.
- Plan — pick the smallest meaningful slice to fix this pass.
- Act — update the docs with the
documentation-engineeragent and/update-docs. - 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.
Scanned by NVIDIA SkillSpector
Automated static analysis (no LLM) · v2.12.0 · 2026-10-17
SkillSpector looks for patterns such as shell commands, credential access, network calls or unpinned dependencies. An observation is something worth reading in the files before you install, not a confirmed vulnerability. Components that run code locally, like hooks, MCP servers and security tooling, naturally show more of them.
- Anti-Refusal Statement ×2Anti-Refusal · docs-sweep-loop.md:6
Learn more about NVIDIA SkillSpector.