@comfanion/workflow 4.38.4-dev.0 → 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.
Files changed (38) hide show
  1. package/bin/cli.js +52 -529
  2. package/package.json +1 -1
  3. package/src/build-info.json +2 -2
  4. package/src/opencode/skills/acceptance-criteria/SKILL.md +58 -176
  5. package/src/opencode/skills/architecture-design/SKILL.md +86 -576
  6. package/src/opencode/skills/archiving/SKILL.md +60 -140
  7. package/src/opencode/skills/coding-standards/SKILL.md +113 -434
  8. package/src/opencode/skills/coding-standards/what-to-document.md +512 -0
  9. package/src/opencode/skills/database-design/SKILL.md +94 -778
  10. package/src/opencode/skills/database-design/indexing.md +187 -0
  11. package/src/opencode/skills/database-design/migrations.md +239 -0
  12. package/src/opencode/skills/database-design/schema-design.md +319 -0
  13. package/src/opencode/skills/doc-todo/SKILL.md +35 -27
  14. package/src/opencode/skills/epic-writing/SKILL.md +156 -244
  15. package/src/opencode/skills/epic-writing/template.md +11 -1
  16. package/src/opencode/skills/methodologies/SKILL.md +91 -354
  17. package/src/opencode/skills/methodologies/define.md +336 -0
  18. package/src/opencode/skills/methodologies/diagnose.md +374 -0
  19. package/src/opencode/skills/methodologies/empathize.md +253 -0
  20. package/src/opencode/skills/methodologies/ideate.md +458 -0
  21. package/src/opencode/skills/prd-writing/SKILL.md +162 -366
  22. package/src/opencode/skills/prd-writing/template.md +178 -48
  23. package/src/opencode/skills/requirements-gathering/SKILL.md +102 -117
  24. package/src/opencode/skills/requirements-gathering/template.md +97 -17
  25. package/src/opencode/skills/sprint-planning/SKILL.md +76 -225
  26. package/src/opencode/skills/sprint-planning/template.yaml +8 -0
  27. package/src/opencode/skills/story-writing/SKILL.md +76 -210
  28. package/src/opencode/skills/story-writing/template.md +10 -1
  29. package/src/opencode/skills/test-design/SKILL.md +78 -84
  30. package/src/opencode/skills/test-design/test-strategy.md +279 -0
  31. package/src/opencode/skills/test-design/unit-tests-mocking.md +247 -0
  32. package/src/opencode/skills/test-design/unit-tests-patterns.md +181 -0
  33. package/src/opencode/skills/test-design/unit-tests.md +117 -0
  34. package/src/opencode/skills/unit-writing/SKILL.md +119 -377
  35. package/src/opencode/skills/module-documentation/SKILL.md +0 -224
  36. package/src/opencode/skills/module-documentation/template.md +0 -139
  37. /package/src/opencode/skills/test-design/{template-integration.md → templates/template-integration.md} +0 -0
  38. /package/src/opencode/skills/test-design/{template-module.md → templates/template-module.md} +0 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: epic-writing
3
- description: Use when creating epics from PRD with acceptance criteria and story breakdown
3
+ description: Create epics from PRD with acceptance criteria, story breakdown, and technical approach. Use when breaking down PRD into epics, defining feature areas, or when user mentions "epic", "feature breakdown", "epic creation", or "story grouping".
4
4
  license: MIT
5
5
  compatibility: opencode
6
6
  metadata:
@@ -10,278 +10,190 @@ metadata:
10
10
 
11
11
  # Epic Writing Skill
12
12
 
