Orchestrates the full Ralph autonomous agent pipeline from requirements gathering to execution. Use when building new features, platforms, or complex tasks that need structured development through spec-interview, PRD generation, and autonomous implementation.
Resources
2Install
npx skillscat add cfircoo/claude-code-toolkit/ralph-orchestrator Install via the SkillsCat registry.
- spec-interview → Gather comprehensive requirements through guided discovery
- generate-prd → Create actionable Product Requirements Document
- ralph-convert-prd → Transform PRD into atomic user stories (prd.json)
- ralph.sh → Execute autonomous implementation loop
This skill coordinates these tools while keeping you in control at decision points.
ALL code implementation MUST happen through ralph.sh — the bash script that spawns fresh Claude instances. You are the orchestrator, NOT the implementer. Do not write code, create files, modify source files, or make any project changes directly. Only ralph.sh iterations do that.
If you catch yourself about to write code or modify project files: STOP. Launch ralph.sh instead.
Do NOT try to fix issues yourself, retry automatically, or continue past errors. Present the error clearly to the user and wait for their instructions.
Never assume Ralph "remembers" previous iterations.
Right-sized:
- Add a database column
- Create a UI component
- Update a server action
- Implement a filter
Too large (will fail):
- Build entire dashboard
- Add authentication system
- Refactor entire API
- API stories: curl endpoints with real data, check response codes and bodies
- UI stories: Playwright e2e tests that navigate and interact with real UI
- Database stories: Run migrations, query DB directly to confirm schema
- Infra stories: Health checks, config validation, service startup
Static checks (typecheck, lint) are baseline. Runtime validation is required.
After each story, Ralph runs ALL existing tests (via testCommands in prd.json root) to catch regressions. A story is NOT done until the entire test suite passes. Broken code compounds across iterations — never skip quality checks.
Stories track attempts / maxAttempts to prevent infinite retries on broken stories.
Don't rush. Bad requirements = wasted iterations.
Expect matchers for verificationCommands:
exit_code:0— command exits with code 0exit_code:N— command exits with specific code Ncontains:STRING— stdout contains STRINGnot_empty— stdout is non-emptymatches:REGEX— stdout matches regex pattern</prd_json_schema>
- Full pipeline - Start from scratch (spec → PRD → prd.json → execute)
- Continue from PRD - Already have PRD, convert and execute
- Execute only - Already have prd.json, run Ralph
- Check status - View current prd.json progress
Wait for response before proceeding.
After reading the workflow, follow it exactly.
Key Files:
| File | Purpose |
|---|---|
| SPEC.md | Comprehensive requirements from spec-interview |
| tasks/prd-*.md | Product Requirements Document |
| tasks/prd.json | Atomic user stories for Ralph |
| tasks/progress.txt | Learnings between iterations |
| tasks/test-log.md | Registry of all tests created per story |
| tasks/review-notes.md | Ideas, edge cases, and suggestions after each story |
| tasks/ralph.log | Live log of Ralph execution (tail -f to monitor) |
| scripts/ralph.sh | Ralph execution script (in this skill folder) |
| scripts/prompt.md | Iteration prompt template |
Commands:
# Run Ralph from your project directory
~/projects/claude-code-toolkit/skills/ralph-orchestrator/scripts/ralph.sh
# Or create an alias in ~/.bashrc:
alias ralph='~/projects/claude-code-toolkit/skills/ralph-orchestrator/scripts/ralph.sh'
# Run with custom iteration limit
ralph 5
# Monitor Ralph in real-time (while running in background)
tail -f tasks/ralph.log
# Check story status (new schema)
cat tasks/prd.json | jq '.userStories[] | {id, title, status, attempts}'
# View learnings
cat tasks/progress.txt</quick_reference>
| Workflow | Purpose |
|----------|---------|
| full-pipeline.md | Complete flow: spec → PRD → prd.json → execute |
| from-prd.md | Convert existing PRD and execute |
| execute-only.md | Run Ralph on existing prd.json |
| check-status.md | View current progress |
</workflows_index>
Pipeline is complete when:
- [ ] Requirements gathered through spec-interview (including verification environment)
- [ ] PRD created with verifiable acceptance criteria
- [ ] prd.json has atomic stories with storyType, verificationCommands, and blockedBy
- [ ] All stories have `status: "done"` in prd.json
- [ ] All verification commands passed (real runtime checks, not just typecheck)
- [ ] Code committed and quality checks passing
</success_criteria>