@codemcp/workflows 6.20.2 → 6.22.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 (135) hide show
  1. package/package.json +2 -2
  2. package/packages/cli/dist/{chunk-4N42FFJE.js → chunk-QMPDZD7D.js} +117 -2674
  3. package/packages/cli/dist/{cli-MFHC7UWY.js → cli-CY4PLNWR.js} +475 -34
  4. package/packages/cli/dist/{dist-ISN3FRV4.js → dist-6BKGI5U7.js} +91 -8
  5. package/packages/cli/dist/{dist-TDV3DJ2J.js → dist-S4HQ3JQN.js} +3 -1
  6. package/packages/cli/dist/index.js +2 -2
  7. package/packages/cli/package.json +5 -2
  8. package/packages/cli/resources/templates/opencode-agents/coding.md.tmpl +13 -0
  9. package/packages/cli/resources/templates/opencode-agents/research.md.tmpl +13 -0
  10. package/packages/cli/resources/templates/opencode-agents/thinking.md.tmpl +13 -0
  11. package/packages/cli/resources/workflows/bugfix.yaml +6 -0
  12. package/packages/cli/resources/workflows/epcc.yaml +3 -0
  13. package/packages/cli/resources/workflows/greenfield.yaml +3 -0
  14. package/packages/cli/resources/workflows/pr-review.yaml +2 -0
  15. package/packages/cli/resources/workflows/qrspi.yaml +5 -0
  16. package/packages/cli/resources/workflows/tdd.yaml +3 -0
  17. package/packages/cli/resources/workflows/waterfall.yaml +3 -0
  18. package/packages/core/dist/capability-hint.d.ts +28 -0
  19. package/packages/core/dist/capability-hint.js +52 -0
  20. package/packages/core/dist/capability-hint.js.map +1 -0
  21. package/packages/core/dist/config-manager.d.ts +19 -0
  22. package/packages/core/dist/config-manager.js +26 -0
  23. package/packages/core/dist/config-manager.js.map +1 -1
  24. package/packages/core/dist/index.d.ts +1 -0
  25. package/packages/core/dist/index.js +1 -0
  26. package/packages/core/dist/index.js.map +1 -1
  27. package/packages/core/dist/instruction-generator.js +7 -1
  28. package/packages/core/dist/instruction-generator.js.map +1 -1
  29. package/packages/core/dist/interfaces/instruction-generator.interface.d.ts +14 -0
  30. package/packages/core/dist/state-machine-types.d.ts +7 -0
  31. package/packages/core/dist/system-prompt-generator.js +26 -4
  32. package/packages/core/dist/system-prompt-generator.js.map +1 -1
  33. package/packages/core/package.json +1 -1
  34. package/packages/core/resources/templates/opencode-agents/coding.md.tmpl +13 -0
  35. package/packages/core/resources/templates/opencode-agents/research.md.tmpl +13 -0
  36. package/packages/core/resources/templates/opencode-agents/thinking.md.tmpl +13 -0
  37. package/packages/core/resources/workflows/bugfix.yaml +6 -0
  38. package/packages/core/resources/workflows/epcc.yaml +3 -0
  39. package/packages/core/resources/workflows/greenfield.yaml +3 -0
  40. package/packages/core/resources/workflows/pr-review.yaml +2 -0
  41. package/packages/core/resources/workflows/qrspi.yaml +5 -0
  42. package/packages/core/resources/workflows/tdd.yaml +3 -0
  43. package/packages/core/resources/workflows/waterfall.yaml +3 -0
  44. package/packages/docs/.vitepress/dist/404.html +1 -1
  45. package/packages/docs/.vitepress/dist/assets/user_capability-routing.md.DbNKvMiS.js +15 -0
  46. package/packages/docs/.vitepress/dist/assets/user_capability-routing.md.DbNKvMiS.lean.js +1 -0
  47. package/packages/docs/.vitepress/dist/dev/ARCHITECTURE.html +2 -2
  48. package/packages/docs/.vitepress/dist/dev/DEVELOPMENT.html +2 -2
  49. package/packages/docs/.vitepress/dist/dev/LOGGING.html +2 -2
  50. package/packages/docs/.vitepress/dist/dev/PUBLISHING.html +2 -2
  51. package/packages/docs/.vitepress/dist/hashmap.json +1 -1
  52. package/packages/docs/.vitepress/dist/index.html +2 -2
  53. package/packages/docs/.vitepress/dist/user/advanced-engineering.html +3 -3
  54. package/packages/docs/.vitepress/dist/user/agent-setup.html +3 -3
  55. package/packages/docs/.vitepress/dist/user/beads-integration.html +2 -2
  56. package/packages/docs/.vitepress/dist/user/capability-routing.html +40 -0
  57. package/packages/docs/.vitepress/dist/user/crowd-mcp-integration.html +2 -2
  58. package/packages/docs/.vitepress/dist/user/custom-workflows.html +2 -2
  59. package/packages/docs/.vitepress/dist/user/git-commit-feature.html +2 -2
  60. package/packages/docs/.vitepress/dist/user/how-it-works.html +2 -2
  61. package/packages/docs/.vitepress/dist/user/long-term-memory.html +2 -2
  62. package/packages/docs/.vitepress/dist/user/packaged-workflows.html +2 -2
  63. package/packages/docs/.vitepress/dist/user/tutorial.html +2 -2
  64. package/packages/docs/.vitepress/dist/user/workflow-selection.html +2 -2
  65. package/packages/docs/.vitepress/dist/workflows/adr.html +1 -1
  66. package/packages/docs/.vitepress/dist/workflows/big-bang-conversion.html +1 -1
  67. package/packages/docs/.vitepress/dist/workflows/boundary-testing.html +1 -1
  68. package/packages/docs/.vitepress/dist/workflows/bugfix.html +1 -1
  69. package/packages/docs/.vitepress/dist/workflows/bugfix.yaml +6 -0
  70. package/packages/docs/.vitepress/dist/workflows/business-analysis.html +1 -1
  71. package/packages/docs/.vitepress/dist/workflows/c4-analysis.html +1 -1
  72. package/packages/docs/.vitepress/dist/workflows/epcc.html +1 -1
  73. package/packages/docs/.vitepress/dist/workflows/epcc.yaml +3 -0
  74. package/packages/docs/.vitepress/dist/workflows/game-beginner.html +1 -1
  75. package/packages/docs/.vitepress/dist/workflows/greenfield.html +1 -1
  76. package/packages/docs/.vitepress/dist/workflows/greenfield.yaml +3 -0
  77. package/packages/docs/.vitepress/dist/workflows/minor.html +1 -1
  78. package/packages/docs/.vitepress/dist/workflows/posts.html +1 -1
  79. package/packages/docs/.vitepress/dist/workflows/pr-review.html +1 -1
  80. package/packages/docs/.vitepress/dist/workflows/pr-review.yaml +2 -0
  81. package/packages/docs/.vitepress/dist/workflows/qrspi.html +1 -1
  82. package/packages/docs/.vitepress/dist/workflows/qrspi.yaml +5 -0
  83. package/packages/docs/.vitepress/dist/workflows/sdd-bugfix-crowd.html +1 -1
  84. package/packages/docs/.vitepress/dist/workflows/sdd-bugfix.html +1 -1
  85. package/packages/docs/.vitepress/dist/workflows/sdd-feature-crowd.html +1 -1
  86. package/packages/docs/.vitepress/dist/workflows/sdd-feature.html +1 -1
  87. package/packages/docs/.vitepress/dist/workflows/sdd-greenfield-crowd.html +1 -1
  88. package/packages/docs/.vitepress/dist/workflows/sdd-greenfield.html +1 -1
  89. package/packages/docs/.vitepress/dist/workflows/skilled-bugfix.html +1 -1
  90. package/packages/docs/.vitepress/dist/workflows/skilled-epcc.html +1 -1
  91. package/packages/docs/.vitepress/dist/workflows/skilled-greenfield.html +1 -1
  92. package/packages/docs/.vitepress/dist/workflows/slides.html +1 -1
  93. package/packages/docs/.vitepress/dist/workflows/tdd.html +1 -1
  94. package/packages/docs/.vitepress/dist/workflows/tdd.yaml +3 -0
  95. package/packages/docs/.vitepress/dist/workflows/waterfall.html +1 -1
  96. package/packages/docs/.vitepress/dist/workflows/waterfall.yaml +3 -0
  97. package/packages/docs/.vitepress/dist/workflows.html +1 -1
  98. package/packages/docs/package.json +1 -1
  99. package/packages/mcp-server/dist/index.js +93 -8
  100. package/packages/mcp-server/package.json +1 -1
  101. package/packages/mcp-server/resources/templates/opencode-agents/coding.md.tmpl +13 -0
  102. package/packages/mcp-server/resources/templates/opencode-agents/research.md.tmpl +13 -0
  103. package/packages/mcp-server/resources/templates/opencode-agents/thinking.md.tmpl +13 -0
  104. package/packages/mcp-server/resources/workflows/bugfix.yaml +6 -0
  105. package/packages/mcp-server/resources/workflows/epcc.yaml +3 -0
  106. package/packages/mcp-server/resources/workflows/greenfield.yaml +3 -0
  107. package/packages/mcp-server/resources/workflows/pr-review.yaml +2 -0
  108. package/packages/mcp-server/resources/workflows/qrspi.yaml +5 -0
  109. package/packages/mcp-server/resources/workflows/tdd.yaml +3 -0
  110. package/packages/mcp-server/resources/workflows/waterfall.yaml +3 -0
  111. package/packages/opencode-plugin/dist/index.js +93 -8
  112. package/packages/opencode-plugin/package.json +1 -1
  113. package/packages/opencode-plugin/resources/templates/opencode-agents/coding.md.tmpl +13 -0
  114. package/packages/opencode-plugin/resources/templates/opencode-agents/research.md.tmpl +13 -0
  115. package/packages/opencode-plugin/resources/templates/opencode-agents/thinking.md.tmpl +13 -0
  116. package/packages/opencode-plugin/resources/workflows/bugfix.yaml +6 -0
  117. package/packages/opencode-plugin/resources/workflows/epcc.yaml +3 -0
  118. package/packages/opencode-plugin/resources/workflows/greenfield.yaml +3 -0
  119. package/packages/opencode-plugin/resources/workflows/pr-review.yaml +2 -0
  120. package/packages/opencode-plugin/resources/workflows/qrspi.yaml +5 -0
  121. package/packages/opencode-plugin/resources/workflows/tdd.yaml +3 -0
  122. package/packages/opencode-plugin/resources/workflows/waterfall.yaml +3 -0
  123. package/packages/opencode-tui-plugin/package.json +1 -1
  124. package/packages/visualizer/package.json +1 -1
  125. package/resources/state-machine-schema.json +4 -0
  126. package/resources/templates/opencode-agents/coding.md.tmpl +13 -0
  127. package/resources/templates/opencode-agents/research.md.tmpl +13 -0
  128. package/resources/templates/opencode-agents/thinking.md.tmpl +13 -0
  129. package/resources/workflows/bugfix.yaml +6 -0
  130. package/resources/workflows/epcc.yaml +3 -0
  131. package/resources/workflows/greenfield.yaml +3 -0
  132. package/resources/workflows/pr-review.yaml +2 -0
  133. package/resources/workflows/qrspi.yaml +5 -0
  134. package/resources/workflows/tdd.yaml +3 -0
  135. package/resources/workflows/waterfall.yaml +3 -0
