- name
- ralph
- description
- Autonomous feature development - setup and execution. Triggers on: ralph, set up ralph, run ralph, run the loop, implement tasks. Two phases: (1) Setup - chat through feature, create tasks with dependencies (2) Loop - pick ready tasks, implement, commit, repeat until done.
- references
Ralph - Autonomous Feature Development
Interactive feature planning and autonomous task execution.
Two Phases
| Phase | Purpose | Trigger |
|---|---|---|
| Setup | Plan feature, create tasks with dependencies | "set up ralph", "plan feature" |
| Loop | Execute tasks autonomously until done | "run ralph", "start the loop" |
Quick Start
Mode Selection
Ask the user:
Are you:
1. Starting a new feature (I'll help you plan and create tasks)
2. Using existing tasks (I'll set up Ralph to run them)Mode 1: New Feature
- Chat through the feature - Ask clarifying questions
- Break into small tasks - Each completable in one iteration
- Create task_list tasks - Parent + subtasks with
dependsOn - Set up ralph files - See setup.md
Mode 2: Existing Tasks
- Find existing parent task
- Verify subtasks have proper
dependsOn - Set up ralph files
- Show status (ready, completed, blocked)
Core Principles
Task Sizing
Each task must be completable in ONE iteration (~one context window).
Right-sized:
- Add a database column + migration
- Create a single UI component
- Implement one server action
Too big (split these):
- "Build the entire dashboard"
- "Add authentication"
- "Refactor the API"
Rule of thumb: If you can't describe the change in 2-3 sentences, it's too big.
Dependency Order
Task 1: Schema (no dependencies)
Task 2: Server action (dependsOn: [task-1])
Task 3: UI component (dependsOn: [task-2])
Task 4: Tests (dependsOn: [task-3])Loop Workflow (Phase 2)
- Read parent task ID from
scripts/ralph/parent-task-id.txt - Query ready tasks (descendants of parent,
ready: true,status: "open") - Pick next task (prefer related to just-completed work)
- Execute via handoff with quality checks
- Update progress.txt, commit, mark complete
- Re-invoke ralph to continue
Stop condition: All tasks completed → Archive progress, report success.
See execution-loop.md for full details.
Quality Requirements
Before marking any task complete:
- Typecheck must pass (project's typecheck command)
- Tests must pass (project's test command)
- Changes must be committed
- Progress must be logged
Key Files
| File | Purpose |
|---|---|
scripts/ralph/parent-task-id.txt | Current feature's parent task ID |
scripts/ralph/progress.txt | Short-term memory for current feature |
scripts/ralph/archive/ | Archived progress from completed features |
References
- Setup Workflow - Detailed setup for both modes
- Execution Loop - Full loop implementation
- Task Format - How to write task descriptions