prp-generator
PRP Generator
Overview
Generates comprehensive Product Requirement Plans (PRPs) that enable AI agents to implement features in a single pass. Combines systematic codebase analysis with external research to create detailed, context-rich implementation blueprints.
When to Use
- User requests a PRP, PRD, or detailed implementation plan
- User asks to "plan out" or "design" a complex feature
- Beginning significant feature development that benefits from structured planning
- User provides a feature description file and asks for implementation guidance
Core Principle
Context is Everything: The implementing agent only receives the PRP content, training data knowledge, codebase access, and WebSearch. Your PRP must be self-contained with all necessary context, specific references, and executable validation gates.
Workflow
Phase 1: Understand the Feature
- Read the feature request - if a file path is given, read it completely; if verbal, clarify requirements
- Clarify ambiguities - use AskUserQuestion for unclear requirements, confirm tech stack, verify integration points
- Identify the core problem being solved and acceptance criteria
Phase 2: Codebase Analysis (Mandatory)
Goal: Understand existing patterns, conventions, and integration points.
Systematically analyse the codebase across five dimensions:
| Area | What to Capture |
|---|---|
| Similar features | File paths, line numbers, code snippets, adaptations needed |
| Architecture | Directory conventions, component organisation, state management, API patterns |
| Coding conventions | TypeScript usage, component patterns, styling, import ordering, naming |
| Test patterns | Framework, file naming, mock strategies, coverage expectations |
| Configuration | Dependencies, build setup, path aliases, TypeScript settings |
For detailed sub-steps, examples, and documentation templates, see references/codebase-analysis-guide.md.
Also refer to references/research_methodology.md for the full research process.
Phase 3: External Research (Mandatory)
Goal: Find best practices, documentation, examples, and gotchas.
Research across four areas:
| Area | Key Actions |
|---|---|
| Library documentation | Find official docs for the SPECIFIC version from package.json; note version-specific gotchas |
| Implementation examples | Search GitHub, StackOverflow, official examples; prefer recent, production-grade code |
| Best practices | Search "[technology] best practices [current year]"; check OWASP for security |
| Performance and security | Bundle size implications, runtime patterns, vulnerabilities, accessibility |
Always document exact URLs, versions, and specific sections. See references/research_methodology.md for detailed guidance.
Phase 4: Ultra-Thinking (Critical)
STOP AND THINK DEEPLY BEFORE WRITING THE PRP.
Analyse integration points, implementation ordering, validation strategy, and context completeness. Verify the PRP will enable one-pass implementation without questions.
For the full set of analysis questions and the quality checklist, see references/quality-assessment.md.
Phase 5: Generate the PRP
Use assets/prp_template.md as the base structure. Populate all sections:
- Metadata - feature name, timeline, confidence score (1-10), date
- Executive Summary - 2-3 sentences with core value proposition
- Research Findings - codebase analysis (file:line refs) and external research (URLs, versions)
- Technical Specification - architecture, components, data models, API endpoints
- Implementation Blueprint - prerequisites, step-by-step with pseudocode, file changes, error handling, edge cases
- Testing Strategy - unit, integration, and manual testing approaches
- Validation Gates - must be EXECUTABLE commands (e.g.
npm run test && npm run build) - Success Criteria - clear, measurable checklist
Phase 6: Quality Scoring
Score the PRP for one-pass implementation success:
| Score | Meaning |
|---|---|
| 9-10 | Exceptionally detailed, all context included, clear path, executable gates |
| 7-8 | Very good, minor gaps, mostly clear implementation path |
| 5-6 | Adequate, some ambiguity, may require clarification |
| 3-4 | Incomplete research, missing context, unclear path |
| 1-2 | Insufficient for implementation |
If score is below 7: Go back and improve the PRP before delivering.
Phase 7: Save and Deliver
- Save the PRP to
PRPs/[feature-name].md(kebab-case, create directory if needed) - Deliver summary to user with: brief feature summary, file location, confidence score with rationale, and next steps
Common Pitfalls
| Pitfall | Bad | Good |
|---|---|---|
| Vague references | "There's a similar component somewhere" | "See UserProfile at src/components/UserProfile.tsx:45-67" |
| Missing versions | "Use React Query" | "Use @tanstack/react-query v5.28.0" |
| Non-executable gates | "Run tests and make sure they pass" | npm run test && npm run build |
| Generic advice | "Follow React best practices" | "Use named exports (see src/components/Button.tsx:1)" |
| Incomplete research | Skipping codebase analysis | Thoroughly document existing patterns |
| Missing gotchas | Assuming smooth implementation | Document known issues and edge cases |
Example Usage
User: "Create a PRP for adding dark mode support to the application"
- Clarify: "Should dark mode preference persist across sessions? Should it respect system preferences?"
- Research codebase for theme-related code
- Research external resources (dark mode best practices, library options)
- Ultra-think about implementation approach
- Generate comprehensive PRP using template
- Score the PRP
- Save to
PRPs/dark-mode-support.md - Deliver summary with confidence score
Resources
| Resource | Description |
|---|---|
| assets/prp_template.md | Base template for all PRPs |
| references/research_methodology.md | Detailed research guidance and best practices |
| references/codebase-analysis-guide.md | Detailed codebase analysis sub-steps and examples |
| references/quality-assessment.md | Ultra-thinking analysis questions and quality checklist |
Key Reminders
- Research is mandatory - never skip codebase or external research
- Be specific - always include file paths, line numbers, URLs, versions
- Think deeply - Phase 4 (Ultra-Thinking) is critical for success
- Validate everything - all validation gates must be executable
- Score honestly - if confidence is below 7, improve the PRP
- Context is king - the implementer only has what you put in the PRP
More from henkisdabro/wookstar-claude-code-plugins
tampermonkey
Write and debug Tampermonkey userscripts for browser automation, page modification, and web enhancement. Use whenever the user mentions userscripts, Tampermonkey, Greasemonkey, Violentmonkey, or wants to write a script that runs on a website - even if they don't say 'userscript' explicitly. Also trigger for: injecting JavaScript or CSS into web pages, modifying website behaviour, hiding page elements, form auto-fill, scraping page data, intercepting requests, detecting URL changes in SPAs, adding keyboard shortcuts to websites, tab audio control, or TypeScript userscripts. Covers all header tags (@match, @grant, @require, @run-in), GM_* synchronous APIs, GM.* promise-based APIs (recommended for new scripts), batch storage (GM.getValues/setValues v5.3+), binary data support (v5.4+), TypeScript setup via @types/tampermonkey, security sandboxing, and cross-browser compatibility (Chrome, Firefox, Edge). Do NOT use for Selenium/Puppeteer automation, browser extensions (WebExtensions/MV3), or server-side scripts.
95google-tagmanager
Comprehensive Google Tag Manager guide covering container setup, tags, triggers, variables, data layer, debugging, custom templates, and API automation. Use when working with GTM implementation, configuration, optimisation, troubleshooting, or any GTM-related tasks.
81google-apps-script
Comprehensive guide for Google Apps Script development covering all built-in services (SpreadsheetApp, DocumentApp, GmailApp, DriveApp, CalendarApp, FormApp, SlidesApp), triggers, authorization, error handling, and performance optimization. Use when automating Google Sheets operations, creating Google Docs, managing Gmail/email, working with Google Drive files, automating Calendar events, implementing triggers (time-based, event-based), building custom functions, creating add-ons, handling OAuth scopes, optimizing Apps Script performance, working with UrlFetchApp for API calls, using PropertiesService for persistent storage, or implementing CacheService for temporary data. Covers batch operations, error recovery, and JavaScript ES6+ runtime.
74shopify-theme-dev
Complete theme development guide including file structure, JSON templates, sections, snippets, settings schema, and Online Store 2.0 architecture. Use when creating Shopify themes, organizing theme files, building sections and blocks, working with .json template files, configuring settings_schema.json, creating snippets, or implementing theme customization features.
23shopify-developer
Complete Shopify development reference for Liquid templating, theme development (OS 2.0), GraphQL Admin API, Storefront API, custom app development, Shopify Functions, Hydrogen, performance optimisation, and debugging. Use when working with .liquid files, creating theme sections and blocks, writing GraphQL queries or mutations for Shopify, building Shopify apps with CLI and Polaris, implementing cart operations via Ajax API, optimising Core Web Vitals for Shopify stores, debugging Liquid or API errors, configuring settings_schema.json, accessing Shopify objects (product, collection, cart, customer), using Liquid filters, creating app extensions, working with webhooks, migrating from Scripts to Functions, or building headless storefronts with Hydrogen and React Router 7. Covers API version 2026-01.
17google-analytics
Comprehensive Google Analytics 4 guide covering property setup, events, custom events, recommended events, custom dimensions, user tracking, audiences, reporting, BigQuery integration, gtag.js implementation, GTM integration, Measurement Protocol, DebugView, privacy compliance, and data management. Use when working with GA4 implementation, tracking, analysis, or any GA4-related tasks.
14