commandby lethal1147

Create PRP

## Feature file: $ARGUMENTS

Installs: 0
Used in: 1 repos
Updated: 2d ago
$npx ai-builder add command lethal1147/generate-prp

Installs to .claude/commands/generate-prp.md

# Create PRP

## Feature file: $ARGUMENTS

Generate a complete PRP for general feature implementation with thorough research. Ensure context is passed to the AI agent to enable self-validation and iterative refinement. Read the feature file first to understand what needs to be created, how the examples provided help, and any other considerations.

The AI agent only gets the context you are appending to the PRP and training data. Assuma the AI agent has access to the codebase and the same knowledge cutoff as you, so its important that your research findings are included or referenced in the PRP. The Agent has Websearch capabilities, so pass urls to documentation and examples.

## Research Process

1. **Codebase Analysis**
   - Search for similar features/patterns in the codebase
   - Identify files to reference in PRP
   - Note existing conventions to follow
   - Check test patterns for validation approach

2. **External Research**
   - Search for similar features/patterns online
   - Library documentation (include specific URLs)
   - Implementation examples (GitHub/StackOverflow/blogs)
   - Best practices and common pitfalls

3. **User Clarification** (if needed)
   - Specific patterns to mirror and where to find them?
   - Integration requirements and where to find them?

## Template Selection

Choose the appropriate template based on project complexity:

### Basic Projects (Simple features, existing patterns)
- Use: `PRPs/templates/prp_base.md`
- Best for: Straightforward implementations, following existing patterns

### Complex Projects (New features, systematic approach needed)
- Use: `PRPs/templates/prp_base.md`
- Best for: Complex features requiring systematic analysis
- Includes: Pre-PRP discovery, strategic planning, comprehensive validation

### Domain-Specific Projects
- Start with: `PRPs/templates/prp_base.md`
- Add overlay from: `PRPs/templates/domain-adaptations.md`
- Available domains: Web App, API, Mobile, Data Pipeline, ML
- Reference: `PRPs/templates/implementation-guide.md`

## PRP Generation

### Critical Context to Include and pass to the AI agent as part of the PRP
- **Documentation**: URLs with specific sections
- **Code Examples**: Real snippets from codebase
- **Gotchas**: Library quirks, version issues
- **Patterns**: Existing approaches to follow

### Implementation Blueprint
- Start with pseudocode showing approach
- Reference real files for patterns
- Include error handling strategy
- list tasks to be completed to fullfill the PRP in the order they should be completed

### Validation Gates (Must be Executable) eg for typescript
```bash
# Syntax/Style/Type Checking
npx eslint . --fix && npx prettier --write . && npx tsc --noEmit

# Unit Tests
npm test

```

### Enhanced Validation (For Complex/Domain-Specific Projects)
- Use comprehensive validation checklist: `PRPs/templates/validation-checklist.md`
- Includes: Development, Business, Operational, Security validation
- Phase-based success gates for systematic implementation

*** CRITICAL AFTER YOU ARE DONE RESEARCHING AND EXPLORING THE CODEBASE BEFORE YOU START WRITING THE PRP ***

*** ULTRATHINK ABOUT THE PRP AND PLAN YOUR APPROACH THEN START WRITING THE PRP ***

## Output Structure

### Main PRP File
Save as: `PRPs/{feature-name}.md`

### Task Separation (Recommended)
For easier execution, create separate task files:

1. **Create task directory**: `PRPs/{feature-name}/tasks/`
2. **Generate task manifest**: `PRPs/{feature-name}/task-manifest.md`
3. **Create individual task files**: `PRPs/{feature-name}/tasks/task_01_[name].md`

Use templates:
- Task template: `PRPs/templates/task-template.md`
- Task manifest: `PRPs/templates/task-manifest.md`

### Benefits of Task Separation
- Execute tasks individually for better focus
- Track progress per task
- Easier debugging and validation
- Clear dependency management
- Parallel execution where possible

## Quality Checklist

### Basic Template (prp_base.md)
- [ ] All necessary context included
- [ ] Validation gates are executable by AI
- [ ] References existing patterns
- [ ] Clear implementation path
- [ ] Error handling documented

### Enhanced Template (prp_enhanced.md)
- [ ] Pre-PRP discovery completed
- [ ] Domain overlay applied (if applicable)
- [ ] Strategic phases defined
- [ ] Comprehensive validation strategy included
- [ ] Multi-level validation checklist referenced

Score the PRP on a scale of 1-10 (confidence level to succeed in one-pass implementation using claude codes)

Remember: The goal is one-pass implementation success through comprehensive context.

Quick Install

$npx ai-builder add command lethal1147/generate-prp

Details

Type
command
Slug
lethal1147/generate-prp
Created
6d ago