templates/global/skills/ralph-plan/SKILL.md
Decompose PRD stories into implementation subtasks using the Planner agent
npx skillsauth add doravidan/supreme-ralph ralph-planInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Decompose PRD user stories into detailed, ordered implementation subtasks.
| Command | Description |
|---------|-------------|
| /ralph-plan | Generate implementation plan from prd.json |
| /ralph-plan US-001 | Plan specific story only |
| /ralph-plan --refresh | Regenerate plan for incomplete stories |
/ralph-planBefore planning, verify:
# Check for PRD
if [ -f prd.json ]; then
echo "✓ Found prd.json"
TOTAL=$(cat prd.json | jq '.userStories | length')
REMAINING=$(cat prd.json | jq '[.userStories[] | select(.passes == false)] | length')
echo " $REMAINING/$TOTAL stories need planning"
else
echo "❌ No prd.json found"
echo "Run /prd [feature] first to create a PRD"
exit 1
fi
# Check for project context
[ -f PROJECT_SPEC.md ] && echo "✓ Found PROJECT_SPEC.md"
[ -f CLAUDE.md ] && echo "✓ Found CLAUDE.md"
[ -d .ralph/memory ] && echo "✓ Found memory layer"
Read all relevant context:
# Read PRD
cat prd.json
# Read project patterns
cat PROJECT_SPEC.md 2>/dev/null || echo "No PROJECT_SPEC.md"
# Read memory insights
cat .ralph/memory/insights.json 2>/dev/null || echo "No prior insights"
For each incomplete story, determine:
Break each story into atomic subtasks:
Subtask Guidelines:
Subtask Schema:
{
"id": "ST-001-1",
"storyId": "US-001",
"title": "Create User type definitions",
"description": "Define TypeScript interfaces for User entity",
"files_to_create": ["src/types/user.ts"],
"files_to_modify": ["src/types/index.ts"],
"dependencies": [],
"acceptance_criteria": [
"User interface with id, email, createdAt",
"Type exported from index.ts",
"Typecheck passes"
],
"estimated_complexity": "low",
"parallelizable": true
}
Map which subtasks can run in parallel vs sequentially:
US-001 Subtasks:
ST-001-1 (types) ──┬── ST-001-3 (service) ── ST-001-5 (API)
ST-001-2 (schema) ─┘ │
└── ST-001-4 (tests)
Parallel: ST-001-1 and ST-001-2 (no dependencies) Sequential: ST-001-3 depends on both 1 and 2
For each story, note:
{
"storyId": "US-001",
"risks": [
{
"type": "integration",
"description": "Database schema may conflict with existing tables",
"mitigation": "Check existing migrations first"
}
]
}
CRITICAL: If anything is unclear, use AskUserQuestion:
? The PRD mentions "secure password storage" but doesn't specify the algorithm.
○ bcrypt (Recommended)
○ argon2
○ scrypt
○ Let me specify
Write to implementation_plan.json:
{
"prdVersion": "1.0.0",
"planVersion": "1.0.0",
"generatedAt": "2026-01-25T10:00:00Z",
"complexity": "STANDARD",
"summary": {
"totalStories": 6,
"totalSubtasks": 24,
"parallelizable": 8,
"sequential": 16,
"estimatedIterations": 16
},
"stories": [
{
"storyId": "US-001",
"title": "Create User model and types",
"subtasks": [
{
"id": "ST-001-1",
"title": "Create User type definitions",
"description": "Define TypeScript interfaces",
"files_to_create": ["src/types/user.ts"],
"files_to_modify": ["src/types/index.ts"],
"dependencies": [],
"acceptance_criteria": ["..."],
"estimated_complexity": "low",
"parallelizable": true
}
],
"execution_order": {
"parallel_batch_1": ["ST-001-1", "ST-001-2"],
"sequential": ["ST-001-3", "ST-001-4", "ST-001-5"]
},
"risks": []
}
],
"global_risks": [],
"clarifications": []
}
╔════════════════════════════════════════════════════════════════╗
║ Implementation Plan Generated ║
╚════════════════════════════════════════════════════════════════╝
PRD: User Authentication System
Complexity: STANDARD
Stories: 6
Subtasks: 24 total
- Parallelizable: 8 (can run concurrently)
- Sequential: 16 (have dependencies)
Estimated iterations: 16
Story Breakdown:
US-001: Create User model (4 subtasks)
US-002: Password hashing (3 subtasks)
US-003: JWT utilities (5 subtasks)
US-004: Auth routes (4 subtasks)
US-005: Auth middleware (4 subtasks)
US-006: Session management (4 subtasks)
Risks Identified: 2
[MEDIUM] Database migration conflicts
[LOW] JWT secret rotation
Plan saved to: implementation_plan.json
Next: Run /ralph-run to start implementation
| Error | Action |
|-------|--------|
| No PRD found | Direct to /prd [feature] |
| Unclear requirements | Use AskUserQuestion |
| Missing PROJECT_SPEC | Warn but continue with defaults |
| Conflicting dependencies | Flag for user review |
development
Run RALPH autonomous development loop. Converts PRD markdown to prd.json and runs autonomous implementation.
development
Run RALPH autonomous development loop to implement features from the PRD.
documentation
Generate detailed Product Requirements Documents (PRDs) through interactive conversation.
development
Initialize any project with Claude Code best practices and RALPH autonomous development