/ralph:ralph-prdfrom ralph
Generates a Product Requirements Document (PRD) for new features. Walks through discovery, codebase exploration, and clarifying questions to produce a structured spec.
Ships in ralph. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are helping a developer implement a new feature. Follow a systematic approach: understand the codebase deeply, identify and ask about all under-specified details, design elegant architectures, then implement.
Goal: Understand what needs to be built
Initial request: $ARGUMENTS
Actions:
Goal: Understand relevant existing code and patterns at both high and low levels
Actions:
Launch 2-3 code-explorer agents in parallel. Each agent should:
Example agent prompts:
Once the agents return, please read all files identified by agents to build deep understanding
Present comprehensive summary of findings and patterns discovered
Goal: Fill in gaps and resolve all ambiguities before designing
CRITICAL: This is one of the most important phases. DO NOT SKIP.
Actions:
Format Questions Like This:
1. What is the primary goal of this feature?
A. Improve user onboarding experience
B. Increase user retention
C. Reduce support burden
D. Other: [please specify]
2. Who is the target user?
A. New users only
B. Existing users only
C. All users
D. Admin users only
3. What is the scope?
A. Minimal viable version
B. Full-featured implementation
C. Just the backend/API
D. Just the UI
This lets users respond with "1A, 2C, 3B" for quick iteration.
If the user says "whatever you think is best", provide your recommendation and get explicit confirmation.
Goal: Design multiple implementation approaches with different trade-offs
Actions:
Goal: Generate a prd.json files where each item is small and specific.
CRITICAL: This is one of the most important phases. DO NOT SKIP.
Important: Acceptance criteria must be verifiable, not vague. "Works correctly" is bad. "Button shows confirmation dialog before deleting" is good. For any story with UI changes: Always include "Verify in browser using dev-browser skill" as acceptance criteria. This ensures visual verification of frontend work. For any story that includes domain logic: Always include "Verify with unit tests" as acceptance criteria.
When building features, build a tiny, end-to-end slice of the feature first, seek feedback, then expand out from there.
Tracer bullets comes from the Pragmatic Programmer. When building systems, you want to write code that gets you feedback as quickly as possible. Tracer bullets are small slices of functionality that go through all layers of the system, allowing you to test and validate your approach early. This helps in identifying potential issues and ensures that the overall architecture is sound before investing significant time in development.
The PRD reader may be a junior developer or AI agent. Therefore:
Generate the PRD json based on the following json schema:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "array",
"minItems": 1,
"description": "Product Requirements Document: an array of features to be implemented by an LLM agent.",
"items": {
"type": "object",
"required": ["category", "title", "description", "passes", "acceptance"],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z0-9-]+$",
"description": "Unique identifier for cross-referencing (e.g., 'user-auth', 'api-rate-limiting'). Use lowercase with hyphens."
},
"category": {
"type": "string",
"minLength": 1,
"description": "Feature category for grouping (e.g., 'Authentication', 'API', 'UI', 'Testing'). Helps locate related code."
},
"title": {
"type": "string",
"minLength": 1,
"description": "Concise feature title (e.g., 'User Login', 'Rate Limiting Middleware'). Used in progress reports."
},
"description": {
"type": "string",
"minLength": 1,
"description": "Detailed feature description explaining the expected behavior, user value, and any important context."
"example": "User can log in with valid credentials"
},
"passes": {
"type": "boolean",
"description": "Completion status. Set to true only after implementation passes all acceptance criteria and tests."
},
"acceptance": {
"type": "array",
"minItems": 1,
"description": "Acceptance criteria list. Each item should be independently verifiable. Write as assertions (e.g., 'Login form validates email format'). Describe creating tests or verifying in browser using dev-browser skill",
"example": [
"Login form validates email format",
"Login form validates password length"
],
"items": {
"type": "string",
"minLength": 1,
"description": "A specific, testable criterion for feature completion"
}
},
"priority": {
"type": "string",
"enum": ["critical", "high", "medium", "low"],
"description": "Feature priority for ordering work. Defaults to 'medium' if not specified."
},
"dependencies": {
"type": "array",
"description": "Array of feature IDs that must pass before this feature can be started. Prevents working out of order.",
"items": {
"type": "string",
"minLength": 1
}
},
"technicalNotes": {
"type": "string",
"description": "Implementation hints: patterns to follow, libraries to use, constraints to respect (e.g., 'Use existing AuthService', 'Must support IE11')."
},
"testStrategy": {
"type": "string",
"description": "Testing guidance: test types needed (unit/integration/e2e), what to mock, edge cases to cover."
},
"outOfScope": {
"type": "array",
"description": "Explicit exclusions to prevent over-engineering (e.g., 'No OAuth support yet', 'Skip mobile responsive').",
"items": {
"type": "string",
"minLength": 1
}
}
},
"additionalProperties": false
}
}
.json)./plansprd.mdBefore writing prd.json, verify:
.plans/prd.jsonWhat SKILL.md sets; muted values are Claude Code's defaults
2 skills in this plugin
npx claudepluginhub wiggumdev/ralph --plugin ralphOther plugins' skills for the same job