@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
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dev-epic
|
|
3
|
+
description: Use when executing a full epic, including all stories, reviews, and tests, with auto-compaction.
|
|
4
|
+
metadata:
|
|
5
|
+
domain: development
|
|
6
|
+
agents: [dev]
|
|
7
|
+
artifacts: epic state file, story files
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Dev Epic Skill
|
|
11
|
+
|
|
12
|
+
<workflow name="dev-epic">
|
|
13
|
+
|
|
14
|
+
<phase name="1-context" title="Load Minimal Context">
|
|
15
|
+
<read>
|
|
16
|
+
<file>CLAUDE.md</file>
|
|
17
|
+
<file>docs/coding-standards/README.md</file>
|
|
18
|
+
<file>docs/coding-standards/patterns.md</file>
|
|
19
|
+
<file>{epic-file}</file>
|
|
20
|
+
<file>{current-story-file}</file>
|
|
21
|
+
</read>
|
|
22
|
+
<skip reason="too large, epic/story has context">
|
|
23
|
+
<file>docs/prd.md</file>
|
|
24
|
+
<file>docs/architecture.md</file>
|
|
25
|
+
<file>all stories at once</file>
|
|
26
|
+
</skip>
|
|
27
|
+
<goal>~70KB per story</goal>
|
|
28
|
+
</phase>
|
|
29
|
+
|
|
30
|
+
<phase name="2-init" title="Initialize Epic">
|
|
31
|
+
<step n="1">Parse epic file → extract story list</step>
|
|
32
|
+
<step n="2">Create epic state: docs/sprint-artifacts/sprint-N/.sprint-state/epic-XX-state.yaml</step>
|
|
33
|
+
<step n="3">Create TODO list:
|
|
34
|
+
```
|
|
35
|
+
[ ] Story 1: [Title]
|
|
36
|
+
[ ] Review Story 1
|
|
37
|
+
[ ] Story 2: [Title]
|
|
38
|
+
[ ] Review Story 2
|
|
39
|
+
...
|
|
40
|
+
[ ] Epic integration tests
|
|
41
|
+
[ ] Verify epic AC
|
|
42
|
+
```
|
|
43
|
+
</step>
|
|
44
|
+
<step n="4">Set state: status="in-progress", next_action="Execute [first-story.md]"</step>
|
|
45
|
+
<step n="5">Mark first story as in_progress in TODO</step>
|
|
46
|
+
</phase>
|
|
47
|
+
|
|
48
|
+
<phase name="3-loop" title="Story Execution Loop">
|
|
49
|
+
<for-each item="story" in="pending_stories">
|
|
50
|
+
|
|
51
|
+
<action name="execute-story">
|
|
52
|
+
Follow /dev-story logic:
|
|
53
|
+
- Create nested TODO for tasks
|
|
54
|
+
- Implement all tasks (RED/GREEN/REFACTOR)
|
|
55
|
+
- Clear task TODO when done
|
|
56
|
+
</action>
|
|
57
|
+
|
|
58
|
+
<action name="mark-done">
|
|
59
|
+
Mark story as completed in epic TODO
|
|
60
|
+
</action>
|
|
61
|
+
|
|
62
|
+
<action name="review">
|
|
63
|
+
Mark "Review Story" as in_progress
|
|
64
|
+
Invoke @reviewer
|
|
65
|
+
<if condition="CHANGES_REQUESTED">
|
|
66
|
+
Add fix tasks → re-execute → re-review (max 3 attempts)
|
|
67
|
+
</if>
|
|
68
|
+
<if condition="APPROVED">
|
|
69
|
+
Mark "Review Story" as completed
|
|
70
|
+
</if>
|
|
71
|
+
</action>
|
|
72
|
+
|
|
73
|
+
<action name="update-state">
|
|
74
|
+
Edit epic state file:
|
|
75
|
+
- Move story to completed_stories
|
|
76
|
+
- Increment current_story_index
|
|
77
|
+
- Set next_action to next story
|
|
78
|
+
</action>
|
|
79
|
+
|
|
80
|
+
<action name="compact">
|
|
81
|
+
Mark next story as in_progress in TODO
|
|
82
|
+
Wait for auto-compaction
|
|
83
|
+
Plugin reads TODO + state → resume
|
|
84
|
+
</action>
|
|
85
|
+
|
|
86
|
+
</for-each>
|
|
87
|
+
</phase>
|
|
88
|
+
|
|
89
|
+
<phase name="4-finalize" title="Finalize Epic">
|
|
90
|
+
<step n="1">Run epic integration tests (mark in TODO)</step>
|
|
91
|
+
<step n="2">Verify all AC from epic file (mark in TODO)</step>
|
|
92
|
+
<step n="3">Set state: status="done"</step>
|
|
93
|
+
<step n="4">Clear epic TODO list</step>
|
|
94
|
+
<step n="5">Report completion with summary</step>
|
|
95
|
+
</phase>
|
|
96
|
+
|
|
97
|
+
</workflow>
|
|
98
|
+
|
|
99
|
+
<outputs>
|
|
100
|
+
- Implementation code for all stories
|
|
101
|
+
- Updated epic-XX-state.yaml
|
|
102
|
+
- Clean TODO list (all completed)
|
|
103
|
+
</outputs>
|
|
104
|
+
|
|
105
|
+
<rules>
|
|
106
|
+
<do>Create clean TODO list for each epic</do>
|
|
107
|
+
<do>Update epic state file BEFORE compaction</do>
|
|
108
|
+
<dont>Ask user for confirmation between stories — TODO is your guide</dont>
|
|
109
|
+
<dont>Proceed to next story if review fails — enter fix loop</dont>
|
|
110
|
+
</rules>
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dev-sprint
|
|
3
|
+
description: Use when executing a full sprint, including all epics, stories, reviews, and tests, with auto-compaction.
|
|
4
|
+
metadata:
|
|
5
|
+
domain: development
|
|
6
|
+
agents: [dev]
|
|
7
|
+
artifacts: sprint-status.yaml, epic state files, story files
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Dev Sprint Skill
|
|
11
|
+
|
|
12
|
+
<workflow name="dev-sprint">
|
|
13
|
+
|
|
14
|
+
<phase name="1-context" title="Load Minimal Context">
|
|
15
|
+
<read>
|
|
16
|
+
<file>CLAUDE.md</file>
|
|
17
|
+
<file>docs/coding-standards/README.md</file>
|
|
18
|
+
<file>docs/coding-standards/patterns.md</file>
|
|
19
|
+
<file>sprint-status.yaml</file>
|
|
20
|
+
<file>{current-epic-file}</file>
|
|
21
|
+
<file>{current-story-file}</file>
|
|
22
|
+
</read>
|
|
23
|
+
<skip reason="too large, epic/story has context">
|
|
24
|
+
<file>docs/prd.md</file>
|
|
25
|
+
<file>docs/architecture.md</file>
|
|
26
|
+
<file>all epics/stories at once</file>
|
|
27
|
+
</skip>
|
|
28
|
+
<goal>~70KB per story</goal>
|
|
29
|
+
</phase>
|
|
30
|
+
|
|
31
|
+
<phase name="2-init" title="Initialize Sprint">
|
|
32
|
+
<step n="1">Parse sprint-status.yaml → extract epic list for target sprint</step>
|
|
33
|
+
<step n="2">Create master TODO list:
|
|
34
|
+
```
|
|
35
|
+
[ ] Epic 1: [Title]
|
|
36
|
+
[ ] Story 1-1: [Title]
|
|
37
|
+
[ ] Review Story 1-1
|
|
38
|
+
[ ] Story 1-2: [Title]
|
|
39
|
+
[ ] Review Story 1-2
|
|
40
|
+
[ ] Review Epic 1
|
|
41
|
+
[ ] Epic 2: [Title]
|
|
42
|
+
[ ] Story 2-1: [Title]
|
|
43
|
+
...
|
|
44
|
+
[ ] Sprint integration tests
|
|
45
|
+
```
|
|
46
|
+
</step>
|
|
47
|
+
<step n="3">Set sprint status="in-progress" in sprint-status.yaml</step>
|
|
48
|
+
<step n="4">Mark first epic as in_progress in TODO</step>
|
|
49
|
+
</phase>
|
|
50
|
+
|
|
51
|
+
<phase name="3-loop" title="Epic Execution Loop">
|
|
52
|
+
<for-each item="epic" in="pending_epics">
|
|
53
|
+
|
|
54
|
+
<action name="execute-epic">
|
|
55
|
+
Follow dev-epic skill logic:
|
|
56
|
+
- Creates nested TODO for stories
|
|
57
|
+
- Executes all stories + reviews
|
|
58
|
+
- Clears epic TODO when done
|
|
59
|
+
</action>
|
|
60
|
+
|
|
61
|
+
<action name="mark-done">
|
|
62
|
+
Mark epic as completed in sprint TODO
|
|
63
|
+
</action>
|
|
64
|
+
|
|
65
|
+
<action name="epic-review">
|
|
66
|
+
Mark "Review Epic" as in_progress
|
|
67
|
+
Run epic integration tests
|
|
68
|
+
Mark "Review Epic" as completed
|
|
69
|
+
</action>
|
|
70
|
+
|
|
71
|
+
<action name="update-state">
|
|
72
|
+
Edit sprint-status.yaml:
|
|
73
|
+
- Set completed epic status="done"
|
|
74
|
+
- Set next epic status="in-progress"
|
|
75
|
+
</action>
|
|
76
|
+
|
|
77
|
+
<action name="compact">
|
|
78
|
+
Mark next epic as in_progress in TODO
|
|
79
|
+
Wait for auto-compaction
|
|
80
|
+
Plugin reads sprint TODO → resume
|
|
81
|
+
</action>
|
|
82
|
+
|
|
83
|
+
</for-each>
|
|
84
|
+
</phase>
|
|
85
|
+
|
|
86
|
+
<phase name="4-finalize" title="Finalize Sprint">
|
|
87
|
+
<step n="1">Run sprint integration tests (mark in TODO)</step>
|
|
88
|
+
<step n="2">Set sprint status="done" in sprint-status.yaml</step>
|
|
89
|
+
<step n="3">Clear sprint TODO list</step>
|
|
90
|
+
<step n="4">Report completion with summary + metrics</step>
|
|
91
|
+
</phase>
|
|
92
|
+
|
|
93
|
+
</workflow>
|
|
94
|
+
|
|
95
|
+
<outputs>
|
|
96
|
+
- Implementation code for all stories in sprint
|
|
97
|
+
- Updated sprint-status.yaml
|
|
98
|
+
- Clean TODO list (all completed)
|
|
99
|
+
</outputs>
|
|
100
|
+
|
|
101
|
+
<rules>
|
|
102
|
+
<do>Create ONE master TODO list for entire sprint at start</do>
|
|
103
|
+
<do>Let dev-epic skill manage its own nested TODO</do>
|
|
104
|
+
<dont>Ask for confirmation between epics — sprint TODO is your guide</dont>
|
|
105
|
+
<dont>Proceed to next epic if epic review fails — HALT and report</dont>
|
|
106
|
+
</rules>
|
|
@@ -11,53 +11,71 @@ metadata:
|
|
|
11
11
|
|
|
12
12
|
# Dev Story Skill
|
|
13
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
14
|
+
<workflow name="dev-story">
|
|
15
|
+
|
|
16
|
+
<phase name="1-context" title="Load Minimal Context">
|
|
17
|
+
<read>
|
|
18
|
+
<file>CLAUDE.md</file>
|
|
19
|
+
<file>docs/coding-standards/README.md</file>
|
|
20
|
+
<file>docs/coding-standards/patterns.md</file>
|
|
21
|
+
<file>{story-file}</file>
|
|
22
|
+
</read>
|
|
23
|
+
<skip reason="too large, story has context">
|
|
24
|
+
<file>docs/prd.md</file>
|
|
25
|
+
<file>docs/architecture.md</file>
|
|
26
|
+
</skip>
|
|
27
|
+
<goal>~70KB context, not 200KB+</goal>
|
|
28
|
+
</phase>
|
|
29
|
+
|
|
30
|
+
<phase name="2-transform" title="Transform Story Task → Executable Instruction">
|
|
31
|
+
<step n="1" name="read-docs">
|
|
32
|
+
Story has "Required Reading", task has "Read First".
|
|
33
|
+
Open each → find sections → extract patterns, signatures, constraints.
|
|
34
|
+
</step>
|
|
35
|
+
<step n="2" name="find-patterns">
|
|
36
|
+
From "Read First" paths, find existing similar code.
|
|
37
|
+
Note structure, imports, error handling → becomes "Pattern Reference".
|
|
38
|
+
</step>
|
|
39
|
+
<step n="3" name="build-context">
|
|
40
|
+
@coder doesn't see story. Provide:
|
|
41
|
+
- Existing files (paths + what they contain)
|
|
42
|
+
- Patterns to follow (link to similar code)
|
|
43
|
+
- What was done (results of previous tasks)
|
|
44
|
+
- Imports (what packages to use)
|
|
45
|
+
</step>
|
|
46
|
+
<step n="4" name="add-direction">
|
|
47
|
+
Story has "Approach". Expand with:
|
|
48
|
+
- Interface signatures (method names, params, return types)
|
|
49
|
+
- Error handling (what errors to return)
|
|
50
|
+
- Validation rules
|
|
51
|
+
</step>
|
|
52
|
+
<step n="5" name="verification">
|
|
53
|
+
Story has "Done when". Add:
|
|
54
|
+
- Specific test commands
|
|
55
|
+
- Files that must compile
|
|
56
|
+
- Test coverage expectations
|
|
57
|
+
</step>
|
|
58
|
+
</phase>
|
|
59
|
+
|
|
60
|
+
<phase name="3-delegate" title="Delegate to @coder">
|
|
61
|
+
<action>Formulate task using template below</action>
|
|
62
|
+
<action>Call @coder with full context</action>
|
|
63
|
+
<rule>@coder writes code. Give direction, NOT solution.</rule>
|
|
64
|
+
</phase>
|
|
65
|
+
|
|
66
|
+
<phase name="4-verify" title="Verify & Mark Done">
|
|
67
|
+
<action>Run tests</action>
|
|
68
|
+
<action>Check "Done when" criteria</action>
|
|
69
|
+
<action>Mark task ✅ in story file</action>
|
|
70
|
+
<next>Next task or story complete</next>
|
|
71
|
+
</phase>
|
|
72
|
+
|
|
73
|
+
</workflow>
|
|
74
|
+
|
|
75
|
+
## Task Template for @coder
|
|
76
|
+
|
|
77
|
+
<template name="coder-task">
|
|
78
|
+
```markdown
|
|
61
79
|
## Task: [Name] (Task IDs)
|
|
62
80
|
|
|
63
81
|
[One line goal]
|
|
@@ -66,89 +84,67 @@ Structure:
|
|
|
66
84
|
- Use `doc-todo` for TODO comments
|
|
67
85
|
|
|
68
86
|
### Context
|
|
69
|
-
- [Existing file]: [
|
|
70
|
-
-
|
|
71
|
-
- Existing pattern: [Path to similar code to follow]
|
|
87
|
+
- [Existing file]: [what to use from it]
|
|
88
|
+
- Existing pattern: [path to similar code]
|
|
72
89
|
|
|
73
90
|
### Output Files
|
|
74
|
-
- [
|
|
91
|
+
- [path/to/create.ext]
|
|
75
92
|
|
|
76
93
|
### Requirements
|
|
77
|
-
[
|
|
94
|
+
1. [What to implement with signatures]
|
|
95
|
+
2. [Another requirement]
|
|
78
96
|
|
|
79
97
|
### Pattern Reference
|
|
80
|
-
[
|
|
98
|
+
→ [path/to/similar/code.ext]
|
|
81
99
|
|
|
82
100
|
### Error Handling
|
|
83
101
|
[How to handle errors]
|
|
84
102
|
|
|
85
103
|
### Done When
|
|
86
|
-
- [ ] [Specific checkable item]
|
|
87
|
-
- [ ] [Another item]
|
|
88
104
|
- [ ] File compiles
|
|
89
105
|
- [ ] Tests pass
|
|
106
|
+
- [ ] [Specific criterion]
|
|
90
107
|
```
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
**DO NOT give ready code. Give direction.**
|
|
135
|
-
|
|
136
|
-
✅ **DO provide:**
|
|
137
|
-
- Links to existing code as pattern reference
|
|
138
|
-
- Interface signatures (method names, params, return types)
|
|
139
|
-
- Requirements (what logic to implement)
|
|
140
|
-
- Error handling approach
|
|
141
|
-
- Validation rules
|
|
142
|
-
|
|
143
|
-
❌ **DO NOT provide:**
|
|
144
|
-
- Full method implementations
|
|
145
|
-
- Ready-to-copy code blocks
|
|
146
|
-
- Complete structs with all logic
|
|
147
|
-
|
|
148
|
-
**@coder writes the implementation.** Give direction, not solution.
|
|
149
|
-
|
|
150
|
-
## Methodology
|
|
151
|
-
|
|
152
|
-
Include in task based on config.yaml:
|
|
153
|
-
- **TDD**: "Write failing test first, then implement"
|
|
154
|
-
- **STUB**: "Create stub first, write tests, then real implementation"
|
|
108
|
+
</template>
|
|
109
|
+
|
|
110
|
+
<rules name="delegation">
|
|
111
|
+
<rule name="parallel">
|
|
112
|
+
Each task gets full context. No shared state. Different files only.
|
|
113
|
+
</rule>
|
|
114
|
+
<rule name="no-code">
|
|
115
|
+
Give direction, NOT solution. @coder writes implementation.
|
|
116
|
+
</rule>
|
|
117
|
+
<rule name="methodology">
|
|
118
|
+
TDD: "Write failing test first, then implement"
|
|
119
|
+
STUB: "Create stub first, write tests, then implement"
|
|
120
|
+
</rule>
|
|
121
|
+
</rules>
|
|
122
|
+
|
|
123
|
+
<task-boundaries>
|
|
124
|
+
<good>Logically complete unit (service, handler, entity). Single responsibility. Testable independently.</good>
|
|
125
|
+
<split-when>Multiple unrelated responsibilities. No logical connection.</split-when>
|
|
126
|
+
<combine-when>Too granular. Same file, same concern.</combine-when>
|
|
127
|
+
</task-boundaries>
|
|
128
|
+
|
|
129
|
+
<patterns>
|
|
130
|
+
<pattern name="new-service">
|
|
131
|
+
Context: domain entities, repository interface, existing service
|
|
132
|
+
Requirements: interface, constructor, methods
|
|
133
|
+
Pattern: existing service structure
|
|
134
|
+
</pattern>
|
|
135
|
+
<pattern name="new-handler">
|
|
136
|
+
Context: service interface, DTOs, existing handler
|
|
137
|
+
Requirements: handler struct, methods, error mapping
|
|
138
|
+
Pattern: existing handler structure
|
|
139
|
+
</pattern>
|
|
140
|
+
<pattern name="new-tests">
|
|
141
|
+
Context: code to test, existing test examples
|
|
142
|
+
Requirements: test scenarios, mocks
|
|
143
|
+
Pattern: existing test structure
|
|
144
|
+
</pattern>
|
|
145
|
+
</patterns>
|
|
146
|
+
|
|
147
|
+
<critical>
|
|
148
|
+
✅ PROVIDE: pattern references, interface signatures, requirements, error approach
|
|
149
|
+
❌ DO NOT: full implementations, ready-to-copy code, complete structs
|
|
150
|
+
</critical>
|
|
@@ -183,6 +183,8 @@ Table + dependency diagram:
|
|
|
183
183
|
| S01-01 | Task Domain | M | → Unit: `Task` | ⬜ |
|
|
184
184
|
| S01-02 | Task Repository | M | → Unit: `Task` | ⬜ |
|
|
185
185
|
|
|
186
|
+
**Size Guide:** Prefer S→M or M. (S=2-4 tasks, M=4-8 tasks, L=8+ tasks)
|
|
187
|
+
|
|
186
188
|
```
|
|
187
189
|
S01 ──► S02 ──► S03
|
|
188
190
|
```
|
|
@@ -70,7 +70,7 @@ Use template at: `@.opencode/skills/story-writing/template.md`
|
|
|
70
70
|
id: {{PREFIX}}-S{{E}}-{{N}}
|
|
71
71
|
epic: {{PREFIX}}-E{{E}}
|
|
72
72
|
status: draft | ready | in_progress | review | done
|
|
73
|
-
size: S | M | L
|
|
73
|
+
size: S | M | L # Prefer S→M or M. S=2-4 tasks, M=4-8 tasks, L=8+ tasks
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
### 2. Goal
|