@comfanion/workflow 4.39.2 → 4.39.3
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/analyst.md +2 -3
- package/src/opencode/agents/architect.md +95 -27
- package/src/opencode/agents/coder.md +88 -19
- package/src/opencode/agents/dev.md +177 -31
- package/src/opencode/agents/pm.md +34 -23
- package/src/opencode/agents/reviewer.md +7 -8
- package/src/opencode/skills/dev-epic/SKILL.md +9 -1
- package/src/opencode/skills/dev-sprint/SKILL.md +9 -3
- package/src/opencode/skills/dev-story/SKILL.md +175 -25
- package/src/opencode/skills/epic-writing/SKILL.md +41 -18
- package/src/opencode/skills/story-writing/SKILL.md +144 -80
|
@@ -16,58 +16,105 @@ metadata:
|
|
|
16
16
|
|
|
17
17
|
```xml
|
|
18
18
|
<story_rules>
|
|
19
|
-
<before_writing critical="MANDATORY">
|
|
20
|
-
<action>Read template file first</action>
|
|
21
|
-
<path>./template.md</path>
|
|
22
|
-
<focus>Lines 103-158 for task Approach examples</focus>
|
|
23
|
-
</before_writing>
|
|
24
|
-
|
|
25
19
|
<definition>Story = Smallest working increment (one layer/feature)</definition>
|
|
26
20
|
|
|
27
21
|
<sizes>
|
|
28
|
-
<XS tasks="1-2" use="
|
|
29
|
-
<S tasks="2-
|
|
30
|
-
<M tasks="
|
|
31
|
-
<L tasks="8
|
|
32
|
-
<XL tasks="
|
|
22
|
+
<XS tasks="1-2" use="Trivial additions"/>
|
|
23
|
+
<S tasks="2-3" use="TOY, SMALL projects (PREFERRED)" target="true"/>
|
|
24
|
+
<M tasks="3-5" use="MEDIUM projects (PREFERRED)" target="true"/>
|
|
25
|
+
<L tasks="5-8" use="LARGE - only if feature is complex"/>
|
|
26
|
+
<XL tasks="8+" use="FORBIDDEN - must split into multiple stories" forbidden="true"/>
|
|
33
27
|
</sizes>
|
|
34
28
|
|
|
35
|
-
<
|
|
36
|
-
<
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
<feature_driven>
|
|
30
|
+
<definition>Story = ONE working feature end-to-end (thin vertical slice)</definition>
|
|
31
|
+
<principle>Each story delivers value users can see/test</principle>
|
|
32
|
+
<approach>
|
|
33
|
+
<step>1. Study existing code (MANDATORY - find patterns)</step>
|
|
34
|
+
<step>2. Write test for core functionality</step>
|
|
35
|
+
<step>3. Implement MINIMAL code (domain + repo + API if needed)</step>
|
|
36
|
+
<step>4. Verify it works end-to-end</step>
|
|
37
|
+
</approach>
|
|
38
|
+
<examples>
|
|
39
|
+
<good>"User can create simple order" → Order entity + CreateOrder API + test</good>
|
|
40
|
+
<good>"Order validates required fields" → Add validation logic + tests</good>
|
|
41
|
+
<good>"Order checks inventory" → Integration with inventory service + tests</good>
|
|
42
|
+
<bad>"Create domain layer" → No working feature, just entities</bad>
|
|
43
|
+
<bad>"Implement repository layer" → Can't test without use case</bad>
|
|
44
|
+
<bad>"All CRUD operations" → Too big, split into Create/Read/Update/Delete stories</bad>
|
|
45
|
+
</examples>
|
|
46
|
+
<result>After story: feature WORKS, is TESTED, can be DEMOED</result>
|
|
47
|
+
</feature_driven>
|
|
48
|
+
|
|
49
|
+
<task_composition>
|
|
50
|
+
<task n="1" type="study">Study existing code, design interfaces (if parallel planned)</task>
|
|
51
|
+
<task n="2" type="test">Write test for core functionality</task>
|
|
52
|
+
<task n="3" type="implement">Minimal implementation (domain + repo + API)</task>
|
|
53
|
+
<task n="4" type="verify">Integration test (if needed)</task>
|
|
54
|
+
<note>Most stories: 2-4 tasks. Prefer smaller stories over larger ones.</note>
|
|
55
|
+
</task_composition>
|
|
41
56
|
|
|
42
|
-
<
|
|
43
|
-
<
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
57
|
+
<task_approach_section critical="MANDATORY">
|
|
58
|
+
<rule>Each task MUST have "Approach" section with HIGH-LEVEL steps</rule>
|
|
59
|
+
<format>Numbered list of WHAT to do, NOT HOW (no code)</format>
|
|
60
|
+
<good_example>
|
|
61
|
+
1. Create Order struct with fields from Unit doc
|
|
62
|
+
2. Add NewOrder() constructor with validation
|
|
63
|
+
3. Add Validate() method
|
|
64
|
+
4. Write tests: valid order, empty fields, invalid status
|
|
65
|
+
</good_example>
|
|
66
|
+
<bad_example>
|
|
67
|
+
1. type Order struct { ID string; CustomerID string }
|
|
68
|
+
2. func NewOrder(id, customerID string) (*Order, error) { ... }
|
|
69
|
+
❌ This is CODE, not approach!
|
|
70
|
+
</bad_example>
|
|
71
|
+
<remember>Approach = WHAT steps to take. @dev transforms this to HOW (technical details) for @coder.</remember>
|
|
72
|
+
</task_approach_section>
|
|
55
73
|
|
|
56
|
-
<
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
<
|
|
60
|
-
<
|
|
61
|
-
<
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
74
|
+
<test_strategy critical="MANDATORY">
|
|
75
|
+
<principle>Test CORE functionality first, expand coverage incrementally. No tests for sake of tests.</principle>
|
|
76
|
+
|
|
77
|
+
<priority>
|
|
78
|
+
<p1>Business logic (validation, calculations, decisions)</p1>
|
|
79
|
+
<p2>Integration points (API calls, database, external services)</p2>
|
|
80
|
+
<p3>Error handling (edge cases, failures)</p3>
|
|
81
|
+
<p4>Happy path (normal flow)</p4>
|
|
82
|
+
</priority>
|
|
83
|
+
|
|
84
|
+
<do_test>
|
|
85
|
+
<what>Business rules (validation, calculations)</what>
|
|
86
|
+
<what>State changes (create, update, delete)</what>
|
|
87
|
+
<what>Error conditions (invalid input, failures)</what>
|
|
88
|
+
<what>Integration with other services</what>
|
|
89
|
+
</do_test>
|
|
90
|
+
|
|
91
|
+
<dont_test>
|
|
92
|
+
<skip>Simple getters/setters (no logic)</skip>
|
|
93
|
+
<skip>Trivial constructors (just assign fields)</skip>
|
|
94
|
+
<skip>Third-party library internals</skip>
|
|
95
|
+
<skip>Database framework internals</skip>
|
|
96
|
+
</dont_test>
|
|
97
|
+
|
|
98
|
+
<incremental_approach>
|
|
99
|
+
<story n="1">Core functionality only (happy path + critical validation)</story>
|
|
100
|
+
<story n="2">Add edge cases as you discover them</story>
|
|
101
|
+
<story n="3">Integration tests when connecting systems</story>
|
|
102
|
+
<avoid>Writing 100% coverage in first story - wasteful, most tests never catch bugs</avoid>
|
|
103
|
+
</incremental_approach>
|
|
104
|
+
|
|
105
|
+
<examples>
|
|
106
|
+
<good>Story: CreateOrder → Test: valid order, missing customer (2 tests, covers 80% of real issues)</good>
|
|
107
|
+
<good>Story: InventoryCheck → Test: success, out-of-stock, service down (3 tests, critical paths)</good>
|
|
108
|
+
<bad>Story: CreateOrder → 15 tests for all field combinations (overkill, testing framework not logic)</bad>
|
|
109
|
+
<bad>Test OrderID() getter → returns field (trivial, no value)</bad>
|
|
110
|
+
</examples>
|
|
111
|
+
|
|
112
|
+
<metrics>
|
|
113
|
+
<wrong>Coverage % target (80%, 90%) - encourages testing trivial code</wrong>
|
|
114
|
+
<right>Core business paths tested (are critical flows covered?)</right>
|
|
115
|
+
<right>Critical errors handled (can system fail gracefully?)</right>
|
|
116
|
+
</metrics>
|
|
117
|
+
</test_strategy>
|
|
71
118
|
|
|
72
119
|
<status_values>
|
|
73
120
|
<draft>Being written</draft>
|
|
@@ -81,52 +128,69 @@ metadata:
|
|
|
81
128
|
|
|
82
129
|
---
|
|
83
130
|
|
|
84
|
-
##
|
|
131
|
+
## Example: MEDIUM Project Story
|
|
85
132
|
|
|
86
|
-
|
|
133
|
+
```yaml
|
|
134
|
+
id: ORD-S01-01
|
|
135
|
+
epic: ORD-E01
|
|
136
|
+
status: ready
|
|
137
|
+
size: M
|
|
138
|
+
```
|
|
87
139
|
|
|
88
|
-
|
|
140
|
+
# Story: Order Domain Layer
|
|
89
141
|
|
|
90
|
-
|
|
91
|
-
- Lines 103-158: Full task example with **Approach** section
|
|
92
|
-
- Lines 119-122: Shows correct Approach format (high-level steps)
|
|
142
|
+
## Goal
|
|
93
143
|
|
|
94
|
-
|
|
144
|
+
Implement domain entities and value objects for Order Management.
|
|
95
145
|
|
|
96
|
-
|
|
146
|
+
**Context:** Part of Epic 01 (Order Management). Focuses on domain layer.
|
|
97
147
|
|
|
98
|
-
|
|
148
|
+
## Units Affected
|
|
99
149
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
4. **Approach** - high-level steps (MANDATORY)
|
|
104
|
-
5. **Done when** - completion criteria
|
|
150
|
+
| Unit | Action | Description |
|
|
151
|
+
|------|--------|-------------|
|
|
152
|
+
| → Unit: `Order` | Create | New entity |
|
|
105
153
|
|
|
106
|
-
|
|
154
|
+
## Required Reading
|
|
107
155
|
|
|
108
|
-
|
|
156
|
+
| Document | Section | Why |
|
|
157
|
+
|----------|---------|-----|
|
|
158
|
+
| → `CLAUDE.md` | All | Project patterns |
|
|
159
|
+
| → `docs/coding-standards/` | All | **MANDATORY** |
|
|
160
|
+
| → Unit: `Order` | Data Model | Field definitions |
|
|
109
161
|
|
|
110
|
-
|
|
162
|
+
## Acceptance Criteria
|
|
111
163
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
2. Add NewOrder() constructor with validation
|
|
117
|
-
3. Add Validate() method for business rules
|
|
118
|
-
4. Write tests: valid order, validation errors
|
|
119
|
-
```
|
|
164
|
+
- [ ] Order entity created with all fields
|
|
165
|
+
- [ ] Validation logic implemented
|
|
166
|
+
- [ ] Tests pass (>80% coverage)
|
|
167
|
+
- [ ] Follows coding-standards
|
|
120
168
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
169
|
+
## Tasks
|
|
170
|
+
|
|
171
|
+
| ID | Task | Deps | Status |
|
|
172
|
+
|----|------|------|--------|
|
|
173
|
+
| T1 | Order entity | - | ⬜ |
|
|
174
|
+
| T2 | Value objects | - | ⬜ |
|
|
175
|
+
| T3 | Unit tests | T1, T2 | ⬜ |
|
|
176
|
+
|
|
177
|
+
### T1: Order Entity
|
|
178
|
+
|
|
179
|
+
**Goal:** Create Order entity with business rules
|
|
180
|
+
|
|
181
|
+
**Read First:**
|
|
182
|
+
| Document | Section | What to Look For |
|
|
183
|
+
|----------|---------|------------------|
|
|
184
|
+
| → `docs/coding-standards/` | Domain Layer | Entity patterns |
|
|
185
|
+
| → Unit: `Order` | Data Model | All fields |
|
|
186
|
+
|
|
187
|
+
**Output Files:**
|
|
188
|
+
- `internal/order/domain/order.go`
|
|
189
|
+
- `internal/order/domain/order_test.go`
|
|
129
190
|
|
|
130
|
-
**
|
|
191
|
+
**Done when:**
|
|
192
|
+
- [ ] Entity created
|
|
193
|
+
- [ ] Follows coding-standards
|
|
194
|
+
- [ ] Tests pass
|
|
131
195
|
|
|
132
|
-
|
|
196
|
+
See `template.md` for full format.
|