---
allowed-tools: [Read, Write, Glob, Grep, Bash, Task, TodoWrite]
description: Creates a PRD document compatible with Task Master's parse-prd command, with quick and interactive modes
---
# Create PRD for Task Master
## Context
- **User Request:** $ARGUMENTS
- **Mode:** Extract from arguments using `--quick` flag (default: interactive)
- **Source Type (optional):** Extract from arguments using `--source=[mrd|brainstorm|roadmap|scratch]`
- **Source Name (optional):** Extract from arguments using `--name=[session-name]`
- **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
- **Project Structure:** !`bash .claude/scripts/tree.sh`
- **Tech Stack:** @.taskmaster/docs/tech-stack.md
- **PRD Template:** @.taskmaster/templates/example_prd.md
- **PRD Directory:** `.taskmaster/docs/`
## Goal
Create a concise, focused Product Requirements Document (PRD) that Task Master can parse to generate tasks.json. Supports two modes:
- **Quick Mode (`--quick`)**: Generate PRD immediately without questions, making intelligent assumptions
- **Interactive Mode (default)**: Ask clarifying questions for more accurate requirements gathering
## Process
### 1. Parse Arguments and Determine Mode
- Extract `--quick`, `--source`, and `--name` from user arguments
- Determine mode: Quick (no questions) or Interactive (with questions)
- If source specified, validate it exists
### 2. Codebase Analysis (Both Modes)
**Think deeply** about the project context:
- Search for relevant existing code patterns
- Review components that might be affected
- Identify potential integration points
- Consider architectural impacts
- Analyze tech stack and project structure
### 3A. Quick Mode Process (`--quick`)
If quick mode is enabled:
- **Make intelligent assumptions** based on common patterns and codebase analysis
- **Load source content** if specified (MRD, Brainstorm, Roadmap)
- **Generate PRD immediately** without asking questions
- **Document all assumptions** in a dedicated section
- **Skip to step 4** (Generate PRD Document)
### 3B. Interactive Mode Process (Default)
If interactive mode (no `--quick` flag):
- **Load source content** if specified:
- **MRD**: Load from `.taskmaster/docs/mrd/[name]/` - focus on market requirements
- **Brainstorm**: Load from `.taskmaster/docs/brainstorm/[name]/` - focus on creative ideas
- **Roadmap**: Load from `.taskmaster/docs/roadmap/[name]/` - focus on timeline, priorities
- **Scratch**: Start fresh with Q&A
- **Ask focused questions** to gather essential information:
- **Project Status**: Pre-MVP, MVP, Production, or Enterprise?
- **Core Problem**: What problem does this solve?
- **Target Users**: Who will use this?
- **Key Features**: What are the 3-5 core features?
- **Technical Approach**: High-level architecture approach?
- **MVP Scope**: What's the minimum viable version?
### 4. Generate PRD Document
Create PRD following Task Master template structure exactly:
**Important:** Follow the exact structure from @.taskmaster/templates/example_prd.md
#### PRD Structure:
```markdown
# Overview
[High-level overview of the product/feature, what problem it solves, who it's for, and why it's valuable]
# Project Context
**Project Status: [Stage]**
- Read this file: `.taskmaster/docs/app-design-document.md` - App design document
- Read this file: `.taskmaster/docs/tech-stack.md` - Tech stack, architecture
[Stage-appropriate DO/DON'T guidelines based on project status]
# Core Features
[List and describe main features - what each does, why it's important, how it works at high level]
# User Experience
[User personas, key user flows, UI/UX considerations]
# Technical Architecture
[System components, data models, APIs and integrations, infrastructure requirements]
# Development Roadmap
## MVP Phase
[Essential features for first usable version]
## Enhancement Phase
[Additional features and improvements]
## Scale Phase
[Performance, security, and scale features]
# Logical Dependency Chain
[Development order - what needs to be built first, getting quickly to something usable/visible, properly pacing and scoping each feature]
# Risks and Mitigations
[Technical challenges, figuring out MVP that can be built upon, resource constraints]
# Appendix
[Research findings, technical specifications, additional information]
```
#### For Quick Mode Only:
Include an "Assumptions" section immediately after the `` opening tag:
```markdown
# Assumptions
[Document key assumptions made about requirements, default choices for ambiguous features, suggested areas that may need refinement]
# Overview
[Continue with normal structure...]
```
### 5. Save PRD and Guide Next Steps
- Save to `.taskmaster/docs/prd-[name].md`
- Suggest next steps:
```
PRD created successfully! Next steps:
1. Review: `.taskmaster/docs/prd-[name].md`
2. Generate tasks: `task-master parse-prd .taskmaster/docs/prd-[name].md`
3. Or use tagged workflow:
- `task-master add-tag [feature-name] --description="[description]"`
- `task-master use-tag [feature-name]`
- `task-master parse-prd .taskmaster/docs/prd-[name].md`
```
## Mode Selection Guide
### ✅ Use Quick Mode (`--quick`) for:
- **Simple CRUD features** - Standard create/read/update/delete operations
- **Standard UI components** - Common interface elements with clear patterns
- **Well-defined integrations** - Integrations with clear API specifications
- **Features with precedent** - Similar features already exist in the codebase
- **Time-sensitive requests** - When you need a PRD quickly to start development
### ✅ Use Interactive Mode (default) for:
- **Complex architectural changes** - Features affecting system design
- **Features with unknowns** - Requirements that need clarification
- **Security-critical features** - Features requiring detailed security analysis
- **Multi-system features** - Features affecting multiple systems or teams
- **First-time implementations** - New types of features without existing patterns
## Best Practices
### ✅ DO: Keep It Focused
- **Write concise, actionable content** that translates directly to development tasks
- **Focus on what to build**, not extensive market analysis or business justification
- **Use clear feature descriptions** that developers can implement
- **Define logical dependencies** to guide development order
**Why:** Task Master needs clear, implementable requirements to generate meaningful tasks.
### ✅ DO: Think in Development Phases
- **Start with true MVP** - the minimum that provides value
- **Build incrementally** - each phase should be independently valuable
- **Consider dependencies** - what needs to be built first?
- **Keep phases balanced** - avoid too much in one phase
**Why:** Phased development ensures continuous delivery and reduces risk.
### ❌ DON'T: Over-Document
- **Don't write lengthy market analysis** - keep context brief
- **Don't create complex user journeys** - focus on core flows
- **Don't specify implementation details** - that's for tasks
- **Don't include project management details** - timelines, resources, etc.
**Why:** PRDs should be requirements documents, not project plans or technical specifications.
### ❌ DON'T: Create Without Purpose
- **Don't generate PRDs for trivial features** - just create tasks directly
- **Don't duplicate existing PRDs** - update instead
- **Don't create multiple PRDs for one feature** - keep it consolidated
- **Don't forget the parse step** - PRDs need to be parsed to be useful
**Why:** PRDs are for substantial features that need structured planning.
## Output
- **Format:** Markdown (.md) following Task Master template
- **Location:** `.taskmaster/docs/`
- **Filename:** `prd-[descriptive-name].md`
## Example Usage
### Interactive Mode (Default)
```bash
# Create PRD from scratch with questions
/planning/prd/create new payment system
# Create PRD from MRD with questions
/planning/prd/create --source=mrd --name=mvp-launch payment features
# Create PRD from brainstorm with questions
/planning/prd/create --source=brainstorm --name=feature-ideas user dashboard
# Create PRD from roadmap with questions
/planning/prd/create --source=roadmap --name=q1-2024 phase 1 features
```
### Quick Mode
```bash
# Create PRD immediately without questions
/planning/prd/create --quick user profile page with avatar upload
# Quick PRD from MRD
/planning/prd/create --quick --source=mrd --name=mvp-launch payment features
# Quick PRD from brainstorm
/planning/prd/create --quick --source=brainstorm --name=feature-ideas dashboard
# Quick PRD from roadmap
/planning/prd/create --quick --source=roadmap --name=q1-2024 auth system
```
## Quick Mode Benefits
- **Immediate Results**: No waiting for Q&A session
- **Intelligent Assumptions**: Based on codebase analysis and common patterns
- **Documented Assumptions**: Clear record of what was assumed for later refinement
- **Codebase-Informed**: Leverages existing patterns and architectural decisions
- **Fast Iteration**: Quickly generate PRDs for multiple features