13
- ## When to Use
14
-
15
- Use this skill when you need to:
16
- - Create epics from PRD
17
- - Define epic scope and acceptance criteria
18
- - Plan stories within an epic
19
- - Track PRD requirement coverage
20
-
21
- ## Template
22
-
23
- Use template at: `@.opencode/skills/epic-writing/template.md`
24
-
25
- ## CRITICAL: What is an Epic?
26
-
27
- **Epic scope changes with project size!** Read PRD's Project Classification first.
28
-
29
- | Project Size | Epic = | Example | Stories |
30
- |--------------|--------|---------|---------|
31
- | **TOY** | Major feature | "Game Logic", "UI Rendering", "Scoring" | 3-8 tasks |
32
- | **SMALL** | Feature area | "User Authentication", "Post Management" | 5-12 tasks |
33
- | **MEDIUM** | **Module/Unit** | "Order Management Module", "Payment Module" | 8-15 features |
34
- | **LARGE** | **Domain** | "Order Domain", "Payment Domain" | 10-20 features |
35
- | **ENTERPRISE** | **Bounded Context** | "Core Banking Context" | 15-30 features |
36
-
37
- **For MEDIUM+ projects:**
38
- - Each Epic = One Module from PRD
39
- - Epic should reference Unit documentation: `→ Unit: docs/units/order-management/`
40
- - Stories within epic are features of that module
41
- - Epic owns a set of FRs (e.g., FR-ORD-001 through FR-ORD-015)
42
-
43
- **Example - MEDIUM E-commerce:**
44
- ```
45
- Epic: Order Management Module
46
- → Unit: docs/units/order-management/
47
- → FRs: FR-ORD-001 to FR-ORD-012
48
- Stories:
49
- - Customer can create order
50
- - System validates inventory
51
- - Order status workflow
52
- - Order history view
53
- ...
54
- ```
55
-
56
- **Example - TOY Tetris:**
57
- ```
58
- Epic: Game Logic
59
- Stories:
60
- - Implement block rotation
61
- - Add collision detection
62
- - Clear full lines
63
- - Increase fall speed
64
- → No Unit docs needed
65
- → Simple AC: "Game logic works correctly"
66
- ```
67
-
68
- **Example - SMALL Blog:**
69
- ```
70
- Epic: Post Management
71
- Stories:
72
- - User can create post
73
- - User can edit post
74
- - User can delete post
75
- - User can publish/unpublish
76
- - Posts show in list
77
- → No Unit docs (flat structure)
78
- → AC: "Users can manage posts through full lifecycle"
13
+ ```xml
14
+ <epic_writing>
15
+ <definition>Epic = Group of stories forming complete feature/module</definition>
16
+
17
+ <scope_by_project_size>
18
+ <TOY scope="Major feature" stories="3-8" size="S"/>
19
+ <SMALL scope="Feature area" stories="5-12" size="M"/>
20
+ <MEDIUM scope="Module/Unit" stories="8-15" size="L"/>
21
+ <LARGE scope="Domain" stories="10-20" size="XL"/>
22
+ <ENTERPRISE scope="Bounded Context" stories="15-30" size="XXL"/>
23
+ </scope_by_project_size>
24
+
25
+ <vertical_slice>
26
+ <principle>Epic = Complete vertical slice (all layers)</principle>
27
+ <layers>Domain Repository Use Cases API UI → Tests</layers>
28
+ <result>Working module (demo-ready)</result>
29
+ </vertical_slice>
30
+
31
+ <status_values>
32
+ <todo>Not started</todo>
33
+ <in_progress>Work ongoing</in_progress>
34
+ <review>All stories done, under review</review>
35
+ <done>Completed and merged</done>
36
+ </status_values>
37
+
38
+ <estimation>
39
+ <t_shirt for="TOY,SMALL,MEDIUM,LARGE">S, M, L, XL</t_shirt>
40
+ <t_shirt_plus_points for="ENTERPRISE">
41
+ <mapping S="8-13" M="13-21" L="21-34" XL="34-55" XXL="55+"/>
42
+ <calculate>Sum of story points</calculate>
43
+ </t_shirt_plus_points>
44
+ </estimation>
45
+
46
+ <depth_by_size>
47
+ <TOY>
48
+ <overview>Simple (1-2 paragraphs)</overview>
49
+ <units>Not needed</units>
50
+ <ac>Simple checklist</ac>
51
+ <stories>Bullet points</stories>
52
+ <increment>"Feature works"</increment>
53
+ </TOY>
54
+
55
+ <MEDIUM>
56
+ <overview>Detailed with business value</overview>
57
+ <units>References Unit docs</units>
58
+ <ac>Comprehensive</ac>
59
+ <stories>Table with dependencies</stories>
60
+ <technical_decisions>With ADR links</technical_decisions>
61
+ <risks>Identified</risks>
62
+ <increment>"Module works end-to-end"</increment>
63
+ </MEDIUM>
64
+
65
+ <ENTERPRISE>
66
+ <overview>Complete with strategic context</overview>
67
+ <units>Multiple Units (cross-domain)</units>
68
+ <ac>Exhaustive with compliance</ac>
69
+ <stories>With estimates and confidence</stories>
70
+ <technical_decisions>All documented</technical_decisions>
71
+ <risks>With mitigation plans</risks>
72
+ <security>Considerations included</security>
73
+ <increment>"Domain slice works"</increment>
74
+ </ENTERPRISE>
75
+ </depth_by_size>
76
+
77
+ <header_fields>
78
+ <id>{{PREFIX}}-E{{N}}</id>
79
+ <status>backlog | ready | in_progress | done</status>
80
+ <priority>P0 | P1</priority>
81
+ <size>S | M | L | XL | XXL</size>
82
+ <estimate>Optional: ENTERPRISE only (story points total)</estimate>
83
+ <sprint>{{sprint}}</sprint>
84
+ </header_fields>
85
+
86
+ <structure>
87
+ <overview>What epic delivers, business value, scope</overview>
88
+ <units_affected>Table: Unit | Changes | Impact</units_affected>
89
+ <dependencies>Table: Type | Item | Why</dependencies>
90
+ <prd_coverage>Table: FR | Requirement | Notes</prd_coverage>
91
+ <acceptance_criteria>Checklist defining "working increment"</acceptance_criteria>
92
+ <stories>Table: ID | Title | Size | Focus | Status</stories>
93
+ <technical_decisions>Table: Decision | Rationale | ADR</technical_decisions>
94
+ <risks>Table: Risk | Impact | Mitigation</risks>
95
+ <references>Links to PRD, Architecture, Units</references>
96
+ </structure>
97
+
98
+ <story_order>
99
+ <step n="1">Domain layer (entities, value objects)</step>
100
+ <step n="2">Repository interfaces</step>
101
+ <step n="3">Use cases</step>
102
+ <step n="4">Repository implementations</step>
103
+ <step n="5">HTTP handlers</step>
104
+ <step n="6">Integration tests</step>
105
+ </story_order>
106
+
107
+ <naming>
108
+ <file>epic-[NN]-[description].md</file>
109
+ <id>[PREFIX]-E[NN]</id>
110
+ <examples>
111
+ <file>epic-01-task-management.md</file>
112
+ <id>TASK-E01</id>
113
+ </examples>
114
+ </naming>
115
+
116
+ <traceability>
117
+ <after_epic_creation>Update requirements.md with Epic column</after_epic_creation>
118
+ <format>→ Epic: `epic-01-task-crud.md`</format>
119
+ </traceability>
120
+
121
+ <reference_format>
122
+ <unit>→ Unit: `Task`</unit>
123
+ <fr>→ FR: `FR-001`</fr>
124
+ <adr>→ ADR: `ADR-001`</adr>
125
+ <prd>→ PRD: `docs/prd.md`</prd>
126
+ </reference_format>
127
+
128
+ <output>
129
+ <sprint>docs/sprint-artifacts/sprint-[N]/epic-[NN]-[description].md</sprint>
130
+ <backlog>docs/sprint-artifacts/backlog/epic-[NN]-[description].md</backlog>
131
+ </output>
132
+ </epic_writing>
79
133
  ```
80
134
 
81
135
  ---
82
136
 
83
- ## Epic Depth by Project Size
84
-
85
- **CRITICAL:** Epic structure changes with project size!
86
-
87
- **TOY/SMALL:**
88
- - Simple overview (1-2 paragraphs)
89
- - No Units Affected section (no modules)
90
- - Simple AC checklist
91
- - Stories listed as bullet points
92
- - No Technical Decisions section
93
- - No Risks section
94
-
95
- **MEDIUM:**
96
- - Detailed overview with business value
97
- - **Units Affected section** (references Unit docs)
98
- - Comprehensive AC
99
- - Stories in table with dependencies
100
- - Technical Decisions with ADR links
101
- - Risks identified
102
-
103
- **LARGE/ENTERPRISE:**
104
- - Complete overview with strategic context
105
- - **Multiple Units Affected** (cross-domain)
106
- - Exhaustive AC with compliance
107
- - Stories with estimates and confidence levels
108
- - All Technical Decisions documented
109
- - Risks with mitigation plans
110
- - Security considerations
111
-
112
- ## Epic Structure (v2)
113
-
114
- ### 1. Header
137
+ ## Example: MEDIUM Project Epic
115
138
 
116
139
  ```yaml
