A Claude Code plugin that implements Ralph loops for autonomous feature development with story-based tracking, review gates, and crash recovery.
Ralph loops solve "context rot" in AI coding sessions. Instead of one long conversation where the AI gradually loses context:
- Fresh context each iteration - No accumulated confusion
- File-based memory - PRD, progress logs, and patterns persist between runs
- One story at a time - Focused, completable units of work
- Automatic crash recovery - Pick up exactly where you left off
This approach is validated by Anthropic's research on long-running agents.
claude plugin add hypersocialinc/ralpher-pluginOr install the recommended plugin bundle:
claude plugin add hypersocialinc/ralpher-plugin
claude plugin add hypersocialinc/pr-review-toolkit # For review gates# 1. Start a new feature
/ralph-new auth-feature
# 2. Ralph asks questions and generates stories
# ...answers questions...
# 3. Run autonomously
/ralph-run
# 4. Check progress anytime
/ralph-status
# 5. When complete, create PR
/ralph-done| Command | Description |
|---|---|
/ralph-new <name> |
Start a new feature - creates branch, generates stories |
/ralph-run |
Run autonomous loop (executes stories until complete) |
/ralph-next |
Execute just one story (manual mode) |
/ralph-status |
Show current progress |
/ralph-done |
Archive feature and create PR |
/ralph-abandon |
Cancel feature and clean up |
/ralph-doctor |
Check and repair Ralph state |
/ralph-help |
Show documentation |
Ralph asks 3-5 clarifying questions about your feature, then generates:
- plan.md - Feature specification
- prd.json - Stories with acceptance criteria, dependencies, priorities
For each story, Ralph:
- Reads current state from files
- Implements the story
- Runs typecheck (with retry loop)
- Runs review agents (code-reviewer, silent-failure-hunter)
- Commits with conventional format
- Updates progress log
- Exits cleanly for fresh context
- Verifies all stories complete
- Archives
.ralph/<feature>/to.ralph-archive/ - Creates PR with summary
your-project/
├── .ralph/
│ └── auth-feature/
│ ├── plan.md # Feature specification
│ ├── prd.json # Stories with status
│ ├── progress.txt # Work log + learned patterns
│ └── ralph-go.sh # Bash loop script
└── .ralph-archive/ # Completed features
{
"id": "AUTH-001",
"title": "Add login form",
"type": "frontend",
"skills": ["clerk"],
"steps": ["Create component", "Add validation"],
"passes": ["Form renders", "Validation works", "Tests pass"],
"dependencies": [],
"priority": 1,
"status": "not_started"
}Ralph accumulates knowledge in progress.txt:
## Codebase Patterns
- Always use IF NOT EXISTS in migrations
- Run dev server before E2E tests
- Export types from actions.tsThese patterns compound across stories, improving quality over time.
- Claude Code CLI
- Git
- Recommended: pr-review-toolkit plugin for review gates
This plugin works standalone, but pairs with Ralpher for:
- Visual dashboard with story progress
- Multi-project management
- Team collaboration features
- Ralph loop technique by Geoffrey Huntley
- Built by HyperSocial
MIT