@@ -0,0 +1,13 @@
1
+ ---
2
+ description: "Subagent for code generation and editing, focused on idiomatic patterns and minimal scope."
3
+ mode: subagent
4
+ model: ${model}
5
+ ---
6
+
7
+ You are the `${capability}` subagent for the workflows system. Your job is to implement focused, high-quality code changes on behalf of the parent agent.
8
+
9
+ Read the file you are about to edit before changing it. Match the surrounding style: indentation, naming, import order, error-handling conventions, and test patterns. Prefer small, surgical edits over large rewrites — change as little as possible to satisfy the requirement, and leave unrelated code untouched.
10
+
11
+ Write idiomatic code for the language and framework in use. Avoid clever one-liners, speculative abstractions, or new dependencies unless they are clearly justified. When a fix could be done two ways, pick the simpler one and note the trade-off in a short comment if it matters.
12
+
13
+ Run the relevant tests and linters when you can. If a build or test fails, do not declare success — diagnose and fix the root cause rather than papering over it. Never commit, push, or modify git state unless the parent agent explicitly instructs you to.
@@ -0,0 +1,13 @@
1
+ ---
2
+ description: "Subagent for fast information gathering and codebase exploration."
3
+ mode: subagent
4
+ model: ${model}
5
+ ---
6
+
7
+ You are the `${capability}` subagent for the workflows system. Your job is to gather information quickly and report back concisely to the parent agent.
8
+
9
+ Search the codebase, documentation, and any provided context before answering. Use the most targeted query you can — exact symbol names, file paths, or distinctive error messages — before falling back to broader patterns. When a question can be answered by reading one or two files, just read them instead of guessing.
10
+
11
+ Report findings as a tight, structured summary: the direct answer first, then supporting evidence with file paths and line numbers. Quote only the snippets that matter. Do not paraphrase code when the original is clearer.
12
+
13
+ Avoid making changes. Do not implement, refactor, or "fix while you're there" — your job is to inform the parent's decision, not to make it. If a question cannot be answered from the available context, say so plainly and suggest the next investigation step.
@@ -0,0 +1,13 @@
1
+ ---
2
+ description: "Subagent for deep reasoning, complex planning, and architectural trade-off analysis."
3
+ mode: subagent
4
+ model: ${model}
5
+ ---
6
+
7
+ You are the `${capability}` subagent for the workflows system. Your job is to support the parent agent during phases that demand careful reasoning, planning, and architectural analysis.
8
+
9
+ Approach problems methodically. Read the relevant code, surrounding tests, and any linked design notes before forming an opinion. When a question involves trade-offs, lay out the options with their concrete consequences rather than jumping to a single answer. Distinguish clearly between observed facts, reasonable inferences, and assumptions that still need verification.
10
+
11
+ Prefer structured output: short bullet lists, named options, and explicit recommendation with rationale. Call out open questions, risks, and edge cases the parent agent should not overlook. When a decision depends on values (readability, performance, maintainability, scope) name them rather than hand-waving.
12
+
13
+ Avoid making code changes unless the parent agent explicitly asks you to. Your primary value is sharp thinking, not typing. Do not invent APIs, file paths, or version numbers — when uncertain, say so and point at where to verify.
@@ -26,10 +26,13 @@ metadata:
26
26
  states:
