@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,255 @@
1
+ # OpenCode Workflow Architecture
2
+
3
+ ## Separation of Concerns: Commands vs Agents vs Skills
4
+
5
+ ### Commands (Entry Points)
6
+
7
+ **Purpose:** User-triggered actions, workflow entry points
8
+ **Location:** `.opencode/commands/`
9
+ **Invocation:** `/command [args]`
10
+
11
+ Commands are **thin wrappers** that:
12
+ 1. Parse arguments
13
+ 2. Check prerequisites
14
+ 3. Invoke appropriate agent
15
+ 4. Agent loads necessary skills
16
+
17
+ ```yaml
18
+ # Command structure
19
+ /requirements:
20
+ args: [topic]
21
+ agent: analyst # WHO does the work
22
+ # Agent decides WHAT skills to load
23
+ ```
24
+
25
+ ### Agents (Personas/Roles)
26
+
27
+ **Purpose:** Specialized personas with domain expertise
28
+ **Location:** `.opencode/agents/`
29
+ **Invocation:** Automatically by commands or via `@agent`
30
+
31
+ Agents are **pure personas** that:
32
+ 1. Have specific expertise domain
33
+ 2. Know WHEN to use which skills
34
+ 3. Have appropriate tool permissions
35
+ 4. Maintain consistent communication style
36
+
37
+ ```yaml
38
+ # Agent = WHO (persona)
39
+ analyst:
40
+ expertise: Requirements engineering
41
+ personality: Methodical, thorough, asks clarifying questions
42
+ skills_knowledge: Knows about requirements-gathering, validation skills
43
+ # Does NOT contain HOW-TO instructions
44
+ ```
45
+
46
+ ### Skills (Reusable Knowledge)
47
+
48
+ **Purpose:** Reusable how-to instructions, templates, processes
49
+ **Location:** `.opencode/skills/`
50
+ **Invocation:** `skill({ name: "skill-name" })` by agents
51
+
52
+ Skills are **knowledge modules** that:
53
+ 1. Describe HOW to do something specific
54
+ 2. Include templates, checklists, examples
55
+ 3. Are agent-agnostic (any agent can use)
56
+ 4. Are loaded on-demand
57
+
58
+ ```yaml
59
+ # Skill = HOW (knowledge)
60
+ prd-writing:
61
+ what: How to write a PRD
62
+ includes: Template, structure, validation checklist
63
+ # Can be used by: pm, analyst, architect
64
+ ```
65
+
66
+ ---
67
+
68
+ ## Proposed Structure
69
+
70
+ ### Commands (9 total)
71
+
72
+ | Command | Purpose | Agent | Skills Used |
73
+ |---------|---------|-------|-------------|
74
+ | `/requirements` | Start requirements gathering | analyst | requirements-gathering |
75
+ | `/prd` | Create/edit PRD | pm | prd-writing, requirements-tracing |
76
+ | `/architecture` | Create/edit architecture | architect | architecture-design, adr-writing |
77
+ | `/epics` | Create epics | sm | epic-writing, sprint-planning |
78
+ | `/stories` | Create stories for epic | sm | story-writing |
79
+ | `/sprint-plan` | Plan sprints | sm | sprint-planning |
80
+ | `/validate` | Validate artifacts | architect | validation-* |
81
+ | `/jira-sync` | Sync to Jira | sm | jira-integration |
82
+ | `/workflow-status` | Show status | sm | - |
83
+
84
+ ### Agents (4 total - pure personas)
85
+
86
+ | Agent | Expertise | Personality |
87
+ |-------|-----------|-------------|
88
+ | `analyst` | Requirements engineering | Methodical, asks questions, uncovers hidden needs |
89
+ | `pm` | Product management | Business-focused, prioritizes, defines scope |
90
+ | `architect` | System design | Technical, patterns-focused, trade-off aware |
91
+ | `sm` | Sprint management | Organized, breaks down work, tracks progress |
92
+
93
+ **Note:** `jira-sync` becomes a **skill**, not an agent.
94
+
95
+ ### Skills (15+ total)
96
+
97
+ #### Requirements Skills
98
+ | Skill | Purpose |
99
+ |-------|---------|
100
+ | `requirements-gathering` | How to interview stakeholders, extract FR/NFR |
101
+ | `requirements-validation` | How to validate requirements (SMART, no conflicts) |
102
+
103
+ #### PRD Skills
104
+ | Skill | Purpose |
105
+ |-------|---------|
106
+ | `prd-writing` | How to write PRD (template, sections, examples) |
107
+ | `prd-validation` | How to validate PRD completeness |
108
+ | `acceptance-criteria` | How to write testable AC (Given/When/Then) |
109
+
110
+ #### Architecture Skills
111
+ | Skill | Purpose |
112
+ |-------|---------|
113
+ | `architecture-design` | How to design system architecture |
114
+ | `adr-writing` | How to write Architecture Decision Records |
115
+ | `architecture-validation` | How to validate architecture |
116
+ | `data-modeling` | How to design database schemas |
117
+ | `api-design` | How to design REST APIs |
118
+ | `event-design` | How to design event schemas |
119
+
120
+ #### Sprint Skills
121
+ | Skill | Purpose |
122
+ |-------|---------|
123
+ | `epic-writing` | How to write epics with AC |
124
+ | `story-writing` | How to write user stories with AC |
125
+ | `sprint-planning` | How to plan and organize sprints |
126
+ | `git-branching` | How to create feature branches |
127
+
128
+ #### Integration Skills
129
+ | Skill | Purpose |
130
+ |-------|---------|
131
+ | `jira-integration` | How to sync with Jira API |
132
+ | `integration-testing` | How to write integration test specs |
133
+
134
+ ---
135
+
136
+ ## Directory Structure
137
+
138
+ ```
139
+ .opencode/
140
+ ├── FLOW.yaml # Workflow definition
141
+ ├── ARCHITECTURE.md # This file
142
+ ├── opencode.json # Config (models, permissions)
143
+
144
+ ├── commands/ # Entry points (thin)
145
+ │ ├── requirements.md
146
+ │ ├── prd.md
147
+ │ ├── architecture.md
148
+ │ ├── epics.md
149
+ │ ├── stories.md
150
+ │ ├── sprint-plan.md
151
+ │ ├── validate.md
152
+ │ ├── jira-sync.md
153
+ │ └── workflow-status.md
154
+
155
+ ├── agents/ # Personas (who)
156
+ │ ├── analyst.md # Requirements Analyst
157
+ │ ├── pm.md # Product Manager
158
+ │ ├── architect.md # Solution Architect
159
+ │ └── sm.md # Sprint Manager
160
+
161
+ ├── skills/ # Knowledge (how)
162
+ │ ├── requirements-gathering/
163
+ │ │ └── SKILL.md
164
+ │ ├── requirements-validation/
165
+ │ │ └── SKILL.md
166
+ │ ├── prd-writing/
167
+ │ │ └── SKILL.md
168
+ │ ├── prd-validation/
169
+ │ │ └── SKILL.md
170
+ │ ├── acceptance-criteria/
171
+ │ │ └── SKILL.md
172
+ │ ├── architecture-design/
173
+ │ │ └── SKILL.md
174
+ │ ├── adr-writing/
175
+ │ │ └── SKILL.md
176
+ │ ├── architecture-validation/
177
+ │ │ └── SKILL.md
178
+ │ ├── epic-writing/
179
+ │ │ └── SKILL.md
180
+ │ ├── story-writing/
181
+ │ │ └── SKILL.md
182
+ │ ├── sprint-planning/
183
+ │ │ └── SKILL.md
184
+ │ ├── jira-integration/
185
+ │ │ └── SKILL.md
186
+ │ └── integration-testing/
187
+ │ └── SKILL.md
188
+
189
+ └── templates/ # Referenced by skills
190
+ ├── requirements-template.md
191
+ ├── prd-template.md
192
+ ├── architecture-template.md
193
+ ├── epic-template.md
194
+ ├── story-template.md
195
+ └── ...
196
+ ```
197
+
198
+ ---
199
+
200
+ ## Flow Example: `/prd` command
201
+
202
+ ```
203
+ User: /prd create
204
+
205
+ 1. Command (prd.md) parses args, checks prerequisites
206
+ └─> Invokes agent: pm
207
+
208
+ 2. Agent (pm) receives task "create PRD"
209
+ └─> Loads skill: prd-writing
210
+ └─> Skill provides: template, structure, checklist
211
+ └─> PM uses expertise to fill content
212
+ └─> Loads skill: acceptance-criteria (for writing AC)
213
+ └─> Loads skill: requirements-tracing (to ensure coverage)
214
+
215
+ 3. PM produces: docs/prd.md
216
+
217
+ 4. User: /validate prd
218
+ └─> Command invokes: architect
219
+ └─> Architect loads skill: prd-validation
220
+ └─> Validates and produces report
221
+ ```
222
+
223
+ ---
224
+
225
+ ## Benefits of This Separation
226
+
227
+ 1. **Reusability** - Skills can be used by multiple agents
228
+ 2. **Maintainability** - Update skill once, all agents get update
229
+ 3. **Clarity** - Clear who does what and how
230
+ 4. **Flexibility** - Easy to add new skills without changing agents
231
+ 5. **Testability** - Skills can be tested independently
232
+ 6. **Composability** - Agents compose skills as needed
233
+
234
+ ---
235
+
236
+ ## Migration Plan
237
+
238
+ ### Phase 1: Create Skills Structure
239
+ 1. Create `.opencode/skills/` directory
240
+ 2. Extract templates into skill folders
241
+ 3. Write SKILL.md for each skill
242
+
243
+ ### Phase 2: Simplify Agents
244
+ 1. Remove how-to content from agents
245
+ 2. Keep only: persona, expertise, personality
246
+ 3. Add skill awareness to agent prompts
247
+
248
+ ### Phase 3: Update Commands
249
+ 1. Make commands thinner
250
+ 2. Remove duplicate instructions
251
+ 3. Let agents decide which skills to load
252
+
253
+ ### Phase 4: Update FLOW.yaml
254
+ 1. Add skills section
255
+ 2. Map commands → agents → skills