Files
gh-l-sypniewski-claude-code…/commands/generate-prp.md
2025-11-30 08:36:32 +08:00

3.2 KiB

Create PRP

GitHub Issue URL: $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 GitHub issue first (specifically the context engineering comment created by initial-github-issue command) 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. GitHub Issue Analysis

    • Fetch the GitHub issue using GitHub MCP
    • Extract the context engineering comment (created by initial-github-issue command)
    • Parse FEATURE, EXAMPLES, DOCUMENTATION, and OTHER CONSIDERATIONS sections
    • Understand the complete feature requirements and constraints
  2. 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
  3. External Research

    • Search for similar features/patterns online
    • Library documentation (include specific URLs)
    • Implementation examples (GitHub/StackOverflow/blogs)
    • Best practices and common pitfalls
  4. User Clarification (if needed)

    • Specific patterns to mirror and where to find them?
    • Integration requirements and where to find them?

PRP Generation

Using PRPs/templates/prp_base.md as template:

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) for REWOS project

# Frontend Validation (Astro.js)
cd astro && npm run build

# CMS Validation (Strapi)
cd strapi/rewos && npm run build

# Integration Tests
cd tests && npm test

*** 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

Save as: PRPs/{feature-name}.md

Quality Checklist

  • All necessary context included
  • Validation gates are executable by AI
  • References existing patterns
  • Clear implementation path
  • Error handling documented

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.

Additional instructions

Use sequential thinking, context7 MCPs to solve the problem using latest documentation and best practices. Ultrathink the approach and a plan.