@comfanion/workflow 4.3.0 → 4.5.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.
@@ -31,7 +31,7 @@ config:
31
31
  # =============================================================================
32
32
  #
33
33
  # PLANNING PHASE:
34
- # research (opt) → requirements → prd → coding-standards → architecture → module-docs (opt)
34
+ # research (opt) → requirements → prd → coding-standards → architecture
35
35
  #
36
36
  # SPRINT PHASE:
37
37
  # epics → stories → sprint-plan → jira-sync
@@ -145,26 +145,6 @@ pipeline:
145
145
  description: Integration test specifications
146
146
  template: skills/test-design/template-integration.md
147
147
  mandatory: true
148
- next: module-docs
149
-
150
- # OPTIONAL: Detailed module documentation
151
- - id: module-docs
152
- name: Module Documentation (Optional)
153
- description: Create detailed docs for each module
154
- phase: planning
155
- optional: true
156
- command: /module-docs [module-name]
157
- agent: module-docs
158
- skills:
159
- - module-documentation
160
- artifacts:
161
- input:
162
- - docs/architecture.md
163
- - docs/prd.md
164
- output:
165
- - docs/architecture/[module]/index.md
166
- - docs/architecture/[module]/architecture.md
167
- - docs/architecture/[module]/data-model.md
168
148
  next: epics
169
149
 
170
150
  # =========================================================================
@@ -176,7 +156,7 @@ pipeline:
176
156
  description: Break PRD into implementation epics
177
157
  phase: sprint
178
158
  command: /epics
179
- agent: sm
159
+ agent: pm
180
160
  skills:
181
161
  - epic-writing
182
162
  - acceptance-criteria
@@ -199,7 +179,7 @@ pipeline:
199
179
  description: Create detailed stories for each epic
200
180
  phase: sprint
201
181
  command: /stories {epic-id}
202
- agent: sm
182
+ agent: pm
203
183
  skills:
204
184
  - story-writing
205
185
  - acceptance-criteria
@@ -221,7 +201,7 @@ pipeline:
221
201
  description: Organize epics and stories into sprints
222
202
  phase: sprint
223
203
  command: /sprint-plan
224
- agent: sm
204
+ agent: pm
225
205
  skills:
226
206
  - sprint-planning
227
207
  artifacts:
@@ -234,7 +214,7 @@ pipeline:
234
214
  description: Sync epics/stories/tasks to Jira with development control
235
215
  phase: sprint
236
216
  command: /jira-sync [links...]
237
- agent: sm
217
+ agent: pm
238
218
  skills:
239
219
  - jira-integration
240
220
  artifacts:
@@ -277,7 +257,6 @@ pipeline:
277
257
  - Implementation code
278
258
  - Unit tests
279
259
  - Integration tests
280
- workflow: workflows/dev-story/instructions.md
281
260
  jira_integration:
282
261
  on_start: "transition to in_progress, create branch"
283
262
  on_review: "transition to review, link PR"
@@ -305,7 +284,7 @@ pipeline:
305
284
  description: Review sprint and capture learnings
306
285
  phase: implementation
307
286
  command: /retrospective
308
- agent: sm
287
+ agent: pm
309
288
  artifacts:
310
289
  output:
311
290
  - docs/sprint-artifacts/sprint-N/retrospective.md
@@ -313,6 +292,14 @@ pipeline:
313
292
  # =============================================================================
314
293
  # AGENTS (Personas - WHO does work)
315
294
  # =============================================================================
295
+ #
296
+ # Model Strategy (based on Jan 2026 research):
297
+ # - Architecture/Planning: Claude 4.5 Opus, Gemini 3 Pro (wisdom, context)
298
+ # - Development: DeepSeek-V3.2 (cheapest, fast), GLM-4.7 (preserved thinking)
299
+ # - Testing: GPT-5.2 Codex (best at finding bugs)
300
+ # - UI/Frontend: MiniMax-M2.1 (fast, aesthetic)
301
+ # - Research: Gemini 3 Pro (10M context, grounding)
302
+ #
316
303
  agents:
317
304
  analyst:
318
305
  name: Mary
@@ -332,13 +319,14 @@ agents:
332
319
  - requirements-gathering
333
320
  - requirements-validation
334
321
  - acceptance-criteria
322
+ - unit-writing
335
323
  - methodologies
336
324
 
337
325
  pm:
338
326
  name: John
