@comfanion/workflow 4.1.2 → 4.3.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 (46) hide show
  1. package/README.md +1 -2
  2. package/bin/cli.js +2 -4
  3. package/package.json +1 -1
  4. package/src/build-info.json +1 -1
  5. package/src/opencode/ARCHITECTURE.md +7 -6
  6. package/src/opencode/FLOW.yaml +10 -10
  7. package/src/opencode/agents/coder.md +82 -0
  8. package/src/opencode/agents/dev.md +10 -0
  9. package/src/opencode/commands/architecture.md +1 -1
  10. package/src/opencode/commands/prd.md +1 -1
  11. package/src/opencode/config.yaml +1 -1
  12. package/src/opencode/skills/adr-writing/SKILL.md +122 -159
  13. package/src/opencode/skills/adr-writing/template.md +130 -0
  14. package/src/opencode/skills/architecture-design/SKILL.md +113 -107
  15. package/src/opencode/skills/architecture-design/template.md +212 -0
  16. package/src/opencode/skills/architecture-validation/SKILL.md +1 -1
  17. package/src/opencode/skills/changelog/template.md +23 -0
  18. package/src/opencode/skills/epic-writing/SKILL.md +116 -264
  19. package/src/opencode/skills/epic-writing/template.md +119 -0
  20. package/src/opencode/skills/prd-validation/SKILL.md +1 -1
  21. package/src/opencode/skills/prd-writing/SKILL.md +79 -43
  22. package/src/opencode/skills/prd-writing/template.md +147 -0
  23. package/src/opencode/skills/requirements-gathering/SKILL.md +128 -78
  24. package/src/opencode/skills/requirements-gathering/template.md +156 -0
  25. package/src/opencode/skills/story-writing/SKILL.md +106 -464
  26. package/src/opencode/skills/story-writing/template.md +214 -0
  27. package/src/opencode/skills/unit-writing/SKILL.md +185 -0
  28. package/src/opencode/skills/unit-writing/template.md +136 -0
  29. package/src/repo-structure/docs/README.md +5 -5
  30. package/src/repo-structure/docs/requirements/README.md +1 -1
  31. package/src/opencode/templates/CHANGELOG.md +0 -82
  32. package/src/opencode/templates/adr-template.md +0 -115
  33. package/src/opencode/templates/architecture-template.md +0 -362
  34. package/src/opencode/templates/epic-template.md +0 -166
  35. package/src/opencode/templates/prd-template.md +0 -479
  36. package/src/opencode/templates/requirements-template.md +0 -132
  37. package/src/opencode/templates/story-template.md +0 -182
  38. /package/src/opencode/{templates/prd-acceptance-criteria-template.md → skills/acceptance-criteria/template.md} +0 -0
  39. /package/src/opencode/{templates/change-proposal-template.md → skills/archiving/template-change-proposal.md} +0 -0
  40. /package/src/opencode/{templates/git-workflow-template.md → skills/coding-standards/template-git.md} +0 -0
  41. /package/src/opencode/{templates/testing-standards-template.md → skills/coding-standards/template-testing.md} +0 -0
  42. /package/src/opencode/{templates/jira-cache-template.yaml → skills/jira-integration/template-cache.yaml} +0 -0
  43. /package/src/opencode/{templates/module-index-template.md → skills/module-documentation/template.md} +0 -0
  44. /package/src/opencode/{templates/sprint-status-template.yaml → skills/sprint-planning/template.yaml} +0 -0
  45. /package/src/opencode/{templates/integration-tests-template.md → skills/test-design/template-integration.md} +0 -0
  46. /package/src/opencode/{templates/module-test-cases-template.md → skills/test-design/template-module.md} +0 -0
