What problem does it solve?
When a task is too large to complete within a single context window, coordinating implementation, verification, and iteration across multiple stories becomes error-prone and manual. The ralph loop automates the training-loop pattern so the assistant can execute one verifiable story per iteration, persist loop state, and continue work inside the same interactive session until all stories pass.
Core Features & Use Cases
- Automatic decomposition integration: Chains to story-decomposition and prd-generator to produce a prd.json with verifiable stories.
- Stateful Stop-hook loop: Writes a .claude state file and uses the Stop hook to keep the session alive and enforce one-story-per-iteration execution.
- Verification and safety rules: Runs per-story verification commands, updates progress, enforces max attempts, and self-exits on block or repeated failure.
- Use Case: Large refactors, multi-feature pull requests, or migrations that require breaking work into independent, testable stories and iterating until all acceptance criteria pass.
Quick Start
Approve the proposed decomposition and instruct the assistant to activate the ralph loop so it can iterate through prd.json stories one by one.