339
327
  title: Product Manager
340
328
  icon: "📋"
341
- description: Product Manager - creates PRDs, defines scope, prioritizes features
329
+ description: Product Manager - creates PRDs, epics, stories, sprint planning, Jira sync
342
330
  mode: subagent
343
331
  model: anthropic/claude-sonnet-4-20250514
344
332
  temperature: 0.3
@@ -346,12 +334,18 @@ agents:
346
334
  expertise:
347
335
  - Product management
348
336
  - B2B SaaS
349
- - Marketplace platforms
337
+ - Agile/Sprint planning
350
338
  personality: Business-focused, user-centric, data-driven
351
339
  skills_used:
352
340
  - prd-writing
353
341
  - prd-validation
354
342
  - acceptance-criteria
343
+ - epic-writing
344
+ - story-writing
345
+ - sprint-planning
346
+ - jira-integration
347
+ - unit-writing
348
+ - translation
355
349
  - methodologies
356
350
 
357
351
  architect:
@@ -373,29 +367,9 @@ agents:
373
367
  - architecture-validation
374
368
  - adr-writing
375
369
  - coding-standards
370
+ - unit-writing
376
371
  - methodologies
377
372
 
378
- sm:
379
- name: Sarah
380
- title: Sprint Manager
381
- icon: "📊"
382
- description: Sprint Manager - creates epics/stories, plans sprints, tracks progress
383
- mode: subagent
384
- model: anthropic/claude-sonnet-4-20250514
385
- temperature: 0.2
386
- file: agents/sm.md
387
- expertise:
388
- - Agile project management
389
- - Sprint planning
390
- - Backlog management
391
- personality: Organized, detail-oriented, pragmatic
392
- skills_used:
393
- - epic-writing
394
- - story-writing
395
- - sprint-planning
396
- - jira-integration
397
- - acceptance-criteria
398
-
399
373
  dev:
400
374
  name: Amelia
401
375
  title: Senior Developer
@@ -422,35 +396,21 @@ agents:
422
396
  icon: "🔍"
423
397
  description: Researcher - conducts technical, market, and domain research
424
398
  mode: subagent
425
- model: anthropic/claude-sonnet-4-20250514
399
+ model: google/gemini-3-pro:high # 10M context, grounding, planning: 10/10
400
+ # $2/Mt input - best for research & planning
401
+ # alternatives: gemini-2.5-flash (faster), claude-4.5-opus (wiser)
426
402
  temperature: 0.4
427
403
  file: agents/researcher.md
428
404
  expertise:
429
405
  - Technical research
430
406
  - Market analysis
431
407
  - Domain expertise
408
+ - Deep research with web grounding
432
409
  personality: Curious, thorough, evidence-based
433
410
  skills_used:
434
411
  - research-methodology
435
412
  - methodologies
436
413
 
437
- module-docs:
438
- name: Marcus
439
- title: Module Documenter
440
- icon: "📚"
441
- description: Module Documenter - creates detailed per-module documentation
442
- mode: subagent
443
- model: anthropic/claude-sonnet-4-20250514
444
- temperature: 0.2
445
- file: agents/module-docs.md
446
- expertise:
447
- - Technical writing
448
- - System documentation
449
- - API documentation
450
- personality: Precise, structured, detail-oriented
451
- skills_used:
452
- - module-documentation
453
-
454
414
  change-manager:
455
415
  name: Charles
456
416
  title: Change Manager
@@ -501,7 +461,7 @@ skills:
501
461
  acceptance-criteria:
502
462
  description: How to write testable AC (Given/When/Then)
503
463
  file: skills/acceptance-criteria/SKILL.md
504
- used_by: [analyst, pm, sm]
464
+ used_by: [analyst, pm]
505
465
 
506
466
  # Architecture Skills
507
467
  architecture-design:
@@ -532,25 +492,25 @@ skills:
532
492
  epic-writing:
533
493
  description: How to write epics with AC
534
494
  file: skills/epic-writing/SKILL.md
535
- used_by: [sm]
495
+ used_by: [pm]
536
496
  produces: docs/sprint-artifacts/*/epic-*.md
537
497
 
538
498
  story-writing:
539
499
  description: How to write user stories with AC and tasks
540
500
  file: skills/story-writing/SKILL.md
541
- used_by: [sm]
501
+ used_by: [pm]
542
502
  produces: docs/sprint-artifacts/*/stories/story-*.md
543
503
 
544
504
  sprint-planning:
545
505
  description: How to plan and organize sprints
546
506
  file: skills/sprint-planning/SKILL.md
547
- used_by: [sm]
507
+ used_by: [pm]
548
508
  produces: docs/sprint-artifacts/sprint-status.yaml
549
509
 
550
510
  jira-integration:
551
511
  description: Bidirectional Jira sync with development control
552
512
  file: skills/jira-integration/SKILL.md
553
- used_by: [sm, dev]
513
+ used_by: [pm, dev]
554
514
  cache: "{project-root}/.opencode/jira-cache.yaml"
555
515
  produces: docs/sprint-artifacts/jira-sync-report.md
556
516
  modes:
@@ -566,7 +526,7 @@ skills:
566
526
  # Implementation Skills
567
527
  dev-story:
568
528
  description: How to implement stories using red-green-refactor
569
- file: workflows/dev-story/instructions.md
529
+ file: skills/dev-story/SKILL.md
570
530
  used_by: [dev]
571
531
 
572
532
  code-review:
@@ -586,16 +546,16 @@ skills:
586
546
  used_by: [researcher]
587
547
  produces: docs/research/
588
548
 
589
- module-documentation:
590
- description: How to create detailed module documentation
591
- file: skills/module-documentation/SKILL.md
592
- used_by: [module-docs]
593
- produces: docs/architecture/[module]/
549
+ unit-writing:
550
+ description: How to document modules, domains, entities, services, features using Universal Unit format
551
+ file: skills/unit-writing/SKILL.md
552
+ used_by: [analyst, architect, pm]
553
+ produces: docs/units/[unit-name]/
594
554
 
595
555
  archiving:
596
556
  description: How to archive documents properly
597
557
  file: skills/archiving/SKILL.md
598
- used_by: [sm, architect]
558
+ used_by: [pm, architect]
599
559
  produces: docs/archive/
600
560
 
601
561
  diagram-creation:
@@ -617,7 +577,7 @@ skills:
617
577
  doc-todo:
618
578
  description: Incremental document writing with TODO placeholders
619
579
  file: skills/doc-todo/SKILL.md
620
- used_by: [analyst, pm, architect, sm]
580
+ used_by: [analyst, pm, architect]
621
581
  types:
622
582
  - DRAFT # Section is draft, needs review
623
583
  - EXPAND # Section needs more detail
@@ -633,7 +593,7 @@ skills:
633
593
  changelog:
634
594
  description: Maintain changelogs for repository and documents
635
595
  file: skills/changelog/SKILL.md
636
- used_by: [dev, sm, pm, architect]
596
+ used_by: [dev, pm, architect]
637
597
  mandatory: true
638
598
  artifacts:
639
599
  repo: CHANGELOG.md
@@ -686,13 +646,13 @@ commands:
686
646
  # Sprint Commands
687
647
  epics:
688
648
  description: Create epics from PRD
689
- agent: sm
649
+ agent: pm
690
650
  file: commands/epics.md
691
651
  skills_loaded: [epic-writing, acceptance-criteria]
692
652
 
693
653
  stories:
694
654
  description: Create stories for epic
695
- agent: sm
655
+ agent: pm
696
656
  file: commands/stories.md
697
657
  arguments:
698
658
  - name: epic-id
@@ -701,13 +661,13 @@ commands:
701
661
 
702
662
  sprint-plan:
703
663
  description: Plan sprints
704
- agent: sm
664
+ agent: pm
705
665
  file: commands/sprint-plan.md
706
666
  skills_loaded: [sprint-planning]
707
667
 
708
668
  jira-sync:
709
669
  description: Sync to Jira
710
- agent: sm
670
+ agent: pm
711
671
  file: commands/jira-sync.md
712
672
  skills_loaded: [jira-integration]
713
673
 
@@ -742,7 +702,7 @@ commands:
742
702
 
743
703
  workflow-status:
744
704
  description: Show workflow status
745
- agent: sm
705
+ agent: pm
746
706
  file: commands/workflow-status.md
747
707
 
748
708
  research:
@@ -755,13 +715,16 @@ commands:
755
715
  - name: topic
756
716
  required: true
757
717
 
758
- module-docs:
759
- description: Create module documentation
760
- agent: module-docs
761
- file: commands/module-docs.md
718
+ unit-docs:
719
+ description: Document module/domain/service/feature using Universal Unit format
720
+ agent: architect
721
+ file: commands/unit-docs.md
762
722
  arguments:
763
- - name: module-name
723
+ - name: unit-type
724
+ values: [module, domain, service, entity, feature]
725
+ - name: unit-name
764
726
  required: true
727
+ skills_loaded: [unit-writing]
765
728
 
766
729
  change:
767
730
  description: Manage documentation changes
@@ -898,3 +861,95 @@ quickstart:
898
861
  - step: 18
899
862
  command: /retrospective
900
863
  description: Sprint retrospective
864
+
865
+ # =============================================================================
866
+ # HOOKS & EVENTS (Plugin Integration)
867
+ # =============================================================================
868
+ #
869
+ # Workflow emits events that plugins can subscribe to.
870
+ # Plugins are in .opencode/plugins/ directory.
871
+ #
872
+ hooks:
873
+ # Compaction hook - preserve context during session compaction
874
+ compaction:
875
+ plugin: custom-compaction.ts
876
+ description: Preserves task/story status, critical files, continuation instructions
877
+ context_files:
878
+ always:
879
+ - CLAUDE.md
880
+ - AGENTS.md
881
+ - project-context.md
882
+ - .opencode/config.yaml
883
+ if_exists:
884
+ - docs/prd.md
885
+ - docs/architecture.md
886
+ - docs/coding-standards/README.md
887
+ - docs/coding-standards/patterns.md
888
+ dynamic:
889
+ - active_story_file # From sprint-status.yaml
890
+ - modified_files # Files edited in session
891
+
892
+ events:
893
+ # Session lifecycle
894
+ session:
895
+ - session.started # New session began
896
+ - session.idle # Agent finished responding
897
+ - session.compacted # Session was compacted
898
+ - session.error # Error occurred
899
+
900
+ # Agent lifecycle
901
+ agent:
902
+ - agent.activated # Agent persona loaded
903
+ - agent.skill.loaded # Skill file was read
904
+ - agent.task.started # Agent started a task
905
+ - agent.task.completed # Agent completed a task
906
+
907
+ # Workflow pipeline
908
+ workflow:
909
+ - workflow.stage.started # Pipeline stage began
910
+ - workflow.stage.completed # Pipeline stage finished
911
+ - workflow.stage.skipped # Optional stage skipped
912
+ - workflow.validation.passed # Validation succeeded
913
+ - workflow.validation.failed # Validation failed
914
+
915
+ # Document lifecycle
916
+ document:
917
+ - document.created # New doc created
918
+ - document.updated # Doc modified
919
+ - document.validated # Doc passed validation
920
+ - document.archived # Doc moved to archive
921
+
922
+ # Sprint/Story lifecycle
923
+ sprint:
924
+ - epic.created # Epic document created
925
+ - story.created # Story document created
926
+ - story.started # Story status → in-progress
927
+ - story.task.completed # Task marked [x]
928
+ - story.completed # All tasks done, status → review
929
+ - story.approved # Code review passed, status → done
930
+ - sprint.planned # Sprint planning completed
931
+ - sprint.completed # All stories done
932
+
933
+ # Jira integration
934
+ jira:
935
+ - jira.sync.started # Sync began
936
+ - jira.sync.completed # Sync finished
937
+ - jira.issue.created # New issue in Jira
938
+ - jira.issue.updated # Issue updated
939
+ - jira.transition # Status changed
940
+
941
+ # Example plugin subscriptions
942
+ #
943
+ # .opencode/plugins/notifications.ts:
944
+ # event: async ({ event }) => {
945
+ # if (event.type === "story.completed") {
946
+ # await sendSlackNotification(event.data)
947
+ # }
948
+ # }
949
+ #
950
+ # .opencode/plugins/jira-auto-sync.ts:
951
+ # event: async ({ event }) => {
952
+ # if (event.type === "story.task.completed") {
953
+ # await updateJiraProgress(event.data)
954
+ # }
955
+ # }
@@ -1,13 +1,27 @@
1
1
  ---
2
- description: "Business Analyst - Use for: gathering requirements, validating requirements, brainstorming. Has skills: requirements-gathering, requirements-validation"
3
- mode: all
2
+ description: "Business Analyst - Use for: gathering requirements, validating requirements, brainstorming. Has skills: requirements-gathering, requirements-validation, acceptance-criteria, methodologies"
3
+ mode: all # Can be primary agent or invoked via @analyst
4
+ temperature: 0.3
5
+
6
+ # Tools - what this agent can use
4
7
  tools:
8
+ read: true
5
9
  write: true
6
10
  edit: true
7
- bash: false
8
11
  glob: true
9
12
  grep: true
10
- read: true
13
+ list: true
14
+ skill: true
15
+ question: true
16
+ bash: false # No shell commands needed
17
+ webfetch: true # Use @researcher for web research
18
+ todowrite: true # Track complex requirements gathering
19
+ todoread: true
20
+
21
+ # Permissions - granular control
22
+ permission:
23
+ edit: allow # Can write documentation
24
+ bash: deny # No bash access
11
25
  ---
12
26
 
13
27
  <agent id="analyst" name="Mary" title="Business Analyst" icon="📊">
@@ -16,18 +30,17 @@ tools:
16
30
  <step n="1">Load persona from this agent file</step>
17
31
  <step n="2">IMMEDIATE: Load .opencode/config.yaml - store {user_name}, {communication_language}</step>
18
32
  <step n="3">Greet user by {user_name}, communicate in {communication_language}</step>
19
- <step n="4">Display numbered menu, WAIT for user input</step>
20
- <step n="5">On input: Number execute | Text → fuzzy match | No match → "Not recognized"</step>
21
- <step n="6">For menu items with skill attribute: Load .opencode/skills/{skill-name}/SKILL.md and follow instructions</step>
33
+ <step n="4">Understand user request and select appropriate skill</step>
34
+ <step n="5">Load .opencode/skills/{skill-name}/SKILL.md and follow instructions</step>
22
35
 
23
36
  <rules>
24
37
  <r>ALWAYS communicate in {communication_language}</r>
25
38
  <r>ALWAYS write technical documentation in ENGLISH (docs/ folder)</r>
26
39
  <r>Translations go to docs/confluence/ folder</r>
27
- <r>Stay in character until exit</r>
28
40
  <r>When asking questions, use structured elicitation techniques</r>
29
41
  <r>Always validate requirements against SMART criteria</r>
30
42
  <r>Never assume - always ask clarifying questions</r>
43
+ <r>Find and use `**/project-context.md` as source of truth if exists</r>
31
44
  </rules>
32
45
  </activation>
33
46
 
@@ -44,21 +57,11 @@ tools:
44
57
  </principles>
45
58
  </persona>
46
59
 
47
- <menu>
48
- <item cmd="MH or menu">[MH] 📋 Menu Help</item>
49
- <item cmd="CH or chat">[CH] 💬 Chat with Agent</item>
50
- <item cmd="RQ or requirements" skill="requirements-gathering">[RQ] 📝 Gather Requirements (FR/NFR through interviews)</item>
51
- <item cmd="VR or validate" skill="requirements-validation">[VR] ✅ Validate Requirements (SMART criteria)</item>
52
- <item cmd="RS or research" skill="research-methodology">[RS] 🔍 Conduct Research (market, domain, competitive)</item>
53
- <item cmd="BR or brainstorm">[BR] 💡 Brainstorming Session</item>
54
- <item cmd="CL or clarify">[CL] ❓ Clarify Requirements</item>
55
- <item cmd="DA or exit">[DA] 👋 Dismiss Agent</item>
56
- </menu>
57
-
58
- <skills hint="Load from .opencode/skills/{name}/SKILL.md when executing menu item">
60
+ <skills hint="Load from .opencode/skills/{name}/SKILL.md based on task">
59
61
  <skill name="requirements-gathering">Interview techniques, question frameworks, FR/NFR output</skill>
60
62
  <skill name="requirements-validation">SMART validation, conflict detection, completeness</skill>
61
63
  <skill name="acceptance-criteria">Given/When/Then format, testable AC</skill>
64
+ <skill name="unit-writing">Document domains, entities using Universal Unit format</skill>
62
65
  <skill name="methodologies">User Interviews, Empathy Mapping, Journey Mapping, Five Whys</skill>
63
66
  </skills>
64
67
 
@@ -79,6 +82,7 @@ tools:
79
82
  - Validate requirements (SMART, no conflicts)
80
83
  - Conduct market/domain/competitive research
81
84
  - Guide brainstorming sessions
85
+ - Write acceptance criteria
82
86
 
83
87
  **What I Don't Do:**
84
88
  - Make technical architecture decisions (→ @architect)