@comfanion/workflow 4.37.2 → 4.38.1-dev.1
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/FLOW.yaml +77 -0
- package/src/opencode/commands/dev-epic.md +19 -0
- package/src/opencode/commands/dev-sprint.md +19 -0
- package/src/opencode/commands/dev-story.md +11 -2
- package/src/opencode/commands/quick.md +5 -8
- package/src/opencode/config.yaml +47 -1
- package/src/opencode/opencode.json +1 -3
- package/src/opencode/plugins/README.md +32 -1
- package/src/opencode/plugins/custom-compaction.ts +302 -27
- package/src/opencode/skills/coding-standards/SKILL.md +79 -23
- package/src/opencode/skills/dev-epic/SKILL.md +110 -0
- package/src/opencode/skills/dev-sprint/SKILL.md +106 -0
- package/src/opencode/skills/dev-story/SKILL.md +115 -119
- package/src/opencode/skills/epic-writing/SKILL.md +2 -0
- package/src/opencode/skills/story-writing/SKILL.md +1 -1
package/package.json
CHANGED
package/src/build-info.json
CHANGED
package/src/opencode/FLOW.yaml
CHANGED
|
@@ -254,6 +254,83 @@ pipeline:
|
|
|
254
254
|
# IMPLEMENTATION PHASE
|
|
255
255
|
# =========================================================================
|
|
256
256
|
|
|
257
|
+
- id: dev-sprint
|
|
258
|
+
name: Sprint Implementation (Full Workflow)
|
|
259
|
+
description: Implement entire sprint - all epics with auto-compaction
|
|
260
|
+
phase: implementation
|
|
261
|
+
command: /dev-sprint [sprint-number]
|
|
262
|
+
agent: dev
|
|
263
|
+
skills:
|
|
264
|
+
- dev-story
|
|
265
|
+
- test-design
|
|
266
|
+
- code-review
|
|
267
|
+
artifacts:
|
|
268
|
+
input:
|
|
269
|
+
- docs/sprint-artifacts/sprint-status.yaml
|
|
270
|
+
- docs/sprint-artifacts/backlog/epic-*.md
|
|
271
|
+
- CLAUDE.md
|
|
272
|
+
output:
|
|
273
|
+
- All epic implementations
|
|
274
|
+
- Updated sprint-status.yaml
|
|
275
|
+
- Sprint summary report
|
|
276
|
+
workflow:
|
|
277
|
+
description: |
|
|
278
|
+
Execute all epics in sprint sequentially:
|
|
279
|
+
1. Read sprint-status.yaml, find epics
|
|
280
|
+
2. For each epic: /dev-epic → compact
|
|
281
|
+
3. Continue until all epics done
|
|
282
|
+
4. Run sprint integration tests
|
|
283
|
+
config:
|
|
284
|
+
auto_compact: "config.yaml → epic_workflow.auto_compact"
|
|
285
|
+
auto_fix: "config.yaml → epic_workflow.auto_fix"
|
|
286
|
+
next: dev-epic # Can also run individual epics
|
|
287
|
+
|
|
288
|
+
- id: dev-epic
|
|
289
|
+
name: Epic Implementation (Full Workflow)
|
|
290
|
+
description: Implement entire epic - all stories with auto-compaction
|
|
291
|
+
phase: implementation
|
|
292
|
+
command: /dev-epic [epic-path]
|
|
293
|
+
agent: dev
|
|
294
|
+
skills:
|
|
295
|
+
- dev-story
|
|
296
|
+
- test-design
|
|
297
|
+
- code-review
|
|
298
|
+
artifacts:
|
|
299
|
+
input:
|
|
300
|
+
- docs/sprint-artifacts/backlog/epic-*.md
|
|
301
|
+
- docs/sprint-artifacts/sprint-*/.sprint-state/epic-*-state.yaml
|
|
302
|
+
- CLAUDE.md
|
|
303
|
+
output:
|
|
304
|
+
- All story implementations
|
|
305
|
+
- Epic state file (updated)
|
|
306
|
+
- Epic summary report
|
|
307
|
+
workflow:
|
|
308
|
+
description: |
|
|
309
|
+
Execute all stories in epic sequentially:
|
|
310
|
+
1. Read epic file, find stories
|
|
311
|
+
2. For each story: /dev-story → @reviewer → compact
|
|
312
|
+
3. Auto-fix review issues (max 3 attempts)
|
|
313
|
+
4. Continue until all stories done
|
|
314
|
+
5. Run epic integration tests
|
|
315
|
+
state_management:
|
|
316
|
+
location: "docs/sprint-artifacts/sprint-N/.sprint-state/epic-XX-state.yaml"
|
|
317
|
+
preserves:
|
|
318
|
+
- Current story index
|
|
319
|
+
- Completed stories
|
|
320
|
+
- Pending stories
|
|
321
|
+
- Review status
|
|
322
|
+
compaction:
|
|
323
|
+
trigger: "After each story completion"
|
|
324
|
+
restores:
|
|
325
|
+
- Epic state file (progress)
|
|
326
|
+
- Next story file (what to do)
|
|
327
|
+
- CLAUDE.md, PRD, Architecture (context)
|
|
328
|
+
config:
|
|
329
|
+
auto_compact: "config.yaml → epic_workflow.auto_compact"
|
|
330
|
+
auto_fix: "config.yaml → epic_workflow.auto_fix"
|
|
331
|
+
max_fix_attempts: "config.yaml → epic_workflow.max_fix_attempts"
|
|
332
|
+
next: dev-story # Can also run individual stories
|
|
333
|
+
|
|
257
334
|
- id: dev-story
|
|
258
335
|
name: Story Implementation
|
|
259
336
|
description: Implement story using red-green-refactor cycle
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Execute full epic - implement all stories sequentially with auto-compaction between stories
|
|
3
|
+
agent: dev
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /dev-epic Command
|
|
7
|
+
|
|
8
|
+
Implement an entire epic by following the `dev-epic` skill.
|
|
9
|
+
|
|
10
|
+
## Process
|
|
11
|
+
|
|
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.
|
|
16
|
+
|
|
17
|
+
## IMPORTANT SKILLS TO LOAD
|
|
18
|
+
|
|
19
|
+
- `dev-epic` - The primary algorithm for this command.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Execute full sprint - implement all epics sequentially with auto-compaction between epics
|
|
3
|
+
agent: dev
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /dev-sprint Command
|
|
7
|
+
|
|
8
|
+
Implement an entire sprint by following the `dev-sprint` skill.
|
|
9
|
+
|
|
10
|
+
## Process
|
|
11
|
+
|
|
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.
|
|
16
|
+
|
|
17
|
+
## IMPORTANT SKILLS TO LOAD
|
|
18
|
+
|
|
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
|
@@ -164,7 +164,6 @@ development:
|
|
|
164
164
|
|
|
165
165
|
# Task structure
|
|
166
166
|
task:
|
|
167
|
-
max_hours: 2 # Maximum hours per atomic task
|
|
168
167
|
include_tests: true # Each task includes test as validation
|
|
169
168
|
require_interface: true # Interface defined before implementation
|
|
170
169
|
|
|
@@ -197,6 +196,53 @@ development:
|
|
|
197
196
|
- NUMBERS # Add metrics/numbers
|
|
198
197
|
- LINK # Add links/references
|
|
199
198
|
|
|
199
|
+
# =============================================================================
|
|
200
|
+
# EPIC WORKFLOW (/dev-epic command)
|
|
201
|
+
# =============================================================================
|
|
202
|
+
epic_workflow:
|
|
203
|
+
# Auto-compact between stories (saves context, continues next story)
|
|
204
|
+
# When true: story done → compact → restore context → next story
|
|
205
|
+
# When false: story done → ask user to continue
|
|
206
|
+
auto_compact: true
|
|
207
|
+
|
|
208
|
+
# Auto-fix code review issues
|
|
209
|
+
# When true: review failed → @coder fixes → re-review → continue
|
|
210
|
+
# When false: review failed → HALT, ask user
|
|
211
|
+
auto_fix: true
|
|
212
|
+
|
|
213
|
+
# Max fix attempts before HALT (prevents infinite loops)
|
|
214
|
+
max_fix_attempts: 3
|
|
215
|
+
|
|
216
|
+
# Pause between stories for manual review
|
|
217
|
+
# When true: story done → show summary → ask to continue
|
|
218
|
+
# When false: story done → immediately start next story
|
|
219
|
+
pause_between_stories: false
|
|
220
|
+
|
|
221
|
+
# Run integration tests after each story
|
|
222
|
+
# When true: story done → run integration tests → continue
|
|
223
|
+
# When false: skip per-story integration tests
|
|
224
|
+
test_after_each_story: false
|
|
225
|
+
|
|
226
|
+
# Run integration tests after epic complete
|
|
227
|
+
# When true: all stories done → run epic integration tests
|
|
228
|
+
# When false: skip epic integration tests
|
|
229
|
+
test_after_epic: true
|
|
230
|
+
|
|
231
|
+
# Compaction strategy
|
|
232
|
+
compaction:
|
|
233
|
+
# Save epic state to sprint-status.yaml
|
|
234
|
+
save_epic_state: true
|
|
235
|
+
|
|
236
|
+
# Files to preserve in context after compaction
|
|
237
|
+
preserve_files:
|
|
238
|
+
- "CLAUDE.md"
|
|
239
|
+
- "AGENTS.md"
|
|
240
|
+
- "docs/prd.md"
|
|
241
|
+
- "docs/architecture.md"
|
|
242
|
+
- "docs/coding-standards/README.md"
|
|
243
|
+
- "docs/coding-standards/patterns.md"
|
|
244
|
+
# Epic file and next story added dynamically
|
|
245
|
+
|
|
200
246
|
# =============================================================================
|
|
201
247
|
# CHANGELOG
|
|
202
248
|
# =============================================================================
|
|
@@ -52,10 +52,11 @@ Checks for updates and shows a toast notification if a newer version is availabl
|
|
|
52
52
|
|
|
53
53
|
### custom-compaction.ts
|
|
54
54
|
|
|
55
|
-
Intelligent session compaction that preserves flow context.
|
|
55
|
+
Intelligent session compaction that preserves flow context with epic workflow support.
|
|
56
56
|
|
|
57
57
|
**Features:**
|
|
58
58
|
- Tracks todo list and story task status
|
|
59
|
+
- **Epic workflow state preservation** (new!)
|
|
59
60
|
- Identifies critical documentation files for context
|
|
60
61
|
- Generates smart continuation prompts
|
|
61
62
|
- Differentiates between completed and interrupted tasks
|
|
@@ -68,8 +69,31 @@ Intelligent session compaction that preserves flow context.
|
|
|
68
69
|
|----------|-------------------|
|
|
69
70
|
| **Task Completed** | Summary of completed work, next steps, validation reminders |
|
|
70
71
|
| **Task Interrupted** | Current task, what was done, resume instructions, file list |
|
|
72
|
+
| **Epic in Progress** | Epic state file, current story, next action, minimal context |
|
|
73
|
+
|
|
74
|
+
**Epic Workflow Support:**
|
|
75
|
+
|
|
76
|
+
When `/dev-epic` is running, the plugin:
|
|
77
|
+
1. Finds active epic state file in `sprint-N/.sprint-state/epic-XX-state.yaml`
|
|
78
|
+
2. Reads current story from epic state
|
|
79
|
+
3. Generates minimal read commands:
|
|
80
|
+
- Epic state file (progress tracking)
|
|
81
|
+
- Next story file (what to do)
|
|
82
|
+
- CLAUDE.md, PRD, Architecture (context)
|
|
83
|
+
4. Agent resumes automatically without re-reading completed stories
|
|
84
|
+
|
|
85
|
+
**Epic State File Location:**
|
|
86
|
+
```
|
|
87
|
+
docs/sprint-artifacts/
|
|
88
|
+
sprint-1/
|
|
89
|
+
.sprint-state/
|
|
90
|
+
epic-01-state.yaml # Tracks epic-01 progress
|
|
91
|
+
epic-02-state.yaml # Tracks epic-02 progress
|
|
92
|
+
```
|
|
71
93
|
|
|
72
94
|
**Critical Files Passed to Context:**
|
|
95
|
+
|
|
96
|
+
**For regular /dev-story:**
|
|
73
97
|
- `CLAUDE.md` - Project coding standards
|
|
74
98
|
- `AGENTS.md` - Agent definitions
|
|
75
99
|
- `project-context.md` - Project overview
|
|
@@ -79,6 +103,13 @@ Intelligent session compaction that preserves flow context.
|
|
|
79
103
|
- `docs/coding-standards/*.md` - Coding patterns
|
|
80
104
|
- Active story file (if in progress)
|
|
81
105
|
|
|
106
|
+
**For /dev-epic workflow:**
|
|
107
|
+
- Epic state file (e.g., `sprint-1/.sprint-state/epic-01-state.yaml`)
|
|
108
|
+
- Next story file (from epic state)
|
|
109
|
+
- `CLAUDE.md`, `AGENTS.md`, `docs/prd.md`, `docs/architecture.md`
|
|
110
|
+
- ❌ **NOT** completed story files (saves context!)
|
|
111
|
+
- ❌ **NOT** epic file (info in state file)
|
|
112
|
+
|
|
82
113
|
## Installation
|
|
83
114
|
|
|
84
115
|
Plugins in `.opencode/plugins/` are automatically loaded by OpenCode.
|