5.5 KiB
allowed-tools, description
| allowed-tools | description |
|---|---|
| Bash, Read, Write, Glob, Grep, Task, TodoWrite, mcp__taskmaster-ai__parse_prd | Generate a PRD interactively with clarifying questions for complex features |
Generate a Product Requirements Document (PRD)
Context
- User Request: $ARGUMENTS
- Project Root: !
pwd - Existing PRDs: !
ls -la .taskmaster/docs/prd-*.md 2>/dev/null || echo "No existing PRDs found" - Project Status: @CLAUDE.md#project-status
- Tech Stack: @.taskmaster/docs/tech-stack.md
- Project Structure: !
bash .claude/scripts/tree.sh - PRD Template: @.taskmaster/templates/example_prd.md
Goal
To create a detailed Product Requirements Document (PRD) in Markdown format. The PRD should be clear, actionable, and suitable for a junior developer to understand and implement.
Process
-
Analyze Feature Request: Think deeply about the user's feature request and its implications for the codebase.
-
Codebase Analysis:
- Search for relevant existing code patterns
- Review components that might be affected
- Identify potential integration points
- Consider architectural impacts
-
Ask Clarifying Questions:
- Ask 4-6 targeted questions based on codebase analysis
- Provide lettered/numbered options for easy response
- Focus on understanding the "what" and "why", not the "how"
-
Generate PRD:
- Follow the example PRD structure exactly
- Include all required sections from the template
- Ensure clarity for junior developers
-
Save and Next Steps:
- Save as
prd-[feature-name].mdin.taskmaster/docs/ - Suggest running Task Master parse command
- Save as
Clarifying Questions Framework
Adapt questions based on the specific feature request provided above. Consider these areas:
- Problem/Goal: "What problem does this feature solve for the user?" or "What is the main goal we want to achieve with this feature?"
- Target User: "Who is the primary user of this feature?"
- Core Functionality: "Can you describe the key actions a user should be able to perform with this feature?"
- User Stories: "Could you provide a few user stories? (e.g., As a [type of user], I want to [perform an action] so that [benefit].)"
- User Experience: "Describe the user journey and key user flows for this feature"
- Scope/Boundaries: "Are there any specific things this feature should not do (non-goals)?"
- Technical Integration: "What existing systems or components should this integrate with?"
- Data Requirements: "What kind of data does this feature need to display or manipulate?"
- Design/UI: "Are there any existing design patterns or UI guidelines to follow?" or "Can you describe the desired look and feel?"
- Development Phases: "Should this be built in phases? What's the MVP vs future enhancements?"
- Dependencies: "What needs to be built first? Are there logical dependencies?"
- Success Criteria: "How will we know when this feature is successfully implemented?"
- Edge Cases: "Are there any potential risks or technical challenges we should consider?"
PRD Structure Requirements
The PRD must follow the exact structure from @.taskmaster/templates/example_prd.md:
<context> Section
- Overview: High-level overview of the product/feature, what problem it solves, who it's for, and why it's valuable
- Project Context: Include the standard project status information. CRITICIAL: DO NOT forget this section. Read the mentioned files if needed.
- Core Features: List and describe the main features, including what each does, why it's important, and how it works at a high level
- User Experience: Describe user personas, key user flows, and UI/UX considerations
<PRD> Section
- Technical Architecture: System components, data models, APIs and integrations, infrastructure requirements
- Development Roadmap: Break down into phases (MVP requirements, future enhancements) focusing on scope and detailing exactly what needs to be built
- Logical Dependency Chain: Define the logical order of development, which features need to be built first, getting quickly to something usable/visible, properly pacing and scoping each feature
- Risks and Mitigations: Technical challenges, figuring out the MVP that can be built upon, resource constraints
- Appendix: Research findings, technical specifications, additional information
Target Audience
Assume the primary reader of the PRD is a junior developer. Therefore, requirements should be explicit, unambiguous, and avoid jargon where possible. Provide enough detail for them to understand the feature's purpose and core logic.
Output
- Format: Markdown (
.md) - Location:
.taskmaster/docs/ - Filename:
prd-[feature-name].md
Final Instructions
- Think deeply about the feature request and its architectural implications
- Do NOT start implementing - only create the PRD document
- Ask clarifying questions with lettered/numbered options
- Generate complete PRD following the template structure exactly
- Save the PRD to
.taskmaster/docs/prd-[feature-name].md - Suggest next step: "Use
/parseortask-master parse-prd .taskmaster/docs/prd-[feature-name].mdto convert this PRD into Task Master tasks"
Example Usage
/project:prd user authentication system
This will:
- Analyze the codebase for existing auth patterns
- Ask questions about auth requirements
- Generate a comprehensive PRD
- Save it as
prd-user-authentication.md