| name | loop-docs-update |
| description | Use to run a bounded documentation drift scan, update, and re-verify loop that stops when docs match the code, on no diff, or on a repeated identical mismatch. |
| disable-model-invocation | true |
Loop: Documentation Update
Bring documentation back in sync with the code through a bounded number of iterations. Each iteration scans for drift, updates one area, and re-verifies against the source.
Loop Steps
- Scan the docs for statements that no longer match the current code or contracts.
- Update one drifted area to match the code, keeping the change focused.
- Re-verify the updated docs against the source and note any remaining drift.
Max Iterations
The loop runs at most 3 iterations. When it reaches 3 iterations without meeting a stop condition, it stops unconditionally and reports the unfinished state and the outstanding work; it never raises the bound to keep going.
Stop Conditions
Stop the loop as soon as any of these holds:
- The relevant tests and checks are green.
- An iteration produces no diff.
- The same failure repeats identically across two consecutive iterations.
Approval Gate
- Get explicit human approval before any write, commit, or destructive step in each iteration.
- The loop never self-approves, never continues past the iteration bound, and never runs destructive commands on its own authority.
- Pause and surface the state whenever approval is missing.
Safety
- Do not upload source code.
- Do not read or print secrets.
- APC does not run this loop; a human or agent follows these instructions and remains in control.