117
- id: {{PREFIX}}-E{{N}}
118
- status: backlog | ready | in_progress | done
119
- priority: P0 | P1
120
- sprint: {{sprint}}
140
+ id: ORD-E01
141
+ status: in_progress
142
+ priority: P0
143
+ size: L
144
+ sprint: sprint-1
121
145
  ```
122
146
 
123
- ### 2. Overview
124
-
125
- Prose section with:
126
- - What epic delivers (bold the outcome)
127
- - Business value
128
- - Scope (included)
129
- - Not included
147
+ # Epic: Order Management Module
130
148
 
131
- ```markdown
132
149
  ## Overview
133
150
 
134
- This epic delivers **complete task management** for team members. When complete, users will be able to create, assign, and track tasks.
151
+ This epic delivers **complete order management** for e-commerce platform. When complete, users will be able to create, view, update, and track orders through full lifecycle.
135
152
 
136
153
  **Business Value:** Core functionality for MVP launch
137
154
 
138
155
  **Scope:**
139
- - Task CRUD
140
- - Assignments
141
- - Status workflow
156
+ - Order CRUD operations
157
+ - Order status workflow
158
+ - Inventory validation
159
+ - Order history
142
160
 
143
161
  **Not Included:**
144
- - Recurring tasks (Growth)
145
- ```
162
+ - Recurring orders (Growth phase)
163
+ - Bulk order import (Enterprise)
146
164
 
147
- ### 3. Units Affected
165
+ ## Units Affected
148
166
 
149
167
  | Unit | Changes | Impact |
150
168
  |------|---------|--------|
151
- | → Unit: `Task` | Create | New entity |
152
- | → Unit: `User` | Modify | Add relation |
153
-
154
- ### 4. Dependencies
169
+ | → Unit: `Order` | Create | New domain entity |
170
+ | → Unit: `Inventory` | Modify | Add reservation logic |
155
171
 
156
- | Type | Item | Why |
157
- |------|------|-----|
158
- | **Requires** | Auth system | Users must exist |
159
- | **Enables** | Notifications epic | Triggers on assignment |
172
+ ## Acceptance Criteria
160
173
 
161
- ### 5. PRD Coverage
162
-
163
- | FR | Requirement | Notes |
164
- |----|-------------|-------|
165
- | FR: `FR-001` | Create task | Core feature |
166
- | → FR: `FR-002` | Assign task | |
167
-
168
- ### 6. Acceptance Criteria
169
-
170
- Checklist format:
171
- - [ ] User can create task
172
- - [ ] User can assign task
174
+ - [ ] **Increment ready:** Order Management module works end-to-end
175
+ - [ ] Users can create orders via UI
176
+ - [ ] Orders validate against inventory
177
+ - [ ] Order status workflow implemented
178
+ - [ ] Integration tests pass (Order Inventory)
173
179
  - [ ] All stories completed
174
- - [ ] Tests pass (>80%)
175
- - [ ] Documentation updated
176
-
177
- ### 7. Stories
180
+ - [ ] Tests pass (>80% coverage)
181
+ - [ ] API documented
182
+ - [ ] **Demo-ready:** Can show to stakeholders
178
183
 
179
- Table + dependency diagram:
184
+ ## Stories
180
185
 
181
186
  | ID | Title | Size | Focus | Status |
182
187
  |----|-------|------|-------|--------|
183
- | S01-01 | Task Domain | M | → Unit: `Task` | ⬜ |
184
- | S01-02 | Task Repository | M | → Unit: `Task` | ⬜ |
185
-
186
- **Size Guide:** Prefer S→M or M. (S=2-4 tasks, M=4-8 tasks, L=8+ tasks)
187
-
188
- ```
189
- S01 ──► S02 ──► S03
190
- ```
191
-
192
- ### 8. Technical Decisions
193
-
194
- | Decision | Rationale | ADR |
195
- |----------|-----------|-----|
196
- | UUID for IDs | Distributed generation | → ADR: `ADR-001` |
197
-
198
- ### 9. Risks
199
-
200
- | Risk | Impact | Mitigation |
201
- |------|--------|------------|
202
- | Complex validation | M | Start simple, iterate |
203
-
204
- ### 10. References
205
-
206
- ```
207
- → PRD: `docs/prd.md`
208
- → Architecture: `docs/architecture.md`
209
- → Unit: `Task`
210
- ```
211
-
212
- ## Reference Format
213
-
214
- Always use `→` prefix:
215
-
216
- ```markdown
217
- → Unit: `Task`
218
- → FR: `FR-001`
219
- → ADR: `ADR-001`
220
- → PRD: `docs/prd.md`
221
- ```
222
-
223
- ## Story Planning
224
-
225
- ### Story Order
226
-
227
- Recommended order within epic:
228
- 1. Domain layer (entities, value objects)
229
- 2. Repository interfaces
230
- 3. Use cases
231
- 4. Repository implementations
232
- 5. HTTP handlers
233
- 6. Integration tests
234
-
235
- ### Story Focus
236
-
237
- Each story should focus on one unit:
238
-
239
- | ID | Title | Focus |
240
- |----|-------|-------|
241
- | S01-01 | Task Domain | → Unit: `Task` |
242
- | S01-02 | Task Repository | → Unit: `Task` |
243
-
244
- ## Naming Conventions
245
-
246
- ### File Names
247
-
248
- ```
249
- epic-[NN]-[description].md
250
-
251
- Examples:
252
- - epic-01-task-management.md
253
- - epic-02-user-auth.md
254
- ```
255
-
256
- ### Epic IDs
188
+ | ORD-S01-01 | Order Domain | M | → Unit: `Order` | ⬜ |
189
+ | ORD-S01-02 | Order Repository | M | → Unit: `Order` | ⬜ |
190
+ | ORD-S01-03 | Create Order Use Case | M | → Unit: `Order` | ⬜ |
191
+ | ORD-S01-04 | Order API | M | Unit: `Order` | ⬜ |
192
+ | ORD-S01-05 | Order UI | M | → Unit: `Order` | ⬜ |
193
+ | ORD-S01-06 | Integration Tests | S | All | ⬜ |
257
194
 
258
195
  ```
259
- [PREFIX]-E[NN]
260
-
261
- Examples:
262
- - TASK-E01
263
- - AUTH-E02
196
+ S01 ──► S02 ──► S03 ──► S04 ──► S05 ──► S06
264
197
  ```
265
198
 
266
- ## Validation Checklist
267
-
268
- - [ ] Overview explains what and why
269
- - [ ] Units affected listed with `→ Unit:` format
270
- - [ ] All FRs from scope are listed with `→ FR:` format
271
- - [ ] Acceptance criteria are measurable
272
- - [ ] Stories have dependency order
273
- - [ ] Technical decisions link to ADRs
274
- - [ ] Uses `→` reference format throughout
275
-
276
- ## Output
277
-
278
- Save to: `docs/sprint-artifacts/sprint-[N]/epic-[NN]-[description].md`
279
-
280
- Or backlog: `docs/sprint-artifacts/backlog/epic-[NN]-[description].md`
281
-
282
- ## Related Skills
283
-
284
- - `story-writing` - For creating stories
285
- - `prd-writing` - Source of requirements
286
- - `unit-writing` - For documenting affected units
287
- - `sprint-planning` - For organizing epics
199
+ See `template.md` for full format.
@@ -2,11 +2,21 @@
2
2
 
3
3
  ```yaml
4
4
  id: {{PREFIX}}-E{{N}}
5
- status: backlog | ready | in_progress | done
5
+ status: backlog | in_progress | review | done
6
6
  priority: P0 | P1
7
+ size: S | M | L | XL | XXL # Epic size (T-shirt)
8
+ estimate: {{points}} # Optional: Only for ENTERPRISE (sum of story points)
7
9
  sprint: {{sprint}}
8
10
  ```
9
11
 
12
+ <!-- Size guide:
13
+ S (TOY): 3-8 stories
14
+ M (SMALL): 5-12 stories
15
+ L (MEDIUM): 8-15 stories
16
+ XL (LARGE): 10-20 stories
17
+ XXL (ENTERPRISE): 15-30 stories
18
+ -->
19
+
10
20
  ---
11
21
 
12
22
  ## Overview