loop-init, loop-audit, loop-cost CLI patterns
Three starter CLI tools that turn loop design into a repeatable workflow: scaffold a loop with a goal, budget, and verify step; audit an existing loop design; and estimate cost before you run.
Implementation note
When to use: you or your team are designing loops often enough that ad-hoc prompt-writing is producing inconsistent quality, and you want loop design to be a repeatable workflow with a checklist. How it works: three starter CLI tools cover the lifecycle. loop-init scaffolds a new loop with the three elements every good one needs — a goal, a budget, and a verify step — so none get forgotten. loop-audit reviews an existing loop design against those same criteria. loop-cost estimates spend before you run, turning the budget conversation into a pre-flight check rather than a post-mortem. Safety: the value is process discipline rather than runtime enforcement — scaffolded budgets and pre-run cost estimates only protect you if the loop that actually runs honors them. Use these tools to design the loop, then carry the caps into the runner (turn limits, budget ceilings) where they are actually enforced.
Source: cobusgreyling/loop-engineering ↗
More planning loops
Ralph the PRD backlog
The canonical Ralph loop: each iteration starts fresh, reads the PRD and guardrails, ships exactly one backlog item end-to-end, and records what it learned.
Draft a sprint plan from the backlog
Turn the open issue backlog into a proposed two-week sprint plan with estimates, a dependency ordering, and an explicit cut line, written as a document for the team to edit.
Set agent continuation budget
Configure max turns before agent stops, preventing runaway loops and controlling execution cost.