@comfanion/workflow 3.0.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.
Files changed (95) hide show
  1. package/README.md +185 -0
  2. package/bin/cli.js +406 -0
  3. package/package.json +50 -0
  4. package/src/build-info.json +16 -0
  5. package/src/opencode/ARCHITECTURE.md +255 -0
  6. package/src/opencode/FLOW.yaml +900 -0
  7. package/src/opencode/agents/analyst.md +141 -0
  8. package/src/opencode/agents/architect.md +177 -0
  9. package/src/opencode/agents/change-manager.md +263 -0
  10. package/src/opencode/agents/dev.md +171 -0
  11. package/src/opencode/agents/module-docs.md +628 -0
  12. package/src/opencode/agents/pm.md +157 -0
  13. package/src/opencode/agents/researcher.md +254 -0
  14. package/src/opencode/agents/sm.md +184 -0
  15. package/src/opencode/agents/workflow-orchestrator.md +249 -0
  16. package/src/opencode/checklists/architecture-checklist.md +166 -0
  17. package/src/opencode/checklists/code-review-checklist.md +151 -0
  18. package/src/opencode/checklists/prd-checklist.md +140 -0
  19. package/src/opencode/checklists/requirements-checklist.md +86 -0
  20. package/src/opencode/checklists/story-checklist.md +137 -0
  21. package/src/opencode/commands/architecture.md +68 -0
  22. package/src/opencode/commands/archive.md +146 -0
  23. package/src/opencode/commands/change.md +169 -0
  24. package/src/opencode/commands/clarify.md +132 -0
  25. package/src/opencode/commands/code-review.md +96 -0
  26. package/src/opencode/commands/coding-standards.md +102 -0
  27. package/src/opencode/commands/dev-story.md +80 -0
  28. package/src/opencode/commands/diagram.md +152 -0
  29. package/src/opencode/commands/epics.md +52 -0
  30. package/src/opencode/commands/help.md +139 -0
  31. package/src/opencode/commands/jira-sync.md +58 -0
  32. package/src/opencode/commands/module-docs.md +158 -0
  33. package/src/opencode/commands/prd.md +63 -0
  34. package/src/opencode/commands/quick.md +166 -0
  35. package/src/opencode/commands/requirements.md +49 -0
  36. package/src/opencode/commands/research.md +113 -0
  37. package/src/opencode/commands/sprint-plan.md +59 -0
  38. package/src/opencode/commands/stories.md +61 -0
  39. package/src/opencode/commands/validate.md +84 -0
  40. package/src/opencode/commands/workflow-status.md +150 -0
  41. package/src/opencode/config.yaml +223 -0
  42. package/src/opencode/opencode.json +36 -0
  43. package/src/opencode/skills/acceptance-criteria/SKILL.md +212 -0
  44. package/src/opencode/skills/adr-writing/SKILL.md +241 -0
  45. package/src/opencode/skills/architecture-design/SKILL.md +183 -0
  46. package/src/opencode/skills/architecture-validation/SKILL.md +199 -0
  47. package/src/opencode/skills/archiving/SKILL.md +191 -0
  48. package/src/opencode/skills/changelog/SKILL.md +280 -0
  49. package/src/opencode/skills/code-review/SKILL.md +193 -0
  50. package/src/opencode/skills/coding-standards/SKILL.md +430 -0
  51. package/src/opencode/skills/diagram-creation/SKILL.md +273 -0
  52. package/src/opencode/skills/doc-todo/SKILL.md +325 -0
  53. package/src/opencode/skills/epic-writing/SKILL.md +291 -0
  54. package/src/opencode/skills/jira-integration/SKILL.md +560 -0
  55. package/src/opencode/skills/methodologies/SKILL.md +376 -0
  56. package/src/opencode/skills/module-documentation/SKILL.md +214 -0
  57. package/src/opencode/skills/prd-validation/SKILL.md +164 -0
  58. package/src/opencode/skills/prd-writing/SKILL.md +104 -0
  59. package/src/opencode/skills/requirements-gathering/SKILL.md +132 -0
  60. package/src/opencode/skills/requirements-validation/SKILL.md +141 -0
  61. package/src/opencode/skills/research-methodology/SKILL.md +140 -0
  62. package/src/opencode/skills/sprint-planning/SKILL.md +217 -0
  63. package/src/opencode/skills/story-writing/SKILL.md +574 -0
  64. package/src/opencode/skills/test-design/SKILL.md +313 -0
  65. package/src/opencode/skills/translation/SKILL.md +411 -0
  66. package/src/opencode/templates/CHANGELOG.md +82 -0
  67. package/src/opencode/templates/adr-template.md +115 -0
  68. package/src/opencode/templates/architecture-template.md +362 -0
  69. package/src/opencode/templates/change-proposal-template.md +186 -0
  70. package/src/opencode/templates/epic-template.md +151 -0
  71. package/src/opencode/templates/git-workflow-template.md +384 -0
  72. package/src/opencode/templates/integration-tests-template.md +265 -0
  73. package/src/opencode/templates/jira-cache-template.yaml +103 -0
  74. package/src/opencode/templates/module-index-template.md +139 -0
  75. package/src/opencode/templates/module-test-cases-template.md +230 -0
  76. package/src/opencode/templates/prd-acceptance-criteria-template.md +124 -0
  77. package/src/opencode/templates/prd-template.md +479 -0
  78. package/src/opencode/templates/requirements-template.md +132 -0
  79. package/src/opencode/templates/sprint-status-template.yaml +84 -0
  80. package/src/opencode/templates/story-template.md +437 -0
  81. package/src/opencode/templates/testing-standards-template.md +359 -0
  82. package/src/opencode/workflows/dev-story/instructions.md +529 -0
  83. package/src/repo-structure/.gitattributes +64 -0
  84. package/src/repo-structure/CONTRIBUTING.md +182 -0
  85. package/src/repo-structure/README.md +77 -0
  86. package/src/repo-structure/docs/README.md +62 -0
  87. package/src/repo-structure/docs/api/README.md +43 -0
  88. package/src/repo-structure/docs/architecture/README.md +36 -0
  89. package/src/repo-structure/docs/architecture/adr/README.md +53 -0
  90. package/src/repo-structure/docs/architecture/diagrams/README.md +59 -0
  91. package/src/repo-structure/docs/coding-standards/README.md +52 -0
  92. package/src/repo-structure/docs/confluence/README.md +43 -0
  93. package/src/repo-structure/docs/requirements/README.md +28 -0
  94. package/src/repo-structure/docs/sprint-artifacts/README.md +76 -0
  95. package/src/repo-structure/docs/sprint-artifacts/backlog/README.md +24 -0
