tachibot-mcp 2.0.2

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 (214) hide show
  1. package/.env.example +260 -0
  2. package/CHANGELOG.md +54 -0
  3. package/CODE_OF_CONDUCT.md +56 -0
  4. package/CONTRIBUTING.md +54 -0
  5. package/Dockerfile +36 -0
  6. package/LICENSE +644 -0
  7. package/README.md +201 -0
  8. package/SECURITY.md +95 -0
  9. package/dist/personality/komaai-expressions.js +12 -0
  10. package/dist/profiles/balanced.json +33 -0
  11. package/dist/profiles/code_focus.json +33 -0
  12. package/dist/profiles/full.json +33 -0
  13. package/dist/profiles/minimal.json +33 -0
  14. package/dist/profiles/research_power.json +33 -0
  15. package/dist/scripts/build-profiles.js +46 -0
  16. package/dist/src/application/services/focus/FocusModeRegistry.js +46 -0
  17. package/dist/src/application/services/focus/FocusTool.service.js +109 -0
  18. package/dist/src/application/services/focus/ModeRegistry.js +46 -0
  19. package/dist/src/application/services/focus/modes/focus-deep.mode.js +27 -0
  20. package/dist/src/application/services/focus/modes/status.mode.js +50 -0
  21. package/dist/src/application/services/focus/modes/tachibot-status.mode.js +50 -0
  22. package/dist/src/collaborative-orchestrator.js +391 -0
  23. package/dist/src/config/model-constants.js +188 -0
  24. package/dist/src/config/model-defaults.js +57 -0
  25. package/dist/src/config/model-preferences.js +382 -0
  26. package/dist/src/config/timeout-config.js +130 -0
  27. package/dist/src/config.js +173 -0
  28. package/dist/src/domain/interfaces/IFocusMode.js +5 -0
  29. package/dist/src/domain/interfaces/IProvider.js +6 -0
  30. package/dist/src/domain/interfaces/ITool.js +5 -0
  31. package/dist/src/focus-deep.js +245 -0
  32. package/dist/src/infrastructure/ascii/art/robots.ascii.js +16 -0
  33. package/dist/src/mcp-client.js +90 -0
  34. package/dist/src/memory/index.js +17 -0
  35. package/dist/src/memory/memory-config.js +135 -0
  36. package/dist/src/memory/memory-interface.js +174 -0
  37. package/dist/src/memory/memory-manager.js +383 -0
  38. package/dist/src/memory/providers/devlog-provider.js +385 -0
  39. package/dist/src/memory/providers/hybrid-provider.js +399 -0
  40. package/dist/src/memory/providers/local-provider.js +388 -0
  41. package/dist/src/memory/providers/mem0-provider.js +337 -0
  42. package/dist/src/modes/architect.js +477 -0
  43. package/dist/src/modes/auditor.js +362 -0
  44. package/dist/src/modes/challenger.js +841 -0
  45. package/dist/src/modes/code-reviewer.js +382 -0
  46. package/dist/src/modes/commit-guardian.js +424 -0
  47. package/dist/src/modes/documentation-writer.js +572 -0
  48. package/dist/src/modes/scout.js +587 -0
  49. package/dist/src/modes/shared/helpers/challenger-helpers.js +454 -0
  50. package/dist/src/modes/shared/helpers/index.js +17 -0
  51. package/dist/src/modes/shared/helpers/scout-helpers.js +270 -0
  52. package/dist/src/modes/shared/helpers/verifier-helpers.js +332 -0
  53. package/dist/src/modes/test-architect.js +767 -0
  54. package/dist/src/modes/verifier.js +378 -0
  55. package/dist/src/monitoring/performance-monitor.js +435 -0
  56. package/dist/src/optimization/batch-executor.js +121 -0
  57. package/dist/src/optimization/context-pruner.js +196 -0
  58. package/dist/src/optimization/cost-monitor.js +338 -0
  59. package/dist/src/optimization/index.js +65 -0
  60. package/dist/src/optimization/model-router.js +264 -0
  61. package/dist/src/optimization/result-cache.js +114 -0
  62. package/dist/src/optimization/token-optimizer.js +257 -0
  63. package/dist/src/optimization/token-tracker.js +118 -0
  64. package/dist/src/orchestrator-instructions.js +128 -0
  65. package/dist/src/orchestrator-lite.js +139 -0
  66. package/dist/src/orchestrator.js +191 -0
  67. package/dist/src/orchestrators/collaborative/interfaces/IToolExecutionEngine.js +1 -0
  68. package/dist/src/orchestrators/collaborative/interfaces/IToolExecutionStrategy.js +5 -0
  69. package/dist/src/orchestrators/collaborative/interfaces/IVisualizationRenderer.js +1 -0
  70. package/dist/src/orchestrators/collaborative/registries/ModelProviderRegistry.js +95 -0
  71. package/dist/src/orchestrators/collaborative/registries/ToolAdapterRegistry.js +64 -0
  72. package/dist/src/orchestrators/collaborative/services/tool-execution/ToolExecutionService.js +502 -0
  73. package/dist/src/orchestrators/collaborative/services/visualization/VisualizationService.js +206 -0
  74. package/dist/src/orchestrators/collaborative/types/session-types.js +5 -0
  75. package/dist/src/profiles/balanced.js +37 -0
  76. package/dist/src/profiles/code_focus.js +37 -0
  77. package/dist/src/profiles/debug_intensive.js +59 -0
  78. package/dist/src/profiles/full.js +37 -0
  79. package/dist/src/profiles/minimal.js +37 -0
  80. package/dist/src/profiles/research_code.js +59 -0
  81. package/dist/src/profiles/research_power.js +37 -0
  82. package/dist/src/profiles/types.js +5 -0
  83. package/dist/src/profiles/workflow_builder.js +53 -0
  84. package/dist/src/prompt-engineer-lite.js +78 -0
  85. package/dist/src/prompt-engineer.js +399 -0
  86. package/dist/src/reasoning-chain.js +508 -0
  87. package/dist/src/sequential-thinking.js +291 -0
  88. package/dist/src/server-diagnostic.js +74 -0
  89. package/dist/src/server-raw.js +158 -0
  90. package/dist/src/server-simple.js +58 -0
  91. package/dist/src/server.js +514 -0
  92. package/dist/src/session/session-logger.js +617 -0
  93. package/dist/src/session/session-manager.js +571 -0
  94. package/dist/src/session/session-tools.js +400 -0
  95. package/dist/src/tools/advanced-modes.js +200 -0
  96. package/dist/src/tools/claude-integration.js +356 -0
  97. package/dist/src/tools/consolidated/ai-router.js +174 -0
  98. package/dist/src/tools/consolidated/ai-tool.js +48 -0
  99. package/dist/src/tools/consolidated/brainstorm-tool.js +87 -0
  100. package/dist/src/tools/consolidated/environment-detector.js +80 -0
  101. package/dist/src/tools/consolidated/index.js +50 -0
  102. package/dist/src/tools/consolidated/search-tool.js +110 -0
  103. package/dist/src/tools/consolidated/workflow-tool.js +238 -0
  104. package/dist/src/tools/gemini-tools.js +329 -0
  105. package/dist/src/tools/grok-enhanced.js +376 -0
  106. package/dist/src/tools/grok-tools.js +299 -0
  107. package/dist/src/tools/lmstudio-tools.js +223 -0
  108. package/dist/src/tools/openai-tools.js +498 -0
  109. package/dist/src/tools/openrouter-tools.js +317 -0
  110. package/dist/src/tools/optimized-wrapper.js +204 -0
  111. package/dist/src/tools/perplexity-tools.js +294 -0
  112. package/dist/src/tools/pingpong-tool.js +343 -0
  113. package/dist/src/tools/qwen-wrapper.js +74 -0
  114. package/dist/src/tools/tool-router.js +444 -0
  115. package/dist/src/tools/unified-ai-provider.js +260 -0
  116. package/dist/src/tools/workflow-runner.js +425 -0
  117. package/dist/src/tools/workflow-validator-tool.js +107 -0
  118. package/dist/src/types.js +23 -0
  119. package/dist/src/utils/input-validator.js +130 -0
  120. package/dist/src/utils/model-router.js +91 -0
  121. package/dist/src/utils/progress-stream.js +255 -0
  122. package/dist/src/utils/provider-router.js +88 -0
  123. package/dist/src/utils/smart-api-client.js +146 -0
  124. package/dist/src/utils/table-builder.js +218 -0
  125. package/dist/src/utils/timestamp-formatter.js +134 -0
  126. package/dist/src/utils/tool-compressor.js +257 -0
  127. package/dist/src/utils/tool-config.js +201 -0
  128. package/dist/src/validators/dependency-graph-validator.js +147 -0
  129. package/dist/src/validators/interpolation-validator.js +222 -0
  130. package/dist/src/validators/output-usage-validator.js +151 -0
  131. package/dist/src/validators/syntax-validator.js +102 -0
  132. package/dist/src/validators/tool-registry-validator.js +123 -0
  133. package/dist/src/validators/tool-types.js +97 -0
  134. package/dist/src/validators/types.js +8 -0
  135. package/dist/src/validators/workflow-validator.js +134 -0
  136. package/dist/src/visualizer-lite.js +42 -0
  137. package/dist/src/visualizer.js +179 -0
  138. package/dist/src/workflows/circuit-breaker.js +199 -0
  139. package/dist/src/workflows/custom-workflows.js +451 -0
  140. package/dist/src/workflows/engine/AutoSynthesizer.js +97 -0
  141. package/dist/src/workflows/engine/StepParameterResolver.js +74 -0
  142. package/dist/src/workflows/engine/VariableInterpolator.js +123 -0
  143. package/dist/src/workflows/engine/WorkflowDiscovery.js +125 -0
  144. package/dist/src/workflows/engine/WorkflowExecutionEngine.js +485 -0
  145. package/dist/src/workflows/engine/WorkflowExecutor.js +113 -0
  146. package/dist/src/workflows/engine/WorkflowFileManager.js +244 -0
  147. package/dist/src/workflows/engine/WorkflowHelpers.js +114 -0
  148. package/dist/src/workflows/engine/WorkflowOutputFormatter.js +83 -0
  149. package/dist/src/workflows/engine/events/WorkflowEventBus.js +132 -0
  150. package/dist/src/workflows/engine/events/interfaces/IEventBus.js +5 -0
  151. package/dist/src/workflows/engine/handlers/ErrorRecoveryHandler.js +162 -0
  152. package/dist/src/workflows/engine/handlers/PromptEnhancementHandler.js +115 -0
  153. package/dist/src/workflows/engine/handlers/SessionPersistenceHandler.js +167 -0
  154. package/dist/src/workflows/engine/handlers/StepExecutionHandler.js +231 -0
  155. package/dist/src/workflows/engine/handlers/ToolInvocationHandler.js +46 -0
  156. package/dist/src/workflows/engine/interfaces/IAutoSynthesizer.js +5 -0
  157. package/dist/src/workflows/engine/interfaces/IStepParameterResolver.js +5 -0
  158. package/dist/src/workflows/engine/interfaces/IVariableInterpolator.js +5 -0
  159. package/dist/src/workflows/engine/interfaces/IWorkflowDiscovery.js +4 -0
  160. package/dist/src/workflows/engine/interfaces/IWorkflowFileManager.js +5 -0
  161. package/dist/src/workflows/engine/interfaces/IWorkflowOutputFormatter.js +5 -0
  162. package/dist/src/workflows/engine/state/WorkflowStateMachine.js +194 -0
  163. package/dist/src/workflows/engine/state/interfaces/IStateMachine.js +17 -0
  164. package/dist/src/workflows/fallback-strategies.js +373 -0
  165. package/dist/src/workflows/message-queue.js +455 -0
  166. package/dist/src/workflows/model-router.js +189 -0
  167. package/dist/src/workflows/orchestrator-examples.js +174 -0
  168. package/dist/src/workflows/orchestrator-integration.js +200 -0
  169. package/dist/src/workflows/self-healing.js +524 -0
  170. package/dist/src/workflows/tool-mapper.js +407 -0
  171. package/dist/src/workflows/tool-orchestrator.js +796 -0
  172. package/dist/src/workflows/workflow-engine.js +573 -0
  173. package/dist/src/workflows/workflow-parser.js +283 -0
  174. package/dist/src/workflows/workflow-types.js +95 -0
  175. package/dist/src/workflows.js +568 -0
  176. package/dist/test-workflow-file-output.js +93 -0
  177. package/docs/API_KEYS.md +570 -0
  178. package/docs/CLAUDE_CODE_SETUP.md +181 -0
  179. package/docs/CLAUDE_DESKTOP_MANUAL.md +127 -0
  180. package/docs/CONFIGURATION.md +745 -0
  181. package/docs/FOCUS_MODES.md +240 -0
  182. package/docs/INSTALLATION_BOTH.md +145 -0
  183. package/docs/TERMS.md +352 -0
  184. package/docs/TOOLS_REFERENCE.md +1622 -0
  185. package/docs/TOOL_PARAMETERS.md +496 -0
  186. package/docs/TOOL_PROFILES.md +236 -0
  187. package/docs/WORKFLOWS.md +987 -0
  188. package/docs/WORKFLOW_OUTPUT.md +198 -0
  189. package/docs/WORKFLOW_PROGRESS_TRACKING.md +305 -0
  190. package/docs/workflows/design-brainstorm.md +335 -0
  191. package/package.json +97 -0
  192. package/profiles/balanced.json +37 -0
  193. package/profiles/code_focus.json +37 -0
  194. package/profiles/debug_intensive.json +34 -0
  195. package/profiles/full.json +37 -0
  196. package/profiles/minimal.json +37 -0
  197. package/profiles/research_power.json +37 -0
  198. package/profiles/workflow_builder.json +37 -0
  199. package/smithery.yaml +66 -0
  200. package/start.sh +8 -0
  201. package/tools.config.json +81 -0
  202. package/tsconfig.json +18 -0
  203. package/workflows/accessibility-code-audit.yaml +92 -0
  204. package/workflows/code-architecture-review.yaml +202 -0
  205. package/workflows/code-review.yaml +142 -0
  206. package/workflows/core/iterative-problem-solver.yaml +283 -0
  207. package/workflows/creative-brainstorm-yaml.yaml +215 -0
  208. package/workflows/pingpong.yaml +141 -0
  209. package/workflows/system/README.md +412 -0
  210. package/workflows/system/challenger.yaml +175 -0
  211. package/workflows/system/scout.yaml +164 -0
  212. package/workflows/system/verifier.yaml +133 -0
  213. package/workflows/ultra-creative-brainstorm.yaml +318 -0
  214. package/workflows/ux-research-flow.yaml +92 -0
