StarterApp Docs
AI WorkflowMethodologies

PRP/PRD

Product Requirement Prompts and Product Requirement Documents for AI-driven development

Product Requirement Prompts (PRPs) and Product Requirement Documents (PRDs) structure feature development for AI implementation. These documents provide comprehensive specifications that enable AI to generate complete, production-ready code.

AI-Readable Specifications

PRPs combine traditional PRD structure with AI-specific context engineering. The format layers codebase intelligence, constraints, and validation directly into requirements, creating executable specifications with precise file references and validation commands.

Core Concept

PRPs transform stakeholder input into executable specifications. The documents include:

  • Precise file references and version requirements
  • Step-by-step implementation blueprint
  • Embedded validation commands
  • Concrete acceptance criteria

Product Requirement Prompts (PRP)

PRPs define implementation details for specific features. Located in /llms/PRPs/, these documents guide AI through complex implementations with precision.

Structure

PRPs follow a consistent format defined in /llms/PRPs/templates/prp_base.md:

  • Objective - Clear feature description with measurable outcomes
  • Context - Curated codebase references, file paths, and examples
  • Constraints - Technical limitations and requirements
  • Implementation Blueprint - Stepwise approach with dependencies
  • Validation Loop - Tests, lints, and commands for verification
  • Deliverables - Expected files, changes, and artifacts

Context Engineering

PRPs excel through curated codebase intelligence. Instead of vague descriptions, PRPs provide:

Context Example
## Context
- Authentication: See `packages/auth/providers/google.ts` for OAuth pattern
- Database: Follow `convex/users.ts` schema structure
- Security: Apply rate limiting per `packages/security/rate-limit.ts`
- Testing: Mirror `__tests__/api/auth.test.ts` approach

This precision eliminates guesswork. AI receives exact patterns to follow, reducing iteration cycles.

Living Artifacts

PRPs evolve with features. Changes to requirements update the PRP first. Git history shows feature evolution through PRP modifications. This traceability connects requirements to implementation decisions.

AI-First Benefits

Alignment and First-Pass Success

PRPs reduce ambiguity through explicit context. AI understands exactly which patterns to follow, which files to reference, and which constraints apply. This alignment produces working code on initial generation.

Reproducible Implementations

The same PRP generates consistent results across different AI sessions. Deterministic specifications yield deterministic outputs. Teams achieve predictable development cycles.

Built-in Quality Assurance

Validation commands embedded in PRPs ensure quality:

Validation Example
## Validation
1. Run `pnpm typecheck` - Must pass without errors
2. Execute `pnpm test auth/*` - All auth tests must pass
3. Verify `pnpm lint` - No violations allowed
4. Check bundle impact with `pnpm analyze`

AI executes these commands, self-correcting based on results.

Workflow Integration

Creation Process

The /generate-prp command creates PRPs from feature descriptions:

PRP Generation
/generate-prp features/user-notifications.md

The command analyzes requirements, identifies relevant patterns, and generates a complete implementation plan. Context engineering happens automatically through codebase analysis.

Execution Flow

  1. Stakeholder Input - Raw requirements and user stories
  2. PRP Generation - Transform into AI-optimized specification
  3. AI Implementation - Single-pass code generation
  4. Validation - Automated quality checks
  5. Review - Human verification of business logic

Vertical Slice Delivery

PRPs enable complete feature slices without heavy process. Each PRP contains everything for end-to-end implementation. No separate design docs, test plans, or integration guides needed.

When PRPs Excel

PRPs suit scenarios requiring:

  • Fast feature delivery with quality constraints
  • Consistent implementation patterns
  • Minimal back-and-forth iteration
  • Clear audit trails for compliance

Small features benefit most from PRP efficiency. Single-developer tasks achieve optimal velocity. Teams avoiding process overhead prefer PRP simplicity.

Additional Resources