27
27
  reproduce:
28
28
  description: 'Reproduce and understand the bug'
29
+ required_capability: 'research'
29
30
  allowed_file_patterns:
30
31
  - '**/*.md'
31
32
  - '**/*.txt'
32
33
  - '**/*.adoc'
34
+ - '**/*test*'
35
+ - '**/*spec*'
33
36
  default_instructions: |
34
37
  Gather specific information to reliably reproduce the reported bug:
35
38
  - What are the exact OS, browser/runtime versions, and hardware specs?
@@ -46,6 +49,7 @@ states:
46
49
 
47
50
  analyze:
48
51
  description: 'Analyze the bug and identify root cause'
52
+ required_capability: 'thinking'
49
53
  allowed_file_patterns:
50
54
  - '**/*.md'
51
55
  - '**/*.txt'
@@ -74,6 +78,7 @@ states:
74
78
 
75
79
  fix:
76
80
  description: 'Implement the bug fix'
81
+ required_capability: 'coding'
77
82
  allowed_file_patterns:
78
83
  - '**/*'
79
84
  default_instructions: |
@@ -110,6 +115,7 @@ states:
110
115
 
111
116
  verify:
112
117
  description: 'Verify the fix and ensure no regressions'
118
+ required_capability: 'thinking'
113
119
  allowed_file_patterns:
114
120
  - '**/*'
115
121
  default_instructions: Test the fix thoroughly to ensure the original bug is resolved and no new issues were introduced. Run existing tests, create new ones if needed, and verify the solution is robust.
@@ -26,6 +26,7 @@ metadata:
26
26
  states:
27
27
  explore:
28
28
  description: 'Research and exploration phase - understanding the problem space'
29
+ required_capability: 'research'
29
30
  allowed_file_patterns:
30
31
  - '**/*.md'
31
32
  - '**/*.txt'
@@ -48,6 +49,7 @@ states:
48
49
 
49
50
  plan:
50
51
  description: 'Planning phase - creating a detailed implementation strategy'
52
+ required_capability: 'thinking'
51
53
  allowed_file_patterns:
52
54
  - '**/*.md'
53
55
  - '**/*.txt'
@@ -92,6 +94,7 @@ states:
92
94
 
93
95
  code:
94
96
  description: 'Implementation phase - writing and building the solution'
97
+ required_capability: 'coding'
95
98
  allowed_file_patterns:
96
99
  - '**/*'
97
100
  default_instructions: |
@@ -27,6 +27,7 @@ metadata:
27
27
  states:
28
28
  ideation:
29
29
  description: 'Deep requirements discovery and PRD creation phase'
30
+ required_capability: 'thinking'
30
31
  allowed_file_patterns:
31
32
  - '**/*.md'
32
33
  - '**/*.txt'
@@ -51,6 +52,7 @@ states:
51
52
 
52
53
  architecture:
53
54
  description: 'Tech stack selection and architecture design phase'
55
+ required_capability: 'thinking'
54
56
  allowed_file_patterns:
55
57
  - '**/*.md'
56
58
  - '**/*.txt'
@@ -130,6 +132,7 @@ states:
130
132
 
131
133
  code:
132
134
  description: 'Implementation phase following the established plan and architecture'
135
+ required_capability: 'coding'
133
136
  allowed_file_patterns:
134
137
  - '**/*'
135
138
  default_instructions: |
@@ -57,6 +57,7 @@ states:
57
57
 
58
58
  review_architecture:
59
59
  description: 'Review whether the change is in the right place and respects existing structure'
60
+ required_capability: 'thinking'
60
61
  default_instructions: |
61
62
  Evaluate the structural decisions in the change against the confirmed intent:
62
63
 
@@ -93,6 +94,7 @@ states:
93
94
 
94
95
  review_correctness:
95
96
  description: 'Review whether the logic correctly achieves the confirmed intent'
97
+ required_capability: 'thinking'
96
98
  default_instructions: |
97
99
  Evaluate the logic of the change against the confirmed intent:
98
100
 
@@ -54,6 +54,7 @@ states:
54
54
 
55
55
  research:
56
56
  description: 'Gather facts without forming conclusions or proposing solutions'
57
+ required_capability: 'research'
57
58
  allowed_file_patterns:
58
59
  - '**/*.md'
59
60
  - '**/*.txt'
@@ -81,6 +82,7 @@ states:
81
82
 
82
83
  design:
83
84
  description: 'Explore options and reach consensus on WHAT and high-level HOW'
85
+ required_capability: 'thinking'
84
86
  allowed_file_patterns:
85
87
  - '**/*.md'
86
88
  - '**/*.txt'
@@ -114,6 +116,7 @@ states:
114
116
 
115
117
  structure:
116
118
  description: 'Decompose the approved design into end-to-end vertical slices'
119
+ required_capability: 'thinking'
117
120
  allowed_file_patterns:
118
121
  - '**/*.md'
119
122
  - '**/*.txt'
@@ -143,6 +146,7 @@ states:
143
146
 
144
147
  plan:
145
148
  description: 'Create a detailed implementation plan per vertical slice'
149
+ required_capability: 'thinking'
146
150
  allowed_file_patterns:
147
151
  - '**/*.md'
148
152
  - '**/*.txt'
@@ -182,6 +186,7 @@ states:
182
186
 
183
187
  implement:
184
188
  description: 'Build the solution slice by slice'
189
+ required_capability: 'coding'
185
190
  allowed_file_patterns:
186
191
  - '**/*'
187
192
  default_instructions: |
@@ -26,6 +26,7 @@ metadata:
26
26
  states:
27
27
  explore:
28
28
  description: 'Research and exploration phase - understanding the problem space and codebase'
29
+ required_capability: 'research'
29
30
  allowed_file_patterns:
30
31
  - '**/*.md'
31
32
  - '**/*.txt'
@@ -50,6 +51,7 @@ states:
50
51
 
51
52
  red:
52
53
  description: 'RED phase - Write a failing test that defines the expected behavior'
54
+ required_capability: 'thinking'
53
55
  allowed_file_patterns:
54
56
  - '**/*'
55
57
  default_instructions: |
@@ -87,6 +89,7 @@ states:
87
89
 
88
90
  green:
89
91
  description: 'GREEN phase - Write only the necessary code to make the test pass'
92
+ required_capability: 'coding'
90
93
  allowed_file_patterns:
91
94
  - '**/*'
92
95
  default_instructions: |
@@ -27,6 +27,7 @@ metadata:
27
27
  states:
28
28
  requirements:
29
29
  description: 'Gathering and analyzing requirements'
30
+ required_capability: 'research'
30
31
  allowed_file_patterns:
31
32
  - '**/*.md'
32
33
  - '**/*.txt'
@@ -53,6 +54,7 @@ states:
53
54
 
54
55
  design:
55
56
  description: 'Technical design and architecture planning'
57
+ required_capability: 'thinking'
56
58
  allowed_file_patterns:
57
59
  - '**/*.md'
58
60
  - '**/*.txt'
@@ -80,6 +82,7 @@ states:
80
82
 
81
83
  implementation:
82
84
  description: 'Building the solution according to design'
85
+ required_capability: 'coding'
83
86
  allowed_file_patterns:
84
87
  - '**/*'
85
88
  default_instructions: |