By wiggumdev
Generate PRDs for new features via phased discovery and codebase analysis, convert them to structured JSON, design architectures with implementation blueprints and data flows, deeply trace code execution paths and dependencies, and review changes for bugs, security vulnerabilities, and quality issues using autonomous Ralph agents.
Designs feature architectures by analyzing existing codebase patterns and conventions, then providing comprehensive implementation blueprints with specific files to create/modify, component designs, data flows, and build sequences
Deeply analyzes existing codebase features by tracing execution paths, mapping architecture layers, understanding patterns and abstractions, and documenting dependencies to inform new development
Reviews code for bugs, logic errors, security vulnerabilities, code quality issues, and adherence to project conventions, using confidence-based filtering to report only high-priority issues that truly matter
Generate a Product Requirements Document (PRD) for a new feature. Use when planning a feature, starting a new project, or when asked to create a PRD. Triggers on: create a ralph prd, write ralph prd for, plan this feature with ralph, ralph requirements for, ralph spec out.
Convert PRDs in markdown files or text to prd.json format for the Ralph autonomous agent system. Use when you have an existing PRD and need to convert it to Ralph's JSON format. Triggers on: convert this prd, turn this into ralph format, create prd.json from this, ralph json.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
AI-agnostic agentic loop CLI
Reset context. Persist learnings. Ship code.
Installation • Quick Start • Documentation • Why Ralph?
ralph runs AI coding agents in iterative loops. Instead of trying to one-shot prompts that hit context limits and get confused, ralph resets the context window between iterations while preserving the learning from each loop through your codebase.
ralph run -n 10 -p ./plans/PROMPT.md
The AI does work, commits changes, saves insights,exits, ralph checks if done, resets context, and loops—until your task is complete.
Full documentation can be found at https://wiggum.dev.
The technique was coined by Geoffrey Huntley:
"Ralph is a Bash loop."
Named after Ralph Wiggum from The Simpsons—embodying the philosophy of persistent iteration despite setbacks. "Me fail English? That's unpossible!"
npm install -g @wiggumdev/ralph
You'll also need an AI CLI tool:
# Claude Code (recommended)
npm install -g @anthropic-ai/claude-code
# Or OpenCode
npm i -g opencode-ai
| Adapter | Status |
|---|---|
| Claude Code | Complete |
| OpenCode | Complete |
| Gemini CLI | Under Development |
# Initialize in your project
cd your-project
ralph init
# Use your agent to generate a plan and write
zed .plans/prd.json
# Edit your prompt to your specific needs
zed .plans/PROMPT.md
# Run the loop
ralph run
<promise>COMPLETE</promise>flowchart TD
Start --> RunAI[Run AI];
RunAI --> Check;
Check --> Learn;
Learn --> Done{Done?};
Done -->|No| Reset;
Reset --> Start;
Done -->|Yes| Exit;
Note[State persists via:<br/>git, files, tests]
Each iteration:
ralph uses TOML config at .ralph/config.toml:
adapter = "claude"
maxIterations = 20
plansDir = ".plans"
verbose = false
tui = true
[hooks]
ralph_start = ""
ralph_loop_end = "npm run lint:fix"
ralph_complete = "say 'Ralph is done!'"
After ralph init:
project/
├── .ralph/
│ └── config.toml # Configuration
└── .plans/
├── prd.json # Feature requirements
├── PROMPT.md # Your ralph loop prompt
└── progress.txt # Learning log
ralph init # Initialize ralph in a project
ralph run # Start the agentic loop
ralph check # Validate prd.json schema
ralph run --max-iterations 10 # Limit iterations
ralph run --once # Single iteration (no loop)
ralph run --prompt TASK.md # Use specific prompt file
ralph run --no-tui # Plain text output (for CI)
ralph run --verbose # Debug output
Your prompt in .plans/PROMPT.md should include:
@.plans/prd.json @.plans/progress.txt
1. Find the highest-priority feature to work on and work ONLY on that feature. This should be the one YOU decide has the highest priority - not necessarily the first in the list
2. Before making changes, search codebase (don't assume not implemented).
3. Implement the requirements for the selected feature using TDD.
3. Run typecheck and tests: `bun run typecheck && bun run test`
4. Update prd.json marking completed work (CAREFULLY!)
**YOU CAN ONLY MODIFY ONE FIELD: "passes"**
After thorough verification, change:
\`\`\`json
"passes": false
\`\`\`
to:
\`\`\`json
"passes": true
\`\`\`
5. Append learning to .plans/progress.txt for future iterations.
6. Commit changes: `jj commit -m "description"`
ONLY WORK ON A SINGLE FEATURE PER ITERATION.
If all features complete, output <promise>COMPLETE</promise>
When you learn something new about how to run commands or patterns in the code make sure you update @CLAUDE.md using a subagent but keep it brief.
Remember: You have unlimited time across many sessions. Focus on quality over speed. Production-ready is the goal.
Full documentation at wiggum.dev
npx claudepluginhub wiggumdev/ralph --plugin ralphAutonomous end-to-end development system - from requirement to production-ready code with zero manual intervention
Spec-driven development with task-by-task execution. Research, requirements, design, tasks, autonomous implementation, and epic triage for multi-spec feature decomposition.
Complete PRP workflow automation - plan, implement, debug, review, commit, and PR commands with specialized agents
Autonomous development loop with fresh context per iteration, Hat-lite builder/verifier system, task sets, and persistent memories
Ultra-compressed communication mode. Cuts ~75% of tokens while keeping full technical accuracy by speaking like a caveman.
Comprehensive UI/UX design plugin for mobile (iOS, Android, React Native) and web applications with design systems, accessibility, and modern patterns