@comfanion/workflow 4.38.0-dev.1 → 4.38.1-dev.11
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/commands/dev-epic.md +6 -156
- package/src/opencode/commands/dev-sprint.md +6 -165
- package/src/opencode/commands/dev-story.md +11 -2
- package/src/opencode/commands/quick.md +5 -8
- package/src/opencode/config.yaml +0 -1
- package/src/opencode/opencode.json +1 -3
- package/src/opencode/plugins/custom-compaction.ts +305 -123
- package/src/opencode/skills/coding-standards/SKILL.md +79 -23
- package/src/opencode/skills/dev-epic/SKILL.md +185 -0
- package/src/opencode/skills/dev-sprint/SKILL.md +199 -0
- package/src/opencode/skills/dev-story/SKILL.md +195 -112
- package/src/opencode/skills/epic-writing/SKILL.md +2 -0
- package/src/opencode/skills/epic-writing/template.md +30 -6
- package/src/opencode/skills/story-writing/SKILL.md +21 -1
package/package.json
CHANGED
package/src/build-info.json
CHANGED
|
@@ -5,165 +5,15 @@ agent: dev
|
|
|
5
5
|
|
|
6
6
|
# /dev-epic Command
|
|
7
7
|
|
|
8
|
-
Implement entire epic by
|
|
8
|
+
Implement an entire epic by following the `dev-epic` skill.
|
|
9
9
|
|
|
10
10
|
## Process
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
4. **Create TODO list from epic** (critical for compaction!):
|
|
17
|
-
- Parse epic file, extract all stories
|
|
18
|
-
- For each story: read story file, count tasks
|
|
19
|
-
- Add stories to TODO with task counts
|
|
20
|
-
- Add epic-level tasks (integration tests, acceptance criteria)
|
|
21
|
-
```
|
|
22
|
-
[ ] Story 1: User Registration (12 tasks)
|
|
23
|
-
[ ] Story 2: Login Flow (8 tasks)
|
|
24
|
-
[ ] Story 3: Password Reset (6 tasks)
|
|
25
|
-
[ ] Run epic integration tests
|
|
26
|
-
[ ] Verify all acceptance criteria
|
|
27
|
-
```
|
|
28
|
-
5. **Create epic state file:** `docs/sprint-artifacts/sprint-N/.sprint-state/epic-XX-state.yaml`
|
|
29
|
-
6. Mark epic as `in-progress`
|
|
30
|
-
|
|
31
|
-
### Phase 2: Story Execution Loop (for each story)
|
|
32
|
-
|
|
33
|
-
7. **Mark story as `in_progress` in TODO** (e.g., "Story 1: User Registration")
|
|
34
|
-
8. Execute story via `/dev-story` workflow:
|
|
35
|
-
- RED → GREEN → REFACTOR
|
|
36
|
-
- @coder implements tasks
|
|
37
|
-
- @reviewer validates (if auto_review: true)
|
|
38
|
-
9. **Mark story as `completed` in TODO** (✓ Story 1: User Registration)
|
|
39
|
-
10. **Update epic state file**:
|
|
40
|
-
- Move story from `pending_stories` → `completed_stories`
|
|
41
|
-
- Add metadata (tasks_completed, tests_added, review_status)
|
|
42
|
-
- Increment `current_story_index`
|
|
43
|
-
- Set `next_action: "Execute story-XX-XX.md"` (next story filename)
|
|
44
|
-
- Update `last_compaction` timestamp
|
|
45
|
-
11. **Trigger compaction** (if `epic_workflow.auto_compact: true`)
|
|
46
|
-
12. **After compaction:**
|
|
47
|
-
- Plugin reads TODO → sees next pending story
|
|
48
|
-
- Plugin reads epic state → gets story path
|
|
49
|
-
- Agent continues next story automatically
|
|
50
|
-
|
|
51
|
-
### Phase 3: Epic Completion
|
|
52
|
-
|
|
53
|
-
13. All stories done → **mark integration test TODO as `in_progress`**
|
|
54
|
-
14. Run epic integration tests (if configured)
|
|
55
|
-
15. **Mark integration test TODO as `completed`**
|
|
56
|
-
16. Update epic state: `status: "done"`
|
|
57
|
-
17. **Clear TODO** (all tasks done)
|
|
58
|
-
18. Generate epic summary
|
|
59
|
-
|
|
60
|
-
## TODO List
|
|
61
|
-
|
|
62
|
-
**Create at epic start:**
|
|
63
|
-
```
|
|
64
|
-
[ ] Story 1: User Registration
|
|
65
|
-
[ ] Story 2: Login Flow
|
|
66
|
-
[ ] Story 3: Password Reset
|
|
67
|
-
[ ] Run epic integration tests
|
|
68
|
-
[ ] Verify acceptance criteria
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**Update after each story:**
|
|
72
|
-
- Mark story `completed` in TODO
|
|
73
|
-
- Mark next story `in_progress` in TODO
|
|
74
|
-
- TODO survives compaction - plugin shows it to agent
|
|
75
|
-
|
|
76
|
-
## Epic State File Format
|
|
77
|
-
|
|
78
|
-
**Location:** `docs/sprint-artifacts/sprint-N/.sprint-state/epic-XX-state.yaml`
|
|
79
|
-
|
|
80
|
-
```yaml
|
|
81
|
-
epic_id: "PROJ-E01"
|
|
82
|
-
epic_title: "User Authentication"
|
|
83
|
-
epic_path: "docs/sprint-artifacts/backlog/epic-01-user-auth.md"
|
|
84
|
-
sprint: "sprint-1"
|
|
85
|
-
status: "in-progress"
|
|
86
|
-
|
|
87
|
-
current_story_index: 1
|
|
88
|
-
total_stories: 3
|
|
89
|
-
|
|
90
|
-
completed_stories:
|
|
91
|
-
- path: "docs/sprint-artifacts/sprint-1/stories/story-01-01-registration.md"
|
|
92
|
-
title: "User Registration"
|
|
93
|
-
tasks_completed: 12
|
|
94
|
-
tests_added: 45
|
|
95
|
-
review_status: "approved"
|
|
96
|
-
completed_at: "2026-01-27T10:15:00Z"
|
|
97
|
-
|
|
98
|
-
pending_stories:
|
|
99
|
-
- path: "docs/sprint-artifacts/sprint-1/stories/story-01-02-login.md"
|
|
100
|
-
title: "Login Flow"
|
|
101
|
-
- path: "docs/sprint-artifacts/sprint-1/stories/story-01-03-password-reset.md"
|
|
102
|
-
title: "Password Reset"
|
|
103
|
-
|
|
104
|
-
next_action: "Execute story-01-02-login.md"
|
|
105
|
-
last_compaction: "2026-01-27T10:15:00Z"
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
## Compaction Strategy
|
|
109
|
-
|
|
110
|
-
**After compaction, agent reads (minimal context):**
|
|
111
|
-
1. Epic state file (progress + next action)
|
|
112
|
-
2. Next story file (from `next_action`)
|
|
113
|
-
3. CLAUDE.md, docs/prd.md, docs/architecture.md
|
|
114
|
-
|
|
115
|
-
**Agent does NOT re-read:**
|
|
116
|
-
- ❌ Epic file (info in state)
|
|
117
|
-
- ❌ Completed stories
|
|
118
|
-
- ❌ Previous tasks
|
|
119
|
-
|
|
120
|
-
**Context savings: ~68% less than reading all files**
|
|
121
|
-
|
|
122
|
-
## Configuration
|
|
123
|
-
|
|
124
|
-
From `config.yaml → epic_workflow`:
|
|
125
|
-
|
|
126
|
-
```yaml
|
|
127
|
-
epic_workflow:
|
|
128
|
-
auto_compact: true # Compact between stories
|
|
129
|
-
auto_fix: true # Auto-fix review issues
|
|
130
|
-
max_fix_attempts: 3 # Max fix attempts before HALT
|
|
131
|
-
pause_between_stories: false # Continue automatically
|
|
132
|
-
test_after_each_story: false # Skip per-story integration tests
|
|
133
|
-
test_after_epic: true # Run epic integration tests at end
|
|
134
|
-
```
|
|
12
|
+
1. **Load Skill**: Read and follow the instructions in `.opencode/skills/dev-epic/SKILL.md`.
|
|
13
|
+
2. **Initialize**: Create the epic-level TODO list and the epic state file as described in the skill.
|
|
14
|
+
3. **Execute**: Enter the story -> review -> compact -> loop until all stories in the TODO list are complete.
|
|
15
|
+
4. **Finalize**: Run final tests and report completion.
|
|
135
16
|
|
|
136
17
|
## IMPORTANT SKILLS TO LOAD
|
|
137
18
|
|
|
138
|
-
- `dev-
|
|
139
|
-
- `test-design` - Test writing patterns
|
|
140
|
-
- `code-review` - Review and validation
|
|
141
|
-
|
|
142
|
-
## Output
|
|
143
|
-
|
|
144
|
-
- All story implementations (code + tests)
|
|
145
|
-
- Epic state file (updated)
|
|
146
|
-
- Updated epic file (stories marked `[x]`)
|
|
147
|
-
- Epic summary report
|
|
148
|
-
|
|
149
|
-
## HALT Conditions
|
|
150
|
-
|
|
151
|
-
The workflow will HALT and ask for input when:
|
|
152
|
-
- Story fails 3 times (implementation/tests)
|
|
153
|
-
- Code review fails after max_fix_attempts
|
|
154
|
-
- Missing dependencies
|
|
155
|
-
- Ambiguous requirements
|
|
156
|
-
- Integration tests fail
|
|
157
|
-
|
|
158
|
-
## Epic Status Flow
|
|
159
|
-
|
|
160
|
-
```
|
|
161
|
-
ready-for-dev → in-progress → [story 1] → compact → [story 2] → compact → ... → done
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
## Next Steps After Completion
|
|
165
|
-
|
|
166
|
-
- Epic marked `done` in epic state file
|
|
167
|
-
- All stories marked `done`
|
|
168
|
-
- If part of `/dev-sprint`: continue to next epic automatically
|
|
169
|
-
- If standalone: ready for sprint review
|
|
19
|
+
- `dev-epic` - The primary algorithm for this command.
|
|
@@ -5,174 +5,15 @@ agent: dev
|
|
|
5
5
|
|
|
6
6
|
# /dev-sprint Command
|
|
7
7
|
|
|
8
|
-
Implement entire sprint by
|
|
8
|
+
Implement an entire sprint by following the `dev-sprint` skill.
|
|
9
9
|
|
|
10
10
|
## Process
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
4. Load project context (CLAUDE.md, docs/prd.md, docs/architecture.md)
|
|
17
|
-
5. **Create TODO list from sprint** (critical for compaction!):
|
|
18
|
-
- Parse sprint-status.yaml, extract all epics
|
|
19
|
-
- For each epic: read epic file, count stories and tasks
|
|
20
|
-
- Add epics to TODO with story/task counts
|
|
21
|
-
- Add sprint-level tasks (integration tests, acceptance criteria, metrics)
|
|
22
|
-
```
|
|
23
|
-
[ ] Epic 1: User Authentication (3 stories, 26 tasks)
|
|
24
|
-
[ ] Epic 2: Product Catalog (5 stories, 42 tasks)
|
|
25
|
-
[ ] Epic 3: Shopping Cart (4 stories, 31 tasks)
|
|
26
|
-
[ ] Run sprint integration tests
|
|
27
|
-
[ ] Verify sprint acceptance criteria
|
|
28
|
-
[ ] Generate sprint metrics
|
|
29
|
-
```
|
|
30
|
-
6. Mark sprint as `in-progress` in sprint-status.yaml
|
|
31
|
-
|
|
32
|
-
### Phase 2: Epic Execution Loop (for each epic)
|
|
33
|
-
|
|
34
|
-
7. **Mark epic as `in_progress` in TODO** (e.g., "Epic 1: User Authentication")
|
|
35
|
-
8. Execute epic via `/dev-epic` workflow:
|
|
36
|
-
- Epic creates its own TODO for stories
|
|
37
|
-
- Epic executes all stories
|
|
38
|
-
- Auto-compacts between stories
|
|
39
|
-
- Auto-fixes code review issues
|
|
40
|
-
9. **Mark epic as `completed` in TODO** (✓ Epic 1: User Authentication)
|
|
41
|
-
10. **Update sprint-status.yaml**:
|
|
42
|
-
- Mark epic as `done`
|
|
43
|
-
- Update `stories_completed` count
|
|
44
|
-
- Find next epic
|
|
45
|
-
11. **Trigger compaction** (if `epic_workflow.auto_compact: true`)
|
|
46
|
-
12. **After compaction:**
|
|
47
|
-
- Plugin reads TODO → sees next pending epic
|
|
48
|
-
- Plugin reads sprint-status.yaml → gets epic path
|
|
49
|
-
- Agent continues next epic automatically
|
|
50
|
-
|
|
51
|
-
### Phase 3: Sprint Completion
|
|
52
|
-
|
|
53
|
-
13. All epics done → **mark integration test TODO as `in_progress`**
|
|
54
|
-
14. Run sprint integration tests (if configured)
|
|
55
|
-
15. **Mark integration test TODO as `completed`**
|
|
56
|
-
16. **Mark acceptance criteria TODO as `in_progress`**
|
|
57
|
-
17. Verify sprint acceptance criteria
|
|
58
|
-
18. **Mark acceptance criteria TODO as `completed`**
|
|
59
|
-
19. **Mark metrics TODO as `in_progress`**
|
|
60
|
-
20. Generate sprint metrics (velocity, completion rate, etc.)
|
|
61
|
-
21. **Mark metrics TODO as `completed`**
|
|
62
|
-
22. Update sprint-status.yaml: `status: "done"`
|
|
63
|
-
23. **Clear TODO** (all tasks done)
|
|
64
|
-
24. Generate sprint summary
|
|
65
|
-
|
|
66
|
-
## TODO List
|
|
67
|
-
|
|
68
|
-
**Create at sprint start:**
|
|
69
|
-
```
|
|
70
|
-
[ ] Epic 1: User Authentication (3 stories)
|
|
71
|
-
[ ] Epic 2: Product Catalog (5 stories)
|
|
72
|
-
[ ] Epic 3: Shopping Cart (4 stories)
|
|
73
|
-
[ ] Run sprint integration tests
|
|
74
|
-
[ ] Verify sprint acceptance criteria
|
|
75
|
-
[ ] Generate sprint metrics
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
**Update after each epic:**
|
|
79
|
-
- Mark epic `completed` in TODO
|
|
80
|
-
- Mark next epic `in_progress` in TODO
|
|
81
|
-
- TODO survives compaction - plugin shows it to agent
|
|
82
|
-
|
|
83
|
-
**Note:** Each epic creates its own TODO for stories, clears it when done
|
|
84
|
-
|
|
85
|
-
## Sprint State Tracking
|
|
86
|
-
|
|
87
|
-
**Location:** `docs/sprint-artifacts/sprint-status.yaml`
|
|
88
|
-
|
|
89
|
-
```yaml
|
|
90
|
-
sprints:
|
|
91
|
-
- id: sprint-1
|
|
92
|
-
name: "Sprint 1 - Core Features"
|
|
93
|
-
status: in-progress
|
|
94
|
-
start_date: "2026-01-20"
|
|
95
|
-
end_date: "2026-02-03"
|
|
96
|
-
|
|
97
|
-
epics:
|
|
98
|
-
- id: PROJ-E01
|
|
99
|
-
title: "User Authentication"
|
|
100
|
-
path: "docs/sprint-artifacts/backlog/epic-01-user-auth.md"
|
|
101
|
-
status: done
|
|
102
|
-
stories_completed: 3
|
|
103
|
-
stories_total: 3
|
|
104
|
-
|
|
105
|
-
- id: PROJ-E02
|
|
106
|
-
title: "Product Catalog"
|
|
107
|
-
path: "docs/sprint-artifacts/backlog/epic-02-catalog.md"
|
|
108
|
-
status: in-progress # ← Current epic
|
|
109
|
-
stories_completed: 2
|
|
110
|
-
stories_total: 5
|
|
111
|
-
|
|
112
|
-
- id: PROJ-E03
|
|
113
|
-
title: "Shopping Cart"
|
|
114
|
-
path: "docs/sprint-artifacts/backlog/epic-03-cart.md"
|
|
115
|
-
status: ready-for-dev
|
|
116
|
-
stories_total: 4
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
Each epic also has state file in `.sprint-state/epic-XX-state.yaml`
|
|
120
|
-
|
|
121
|
-
## Compaction Strategy
|
|
122
|
-
|
|
123
|
-
**After compaction, agent reads:**
|
|
124
|
-
1. sprint-status.yaml (knows which epic is next)
|
|
125
|
-
2. Next epic file
|
|
126
|
-
3. Next epic state file (if exists)
|
|
127
|
-
4. CLAUDE.md, docs/prd.md, docs/architecture.md
|
|
128
|
-
|
|
129
|
-
**Agent does NOT re-read:**
|
|
130
|
-
- ❌ Completed epic files
|
|
131
|
-
- ❌ Completed story files
|
|
132
|
-
- ❌ Previous epic states
|
|
133
|
-
|
|
134
|
-
## Configuration
|
|
135
|
-
|
|
136
|
-
From `config.yaml → epic_workflow`:
|
|
137
|
-
|
|
138
|
-
```yaml
|
|
139
|
-
epic_workflow:
|
|
140
|
-
auto_compact: true # Compact between epics
|
|
141
|
-
auto_fix: true # Auto-fix review issues
|
|
142
|
-
pause_between_stories: false # Continue automatically
|
|
143
|
-
```
|
|
12
|
+
1. **Load Skill**: Read and follow the instructions in `.opencode/skills/dev-sprint/SKILL.md`.
|
|
13
|
+
2. **Initialize**: Create the sprint-level TODO list and update `sprint-status.yaml` as described in the skill.
|
|
14
|
+
3. **Execute**: Enter the epic -> review -> compact -> loop until all epics in the TODO list are complete.
|
|
15
|
+
4. **Finalize**: Run final sprint tests and report completion.
|
|
144
16
|
|
|
145
17
|
## IMPORTANT SKILLS TO LOAD
|
|
146
18
|
|
|
147
|
-
- `dev-
|
|
148
|
-
- `test-design` - Test writing patterns
|
|
149
|
-
- `code-review` - Review and validation
|
|
150
|
-
|
|
151
|
-
## Output
|
|
152
|
-
|
|
153
|
-
- All epic implementations (code + tests)
|
|
154
|
-
- Updated sprint-status.yaml
|
|
155
|
-
- Sprint summary report
|
|
156
|
-
- Sprint metrics (velocity, completion rate)
|
|
157
|
-
|
|
158
|
-
## HALT Conditions
|
|
159
|
-
|
|
160
|
-
The workflow will HALT and ask for input when:
|
|
161
|
-
- Epic fails repeatedly (3+ failed stories)
|
|
162
|
-
- Multiple stories rejected by @reviewer
|
|
163
|
-
- Sprint deadline approaching (< 20% time, > 50% work)
|
|
164
|
-
- Missing dependencies
|
|
165
|
-
- Sprint integration tests fail
|
|
166
|
-
|
|
167
|
-
## Sprint Status Flow
|
|
168
|
-
|
|
169
|
-
```
|
|
170
|
-
planned → in-progress → [epic 1] → compact → [epic 2] → compact → ... → done
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
## Next Steps After Completion
|
|
174
|
-
|
|
175
|
-
- Sprint marked `done` in sprint-status.yaml
|
|
176
|
-
- All epics and stories marked `done`
|
|
177
|
-
- Ready for sprint review/retrospective
|
|
178
|
-
- Run `/retrospective` to capture learnings
|
|
19
|
+
- `dev-sprint` - The primary algorithm for this command.
|
|
@@ -13,8 +13,17 @@ Implement a story using red-green-refactor cycle with TODO tracking.
|
|
|
13
13
|
1. Find or load story file
|
|
14
14
|
2. Load project context (CLAUDE.md, docs/prd.md, docs/architecture.md)
|
|
15
15
|
3. Use skill dev-story, test-design
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
4. **Create TODO list for full scope of work** (tasks + tests + review):
|
|
17
|
+
- Parse story file, extract all tasks
|
|
18
|
+
- Add each task to TODO
|
|
19
|
+
- **If `config.yaml → development.auto_review: true`**: Add review task to TODO
|
|
20
|
+
```
|
|
21
|
+
[ ] Task 1: Create User entity
|
|
22
|
+
[ ] Task 2: Add repository
|
|
23
|
+
[ ] Task 3: Write integration tests
|
|
24
|
+
[ ] Code review by @reviewer ← if auto_review: true
|
|
25
|
+
```
|
|
26
|
+
5. Mark story as `in-progress`
|
|
18
27
|
|
|
19
28
|
### Phase 2: Implementation (for each task)
|
|
20
29
|
5. **Mark task as `in_progress` in TODO**
|
|
@@ -19,26 +19,23 @@ Automatically used when:
|
|
|
19
19
|
- Single file or < 5 files affected
|
|
20
20
|
- No new requirements needed
|
|
21
21
|
- No architecture changes
|
|
22
|
-
-
|
|
22
|
+
- T-shirt size: S or M
|
|
23
23
|
|
|
24
24
|
## Quick Workflow
|
|
25
25
|
|
|
26
26
|
```
|
|
27
27
|
┌────────────────────┐
|
|
28
|
-
│ 1. Quick Doc
|
|
29
|
-
│ (2-5 min) │
|
|
28
|
+
│ 1. Quick Doc [XS] │ Create minimal change doc
|
|
30
29
|
└────────┬───────────┘
|
|
31
30
|
│
|
|
32
31
|
▼
|
|
33
32
|
┌────────────────────┐
|
|
34
|
-
│ 2. Implement
|
|
35
|
-
│ (varies) │
|
|
33
|
+
│ 2. Implement [S-M] │ Make the change
|
|
36
34
|
└────────┬───────────┘
|
|
37
35
|
│
|
|
38
36
|
▼
|
|
39
37
|
┌────────────────────┐
|
|
40
|
-
│ 3. Test
|
|
41
|
-
│ (5-10 min) │
|
|
38
|
+
│ 3. Test [XS] │ Verify it works
|
|
42
39
|
└────────┬───────────┘
|
|
43
40
|
│
|
|
44
41
|
▼
|
|
@@ -119,7 +116,7 @@ For valid quick changes:
|
|
|
119
116
|
## Quick Change: [Title]
|
|
120
117
|
|
|
121
118
|
**Scale:** L0 (Hotfix) / L1 (Small)
|
|
122
|
-
**
|
|
119
|
+
**Size:** S / M
|
|
123
120
|
|
|
124
121
|
### Files to Modify
|
|
125
122
|
|
package/src/opencode/config.yaml
CHANGED