@@ -1,479 +0,0 @@
1
- ---
2
- stepsCompleted: []
3
- inputDocuments: []
4
- workflowType: 'prd'
5
- version: "1.0"
6
- status: draft
7
- ---
8
-
9
- # {{project_name}} - Product Requirements Document
10
-
11
- **Author:** {{user_name}}
12
- **Date:** {{date}}
13
- **Version:** 1.0
14
- **Status:** 🚧 DRAFT | 📝 REVIEW | ✅ APPROVED
15
- **Completeness:** {{completeness}}%
16
-
17
- ---
18
-
19
- ## Document TODOs
20
-
21
- <!-- Track document progress here -->
22
-
23
- | Section | Status | TODO Type | Notes |
24
- |---------|--------|-----------|-------|
25
- | Executive Summary | ⬜ | DRAFT | First pass needed |
26
- | User Personas | ⬜ | RESEARCH | Interview users |
27
- | Functional Requirements | ⬜ | EXPAND | Add all FRs |
28
- | Non-Functional Requirements | ⬜ | NUMBERS | Add metrics |
29
- | Dependencies | ⬜ | REVIEW | Check with architect |
30
-
31
- **Quick Stats:**
32
- - Sections Complete: 0/15
33
- - Open Decisions: 0
34
- - Blocked Items: 0
35
-
36
- ---
37
-
38
- ## Executive Summary
39
-
40
- <!-- TODO(DRAFT): Write executive summary
41
- - What is being built?
42
- - Why? (business value, problem being solved)
43
- - Unique value proposition
44
- - 2-3 paragraphs when complete
45
- -->
46
-
47
- [2-3 paragraphs describing:]
48
- - **What** is being built
49
- - **Why** it's being built (business value, problem being solved)
50
- - **Unique value proposition** - what makes this different
51
-
52
- ---
53
-
54
- ## Project Classification
55
-
56
- | Attribute | Value |
57
- |-----------|-------|
58
- | **Technical Type** | API Backend / Web App / Mobile / CLI / Library |
59
- | **Domain** | E-commerce / Fintech / Healthcare / B2B SaaS / etc. |
60
- | **Complexity** | Low / Medium / High |
61
- | **Architecture** | Monolith / Microservices / Modular Monolith |
62
- | **Team Size** | 1-3 / 4-8 / 9+ |
63
- | **Timeline** | Weeks / Months / Quarters |
64
-
65
- ---
66
-
67
- ## Success Criteria
68
-
69
- ### MVP Success (v1.0)
70
-
71
- | Metric | Target | Measurement Method |
72
- |--------|--------|--------------------|
73
- | [Metric 1] | [Target value] | [How to measure] |
74
- | [Metric 2] | [Target value] | [How to measure] |
75
-
76
- ### Growth Success (v1.x)
77
-
78
- | Metric | Target | Measurement Method |
79
- |--------|--------|--------------------|
80
- | [Metric 1] | [Target value] | [How to measure] |
81
-
82
- ---
83
-
84
- ## User Personas
85
-
86
- <!-- TODO(RESEARCH): Validate personas with user interviews
87
- - Schedule 3-5 interviews per persona
88
- - Validate pain points and goals
89
- - Update based on findings
90
- -->
91
-
92
- ### Persona 1: {{persona_name}}
93
-
94
- | Attribute | Description |
95
- |-----------|-------------|
96
- | **Who** | [Who is this user] |
97
- | **Goals** | [What they want to achieve] |
98
- | **Pain Points** | [Current problems they face] |
99
- | **Context** | [When/where they use the product] |
100
- | **Key Requirements** | FR-001, FR-002, FR-010 |
101
-
102
- <!-- TODO(EXPAND): Add persona details
103
- - Demographics
104
- - Technical proficiency
105
- - Frequency of use
106
- -->
107
-
108
- ### Persona 2: {{persona_name}}
109
-
110
- | Attribute | Description |
111
- |-----------|-------------|
112
- | **Who** | [Who is this user] |
113
- | **Goals** | [What they want to achieve] |
114
- | **Pain Points** | [Current problems they face] |
115
- | **Context** | [When/where they use the product] |
116
- | **Key Requirements** | FR-003, FR-004 |
117
-
118
- <!-- TODO(DECISION): Do we need more personas?
119
- - Admin user?
120
- - Support staff?
121
- - Discuss with stakeholders
122
- -->
123
-
124
- ---
125
-
126
- ## User Journeys
127
-
128
- <!-- TODO(DIAGRAM): Add journey diagrams
129
- - Use Mermaid or draw.io
130
- - Show decision points
131
- - Mark pain points
132
- -->
133
-
134
- ### Journey 1: {{journey_name}}
135
-
136
- **Persona:** {{persona}}
137
- **Goal:** {{what user wants to accomplish}}
138
-
139
- ```
140
- Step 1: [User action]
141
- Step 2: [System response]
142
- Step 3: [User action]
143
- Step 4: [System response]
144
- Step 5: [Success state]
145
- ```
146
-
147
- **Requirements Covered:** FR-001, FR-002
148
- **Success Metric:** [How to measure success]
149
-
150
- <!-- TODO(EXPAND): Add error scenarios
151
- - What if step 2 fails?
152
- - What if user abandons at step 3?
153
- -->
154
-
155
- ### Journey 2: {{journey_name}}
156
-
157
- **Persona:** {{persona}}
158
- **Goal:** {{what user wants to accomplish}}
159
-
160
- ```
161
- [Journey steps...]
162
- ```
163
-
164
- **Requirements Covered:** FR-003, FR-004
165
-
166
- <!-- TODO(EXAMPLE): Add real-world scenario
167
- Describe a specific use case with real data
168
- -->
169
-
170
- ---
171
-
172
- ## Product Scope
173
-
174
- ### MVP - Minimum Viable Product
175
-
176
- **Timeline:** [Estimated duration]
177
- **Goal:** [What MVP proves/validates]
178
-
179
- | Feature | Priority | Description | Requirements |
180
- |---------|----------|-------------|--------------|
181
- | [Feature 1] | P0 | [Description] | FR-001, FR-002 |
182
- | [Feature 2] | P0 | [Description] | FR-003 |
183
- | [Feature 3] | P0 | [Description] | FR-004, FR-005 |
184
-
185
- ### Growth Features (Post-MVP)
186
-
187
- | Feature | Priority | Description | Depends On |
188
- |---------|----------|-------------|------------|
189
- | [Feature 4] | P1 | [Description] | MVP |
190
- | [Feature 5] | P1 | [Description] | Feature 4 |
191
-
192
- ### Vision (Future)
193
-
194
- | Feature | Description | Why Not Now |
195
- |---------|-------------|-------------|
196
- | [Feature 6] | [Description] | [Reason] |
197
-
198
- ---
199
-
200
- ## Functional Requirements
201
-
202
- ### Domain 1: {{domain_name}}
203
-
204
- #### FR-001: {{requirement_title}}
205
-
206
- | Attribute | Value |
207
- |-----------|-------|
208
- | **Priority** | P0 / P1 / P2 |
209
- | **Scope** | MVP / Growth / Vision |
210
- | **Source** | [Stakeholder / Document] |
211
- | **Persona** | [Which persona] |
212
- | **Journey** | [Which journey] |
213
-
214
- **Description:**
215
- [Detailed description of the requirement. Must be SMART: Specific, Measurable, Attainable, Relevant, Traceable]
216
-
217
- **Acceptance Criteria:**
218
-
219
- ```gherkin
220
- Given [precondition]
221
- When [action]
222
- Then [expected result]
223
- And [additional verification]
224
- ```
225
-
226
- **Edge Cases:**
227
- - [Edge case 1]
228
- - [Edge case 2]
229
-
230
- **Out of Scope:**
231
- - [What this requirement does NOT include]
232
-
233
- ---
234
-
235
- #### FR-002: {{requirement_title}}
236
-
237
- | Attribute | Value |
238
- |-----------|-------|
239
- | **Priority** | P0 / P1 / P2 |
240
- | **Scope** | MVP / Growth / Vision |
241
-
242
- **Description:**
243
- [Detailed description]
244
-
245
- **Acceptance Criteria:**
246
-
247
- ```gherkin
248
- Given [precondition]
249
- When [action]
250
- Then [expected result]
251
- ```
252
-
253
- ---
254
-
255
- ### Domain 2: {{domain_name}}
256
-
257
- #### FR-010: {{requirement_title}}
258
-
259
- [Same structure as above...]
260
-
261
- ---
262
-
263
- ## Non-Functional Requirements
264
-
265
- <!-- TODO(NUMBERS): Add specific metrics for all NFRs
266
- - Response times (p50, p95, p99)
267
- - Throughput targets
268
- - Availability SLA
269
- - Data retention periods
270
- -->
271
-
272
- <!-- TODO(REVIEW): Review NFRs with architect
273
- - Feasibility check
274
- - Cost implications
275
- - Trade-offs
276
- -->
277
-
278
- ### Performance
279
-
280
- #### NFR-001: {{requirement_title}}
281
-
282
- | Attribute | Value |
283
- |-----------|-------|
284
- | **Priority** | P0 / P1 / P2 |
285
- | **Category** | Response Time / Throughput / Latency |
286
-
287
- **Metric:** [Specific measurable target, e.g., "95th percentile response time < 200ms"]
288
- **Measurement:** [How to verify, e.g., "Load testing with 1000 concurrent users"]
289
- **Rationale:** [Why this target]
290
-
291
- <!-- TODO(NUMBERS): Define specific performance targets
292
- - API response time targets
293
- - Expected concurrent users
294
- - Peak load scenarios
295
- -->
296
-
297
- ---
298
-
299
- ### Security
300
-
301
- #### NFR-010: {{requirement_title}}
302
-
303
- | Attribute | Value |
304
- |-----------|-------|
305
- | **Priority** | P0 / P1 / P2 |
306
- | **Category** | Authentication / Authorization / Data Protection / Compliance |
307
-
308
- **Requirement:** [Specific security requirement]
309
- **Compliance:** [Standards: GDPR, PCI-DSS, SOC2, etc.]
310
- **Verification:** [How to verify compliance]
311
-
312
- ---
313
-
314
- ### Scalability
315
-
316
- #### NFR-020: {{requirement_title}}
317
-
318
- | Attribute | Value |
319
- |-----------|-------|
320
- | **Priority** | P0 / P1 / P2 |
321
- | **Category** | Horizontal / Vertical / Data Volume |
322
-
323
- **Target:** [Specific scalability target]
324
- **Growth Projection:** [Expected growth over time]
325
- **Approach:** [How scalability will be achieved]
326
-
327
- ---
328
-
329
- ### Reliability
330
-
331
- #### NFR-030: {{requirement_title}}
332
-
333
- | Attribute | Value |
334
- |-----------|-------|
335
- | **Priority** | P0 / P1 / P2 |
336
- | **Category** | Availability / Durability / Recovery |
337
-
338
- **Target:** [SLA / Uptime target, e.g., "99.9% availability"]
339
- **RTO:** [Recovery Time Objective]
340
- **RPO:** [Recovery Point Objective]
341
-
342
- ---
343
-
344
- ## Dependencies & Integrations
345
-
346
- <!-- TODO(DEPENDENCY): Waiting for architecture.md
347
- - Integration patterns to be defined
348
- - API contracts to be specified
349
- - Update this section after architecture review
350
- -->
351
-
352
- ### External Systems
353
-
354
- | System | Integration Type | Data Exchanged | Owner | Criticality |
355
- |--------|-----------------|----------------|-------|-------------|
356
- | [System 1] | API / Event / File | [Data description] | [Team] | Critical / Important |
357
- | [System 2] | API / Event / File | [Data description] | [Team] | Critical / Important |
358
-
359
- <!-- TODO(RESEARCH): Document external system APIs
360
- - Get API documentation
361
- - Check rate limits
362
- - Identify authentication method
363
- -->
364
-
365
- ### Third-Party Services
366
-
367
- | Service | Purpose | Criticality | Fallback |
368
- |---------|---------|-------------|----------|
369
- | [Service 1] | [Why needed] | Critical / Important | [Fallback plan] |
370
-
371
- <!-- TODO(DECISION): Select third-party providers
372
- - Payment: Stripe vs Adyen vs LiqPay
373
- - Email: SendGrid vs Mailgun
374
- - Evaluate and document decision
375
- -->
376
-
377
- ### Internal Dependencies
378
-
379
- | Dependency | Description | Status |
380
- |------------|-------------|--------|
381
- | [Module/Service] | [What's needed] | Available / In Progress / Planned |
382
-
383
- <!-- TODO(LINK): Add links to dependent PRDs/docs -->
384
-
385
- ---
386
-
387
- ## Risks & Mitigations
388
-
389
- | # | Risk | Impact | Probability | Mitigation | Owner |
390
- |---|------|--------|-------------|------------|-------|
391
- | 1 | [Risk description] | High/Med/Low | High/Med/Low | [Mitigation strategy] | [Person] |
392
- | 2 | [Risk description] | High/Med/Low | High/Med/Low | [Mitigation strategy] | [Person] |
393
-
394
- ---
395
-
396
- ## Constraints
397
-
398
- ### Technical Constraints
399
- - [Constraint 1: e.g., Must use existing PostgreSQL database]
400
- - [Constraint 2: e.g., Must integrate with legacy authentication system]
401
-
402
- ### Business Constraints
403
- - [Constraint 1: e.g., Budget limited to $X]
404
- - [Constraint 2: e.g., Must comply with regulation Y]
405
-
406
- ### Timeline Constraints
407
- - [Constraint 1: e.g., Must launch before Q2 2024]
408
- - [Constraint 2: e.g., Key milestone by date X]
409
-
410
- ---
411
-
412
- ## Open Questions
413
-
414
- | # | Question | Owner | Due Date | Status | Resolution |
415
- |---|----------|-------|----------|--------|------------|
416
- | 1 | [Question needing decision] | [Person] | [Date] | Open/Resolved | [Answer if resolved] |
417
- | 2 | [Question needing decision] | [Person] | [Date] | Open/Resolved | [Answer if resolved] |
418
-
419
- ---
420
-
421
- ## Assumptions
422
-
423
- | # | Assumption | Risk if Wrong | Validation Plan |
424
- |---|------------|---------------|-----------------|
425
- | 1 | [Assumption made] | [Impact if incorrect] | [How to validate] |
426
- | 2 | [Assumption made] | [Impact if incorrect] | [How to validate] |
427
-
428
- ---
429
-
430
- ## Glossary
431
-
432
- | Term | Definition |
433
- |------|------------|
434
- | [Term 1] | [Definition] |
435
- | [Term 2] | [Definition] |
436
-
437
- ---
438
-
439
- ## Requirements Traceability Matrix
440
-
441
- | Requirement | Source | User Journey | Epic | Story | Status |
442
- |-------------|--------|--------------|------|-------|--------|
443
- | FR-001 | requirements.md | Journey 1 | E01 | S01-01 | Defined |
444
- | FR-002 | requirements.md | Journey 1 | E01 | S01-02 | Defined |
445
- | NFR-001 | requirements.md | - | - | - | Defined |
446
-
447
- ---
448
-
449
- ## Appendix
450
-
451
- ### References
452
- - [Link to requirements document]
453
- - [Link to research findings]
454
- - [Link to competitive analysis]
455
-
456
- ### Related Documents
457
- - Architecture Document: `docs/architecture.md`
458
- - Coding Standards: `docs/coding-standards/`
459
-
460
- ---
461
-
462
- ## Changelog
463
-
464
- <!-- UPDATE AT END OF SESSION: Summarize all changes in one entry -->
465
-
466
- | Version | Date | Author | Changes |
467
- |---------|------|--------|---------|
468
- | 0.1 | {{date}} | @{{user_name}} | Initial draft |
469
-
470
- <!--
471
- Changelog Guidelines:
472
- - Update at END of work session (not on every small change)
473
- - Summarize all changes in one entry
474
- - Be specific but concise
475
- - Version: 0.x=draft, 1.0=approved, 1.x=updates, 2.0=major revision
476
-
477
- Example session entry:
478
- | 1.2 | 2024-01-20 | @pm | Add FR-021 to FR-025; Update success metrics; Clarify MVP scope |
479
- -->
@@ -1,132 +0,0 @@
1
- # Requirements Document
2
-
3
- **Project:** {{project_name}}
4
- **Author:** {{author}}
5
- **Date:** {{date}}
6
- **Version:** 1.0
7
- **Status:** Draft | Review | Approved
8
-
9
- ---
10
-
11
- ## Executive Summary
12
-
13
- [Brief description of what this project aims to achieve and why]
14
-
15
- ## Stakeholders
16
-
17
- | Role | Name | Interest |
18
- |------|------|----------|
19
- | Product Owner | | |
20
- | Tech Lead | | |
21
- | End Users | | |
22
-
23
- ---
24
-
25
- ## Functional Requirements
26
-
27
- ### [Domain Area 1]
28
-
29
- - **FR-001:** [Requirement description]
30
- - **Priority:** P0 | P1 | P2
31
- - **Source:** [stakeholder/document/interview]
32
- - **Acceptance Criteria:**
33
- - Given [precondition]
34
- - When [action]
35
- - Then [expected result]
36
-
37
- - **FR-002:** [Requirement description]
38
- - **Priority:** P0 | P1 | P2
39
- - **Source:** [stakeholder/document/interview]
40
- - **Acceptance Criteria:**
41
- - Given [precondition]
42
- - When [action]
43
- - Then [expected result]
44
-
45
- ### [Domain Area 2]
46
-
47
- - **FR-0XX:** ...
48
-
49
- ---
50
-
51
- ## Non-Functional Requirements
52
-
53
- ### Performance
54
-
55
- - **NFR-001:** [Requirement description]
56
- - **Category:** Performance
57
- - **Metric:** [specific measurable target, e.g., "API response < 100ms p95"]
58
- - **Priority:** P0 | P1 | P2
59
-
60
- ### Security
61
-
62
- - **NFR-0XX:** [Requirement description]
63
- - **Category:** Security
64
- - **Metric:** [specific requirement]
65
- - **Priority:** P0 | P1 | P2
66
-
67
- ### Scalability
68
-
69
- - **NFR-0XX:** [Requirement description]
70
- - **Category:** Scalability
71
- - **Metric:** [specific target, e.g., "Support 10K concurrent users"]
72
- - **Priority:** P0 | P1 | P2
73
-
74
- ### Reliability
75
-
76
- - **NFR-0XX:** [Requirement description]
77
- - **Category:** Reliability
78
- - **Metric:** [specific target, e.g., "99.9% uptime"]
79
- - **Priority:** P0 | P1 | P2
80
-
81
- ---
82
-
83
- ## Constraints
84
-
85
- ### Technical Constraints
86
- - [Constraint 1]
87
- - [Constraint 2]
88
-
89
- ### Business Constraints
90
- - [Constraint 1]
91
- - [Constraint 2]
92
-
93
- ### Timeline Constraints
94
- - [Constraint 1]
95
-
96
- ---
97
-
98
- ## Assumptions
99
-
100
- - [Assumption 1]
101
- - [Assumption 2]
102
-
103
- ---
104
-
105
- ## Dependencies
106
-
107
- | Dependency | Type | Owner | Risk |
108
- |------------|------|-------|------|
109
- | [External system] | Integration | [Team] | [H/M/L] |
110
-
111
- ---
112
-
113
- ## Open Questions
114
-
115
- - [ ] [Question 1]
116
- - [ ] [Question 2]
117
-
118
- ---
119
-
120
- ## Glossary
121
-
122
- | Term | Definition |
123
- |------|------------|
124
- | | |
125
-
126
- ---
127
-
128
- ## Revision History
129
-
130
- | Version | Date | Author | Changes |
131
- |---------|------|--------|---------|
132
- | 1.0 | {{date}} | {{author}} | Initial draft |