From blueprint-plugin
Generates Product Requirements Document (PRD) by analyzing project README, documentation, structure, and metadata. Use for onboarding existing projects to Blueprint Development system.
npx claudepluginhub laurigates/claude-plugins --plugin blueprint-pluginThis skill is limited to using the following tools:
Generate a Product Requirements Document (PRD) for an existing project by analyzing README, documentation, and project structure.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Generate a Product Requirements Document (PRD) for an existing project by analyzing README, documentation, and project structure.
Use Case: Onboarding existing projects to Blueprint Development system.
Prerequisites:
docs/blueprint/ exists)Steps:
ls docs/blueprint/manifest.json
If not found → suggest running /blueprint:init first.
Search for existing documentation:
fd -e md -d 3 . | head -20
Key files to look for:
README.md - Primary project descriptiondocs/ - Documentation directoryCONTRIBUTING.md - Contribution guidelinesARCHITECTURE.md - Architecture overviewpackage.json / pyproject.toml / Cargo.toml - Project metadataRead and analyze:
From documentation, identify:
| Aspect | Source | Questions if Missing |
|---|---|---|
| Project name | Package manifest, README | Ask user |
| Purpose/Problem | README intro | "What problem does this project solve?" |
| Target users | README, docs | "Who are the primary users?" |
| Core features | README features section | "What are the main capabilities?" |
| Tech stack | Dependencies, file extensions | Infer from files |
Use AskUserQuestion for unclear items:
question: "What is the primary problem this project solves?"
options:
- "[Inferred from docs]: {description}" → confirm inference
- "Let me describe it" → free text input
question: "Who are the target users?"
options:
- "Developers" → technical documentation focus
- "End users" → user experience focus
- "Both developers and end users" → balanced approach
- "Other" → custom description
question: "What is the current project phase?"
options:
- "Early development / MVP" → focus on core features
- "Active development" → feature expansion
- "Maintenance mode" → stability and bug fixes
- "Planning major changes" → architectural considerations
Ask about stakeholders:
question: "Who are the key stakeholders for this project?"
options:
- "Solo project (just me)" → simplified RACI
- "Small team (2-5 people)" → team collaboration
- "Larger organization" → formal stakeholder matrix
- "Open source community" → contributor-focused
Before creating the PRD, generate a unique ID:
# Get next PRD ID from manifest
next_prd_id() {
local manifest="docs/blueprint/manifest.json"
local last=$(jq -r '.id_registry.last_prd // 0' "$manifest" 2>/dev/null || echo "0")
local next=$((last + 1))
printf "PRD-%03d" "$next"
}
Store the generated ID for use in the document and manifest update.
Create the PRD in docs/prds/:
docs/prds/project-overview.md
Generate PRD with this structure:
---
id: {PRD-NNN}
created: {YYYY-MM-DD}
modified: {YYYY-MM-DD}
status: Draft
version: "1.0"
relates-to: []
github-issues: []
name: blueprint-derive-prd
---
# {Project Name} - Product Requirements Document
## Executive Summary
### Problem Statement
{Extracted or confirmed problem description}
### Proposed Solution
{Project description and approach}
### Business Impact
{Value proposition and expected outcomes}
## Stakeholders & Personas
### Stakeholder Matrix
| Role | Name/Team | Responsibility | Contact |
|------|-----------|----------------|---------|
| {role} | {name} | {responsibility} | {contact} |
### User Personas
#### Primary: {Persona Name}
- **Description**: {who they are}
- **Needs**: {what they need}
- **Pain Points**: {current frustrations}
- **Goals**: {what success looks like}
## Functional Requirements
### Core Features
{List of main capabilities extracted from docs}
| ID | Feature | Description | Priority |
|----|---------|-------------|----------|
| FR-001 | {feature} | {description} | {P0/P1/P2} |
### User Stories
{User stories derived from features}
- As a {user type}, I want to {action} so that {benefit}
## Non-Functional Requirements
### Performance
- {Response time expectations}
- {Throughput requirements}
### Security
- {Authentication requirements}
- {Data protection needs}
### Accessibility
- {Accessibility standards to follow}
### Compatibility
- {Browser/platform/version support}
## Technical Considerations
### Architecture
{High-level architecture from docs or inferred}
### Dependencies
{Key dependencies from package manifest}
### Integration Points
{External services, APIs, databases}
## Success Metrics
| Metric | Current | Target | Measurement |
|--------|---------|--------|-------------|
| {metric} | {baseline} | {goal} | {how to measure} |
## Scope
### In Scope
- {Included features and capabilities}
### Out of Scope
- {Explicitly excluded items}
- {Future considerations}
## Timeline & Phases
### Current Phase: {phase name}
{Description of current work focus}
### Roadmap
| Phase | Focus | Status |
|-------|-------|--------|
| {phase} | {focus areas} | {status} |
---
*Generated from existing documentation via /blueprint:derive-prd*
*Review and update as project evolves*
Show the user:
✅ PRD Generated: {Project Name}
**ID**: {PRD-NNN}
**Location**: `docs/prds/project-overview.md`
**Extracted from**:
- {list of source documents}
**Key sections**:
- Executive Summary: {status}
- Stakeholders: {count} identified
- Functional Requirements: {count} features
- Non-Functional Requirements: {status}
**Confidence**: {High/Medium/Low}
- {High confidence areas}
- {Areas needing review}
**Recommended next steps**:
1. Review and refine the generated PRD
2. Run `/blueprint:derive-adr` to document architecture decisions
3. Run `/blueprint:prp-create` for specific features
4. Run `/blueprint:generate-skills` to create project skills
Based on what was generated:
/blueprint:derive-adr/blueprint:prp-create for key features/blueprint:generate-skillsUpdate docs/blueprint/manifest.json:
generated_artifactshas_prds to trueupdated_at timestamp{
"id_registry": {
"last_prd": {new_number},
"documents": {
"{PRD-NNN}": {
"path": "docs/prds/{filename}.md",
"title": "{Project Name}",
"github_issues": [],
"created": "{date}"
}
}
}
}
Tips:
Update the task registry entry in docs/blueprint/manifest.json:
jq --arg now "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
--argjson created "${PRDS_GENERATED:-1}" \
'.task_registry["derive-prd"].last_completed_at = $now |
.task_registry["derive-prd"].last_result = "success" |
.task_registry["derive-prd"].stats.runs_total = ((.task_registry["derive-prd"].stats.runs_total // 0) + 1) |
.task_registry["derive-prd"].stats.items_created = $created' \
docs/blueprint/manifest.json > tmp.json && mv tmp.json docs/blueprint/manifest.json
question: "Create a GitHub issue to track this PRD?"
options:
- label: "Yes, create issue (Recommended)"
description: "Creates issue with title '[PRD-NNN] {Project Name}'"
- label: "No, skip for now"
description: "Can link later by editing github-issues in frontmatter"
If yes, create GitHub issue:
gh issue create \
--title "[{PRD-NNN}] {Project Name}" \
--body "## Product Requirements Document
**Document**: \`docs/prds/{filename}.md\`
**ID**: {PRD-NNN}
### Summary
{Executive summary from PRD}
### Key Features
{List of FR-* features}
name: blueprint-derive-prd
---
*Auto-generated from PRD. See linked document for full requirements.*" \
--label "prd,requirements"
Capture issue number and update:
github-issuesid_registry.documents[PRD-NNN].github_issuesid_registry.github_issuesquestion: "PRD generated. What would you like to do next?"
options:
- label: "Document architecture decisions (Recommended)"
description: "Run /blueprint:derive-adr to capture technical decisions"
- label: "Generate project skills"
description: "Extract skills from PRD for Claude context"
- label: "Create a PRP for a feature"
description: "Start implementing a specific feature"
- label: "Review and refine PRD"
description: "I want to edit the generated PRD first"
- label: "I'm done for now"
description: "Exit - PRD is saved"
Based on selection:
/blueprint:derive-adr/blueprint:generate-skills/blueprint:prp-create (ask for feature name)Error Handling:
/blueprint:init