xiaohongshu
xiaohongshu
doc-prd
Create Product Requirements Documents (PRD) following SDD methodology - Layer 2 artifact defining product features and user needs
Full skill instructions
Create Product Requirements Documents (PRD) - Layer 2 artifact in the SDD workflow that defines product features, user needs, measurable success criteria, and KPIs.
Layer: 2
Upstream: BRD (Layer 1)
Downstream Artifacts: EARS (Layer 3), BDD (Layer 4), ADR (Layer 5)
Before creating this document, you MUST:
List existing upstream artifacts:
ls docs/BRD/ docs/PRD/ 2>/dev/null
Reference only existing documents in traceability tags
Use null only when upstream artifact type genuinely doesn't exist
NEVER use placeholders like BRD-XXX or TBD
Do NOT create missing upstream artifacts - skip functionality instead
Before creating a PRD, read:
.claude/skills/doc-flow/SHARED_CONTENT.mdPRD_CREATION_RULES.md Section 22.ai_dev_flow/PRD/PRD-TEMPLATE.mdai_dev_flow/PRD/PRD_CREATION_RULES.mdai_dev_flow/PRD/PRD_VALIDATION_RULES.mdUse doc-prd when:
PRD documents require exactly 21 numbered sections (1-21). See ai_dev_flow/PRD/PRD-TEMPLATE.md for complete structure.
Section 1. Document Control (MANDATORY - First section):
@brd: BRD.NN.EE.SS)XX% (Target: >=90%))XX% (Target: >=90%))All 21 Sections (in order):
Critical Notes:
## N. Title format)PRD documents require two quality scores in Document Control:
| Score | Purpose | Threshold |
|---|---|---|
| SYS-Ready Score | Readiness for SYS creation | >=90% |
| EARS-Ready Score | Readiness for EARS creation | >=90% |
Format: XX% (Target: >=90%)
SYS-Ready Scoring Criteria (100%):
EARS-Ready Scoring Criteria (100%):
| Variant | Sections | Use Case |
|---|---|---|
| Standard | 1-21 (21) | Business features, core platform (DEFAULT) |
| Agent-Based | 1-15 (15) | ML/AI agents, intelligent systems |
| Automation-Focused | 1-12 (12) | n8n workflows, event processing |
Selection Criteria:
Layer Separation Principle:
MANDATORY Scope Note (include in Section 8):
This section provides role definitions and story summaries. Detailed behavioral requirements are captured in EARS; executable test specifications are in BDD feature files.
User Story Format: "As a [role], I want [capability] so that [benefit]"
PRD-Level Content (INCLUDE):
NOT PRD-Level (EXCLUDE):
Status: BLOCKING - error if missing or placeholder-only
Required Content Categories (minimum 3):
Purpose: Elaborate BRD Section 7.2 topics with technical content (options, criteria).
Layer Separation:
BRD Section 7.2 -> PRD Section 18 -> ADR
(WHAT & WHY) (HOW to evaluate) (Final decision)
-------------------------------------------------------------------
Business drivers Technical options Selected option
Business constraints Evaluation criteria Trade-off analysis
PRD Section 18 Format:
##### BRD.NN.32.SS: [Topic Name]
**Upstream**: BRD-NN section 7.2.X
**Technical Options**:
1. **[Option A]**: [Description]
2. **[Option B]**: [Description]
**Evaluation Criteria**:
- **[Criterion 1]**: [Measurable target]
- **[Criterion 2]**: [Measurable target]
**Product Constraints**:
- [Constraint 1]
**Decision Timeline**: [Milestone reference]
**ADR Requirements**: [What ADR must decide]
CRITICAL: Do NOT reference specific ADR numbers (ADR-01, ADR-033, etc.) - ADRs don't exist yet!
Purpose: Provides structured requirements for EARS transformation.
Required Subsections:
20.1 Timing Profile Matrix:
| Operation | p50 | p95 | p99 | Unit | Trigger Event | Notes |
|---|---|---|---|---|---|---|
| [operation] | [value] | [value] | [value] | ms | [event] | [constraints] |
20.2 Boundary Value Matrix:
| Threshold | Operator | Value | At Boundary | Above | Below |
|---|---|---|---|---|---|
| [name] | >= or > or <= or < | [value] | [behavior] | [behavior] | [behavior] |
20.3 State Transition Diagram: Mermaid stateDiagram-v2 with error states
20.4 Fallback Path Documentation:
| Dependency | Failure Mode | Detection | Fallback Behavior | Timeout | Recovery |
|---|
20.5 EARS-Ready Checklist: All timing, boundary, state, fallback items verified
| Notation | Format | Artifacts | Purpose |
|---|---|---|---|
| Dash | TYPE-NN | ADR, SPEC, CTR | Technical artifacts - file references |
| Dot | TYPE.NN.TT.SS | BRD, PRD, EARS, BDD, SYS, REQ, IMPL, TASKS | Hierarchical - element references |
Key Distinction:
@adr: ADR-033 -> Points to document ADR-033_slug.md@brd: BRD.17.01.01 -> Points to element 01.01 inside BRD-017.mdPattern: PRD.{DOC_NUM}.{ELEM_TYPE}.{SEQ} (4 segments, dot-separated)
| Element Type | Code | Example |
|---|---|---|
| Functional Requirement | 01 | PRD.02.01.01 |
| Quality Attribute | 02 | PRD.02.02.01 |
| Constraint | 03 | PRD.02.03.01 |
| Assumption | 04 | PRD.02.04.01 |
| Dependency | 05 | PRD.02.05.01 |
| Acceptance Criteria | 06 | PRD.02.06.01 |
| Risk | 07 | PRD.02.07.01 |
| Metric | 08 | PRD.02.08.01 |
| User Story | 09 | PRD.02.09.01 |
| Use Case | 11 | PRD.02.11.01 |
| Feature Item | 22 | PRD.02.22.01 |
| Stakeholder Need | 24 | PRD.02.24.01 |
REMOVED Patterns (Do NOT use):
AC-XXX -> Use PRD.NN.06.SSFR-XXX -> Use PRD.NN.01.SSF-XXX -> Use PRD.NN.09.SSUS-XXX -> Use PRD.NN.09.SSLayer 2 (PRD): Must include tags from Layer 1 (BRD)
Tag Count: 1 tag (@brd)
Format:
## 18. Traceability
### Traceability Tags
**Required Tags** (Cumulative Tagging Hierarchy - Layer 2):
```markdown
@brd: BRD.01.01.03, BRD.01.01.10
Upstream Sources:
Downstream Artifacts:
## Creation Process
### Step 1: Read Parent BRD
Read and understand the BRD that drives this PRD.
**Sectioned BRD Handling**:
If BRD is split into multiple section files (folder structure `docs/BRD/BRD-NN_{slug}/`):
1. Read ALL section files (BRD-NN.0 through BRD-NN.18)
2. Treat as ONE logical document
3. Extract information holistically (no section-to-section mapping)
### Step 2: Reserve ID Number
Check `docs/PRD/` for next available ID number (e.g., PRD-01, PRD-02).
**ID Numbering Convention**: Start with 2 digits and expand only as needed.
- ✅ Correct: PRD-01, PRD-99, PRD-102
- ❌ Incorrect: PRD-001, PRD-009 (extra leading zero not required)
**ID Matching**: PRD ID does NOT need to match BRD ID (PRD-09 may implement BRD-16).
### Step 3: Create PRD Folder and Files
**Folder structure** (DEFAULT - nested folder per document):
1. Create folder: `docs/PRD/PRD-NN_{slug}/`
2. Create index file: `docs/PRD/PRD-NN_{slug}/PRD-NN.0_index.md`
3. Create section files: `docs/PRD/PRD-NN_{slug}/PRD-NN.S_{section_type}.md`
**Example**:
docs/PRD/PRD-01_user_authentication/ PRD-01.0_index.md PRD-01.1_executive_summary.md PRD-01.2_problem_statement.md ...
**OPTIONAL** (for small documents <25KB): `docs/PRD/PRD-NN_{slug}.md` (monolithic)
### Step 4: Complete Document Control
Fill all required metadata fields:
- Status, Version, Dates, Author/Reviewer/Approver
- BRD Reference with `@brd` tag
- SYS-Ready Score and EARS-Ready Score (both >=90%)
- Template Variant
- Document Revision History table
### Step 5: Complete Core Sections (2-17)
**Section 2-3**: Problem context and business impact
**Section 4-6**: Users, KPIs, goals
**Section 7-9**: Scope, user stories, functional requirements
**Section 10**: Customer-facing content (MANDATORY)
**Section 11-14**: Acceptance criteria, constraints, risks, success
**Section 15-17**: Stakeholders, implementation, budget
### Step 6: Complete Traceability (Section 18)
- Add upstream BRD references
- Document downstream artifact placeholders
- Include Architecture Decision Requirements elaboration
- Add bidirectional reference table if cross-PRD dependencies exist
### Step 7: Complete References (Section 19)
Internal documentation, external standards, domain and technology references.
### Step 8: Complete EARS Enhancement Appendix (Section 20)
- Timing Profile Matrix (p50/p95/p99)
- Boundary Value Matrix (explicit operators)
- State Transition Diagram (with error states)
- Fallback Path Documentation
- EARS-Ready Checklist
### Step 9: Complete QA Strategy (Section 21)
Quality standards and testing strategy (moved from BRD).
### Step 10: Create/Update Traceability Matrix
**MANDATORY**: Create or update `docs/PRD/PRD-00_TRACEABILITY_MATRIX.md`
### Step 11: Update Upstream BRD Traceability (MANDATORY)
**CRITICAL - Often Missed**: When creating a PRD, you MUST update the parent BRD's traceability section.
**Process**:
1. Open the upstream BRD (e.g., `docs/BRD/BRD-01_platform.md`)
2. Locate the `## Traceability` section
3. Add this PRD to `Downstream Artifacts`:
```markdown
- Downstream Artifacts: [PRD-01](../PRD/PRD-01_user_authentication/PRD-01.0_index.md#PRD-01)
Why This Matters:
Reference: See .claude/skills/doc-flow/SHARED_CONTENT.md Section 4.3 "Bidirectional Traceability Update Workflow" for complete guidance.
# PRD validation
python ai_dev_flow/scripts/validate_prd.py docs/PRD/PRD-NN_{slug}/
# Link integrity
python ai_dev_flow/scripts/validate_links.py --path docs/PRD/
# Cumulative tagging validation
python ai_dev_flow/scripts/validate_tags_against_docs.py --artifact PRD-NN --expected-layers brd --strict
Structure (21 Sections):
Document Control Required Fields:
Content Quality:
Traceability:
Size Limits:
CRITICAL: Execute this validation loop IMMEDIATELY after document creation.
LOOP:
1. Run: python ai_dev_flow/scripts/validate_cross_document.py --document {doc_path} --auto-fix
2. IF errors fixed: GOTO LOOP (re-validate)
3. IF warnings fixed: GOTO LOOP (re-validate)
4. IF unfixable issues: Log for manual review, continue
5. IF clean: Mark VALIDATED, proceed
# Per-document validation (Phase 1)
python ai_dev_flow/scripts/validate_cross_document.py --document docs/PRD/PRD-NN_slug.md --auto-fix
# Layer validation (Phase 2) - run when all PRD documents complete
python ai_dev_flow/scripts/validate_cross_document.py --layer PRD --auto-fix
| Code | Description | Severity |
|---|---|---|
| XDOC-001 | Referenced requirement ID not found | ERROR |
| XDOC-002 | Missing cumulative tag (@brd) | ERROR |
| XDOC-003 | Upstream document not found | ERROR |
| XDOC-006 | Tag format invalid | ERROR |
| XDOC-009 | Missing traceability section | ERROR |
| FWDREF-E001 | Forward reference to non-existent ADR | ERROR |
Blocking: YES - Cannot proceed to EARS/SYS creation until validation passes with 0 errors.
When creating PRD documents, use EXACTLY these metadata values:
tags:
- prd # REQUIRED - Use 'prd' NOT 'product-prd', 'feature-prd'
- layer-2-artifact # REQUIRED - Layer identifier
custom_fields:
document_type: prd # REQUIRED - Use 'prd' NOT 'product-requirements'
artifact_type: PRD # REQUIRED - Uppercase
layer: 2 # REQUIRED - PRD is Layer 2
architecture_approaches: [ai-agent-based] # REQUIRED - Array format
FORBIDDEN Values:
product-prd, feature-prd, product-requirementsproduct-requirements, product_requirementsarchitecture_approach: value (singular form)All diagrams MUST use Mermaid syntax. Text-based diagrams (ASCII art, box drawings) are prohibited.
See: ai_dev_flow/DIAGRAM_STANDARDS.md and mermaid-gen skill.
After creating PRD, use:
doc-ears - Create formal EARS requirements (Layer 3)
The EARS will:
@brd and @prd tags (cumulative)ai_dev_flow/SPEC_DRIVEN_DEVELOPMENT_GUIDE.mdai_dev_flow/PRD/PRD_SCHEMA.yamlai_dev_flow/PRD/PRD-TEMPLATE.mdai_dev_flow/PRD/PRD_CREATION_RULES.mdai_dev_flow/PRD/PRD_VALIDATION_RULES.mdai_dev_flow/PRD/README.md.claude/skills/doc-flow/SHARED_CONTENT.mdSection Templates (DEFAULT for all PRD documents):
docs/PRD/PRD-NN_{slug}/PRD-NN.S_{slug}.mdai_dev_flow/PRD/PRD-SECTION-0-TEMPLATE.mdai_dev_flow/PRD/PRD-SECTION-TEMPLATE.mdai_dev_flow/ID_NAMING_STANDARDS.mdPRD Purpose: Define product features and user needs
Layer: 2
Tags Required: @brd (1 tag)
Key Sections:
Next: doc-ears
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience