@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.
Files changed (37) hide show
  1. package/package.json +1 -1
  2. package/src/build-info.json +2 -2
  3. package/src/opencode/skills/acceptance-criteria/SKILL.md +58 -176
  4. package/src/opencode/skills/architecture-design/SKILL.md +86 -576
  5. package/src/opencode/skills/archiving/SKILL.md +60 -140
  6. package/src/opencode/skills/coding-standards/SKILL.md +113 -434
  7. package/src/opencode/skills/coding-standards/what-to-document.md +512 -0
  8. package/src/opencode/skills/database-design/SKILL.md +94 -778
  9. package/src/opencode/skills/database-design/indexing.md +187 -0
  10. package/src/opencode/skills/database-design/migrations.md +239 -0
  11. package/src/opencode/skills/database-design/schema-design.md +319 -0
  12. package/src/opencode/skills/doc-todo/SKILL.md +35 -27
  13. package/src/opencode/skills/epic-writing/SKILL.md +156 -244
  14. package/src/opencode/skills/epic-writing/template.md +11 -1
  15. package/src/opencode/skills/methodologies/SKILL.md +91 -354
  16. package/src/opencode/skills/methodologies/define.md +336 -0
  17. package/src/opencode/skills/methodologies/diagnose.md +374 -0
  18. package/src/opencode/skills/methodologies/empathize.md +253 -0
  19. package/src/opencode/skills/methodologies/ideate.md +458 -0
  20. package/src/opencode/skills/prd-writing/SKILL.md +162 -366
  21. package/src/opencode/skills/prd-writing/template.md +178 -48
  22. package/src/opencode/skills/requirements-gathering/SKILL.md +102 -117
  23. package/src/opencode/skills/requirements-gathering/template.md +97 -17
  24. package/src/opencode/skills/sprint-planning/SKILL.md +76 -225
  25. package/src/opencode/skills/sprint-planning/template.yaml +8 -0
  26. package/src/opencode/skills/story-writing/SKILL.md +76 -210
  27. package/src/opencode/skills/story-writing/template.md +10 -1
  28. package/src/opencode/skills/test-design/SKILL.md +78 -84
  29. package/src/opencode/skills/test-design/test-strategy.md +279 -0
  30. package/src/opencode/skills/test-design/unit-tests-mocking.md +247 -0
  31. package/src/opencode/skills/test-design/unit-tests-patterns.md +181 -0
  32. package/src/opencode/skills/test-design/unit-tests.md +117 -0
  33. package/src/opencode/skills/unit-writing/SKILL.md +119 -377
  34. package/src/opencode/skills/module-documentation/SKILL.md +0 -224
  35. package/src/opencode/skills/module-documentation/template.md +0 -139
  36. /package/src/opencode/skills/test-design/{template-integration.md → templates/template-integration.md} +0 -0
  37. /package/src/opencode/skills/test-design/{template-module.md → templates/template-module.md} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfanion/workflow",
3
- "version": "4.38.4-dev.1",
3
+ "version": "4.39.0-dev.0",
4
4
  "description": "Initialize OpenCode Workflow system for AI-assisted development with semantic code search",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "4.38.4-dev.1",