@@ -0,0 +1,568 @@
1
+ import { WorkflowType } from './types.js';
2
+ export const workflows = {
3
+ [WorkflowType.CREATIVE_DISCOVERY]: {
4
+ name: '๐ŸŽจ Creative Discovery',
5
+ type: WorkflowType.CREATIVE_DISCOVERY,
6
+ description: 'Generate innovative ideas and explore possibilities',
7
+ steps: [
8
+ {
9
+ tool: 'gemini_brainstorm',
10
+ promptTechnique: 'what_if_speculation',
11
+ adaptationCheck: true
12
+ },
13
+ {
14
+ tool: 'openai_brainstorm',
15
+ promptTechnique: 'alternative_perspectives',
16
+ optional: false
17
+ },
18
+ {
19
+ tool: 'perplexity_research',
20
+ promptTechnique: 'evidence_gathering',
21
+ optional: true,
22
+ adaptationCheck: true,
23
+ adaptationThreshold: 300
24
+ },
25
+ {
26
+ tool: 'think',
27
+ promptTechnique: 'quick_reflection',
28
+ optional: false
29
+ },
30
+ {
31
+ tool: 'openai_reason',
32
+ promptTechnique: 'feasibility_analysis',
33
+ optional: false
34
+ }
35
+ ],
36
+ visualTemplate: `
37
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
38
+ @ โ˜… โ˜… @ @ โ—Ž โ—Ž @ @ โ—‹ โ—‹ @ @ โ— โ— @ @ โ—‰ โ—‰ @
39
+ @ \\___// @ @ ~ @ @ \\_/ @ @ โ—ก @ @ - @
40
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
41
+ gemini[{g}] โ†’ openai[{o}] โ†’ perplexity[{p}]? โ†’ think[{t}] โ†’ reason[{r}]
42
+
43
+ ๐Ÿง  Technique: {technique}
44
+ ๐Ÿ“Š Progress: {progress}
45
+ ๐Ÿ’ญ Current: {current}`
46
+ },
47
+ [WorkflowType.DEEP_RESEARCH]: {
48
+ name: '๐Ÿ”ฌ Deep Research',
49
+ type: WorkflowType.DEEP_RESEARCH,
50
+ description: 'Comprehensive investigation with evidence gathering',
51
+ steps: [
52
+ {
53
+ tool: 'perplexity_research',
54
+ promptTechnique: 'comprehensive_investigation',
55
+ adaptationCheck: true,
56
+ adaptationThreshold: 500
57
+ },
58
+ {
59
+ tool: 'think',
60
+ promptTechnique: 'pattern_recognition',
61
+ optional: false
62
+ },
63
+ {
64
+ tool: 'openai_reason',
65
+ promptTechnique: 'systematic_analysis',
66
+ optional: false
67
+ },
68
+ {
69
+ tool: 'gemini_brainstorm',
70
+ promptTechnique: 'creative_applications',
71
+ optional: true
72
+ }
73
+ ],
74
+ visualTemplate: `
75
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
76
+ @ โ—‹ โ—‹ @ @ โ— โ— @ @ โ—‰ โ—‰ @ @ โ˜… โ˜… @
77
+ @ \\_/ @ @ โ—ก @ @ ~ @ @ \\o// @
78
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
79
+ perplex[{p}] โ†’ think[{t}] โ†’ reason[{r}] โ†’ gemini[{g}]
80
+
81
+ ๐Ÿ” Technique: {technique}
82
+ ๐Ÿ“Š Progress: {progress}
83
+ ๐Ÿ“š Current: {current}`
84
+ },
85
+ [WorkflowType.PROBLEM_SOLVING]: {
86
+ name: '๐Ÿงฉ Problem Solving',
87
+ type: WorkflowType.PROBLEM_SOLVING,
88
+ description: 'Break down and solve complex problems systematically',
89
+ steps: [
90
+ {
91
+ tool: 'think',
92
+ promptTechnique: 'problem_decomposition',
93
+ optional: false
94
+ },
95
+ {
96
+ tool: 'openai_reason',
97
+ promptTechnique: 'first_principles',
98
+ optional: false
99
+ },
100
+ {
101
+ tool: 'perplexity_research',
102
+ promptTechnique: 'evidence_gathering',
103
+ optional: false,
104
+ adaptationCheck: true
105
+ },
106
+ {
107
+ tool: 'gemini_brainstorm',
108
+ promptTechnique: 'innovative_solutions',
109
+ optional: false
110
+ }
111
+ ],
112
+ visualTemplate: `
113
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
114
+ @ โ— โ— @ @ โ—‰ โ—‰ @ @ โ—‹ โ—‹ @ @ โ˜… โ˜… @
115
+ @ โ—ก @ @ โ‰ก @ @ \\_/ @ @ ! @
116
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
117
+ think[{t}] โ†’ reason[{r}] โ†’ perplex[{p}] โ†’ gemini[{g}]
118
+
119
+ ๐Ÿ”ง Technique: {technique}
120
+ ๐Ÿ“Š Progress: {progress}
121
+ ๐Ÿ’ก Current: {current}`
122
+ },
123
+ [WorkflowType.SYNTHESIS]: {
124
+ name: '๐ŸŽฏ Synthesis',
125
+ type: WorkflowType.SYNTHESIS,
126
+ description: 'Combine multiple perspectives into coherent insights',
127
+ steps: [
128
+ {
129
+ tool: 'gemini_brainstorm',
130
+ promptTechnique: 'exploratory_angles',
131
+ optional: false
132
+ },
133
+ {
134
+ tool: 'perplexity_research',
135
+ promptTechnique: 'comprehensive_data',
136
+ optional: false
137
+ },
138
+ {
139
+ tool: 'openai_reason',
140
+ promptTechnique: 'analytical_framework',
141
+ optional: false
142
+ },
143
+ {
144
+ tool: 'think',
145
+ promptTechnique: 'integration_reflection',
146
+ optional: false
147
+ }
148
+ ],
149
+ visualTemplate: `
150
+ gemini[{g}] โ†˜
151
+ โ†˜
152
+ perplex[{p}] โ†’ think[{t}] โ†’ SYNTHESIS
153
+ โ†—
154
+ openai[{o}] โ†—
155
+
156
+ ๐Ÿ”€ Technique: {technique}
157
+ ๐Ÿ“Š Progress: {progress}
158
+ ๐ŸŽฏ Current: {current}`
159
+ },
160
+ [WorkflowType.FACT_CHECK]: {
161
+ name: 'โœ… Fact Check',
162
+ type: WorkflowType.FACT_CHECK,
163
+ description: 'Validate claims and ideas with evidence-based analysis',
164
+ steps: [
165
+ {
166
+ tool: 'think',
167
+ promptTechnique: 'problem_decomposition',
168
+ optional: false
169
+ },
170
+ {
171
+ tool: 'perplexity_research',
172
+ promptTechnique: 'comprehensive_investigation',
173
+ adaptationCheck: true,
174
+ adaptationThreshold: 500
175
+ },
176
+ {
177
+ tool: 'openai_reason',
178
+ promptTechnique: 'systematic_analysis',
179
+ optional: false
180
+ },
181
+ {
182
+ tool: 'gemini_brainstorm',
183
+ promptTechnique: 'alternative_perspectives',
184
+ optional: false
185
+ },
186
+ {
187
+ tool: 'think',
188
+ promptTechnique: 'integration_reflection',
189
+ optional: false
190
+ }
191
+ ],
192
+ visualTemplate: `
193
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
194
+ @ โ— โ— @ @ โ—‹ โ—‹ @ @ โ—‰ โ—‰ @ @ โ˜… โ˜… @ @ โ— โ— @
195
+ @ ? @ @ \\_/ @ @ โ‰ก @ @ ~ @ @ ! @
196
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
197
+ think[{t}] โ†’ perplex[{p}] โ†’ reason[{r}] โ†’ gemini[{g}] โ†’ think[{t2}]
198
+
199
+ โœ… Technique: {technique}
200
+ ๐Ÿ“Š Progress: {progress}
201
+ ๐Ÿ” Current: {current}`
202
+ },
203
+ // Developer-Focused Workflows
204
+ [WorkflowType.RAPID_PROTOTYPE]: {
205
+ name: '๐Ÿš€ Rapid Prototype',
206
+ type: WorkflowType.RAPID_PROTOTYPE,
207
+ description: 'From idea to working demo in minutes',
208
+ steps: [
209
+ {
210
+ tool: 'scout',
211
+ promptTechnique: 'requirement_gathering',
212
+ optional: false
213
+ },
214
+ {
215
+ tool: 'architect',
216
+ promptTechnique: 'system_design',
217
+ optional: false
218
+ },
219
+ {
220
+ tool: 'code_reviewer',
221
+ promptTechnique: 'design_validation',
222
+ optional: true
223
+ },
224
+ {
225
+ tool: 'documentation_writer',
226
+ promptTechnique: 'quick_documentation',
227
+ optional: true
228
+ },
229
+ {
230
+ tool: 'think',
231
+ promptTechnique: 'prototype_synthesis',
232
+ optional: false
233
+ }
234
+ ],
235
+ visualTemplate: `
236
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
237
+ @ ๐Ÿ” @ @ ๐Ÿ—๏ธ @ @ โœ… @ @ ๐Ÿ“ @ @ ๐ŸŽฏ @
238
+ @scout @ @archi @ @review@ @ docs @ @synth@
239
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
240
+ scout[{s}] โ†’ arch[{a}] โ†’ review[{r}] โ†’ docs[{d}] โ†’ think[{t}]
241
+
242
+ ๐Ÿš€ Technique: {technique}
243
+ ๐Ÿ“Š Progress: {progress}
244
+ โšก Current: {current}`
245
+ },
246
+ [WorkflowType.CODE_QUALITY]: {
247
+ name: '๐Ÿ”ง Code Quality',
248
+ type: WorkflowType.CODE_QUALITY,
249
+ description: 'Comprehensive code improvement pipeline',
250
+ steps: [
251
+ {
252
+ tool: 'code_reviewer',
253
+ promptTechnique: 'comprehensive_review',
254
+ optional: false
255
+ },
256
+ {
257
+ tool: 'test_architect',
258
+ promptTechnique: 'test_generation',
259
+ optional: false
260
+ },
261
+ {
262
+ tool: 'challenger',
263
+ promptTechnique: 'code_questioning',
264
+ optional: false
265
+ },
266
+ {
267
+ tool: 'auditor',
268
+ promptTechnique: 'quality_audit',
269
+ optional: false
270
+ },
271
+ {
272
+ tool: 'think',
273
+ promptTechnique: 'quality_synthesis',
274
+ optional: false
275
+ }
276
+ ],
277
+ visualTemplate: `
278
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
279
+ @ ๐Ÿ‘€ @ @ ๐Ÿงช @ @ โš”๏ธ @ @ ๐Ÿ” @ @ ๐Ÿ’Ž @
280
+ @review@ @ test @ @chall @ @audit @ @synth@
281
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
282
+ review[{r}] โ†’ test[{t}] โ†’ chall[{c}] โ†’ audit[{a}] โ†’ think[{s}]
283
+
284
+ ๐Ÿ”ง Technique: {technique}
285
+ ๐Ÿ“Š Progress: {progress}
286
+ ๐Ÿ’Ž Current: {current}`
287
+ },
288
+ [WorkflowType.SECURE_DEPLOYMENT]: {
289
+ name: '๐Ÿ›ก๏ธ Secure Deployment',
290
+ type: WorkflowType.SECURE_DEPLOYMENT,
291
+ description: 'Security-first deployment pipeline',
292
+ steps: [
293
+ {
294
+ tool: 'auditor',
295
+ promptTechnique: 'security_audit',
296
+ optional: false
297
+ },
298
+ {
299
+ tool: 'commit_guardian',
300
+ promptTechnique: 'pre_deploy_validation',
301
+ optional: false
302
+ },
303
+ {
304
+ tool: 'verifier',
305
+ promptTechnique: 'deployment_verification',
306
+ optional: false
307
+ },
308
+ {
309
+ tool: 'challenger',
310
+ promptTechnique: 'security_questioning',
311
+ optional: true
312
+ },
313
+ {
314
+ tool: 'think',
315
+ promptTechnique: 'deployment_synthesis',
316
+ optional: false
317
+ }
318
+ ],
319
+ visualTemplate: `
320
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
321
+ @ ๐Ÿ”’ @ @ ๐Ÿ›ก๏ธ @ @ โœ… @ @ โš”๏ธ @ @ ๐Ÿš€ @
322
+ @audit @ @guard @ @verify@ @chall @ @deploy@
323
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
324
+ audit[{a}] โ†’ guard[{g}] โ†’ verify[{v}] โ†’ chall[{c}] โ†’ think[{d}]
325
+
326
+ ๐Ÿ›ก๏ธ Technique: {technique}
327
+ ๐Ÿ“Š Progress: {progress}
328
+ ๐Ÿ” Current: {current}`
329
+ },
330
+ [WorkflowType.FULL_STACK_DEVELOPMENT]: {
331
+ name: '๐Ÿ—๏ธ Full-Stack Dev',
332
+ type: WorkflowType.FULL_STACK_DEVELOPMENT,
333
+ description: 'End-to-end feature development',
334
+ steps: [
335
+ {
336
+ tool: 'architect',
337
+ promptTechnique: 'system_architecture',
338
+ optional: false
339
+ },
340
+ {
341
+ tool: 'code_reviewer',
342
+ promptTechnique: 'implementation_review',
343
+ optional: false
344
+ },
345
+ {
346
+ tool: 'test_architect',
347
+ promptTechnique: 'full_stack_testing',
348
+ optional: false
349
+ },
350
+ {
351
+ tool: 'documentation_writer',
352
+ promptTechnique: 'comprehensive_docs',
353
+ optional: false
354
+ },
355
+ {
356
+ tool: 'commit_guardian',
357
+ promptTechnique: 'final_validation',
358
+ optional: true
359
+ },
360
+ {
361
+ tool: 'think',
362
+ promptTechnique: 'feature_synthesis',
363
+ optional: false
364
+ }
365
+ ],
366
+ visualTemplate: `
367
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
368
+ @ ๐Ÿ—๏ธ @ @ ๐Ÿ‘€ @ @ ๐Ÿงช @ @ ๐Ÿ“ @ @ ๐Ÿ›ก๏ธ @ @ โœจ @
369
+ @archi @ @review@ @ test @ @ docs @ @guard @ @synth@
370
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
371
+ arch[{a}] โ†’ review[{r}] โ†’ test[{t}] โ†’ docs[{d}] โ†’ guard[{g}] โ†’ think[{s}]
372
+
373
+ ๐Ÿ—๏ธ Technique: {technique}
374
+ ๐Ÿ“Š Progress: {progress}
375
+ ๐ŸŽฏ Current: {current}`
376
+ },
377
+ [WorkflowType.TEST_DRIVEN_DEVELOPMENT]: {
378
+ name: '๐Ÿงช Test-Driven Dev',
379
+ type: WorkflowType.TEST_DRIVEN_DEVELOPMENT,
380
+ description: 'TDD workflow with comprehensive testing',
381
+ steps: [
382
+ {
383
+ tool: 'test_architect',
384
+ promptTechnique: 'test_first_design',
385
+ optional: false
386
+ },
387
+ {
388
+ tool: 'code_reviewer',
389
+ promptTechnique: 'tdd_validation',
390
+ optional: false
391
+ },
392
+ {
393
+ tool: 'challenger',
394
+ promptTechnique: 'test_questioning',
395
+ optional: false
396
+ },
397
+ {
398
+ tool: 'verifier',
399
+ promptTechnique: 'test_verification',
400
+ optional: false
401
+ },
402
+ {
403
+ tool: 'think',
404
+ promptTechnique: 'tdd_synthesis',
405
+ optional: false
406
+ }
407
+ ],
408
+ visualTemplate: `
409
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
410
+ @ ๐Ÿงช @ @ ๐Ÿ‘€ @ @ โš”๏ธ @ @ โœ… @ @ ๐ŸŽฏ @
411
+ @ test @ @review@ @chall @ @verify@ @synth@
412
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
413
+ test[{t}] โ†’ review[{r}] โ†’ chall[{c}] โ†’ verify[{v}] โ†’ think[{s}]
414
+
415
+ ๐Ÿงช Technique: {technique}
416
+ ๐Ÿ“Š Progress: {progress}
417
+ ๐Ÿ”ฌ Current: {current}`
418
+ },
419
+ [WorkflowType.CODE_REVIEW_WORKFLOW]: {
420
+ name: '๐Ÿ‘๏ธ Code Review',
421
+ type: WorkflowType.CODE_REVIEW_WORKFLOW,
422
+ description: 'Thorough code review with learning',
423
+ steps: [
424
+ {
425
+ tool: 'code_reviewer',
426
+ promptTechnique: 'socratic_review',
427
+ optional: false
428
+ },
429
+ {
430
+ tool: 'challenger',
431
+ promptTechnique: 'assumption_challenging',
432
+ optional: false
433
+ },
434
+ {
435
+ tool: 'auditor',
436
+ promptTechnique: 'evidence_audit',
437
+ optional: true
438
+ },
439
+ {
440
+ tool: 'think',
441
+ promptTechnique: 'review_synthesis',
442
+ optional: false
443
+ }
444
+ ],
445
+ visualTemplate: `
446
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
447
+ @ ๐Ÿ‘๏ธ @ @ โš”๏ธ @ @ ๐Ÿ” @ @ ๐Ÿ•ต๏ธ @ @ ๐Ÿ“‹ @
448
+ @review@ @chall @ @audit @ @hunt @ @synth@
449
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
450
+ review[{r}] โ†’ chall[{c}] โ†’ audit[{a}] โ†’ hunt[{h}] โ†’ think[{s}]
451
+
452
+ ๐Ÿ‘๏ธ Technique: {technique}
453
+ ๐Ÿ“Š Progress: {progress}
454
+ ๐Ÿ” Current: {current}`
455
+ },
456
+ [WorkflowType.DOCUMENTATION_GENERATION]: {
457
+ name: '๐Ÿ“š Doc Generation',
458
+ type: WorkflowType.DOCUMENTATION_GENERATION,
459
+ description: 'Comprehensive documentation creation',
460
+ steps: [
461
+ {
462
+ tool: 'scout',
463
+ promptTechnique: 'code_exploration',
464
+ optional: false
465
+ },
466
+ {
467
+ tool: 'documentation_writer',
468
+ promptTechnique: 'narrative_docs',
469
+ optional: false
470
+ },
471
+ {
472
+ tool: 'code_reviewer',
473
+ promptTechnique: 'documentation_review',
474
+ optional: true
475
+ },
476
+ {
477
+ tool: 'challenger',
478
+ promptTechnique: 'doc_questioning',
479
+ optional: true
480
+ },
481
+ {
482
+ tool: 'think',
483
+ promptTechnique: 'documentation_synthesis',
484
+ optional: false
485
+ }
486
+ ],
487
+ visualTemplate: `
488
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
489
+ @ ๐Ÿ” @ @ ๐Ÿ“ @ @ ๐Ÿ‘€ @ @ โ“ @ @ ๐Ÿ“š @
490
+ @scout @ @ docs @ @review@ @chall @ @synth@
491
+ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@ @@@@@@@@@
492
+ scout[{s}] โ†’ docs[{d}] โ†’ review[{r}] โ†’ chall[{c}] โ†’ think[{t}]
493
+
494
+ ๐Ÿ“š Technique: {technique}
495
+ ๐Ÿ“Š Progress: {progress}
496
+ โœ๏ธ Current: {current}`
497
+ }
498
+ };
499
+ // Prompt technique descriptions for user visibility
500
+ export const promptTechniques = {
501
+ // Creative techniques
502
+ what_if_speculation: 'Exploring possibilities with "What if..." questions',
503
+ alternative_perspectives: 'Viewing from different angles and domains',
504
+ creative_applications: 'Finding innovative uses and connections',
505
+ innovative_solutions: 'Generating novel approaches to problems',
506
+ exploratory_angles: 'Discovering unexpected dimensions',
507
+ // Research techniques
508
+ comprehensive_investigation: 'Systematic data gathering with 5W1H framework',
509
+ evidence_gathering: 'Finding supporting and contradicting evidence',
510
+ comprehensive_data: 'Collecting data from multiple sources',
511
+ // Analytical techniques
512
+ systematic_analysis: 'Step-by-step logical examination',
513
+ first_principles: 'Breaking down to fundamental truths',
514
+ feasibility_analysis: 'Evaluating practical implementation',
515
+ analytical_framework: 'Structured analytical approach',
516
+ // Reflective techniques
517
+ quick_reflection: 'Brief pattern recognition and insight capture',
518
+ pattern_recognition: 'Identifying recurring themes and connections',
519
+ problem_decomposition: 'Breaking complex problems into components',
520
+ integration_reflection: 'Synthesizing insights from multiple sources',
521
+ // Developer-focused techniques
522
+ requirement_gathering: 'Extracting and clarifying project requirements',
523
+ system_design: 'Creating architectural blueprints and system design',
524
+ design_validation: 'Reviewing and validating design decisions',
525
+ quick_documentation: 'Rapid documentation generation for prototypes',
526
+ prototype_synthesis: 'Combining prototype elements into coherent design',
527
+ comprehensive_review: 'Thorough code analysis with multiple perspectives',
528
+ test_generation: 'Creating comprehensive test suites and edge cases',
529
+ code_questioning: 'Challenging code assumptions and design choices',
530
+ quality_audit: 'Systematic quality assessment and improvement suggestions',
531
+ quality_synthesis: 'Integrating quality insights into actionable recommendations',
532
+ security_audit: 'Deep security vulnerability analysis',
533
+ pre_deploy_validation: 'Pre-deployment checks and validations',
534
+ deployment_verification: 'Verifying deployment readiness and safety',
535
+ security_questioning: 'Challenging security assumptions and practices',
536
+ deployment_synthesis: 'Synthesizing deployment insights and recommendations',
537
+ system_architecture: 'End-to-end system architecture design',
538
+ implementation_review: 'Reviewing implementation against requirements',
539
+ full_stack_testing: 'Comprehensive testing across all system layers',
540
+ comprehensive_docs: 'Creating complete documentation suite',
541
+ final_validation: 'Final checks before feature completion',
542
+ feature_synthesis: 'Integrating all feature development insights',
543
+ test_first_design: 'Designing tests before implementation (TDD)',
544
+ tdd_validation: 'Validating TDD practices and test quality',
545
+ test_questioning: 'Challenging test coverage and effectiveness',
546
+ test_verification: 'Verifying test completeness and quality',
547
+ tdd_synthesis: 'Synthesizing TDD insights and recommendations',
548
+ socratic_review: 'Educational code review with guiding questions',
549
+ assumption_challenging: 'Challenging code and design assumptions',
550
+ evidence_audit: 'Requiring evidence for all claims and decisions',
551
+ dependency_tracing: 'Tracing code dependencies and relationships',
552
+ review_synthesis: 'Synthesizing review insights and learning points',
553
+ code_exploration: 'Exploring codebase structure and patterns',
554
+ narrative_docs: 'Creating engaging, story-driven documentation',
555
+ documentation_review: 'Reviewing documentation for clarity and completeness',
556
+ doc_questioning: 'Challenging documentation assumptions and gaps',
557
+ documentation_synthesis: 'Synthesizing documentation insights and improvements'
558
+ };
559
+ // Helper function to get visual status indicator
560
+ export function getStatusIndicator(status) {
561
+ const indicators = {
562
+ idle: ' ',
563
+ processing: '..',
564
+ complete: 'โœ“',
565
+ error: '!!'
566
+ };
567
+ return indicators[status] || ' ';
568
+ }
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Test script for workflow file output feature
3
+ *
4
+ * This tests the new saveToFile and loadFiles functionality in WorkflowEngine
5
+ */
6
+ import { WorkflowEngine } from './src/workflows/workflow-engine.js';
7
+ import * as fs from 'fs/promises';
8
+ import * as path from 'path';
9
+ async function testWorkflowFileOutput() {
10
+ console.log('๐Ÿงช Testing Workflow File Output Feature\n');
11
+ const engine = new WorkflowEngine();
12
+ // Test workflow with saveToFile and loadFiles
13
+ const testWorkflow = {
14
+ name: 'test-file-output',
15
+ description: 'Test file-based output and loading',
16
+ steps: [
17
+ {
18
+ id: 'step1',
19
+ mode: 'scout',
20
+ variant: 'research_scout',
21
+ maxTokens: 1000,
22
+ saveToFile: true
23
+ },
24
+ {
25
+ id: 'step2',
26
+ mode: 'scout',
27
+ variant: 'research_scout',
28
+ parallel: true,
29
+ maxTokens: 1000,
30
+ saveToFile: true
31
+ },
32
+ {
33
+ id: 'step3',
34
+ mode: 'synthesis',
35
+ maxTokens: 1000,
36
+ loadFiles: ['step1', 'step2'],
37
+ dependsOn: ['step1', 'step2']
38
+ }
39
+ ]
40
+ };
41
+ const query = 'Test query for file output feature';
42
+ try {
43
+ console.log('๐Ÿ“ Executing workflow...');
44
+ const result = await engine.executeWorkflow(testWorkflow, query);
45
+ console.log('\nโœ… Workflow execution completed!');
46
+ console.log('\n๐Ÿ“Š Results:');
47
+ console.log(JSON.stringify(result, null, 2));
48
+ // Verify output directory was created
49
+ if (result.outputDirectory) {
50
+ console.log(`\n๐Ÿ“ Output directory: ${result.outputDirectory}`);
51
+ // Check if manifest exists
52
+ const manifestPath = path.join(result.outputDirectory, 'manifest.json');
53
+ try {
54
+ const manifest = await fs.readFile(manifestPath, 'utf-8');
55
+ console.log('\n๐Ÿ“‹ Manifest:');
56
+ console.log(JSON.parse(manifest));
57
+ }
58
+ catch (error) {
59
+ console.error('โŒ Failed to read manifest:', error);
60
+ }
61
+ // Check if step files exist
62
+ for (const stepId of ['step1', 'step2']) {
63
+ const stepFile = path.join(result.outputDirectory, `${stepId}.md`);
64
+ try {
65
+ const content = await fs.readFile(stepFile, 'utf-8');
66
+ console.log(`\n๐Ÿ“„ ${stepId}.md exists (${content.length} characters)`);
67
+ }
68
+ catch (error) {
69
+ console.error(`โŒ Failed to read ${stepId}.md:`, error);
70
+ }
71
+ }
72
+ }
73
+ else {
74
+ console.log('โš ๏ธ No output directory in result');
75
+ }
76
+ console.log('\nโœจ Test completed successfully!');
77
+ return result;
78
+ }
79
+ catch (error) {
80
+ console.error('\nโŒ Test failed:', error);
81
+ throw error;
82
+ }
83
+ }
84
+ // Run the test
85
+ testWorkflowFileOutput()
86
+ .then(() => {
87
+ console.log('\n๐ŸŽ‰ All tests passed!');
88
+ process.exit(0);
89
+ })
90
+ .catch((error) => {
91
+ console.error('\n๐Ÿ’ฅ Test failed with error:', error);
92
+ process.exit(1);
93
+ });