بنقرة واحدة
prp-design
Generate technical design document from PRD as optional reference (not in workflow)
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Generate technical design document from PRD as optional reference (not in workflow)
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Multi-agent PR review — spawns parallel specialized agents for deep code review.
Multi-agent PR review — spawns parallel specialized agents for deep code review.
Execute an implementation plan with rigorous validation loops — typecheck, lint, test, and build after every change. TDD approach with automatic failure recovery.
Create a comprehensive implementation plan by analyzing the codebase, discovering patterns, and producing a step-by-step actionable plan document.
Execute an implementation plan with rigorous validation loops — typecheck, lint, test, and build after every change. TDD approach with automatic failure recovery.
Create a comprehensive implementation plan by analyzing the codebase, discovering patterns, and producing a step-by-step actionable plan document.
| name | prp-design |
| description | Generate technical design document from PRD as optional reference (not in workflow) |
| metadata | {"short-description":"design"} |
Generate technical design document from PRD as optional reference material (not in critical workflow path).
Design Doc = Architecture blueprint for complex features. Simple features can skip directly to Plan.
Key Principle: Design Doc is a support tool, not a gate. Workflow remains PRD → Plan → Implement.
.prp-output/prds/{name}-prd.md (no suffix)Spawn exploration and research agents in parallel using the Agent tool. These phases are independent — codebase patterns and external research can run simultaneously.
If Agent tool is available, spawn ALL agents in a SINGLE message:
Agent 1 — Codebase Architecture (explore existing patterns):
Agent(
subagent_type="codebase-explorer",
description="Explore architecture for {feature}",
prompt="Explore the codebase to find patterns relevant to: {feature from PRD}
DISCOVER:
1. Architecture Patterns - project structure, module organization, dependency injection
2. API Conventions - REST/GraphQL endpoints, request/response formats, auth patterns
3. Database Patterns - ORM usage, migration patterns, query patterns, transactions
4. Component Patterns (if frontend) - component hierarchy, state management, routing
5. Integration Points - external services, message queues, caching, storage
Return actual code examples with file:line references."
)
Agent 2 — Technical Research (external documentation and best practices):
Agent(
subagent_type="web-researcher",
description="Research tech stack for {feature}",
prompt="Research technical documentation and best practices for: {feature from PRD}
Search for:
1. Official documentation for technologies mentioned in PRD (match project versions)
2. Architecture patterns: industry best practices for similar problems
3. Trade-offs: performance vs maintainability, complexity vs flexibility
4. Security considerations: OWASP guidelines, auth/authz patterns, data validation
5. Scalability: caching strategies, database indexing, async processing
For each finding, format as: [URL] - KEY_INSIGHT - TRADE_OFF
Include version-specific gotchas and deprecation warnings."
)
Agent 3 — Security Research (if PRD involves auth, user input, or data storage):
Agent(
subagent_type="web-researcher",
description="Research security for {feature}",
prompt="Research security best practices for: {feature from PRD}
Focus on:
- OWASP Top 10 relevant to this feature
- Auth/authz patterns for the project's tech stack
- Data validation and sanitization approaches
- Encryption and secrets management
Return actionable recommendations with references."
)
After all agents complete, merge their findings:
If Agent tool is NOT available, fall back to sequential:
Create comprehensive technical design:
ASCII Diagram showing components, data flow, external dependencies, integration points.
Example:
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ Client │─────▶│ API │─────▶│ Database │
│ (React) │ │ (Fastify) │ │ (Postgres) │
└─────────────┘ └──────────────┘ └─────────────┘
│
▼
┌──────────────┐
│ Redis │
│ (Cache) │
└──────────────┘
Define request/response schemas using project conventions.
New tables or schema changes with SQL + migration strategy.
Critical user flows using Mermaid.
Component tree if frontend changes.
ASCII diagram showing data transformations.
Document key decisions with rationale:
| Decision | Choice | Alternatives | Rationale | Trade-offs |
|---|---|---|---|---|
| {Decision} | {Choice} | {Alternatives} | {Why} | {Trade-offs} |
If modifying existing feature:
Generate timestamp:
TIMESTAMP=$(date +%Y%m%d-%H%M)
Check for existing files:
# Look for existing files with same base name
ls .prp-output/designs/{feature}-design-agents*.md 2>/dev/null
Output path: .prp-output/designs/{feature}-design-codex-{TIMESTAMP}.md
Example: auth-feature-design-codex-20260210-1430.md
Create directory: mkdir -p .prp-output/designs
Note: Uses
-agentssuffix to identify which tool produced the design doc (consistent with multi-agent review naming). Multiple tools can create design docs with different tool suffixes for comparison.
---
source-prd: .prp-output/prds/{feature}-prd.md
created: {timestamp}
status: reference
tool: agents
---
# {Feature Name} - Technical Design
## Overview
**Problem**: {One-line problem from PRD}
**Solution**: {One-line solution from PRD}
**Complexity**: {LOW/MEDIUM/HIGH}
## System Architecture
{ASCII diagram showing components and data flow}
**Components:**
- **{Component 1}**: {Responsibility}
- **{Component 2}**: {Responsibility}
**External Dependencies:**
- {Service 1}: {Purpose}
- {Service 2}: {Purpose}
## API Contracts
### Endpoint 1: {Method} {Path}
**Request:**
```typescript
{Request schema}
Response:
{Response schema}
Validation:
Error Cases:
| Status | Error Code | Description |
|---|---|---|
| 400 | INVALID_INPUT | {Description} |
| 401 | UNAUTHORIZED | {Description} |
{CREATE TABLE statements}
{ALTER TABLE statements}
{CREATE INDEX statements}
Migration Strategy:
Rollback Plan:
{Sequence diagram}
{Sequence diagram}
{If frontend, show component tree}
State Management:
Data Fetching:
{ASCII diagram showing data transformations}
Input Validation:
Error Handling:
| Decision | Choice | Alternatives | Rationale | Trade-offs |
|---|---|---|---|---|
| {Decision 1} | {Choice} | {Alternatives} | {Why} | {Trade-offs} |
| {Decision 2} | {Choice} | {Alternatives} | {Why} | {Trade-offs} |
Authentication:
Authorization:
Input Validation:
Known Vulnerabilities:
Targets:
Caching Strategy:
Database Optimization:
Bottlenecks:
Horizontal Scaling:
Stateless Design:
Async Processing:
Database Scaling:
Key Metrics:
Logging:
Alerts:
Tracing:
Deployment Steps:
Feature Flags:
Rollback Plan:
Data Migration:
Codebase Patterns:
External Documentation:
This is a reference document. It does not block the workflow. PRD → Plan → Implement remains the critical path.
Generated: {timestamp} Tool: Claude Code (multi-agent)
---
## Phase 9: Output Summary
Report:
```markdown
## Design Doc Created
**File**: `.prp-output/designs/{name}-design-codex-{TIMESTAMP}.md` (REFERENCE ONLY)
### Summary
**Feature**: {Name}
**Complexity**: {LOW/MEDIUM/HIGH}
**Components**: {Count}
**API Endpoints**: {Count}
**Database Changes**: {New tables + Modified tables}
### Key Design Decisions
1. {Decision 1}: {Choice} - {Rationale}
2. {Decision 2}: {Choice} - {Rationale}
3. {Decision 3}: {Choice} - {Rationale}
### Security Considerations
- {Consideration 1}
- {Consideration 2}
### Performance Targets
- p95 latency: {target}
- Throughput: {target}
### Next Steps
This is a **reference document**. Workflow continues as:
1. Use this design doc as reference (optional)
2. Create Plan from PRD: `$prp-plan .prp-output/prds/{name}-prd.md`
3. Implement from Plan
**Design Doc does NOT block workflow** - implementer can reference it for architecture guidance.