Token-safe autonomous dev-loop that drives Claude Code (claude -p) through an
architect → developer → tester → reviewer → lead cycle to build software from a
spec, isolated in a git worktree.
pipx install ~/<yor-location>/devloop
cd your-project
devloop init # scaffold devloop.toml, gitignore .devloop/
# edit devloop.toml: set test_command / lint_command / format_command / source_paths
devloop run --spec specs/feature.md
Runs happen on branch devloop/run in .devloop/worktree/; loop state lives in
.devloop/state/. Drop .devloop/state/STOP to halt cleanly at the next
checkpoint. Pass -v for debug logging (includes the claude command).
Each task in the plan runs the five roles in sequence as separate claude -p
calls; the tester runs your configured test_command / lint_command /
format_command, scoped to source_paths. Usage is metered per call and the
loop throttles (downgrades models, then pauses) as it approaches a self-imposed
rolling budget, and waits out real rate/usage limits. Every completed task is a
commit on the run branch, so the work is auditable and revertable.
devloop init scaffolds a devloop.toml. Project-specific keys
(test_command, lint_command, format_command, source_paths,
allowed_commands) live there; model tiers, budget thresholds, and loop caps
have built-in defaults you can override in the same file.