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,283 @@
1
+ # Iterative Problem Solver - Using Real TachiBot MCP Tools
2
+ # Pattern: Research → Decompose → Solve → Challenge → Iterate
3
+ # Enhanced with 13 prompt engineering techniques for optimal results
4
+
5
+ name: "Iterative Problem Solver"
6
+ version: "3.0"
7
+ description: "Step-by-step problem solving with research, reasoning, and validation using prompt engineering techniques"
8
+ tags: ["problem-solving", "iterative", "practical", "prompt-engineering"]
9
+
10
+ config:
11
+ max_iterations: 5
12
+ success_threshold: 0.8
13
+
14
+ steps:
15
+ # Step 1: Initial Research and Context Gathering
16
+ # Uses comprehensive_investigation technique for thorough 5W1H analysis
17
+ - name: research-context
18
+ tool: scout
19
+ variant: research_scout
20
+ promptTechnique: comprehensive_investigation
21
+ input:
22
+ query: "${input}"
23
+ saveToFile: true
24
+ maxTokens: 10000
25
+ output:
26
+ variable: research_context
27
+
28
+ # Step 2: Problem Decomposition
29
+ # Uses problem_decomposition technique to break down complexity
30
+ - name: decompose-problem
31
+ tool: think
32
+ promptTechnique: problem_decomposition
33
+ input:
34
+ thought: "${input}"
35
+ saveToFile: true
36
+ output:
37
+ variable: problem_breakdown
38
+
39
+ # Step 3: Systematic Analysis
40
+ # Uses systematic_analysis with research context
41
+ - name: analyze-problem
42
+ tool: grok_reason
43
+ promptTechnique: systematic_analysis
44
+ input:
45
+ problem: "${input}"
46
+ approach: "systematic"
47
+ context: "Research findings: ${research_context}\n\nProblem structure: ${problem_breakdown}"
48
+ saveToFile: true
49
+ maxTokens: 12000
50
+ output:
51
+ variable: problem_analysis
52
+
53
+ # Step 4: Generate Initial Solutions
54
+ # Uses innovative_solutions technique for creative approaches
55
+ - name: brainstorm-solutions
56
+ tool: openai_brainstorm
57
+ promptTechnique: innovative_solutions
58
+ input:
59
+ problem: "${input}"
60
+ style: "innovative"
61
+ quantity: 5
62
+ reasoning_effort: "medium"
63
+ context: "Analysis: ${problem_analysis}\n\nResearch: ${research_context}"
64
+ saveToFile: true
65
+ maxTokens: 10000
66
+ output:
67
+ variable: solution_ideas
68
+
69
+ # Step 5: First Principles Analysis
70
+ # Uses first_principles technique to rebuild from fundamentals
71
+ - name: first-principles-reasoning
72
+ tool: grok_reason
73
+ promptTechnique: first_principles
74
+ input:
75
+ problem: "${input}"
76
+ approach: "first-principles"
77
+ context: "Solutions proposed: ${solution_ideas}\n\nAnalysis: ${problem_analysis}"
78
+ saveToFile: true
79
+ maxTokens: 12000
80
+ output:
81
+ variable: first_principles_analysis
82
+
83
+ # Step 6: Deep Multi-Model Reasoning
84
+ - name: reason-solution
85
+ tool: focus
86
+ mode: deep-reasoning
87
+ input:
88
+ query: "Synthesize the best solution for: ${input}"
89
+ rounds: 3
90
+ models: ["grok-3", "gpt-5", "gemini-2.5"]
91
+ context: |
92
+ Research: ${research_context}
93
+ Problem breakdown: ${problem_breakdown}
94
+ Analysis: ${problem_analysis}
95
+ Solution ideas: ${solution_ideas}
96
+ First principles: ${first_principles_analysis}
97
+ saveToFile: true
98
+ maxTokens: 15000
99
+ output:
100
+ variable: reasoned_solution
101
+
102
+ # Step 7: Evidence Gathering for Validation
103
+ # Uses evidence_gathering technique to find supporting/contradicting data
104
+ - name: gather-evidence
105
+ tool: perplexity_ask
106
+ promptTechnique: evidence_gathering
107
+ input:
108
+ query: "${input} validation best practices case studies"
109
+ saveToFile: true
110
+ maxTokens: 8000
111
+ output:
112
+ variable: validation_evidence
113
+
114
+ # Step 8: Challenge and Validate
115
+ - name: challenge-solution
116
+ tool: challenger
117
+ input:
118
+ context: |
119
+ Original problem: ${input}
120
+ Proposed solution: ${reasoned_solution}
121
+ Evidence: ${validation_evidence}
122
+ thoroughness: deep
123
+ enableFactChecking: true
124
+ saveToFile: true
125
+ maxTokens: 12000
126
+ output:
127
+ variable: challenges
128
+
129
+ # Step 9: Feasibility Analysis
130
+ # Uses feasibility_analysis technique to evaluate practicality
131
+ - name: assess-feasibility
132
+ tool: gemini_analyze_text
133
+ promptTechnique: feasibility_analysis
134
+ input:
135
+ text: "${reasoned_solution}"
136
+ type: "analysis"
137
+ context: "Challenges: ${challenges}\n\nEvidence: ${validation_evidence}"
138
+ saveToFile: true
139
+ maxTokens: 10000
140
+ output:
141
+ variable: feasibility
142
+
143
+ # Step 10: Verify with Multi-Model Consensus
144
+ - name: verify-solution
145
+ tool: verifier
146
+ variant: deep_verify
147
+ input:
148
+ query: |
149
+ Solution: ${reasoned_solution}
150
+ Challenges raised: ${challenges}
151
+ Feasibility: ${feasibility}
152
+
153
+ Is this a valid and complete solution?
154
+ saveToFile: true
155
+ maxTokens: 10000
156
+ output:
157
+ variable: verification
158
+
159
+ # Step 11: Pattern Recognition
160
+ # Uses pattern_recognition to identify insights across all analyses
161
+ - name: identify-patterns
162
+ tool: think
163
+ promptTechnique: pattern_recognition
164
+ input:
165
+ thought: "What patterns emerge from our analysis of '${input}'? Context: ${problem_analysis}, ${solution_ideas}, ${challenges}, ${feasibility}"
166
+ saveToFile: true
167
+ output:
168
+ variable: patterns
169
+
170
+ # Step 12: Refine if Needed
171
+ # Uses alternative_perspectives for creative refinement
172
+ - name: refine-solution
173
+ tool: kimi_thinking
174
+ promptTechnique: alternative_perspectives
175
+ when: "${verification.confidence} < 0.8"
176
+ input:
177
+ problem: "Refine solution for: ${input}"
178
+ approach: "creative"
179
+ maxSteps: 10
180
+ context: |
181
+ Original: ${reasoned_solution}
182
+ Issues: ${challenges}
183
+ Patterns: ${patterns}
184
+ saveToFile: true
185
+ maxTokens: 12000
186
+ output:
187
+ variable: refined_solution
188
+
189
+ # Step 13: Quick Reflection Before Synthesis
190
+ # Uses quick_reflection to consolidate insights
191
+ - name: pre-synthesis-reflection
192
+ tool: think
193
+ promptTechnique: quick_reflection
194
+ input:
195
+ thought: "Reflect on our complete analysis of '${input}': What are the key insights, surprises, and next steps?"
196
+ saveToFile: true
197
+ output:
198
+ variable: reflection
199
+
200
+ # Step 14: Ultimate Integration and Synthesis
201
+ # Uses integration_reflection to combine all perspectives
202
+ - name: ultimate-synthesis
203
+ tool: openai_brainstorm
204
+ promptTechnique: integration_reflection
205
+ input:
206
+ problem: "Create comprehensive solution for: ${input}"
207
+ style: "systematic"
208
+ reasoning_effort: "high"
209
+ model: "gpt-5"
210
+ context: |
211
+ COMPLETE WORKFLOW CONTEXT:
212
+
213
+ Research: ${research_context}
214
+ Problem Breakdown: ${problem_breakdown}
215
+ Systematic Analysis: ${problem_analysis}
216
+ Solution Ideas: ${solution_ideas}
217
+ First Principles: ${first_principles_analysis}
218
+ Reasoned Solution: ${reasoned_solution}
219
+ Evidence: ${validation_evidence}
220
+ Challenges: ${challenges}
221
+ Feasibility: ${feasibility}
222
+ Patterns: ${patterns}
223
+ Verification: ${verification}
224
+ Refined Solution: ${refined_solution}
225
+ Reflection: ${reflection}
226
+ saveToFile: true
227
+ maxTokens: 20000
228
+ output:
229
+ variable: integrated_solution
230
+
231
+ # Step 15: Executive Summary (using Gemini 2.5 Flash for large context)
232
+ - name: executive-summary
233
+ tool: gemini_analyze_text
234
+ input:
235
+ text: "${integrated_solution}"
236
+ type: "summary"
237
+ saveToFile: true
238
+ maxTokens: 8000
239
+ output:
240
+ variable: final_solution
241
+
242
+ output:
243
+ format: detailed
244
+ truncateSteps: false
245
+ summary: |
246
+ ╔═══════════════════════════════════════════════════════════════════════════╗
247
+ ║ ITERATIVE PROBLEM SOLVER v3.0 - Enhanced with Prompt Engineering ║
248
+ ║ Problem: ${input} ║
249
+ ╚═══════════════════════════════════════════════════════════════════════════╝
250
+
251
+ 📊 ANALYSIS PHASES COMPLETED:
252
+ ✅ Phase 1: Research & Context (comprehensive_investigation)
253
+ ✅ Phase 2: Problem Decomposition (problem_decomposition)
254
+ ✅ Phase 3: Systematic Analysis (systematic_analysis)
255
+ ✅ Phase 4: Solution Ideation (innovative_solutions)
256
+ ✅ Phase 5: First Principles Reasoning (first_principles)
257
+ ✅ Phase 6: Multi-Model Deep Reasoning (focus)
258
+ ✅ Phase 7: Evidence Validation (evidence_gathering)
259
+ ✅ Phase 8: Critical Challenge (challenger)
260
+ ✅ Phase 9: Feasibility Assessment (feasibility_analysis)
261
+ ✅ Phase 10: Multi-Model Verification (verifier)
262
+ ✅ Phase 11: Pattern Recognition (pattern_recognition)
263
+ ✅ Phase 12: Refinement (alternative_perspectives)
264
+ ✅ Phase 13: Reflection (quick_reflection)
265
+ ✅ Phase 14: Ultimate Synthesis (integration_reflection)
266
+
267
+ 🎯 EXECUTIVE SUMMARY:
268
+ ${final_solution}
269
+
270
+ 📁 All outputs saved to: workflow-output/iterative-problem-solver/
271
+
272
+ 💡 This workflow uses 10 of 13 prompt engineering techniques for optimal results
273
+
274
+ # Usage examples
275
+ examples:
276
+ - description: "Debug a complex performance issue"
277
+ input: "My React app is slow when rendering large lists with complex state updates"
278
+
279
+ - description: "Design a system architecture"
280
+ input: "Design a scalable microservice architecture for an e-commerce platform"
281
+
282
+ - description: "Solve algorithmic problem"
283
+ input: "Optimize database query performance for time-series data"
@@ -0,0 +1,215 @@
1
+ name: creative-brainstorm-yaml
2
+ description: Multi-model creative brainstorming with mid-flow and final verification
3
+ version: "2.0"
4
+
5
+ settings:
6
+ optimization:
7
+ enabled: true
8
+ cacheResults: true
9
+ promptEnhancement: true # Use prompt-engineer.ts
10
+ maxCost: 1.00
11
+
12
+ variables:
13
+ analysis_depth: "comprehensive"
14
+
15
+ steps:
16
+ # Step 1: Claude Thinking - Problem Framing
17
+ - name: claude-thinking
18
+ tool: openai_gpt5_reason # Using GPT-5 Mini for structured thinking
19
+ input:
20
+ query: |
21
+ Analyze and structure the brainstorming request: ${query}
22
+
23
+ Provide:
24
+ 1. Domain and framing
25
+ 2. Key stakeholders
26
+ 3. Core constraints and goals
27
+ 4. Success criteria
28
+ 5. Potential approaches to explore
29
+ mode: "analytical"
30
+ saveToFile: true
31
+ maxTokens: 4000
32
+ output:
33
+ variable: initial_analysis
34
+ promptTechnique: "systematic_analysis"
35
+
36
+ # Step 2: Initial Ideas Generation
37
+ - name: initial-ideas
38
+ tool: openai_brainstorm
39
+ input:
40
+ problem: "${initial_analysis}"
41
+ style: "systematic"
42
+ quantity: 5
43
+ constraints: |
44
+ Based on the framing:
45
+ ${initial_analysis}
46
+
47
+ Generate initial ideas for: ${query}
48
+ saveToFile: true
49
+ maxTokens: 8000
50
+ output:
51
+ variable: initial_ideas
52
+ promptTechnique: "innovative_solutions"
53
+
54
+ # Step 3: Expand Ideas with Deep Thinking
55
+ - name: expand-ideas
56
+ tool: kimi_thinking
57
+ input:
58
+ problem: |
59
+ Expand and build upon these ideas:
60
+ ${initial_ideas}
61
+
62
+ Original query: ${query}
63
+ approach: "step-by-step"
64
+ maxSteps: 10
65
+ context: "${initial_analysis}"
66
+ saveToFile: true
67
+ maxTokens: 12000
68
+ output:
69
+ variable: expanded_ideas
70
+ promptTechnique: "what_if_speculation"
71
+
72
+ # Step 4: Mid-Flow Verification
73
+ - name: mid-verification
74
+ tool: verifier
75
+ input:
76
+ query: |
77
+ Verify the feasibility and soundness of these ideas:
78
+
79
+ Original Analysis: ${initial_analysis}
80
+
81
+ Initial Ideas: ${initial_ideas}
82
+
83
+ Expanded Ideas: ${expanded_ideas}
84
+
85
+ Assess:
86
+ 1. Feasibility (can this actually be done?)
87
+ 2. Soundness (does the reasoning hold up?)
88
+ 3. Completeness (are we missing critical aspects?)
89
+ 4. Potential flaws or risks
90
+ saveToFile: true
91
+ maxTokens: 10000
92
+ output:
93
+ variable: mid_verification
94
+
95
+ # Step 5: Research Validation
96
+ - name: research-validation
97
+ tool: perplexity_research
98
+ input:
99
+ topic: |
100
+ Find the "RESEARCH VALIDATION TOPICS" section in the text below and research ONLY those specific topics in depth.
101
+
102
+ ${expanded_ideas}
103
+
104
+ If no explicit "RESEARCH VALIDATION TOPICS" section exists, research:
105
+ - Latest industry data and statistics
106
+ - Case studies and real-world implementations
107
+ - Expert opinions and academic research
108
+ - Recent developments and trends
109
+
110
+ For query: ${query}
111
+ depth: "deep"
112
+ questions:
113
+ - "What are the latest industry statistics and trends?"
114
+ - "What real-world implementations or case studies exist?"
115
+ - "What do experts and researchers say?"
116
+ saveToFile: true
117
+ maxTokens: 15000
118
+ output:
119
+ variable: research_findings
120
+ promptTechnique: "comprehensive_investigation"
121
+
122
+ # Step 6: Contrarian View / Devil's Advocate
123
+ - name: contrarian-view
124
+ tool: grok_reason
125
+ input:
126
+ problem: |
127
+ Challenge these ideas using first-principles thinking:
128
+ ${expanded_ideas}
129
+
130
+ Verification feedback:
131
+ ${mid_verification}
132
+ approach: "first-principles"
133
+ useHeavy: false
134
+ context: |
135
+ Research findings: ${research_findings}
136
+
137
+ Be a constructive skeptic. Find:
138
+ 1. Hidden assumptions
139
+ 2. Potential failure modes
140
+ 3. Alternative approaches not considered
141
+ 4. Edge cases and risks
142
+ saveToFile: true
143
+ maxTokens: 8000
144
+ output:
145
+ variable: contrarian_analysis
146
+ promptTechnique: "critical_analysis"
147
+
148
+ # Step 7: Final Synthesis
149
+ - name: final-synthesis
150
+ tool: gemini_brainstorm
151
+ input:
152
+ prompt: |
153
+ Initial Analysis: ${initial_analysis}
154
+
155
+ Initial Ideas: ${initial_ideas}
156
+
157
+ Expanded Ideas: ${expanded_ideas}
158
+
159
+ Verification: ${mid_verification}
160
+
161
+ Research: ${research_findings}
162
+
163
+ Critical Analysis: ${contrarian_analysis}
164
+
165
+ Synthesize all insights into a comprehensive, actionable recommendation for:
166
+ ${query}
167
+
168
+ Include:
169
+ 1. Executive Summary
170
+ 2. Recommended Approach (with reasoning)
171
+ 3. Implementation Roadmap
172
+ 4. Risks and Mitigation
173
+ 5. Success Metrics
174
+ claudeThoughts: |
175
+ You are synthesizing 6 rounds of multi-model analysis.
176
+ Focus on actionable insights, not just summaries.
177
+ maxRounds: 2
178
+ saveToFile: true
179
+ maxTokens: 12000
180
+ output:
181
+ variable: final_synthesis
182
+
183
+ # Step 8: Final Verification
184
+ - name: final-verification
185
+ tool: grok_reason
186
+ input:
187
+ problem: |
188
+ Perform final validation of the synthesized recommendations:
189
+
190
+ ${final_synthesis}
191
+
192
+ Original query: ${query}
193
+ approach: "analytical"
194
+ context: |
195
+ Verify:
196
+ 1. Internal consistency
197
+ 2. Alignment with original query
198
+ 3. Practical feasibility
199
+ 4. Completeness
200
+
201
+ Provide confidence score (0-100%) and final verdict.
202
+ saveToFile: true
203
+ maxTokens: 6000
204
+ output:
205
+ variable: final_verification
206
+
207
+ output:
208
+ format: detailed
209
+ return: |
210
+ ${final_synthesis}
211
+
212
+ ---
213
+
214
+ VALIDATION:
215
+ ${final_verification}
@@ -0,0 +1,141 @@
1
+ name: pingpong
2
+ description: Multi-model debate with analysis, challenge, and consensus
3
+ version: "2.0"
4
+
5
+ # Usage: workflow --name pingpong --query "your question/idea/architecture"
6
+ # All outputs saved to: workflow-output/pingpong/{timestamp}/
7
+
8
+ steps:
9
+ # ═══════════════════════════════════════════════════════════════════════════
10
+ # ANALYSIS: Initial perspectives from all models
11
+ # ═══════════════════════════════════════════════════════════════════════════
12
+
13
+ - name: analyze-grok
14
+ tool: grok_reason
15
+ input:
16
+ problem: "${query}"
17
+ approach: "first-principles"
18
+ saveToFile: true
19
+ maxTokens: 3500
20
+
21
+ - name: analyze-gemini
22
+ tool: gemini_brainstorm
23
+ input:
24
+ prompt: "${query}"
25
+ maxRounds: 1
26
+ dependsOn: [analyze-grok]
27
+ saveToFile: true
28
+ maxTokens: 3500
29
+
30
+ - name: analyze-qwen
31
+ tool: qwen_coder
32
+ input:
33
+ task: "explain"
34
+ requirements: "${query}"
35
+ language: "typescript"
36
+ dependsOn: [analyze-gemini]
37
+ saveToFile: true
38
+ maxTokens: 3500
39
+
40
+ - name: analyze-perplexity
41
+ tool: perplexity_reason
42
+ input:
43
+ problem: "${query}"
44
+ approach: "analytical"
45
+ dependsOn: [analyze-qwen]
46
+ saveToFile: true
47
+ maxTokens: 3500
48
+
49
+ # ═══════════════════════════════════════════════════════════════════════════
50
+ # CHALLENGE: Models critique and refine each other's analyses
51
+ # ═══════════════════════════════════════════════════════════════════════════
52
+
53
+ - name: challenge-grok
54
+ tool: grok_reason
55
+ input:
56
+ problem: |
57
+ Challenge the previous analyses. Find flaws, edge cases, and hidden assumptions.
58
+
59
+ Original question: ${query}
60
+
61
+ Perplexity's analysis: ${analyze-perplexity.output}
62
+ approach: "systematic"
63
+ useHeavy: true
64
+ loadFiles: [analyze-grok, analyze-gemini, analyze-qwen, analyze-perplexity]
65
+ dependsOn: [analyze-perplexity]
66
+ saveToFile: true
67
+ maxTokens: 3500
68
+
69
+ - name: challenge-gemini
70
+ tool: gemini_analyze_text
71
+ input:
72
+ text: |
73
+ Original question: ${query}
74
+
75
+ Task: Synthesize all analyses, then propose alternative approaches.
76
+
77
+ Grok's challenges: ${challenge-grok.output}
78
+ type: "general"
79
+ loadFiles: [challenge-grok]
80
+ dependsOn: [challenge-grok]
81
+ saveToFile: true
82
+ maxTokens: 3500
83
+
84
+ - name: challenge-qwen
85
+ tool: qwen_coder
86
+ input:
87
+ task: "explain"
88
+ requirements: |
89
+ Original question: ${query}
90
+
91
+ Context: Review Gemini's synthesis below and identify technical risks, implementation challenges, and missing considerations.
92
+
93
+ Gemini's synthesis:
94
+ ${challenge-gemini.output}
95
+ language: "typescript"
96
+ loadFiles: [challenge-gemini]
97
+ dependsOn: [challenge-gemini]
98
+ saveToFile: true
99
+ maxTokens: 3500
100
+
101
+ - name: challenge-perplexity
102
+ tool: perplexity_ask
103
+ input:
104
+ query: |
105
+ Context: We are analyzing architectural patterns (SOLID principles vs CQRS vs other patterns) for this question: "${query}"
106
+
107
+ Task: Research and find evidence from authoritative sources that supports or refutes the technical analysis below:
108
+
109
+ ${challenge-qwen.output}
110
+
111
+ Focus your research on: architectural patterns, SOLID principles, CQRS, software design trade-offs, and real-world case studies.
112
+ searchDomain: "general"
113
+ searchRecency: "month"
114
+ loadFiles: [challenge-qwen]
115
+ dependsOn: [challenge-qwen]
116
+ saveToFile: true
117
+ maxTokens: 3500
118
+
119
+ # ═══════════════════════════════════════════════════════════════════════════
120
+ # CONSENSUS: Final multi-model comparison
121
+ # ═══════════════════════════════════════════════════════════════════════════
122
+
123
+ - name: consensus
124
+ tool: openai_compare
125
+ input:
126
+ topic: "Final consensus on: ${query}"
127
+ options:
128
+ - "Grok's analysis: ${challenge-grok.output}"
129
+ - "Gemini's synthesis: ${challenge-gemini.output}"
130
+ - "Qwen's technical review: ${challenge-qwen.output}"
131
+ - "Perplexity's validation: ${challenge-perplexity.output}"
132
+ criteria: "Coherence, technical soundness, real-world feasibility, and consensus strength"
133
+ includeRecommendation: true
134
+ loadFiles: [challenge-grok, challenge-gemini, challenge-qwen, challenge-perplexity]
135
+ dependsOn: [challenge-perplexity]
136
+ saveToFile: true
137
+ maxTokens: 4000
138
+
139
+ output:
140
+ format: detailed
141
+ truncateSteps: false