@comfanion/workflow 4.38.4-dev.1 → 4.39.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/build-info.json +2 -2
- package/src/opencode/skills/acceptance-criteria/SKILL.md +58 -176
- package/src/opencode/skills/architecture-design/SKILL.md +86 -576
- package/src/opencode/skills/archiving/SKILL.md +60 -140
- package/src/opencode/skills/coding-standards/SKILL.md +113 -434
- package/src/opencode/skills/coding-standards/what-to-document.md +512 -0
- package/src/opencode/skills/database-design/SKILL.md +94 -778
- package/src/opencode/skills/database-design/indexing.md +187 -0
- package/src/opencode/skills/database-design/migrations.md +239 -0
- package/src/opencode/skills/database-design/schema-design.md +319 -0
- package/src/opencode/skills/doc-todo/SKILL.md +35 -27
- package/src/opencode/skills/epic-writing/SKILL.md +156 -244
- package/src/opencode/skills/epic-writing/template.md +11 -1
- package/src/opencode/skills/methodologies/SKILL.md +91 -354
- package/src/opencode/skills/methodologies/define.md +336 -0
- package/src/opencode/skills/methodologies/diagnose.md +374 -0
- package/src/opencode/skills/methodologies/empathize.md +253 -0
- package/src/opencode/skills/methodologies/ideate.md +458 -0
- package/src/opencode/skills/prd-writing/SKILL.md +162 -366
- package/src/opencode/skills/prd-writing/template.md +178 -48
- package/src/opencode/skills/requirements-gathering/SKILL.md +102 -117
- package/src/opencode/skills/requirements-gathering/template.md +97 -17
- package/src/opencode/skills/sprint-planning/SKILL.md +76 -225
- package/src/opencode/skills/sprint-planning/template.yaml +8 -0
- package/src/opencode/skills/story-writing/SKILL.md +76 -210
- package/src/opencode/skills/story-writing/template.md +10 -1
- package/src/opencode/skills/test-design/SKILL.md +78 -84
- package/src/opencode/skills/test-design/test-strategy.md +279 -0
- package/src/opencode/skills/test-design/unit-tests-mocking.md +247 -0
- package/src/opencode/skills/test-design/unit-tests-patterns.md +181 -0
- package/src/opencode/skills/test-design/unit-tests.md +117 -0
- package/src/opencode/skills/unit-writing/SKILL.md +119 -377
- package/src/opencode/skills/module-documentation/SKILL.md +0 -224
- package/src/opencode/skills/module-documentation/template.md +0 -139
- /package/src/opencode/skills/test-design/{template-integration.md → templates/template-integration.md} +0 -0
- /package/src/opencode/skills/test-design/{template-module.md → templates/template-module.md} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: prd-writing
|
|
3
|
-
description:
|
|
3
|
+
description: Create Product Requirements Document from validated requirements with project classification, success metrics, and feature specifications. Use when writing PRD, documenting product vision, defining features, or when user mentions "product requirements", "PRD", "product spec", or "feature definition".
|
|
4
4
|
license: MIT
|
|
5
5
|
compatibility: opencode
|
|
6
6
|
metadata:
|
|
@@ -10,391 +10,187 @@ metadata:
|
|
|
10
10
|
|
|
11
11
|
# PRD Writing Skill
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
```xml
|
|
14
|
+
<prd_writing>
|
|
15
|
+
<definition>Create PRD from requirements with product vision</definition>
|
|
16
|
+
|
|
17
|
+
<prd_contains>
|
|
18
|
+
<executive_summary>Business value, vision</executive_summary>
|
|
19
|
+
<project_classification>Size, complexity, timeline (MANDATORY FIRST SECTION)</project_classification>
|
|
20
|
+
<success_criteria>Metrics, KPIs</success_criteria>
|
|
21
|
+
<product_scope>MVP/Growth/Out-of-scope</product_scope>
|
|
22
|
+
<user_flows>High-level capabilities</user_flows>
|
|
23
|
+
<business_rules>Critical rules</business_rules>
|
|
24
|
+
<ai_considerations optional="true">For AI/RAG systems</ai_considerations>
|
|
25
|
+
<requirements_summary>Counts, priorities, link to requirements.md</requirements_summary>
|
|
26
|
+
</prd_contains>
|
|
27
|
+
|
|
28
|
+
<prd_does_not_contain>
|
|
29
|
+
<detailed_fr_nfr>→ requirements.md (source of truth)</detailed_fr_nfr>
|
|
30
|
+
<technical_details>→ architecture.md</technical_details>
|
|
31
|
+
<task_breakdowns>→ epics/*.md, stories/*.md</task_breakdowns>
|
|
32
|
+
<api_specs>→ units/*/api-spec.md</api_specs>
|
|
33
|
+
<data_models>→ units/*/data-model.md</data_models>
|
|
34
|
+
</prd_does_not_contain>
|
|
35
|
+
|
|
36
|
+
<project_classification mandatory="true" first_section="true">
|
|
37
|
+
<purpose>Determines depth of all artifacts (PRD, Architecture, Epics, Stories)</purpose>
|
|
38
|
+
<attributes>Size, Complexity, Team Size, Timeline, Domain</attributes>
|
|
39
|
+
|
|
40
|
+
<TOY>
|
|
41
|
+
<examples>Tetris, Calculator, Todo list</examples>
|
|
42
|
+
<scope>Single feature</scope>
|
|
43
|
+
<team>Solo</team>
|
|
44
|
+
<prd>2-3 pages, bullet points OK</prd>
|
|
45
|
+
<architecture>200-500 lines, simple diagram</architecture>
|
|
46
|
+
<structure>Flat components</structure>
|
|
47
|
+
<epics>3-5 features</epics>
|
|
48
|
+
<units>No</units>
|
|
49
|
+
</TOY>
|
|
50
|
+
|
|
51
|
+
<SMALL>
|
|
52
|
+
<examples>Blog, REST API, CLI tool</examples>
|
|
53
|
+
<scope>Single app, basic CRUD</scope>
|
|
54
|
+
<team>1-2 devs</team>
|
|
55
|
+
<prd>3-5 pages</prd>
|
|
56
|
+
<architecture>500-1000 lines, C4 model</architecture>
|
|
57
|
+
<structure>Flat services</structure>
|
|
58
|
+
<epics>5-10 feature areas</epics>
|
|
59
|
+
<units>No</units>
|
|
60
|
+
</SMALL>
|
|
61
|
+
|
|
62
|
+
<MEDIUM>
|
|
63
|
+
<examples>E-commerce, CRM, Mobile app</examples>
|
|
64
|
+
<scope>Multi-module system</scope>
|
|
65
|
+
<team>2-5 devs</team>
|
|
66
|
+
<prd>5-10 pages, break into MODULES</prd>
|
|
67
|
+
<architecture>1000-2000 lines, full C4</architecture>
|
|
68
|
+
<structure>Modules (OrderModule, PaymentModule)</structure>
|
|
69
|
+
<epics>8-15, each Epic = one Module</epics>
|
|
70
|
+
<units>Yes - docs/units/module-name/</units>
|
|
71
|
+
</MEDIUM>
|
|
72
|
+
|
|
73
|
+
<LARGE>
|
|
74
|
+
<examples>SaaS, Payment platform, Marketplace</examples>
|
|
75
|
+
<scope>Multi-domain platform</scope>
|
|
76
|
+
<team>5-20 devs</team>
|
|
77
|
+
<prd>10-20 pages, think in DOMAINS</prd>
|
|
78
|
+
<architecture>2000-4000 lines</architecture>
|
|
79
|
+
<structure>Domains/Bounded Contexts</structure>
|
|
80
|
+
<epics>15-30, each Epic = one Domain</epics>
|
|
81
|
+
<units>Yes - complete with API specs, events</units>
|
|
82
|
+
</LARGE>
|
|
83
|
+
|
|
84
|
+
<ENTERPRISE>
|
|
85
|
+
<examples>Banking, Healthcare, ERP</examples>
|
|
86
|
+
<scope>Enterprise-wide, compliance</scope>
|
|
87
|
+
<team>20+ devs</team>
|
|
88
|
+
<prd>20-50 pages, strategic</prd>
|
|
89
|
+
<architecture>4000+ lines, per-domain files</architecture>
|
|
90
|
+
<structure>Bounded Contexts with subdomains</structure>
|
|
91
|
+
<epics>30+</epics>
|
|
92
|
+
<units>Yes - audit-ready</units>
|
|
93
|
+
</ENTERPRISE>
|
|
94
|
+
</project_classification>
|
|
95
|
+
|
|
96
|
+
<executive_summary>What system is, architecture pattern, key domains, unique value, scale</executive_summary>
|
|
97
|
+
<success_criteria>MVP Success, Growth Success (measurable)</success_criteria>
|
|
98
|
+
<product_scope>MVP, Growth, Out of Scope (by module for MEDIUM+)</product_scope>
|
|
99
|
+
<requirements_summary>Link to requirements.md, counts by domain/priority</requirements_summary>
|
|
100
|
+
<ai_considerations optional="true">Quality targets, system boundaries</ai_considerations>
|
|
101
|
+
<business_rules>Numbered list with bold rule names</business_rules>
|
|
102
|
+
<glossary>Table: Term | Definition</glossary>
|
|
103
|
+
<references>Links to requirements.md, architecture.md, coding-standards</references>
|
|
104
|
+
<changelog>Version | Date | Author | Changes</changelog>
|
|
105
|
+
</structure>
|
|
106
|
+
|
|
107
|
+
<workflow>
|
|
108
|
+
<prerequisite>Check if requirements.md exists</prerequisite>
|
|
109
|
+
<if_exists>Read it, use for Requirements Summary, count FRs by domain/priority</if_exists>
|
|
110
|
+
<if_not_exists>STOP - tell user to run /requirements first</if_not_exists>
|
|
111
|
+
</workflow>
|
|
112
|
+
|
|
113
|
+
<requirements_section>
|
|
114
|
+
<format>Summary only (no detailed FR/NFR tables)</format>
|
|
115
|
+
<source_of_truth>requirements.md</source_of_truth>
|
|
116
|
+
<summary>Count FRs by domain, priority; Count NFRs by category</summary>
|
|
117
|
+
</requirements_section>
|
|
118
|
+
|
|
119
|
+
<units>
|
|
120
|
+
<TOY>No units</TOY>
|
|
121
|
+
<SMALL>No units</SMALL>
|
|
122
|
+
<MEDIUM>Yes - modules (docs/units/module-name/)</MEDIUM>
|
|
123
|
+
<LARGE>Yes - domains (docs/units/domain-name/)</LARGE>
|
|
124
|
+
<ENTERPRISE>Yes - bounded contexts</ENTERPRISE>
|
|
125
|
+
</units>
|
|
126
|
+
|
|
127
|
+
<reference_format>
|
|
128
|
+
<unit>→ Unit: `Order Management` - docs/units/order-management/</unit>
|
|
129
|
+
<fr>→ FR: `FR-001`</fr>
|
|
130
|
+
<adr>→ ADR: `ADR-001`</adr>
|
|
131
|
+
<requirements>→ Requirements: `docs/requirements/requirements.md`</requirements>
|
|
132
|
+
</reference_format>
|
|
133
|
+
|
|
134
|
+
<priority>
|
|
135
|
+
<P0>Must have (MVP)</P0>
|
|
136
|
+
<P1>Should have (Growth)</P1>
|
|
137
|
+
<P2>Nice to have (Vision)</P2>
|
|
138
|
+
</priority>
|
|
139
|
+
</prd_writing>
|
|
140
|
+
```
|
|
27
141
|
|
|
28
|
-
|
|
142
|
+
---
|
|
29
143
|
|
|
30
|
-
|
|
31
|
-
1. Ask user about project (or infer from requirements)
|
|
32
|
-
2. Classify size based on timeline and complexity
|
|
33
|
-
3. Fill the classification table
|
|
34
|
-
4. Adapt your writing style for the rest of PRD
|
|
144
|
+
## Example: MEDIUM E-commerce PRD
|
|
35
145
|
|
|
36
|
-
|
|
146
|
+
```yaml
|
|
147
|
+
id: PRD-001
|
|
148
|
+
version: 1.0
|
|
149
|
+
status: approved
|
|
150
|
+
```
|
|
37
151
|
|
|
38
|
-
|
|
39
|
-
|-----------|-------|-------|
|
|
40
|
-
| **Size** | toy / small / medium / large / enterprise | See guide below |
|
|
41
|
-
| **Complexity** | simple / moderate / complex / very_complex | Business logic depth |
|
|
42
|
-
| **Team Size** | 1-100+ | Number of developers |
|
|
43
|
-
| **Timeline** | Days/weeks/months | Expected duration |
|
|
44
|
-
| **Domain** | game / web_app / api / library / cli / mobile_app / embedded | Project type |
|
|
152
|
+
# Product Requirements Document: E-commerce Platform
|
|
45
153
|
|
|
46
|
-
|
|
154
|
+
## 0. Project Classification
|
|
47
155
|
|
|
48
156
|
| Attribute | Value |
|
|
49
157
|
|-----------|-------|
|
|
50
|
-
| **
|
|
51
|
-
| **
|
|
52
|
-
| **
|
|
53
|
-
| **
|
|
54
|
-
| **
|
|
158
|
+
| **Size** | medium |
|
|
159
|
+
| **Complexity** | moderate |
|
|
160
|
+
| **Team Size** | 3 developers |
|
|
161
|
+
| **Timeline** | 3 months |
|
|
162
|
+
| **Domain** | web_app |
|
|
55
163
|
|
|
56
|
-
|
|
164
|
+
## Executive Summary
|
|
57
165
|
|
|
58
|
-
|
|
166
|
+
Multi-module e-commerce platform for online retail. Clean architecture with Order, Inventory, and Payment modules.
|
|
59
167
|
|
|
60
|
-
|
|
61
|
-
- What's the scope? (single feature vs full system)
|
|
62
|
-
- How complex is the business logic? (simple CRUD vs complex workflows)
|
|
63
|
-
- How many integrations? (none vs many external systems)
|
|
64
|
-
- What's the data model? (few entities vs complex relationships)
|
|
65
|
-
- Who's the team? (solo vs multiple teams)
|
|
168
|
+
## Requirements
|
|
66
169
|
|
|
67
|
-
|
|
170
|
+
> **Source of Truth:** `docs/requirements/requirements.md`
|
|
68
171
|
|
|
69
|
-
|
|
70
|
-
- **Examples:** Tetris, Calculator, Tic-tac-toe, Todo list
|
|
71
|
-
- **Scope:** Single feature or concept exploration
|
|
72
|
-
- **Complexity:** Minimal business logic, no integrations
|
|
73
|
-
- **Data:** No database or simple localStorage
|
|
74
|
-
- **Team:** Solo developer
|
|
75
|
-
- **What to write:**
|
|
76
|
-
- PRD: 2-3 pages, bullet points OK
|
|
77
|
-
- Architecture: 200-500 lines, simple component diagram
|
|
78
|
-
- Structure: Flat components (GameEngine, Renderer, ScoreManager)
|
|
79
|
-
- Epics: 3-5 major features ("Game Logic", "UI", "Scoring")
|
|
80
|
-
- No modules, no Unit docs
|
|
172
|
+
### Requirements Summary
|
|
81
173
|
|
|
82
|
-
|
|
174
|
+
**Functional Requirements:** 23 requirements across 3 modules
|
|
175
|
+
- Order Management: 12 requirements (8 P0, 4 P1)
|
|
176
|
+
- Inventory: 6 requirements (5 P0, 1 P1)
|
|
177
|
+
- Payment: 5 requirements (2 P0, 3 P1)
|
|
83
178
|
|
|
84
|
-
**
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
- **Complexity:** Simple business logic, 1-2 integrations max
|
|
88
|
-
- **Data:** Basic database (5-10 tables), simple relationships
|
|
89
|
-
- **Team:** 1-2 developers
|
|
90
|
-
- **What to write:**
|
|
91
|
-
- PRD: 3-5 pages, structured tables
|
|
92
|
-
- Architecture: 500-1000 lines, C4 Context + Container + Component
|
|
93
|
-
- Structure: Flat services (AuthService, PostService, CommentService)
|
|
94
|
-
- Epics: 5-10 feature areas ("User Auth", "Post Management")
|
|
95
|
-
- No modules yet, no Unit docs
|
|
179
|
+
**Priority Breakdown:**
|
|
180
|
+
- P0 (MVP): 15 requirements
|
|
181
|
+
- P1 (Growth): 8 requirements
|
|
96
182
|
|
|
97
|
-
|
|
183
|
+
## Product Scope
|
|
98
184
|
|
|
99
|
-
|
|
100
|
-
- **Examples:** E-commerce site, CRM, Mobile app, Booking system
|
|
101
|
-
- **Scope:** Multiple interconnected features
|
|
102
|
-
- **Complexity:** Moderate business logic, 3-5 integrations, workflows
|
|
103
|
-
- **Data:** 15-30 tables, complex relationships, transactions
|
|
104
|
-
- **Team:** 2-5 developers (small team)
|
|
105
|
-
- **What to write:**
|
|
106
|
-
- PRD: 5-10 pages, break into **MODULES**
|
|
107
|
-
- Architecture: 1000-2000 lines, full C4 model + sequences
|
|
108
|
-
- Structure: **Modules** (OrderModule, InventoryModule, PaymentModule)
|
|
109
|
-
- Epics: 8-15, **each Epic = one Module**
|
|
110
|
-
- **Create Unit docs** for each module: `docs/units/module-name/`
|
|
111
|
-
- Module boundaries matter - define what's in/out
|
|
185
|
+
### MVP
|
|
112
186
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
-
|
|
117
|
-
- **Scope:** Multiple domains with complex interactions
|
|
118
|
-
- **Complexity:** Complex business logic, 10+ integrations, event-driven
|
|
119
|
-
- **Data:** 50-100+ tables, multiple databases, caching layers
|
|
120
|
-
- **Team:** 5-20 developers (multiple teams)
|
|
121
|
-
- **What to write:**
|
|
122
|
-
- PRD: 10-20 pages, think in **DOMAINS**
|
|
123
|
-
- Architecture: 2000-4000 lines, likely multiple files per domain
|
|
124
|
-
- Structure: **Domains/Bounded Contexts** (OrderDomain, PaymentDomain)
|
|
125
|
-
- Epics: 15-30, **each Epic = one Domain**
|
|
126
|
-
- **Complete Unit docs** with API specs, events, data models
|
|
127
|
-
- ADRs for all major decisions (affects multiple teams)
|
|
128
|
-
- Security review required
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
|
|
132
|
-
**ENTERPRISE** - Mission-Critical System
|
|
133
|
-
- **Examples:** Banking system, Healthcare platform, ERP, Trading platform
|
|
134
|
-
- **Scope:** Enterprise-wide system with governance
|
|
135
|
-
- **Complexity:** Very complex, regulatory compliance, high availability
|
|
136
|
-
- **Data:** 100+ tables, distributed databases, audit trails
|
|
137
|
-
- **Team:** 20+ developers (large organization)
|
|
138
|
-
- **What to write:**
|
|
139
|
-
- PRD: 20-50 pages, strategic document
|
|
140
|
-
- Architecture: 4000+ lines, per-domain files
|
|
141
|
-
- Structure: **Bounded Contexts** with subdomains
|
|
142
|
-
- Compliance requirements in every section
|
|
143
|
-
- Multiple review stages (security, compliance, legal)
|
|
144
|
-
- Audit-ready documentation
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
### How Size Affects Your Writing
|
|
149
|
-
|
|
150
|
-
**TOY/SMALL - Keep it lean:**
|
|
151
|
-
```markdown
|
|
152
|
-
## Functional Requirements
|
|
153
|
-
|
|
154
|
-
### Game Logic
|
|
155
|
-
| ID | Requirement | Priority |
|
|
156
|
-
|----|-------------|----------|
|
|
157
|
-
| FR-001 | User can rotate block | P0 |
|
|
158
|
-
| FR-002 | Blocks fall automatically | P0 |
|
|
159
|
-
| FR-003 | Full lines disappear | P0 |
|
|
160
|
-
|
|
161
|
-
**Notes:**
|
|
162
|
-
- Rotation uses standard Tetris rules
|
|
163
|
-
- Fall speed increases with score
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
**MEDIUM - Structured by modules:**
|
|
167
|
-
```markdown
|
|
168
|
-
## Functional Requirements
|
|
169
|
-
|
|
170
|
-
### Order Management Module
|
|
171
|
-
| ID | Requirement | Priority |
|
|
172
|
-
|----|-------------|----------|
|
|
173
|
-
| FR-ORD-001 | Customer can create order with items | P0 |
|
|
174
|
-
| FR-ORD-002 | System validates inventory before order | P0 |
|
|
175
|
-
| FR-ORD-003 | Order status follows workflow (pending → paid → shipped) | P0 |
|
|
176
|
-
|
|
177
|
-
**Notes:**
|
|
178
|
-
- Order cannot be modified after payment
|
|
179
|
-
- Inventory reserved on order creation, committed on payment
|
|
187
|
+
**Order Management Module:**
|
|
188
|
+
- Order CRUD with items
|
|
189
|
+
- Status workflow (pending → paid → shipped)
|
|
190
|
+
- Inventory validation
|
|
180
191
|
|
|
181
192
|
→ Unit: `docs/units/order-management/`
|
|
182
193
|
|
|
183
|
-
|
|
184
|
-
| ID | Requirement | Priority |
|
|
185
|
-
|----|-------------|----------|
|
|
186
|
-
| FR-PAY-001 | System integrates with Stripe | P0 |
|
|
187
|
-
| FR-PAY-002 | Payment failures trigger order cancellation | P0 |
|
|
188
|
-
|
|
189
|
-
→ Unit: `docs/units/payment/`
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
**LARGE/ENTERPRISE - Domain-driven:**
|
|
193
|
-
```markdown
|
|
194
|
-
## Functional Requirements
|
|
195
|
-
|
|
196
|
-
### Order Domain
|
|
197
|
-
→ Unit: `docs/units/order-domain/`
|
|
198
|
-
|
|
199
|
-
#### Order Lifecycle
|
|
200
|
-
| ID | Requirement | Priority | Compliance |
|
|
201
|
-
|----|-------------|----------|------------|
|
|
202
|
-
| FR-ORD-001 | Customer can create order | P0 | GDPR: consent required |
|
|
203
|
-
| FR-ORD-002 | Order audit trail maintained | P0 | SOX: 7 year retention |
|
|
204
|
-
|
|
205
|
-
#### Order Validation
|
|
206
|
-
...
|
|
207
|
-
|
|
208
|
-
### Payment Domain
|
|
209
|
-
→ Unit: `docs/units/payment-domain/`
|
|
210
|
-
...
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
### 1. Executive Summary
|
|
214
|
-
|
|
215
|
-
Brief prose section with:
|
|
216
|
-
- What the system is and does
|
|
217
|
-
- Architecture pattern
|
|
218
|
-
- Key domains (numbered list)
|
|
219
|
-
- What makes this special (unique value)
|
|
220
|
-
- Scale (MVP and Growth targets)
|
|
221
|
-
|
|
222
|
-
### 2. Success Criteria
|
|
223
|
-
|
|
224
|
-
| Section | Content |
|
|
225
|
-
|---------|---------|
|
|
226
|
-
| MVP Success | Measurable criteria for launch |
|
|
227
|
-
| Growth Success | Measurable criteria for scale |
|
|
228
|
-
|
|
229
|
-
### 3. Product Scope
|
|
230
|
-
|
|
231
|
-
| Section | Content |
|
|
232
|
-
|---------|---------|
|
|
233
|
-
| MVP | Features by domain |
|
|
234
|
-
| Growth Features | Post-MVP enhancements |
|
|
235
|
-
| Out of Scope | Explicit exclusions |
|
|
236
|
-
|
|
237
|
-
**IMPORTANT - Module Breakdown by Size:**
|
|
238
|
-
|
|
239
|
-
- **TOY/SMALL:** No modules needed, flat feature list
|
|
240
|
-
- **MEDIUM+:** Break into modules/domains (Units)
|
|
241
|
-
- Each module = separate section in scope
|
|
242
|
-
- Each module will become Epic later
|
|
243
|
-
- Example: "Order Management Module", "Payment Module"
|
|
244
|
-
|
|
245
|
-
### 4. Functional Requirements
|
|
246
|
-
|
|
247
|
-
**Grouping by Project Size:**
|
|
248
|
-
|
|
249
|
-
**TOY/SMALL projects:**
|
|
250
|
-
- Group by feature area (flat structure)
|
|
251
|
-
- Example: "Game Logic", "UI", "Scoring"
|
|
252
|
-
|
|
253
|
-
**MEDIUM+ projects:**
|
|
254
|
-
- Group by Module/Unit (hierarchical)
|
|
255
|
-
- Each module gets its own FR table
|
|
256
|
-
- Example: "Order Management Module" → FR-ORD-001, FR-ORD-002
|
|
257
|
-
|
|
258
|
-
**Table format (with traceability):**
|
|
259
|
-
|
|
260
|
-
| ID | Requirement | Priority | Module | Doc Section | Arch § | Epic | Status |
|
|
261
|
-
|----|-------------|----------|--------|-------------|--------|------|--------|
|
|
262
|
-
| FR-001 | {{requirement}} | P0 | {{module}} | → Unit: `{{name}}` | §{{N}} | → Epic: `{{file}}` | ⬜ |
|
|
263
|
-
|
|
264
|
-
**Column filling:**
|
|
265
|
-
- **@pm (you):** ID, Requirement, Priority, Module — filled when writing PRD
|
|
266
|
-
- **@architect:** Doc Section, Arch § — filled when creating architecture/unit docs
|
|
267
|
-
- **@pm:** Epic — filled when creating epics (`/epics`)
|
|
268
|
-
- **@dev:** Status — marked ✅ when done
|
|
269
|
-
|
|
270
|
-
**Doc Section format:**
|
|
271
|
-
- Use `→ Unit: Name`, `→ Module: Name`, `→ Service: Name`, etc.
|
|
272
|
-
- Examples: `→ Unit: Task`, `→ Module: Auth`, `→ Service: NotificationService`
|
|
273
|
-
- Leave blank initially, @architect fills later
|
|
274
|
-
|
|
275
|
-
With **Notes:** for business rules after each domain table.
|
|
276
|
-
|
|
277
|
-
**Module-based FR IDs (MEDIUM+):**
|
|
278
|
-
```
|
|
279
|
-
FR-ORD-001 # Order Management module
|
|
280
|
-
FR-PAY-001 # Payment module
|
|
281
|
-
FR-INV-001 # Inventory module
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
### 5. Non-Functional Requirements
|
|
285
|
-
|
|
286
|
-
**Table format (with traceability):**
|
|
287
|
-
|
|
288
|
-
| ID | Requirement | Priority | Module | Doc Section | Arch § | Status |
|
|
289
|
-
|----|-------------|----------|--------|-------------|--------|--------|
|
|
290
|
-
| NFR-001 | {{requirement}} | P0 | — | — | §{{N}} | ⬜ |
|
|
291
|
-
|
|
292
|
-
**Column filling:**
|
|
293
|
-
- **@pm (you):** ID, Requirement, Priority, Module (if specific)
|
|
294
|
-
- **@architect:** Doc Section (if specific), Arch §
|
|
295
|
-
- **@dev:** Status
|
|
296
|
-
|
|
297
|
-
**Optional details section:**
|
|
298
|
-
Add Performance/Security/Scalability subsections if NFRs need detailed explanation.
|
|
299
|
-
|
|
300
|
-
### 6. Critical Business Rules
|
|
301
|
-
|
|
302
|
-
Numbered list with **bold rule name** — description format.
|
|
303
|
-
|
|
304
|
-
### 7. Glossary
|
|
305
|
-
|
|
306
|
-
| Term | Definition |
|
|
307
|
-
|------|------------|
|
|
308
|
-
|
|
309
|
-
### 8. References
|
|
310
|
-
|
|
311
|
-
Using `→` format:
|
|
312
|
-
```
|
|
313
|
-
→ Architecture: `docs/architecture.md`
|
|
314
|
-
→ Requirements: `docs/requirements.md`
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
## Units (Modules/Domains)
|
|
318
|
-
|
|
319
|
-
**What is a Unit?**
|
|
320
|
-
A Unit is a module, domain, or bounded context - a cohesive piece of the system.
|
|
321
|
-
|
|
322
|
-
**When to create Units?**
|
|
323
|
-
|
|
324
|
-
| Project Size | Units? | Scope | Examples |
|
|
325
|
-
|--------------|--------|-------|----------|
|
|
326
|
-
| **TOY** | No | Flat features | "Game Logic", "UI", "Scoring" |
|
|
327
|
-
| **SMALL** | No | Flat features | "Auth", "Posts", "Comments" |
|
|
328
|
-
| **MEDIUM** | Yes | Modules | "Order Management", "Inventory", "Payment" |
|
|
329
|
-
| **LARGE** | Yes | Domains | "Order Domain", "Payment Domain" |
|
|
330
|
-
| **ENTERPRISE** | Yes | Bounded Contexts | "Core Banking", "Risk Management" |
|
|
331
|
-
|
|
332
|
-
**For MEDIUM+ projects:**
|
|
333
|
-
1. Identify modules/domains in Executive Summary
|
|
334
|
-
2. Create separate scope section per module
|
|
335
|
-
3. Group FRs by module (FR-ORD-001, FR-PAY-001)
|
|
336
|
-
4. Each module → separate Epic later
|
|
337
|
-
5. Each module → separate Unit documentation (docs/units/module-name/)
|
|
338
|
-
|
|
339
|
-
**Unit Documentation:**
|
|
340
|
-
- For MEDIUM+ projects, create `docs/units/module-name/index.md` for each module
|
|
341
|
-
- Use `unit-writing` skill to document each unit
|
|
342
|
-
- Link from PRD: `→ Unit: Order Management - docs/units/order-management/`
|
|
343
|
-
|
|
344
|
-
## Writing Guidelines
|
|
345
|
-
|
|
346
|
-
### Reference Format
|
|
347
|
-
|
|
348
|
-
Always use `→` prefix for links:
|
|
349
|
-
```
|
|
350
|
-
→ Unit: `Order Management` - docs/units/order-management/
|
|
351
|
-
→ FR: `FR-001`
|
|
352
|
-
→ ADR: `ADR-001`
|
|
353
|
-
→ `path/to/file.md`
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
### Requirement IDs
|
|
357
|
-
- Functional: `FR-001`, `FR-002`, ...
|
|
358
|
-
- Non-Functional: `NFR-001`, `NFR-002`, ...
|
|
359
|
-
|
|
360
|
-
### Priority Levels
|
|
361
|
-
- **P0**: Must have for MVP
|
|
362
|
-
- **P1**: Should have for growth
|
|
363
|
-
- **P2**: Nice to have for vision
|
|
364
|
-
|
|
365
|
-
### Tables over Prose
|
|
366
|
-
|
|
367
|
-
Prefer structured tables over paragraphs:
|
|
368
|
-
```markdown
|
|
369
|
-
| ID | Requirement | Priority |
|
|
370
|
-
|----|-------------|----------|
|
|
371
|
-
| FR-001 | User can create task | P0 |
|
|
372
|
-
```
|
|
373
|
-
|
|
374
|
-
NOT:
|
|
375
|
-
```markdown
|
|
376
|
-
FR-001: The user shall be able to create a task. This is a P0 requirement...
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
## Validation Checklist
|
|
380
|
-
|
|
381
|
-
Before completing PRD:
|
|
382
|
-
- [ ] Executive summary explains the "why"
|
|
383
|
-
- [ ] All FRs from requirements.md are addressed
|
|
384
|
-
- [ ] All NFRs have measurable metrics
|
|
385
|
-
- [ ] Success criteria are measurable
|
|
386
|
-
- [ ] Scope boundaries are clear
|
|
387
|
-
- [ ] Critical business rules documented
|
|
388
|
-
- [ ] Uses `→` reference format
|
|
389
|
-
- [ ] Tables used for structured data
|
|
390
|
-
|
|
391
|
-
## Output
|
|
392
|
-
|
|
393
|
-
Save to: `docs/prd.md`
|
|
194
|
+
See `template.md` for full format.
|
|
394
195
|
|
|
395
|
-
## Related Skills
|
|
396
196
|
|
|
397
|
-
- `acceptance-criteria` - For writing testable AC
|
|
398
|
-
- `requirements-gathering` - For source requirements
|
|
399
|
-
- `prd-validation` - For validating the PRD
|
|
400
|
-
- `unit-writing` - For documenting units referenced in PRD
|