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:
| Phase | What happens |
|---|---|
| Planning | Agent reads the spec and creates a step-by-step implementation plan |
| Implementation | Agent works through the plan task by task, committing after each |
| E2E testing | Agent runs end-to-end tests, iterates on failures |
| Verification | Agent re-reads the spec and confirms every requirement is met |
| PR review | Creates a pull request (behavior depends on --review-mode) |
Flags
Name of the feature spec to run. Must match a file in
.ralph/specs/.Coding agent for implementation. Options:
claude, codex. Overrides the default set in ralph.config.cjs.Coding agent for the review phase. Can differ from the implementation agent.
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.
Maximum number of E2E test retries.
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)

