I recently came across Chris Parsons' "Your Agent Orchestrator is Too Clever" which talks about Ralph loops, initially proposed by Geoffrey Huntley.
while :; do cat PROMPT.md | claude-code ; done
Tried it on a real project. Realized that single line, even though concise, doesn't handle real-world complexity - multiple repos, git history, build failures. So I built some tooling around it.
Didn't check if something already exists. Just built what I needed. Figured others might have the same needs.
- YAML config: repo paths, git settings, permissions. No hardcoding.
- Task routing: B* tasks go to backend, F* to frontend. AI works in the right directory.
- Auto-commits per task group: commits when moving from F1 to F2, not after every subtask.
- Verification: runs build/typecheck after each task. Fails? Loop stops or retries.
- Hooks: lint after task, test after group, notify on complete.
- Retry on failure: AI sometimes fails first try.
- Context files: pass coding standards to every iteration.
Core is still a bash loop. State in files. Each iteration: read state, do one task, update state, stop. Repeat.
Example project included. Would welcome any feedback.
https://github.com/cvemprala/ralph-addons