Create a PRP (Product Requirement Prompt) with systematic research, curated context, and validation gates
Creates a comprehensive PRP with systematic research, curated context, and validation gates
/plugin marketplace add laurigates/claude-plugins/plugin install blueprint-plugin@lgates-claude-pluginsCreate a comprehensive PRP (Product Requirement Prompt) for a feature or component.
What is a PRP? A PRP is PRD + Curated Codebase Intelligence + Implementation Blueprint + Validation Gates - the minimum viable packet an AI agent needs to deliver production code successfully on first attempt.
Prerequisites:
docs/blueprint/ exists)Steps:
Ask the user or analyze context to understand:
Explore the existing codebase to understand:
Use the Explore agent:
<Task subagent_type="Explore" prompt="Research patterns for [feature type] implementation">
For any libraries/frameworks involved:
Use WebSearch/WebFetch to gather:
Look for existing ai_docs:
ls docs/blueprint/ai_docs/libraries/
ls docs/blueprint/ai_docs/project/
If relevant ai_docs don't exist, create them:
Create the PRP in docs/prps/:
docs/prps/[feature-name].md
Goal & Why:
Success Criteria:
Context:
Implementation Blueprint:
TDD Requirements:
Validation Gates:
| Dimension | Scoring Criteria |
|---|---|
| Context Completeness | 10: All file paths, snippets explicit. 7: Most provided. 4: Significant gaps |
| Implementation Clarity | 10: Pseudocode covers all cases. 7: Main path clear. 4: High-level only |
| Gotchas Documented | 10: All known pitfalls. 7: Major gotchas. 4: Some mentioned |
| Validation Coverage | 10: All gates have commands. 7: Main commands. 4: Incomplete |
Show the user:
Output Template:
## PRP Created: [Feature Name]
**Location:** `docs/prps/[feature-name].md`
**Summary:**
[1-2 sentence summary of what will be implemented]
**Approach:**
- [Key architectural decision]
- [Main implementation pattern]
**Context Collected:**
- [X] ai_docs entries: [list]
- [X] Codebase patterns identified
- [X] External documentation referenced
- [X] Known gotchas documented
**Validation Gates:**
- Gate 1: [Linting command]
- Gate 2: [Type checking command]
- Gate 3: [Unit tests command]
- Gate 4: [Integration tests command]
**Confidence Score:** X/10
- Context: X/10
- Implementation: X/10
- Gotchas: X/10
- Validation: X/10
**Needs attention (if score < 7):**
- [List any gaps to address]
If confidence score >= 7:
question: "PRP ready (confidence: X/10). What would you like to do?"
options:
- label: "Execute PRP now (Recommended)"
description: "Implement the feature with TDD workflow and validation gates"
- label: "Create work-order for subagent"
description: "Package this PRP for isolated execution by a subagent"
- label: "Review and refine first"
description: "I want to improve the PRP before executing"
- label: "I'm done for now"
description: "Save PRP and exit - execute later with /blueprint:prp-execute"
If confidence score < 7:
question: "PRP needs work (confidence: X/10). What would you like to do?"
options:
- label: "Research more context"
description: "Explore codebase and documentation to fill gaps"
- label: "Create ai_docs entries"
description: "Curate library documentation to improve context"
- label: "Execute anyway (risky)"
description: "Proceed with implementation despite low confidence"
- label: "I'm done for now"
description: "Save incomplete PRP and return later"
Based on selection:
/blueprint:prp-execute [feature-name]/blueprint:work-order/blueprint:curate-docs for relevant libraries/blueprint:prp-execute [feature-name] with warningTips:
Error Handling:
docs/blueprint/ doesn't exist → Run /blueprint:init first