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

IDCategoryTriggerPurpose
spec-grill-gateSpecmanualStress-test new specs before dispatch.
spec-dispatchSpecmanualMove one spec from inbox to active with generated prompt.
active-spec-verifyTestingmanualImplement or repair active spec until its checks pass.
independent-review-gateReviewmanualRun isolated review before archive.
backprop-spec-syncMaintenancemanualUpdate living specs/docs from implementation facts.
review-cleanup-passReviewmanualRemove avoidable mess before review.
docs-after-codeMaintenancemanualSync docs after code edits.
failing-test-triageTestingmanualClassify flaky vs real failures before fixes.
build-until-greenTestingmanualFix build failures with bounded iterations.
ci-branch-greenCIintervalWatch current branch CI until green or escalated.
pr-health-watchCIintervalKeep labeled PRs healthy.
dependency-audit-planMaintenanceintervalProduce 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.