How it works
- Loads the spec from
.ralph/specs/<feature>.md - Combines it with project prompts, guides, and context from
.ralph/ - Spawns
feature-loop.shwhich orchestrates the coding agent through five phases:
Each phase can succeed or fail independently. A failure in E2E testing doesn’t require restarting implementation.
Flags
Coding agent for implementation. Options:
claude, codex. Overrides the default set in ralph.config.cjs.Run in a git worktree for isolation. Creates a separate working directory so the loop doesn’t interfere with your current work. Recommended for parallel feature development.
Resume from the last checkpoint if a previous run was interrupted. Skips completed phases.
What happens after the loop completes:
manual— Creates a PR and stops for human reviewauto— Auto-reviews the diff against the spec, then creates the PRmerge— Auto-reviews, creates PR, and auto-merges when CI checks pass
AI model for the coding agent. Options depend on your provider (e.g.,
opus, sonnet for Anthropic).Maximum number of implementation iterations. Each iteration picks the next task from the plan, writes code, and commits.
TUI monitoring
When run in an interactive terminal, wiggum shows a live RunScreen with:- Phase progress — Each phase shows status (pending, active, completed, failed) with duration
- Iteration counter — Current iteration out of max (e.g.
3/10) - Activity feed — Real-time stream of what the coding agent is doing
- Token tracking — Input/output token counts and cache metrics
- Task checklist — Implementation plan tasks with completion status
Background mode
Press Esc to background the loop and return to the wiggum shell. The loop continues running. Re-attach with:Completion summary
When the loop finishes, the RunScreen shows:- Phase durations
- Final iteration count
- File changes summary
- Commit history
- PR link (if created)