3
- "buildDate": "2026-01-28T14:53:02.088Z",
2
+ "version": "4.39.0-dev.0",
3
+ "buildDate": "2026-01-28T23:02:57.835Z",
4
4
  "files": [
5
5
  ".gitignore",
6
6
  "config.yaml",
@@ -1,132 +1,71 @@
1
1
  ---
2
2
  name: acceptance-criteria
3
- description: Use when writing testable acceptance criteria in Given/When/Then format
3
+ description: Write testable acceptance criteria in Given/When/Then (Gherkin) format for stories, epics, and features. Use when defining acceptance criteria, writing test scenarios, or when user mentions "acceptance criteria", "Given/When/Then", "Gherkin", "test scenarios", or "AC".
4
4
  license: MIT
5
5
  compatibility: opencode
6
6
  metadata:
7
- domain: quality-assurance
7
+ domain: agile
8
8
  format: gherkin
9
9
  ---
10
10
 
11
11
  # Acceptance Criteria Writing Skill
12
12
 
13
- ## When to Use
14
-
15
- Use this skill when you need to:
16
- - Write acceptance criteria for FRs in PRD
17
- - Write AC for epics and stories
18
- - Define testable behavior specifications
19
- - Create QA test scenarios
20
-
21
- ## Given/When/Then Format
22
-
23
- ### Structure
24
-
25
- ```gherkin
26
- Given [precondition/context]
27
- When [action/trigger]
28
- Then [expected outcome]
29
- And [additional outcome]
30
- ```
31
-
32
- ### Example
33
-
34
- ```gherkin
35
- AC1: Successful product creation
36
- Given a merchant is authenticated
37
- And the merchant has permission to create products
38
- When the merchant submits a valid product with:
39
- - name: "Test Product"
40
- - price: 100.00 UAH
41
- - SKU: "TEST-001"
42
- Then a new product is created with status "pending"
43
- And the product is assigned a unique ID
44
- And an event "product.created" is published
13
+ ```xml
14
+ <acceptance_criteria>
15
+ <definition>Write testable AC in Given/When/Then format</definition>
16
+
17
+ <format>
18
+ <given>Precondition/context</given>
19
+ <when>Action/trigger</when>
20
+ <then>Expected outcome</then>
21
+ <and>Additional outcomes</and>
22
+ </format>
23
+
24
+ <quality>
25
+ <testable>Can be verified as pass/fail</testable>
26
+ <independent>No execution order dependency</independent>
27
+ <specific>Exact expected behavior</specific>
28
+ <complete>Covers one complete scenario</complete>
29
+ </quality>
30
+
31
+ <types>
32
+ <happy_path>Normal, successful flow</happy_path>
33
+ <edge_case>Boundary conditions (min/max/empty)</edge_case>
34
+ <error_case>Invalid input, failures, no side effects</error_case>
35
+ <security>AuthN/AuthZ, 403 Forbidden</security>
36
+ <performance>NFR with measurable metrics (e.g., &lt;200ms p95)</performance>
37
+ </types>
38
+
39
+ <depth_by_artifact>
40
+ <prd>High-level checklist (Merchant can create product, Validation works)</prd>
41
+ <epic>Feature-level checklist (All CRUD works, Events published, Coverage >80%)</epic>
42
+ <story>Detailed Given/When/Then for each scenario (AC1, AC2, AC3...)</story>
43
+ </depth_by_artifact>
44
+
45
+ <common_mistakes>
46
+ <vague>Too vague → Define exact behavior</vague>
47
+ <multiple_scenarios>Split into separate ACs</multiple_scenarios>
48
+ <implementation>Focus on WHAT, not HOW</implementation>
49
+ <missing_errors>Always include negative scenarios</missing_errors>
50
+ <no_metrics>Use measurable outcomes (&lt;200ms, not "fast")</no_metrics>
51
+ </common_mistakes>
52
+
53
+ <templates>
54
+ <crud>
55
+ <create>Given valid data, When POST, Then 201 Created</create>
56
+ <read>Given existing ID, When GET, Then 200 OK</read>
57
+ <update>Given existing ID, When PUT, Then 200 OK</update>
58
+ <delete>Given existing ID, When DELETE, Then 204 No Content</delete>
59
+ </crud>
60
+ <validation>Given invalid field, When create/update, Then 400 Bad Request</validation>
61
+ <authorization>Given user with role, When accessing resource, Then allowed/denied</authorization>
62
+ </templates>
63
+ </acceptance_criteria>
45
64
  ```
46
65
 
47
- ## AC Quality Checklist
48
-
49
- Each acceptance criterion must be:
50
- - [ ] **Testable** - Can be verified as pass/fail
51
- - [ ] **Independent** - Doesn't depend on other AC execution order
52
- - [ ] **Specific** - Exact expected behavior, not vague
53
- - [ ] **Complete** - Covers one complete scenario
54
-
55
- ## Types of Acceptance Criteria
56
-
57
- ### 1. Happy Path AC
58
- Normal, successful flow.
59
-
60
- ```gherkin
61
- Given valid input
62
- When action performed
63
- Then success result
64
- ```
65
-
66
- ### 2. Edge Case AC
67
- Boundary conditions.
68
-
69
- ```gherkin
70
- Given input at boundary (min/max/empty)
71
- When action performed
72
- Then appropriate handling
73
- ```
74
-
75
- ### 3. Error Case AC
76
- Invalid input or failure scenarios.
77
-
78
- ```gherkin
79
- Given invalid input
80
- When action attempted
81
- Then error returned with message
82
- And no side effects occur
83
- ```
84
-
85
- ### 4. Security AC
86
- Authorization and authentication.
87
-
88
- ```gherkin
89
- Given user without permission
90
- When action attempted
91
- Then access denied (403)
92
- ```
93
-
94
- ### 5. Performance AC
95
- Non-functional behavior.
96
-
97
- ```gherkin
98
- Given 1000 concurrent requests
99
- When action performed
100
- Then response time < 200ms p95
101
- ```
102
-
103
- ## AC for Different Artifacts
104
-
105
- ### PRD Level (High-level)
106
-
107
- ```markdown
108
- ## FR-001: Product Creation
109
-
110
- **Acceptance Criteria:**
111
- - [ ] Merchant can create product with required fields
112
- - [ ] Product validation rejects invalid data
113
- - [ ] Created product appears in product list
114
- - [ ] Product creation event is published
115
- ```
116
-
117
- ### Epic Level (Feature-level)
118
-
119
- ```markdown
120
- ## Acceptance Criteria
121
-
122
- - [ ] All CRUD operations for products work
123
- - [ ] Validation rules are enforced
124
- - [ ] Events are published for all state changes
125
- - [ ] API follows REST conventions
126
- - [ ] Unit test coverage > 80%
127
- ```
66
+ ---
128
67
 
129
- ### Story Level (Detailed)
68
+ ## Example: Story-Level AC
130
69
 
131
70
  ```markdown
132
71
  ## Acceptance Criteria
@@ -137,7 +76,7 @@ Then response time < 200ms p95
137
76
  **Then** 201 Created returned
138
77
  **And** product has generated UUID
139
78
  **And** product status is "pending"
140
- **And** "product.created" event published to Kafka
79
+ **And** "product.created" event published
141
80
 
142
81
  ### AC2: Reject invalid product data
143
82
  **Given** authenticated merchant
@@ -147,66 +86,9 @@ Then response time < 200ms p95
147
86
  **And** no product is created
148
87
 
149
88
  ### AC3: Reject unauthorized access
150
- **Given** authenticated user without "product:create" permission
89
+ **Given** user without "product:create" permission
151
90
  **When** POST /api/v1/products
152
91
  **Then** 403 Forbidden returned
153
92
  ```
154
93
 
155
- ## Common Mistakes to Avoid
156
-
157
- 1. **Too vague**: "System works correctly" → Define WHAT "correctly" means
158
- 2. **Multiple scenarios in one AC**: Split into separate ACs
159
- 3. **Implementation details**: "Use PostgreSQL" → Focus on WHAT, not HOW
160
- 4. **Missing error cases**: Always include negative scenarios
161
- 5. **No measurable outcome**: "Fast response" → "< 200ms"
162
-
163
- ## AC Templates
164
-
165
- ### CRUD Operations
166
-
167
- ```gherkin
168
- # Create
169
- Given valid [entity] data
170
- When POST /api/v1/[entities]
171
- Then 201 Created with [entity] details
172
-
173
- # Read
174
- Given existing [entity] with ID
175
- When GET /api/v1/[entities]/{id}
176
- Then 200 OK with [entity] details
177
-
178
- # Update
179
- Given existing [entity] with ID
180
- When PUT /api/v1/[entities]/{id} with updates
181
- Then 200 OK with updated [entity]
182
-
183
- # Delete
184
- Given existing [entity] with ID
185
- When DELETE /api/v1/[entities]/{id}
186
- Then 204 No Content
187
- And [entity] no longer retrievable
188
- ```
189
-
190
- ### Validation
191
-
192
- ```gherkin
193
- Given [entity] with invalid [field]
194
- When create/update attempted
195
- Then 400 Bad Request
196
- And error identifies [field] and reason
197
- ```
198
-
199
- ### Authorization
200
-
201
- ```gherkin
202
- Given user with role [role]
203
- When accessing [resource]
204
- Then [allowed/denied] based on permissions
205
- ```
206
-
207
- ## Related Skills
208
-
209
- - `story-writing` - For complete user stories
210
- - `epic-writing` - For epic-level AC
211
- - `prd-writing` - For FR-level AC
212
- - `integration-testing` - For test implementation
94
+ See `template.md` for full format.