Loop Factory
Run spec-driven agent loops.
Current Queue
!python3 bin/loop-factory scan
Workflow
- For new specs, use
grill-mepattern before dispatch: ask one question at a time, provide recommended answer, and record final decisions in# Grill Gate. - Pick one inbox spec unless user asks for batch.
- Generate prompt:
python3 bin/loop-factory dispatch --agent claude --limit 1 - If implementation starts, stage spec:
python3 bin/loop-factory dispatch --agent claude --limit 1 --stage - Implement acceptance criteria only.
- Run verification from spec frontmatter.
- Leave spec active for review.
Autonomous mode (for /loop)
When driven by /loop (e.g. /loop 30m /loop-factory) or asked to run "autonomous"/"drain the inbox", do one self-contained pass with no human present:
python3 bin/loop-factory scanto see the inbox.- Build only ready specs — frontmatter
grill: completed, or a filled# Grill Gate. Skip un-grilled specs and report them as "needs grilling". Never answer grill questions yourself. - For each ready spec:
python3 bin/loop-factory dispatch --agent claude --limit 1 --stage, implement the acceptance criteria, run the spec's verification commands. - Leave built specs in
active/. Do not archive — acceptance stays human. - If verification fails, leave the spec active with the failure noted; do not weaken criteria to pass.
- If no ready specs, no-op and report an empty pass.
Agent Use
Use project subagents when isolation helps:
spec-implementerspec-reviewerspec-backpropagator
Use dynamic workflows only when many independent specs or cross-checks justify script-owned orchestration.
Do not automate product decisions. Record assumptions or open questions.
Built-In Loops
Use repo-native loops when user asks for repeated work:
- list:
python3 bin/loop-factory loops list - inspect:
python3 bin/loop-factory loops show <loop-id> - render:
python3 bin/loop-factory loops prompt <loop-id> --agent claude
For interval loops, render prompt then use Claude Code /loop <interval> when appropriate.