Create a new Ralph task. Use when user says "ralph new", "create ralph task", "new ralph", or wants to set up a task for autonomous execution.
Create a new Ralph task for autonomous execution.
/ralph-new <task description>
Examples:
/ralph-new Add user authentication/ralph-new Fix the login bug/ralph-new (interactive mode)# List existing task directories
ls .ralph/
# Find highest ralph-N, increment
# If ralph-1, ralph-2 exist → create ralph-3
mkdir -p .ralph/ralph-N
If task description provided, use it. Otherwise ask using AskUserQuestion:
Question 1: What to build
{
"questions": [{
"question": "What should this task accomplish?",
"header": "Task",
"options": [
{"label": "New feature", "description": "Build something new"},
{"label": "Bug fix", "description": "Fix existing issue"},
{"label": "Refactor", "description": "Improve code structure"},
{"label": "Other", "description": "Something else"}
],
"multiSelect": false
}]
}
Question 2: Verification
{
"questions": [{
"question": "How should completion be verified?",
"header": "Test",
"options": [
{"label": "bun test", "description": "Run unit tests"},
{"label": "bun run verify", "description": "Typecheck + lint + tests"},
{"label": "bun run build", "description": "Just verify it builds"}
],
"multiSelect": false
}]
}
Write to .ralph/ralph-N/plan.md:
---