Draft product requirements with multi-persona discovery process. Supports autonomous and interview modes.
From product-playbook-for-agentic-codingnpx claudepluginhub daviswhitehead/product-playbook-for-agentic-coding-plugin --plugin product-playbook-for-agentic-coding[--autonomous] [--context <path>] [brief project description]workflows/You are facilitating the Product Discovery phase. Your goal is to create a comprehensive, agent-ready Product Requirements Document (PRD) that enables autonomous technical planning and implementation.
Before starting discovery, determine what type of work this is. Different work types need different workflow depth.
Ask the user:
What type of work is this?
1. **New feature / major addition** — Needs full discovery, planning, and task breakdown
Examples: new page, new integration, new data model, new user flow
→ Full pipeline: PRD → Tech Plan → Tasks → Work → Learnings
→ **If UI-heavy**: PRD → Design System → Design Spec → Mockups → Design Critique → Tech Plan → Tasks → Work → Design Verify → Learnings
2. **UI polish / iteration** — Known scope, feedback-driven, just needs execution
Examples: spacing fixes, animation tweaks, responsive adjustments, copy changes
→ Lightweight: Scope note → Work directly → Learnings
3. **Bug fix / targeted repair** — Something is broken, needs systematic debugging
Examples: broken layout, failed test, incorrect behavior, regression
→ Debug path: /playbook:debug → Learnings
4. **Refactor / technical improvement** — Code works but needs structural improvement
Examples: extract component, improve types, reduce duplication, optimize performance
→ Lightweight with tech context: Quick scope → Work → Learnings
5. **Not sure yet** — Need to explore before deciding
→ Start with discovery questions, then route
Route to Full Pipeline (continue with this command) if ANY of:
Route to Lightweight Path if ALL of:
Route to Debug Path if:
/playbook:debug for systematic debugging, then /playbook:learnings to capture the solution."If routing to lightweight, skip the full PRD. Instead create a scope note:
## Lightweight Scope Note
**Work type**: [UI polish | Refactor | Iteration]
**Goal**: [One sentence: what should be different when done]
**Files likely affected**: [List key files or components]
**Acceptance criteria**:
- [ ] [Specific, testable criterion]
- [ ] [Specific, testable criterion]
**Estimated scope**: [~N files]
**Approach**: [Brief description of how to accomplish it]
Save to projects/[project-name]/scope-note.md (or inline if trivial).
Then guide the user:
This looks like lightweight work. I've created a scope note instead of a full PRD.
Next steps:
1. Review the scope note above
2. Jump directly to implementation with `/playbook:work` (using scope note as context)
3. Capture learnings when done with `/playbook:learnings`
No tech plan or task document needed for this scope.
For option 4 (refactor), also ask: "What's the current pattern, the target pattern, and are there tests covering this code?"
This command supports two modes:
Guided multi-persona discovery with probing questions. Use when:
--autonomous)Generate a complete PRD draft from available context. Use when:
Parse the arguments to determine mode:
--autonomous flag is present → Autonomous Mode--context <path> is provided → Use that path for context gatheringThese principles apply to both modes. They represent hard-won learnings about what makes PRDs effective:
Iterate toward simplicity, not complexity. If a section feels overcomplicated, cut rather than explain. Fewer words with more precision beats comprehensive but dense.
Don't hide what you don't know. Use forecast confidence levels (High / Medium / Low) and explain what's uncertain. Flag assumptions explicitly. Suggest what would increase confidence. Example: "High uncertainty. These projections require validation through experimentation."
Every claim should trace to a source — data, user research, product critique, or strategic reasoning. Preference for data, but judgment and taste count too. Be data-informed, not data-driven.
When strategy docs exist (mission, vision, retention frameworks, personas), connect the PRD to them. PRDs aren't isolated specs — they're part of a strategic narrative.
Capture key decisions with rationale in the Decision Log. The thinking process is as valuable as the output. When you simplify a section or reject an approach, note why.
The template at resources/templates/product-requirements-v2.md is a strong starting point, not a rigid form. Add sections that serve the project (e.g., Prioritization Analysis, Experiment Design). Remove sections that don't apply. Rename sections to fit the domain. Write a genuine philosophy note for each PRD.
Search extensively for existing documentation:
Context sources (search in order):
1. --context path (if provided)
2. projects/, docs/
3. CLAUDE.md, AGENTS.md, README.md
4. Strategy and foundation docs (mission, vision, retention framework, personas)
5. Any files mentioned in user's description
6. Related research, data analysis, meeting notes
Use Glob → Grep → Read strategy to find and read all relevant context.
Track your sources. Record which files you read and what you extracted from each. You will include a Context Summary in your output showing which sources informed which sections.
Minimum context required for autonomous mode:
If minimum context is not found, inform the user and switch to Interview Mode.
From gathered context, extract:
Use the template at resources/templates/product-requirements-v2.md as a starting point, then adapt it to fit the project.
Key requirements:
Run through the Quality Guidelines at the end of the template. These are quality targets, not rigid gates — use judgment based on the project's stage and complexity.
For any items that cannot be checked:
Present the draft to the user with:
Ask the user about their project:
Before deep discovery, search for existing documentation:
projects/, docs/ for relevant contextCLAUDE.md, AGENTS.md, README.mdUse Glob → Grep → Read strategy. Summarize what you found — this grounds the conversation in existing context rather than starting from zero.
Before creating any document, ask and capture answers to these clarifying questions:
| Question | Why It Matters |
|---|---|
| What is the single most important outcome? | Defines primary success metric |
| Who is the primary user and their context? | Enables accurate scenarios |
| What constraints are already known? | Prevents invalid technical plans |
| What is explicitly out of scope? | Prevents scope creep |
| What does success look like (quantitative)? | Enables testable acceptance criteria |
| What existing systems does this touch? | Enables accurate dependency mapping |
| How confident are we in these projections? | Surfaces uncertainty early |
Proceed only after these are answered clearly. Summarize understanding and confirm alignment.
Roles: Product Manager (lead), Business Stakeholder, Domain Expert, Technical Advisor, User Researcher, Designer, Agentic Engineer.
For each section, ask probing questions from multiple perspectives:
From Product Manager + Domain Expert:
From User Researcher + Designer:
From Product Manager + Technical Advisor:
From Designer + Domain Expert:
From Technical Advisor + Agentic Engineer:
From Business Stakeholder + Product Manager:
From Agentic Engineer:
Create the PRD using resources/templates/product-requirements-v2.md as a starting point, adapting it to fit the project.
Ensure every section is filled with:
Review against the Quality Guidelines:
Clarity & Completeness
Technical Readiness
Acceptance Criteria Quality
Decision Completeness
These are quality targets, not rigid gates. For any unchecked items, either:
Create the PRD at an appropriate location:
projects/[project-name]/product-requirements.mdOnce the PRD is complete, guide the user to:
/playbook:critique to get multi-persona feedback on the PRD before proceeding. Critiques at document stages are the highest-ROI workflow step — catching issues here is 10x cheaper than during implementation./playbook:tech-plan for the next phase/playbook:design-system to extract or create DESIGN.md/playbook:design-spec to generate engineering spec + Stitch prompts/playbook:mockups to batch-generate screens/playbook:design-critique for multi-persona visual feedback/playbook:tech-planThis command creates PRDs optimized for agentic engineering—enabling autonomous technical planning and implementation.