Built-In Loops
June 8, 2026 ยท View on GitHub
Loop Factory includes original built-in loops for common agent work. They are inspired by catalog-style loop patterns, but written for this repo's spec queue, review gate, and backprop workflow.
List loops:
loop-factory loops list
loop-factory loops list --agent claude --category Testing
Inspect one:
loop-factory loops show active-spec-verify
Render prompt:
loop-factory loops prompt spec-grill-gate --agent claude
loop-factory loops prompt ci-branch-green --agent codex --interval 5m
Run with local agent CLI:
loop-factory loops prompt review-cleanup-pass --agent codex --execute
Catalog
| ID | Category | Trigger | Purpose |
|---|---|---|---|
spec-grill-gate | Spec | manual | Stress-test new specs before dispatch. |
spec-dispatch | Spec | manual | Move one spec from inbox to active with generated prompt. |
active-spec-verify | Testing | manual | Implement or repair active spec until its checks pass. |
independent-review-gate | Review | manual | Run isolated review before archive. |
backprop-spec-sync | Maintenance | manual | Update living specs/docs from implementation facts. |
review-cleanup-pass | Review | manual | Remove avoidable mess before review. |
docs-after-code | Maintenance | manual | Sync docs after code edits. |
failing-test-triage | Testing | manual | Classify flaky vs real failures before fixes. |
build-until-green | Testing | manual | Fix build failures with bounded iterations. |
ci-branch-green | CI | interval | Watch current branch CI until green or escalated. |
pr-health-watch | CI | interval | Keep labeled PRs healthy. |
dependency-audit-plan | Maintenance | interval | Produce periodic dependency upgrade plan. |
Loop Shape
Every built-in loop has:
- goal
- max iterations
- check command
- exit condition
- first step
- guardrails against product decision drift
Generated prompts are artifacts under factory/prompts/ and are ignored by Git.