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.
- package/.env.example +260 -0
- package/CHANGELOG.md +54 -0
- package/CODE_OF_CONDUCT.md +56 -0
- package/CONTRIBUTING.md +54 -0
- package/Dockerfile +36 -0
- package/LICENSE +644 -0
- package/README.md +201 -0
- package/SECURITY.md +95 -0
- package/dist/personality/komaai-expressions.js +12 -0
- package/dist/profiles/balanced.json +33 -0
- package/dist/profiles/code_focus.json +33 -0
- package/dist/profiles/full.json +33 -0
- package/dist/profiles/minimal.json +33 -0
- package/dist/profiles/research_power.json +33 -0
- package/dist/scripts/build-profiles.js +46 -0
- package/dist/src/application/services/focus/FocusModeRegistry.js +46 -0
- package/dist/src/application/services/focus/FocusTool.service.js +109 -0
- package/dist/src/application/services/focus/ModeRegistry.js +46 -0
- package/dist/src/application/services/focus/modes/focus-deep.mode.js +27 -0
- package/dist/src/application/services/focus/modes/status.mode.js +50 -0
- package/dist/src/application/services/focus/modes/tachibot-status.mode.js +50 -0
- package/dist/src/collaborative-orchestrator.js +391 -0
- package/dist/src/config/model-constants.js +188 -0
- package/dist/src/config/model-defaults.js +57 -0
- package/dist/src/config/model-preferences.js +382 -0
- package/dist/src/config/timeout-config.js +130 -0
- package/dist/src/config.js +173 -0
- package/dist/src/domain/interfaces/IFocusMode.js +5 -0
- package/dist/src/domain/interfaces/IProvider.js +6 -0
- package/dist/src/domain/interfaces/ITool.js +5 -0
- package/dist/src/focus-deep.js +245 -0
- package/dist/src/infrastructure/ascii/art/robots.ascii.js +16 -0
- package/dist/src/mcp-client.js +90 -0
- package/dist/src/memory/index.js +17 -0
- package/dist/src/memory/memory-config.js +135 -0
- package/dist/src/memory/memory-interface.js +174 -0
- package/dist/src/memory/memory-manager.js +383 -0
- package/dist/src/memory/providers/devlog-provider.js +385 -0
- package/dist/src/memory/providers/hybrid-provider.js +399 -0
- package/dist/src/memory/providers/local-provider.js +388 -0
- package/dist/src/memory/providers/mem0-provider.js +337 -0
- package/dist/src/modes/architect.js +477 -0
- package/dist/src/modes/auditor.js +362 -0
- package/dist/src/modes/challenger.js +841 -0
- package/dist/src/modes/code-reviewer.js +382 -0
- package/dist/src/modes/commit-guardian.js +424 -0
- package/dist/src/modes/documentation-writer.js +572 -0
- package/dist/src/modes/scout.js +587 -0
- package/dist/src/modes/shared/helpers/challenger-helpers.js +454 -0
- package/dist/src/modes/shared/helpers/index.js +17 -0
- package/dist/src/modes/shared/helpers/scout-helpers.js +270 -0
- package/dist/src/modes/shared/helpers/verifier-helpers.js +332 -0
- package/dist/src/modes/test-architect.js +767 -0
- package/dist/src/modes/verifier.js +378 -0
- package/dist/src/monitoring/performance-monitor.js +435 -0
- package/dist/src/optimization/batch-executor.js +121 -0
- package/dist/src/optimization/context-pruner.js +196 -0
- package/dist/src/optimization/cost-monitor.js +338 -0
- package/dist/src/optimization/index.js +65 -0
- package/dist/src/optimization/model-router.js +264 -0
- package/dist/src/optimization/result-cache.js +114 -0
- package/dist/src/optimization/token-optimizer.js +257 -0
- package/dist/src/optimization/token-tracker.js +118 -0
- package/dist/src/orchestrator-instructions.js +128 -0
- package/dist/src/orchestrator-lite.js +139 -0
- package/dist/src/orchestrator.js +191 -0
- package/dist/src/orchestrators/collaborative/interfaces/IToolExecutionEngine.js +1 -0
- package/dist/src/orchestrators/collaborative/interfaces/IToolExecutionStrategy.js +5 -0
- package/dist/src/orchestrators/collaborative/interfaces/IVisualizationRenderer.js +1 -0
- package/dist/src/orchestrators/collaborative/registries/ModelProviderRegistry.js +95 -0
- package/dist/src/orchestrators/collaborative/registries/ToolAdapterRegistry.js +64 -0
- package/dist/src/orchestrators/collaborative/services/tool-execution/ToolExecutionService.js +502 -0
- package/dist/src/orchestrators/collaborative/services/visualization/VisualizationService.js +206 -0
- package/dist/src/orchestrators/collaborative/types/session-types.js +5 -0
- package/dist/src/profiles/balanced.js +37 -0
- package/dist/src/profiles/code_focus.js +37 -0
- package/dist/src/profiles/debug_intensive.js +59 -0
- package/dist/src/profiles/full.js +37 -0
- package/dist/src/profiles/minimal.js +37 -0
- package/dist/src/profiles/research_code.js +59 -0
- package/dist/src/profiles/research_power.js +37 -0
- package/dist/src/profiles/types.js +5 -0
- package/dist/src/profiles/workflow_builder.js +53 -0
- package/dist/src/prompt-engineer-lite.js +78 -0
- package/dist/src/prompt-engineer.js +399 -0
- package/dist/src/reasoning-chain.js +508 -0
- package/dist/src/sequential-thinking.js +291 -0
- package/dist/src/server-diagnostic.js +74 -0
- package/dist/src/server-raw.js +158 -0
- package/dist/src/server-simple.js +58 -0
- package/dist/src/server.js +514 -0
- package/dist/src/session/session-logger.js +617 -0
- package/dist/src/session/session-manager.js +571 -0
- package/dist/src/session/session-tools.js +400 -0
- package/dist/src/tools/advanced-modes.js +200 -0
- package/dist/src/tools/claude-integration.js +356 -0
- package/dist/src/tools/consolidated/ai-router.js +174 -0
- package/dist/src/tools/consolidated/ai-tool.js +48 -0
- package/dist/src/tools/consolidated/brainstorm-tool.js +87 -0
- package/dist/src/tools/consolidated/environment-detector.js +80 -0
- package/dist/src/tools/consolidated/index.js +50 -0
- package/dist/src/tools/consolidated/search-tool.js +110 -0
- package/dist/src/tools/consolidated/workflow-tool.js +238 -0
- package/dist/src/tools/gemini-tools.js +329 -0
- package/dist/src/tools/grok-enhanced.js +376 -0
- package/dist/src/tools/grok-tools.js +299 -0
- package/dist/src/tools/lmstudio-tools.js +223 -0
- package/dist/src/tools/openai-tools.js +498 -0
- package/dist/src/tools/openrouter-tools.js +317 -0
- package/dist/src/tools/optimized-wrapper.js +204 -0
- package/dist/src/tools/perplexity-tools.js +294 -0
- package/dist/src/tools/pingpong-tool.js +343 -0
- package/dist/src/tools/qwen-wrapper.js +74 -0
- package/dist/src/tools/tool-router.js +444 -0
- package/dist/src/tools/unified-ai-provider.js +260 -0
- package/dist/src/tools/workflow-runner.js +425 -0
- package/dist/src/tools/workflow-validator-tool.js +107 -0
- package/dist/src/types.js +23 -0
- package/dist/src/utils/input-validator.js +130 -0
- package/dist/src/utils/model-router.js +91 -0
- package/dist/src/utils/progress-stream.js +255 -0
- package/dist/src/utils/provider-router.js +88 -0
- package/dist/src/utils/smart-api-client.js +146 -0
- package/dist/src/utils/table-builder.js +218 -0
- package/dist/src/utils/timestamp-formatter.js +134 -0
- package/dist/src/utils/tool-compressor.js +257 -0
- package/dist/src/utils/tool-config.js +201 -0
- package/dist/src/validators/dependency-graph-validator.js +147 -0
- package/dist/src/validators/interpolation-validator.js +222 -0
- package/dist/src/validators/output-usage-validator.js +151 -0
- package/dist/src/validators/syntax-validator.js +102 -0
- package/dist/src/validators/tool-registry-validator.js +123 -0
- package/dist/src/validators/tool-types.js +97 -0
- package/dist/src/validators/types.js +8 -0
- package/dist/src/validators/workflow-validator.js +134 -0
- package/dist/src/visualizer-lite.js +42 -0
- package/dist/src/visualizer.js +179 -0
- package/dist/src/workflows/circuit-breaker.js +199 -0
- package/dist/src/workflows/custom-workflows.js +451 -0
- package/dist/src/workflows/engine/AutoSynthesizer.js +97 -0
- package/dist/src/workflows/engine/StepParameterResolver.js +74 -0
- package/dist/src/workflows/engine/VariableInterpolator.js +123 -0
- package/dist/src/workflows/engine/WorkflowDiscovery.js +125 -0
- package/dist/src/workflows/engine/WorkflowExecutionEngine.js +485 -0
- package/dist/src/workflows/engine/WorkflowExecutor.js +113 -0
- package/dist/src/workflows/engine/WorkflowFileManager.js +244 -0
- package/dist/src/workflows/engine/WorkflowHelpers.js +114 -0
- package/dist/src/workflows/engine/WorkflowOutputFormatter.js +83 -0
- package/dist/src/workflows/engine/events/WorkflowEventBus.js +132 -0
- package/dist/src/workflows/engine/events/interfaces/IEventBus.js +5 -0
- package/dist/src/workflows/engine/handlers/ErrorRecoveryHandler.js +162 -0
- package/dist/src/workflows/engine/handlers/PromptEnhancementHandler.js +115 -0
- package/dist/src/workflows/engine/handlers/SessionPersistenceHandler.js +167 -0
- package/dist/src/workflows/engine/handlers/StepExecutionHandler.js +231 -0
- package/dist/src/workflows/engine/handlers/ToolInvocationHandler.js +46 -0
- package/dist/src/workflows/engine/interfaces/IAutoSynthesizer.js +5 -0
- package/dist/src/workflows/engine/interfaces/IStepParameterResolver.js +5 -0
- package/dist/src/workflows/engine/interfaces/IVariableInterpolator.js +5 -0
- package/dist/src/workflows/engine/interfaces/IWorkflowDiscovery.js +4 -0
- package/dist/src/workflows/engine/interfaces/IWorkflowFileManager.js +5 -0
- package/dist/src/workflows/engine/interfaces/IWorkflowOutputFormatter.js +5 -0
- package/dist/src/workflows/engine/state/WorkflowStateMachine.js +194 -0
- package/dist/src/workflows/engine/state/interfaces/IStateMachine.js +17 -0
- package/dist/src/workflows/fallback-strategies.js +373 -0
- package/dist/src/workflows/message-queue.js +455 -0
- package/dist/src/workflows/model-router.js +189 -0
- package/dist/src/workflows/orchestrator-examples.js +174 -0
- package/dist/src/workflows/orchestrator-integration.js +200 -0
- package/dist/src/workflows/self-healing.js +524 -0
- package/dist/src/workflows/tool-mapper.js +407 -0
- package/dist/src/workflows/tool-orchestrator.js +796 -0
- package/dist/src/workflows/workflow-engine.js +573 -0
- package/dist/src/workflows/workflow-parser.js +283 -0
- package/dist/src/workflows/workflow-types.js +95 -0
- package/dist/src/workflows.js +568 -0
- package/dist/test-workflow-file-output.js +93 -0
- package/docs/API_KEYS.md +570 -0
- package/docs/CLAUDE_CODE_SETUP.md +181 -0
- package/docs/CLAUDE_DESKTOP_MANUAL.md +127 -0
- package/docs/CONFIGURATION.md +745 -0
- package/docs/FOCUS_MODES.md +240 -0
- package/docs/INSTALLATION_BOTH.md +145 -0
- package/docs/TERMS.md +352 -0
- package/docs/TOOLS_REFERENCE.md +1622 -0
- package/docs/TOOL_PARAMETERS.md +496 -0
- package/docs/TOOL_PROFILES.md +236 -0
- package/docs/WORKFLOWS.md +987 -0
- package/docs/WORKFLOW_OUTPUT.md +198 -0
- package/docs/WORKFLOW_PROGRESS_TRACKING.md +305 -0
- package/docs/workflows/design-brainstorm.md +335 -0
- package/package.json +97 -0
- package/profiles/balanced.json +37 -0
- package/profiles/code_focus.json +37 -0
- package/profiles/debug_intensive.json +34 -0
- package/profiles/full.json +37 -0
- package/profiles/minimal.json +37 -0
- package/profiles/research_power.json +37 -0
- package/profiles/workflow_builder.json +37 -0
- package/smithery.yaml +66 -0
- package/start.sh +8 -0
- package/tools.config.json +81 -0
- package/tsconfig.json +18 -0
- package/workflows/accessibility-code-audit.yaml +92 -0
- package/workflows/code-architecture-review.yaml +202 -0
- package/workflows/code-review.yaml +142 -0
- package/workflows/core/iterative-problem-solver.yaml +283 -0
- package/workflows/creative-brainstorm-yaml.yaml +215 -0
- package/workflows/pingpong.yaml +141 -0
- package/workflows/system/README.md +412 -0
- package/workflows/system/challenger.yaml +175 -0
- package/workflows/system/scout.yaml +164 -0
- package/workflows/system/verifier.yaml +133 -0
- package/workflows/ultra-creative-brainstorm.yaml +318 -0
- package/workflows/ux-research-flow.yaml +92 -0
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
# System Workflows
|
|
2
|
+
|
|
3
|
+
Multi-step AI orchestration workflows with file-based chaining to bypass MCP token limits.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Available Workflows
|
|
8
|
+
|
|
9
|
+
### 1. **verifier** - Multi-Model Consensus Verification
|
|
10
|
+
|
|
11
|
+
**Purpose:** Verify claims, statements, or facts using 5 different AI models and analyze consensus.
|
|
12
|
+
|
|
13
|
+
**Architecture:**
|
|
14
|
+
- 7 steps total (5 verification + 1 consensus + 1 formatting)
|
|
15
|
+
- Each model gets 10k tokens (saved to disk)
|
|
16
|
+
- Total capacity: **58k tokens** (vs 25k MCP limit)
|
|
17
|
+
|
|
18
|
+
**Usage:**
|
|
19
|
+
```bash
|
|
20
|
+
# Via workflow tool
|
|
21
|
+
mcp call workflow --name verifier --query "Claim to verify"
|
|
22
|
+
|
|
23
|
+
# Or use workflow runner directly
|
|
24
|
+
workflow verifier --query "Python is faster than JavaScript for all use cases"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Models Used:**
|
|
28
|
+
1. GPT-5 Mini (openai_compare)
|
|
29
|
+
2. Gemini 2.5 (gemini_analyze_text)
|
|
30
|
+
3. Grok 4 (grok_code)
|
|
31
|
+
4. Qwen Coder (qwen_coder)
|
|
32
|
+
5. Perplexity Reasoning (perplexity_reason)
|
|
33
|
+
|
|
34
|
+
**Output Structure:**
|
|
35
|
+
```
|
|
36
|
+
workflow-output/verifier/{timestamp}/
|
|
37
|
+
├── verify_gpt5_mini.md (10k tokens)
|
|
38
|
+
├── verify_gemini.md (10k tokens)
|
|
39
|
+
├── verify_grok.md (10k tokens)
|
|
40
|
+
├── verify_qwen.md (10k tokens)
|
|
41
|
+
├── verify_perplexity.md (10k tokens)
|
|
42
|
+
├── consensus_analysis.md (8k tokens)
|
|
43
|
+
├── format_report.md (4k tokens - final output)
|
|
44
|
+
└── manifest.json (execution metadata)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**When to Use:**
|
|
48
|
+
- Fact-checking controversial claims
|
|
49
|
+
- Technical accuracy verification
|
|
50
|
+
- Multi-perspective validation
|
|
51
|
+
- High-stakes decision support
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
### 2. **scout** - Intelligent Information Gathering
|
|
56
|
+
|
|
57
|
+
**Purpose:** Deep research and information gathering with temporal context and multi-source analysis.
|
|
58
|
+
|
|
59
|
+
**Architecture:**
|
|
60
|
+
- 6 steps total (2 search + 2 analysis + 1 synthesis + 1 formatting)
|
|
61
|
+
- Web research: 20k tokens per source
|
|
62
|
+
- Total capacity: **90k tokens**
|
|
63
|
+
|
|
64
|
+
**Usage:**
|
|
65
|
+
```bash
|
|
66
|
+
workflow scout --query "Latest developments in quantum computing"
|
|
67
|
+
|
|
68
|
+
# Or for technical topics
|
|
69
|
+
workflow scout --query "Rust async runtime comparison: tokio vs async-std"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Steps:**
|
|
73
|
+
1. **Perplexity Deep Research** (20k tokens) - Academic and web sources
|
|
74
|
+
2. **Grok Live Search** (20k tokens) - X/Twitter integration, real-time data
|
|
75
|
+
3. **Gemini Analysis** (15k tokens) - Pattern recognition, temporal context
|
|
76
|
+
4. **Qwen Technical Analysis** (15k tokens) - Code, architecture, implementation
|
|
77
|
+
5. **GPT-5 Mini Reasoning Synthesis** (12k tokens) - Combined reasoning
|
|
78
|
+
6. **Format Scout Report** (8k tokens) - Structured output
|
|
79
|
+
|
|
80
|
+
**Output Includes:**
|
|
81
|
+
- Executive summary
|
|
82
|
+
- Key findings with confidence levels
|
|
83
|
+
- Temporal context (current/recent/emerging)
|
|
84
|
+
- Source reliability assessment
|
|
85
|
+
- Technical deep-dive (if applicable)
|
|
86
|
+
- Knowledge gaps and uncertainties
|
|
87
|
+
- Actionable recommendations
|
|
88
|
+
|
|
89
|
+
**When to Use:**
|
|
90
|
+
- Research new technologies or topics
|
|
91
|
+
- Market/competitive analysis
|
|
92
|
+
- Technical feasibility studies
|
|
93
|
+
- Literature review needs
|
|
94
|
+
- "What's the current state of X?" questions
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
### 3. **challenger** - Devil's Advocate Critical Analysis
|
|
99
|
+
|
|
100
|
+
**Purpose:** Challenge assumptions, find alternative perspectives, and strengthen arguments by exploring counter-positions.
|
|
101
|
+
|
|
102
|
+
**Architecture:**
|
|
103
|
+
- 6 steps total (claim extraction + counter-args + research + evidence + verification + synthesis)
|
|
104
|
+
- Total capacity: **64k tokens**
|
|
105
|
+
|
|
106
|
+
**Usage:**
|
|
107
|
+
```bash
|
|
108
|
+
workflow challenger --query "Remote work is always better than office work"
|
|
109
|
+
|
|
110
|
+
# For business decisions
|
|
111
|
+
workflow challenger --query "We should migrate our entire infrastructure to Kubernetes"
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Steps:**
|
|
115
|
+
1. **Extract Claims** (5k tokens) - Identify all assertions and assumptions
|
|
116
|
+
2. **Generate Counter-Arguments** (10k tokens) - Creative brainstorming of challenges
|
|
117
|
+
3. **Research Alternatives** (15k tokens) - Find opposing viewpoints and precedents
|
|
118
|
+
4. **Find Counter-Evidence** (12k tokens) - Data and examples that contradict
|
|
119
|
+
5. **Verify Counter-Arguments** (10k tokens) - Multi-model validation
|
|
120
|
+
6. **Synthesis Report** (12k tokens) - Comprehensive challenge analysis
|
|
121
|
+
|
|
122
|
+
**Output Includes:**
|
|
123
|
+
- Original position summary
|
|
124
|
+
- Identified claims and assumptions
|
|
125
|
+
- Counter-arguments by strength
|
|
126
|
+
- Alternative perspectives
|
|
127
|
+
- "What if we're backwards?" analysis
|
|
128
|
+
- Third-way options (synthesis positions)
|
|
129
|
+
- Strongest and weakest challenges
|
|
130
|
+
- Recommended modifications
|
|
131
|
+
|
|
132
|
+
**When to Use:**
|
|
133
|
+
- Pre-mortem analysis for decisions
|
|
134
|
+
- Strengthen proposals before presentation
|
|
135
|
+
- Find blindspots in strategy
|
|
136
|
+
- Challenge groupthink
|
|
137
|
+
- Risk assessment
|
|
138
|
+
- Debate preparation
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## File-Based Chaining Technology
|
|
143
|
+
|
|
144
|
+
### How It Works
|
|
145
|
+
|
|
146
|
+
**Traditional Workflow (Hits Token Limit):**
|
|
147
|
+
```
|
|
148
|
+
Step 1 → 8k tokens in memory
|
|
149
|
+
Step 2 → 8k tokens in memory
|
|
150
|
+
Step 3 → 8k tokens in memory
|
|
151
|
+
Total: 24k tokens → ❌ Exceeds 25k MCP limit!
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**File-Based Workflow (No Limit):**
|
|
155
|
+
```yaml
|
|
156
|
+
- name: step1
|
|
157
|
+
saveToFile: true # Saves full output to disk
|
|
158
|
+
maxTokens: 20000 # Can be huge!
|
|
159
|
+
|
|
160
|
+
- name: step2
|
|
161
|
+
saveToFile: true
|
|
162
|
+
maxTokens: 20000
|
|
163
|
+
|
|
164
|
+
- name: synthesis
|
|
165
|
+
loadFiles: ["step1", "step2"] # Loads full content from disk
|
|
166
|
+
input:
|
|
167
|
+
text: "${step1}" # Full 20k tokens available
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Memory Usage:**
|
|
171
|
+
- Step 1: 20k tokens → saved to `step1.md` → only 200-char summary in memory
|
|
172
|
+
- Step 2: 20k tokens → saved to `step2.md` → only 200-char summary in memory
|
|
173
|
+
- Step 3: Loads both files (40k tokens) → processes → saves result → summary in memory
|
|
174
|
+
- **Final MCP response:** "Workflow complete, see workflow-output/"
|
|
175
|
+
|
|
176
|
+
### Key Features
|
|
177
|
+
|
|
178
|
+
**1. `saveToFile: true`**
|
|
179
|
+
```yaml
|
|
180
|
+
- name: research
|
|
181
|
+
tool: perplexity_research
|
|
182
|
+
saveToFile: true # ← Saves to workflow-output/
|
|
183
|
+
maxTokens: 20000 # ← Can use high limits
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**2. `loadFiles: [...]`**
|
|
187
|
+
```yaml
|
|
188
|
+
- name: analysis
|
|
189
|
+
loadFiles: ["research", "search"] # ← Loads from disk
|
|
190
|
+
tool: gemini_analyze_text
|
|
191
|
+
input:
|
|
192
|
+
text: "${research}" # ← Full content available
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**3. Variable Interpolation**
|
|
196
|
+
```yaml
|
|
197
|
+
output:
|
|
198
|
+
variable: my_result # Creates ${my_result} variable
|
|
199
|
+
|
|
200
|
+
# Later steps can use:
|
|
201
|
+
input: "${my_result}"
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**4. File Structure**
|
|
205
|
+
```
|
|
206
|
+
workflow-output/{workflow-name}/{timestamp-id}/
|
|
207
|
+
├── step1.md # Full output with metadata
|
|
208
|
+
├── step2.md
|
|
209
|
+
├── step3.md
|
|
210
|
+
└── manifest.json # Execution tracking
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Comparison: Tools vs Workflows
|
|
216
|
+
|
|
217
|
+
### TypeScript Tools (Quick & Simple)
|
|
218
|
+
|
|
219
|
+
**Available as MCP tools:**
|
|
220
|
+
- `verifier` - Call TypeScript function directly
|
|
221
|
+
- `scout` - Call TypeScript function directly
|
|
222
|
+
- `challenger` - Call TypeScript function directly
|
|
223
|
+
- `auditor`, `architect`, `commit_guardian` - Also available
|
|
224
|
+
|
|
225
|
+
**Pros:**
|
|
226
|
+
- ✅ Single function call
|
|
227
|
+
- ✅ Fast for simple queries
|
|
228
|
+
- ✅ Returns results immediately
|
|
229
|
+
- ✅ Lower latency
|
|
230
|
+
|
|
231
|
+
**Cons:**
|
|
232
|
+
- ❌ Opaque (can't see internal model calls)
|
|
233
|
+
- ❌ Not configurable (hardcoded logic)
|
|
234
|
+
- ❌ Hits 25k token limit easily
|
|
235
|
+
- ❌ Can't inspect intermediate steps
|
|
236
|
+
|
|
237
|
+
**Usage:**
|
|
238
|
+
```javascript
|
|
239
|
+
// From within workflow
|
|
240
|
+
- name: verify
|
|
241
|
+
tool: verifier
|
|
242
|
+
input: "Claim to verify"
|
|
243
|
+
maxTokens: 4000
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### YAML Workflows (Powerful & Transparent)
|
|
247
|
+
|
|
248
|
+
**Available in `workflows/system/`:**
|
|
249
|
+
- `verifier.yaml` - 7 steps, 58k token capacity
|
|
250
|
+
- `scout.yaml` - 6 steps, 90k token capacity
|
|
251
|
+
- `challenger.yaml` - 6 steps, 64k token capacity
|
|
252
|
+
|
|
253
|
+
**Pros:**
|
|
254
|
+
- ✅ Transparent (see all steps)
|
|
255
|
+
- ✅ Configurable (modify YAML)
|
|
256
|
+
- ✅ No token limits (file-based)
|
|
257
|
+
- ✅ Inspectable outputs
|
|
258
|
+
- ✅ Can reuse intermediate results
|
|
259
|
+
- ✅ Fork and customize easily
|
|
260
|
+
|
|
261
|
+
**Cons:**
|
|
262
|
+
- ❌ Multiple API calls (slower)
|
|
263
|
+
- ❌ More complex setup
|
|
264
|
+
- ❌ Higher cost (more model calls)
|
|
265
|
+
|
|
266
|
+
**Usage:**
|
|
267
|
+
```bash
|
|
268
|
+
workflow verifier --query "Claim to verify"
|
|
269
|
+
# or
|
|
270
|
+
workflow scout --query "Research topic"
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## When to Use Which
|
|
276
|
+
|
|
277
|
+
### Use TypeScript Tools When:
|
|
278
|
+
- Quick one-off queries
|
|
279
|
+
- Simple verification needs
|
|
280
|
+
- Speed is priority
|
|
281
|
+
- Output under 25k tokens
|
|
282
|
+
- Don't need to see intermediate steps
|
|
283
|
+
|
|
284
|
+
### Use YAML Workflows When:
|
|
285
|
+
- Complex multi-step analysis needed
|
|
286
|
+
- Want to see how conclusion was reached
|
|
287
|
+
- Need more than 25k tokens of output
|
|
288
|
+
- Want to inspect/debug each step
|
|
289
|
+
- Want to customize the process
|
|
290
|
+
- Research/analysis is mission-critical
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Customization Guide
|
|
295
|
+
|
|
296
|
+
### Fork and Modify
|
|
297
|
+
|
|
298
|
+
**Example: Custom verifier with only 3 models**
|
|
299
|
+
|
|
300
|
+
1. Copy workflow:
|
|
301
|
+
```bash
|
|
302
|
+
cp workflows/system/verifier.yaml workflows/my-quick-verifier.yaml
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
2. Edit YAML:
|
|
306
|
+
```yaml
|
|
307
|
+
steps:
|
|
308
|
+
- name: verify_gpt5_mini
|
|
309
|
+
# ... keep this
|
|
310
|
+
|
|
311
|
+
- name: verify_gemini
|
|
312
|
+
# ... keep this
|
|
313
|
+
|
|
314
|
+
- name: verify_grok
|
|
315
|
+
# ... keep this
|
|
316
|
+
|
|
317
|
+
# Remove verify_qwen and verify_perplexity
|
|
318
|
+
|
|
319
|
+
- name: consensus_analysis
|
|
320
|
+
loadFiles: ["verify_gpt5_mini", "verify_gemini", "verify_grok"]
|
|
321
|
+
# Update to only load 3 files
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
3. Run custom workflow:
|
|
325
|
+
```bash
|
|
326
|
+
workflow my-quick-verifier --query "Test"
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
### Adjust Token Limits
|
|
330
|
+
|
|
331
|
+
```yaml
|
|
332
|
+
# Lower for cost savings
|
|
333
|
+
maxTokens: 5000
|
|
334
|
+
|
|
335
|
+
# Higher for comprehensive analysis
|
|
336
|
+
maxTokens: 20000
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
### Change Models
|
|
340
|
+
|
|
341
|
+
```yaml
|
|
342
|
+
# Replace any tool
|
|
343
|
+
- name: verify_alternative
|
|
344
|
+
tool: grok_brainstorm # Use different tool
|
|
345
|
+
# or
|
|
346
|
+
tool: gemini_analyze_code # Different provider
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## Cost Estimation
|
|
352
|
+
|
|
353
|
+
### verifier.yaml
|
|
354
|
+
- 5 verification calls @ 10k tokens each = ~50k tokens
|
|
355
|
+
- 1 consensus @ 8k tokens
|
|
356
|
+
- 1 formatting @ 4k tokens
|
|
357
|
+
- **Total:** ~62k tokens (~$0.15 - $0.30 depending on models)
|
|
358
|
+
|
|
359
|
+
### scout.yaml
|
|
360
|
+
- 2 search calls @ 20k tokens = 40k tokens
|
|
361
|
+
- 2 analysis calls @ 15k tokens = 30k tokens
|
|
362
|
+
- 1 synthesis @ 12k tokens
|
|
363
|
+
- 1 formatting @ 8k tokens
|
|
364
|
+
- **Total:** ~90k tokens (~$0.20 - $0.40)
|
|
365
|
+
|
|
366
|
+
### challenger.yaml
|
|
367
|
+
- 6 steps totaling ~64k tokens
|
|
368
|
+
- **Total:** ~$0.15 - $0.35
|
|
369
|
+
|
|
370
|
+
**Settings can limit costs:**
|
|
371
|
+
```yaml
|
|
372
|
+
settings:
|
|
373
|
+
maxCost: 0.25 # Workflow stops if cost exceeds $0.25
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
---
|
|
377
|
+
|
|
378
|
+
## Troubleshooting
|
|
379
|
+
|
|
380
|
+
### "Variable not found"
|
|
381
|
+
Make sure step has `output.variable` set:
|
|
382
|
+
```yaml
|
|
383
|
+
- name: step1
|
|
384
|
+
output:
|
|
385
|
+
variable: my_var # Creates ${my_var}
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
### "File not found"
|
|
389
|
+
Ensure `saveToFile: true` on earlier step:
|
|
390
|
+
```yaml
|
|
391
|
+
- name: step1
|
|
392
|
+
saveToFile: true # Required for loadFiles
|
|
393
|
+
|
|
394
|
+
- name: step2
|
|
395
|
+
loadFiles: ["step1"] # Now works
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### "Tool not found"
|
|
399
|
+
Check tool name matches registered MCP tool:
|
|
400
|
+
```bash
|
|
401
|
+
# List available tools
|
|
402
|
+
mcp list-tools
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
---
|
|
406
|
+
|
|
407
|
+
## See Also
|
|
408
|
+
|
|
409
|
+
- [Workflow Documentation](../../docs/WORKFLOWS.md)
|
|
410
|
+
- [File Output Guide](../../docs/WORKFLOW_OUTPUT.md)
|
|
411
|
+
- [Tool Reference](../../docs/TOOLS_REFERENCE.md)
|
|
412
|
+
- [TypeScript Mode Implementations](../../src/modes/)
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
name: challenger
|
|
2
|
+
description: Devil's advocate workflow that expands perspectives and challenges assumptions
|
|
3
|
+
version: "2.0"
|
|
4
|
+
|
|
5
|
+
settings:
|
|
6
|
+
maxCost: 0.55
|
|
7
|
+
|
|
8
|
+
steps:
|
|
9
|
+
# Step 1: Extract key claims from the input
|
|
10
|
+
- name: extract_claims
|
|
11
|
+
tool: gemini_analyze_text
|
|
12
|
+
input:
|
|
13
|
+
text: |
|
|
14
|
+
Analyze this statement and extract all key claims:
|
|
15
|
+
|
|
16
|
+
${query}
|
|
17
|
+
|
|
18
|
+
Identify:
|
|
19
|
+
1. Primary claim (main assertion)
|
|
20
|
+
2. Supporting claims (sub-assertions)
|
|
21
|
+
3. Implicit assumptions
|
|
22
|
+
4. Confidence level expressed (if any)
|
|
23
|
+
5. Evidence type (anecdotal, statistical, expert opinion, etc.)
|
|
24
|
+
|
|
25
|
+
Format as numbered list with categorization.
|
|
26
|
+
type: "general"
|
|
27
|
+
saveToFile: true
|
|
28
|
+
maxTokens: 5000
|
|
29
|
+
output:
|
|
30
|
+
variable: claims_list
|
|
31
|
+
|
|
32
|
+
# Step 2: Generate counter-arguments via creative brainstorming
|
|
33
|
+
- name: generate_counter_arguments
|
|
34
|
+
tool: gemini_brainstorm
|
|
35
|
+
input:
|
|
36
|
+
prompt: |
|
|
37
|
+
Claims to challenge:
|
|
38
|
+
${claims_list}
|
|
39
|
+
|
|
40
|
+
Original context:
|
|
41
|
+
${query}
|
|
42
|
+
|
|
43
|
+
Generate:
|
|
44
|
+
1. Direct counter-arguments for each claim
|
|
45
|
+
2. Alternative interpretations
|
|
46
|
+
3. Devil's advocate positions
|
|
47
|
+
4. Edge cases that break the claims
|
|
48
|
+
5. "What if we're looking at this backwards?" scenarios
|
|
49
|
+
|
|
50
|
+
Be creative and thorough. Don't just nitpick - find genuinely different perspectives.
|
|
51
|
+
saveToFile: true
|
|
52
|
+
maxTokens: 10000
|
|
53
|
+
output:
|
|
54
|
+
variable: counter_args
|
|
55
|
+
|
|
56
|
+
# Step 3: Research alternative perspectives via Perplexity
|
|
57
|
+
- name: research_alternatives
|
|
58
|
+
tool: perplexity_research
|
|
59
|
+
input:
|
|
60
|
+
topic: |
|
|
61
|
+
Alternative perspectives and counter-evidence for:
|
|
62
|
+
|
|
63
|
+
${query}
|
|
64
|
+
|
|
65
|
+
Find:
|
|
66
|
+
- Opposing viewpoints from credible sources
|
|
67
|
+
- Historical precedents that contradict
|
|
68
|
+
- Expert opinions that disagree
|
|
69
|
+
- Data that challenges these claims
|
|
70
|
+
- Examples where this approach failed
|
|
71
|
+
depth: "deep"
|
|
72
|
+
saveToFile: true
|
|
73
|
+
maxTokens: 15000
|
|
74
|
+
output:
|
|
75
|
+
variable: alt_perspectives
|
|
76
|
+
|
|
77
|
+
# Step 4: Find counter-evidence via Grok search
|
|
78
|
+
- name: find_counter_evidence
|
|
79
|
+
tool: grok_search
|
|
80
|
+
input:
|
|
81
|
+
query: |
|
|
82
|
+
Counter-evidence and criticisms:
|
|
83
|
+
|
|
84
|
+
${query}
|
|
85
|
+
|
|
86
|
+
Search for:
|
|
87
|
+
- Recent criticisms or challenges
|
|
88
|
+
- Failed implementations or problems
|
|
89
|
+
- Expert warnings or concerns
|
|
90
|
+
- Contradictory data or research
|
|
91
|
+
- Real-world examples that contradict
|
|
92
|
+
depth: "comprehensive"
|
|
93
|
+
saveToFile: true
|
|
94
|
+
maxTokens: 12000
|
|
95
|
+
output:
|
|
96
|
+
variable: counter_evidence
|
|
97
|
+
|
|
98
|
+
# Step 5: Multi-model verification of counter-arguments
|
|
99
|
+
- name: verify_counter_arguments
|
|
100
|
+
tool: openai_brainstorm
|
|
101
|
+
input:
|
|
102
|
+
problem: |
|
|
103
|
+
Evaluate the strength and validity of the following counter-arguments:
|
|
104
|
+
|
|
105
|
+
ORIGINAL CLAIMS:
|
|
106
|
+
${claims_list}
|
|
107
|
+
|
|
108
|
+
COUNTER-ARGUMENTS:
|
|
109
|
+
${counter_args}
|
|
110
|
+
|
|
111
|
+
RESEARCH:
|
|
112
|
+
${alt_perspectives}
|
|
113
|
+
|
|
114
|
+
COUNTER-EVIDENCE:
|
|
115
|
+
${counter_evidence}
|
|
116
|
+
|
|
117
|
+
For each counter-argument, assess:
|
|
118
|
+
1. Logical validity (is the reasoning sound?)
|
|
119
|
+
2. Evidence strength (is it backed by credible sources/data?)
|
|
120
|
+
3. Relevance (does it directly challenge the claims?)
|
|
121
|
+
4. Overall strength (weak/moderate/strong)
|
|
122
|
+
|
|
123
|
+
Provide a clear assessment of which counter-arguments are most compelling and why.
|
|
124
|
+
style: "systematic"
|
|
125
|
+
reasoning_effort: "high"
|
|
126
|
+
saveToFile: true
|
|
127
|
+
maxTokens: 10000
|
|
128
|
+
output:
|
|
129
|
+
variable: verification
|
|
130
|
+
|
|
131
|
+
# Step 6: Executive Summary (using Gemini 2.5 Flash for large context)
|
|
132
|
+
- name: executive-summary
|
|
133
|
+
tool: gemini_analyze_text
|
|
134
|
+
input:
|
|
135
|
+
text: |
|
|
136
|
+
${claims_list}
|
|
137
|
+
${counter_args}
|
|
138
|
+
${alt_perspectives}
|
|
139
|
+
${counter_evidence}
|
|
140
|
+
${verification}
|
|
141
|
+
task: |
|
|
142
|
+
Original Statement: ${query}
|
|
143
|
+
|
|
144
|
+
Create comprehensive challenger executive summary:
|
|
145
|
+
|
|
146
|
+
## Original Position Summary
|
|
147
|
+
[Summarize the original claims in 2-3 sentences]
|
|
148
|
+
|
|
149
|
+
## Counter-Arguments by Claim
|
|
150
|
+
[For top 3 claims: counter-argument + strength + evidence]
|
|
151
|
+
|
|
152
|
+
## Alternative Perspectives
|
|
153
|
+
[Different ways to view this entirely]
|
|
154
|
+
|
|
155
|
+
## "What if we're backwards?" Analysis
|
|
156
|
+
[Explore opposite assumptions]
|
|
157
|
+
|
|
158
|
+
## Strongest Challenges
|
|
159
|
+
[Top 3 most compelling counter-arguments with evidence]
|
|
160
|
+
|
|
161
|
+
## Verdict
|
|
162
|
+
- **Original Position Strength:** [0-100%]
|
|
163
|
+
- **Challenge Strength:** [0-100%]
|
|
164
|
+
- **Recommended Action:** [Accept/Reject/Modify/Investigate Further]
|
|
165
|
+
|
|
166
|
+
## Recommended Modifications
|
|
167
|
+
[How to strengthen the original position or find middle ground]
|
|
168
|
+
|
|
169
|
+
Keep under 2500 words for Claude Code.
|
|
170
|
+
maxTokens: 8000
|
|
171
|
+
output:
|
|
172
|
+
variable: challenge_report
|
|
173
|
+
|
|
174
|
+
output:
|
|
175
|
+
format: detailed
|