@@ -0,0 +1,437 @@
1
+ ---
2
+ stepsCompleted: []
3
+ inputDocuments: []
4
+ workflowType: 'story'
5
+ ---
6
+
7
+ # Story {{epic_number}}.{{story_number}}: {{story_title}}
8
+
9
+ **Story ID:** {{module}}-S{{epic_number}}-{{story_number}}
10
+ **Epic:** {{module}}-E{{epic_number}} - {{epic_title}}
11
+ **Status:** draft | ready-for-dev | in-progress | review | done | blocked
12
+ **Priority:** P0 | P1 | P2
13
+ **Estimate:** XS | S | M | L | XL
14
+ **Created:** {{date}}
15
+ **Last Updated:** {{date}}
16
+
17
+ ---
18
+
19
+ ## User Story
20
+
21
+ **As a** {{user_type}},
22
+ **I want** {{capability}},
23
+ **So that** {{benefit}}.
24
+
25
+ ---
26
+
27
+ ## Acceptance Criteria
28
+
29
+ ### AC1: {{criterion_name}}
30
+
31
+ **Given** {{precondition}}
32
+ **When** {{action}}
33
+ **Then** {{expected_result}}
34
+ **And** {{additional_check}}
35
+
36
+ ### AC2: {{criterion_name}}
37
+
38
+ **Given** {{precondition}}
39
+ **When** {{action}}
40
+ **Then** {{expected_result}}
41
+
42
+ ### AC3: {{criterion_name}}
43
+
44
+ **Given** {{precondition}}
45
+ **When** {{action}}
46
+ **Then** {{expected_result}}
47
+
48
+ ---
49
+
50
+ ## Atomic Tasks
51
+
52
+ <!--
53
+ METHODOLOGY: {{methodology}} (tdd | stub)
54
+ - TDD: Interface → Test (failing) → Implementation → Refactor
55
+ - STUB: Interface → Stub → Test → Full Implementation
56
+
57
+ RULES:
58
+ - Each task is 1-2 hours max
59
+ - Each task includes TEST as validation gate
60
+ - Tasks have explicit dependencies
61
+ - Dev agent respects dependency order
62
+ -->
63
+
64
+ ### Development Methodology: **{{methodology}}**
65
+
66
+ ```
67
+ {{#if methodology == "tdd"}}
68
+ TDD Flow per Task:
69
+ 1. Define Interface/Contract
70
+ 2. Write Failing Test (RED)
71
+ 3. Implement Minimal Code (GREEN)
72
+ 4. Refactor
73
+ 5. Validate: Test MUST pass
74
+ {{/if}}
75
+ {{#if methodology == "stub"}}
76
+ STUB Flow per Task:
77
+ 1. Define Interface/Contract
78
+ 2. Write Stub Implementation (returns mock data)
79
+ 3. Write Tests against Stub
80
+ 4. Replace Stub with Real Implementation
81
+ 5. Validate: Test MUST pass
82
+ {{/if}}
83
+ ```
84
+
85
+ ---
86
+
87
+ ### Task Dependency Graph
88
+
89
+ ```
90
+ T1 ──┬──► T2 ──► T3
91
+
92
+ └──► T4 ──► T5
93
+
94
+ T3 ───────────────┴──► T6
95
+ ```
96
+
97
+ ### Tasks Summary
98
+
99
+ | ID | Task | Est | Deps | Test | Status |
100
+ |----|------|-----|------|------|--------|
101
+ | T1 | {{task_1}} | 1h | - | unit | ⬜ |
102
+ | T2 | {{task_2}} | 1.5h | T1 | unit | ⬜ |
103
+ | T3 | {{task_3}} | 1h | T2 | unit | ⬜ |
104
+ | T4 | {{task_4}} | 1.5h | T1 | unit | ⬜ |
105
+ | T5 | {{task_5}} | 1h | T4 | unit | ⬜ |
106
+ | T6 | {{task_6}} | 1.5h | T3,T5 | integration | ⬜ |
107
+
108
+ **Status:** ⬜ TODO | 🔄 IN_PROGRESS | ✅ DONE | ⏸️ BLOCKED | ❌ FAILED
109
+
110
+ ---
111
+
112
+ ### T1: Define {{entity}} Interface
113
+ - **Estimate:** 1h
114
+ - **Depends on:** -
115
+ - **Blocks:** T2, T4
116
+ - **Deliverables:**
117
+ - [ ] Interface/contract defined
118
+ - [ ] Value objects defined (if needed)
119
+ - **Validation Test:**
120
+ - [ ] Contract test (compile/type check)
121
+ - **Notes:** {{implementation_hint}}
122
+
123
+ ---
124
+
125
+ ### T2: Implement {{entity}} Entity/Model
126
+ - **Estimate:** 1.5h
127
+ - **Depends on:** T1
128
+ - **Blocks:** T3
129
+ - **Deliverables:**
130
+ - [ ] Entity/model with business logic
131
+ - [ ] Factory method with validation
132
+ - **Validation Test:**
133
+ - [ ] Test creation happy path
134
+ - [ ] Test validation errors
135
+ - [ ] Test business rules
136
+ - [ ] **⚠️ ALL TESTS MUST PASS**
137
+ - **Notes:** {{implementation_hint}}
138
+
139
+ ---
140
+
141
+ ### T3: Implement Use Case / Service
142
+ - **Estimate:** 1h
143
+ - **Depends on:** T2
144
+ - **Blocks:** T6
145
+ - **Deliverables:**
146
+ - [ ] Use case handler/service
147
+ - [ ] Input/Output DTOs
148
+ - [ ] Mappers (entity ↔ DTO)
149
+ - **Validation Test:**
150
+ - [ ] Test happy path (mock repository)
151
+ - [ ] Test validation errors
152
+ - [ ] **⚠️ ALL TESTS MUST PASS**
153
+ - **Notes:** {{implementation_hint}}
154
+
155
+ ---
156
+
157
+ ### T4: Implement Repository / Data Access
158
+ - **Estimate:** 1.5h
159
+ - **Depends on:** T1
160
+ - **Blocks:** T5
161
+ - **Deliverables (TDD):**
162
+ - [ ] Write test first
163
+ - [ ] Implement repository
164
+ - **Deliverables (STUB):**
165
+ - [ ] In-memory stub first
166
+ - [ ] Real implementation
167
+ - **Validation Test:**
168
+ - [ ] Test Save
169
+ - [ ] Test FindByID
170
+ - [ ] Test FindByID not found
171
+ - [ ] **⚠️ ALL TESTS MUST PASS**
172
+ - **Notes:** {{implementation_hint}}
173
+
174
+ ---
175
+
176
+ ### T5: Implement API Handler
177
+ - **Estimate:** 1h
178
+ - **Depends on:** T4
179
+ - **Blocks:** T6
180
+ - **Deliverables:**
181
+ - [ ] API handler/controller
182
+ - [ ] Routes registered
183
+ - **Validation Test:**
184
+ - [ ] Test 201 Created
185
+ - [ ] Test 400 Bad Request
186
+ - [ ] Test 403 Forbidden
187
+ - [ ] **⚠️ ALL TESTS MUST PASS**
188
+ - **Notes:** {{implementation_hint}}
189
+
190
+ ---
191
+
192
+ ### T6: Integration Test & Refactor
193
+ - **Estimate:** 1.5h
194
+ - **Depends on:** T3, T5
195
+ - **Blocks:** -
196
+ - **Deliverables:**
197
+ - [ ] Integration test
198
+ - [ ] Code refactored, no smells
199
+ - [ ] Documentation updated
200
+ - **Validation Test:**
201
+ - [ ] E2E: API → Service → Repo → DB
202
+ - [ ] Event published (if applicable)
203
+ - [ ] **⚠️ ALL TESTS MUST PASS**
204
+ - [ ] **⚠️ NO REGRESSIONS**
205
+ - **Notes:** {{implementation_hint}}
206
+
207
+ ---
208
+
209
+ ### Execution Phases
210
+
211
+ | Phase | Tasks (Parallel) | Duration | Tests Required |
212
+ |-------|-----------------|----------|----------------|
213
+ | 1 | T1 | 1h | Interface contract |
214
+ | 2 | T2, T4 | 1.5h | Unit tests |
215
+ | 3 | T3, T5 | 1h | Unit tests |
216
+ | 4 | T6 | 1.5h | Integration tests |
217
+ | **Total** | | **5h** | **All green** |
218
+
219
+ **Critical Path:** T1 → T2 → T3 → T6 = 5h
220
+ **With Parallelism:** ~4h
221
+
222
+ ---
223
+
224
+ ## TODO Placeholders
225
+
226
+ <!--
227
+ When implementing, leave TODO comments for:
228
+ - Next tasks in this story
229
+ - Future stories/epics
230
+ - Technical debt
231
+ - Planned improvements
232
+
233
+ Format: TODO({TYPE}:{ID}): {description}
234
+ -->
235
+
236
+ ### TODOs to Create During Implementation
237
+
238
+ | Location | TODO | Type | Reference |
239
+ |----------|------|------|-----------|
240
+ | `src/domain/{{entity}}` | Add validation for X | TASK | T3 |
241
+ | `src/application/{{usecase}}` | Add caching | STORY | S{{epic}}-04 |
242
+ | `src/infrastructure/repo/` | Add batch operations | EPIC | E{{next_epic}} |
243
+ | `src/api/` | Add rate limiting | BACKLOG | - |
244
+
245
+ ### TODO Format Reference (IDE-compatible)
246
+
247
+ ```go
248
+ // TODO(TASK:T3): Implement validation logic here
249
+ // Called from: T2 implementation
250
+ // Blocked until: T3 starts
251
+
252
+ // TODO(STORY:{{module}}-S05-04): Add pagination support
253
+ // This story implements basic list, pagination in next story
254
+ // See: docs/sprint-artifacts/sprint-1/stories/story-05-04.md
255
+
256
+ // TODO(EPIC:{{module}}-E06): Replace with event-driven approach
257
+ // Current sync implementation, async in Epic 6
258
+ // See: docs/sprint-artifacts/backlog/epic-06.md
259
+
260
+ // TODO(SPRINT:SP3): Performance optimization needed
261
+ // Current O(n²), optimize in Sprint 3
262
+
263
+ // TODO(BACKLOG): Consider adding retry logic
264
+ // Not planned yet, but would improve reliability
265
+
266
+ // TODO(TECH_DEBT): Refactor this duplication
267
+ // Copy-pasted from X, extract common logic
268
+
269
+ // FIXME(BUG:GH-123): Fix null pointer exception
270
+ // Occurs when input is empty
271
+ // Ticket: https://github.com/org/repo/issues/123
272
+
273
+ // HACK: Temporary workaround for API limitation
274
+ // Remove when: STORY:{{module}}-S05-08 implemented
275
+ ```
276
+
277
+ **GoLand/IntelliJ Setup:**
278
+ ```
279
+ Settings → Editor → TODO → Add Pattern:
280
+ \bTODO\(.*\):.*
281
+ \bFIXME\(.*\):.*
282
+ \bHACK:.*
283
+ ```
284
+
285
+ ### Related Future Work
286
+
287
+ | ID | Type | Description | Blocks This? |
288
+ |----|------|-------------|--------------|
289
+ | T3 | Task | Validation logic | No |
290
+ | S{{epic}}-04 | Story | Pagination | No |
291
+ | E{{next_epic}} | Epic | Event-driven | No |
292
+
293
+ ---
294
+
295
+ ## Dev Notes
296
+
297
+ <!-- Context for the developer implementing this story -->
298
+
299
+ ### Architecture Requirements
300
+ - Follow hexagonal architecture patterns
301
+ - Domain layer must not import infrastructure
302
+ - Use value objects for domain concepts
303
+
304
+ ### Technical Specifications
305
+ - {{technical_specs}}
306
+
307
+ ### Dependencies
308
+ - Depends on: {{dependencies}}
309
+ - Blocked by: {{blockers}}
310
+
311
+ ### Previous Learnings
312
+ - {{learnings_from_similar_work}}
313
+
314
+ ### Reference Files
315
+ - `src/path/to/related/file` - [why relevant]
316
+ - `docs/architecture.md#section` - [architecture guidance]
317
+
318
+ ### Patterns to Follow
319
+ - See `CLAUDE.md` or `docs/coding-standards/` for coding standards
320
+ - Follow project architecture patterns
321
+
322
+ ### API/Interface
323
+ ```
324
+ // Expected interface or function signature
325
+ // (language-specific syntax)
326
+ ```
327
+
328
+ ---
329
+
330
+ ## Test Scenarios
331
+
332
+ ### Unit Tests
333
+ 1. {{test_scenario_1}}
334
+ 2. {{test_scenario_2}}
335
+ 3. {{edge_case_1}}
336
+
337
+ ### Integration Tests
338
+ 1. {{integration_scenario_1}}
339
+ 2. {{integration_scenario_2}}
340
+
341
+ ---
342
+
343
+ ## Dev Agent Record
344
+
345
+ <!-- Automatically updated by Dev agent during implementation -->
346
+
347
+ ### Implementation Plan
348
+ <!-- Dev agent documents approach here -->
349
+
350
+ ### Debug Log
351
+ <!-- Dev agent logs debugging notes here -->
352
+
353
+ ### Completion Notes
354
+ <!-- Dev agent summarizes what was implemented -->
355
+
356
+ ---
357
+
358
+ ## File List
359
+
360
+ <!-- Dev agent updates with all changed files -->
361
+
362
+ ### Created Files
363
+ -
364
+
365
+ ### Modified Files
366
+ -
367
+
368
+ ### Deleted Files
369
+ -
370
+
371
+ ---
372
+
373
+ ## Changelog
374
+
375
+ <!-- UPDATE AT END OF SESSION -->
376
+
377
+ | Version | Date | Author | Changes |
378
+ |---------|------|--------|---------|
379
+ | 0.1 | {{date}} | @sm | Story created |
380
+
381
+ <!--
382
+ Changelog Guidelines:
383
+ - Update at END of work session
384
+ - Dev: summarize what was implemented
385
+ - Version: 0.x=draft, 1.0=ready-for-dev, 1.x=in-progress, 2.0=done
386
+
387
+ Example session entries:
388
+ | 2.0 | 2024-01-25 | @dev | Complete: T1-T7 done; All tests pass; Ready for review |
389
+ | 1.1 | 2024-01-23 | @dev | Progress: T1-T4 complete; T5 blocked by API issue |
390
+ | 1.0 | 2024-01-20 | @sm | Ready for dev: 7 tasks defined; AC reviewed |
391
+ -->
392
+
393
+ ---
394
+
395
+ ## Definition of Done
396
+
397
+ - [ ] All acceptance criteria implemented and verified
398
+ - [ ] All tasks/subtasks marked complete [x]
399
+ - [ ] Unit tests written and passing (>80% coverage)
400
+ - [ ] Integration tests written and passing
401
+ - [ ] Code follows CLAUDE.md patterns
402
+ - [ ] Code reviewed and approved
403
+ - [ ] No linting errors
404
+ - [ ] No failing tests (full suite)
405
+ - [ ] File List complete
406
+ - [ ] Change Log updated
407
+ - [ ] PR merged to epic branch
408
+
409
+ ---
410
+
411
+ ## Senior Developer Review (AI)
412
+
413
+ <!-- Added after code-review workflow runs -->
414
+
415
+ ### Review Date
416
+ <!-- Date of review -->
417
+
418
+ ### Review Outcome
419
+ <!-- Approve | Changes Requested | Blocked -->
420
+
421
+ ### Action Items
422
+ - [ ] {{action_item_1}}
423
+ - [ ] {{action_item_2}}
424
+
425
+ ### Review Follow-ups (AI)
426
+ <!-- Tasks added based on review findings -->
427
+
428
+ ---
429
+
430
+ ## Jira Metadata
431
+
432
+ ```yaml
433
+ # Added after /jira-sync
434
+ jira_id:
435
+ jira_url:
436
+ last_sync:
437
+ ```