Loop oversight
Skill mickzijdel/dev-hooks/plugins/dev-hooks/skills/loop-oversight
Use before launching a loop that runs many iterations — a `/loop`, a `/schedule` routine, or a Workflow fan-out — or when a running loop is drifting, unbounded, or leaving no reviewable trail. Triggers on "loop over every X", "go through all the Y and track status", "automate this repetitive sweep", "run this on a schedule", or an Osman-style "make a canonical tracker and work through every item". Sets up the ledger, the bound, and the independent verify pass a loop needs to stay reviewable. NOT for a one-off task (just do it) or one-shot parallel fan-out with no iteration (that's dispatching-parallel-agents).From its SKILL.md
npx -y skills add mickzijdel/dev-hooks --skill loop-oversightAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.9 KB, ~1.0k tokens by cl100k_base, as published. Nobody here has run it
Running loops with oversight
A loop that grinds through many items unattended is only as safe as three things: a ledger you can read at a glance, an explicit bound it can't run past, and a verify pass that isn't the same agent that did the work. Set those up before the loop starts. Oversight is not watching the agent — it's making the loop's state legible in an artifact and inserting checkpoints the loop cannot skip.
Before you launch — five gates
Don't start the loop until each is a concrete artifact, not an intention.
- Ledger. One canonical file the loop reads and writes every turn — a status table (item /
expected behaviour / status / findings / evidence). Reuse
.claude/current_plan.mdso theplan-reminderandbig-change-reminderhooks already track it. Template: templates/loop-ledger.md. Oversight = reading this one file. - Unit of work + done-condition. Define the smallest atomic item and its checkable exit ("test green", "row marked done with a linked commit") — never "be thorough".
- Bound. Every loop gets an explicit ceiling: max iterations, a token budget, or until-N-consecutive-empty (a plain counter misses the tail). No unbounded loops.
- Independent verify pass. The agent that produces an item does not get to mark it done. A
separate pass confirms it — an adversarial subagent prompted to refute, or
/code-review. Mirrorsreview-reminder's "review → fix → re-review until clean". - Integration cadence. Commit per unit (atomic — keeps
git logthe audit trail and never tripsbig-change-reminder). An unattended loop opens one PR per unit and never auto-merges — the [[commit-digest]] pattern.
The per-turn contract
Paste this into the loop prompt so every iteration is self-checking:
read ledger → pick next un-done item → do it → verify (separate pass) → update the ledger row with evidence → commit.
Stop when the bound is hit, or the ledger has no un-done item two turns running.
Substrate — match it to how much you can watch
| You are… | Use | Bound + oversight |
|---|---|---|
| At the keyboard | /loop (interval or self-paced) | Ctrl-C; Stop hooks (verify-work, review-reminder) gate each turn |
| Present, want structure | Workflow tool | budget.remaining() ceiling; verify stage baked into the pipeline |
| Away / recurring | /schedule cron routine | PR-per-unit, no auto-merge, a digest you read later |
Detail and the budget/until-dry patterns: substrate-selection.md. Ready generate + verify prompts, plus a poll-until-true scaffold for "wait for a condition, then take one action" (merge once CI/main settles, confirm a deploy went live): prompt-scaffolds.md.
Completion criteria
- All five gates existed as artifacts before the loop ran (ledger file, defined unit, written bound, verify pass, commit/PR cadence).
- Every ledger row reaches a terminal state with linked evidence (commit / PR / test output), or is explicitly parked with a reason — no silent skips.
- The loop stopped at its bound, not by running out of context or being interrupted.
Red flags — stop and add a gate
- No ledger file, or the loop isn't updating it each turn → oversight is invisible.
- "I'll just let it run and check the result" with no iteration/budget ceiling → unbounded.
- The same agent writes an item and marks it done → no independent verify.
- An unattended loop merging to
main→ review can never happen.
Notes
- The bound lives where you write it. A Stop hook can't hard-cap a
/loop(it can only nudge the next turn) and can't see token counts. The real ceiling ismax iterations/until-N-emptyin the prompt, orbudget.remaining()in the Workflow tool. - For a batch sweep across many targets, the
dev-env-setupfleet mode (canary first → one isolated agent per target → verify each) is the supervised template — reuse that shape. - Related: [[multi-session-plans]] owns the
.claude/current_plan.mdphased checkpoint this skill uses as a ledger; [[repo-review]] and ad-hoc work surface the items a loop then works.
What ships with it: 3 files
9.4 KB alongside SKILL.md
references/
- prompt-scaffolds.md4.8 KB
- substrate-selection.md2.7 KB
- templates/loop-ledger.md1.9 KB