Patterns
Loop Patterns
Named, reusable loop designs. Each pattern states what the loop watches, what it may do, how it verifies its own output, and where a human stays in the…
Named, reusable loop designs. Each pattern states what the loop watches, what it may do, how it verifies its own output, and where a human stays in the decision.
A loop pattern is a proven arrangement of the six parts — heartbeat, body, spine, stopping
condition, checker, and human gate — for one recurring job. Start from the pattern closest to
your problem, then adapt it. Every pattern here has a matching runnable kit in
starters/.
Review and delivery
| Pattern | What it does |
|---|---|
| PR babysitter | Watches an open PR and drives it to mergeable |
| Spec → dev → review | Splits authoring and reviewing across separate agents |
| Clodex adversarial review | Second agent argues against the first |
| Codex completion contract | Holds an agent to a written definition of done |
| Ticket to PR-ready | Takes a ticket to a reviewable pull request |
Repository hygiene
| Pattern | What it does |
|---|---|
| CI sweeper | Clears failing checks on a heartbeat |
| Docs sweep | Keeps documentation in step with code |
| Post-merge cleanup | Tidies branches and artifacts after merge |
| Repo cleanup loop | Long-running structural tidying |
| Stale-safe batch release | Batches releases without shipping stale work |
Dependencies and security
| Pattern | What it does |
|---|---|
| Dependency sweeper | Keeps dependencies current |
| Dependency CVE burndown | Works a vulnerability backlog down |
| Prod error sweep | Triages production errors into fixes |
Testing and quality
| Pattern | What it does |
|---|---|
| Test coverage loop | Raises coverage toward a target |
| Test stabilizer loop | Hunts and fixes flaky tests |
| Loop harness verification | Verifies the loop machinery itself |
| Page load loop | Drives a performance budget |
Triage and reporting
| Pattern | What it does |
|---|---|
| Issue triage | Labels, routes, and de-duplicates issues |
| Daily triage | One scheduled pass over what changed |
| Changelog drafter | Drafts release notes from merged work |
Machine-readable index: registry.yaml · Runnable kits:
starters/ · Back to the course.