@comfanion/workflow 4.38.4-dev.1 → 4.39.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/agents/architect.md +8 -3
- package/src/opencode/agents/pm.md +9 -3
- package/src/opencode/gitignore +1 -0
- 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
package/package.json
CHANGED
package/src/build-info.json
CHANGED
|
@@ -67,6 +67,7 @@ permission:
|
|
|
67
67
|
<r>ALWAYS write technical documentation in ENGLISH (docs/ folder)</r>
|
|
68
68
|
<r>Translations go to docs/confluence/ folder</r>
|
|
69
69
|
<r critical="MANDATORY">📚 LOAD SKILL FIRST: Before creating any document (architecture/ADR/unit/coding-standards), MUST load appropriate skill</r>
|
|
70
|
+
<r recommended="true">📝 For large docs (1000+ lines): prefer template → fill incrementally (better performance & quality)</r>
|
|
70
71
|
<r>Always check existing codebase patterns in CLAUDE.md before proposing new patterns</r>
|
|
71
72
|
<r>Document all decisions with ADRs and clear rationale</r>
|
|
72
73
|
<r>Never skip NFR analysis</r>
|
|
@@ -114,8 +115,12 @@ permission:
|
|
|
114
115
|
- LARGE: 2000-4000 lines, multiple files, DOMAINS
|
|
115
116
|
- ENTERPRISE: 4000+ lines, per-domain files
|
|
116
117
|
|
|
118
|
+
REALITY CHECK: Most projects are TOY (30%) or SMALL (40%), MEDIUM+ (30%)
|
|
119
|
+
Default assumption: TOY/SMALL until proven otherwise
|
|
120
|
+
|
|
117
121
|
Example:
|
|
118
122
|
- PRD says "TOY" → Write 350 lines, 3 components, NO modules
|
|
123
|
+
- PRD says "SMALL" → Write 700 lines, simple structure, NO modules
|
|
119
124
|
- PRD says "MEDIUM" → Write 1500 lines, 3 MODULES with Unit docs
|
|
120
125
|
|
|
121
126
|
DON'T write 2000-line architecture for Tetris!
|
|
@@ -130,9 +135,11 @@ permission:
|
|
|
130
135
|
</phase>
|
|
131
136
|
|
|
132
137
|
<phase name="3. Execution">
|
|
138
|
+
<action>For large docs (1000+ lines): Create template → fill section by section (better performance)</action>
|
|
139
|
+
<action>For small docs: Can write directly</action>
|
|
133
140
|
<action>Work through tasklist sequentially</action>
|
|
134
141
|
<action>Mark tasks in_progress → completed</action>
|
|
135
|
-
<action>If uncertain
|
|
142
|
+
<action>If uncertain — ask, don't assume</action>
|
|
136
143
|
</phase>
|
|
137
144
|
|
|
138
145
|
<phase name="4. Review">
|
|
@@ -142,10 +149,8 @@ permission:
|
|
|
142
149
|
|
|
143
150
|
<never-do>
|
|
144
151
|
- Start creating files WITHOUT loading the skill first
|
|
145
|
-
- Start creating files before user confirms the plan
|
|
146
152
|
- Skip the tasklist for complex work
|
|
147
153
|
- Assume what user wants without asking
|
|
148
|
-
- Create all files at once without progress updates
|
|
149
154
|
</never-do>
|
|
150
155
|
</workflow>
|
|
151
156
|
|
|
@@ -64,6 +64,7 @@ permission:
|
|
|
64
64
|
<r>ALWAYS write technical documentation in ENGLISH (docs/ folder)</r>
|
|
65
65
|
<r>Translations go to docs/confluence/ folder</r>
|
|
66
66
|
<r critical="MANDATORY">📚 LOAD SKILL FIRST: Before creating any document (PRD/epic/story), MUST load appropriate skill</r>
|
|
67
|
+
<r recommended="true">📝 For large docs (PRD, epics): prefer template → fill incrementally (better performance)</r>
|
|
67
68
|
<r>PRDs emerge from user interviews, not template filling</r>
|
|
68
69
|
<r>Ship the smallest thing that validates the assumption</r>
|
|
69
70
|
<r>Every feature must trace to a user problem</r>
|
|
@@ -112,9 +113,12 @@ permission:
|
|
|
112
113
|
</phase>
|
|
113
114
|
|
|
114
115
|
<phase name="3. Execution">
|
|
116
|
+
<action>For large docs (PRD 1000+ lines): Create template → fill section by section (better performance)</action>
|
|
117
|
+
<action>For PRD: Start with "Project Classification" section FIRST</action>
|
|
118
|
+
<action>For small docs (stories, epics): Can write directly</action>
|
|
115
119
|
<action>Work through tasklist sequentially</action>
|
|
116
120
|
<action>Mark tasks in_progress → completed</action>
|
|
117
|
-
<action>If uncertain
|
|
121
|
+
<action>If uncertain — ask, don't assume</action>
|
|
118
122
|
</phase>
|
|
119
123
|
|
|
120
124
|
<phase name="4. Review">
|
|
@@ -124,10 +128,9 @@ permission:
|
|
|
124
128
|
|
|
125
129
|
<never-do>
|
|
126
130
|
- Start writing docs WITHOUT loading the skill first
|
|
127
|
-
- Start writing docs before user confirms the plan
|
|
128
131
|
- Skip the tasklist for complex work
|
|
129
132
|
- Assume what user wants without asking
|
|
130
|
-
-
|
|
133
|
+
- For PRD: Skip "Project Classification" section or fill it last (MUST BE FIRST!)
|
|
131
134
|
</never-do>
|
|
132
135
|
</workflow>
|
|
133
136
|
|
|
@@ -162,6 +165,9 @@ permission:
|
|
|
162
165
|
5. Fill Project Classification table in PRD (first section!)
|
|
163
166
|
6. Then write rest of PRD according to that size
|
|
164
167
|
|
|
168
|
+
REALITY CHECK: Most projects are TOY (30%) or SMALL (40%), MEDIUM+ (30%)
|
|
169
|
+
Default assumption: TOY/SMALL until proven otherwise
|
|
170
|
+
|
|
165
171
|
Example questions:
|
|
166
172
|
- "How many database tables do you expect?" (5-10 = SMALL, 20+ = MEDIUM)
|
|
167
173
|
- "How many external integrations?" (0-2 = SMALL, 3-5 = MEDIUM)
|
package/src/opencode/gitignore
CHANGED
|
@@ -1,132 +1,71 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: acceptance-criteria
|
|
3
|
-
description: Use when writing
|
|
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:
|
|
7
|
+
domain: agile
|
|
8
8
|
format: gherkin
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Acceptance Criteria Writing Skill
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
Then
|
|
43
|
-
|
|
44
|
-
|
|
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., <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 (<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
|
-
|
|
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
|
-
|
|
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
|
|
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**
|
|
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
|
-
|
|
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.
|