ai-consultants 2.10.1
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/.claude/commands/ai-consultants:consult.md +94 -0
- package/.claude/commands/ai-consultants:debate.md +103 -0
- package/.claude/commands/ai-consultants:help.md +30 -0
- package/CLAUDE.md +839 -0
- package/LICENSE +21 -0
- package/README.md +758 -0
- package/SKILL.md +156 -0
- package/bin/ai-consultants +96 -0
- package/docs/COST_RATES.md +172 -0
- package/docs/JSON_SCHEMA.md +305 -0
- package/docs/SETUP.md +879 -0
- package/docs/SMART_ROUTING.md +219 -0
- package/docs/cost_rates.json +143 -0
- package/package.json +47 -0
- package/references/configuration.md +141 -0
- package/references/details.md +60 -0
- package/scripts/build_context.sh +562 -0
- package/scripts/classify_question.sh +148 -0
- package/scripts/config.sh +753 -0
- package/scripts/configure.sh +1093 -0
- package/scripts/consult_all.sh +934 -0
- package/scripts/debate_round.sh +421 -0
- package/scripts/doctor.sh +642 -0
- package/scripts/followup.sh +197 -0
- package/scripts/install.sh +319 -0
- package/scripts/lib/api.sh +640 -0
- package/scripts/lib/api_query.sh +228 -0
- package/scripts/lib/cache.sh +338 -0
- package/scripts/lib/chunking.sh +880 -0
- package/scripts/lib/code_optimizer.sh +671 -0
- package/scripts/lib/common.sh +1088 -0
- package/scripts/lib/costs.sh +674 -0
- package/scripts/lib/personas.sh +372 -0
- package/scripts/lib/progress.sh +251 -0
- package/scripts/lib/reflection.sh +447 -0
- package/scripts/lib/routing.sh +566 -0
- package/scripts/lib/schema.json +165 -0
- package/scripts/lib/session.sh +327 -0
- package/scripts/lib/symbol_map.sh +445 -0
- package/scripts/lib/voting.sh +495 -0
- package/scripts/peer_review.sh +460 -0
- package/scripts/preflight_check.sh +452 -0
- package/scripts/query_aider.sh +83 -0
- package/scripts/query_amp.sh +67 -0
- package/scripts/query_claude.sh +99 -0
- package/scripts/query_codex.sh +92 -0
- package/scripts/query_cursor.sh +72 -0
- package/scripts/query_deepseek.sh +17 -0
- package/scripts/query_gemini.sh +85 -0
- package/scripts/query_glm.sh +17 -0
- package/scripts/query_grok.sh +17 -0
- package/scripts/query_kilo.sh +140 -0
- package/scripts/query_kimi.sh +67 -0
- package/scripts/query_minimax.sh +17 -0
- package/scripts/query_mistral.sh +97 -0
- package/scripts/query_ollama.sh +328 -0
- package/scripts/query_qwen3.sh +93 -0
- package/scripts/setup_wizard.sh +367 -0
- package/scripts/skillport-install.sh +196 -0
- package/scripts/synthesize.sh +332 -0
- package/templates/consultation_report.md +323 -0
- package/templates/synthesis_prompt.md +120 -0
|
@@ -0,0 +1,753 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# config.sh - Centralized configuration for AI Consultants
|
|
3
|
+
# Modify this file to customize skill behavior
|
|
4
|
+
|
|
5
|
+
# =============================================================================
|
|
6
|
+
# GENERAL SETTINGS
|
|
7
|
+
# =============================================================================
|
|
8
|
+
|
|
9
|
+
# Maximum number of retry attempts on failure
|
|
10
|
+
MAX_RETRIES="${MAX_RETRIES:-2}"
|
|
11
|
+
|
|
12
|
+
# Pause in seconds between retry attempts
|
|
13
|
+
RETRY_DELAY_SECONDS="${RETRY_DELAY_SECONDS:-5}"
|
|
14
|
+
|
|
15
|
+
# Base output directory for consultations
|
|
16
|
+
DEFAULT_OUTPUT_DIR_BASE="${DEFAULT_OUTPUT_DIR_BASE:-/tmp/ai_consultations}"
|
|
17
|
+
|
|
18
|
+
# =============================================================================
|
|
19
|
+
# CLI/API MODE SWITCHING (v2.6+)
|
|
20
|
+
# =============================================================================
|
|
21
|
+
# For agents that support both CLI and API mode, set USE_API=true to use API mode.
|
|
22
|
+
# When API mode is enabled, CLI mode is automatically disabled (mutual exclusivity).
|
|
23
|
+
# 5 agents support switching: Gemini, Codex, Claude, Mistral, Qwen3
|
|
24
|
+
|
|
25
|
+
# Mode switching (true = use API, false = use CLI)
|
|
26
|
+
GEMINI_USE_API="${GEMINI_USE_API:-false}"
|
|
27
|
+
CODEX_USE_API="${CODEX_USE_API:-false}"
|
|
28
|
+
CLAUDE_USE_API="${CLAUDE_USE_API:-false}"
|
|
29
|
+
MISTRAL_USE_API="${MISTRAL_USE_API:-false}"
|
|
30
|
+
QWEN3_USE_API="${QWEN3_USE_API:-false}" # Default false to use qwen CLI
|
|
31
|
+
|
|
32
|
+
# API endpoints for CLI-switchable agents
|
|
33
|
+
GEMINI_API_URL="${GEMINI_API_URL:-https://generativelanguage.googleapis.com/v1beta/models}"
|
|
34
|
+
CODEX_API_URL="${CODEX_API_URL:-https://api.openai.com/v1/chat/completions}"
|
|
35
|
+
CLAUDE_API_URL="${CLAUDE_API_URL:-https://api.anthropic.com/v1/messages}"
|
|
36
|
+
MISTRAL_API_URL="${MISTRAL_API_URL:-https://api.mistral.ai/v1/chat/completions}"
|
|
37
|
+
# Note: QWEN3_API_URL is defined in the Qwen3 configuration section below
|
|
38
|
+
|
|
39
|
+
# API keys (use existing or set new)
|
|
40
|
+
# GEMINI_API_KEY - Google AI API key (for Gemini API mode)
|
|
41
|
+
# OPENAI_API_KEY - For Codex API mode (existing)
|
|
42
|
+
# ANTHROPIC_API_KEY - For Claude API mode
|
|
43
|
+
# MISTRAL_API_KEY - For Mistral API mode (existing)
|
|
44
|
+
# QWEN3_API_KEY - For Qwen3 API mode (existing)
|
|
45
|
+
|
|
46
|
+
# =============================================================================
|
|
47
|
+
# PARALLEL LAUNCH STAGGER (v2.10.1)
|
|
48
|
+
# =============================================================================
|
|
49
|
+
# Random delay (0 to N seconds) before launching each consultant in parallel.
|
|
50
|
+
# Prevents rate-limit bursts (e.g. Gemini 429 MODEL_CAPACITY_EXHAUSTED).
|
|
51
|
+
# Set to 0 to disable staggering.
|
|
52
|
+
LAUNCH_STAGGER_MAX_SECONDS="${LAUNCH_STAGGER_MAX_SECONDS:-2}"
|
|
53
|
+
|
|
54
|
+
# =============================================================================
|
|
55
|
+
# GEMINI CONFIGURATION - The Architect
|
|
56
|
+
# =============================================================================
|
|
57
|
+
|
|
58
|
+
GEMINI_MODEL="${GEMINI_MODEL:-gemini-3.1-pro-preview}"
|
|
59
|
+
GEMINI_TIMEOUT_SECONDS="${GEMINI_TIMEOUT:-180}"
|
|
60
|
+
GEMINI_CMD="${GEMINI_CMD:-gemini}"
|
|
61
|
+
|
|
62
|
+
# =============================================================================
|
|
63
|
+
# CODEX CONFIGURATION - The Pragmatist
|
|
64
|
+
# =============================================================================
|
|
65
|
+
|
|
66
|
+
# Model: "gpt-5.3-codex" (default), "gpt-5.3", "gpt-4o-mini", etc.
|
|
67
|
+
CODEX_MODEL="${CODEX_MODEL:-gpt-5.3-codex}"
|
|
68
|
+
CODEX_TIMEOUT_SECONDS="${CODEX_TIMEOUT:-180}"
|
|
69
|
+
CODEX_CMD="${CODEX_CMD:-codex}"
|
|
70
|
+
|
|
71
|
+
# =============================================================================
|
|
72
|
+
# MISTRAL VIBE CONFIGURATION - The Devil's Advocate
|
|
73
|
+
# =============================================================================
|
|
74
|
+
|
|
75
|
+
MISTRAL_MODEL="${MISTRAL_MODEL:-mistral-large-3}"
|
|
76
|
+
MISTRAL_TIMEOUT_SECONDS="${MISTRAL_TIMEOUT:-180}"
|
|
77
|
+
MISTRAL_CMD="${MISTRAL_CMD:-vibe}"
|
|
78
|
+
|
|
79
|
+
# =============================================================================
|
|
80
|
+
# KILO CONFIGURATION - The Innovator
|
|
81
|
+
# =============================================================================
|
|
82
|
+
|
|
83
|
+
KILO_MODEL="${KILO_MODEL:-auto}"
|
|
84
|
+
KILO_TIMEOUT_SECONDS="${KILO_TIMEOUT:-180}"
|
|
85
|
+
KILO_WORKSPACE="${KILO_WORKSPACE:-$(pwd)}"
|
|
86
|
+
KILO_CMD="${KILO_CMD:-kilocode}"
|
|
87
|
+
|
|
88
|
+
# =============================================================================
|
|
89
|
+
# CURSOR CONFIGURATION - The Integrator
|
|
90
|
+
# =============================================================================
|
|
91
|
+
|
|
92
|
+
CURSOR_MODEL="${CURSOR_MODEL:-composer-1.5}"
|
|
93
|
+
CURSOR_TIMEOUT_SECONDS="${CURSOR_TIMEOUT:-180}"
|
|
94
|
+
CURSOR_CMD="${CURSOR_CMD:-agent}"
|
|
95
|
+
|
|
96
|
+
# =============================================================================
|
|
97
|
+
# AIDER CONFIGURATION - The Pair Programmer
|
|
98
|
+
# =============================================================================
|
|
99
|
+
|
|
100
|
+
AIDER_MODEL="${AIDER_MODEL:-gpt-5.3-codex}"
|
|
101
|
+
AIDER_TIMEOUT_SECONDS="${AIDER_TIMEOUT:-180}"
|
|
102
|
+
AIDER_CMD="${AIDER_CMD:-aider}"
|
|
103
|
+
|
|
104
|
+
# =============================================================================
|
|
105
|
+
# QWEN3 CONFIGURATION - The Analyst (CLI/API switchable v2.7)
|
|
106
|
+
# =============================================================================
|
|
107
|
+
|
|
108
|
+
QWEN3_MODEL="${QWEN3_MODEL:-qwen3.5-plus}"
|
|
109
|
+
QWEN3_TIMEOUT_SECONDS="${QWEN3_TIMEOUT:-180}"
|
|
110
|
+
QWEN3_CMD="${QWEN3_CMD:-qwen}"
|
|
111
|
+
QWEN3_API_URL="${QWEN3_API_URL:-https://dashscope.aliyuncs.com/api/v1/services/aigc/text-generation/generation}"
|
|
112
|
+
QWEN3_FORMAT="${QWEN3_FORMAT:-qwen}"
|
|
113
|
+
# CLI mode: npm install -g @qwen-code/qwen-code@latest
|
|
114
|
+
# API key: Set QWEN3_API_KEY environment variable
|
|
115
|
+
|
|
116
|
+
# =============================================================================
|
|
117
|
+
# GLM CONFIGURATION - The Code Specialist (API-based)
|
|
118
|
+
# =============================================================================
|
|
119
|
+
|
|
120
|
+
GLM_MODEL="${GLM_MODEL:-glm-5}"
|
|
121
|
+
GLM_TIMEOUT_SECONDS="${GLM_TIMEOUT:-180}"
|
|
122
|
+
GLM_API_URL="${GLM_API_URL:-https://open.bigmodel.cn/api/paas/v4/chat/completions}"
|
|
123
|
+
GLM_FORMAT="${GLM_FORMAT:-openai}"
|
|
124
|
+
# API key: Set GLM_API_KEY environment variable
|
|
125
|
+
|
|
126
|
+
# =============================================================================
|
|
127
|
+
# GROK CONFIGURATION - The Provocateur (API-based)
|
|
128
|
+
# =============================================================================
|
|
129
|
+
|
|
130
|
+
GROK_MODEL="${GROK_MODEL:-grok-4-1-fast-reasoning}"
|
|
131
|
+
GROK_TIMEOUT_SECONDS="${GROK_TIMEOUT:-180}"
|
|
132
|
+
GROK_API_URL="${GROK_API_URL:-https://api.x.ai/v1/chat/completions}"
|
|
133
|
+
GROK_FORMAT="${GROK_FORMAT:-openai}"
|
|
134
|
+
# API key: Set GROK_API_KEY environment variable
|
|
135
|
+
|
|
136
|
+
# =============================================================================
|
|
137
|
+
# DEEPSEEK CONFIGURATION - The Methodologist (API-based)
|
|
138
|
+
# =============================================================================
|
|
139
|
+
|
|
140
|
+
DEEPSEEK_MODEL="${DEEPSEEK_MODEL:-deepseek-reasoner}"
|
|
141
|
+
DEEPSEEK_TIMEOUT_SECONDS="${DEEPSEEK_TIMEOUT:-180}"
|
|
142
|
+
DEEPSEEK_API_URL="${DEEPSEEK_API_URL:-https://api.deepseek.com/v1/chat/completions}"
|
|
143
|
+
DEEPSEEK_FORMAT="${DEEPSEEK_FORMAT:-openai}"
|
|
144
|
+
# API key: Set DEEPSEEK_API_KEY environment variable
|
|
145
|
+
|
|
146
|
+
# =============================================================================
|
|
147
|
+
# MINIMAX CONFIGURATION - The Pragmatic Optimizer (API-based, v2.10)
|
|
148
|
+
# =============================================================================
|
|
149
|
+
|
|
150
|
+
MINIMAX_MODEL="${MINIMAX_MODEL:-MiniMax-M2.5}"
|
|
151
|
+
MINIMAX_TIMEOUT_SECONDS="${MINIMAX_TIMEOUT:-180}"
|
|
152
|
+
MINIMAX_API_URL="${MINIMAX_API_URL:-https://api.minimax.io/v1/chat/completions}"
|
|
153
|
+
MINIMAX_FORMAT="${MINIMAX_FORMAT:-openai}"
|
|
154
|
+
# API key: Set MINIMAX_API_KEY environment variable
|
|
155
|
+
|
|
156
|
+
# =============================================================================
|
|
157
|
+
# AMP CONFIGURATION - The Systems Thinker (v2.8)
|
|
158
|
+
# =============================================================================
|
|
159
|
+
|
|
160
|
+
AMP_MODEL="${AMP_MODEL:-amp}"
|
|
161
|
+
AMP_TIMEOUT_SECONDS="${AMP_TIMEOUT:-180}"
|
|
162
|
+
AMP_CMD="${AMP_CMD:-amp}"
|
|
163
|
+
# CLI installation: curl -fsSL https://ampcode.com/install.sh | bash
|
|
164
|
+
# API key: Set AMP_API_KEY environment variable for authentication
|
|
165
|
+
|
|
166
|
+
# =============================================================================
|
|
167
|
+
# KIMI CONFIGURATION - The Eastern Sage (v2.9)
|
|
168
|
+
# =============================================================================
|
|
169
|
+
|
|
170
|
+
KIMI_MODEL="${KIMI_MODEL:-kimi-code/kimi-for-coding}"
|
|
171
|
+
KIMI_TIMEOUT_SECONDS="${KIMI_TIMEOUT:-180}"
|
|
172
|
+
KIMI_CMD="${KIMI_CMD:-kimi}"
|
|
173
|
+
# CLI installation: curl -L code.kimi.com/install.sh | bash
|
|
174
|
+
|
|
175
|
+
# =============================================================================
|
|
176
|
+
# CLAUDE CONFIGURATION - The Synthesizer (v2.2)
|
|
177
|
+
# =============================================================================
|
|
178
|
+
|
|
179
|
+
CLAUDE_MODEL="${CLAUDE_MODEL:-opus-4.6}"
|
|
180
|
+
CLAUDE_TIMEOUT_SECONDS="${CLAUDE_TIMEOUT:-240}"
|
|
181
|
+
CLAUDE_CMD="${CLAUDE_CMD:-claude}"
|
|
182
|
+
|
|
183
|
+
# =============================================================================
|
|
184
|
+
# OLLAMA CONFIGURATION - The Local Expert (v2.2)
|
|
185
|
+
# =============================================================================
|
|
186
|
+
|
|
187
|
+
# Default model for local inference (premium: qwen2.5-coder:32b)
|
|
188
|
+
OLLAMA_MODEL="${OLLAMA_MODEL:-qwen2.5-coder:32b}"
|
|
189
|
+
# Alternative models: llama3.3, llama3.2, codellama, mistral, deepseek-coder
|
|
190
|
+
|
|
191
|
+
# Ollama server URL (default: local)
|
|
192
|
+
OLLAMA_HOST="${OLLAMA_HOST:-http://localhost:11434}"
|
|
193
|
+
|
|
194
|
+
# Timeout for local inference (longer than API due to local hardware)
|
|
195
|
+
OLLAMA_TIMEOUT="${OLLAMA_TIMEOUT:-300}"
|
|
196
|
+
|
|
197
|
+
# Temperature for generation
|
|
198
|
+
OLLAMA_TEMPERATURE="${OLLAMA_TEMPERATURE:-0.7}"
|
|
199
|
+
|
|
200
|
+
# Comma-separated list of models to query (for multi-model local consultations)
|
|
201
|
+
# Example: OLLAMA_MODELS="llama3.2,codellama,mistral"
|
|
202
|
+
OLLAMA_MODELS="${OLLAMA_MODELS:-}"
|
|
203
|
+
|
|
204
|
+
# =============================================================================
|
|
205
|
+
# CANONICAL CONSULTANT LIST
|
|
206
|
+
# =============================================================================
|
|
207
|
+
# This is the single source of truth for all available consultants.
|
|
208
|
+
# Use this array when iterating over consultants programmatically.
|
|
209
|
+
|
|
210
|
+
# All available consultants (ordered by typical usage)
|
|
211
|
+
ALL_CONSULTANTS=("Gemini" "Codex" "Mistral" "Kilo" "Cursor" "Aider" "Amp" "Kimi" "Claude" "Qwen3" "GLM" "Grok" "DeepSeek" "MiniMax" "Ollama")
|
|
212
|
+
|
|
213
|
+
# CLI-based consultants (use CLI tools, some support CLI/API switching)
|
|
214
|
+
CLI_CONSULTANTS=("Gemini" "Codex" "Mistral" "Kilo" "Cursor" "Aider" "Amp" "Kimi" "Claude" "Qwen3" "Ollama")
|
|
215
|
+
|
|
216
|
+
# API-only consultants (use HTTP API directly, no CLI available)
|
|
217
|
+
API_CONSULTANTS=("GLM" "Grok" "DeepSeek" "MiniMax")
|
|
218
|
+
|
|
219
|
+
# =============================================================================
|
|
220
|
+
# ENABLED CONSULTANTS
|
|
221
|
+
# =============================================================================
|
|
222
|
+
|
|
223
|
+
# Set to "false" to disable a specific consultant
|
|
224
|
+
# CLI-based consultants (enabled by default)
|
|
225
|
+
ENABLE_GEMINI="${ENABLE_GEMINI:-true}"
|
|
226
|
+
ENABLE_CODEX="${ENABLE_CODEX:-true}"
|
|
227
|
+
ENABLE_MISTRAL="${ENABLE_MISTRAL:-true}"
|
|
228
|
+
ENABLE_KILO="${ENABLE_KILO:-true}"
|
|
229
|
+
ENABLE_CURSOR="${ENABLE_CURSOR:-true}"
|
|
230
|
+
ENABLE_AIDER="${ENABLE_AIDER:-false}"
|
|
231
|
+
ENABLE_AMP="${ENABLE_AMP:-false}" # Amp Code (v2.8)
|
|
232
|
+
ENABLE_KIMI="${ENABLE_KIMI:-true}" # Kimi Code (v2.9)
|
|
233
|
+
ENABLE_CLAUDE="${ENABLE_CLAUDE:-false}" # Auto-disabled when invoked by Claude Code
|
|
234
|
+
|
|
235
|
+
# API-based consultants (disabled by default - require API keys)
|
|
236
|
+
ENABLE_QWEN3="${ENABLE_QWEN3:-true}"
|
|
237
|
+
ENABLE_GLM="${ENABLE_GLM:-false}"
|
|
238
|
+
ENABLE_GROK="${ENABLE_GROK:-false}"
|
|
239
|
+
ENABLE_DEEPSEEK="${ENABLE_DEEPSEEK:-false}"
|
|
240
|
+
ENABLE_MINIMAX="${ENABLE_MINIMAX:-false}"
|
|
241
|
+
|
|
242
|
+
# Local model support via Ollama (disabled by default)
|
|
243
|
+
ENABLE_OLLAMA="${ENABLE_OLLAMA:-false}"
|
|
244
|
+
|
|
245
|
+
# =============================================================================
|
|
246
|
+
# INVOKING AGENT DETECTION (v2.2)
|
|
247
|
+
# =============================================================================
|
|
248
|
+
|
|
249
|
+
# Agent that invoked this skill - used for self-exclusion to prevent
|
|
250
|
+
# an agent from consulting itself.
|
|
251
|
+
# Values: claude, codex, gemini, cursor, mistral, kilo, aider, or "unknown"
|
|
252
|
+
# Example: INVOKING_AGENT=claude ./scripts/consult_all.sh "question"
|
|
253
|
+
INVOKING_AGENT="${INVOKING_AGENT:-unknown}"
|
|
254
|
+
|
|
255
|
+
# =============================================================================
|
|
256
|
+
# PERSONAS (v2.0)
|
|
257
|
+
# =============================================================================
|
|
258
|
+
|
|
259
|
+
# Enable/disable persona system
|
|
260
|
+
ENABLE_PERSONA="${ENABLE_PERSONA:-true}"
|
|
261
|
+
|
|
262
|
+
# Persona assignments (by ID) - override with {AGENT}_PERSONA_ID or {AGENT}_PERSONA
|
|
263
|
+
# Available: 1=Architect, 2=Pragmatist, 3=Devil's Advocate, 4=Innovator,
|
|
264
|
+
# 5=Integrator, 6=Analyst, 7=Methodologist, 8=Provocateur, 9=Mentor,
|
|
265
|
+
# 10=Optimizer, 11=Security Expert, 12=Minimalist, 13=DX Advocate,
|
|
266
|
+
# 14=Debugger, 15=Reviewer
|
|
267
|
+
# Defaults are set in lib/personas.sh (GEMINI=1, CODEX=2, MISTRAL=3, etc.)
|
|
268
|
+
|
|
269
|
+
# =============================================================================
|
|
270
|
+
# AUTO-SYNTHESIS (v2.0)
|
|
271
|
+
# =============================================================================
|
|
272
|
+
|
|
273
|
+
# Enable automatic response synthesis
|
|
274
|
+
ENABLE_SYNTHESIS="${ENABLE_SYNTHESIS:-true}"
|
|
275
|
+
|
|
276
|
+
# CLI for synthesis (default: claude)
|
|
277
|
+
SYNTHESIS_CMD="${SYNTHESIS_CMD:-claude}"
|
|
278
|
+
|
|
279
|
+
# =============================================================================
|
|
280
|
+
# DEFAULT PRESET AND STRATEGY (v2.2)
|
|
281
|
+
# =============================================================================
|
|
282
|
+
|
|
283
|
+
# Default preset to use when no --preset flag is provided
|
|
284
|
+
# Options: minimal, balanced, thorough, high-stakes, local, security, cost-capped
|
|
285
|
+
# Leave empty to use individual ENABLE_* settings
|
|
286
|
+
DEFAULT_PRESET="${DEFAULT_PRESET:-}"
|
|
287
|
+
|
|
288
|
+
# Default synthesis strategy
|
|
289
|
+
# Options: majority, risk_averse, security_first, cost_capped, compare_only
|
|
290
|
+
DEFAULT_STRATEGY="${DEFAULT_STRATEGY:-majority}"
|
|
291
|
+
|
|
292
|
+
# =============================================================================
|
|
293
|
+
# PEER REVIEW (v2.2)
|
|
294
|
+
# =============================================================================
|
|
295
|
+
|
|
296
|
+
# Enable anonymous peer review step
|
|
297
|
+
ENABLE_PEER_REVIEW="${ENABLE_PEER_REVIEW:-false}"
|
|
298
|
+
|
|
299
|
+
# Minimum responses required for peer review (default: 3)
|
|
300
|
+
PEER_REVIEW_MIN_RESPONSES="${PEER_REVIEW_MIN_RESPONSES:-3}"
|
|
301
|
+
|
|
302
|
+
# =============================================================================
|
|
303
|
+
# MULTI-AGENT DEBATE - MAD (v2.0)
|
|
304
|
+
# =============================================================================
|
|
305
|
+
|
|
306
|
+
# Enable multi-round debate
|
|
307
|
+
ENABLE_DEBATE="${ENABLE_DEBATE:-false}"
|
|
308
|
+
|
|
309
|
+
# Number of debate rounds (1 = initial responses only, 2-3 = with cross-critique)
|
|
310
|
+
DEBATE_ROUNDS="${DEBATE_ROUNDS:-1}"
|
|
311
|
+
|
|
312
|
+
# =============================================================================
|
|
313
|
+
# PANIC BUTTON MODE (v2.2)
|
|
314
|
+
# =============================================================================
|
|
315
|
+
|
|
316
|
+
# Panic mode triggers additional rigor when uncertainty is detected
|
|
317
|
+
# Values: "auto" (detect), "always" (always enable), "never" (disable)
|
|
318
|
+
ENABLE_PANIC_MODE="${ENABLE_PANIC_MODE:-auto}"
|
|
319
|
+
|
|
320
|
+
# Threshold for average confidence below which panic mode triggers
|
|
321
|
+
PANIC_CONFIDENCE_THRESHOLD="${PANIC_CONFIDENCE_THRESHOLD:-5}"
|
|
322
|
+
|
|
323
|
+
# Number of additional debate rounds to add in panic mode
|
|
324
|
+
PANIC_EXTRA_DEBATE_ROUNDS="${PANIC_EXTRA_DEBATE_ROUNDS:-1}"
|
|
325
|
+
|
|
326
|
+
# Keywords that trigger panic mode when found in responses
|
|
327
|
+
PANIC_KEYWORDS="${PANIC_KEYWORDS:-uncertain|maybe|not sure|possibly|unclear|depends|hard to say|difficult to determine}"
|
|
328
|
+
|
|
329
|
+
# =============================================================================
|
|
330
|
+
# SELF-REFLECTION (v2.0)
|
|
331
|
+
# =============================================================================
|
|
332
|
+
|
|
333
|
+
# Enable auto-reflection (generate-critique-refine)
|
|
334
|
+
ENABLE_REFLECTION="${ENABLE_REFLECTION:-false}"
|
|
335
|
+
|
|
336
|
+
# Number of reflection cycles per response
|
|
337
|
+
REFLECTION_CYCLES="${REFLECTION_CYCLES:-1}"
|
|
338
|
+
|
|
339
|
+
# =============================================================================
|
|
340
|
+
# SMART ROUTING (v2.0)
|
|
341
|
+
# =============================================================================
|
|
342
|
+
|
|
343
|
+
# Enable automatic question classification
|
|
344
|
+
ENABLE_CLASSIFICATION="${ENABLE_CLASSIFICATION:-true}"
|
|
345
|
+
|
|
346
|
+
# Classification mode: "pattern" (fast) or "llm" (more accurate)
|
|
347
|
+
CLASSIFICATION_MODE="${CLASSIFICATION_MODE:-pattern}"
|
|
348
|
+
|
|
349
|
+
# Enable intelligent routing (selects consultants based on category)
|
|
350
|
+
ENABLE_SMART_ROUTING="${ENABLE_SMART_ROUTING:-false}"
|
|
351
|
+
|
|
352
|
+
# Minimum affinity to include a consultant (1-10)
|
|
353
|
+
MIN_AFFINITY="${MIN_AFFINITY:-7}"
|
|
354
|
+
|
|
355
|
+
# =============================================================================
|
|
356
|
+
# COST MANAGEMENT (v2.0)
|
|
357
|
+
# =============================================================================
|
|
358
|
+
|
|
359
|
+
# Enable cost tracking
|
|
360
|
+
ENABLE_COST_TRACKING="${ENABLE_COST_TRACKING:-true}"
|
|
361
|
+
|
|
362
|
+
# Maximum budget per session in USD
|
|
363
|
+
MAX_SESSION_COST="${MAX_SESSION_COST:-1.00}"
|
|
364
|
+
|
|
365
|
+
# Warning threshold in USD
|
|
366
|
+
WARN_AT_COST="${WARN_AT_COST:-0.50}"
|
|
367
|
+
|
|
368
|
+
# File for cumulative tracking
|
|
369
|
+
COST_TRACKING_FILE="${COST_TRACKING_FILE:-/tmp/ai_consultants_costs.json}"
|
|
370
|
+
|
|
371
|
+
# --- Budget Enforcement (v2.4) ---
|
|
372
|
+
# Enable budget limit enforcement (opt-in, default OFF)
|
|
373
|
+
ENABLE_BUDGET_LIMIT="${ENABLE_BUDGET_LIMIT:-false}"
|
|
374
|
+
|
|
375
|
+
# Action to take when budget is exceeded
|
|
376
|
+
# Options: warn (log warning but continue), stop (halt consultation with partial results)
|
|
377
|
+
BUDGET_ACTION="${BUDGET_ACTION:-warn}"
|
|
378
|
+
|
|
379
|
+
# =============================================================================
|
|
380
|
+
# SESSION MANAGEMENT (v2.0)
|
|
381
|
+
# =============================================================================
|
|
382
|
+
|
|
383
|
+
# Directory for session files
|
|
384
|
+
SESSION_DIR="${SESSION_DIR:-/tmp/ai_consultants_sessions}"
|
|
385
|
+
|
|
386
|
+
# Days after which to clean old sessions
|
|
387
|
+
SESSION_CLEANUP_DAYS="${SESSION_CLEANUP_DAYS:-7}"
|
|
388
|
+
|
|
389
|
+
# =============================================================================
|
|
390
|
+
# INTERACTIVE MODE (v2.0)
|
|
391
|
+
# =============================================================================
|
|
392
|
+
|
|
393
|
+
# Enable interactive progress bars
|
|
394
|
+
ENABLE_PROGRESS_BARS="${ENABLE_PROGRESS_BARS:-true}"
|
|
395
|
+
|
|
396
|
+
# Enable early termination (Ctrl+C to stop with partial responses)
|
|
397
|
+
ENABLE_EARLY_TERMINATION="${ENABLE_EARLY_TERMINATION:-true}"
|
|
398
|
+
|
|
399
|
+
# =============================================================================
|
|
400
|
+
# PRE-FLIGHT CHECKS (v2.0)
|
|
401
|
+
# =============================================================================
|
|
402
|
+
|
|
403
|
+
# Run pre-flight check before each consultation
|
|
404
|
+
ENABLE_PREFLIGHT="${ENABLE_PREFLIGHT:-false}"
|
|
405
|
+
|
|
406
|
+
# Quick mode for preflight (CLI check only, no API test)
|
|
407
|
+
PREFLIGHT_QUICK="${PREFLIGHT_QUICK:-true}"
|
|
408
|
+
|
|
409
|
+
# =============================================================================
|
|
410
|
+
# TOKEN OPTIMIZATION (v2.1)
|
|
411
|
+
# =============================================================================
|
|
412
|
+
|
|
413
|
+
# Optimization mode: "none", "basic", "ast", "full"
|
|
414
|
+
# none - No optimization, pass files as-is
|
|
415
|
+
# basic - Simple byte-based truncation (legacy)
|
|
416
|
+
# ast - AST-based extraction (recommended, ~60% savings)
|
|
417
|
+
# full - AST + symbol compression + chunking (~70% savings)
|
|
418
|
+
TOKEN_OPTIMIZATION_MODE="${TOKEN_OPTIMIZATION_MODE:-ast}"
|
|
419
|
+
|
|
420
|
+
# Maximum bytes per context file before truncation (~2000 tokens)
|
|
421
|
+
# Only used when TOKEN_OPTIMIZATION_MODE=basic
|
|
422
|
+
MAX_CONTEXT_FILE_BYTES="${MAX_CONTEXT_FILE_BYTES:-8000}"
|
|
423
|
+
|
|
424
|
+
# Enable AST-based code extraction
|
|
425
|
+
ENABLE_AST_EXTRACTION="${ENABLE_AST_EXTRACTION:-true}"
|
|
426
|
+
|
|
427
|
+
# Enable symbol compression (minification)
|
|
428
|
+
ENABLE_SYMBOL_COMPRESSION="${ENABLE_SYMBOL_COMPRESSION:-false}"
|
|
429
|
+
|
|
430
|
+
# Enable semantic chunking for large files
|
|
431
|
+
ENABLE_SEMANTIC_CHUNKING="${ENABLE_SEMANTIC_CHUNKING:-true}"
|
|
432
|
+
|
|
433
|
+
# Maximum tokens per chunk (for chunking mode)
|
|
434
|
+
CHUNK_MAX_TOKENS="${CHUNK_MAX_TOKENS:-500}"
|
|
435
|
+
|
|
436
|
+
# Use compact prompts (shorter personas and output format)
|
|
437
|
+
USE_COMPACT_PROMPTS="${USE_COMPACT_PROMPTS:-true}"
|
|
438
|
+
|
|
439
|
+
# Extract only essential fields for synthesis (instead of full JSON)
|
|
440
|
+
SYNTHESIS_EXTRACT_FIELDS="${SYNTHESIS_EXTRACT_FIELDS:-true}"
|
|
441
|
+
|
|
442
|
+
# =============================================================================
|
|
443
|
+
# TOKEN COST OPTIMIZATION (v2.3)
|
|
444
|
+
# =============================================================================
|
|
445
|
+
|
|
446
|
+
# --- Semantic Caching ---
|
|
447
|
+
# Cache responses based on query + context hash
|
|
448
|
+
ENABLE_SEMANTIC_CACHE="${ENABLE_SEMANTIC_CACHE:-true}"
|
|
449
|
+
CACHE_TTL_HOURS="${CACHE_TTL_HOURS:-24}"
|
|
450
|
+
CACHE_DIR="${CACHE_DIR:-/tmp/ai_consultants_cache}"
|
|
451
|
+
|
|
452
|
+
# --- Response Length Limits ---
|
|
453
|
+
# Limit output tokens by question category
|
|
454
|
+
# NOTE: Default is FALSE (opt-in) per quality review - can truncate critical info
|
|
455
|
+
ENABLE_RESPONSE_LIMITS="${ENABLE_RESPONSE_LIMITS:-false}"
|
|
456
|
+
# Format: "CATEGORY:MAX_TOKENS,..."
|
|
457
|
+
MAX_RESPONSE_TOKENS_BY_CATEGORY="${MAX_RESPONSE_TOKENS_BY_CATEGORY:-QUICK_SYNTAX:200,CODE_REVIEW:800,BUG_DEBUG:800,ARCHITECTURE:1000,SECURITY:1000,DATABASE:600,GENERAL:500}"
|
|
458
|
+
|
|
459
|
+
# --- Cost-Aware Model Routing ---
|
|
460
|
+
# Route simple queries to cheaper models
|
|
461
|
+
ENABLE_COST_AWARE_ROUTING="${ENABLE_COST_AWARE_ROUTING:-false}"
|
|
462
|
+
USE_ECONOMIC_MODELS_FOR_SIMPLE="${USE_ECONOMIC_MODELS_FOR_SIMPLE:-true}"
|
|
463
|
+
# Complexity thresholds (1-10 scale)
|
|
464
|
+
COMPLEXITY_THRESHOLD_SIMPLE="${COMPLEXITY_THRESHOLD_SIMPLE:-3}"
|
|
465
|
+
COMPLEXITY_THRESHOLD_MEDIUM="${COMPLEXITY_THRESHOLD_MEDIUM:-6}"
|
|
466
|
+
|
|
467
|
+
# --- Selective Context ---
|
|
468
|
+
# Send only relevant files to each consultant
|
|
469
|
+
ENABLE_SELECTIVE_CONTEXT="${ENABLE_SELECTIVE_CONTEXT:-false}"
|
|
470
|
+
MAX_FILES_PER_CONSULTANT="${MAX_FILES_PER_CONSULTANT:-5}"
|
|
471
|
+
|
|
472
|
+
# --- Debate Optimization ---
|
|
473
|
+
# Optimize debate rounds for token efficiency
|
|
474
|
+
# NOTE: Default is FALSE (opt-in) per quality review - can miss critical disagreements
|
|
475
|
+
ENABLE_DEBATE_OPTIMIZATION="${ENABLE_DEBATE_OPTIMIZATION:-false}"
|
|
476
|
+
# Only activate debate if confidence spread exceeds threshold
|
|
477
|
+
# Lowered to 2 per quality review (original: 3)
|
|
478
|
+
DEBATE_CONFIDENCE_SPREAD_THRESHOLD="${DEBATE_CONFIDENCE_SPREAD_THRESHOLD:-2}"
|
|
479
|
+
# Use summaries in debate rounds instead of full responses
|
|
480
|
+
DEBATE_USE_SUMMARIES="${DEBATE_USE_SUMMARIES:-true}"
|
|
481
|
+
|
|
482
|
+
# --- Report Optimization ---
|
|
483
|
+
# Generate compact reports by default (summaries only)
|
|
484
|
+
ENABLE_COMPACT_REPORT="${ENABLE_COMPACT_REPORT:-true}"
|
|
485
|
+
# Max lines of JSON to include per consultant in full report
|
|
486
|
+
REPORT_MAX_JSON_LINES="${REPORT_MAX_JSON_LINES:-50}"
|
|
487
|
+
|
|
488
|
+
# =============================================================================
|
|
489
|
+
# LOGGING
|
|
490
|
+
# =============================================================================
|
|
491
|
+
|
|
492
|
+
# Log level: "DEBUG", "INFO", "WARN", "ERROR"
|
|
493
|
+
LOG_LEVEL="${LOG_LEVEL:-INFO}"
|
|
494
|
+
|
|
495
|
+
# Log colors (set to empty to disable)
|
|
496
|
+
if [[ -t 2 ]]; then
|
|
497
|
+
# Only if stderr is a terminal
|
|
498
|
+
C_DEBUG="\033[0;90m"
|
|
499
|
+
C_INFO="\033[0;34m"
|
|
500
|
+
C_SUCCESS="\033[0;32m"
|
|
501
|
+
C_WARN="\033[0;33m"
|
|
502
|
+
C_ERROR="\033[0;31m"
|
|
503
|
+
C_RESET="\033[0m"
|
|
504
|
+
else
|
|
505
|
+
C_DEBUG=""
|
|
506
|
+
C_INFO=""
|
|
507
|
+
C_SUCCESS=""
|
|
508
|
+
C_WARN=""
|
|
509
|
+
C_ERROR=""
|
|
510
|
+
C_RESET=""
|
|
511
|
+
fi
|
|
512
|
+
|
|
513
|
+
# =============================================================================
|
|
514
|
+
# MODEL QUALITY TIERS (v2.5)
|
|
515
|
+
# =============================================================================
|
|
516
|
+
|
|
517
|
+
# Get model name for a specific consultant and tier (single source of truth)
|
|
518
|
+
# Usage: get_model_for_tier <consultant> <tier>
|
|
519
|
+
# Returns: model name, or empty string if no model override (e.g., Kilo)
|
|
520
|
+
get_model_for_tier() {
|
|
521
|
+
local consultant="$1"
|
|
522
|
+
local tier="${2:-premium}"
|
|
523
|
+
consultant=$(echo "$consultant" | tr '[:upper:]' '[:lower:]')
|
|
524
|
+
|
|
525
|
+
case "$tier" in
|
|
526
|
+
premium|max|best)
|
|
527
|
+
case "$consultant" in
|
|
528
|
+
claude) echo "opus-4.6" ;;
|
|
529
|
+
gemini) echo "gemini-3.1-pro-preview" ;;
|
|
530
|
+
codex) echo "gpt-5.3-codex" ;;
|
|
531
|
+
mistral) echo "mistral-large-3" ;;
|
|
532
|
+
cursor) echo "composer-1.5" ;;
|
|
533
|
+
deepseek) echo "deepseek-reasoner" ;;
|
|
534
|
+
glm) echo "glm-5" ;;
|
|
535
|
+
grok) echo "grok-4-1-fast-reasoning" ;;
|
|
536
|
+
qwen3) echo "qwen3.5-plus" ;;
|
|
537
|
+
aider) echo "gpt-5.3-codex" ;;
|
|
538
|
+
amp) echo "amp" ;;
|
|
539
|
+
ollama) echo "qwen2.5-coder:32b" ;;
|
|
540
|
+
kimi) echo "kimi-code/kimi-for-coding" ;;
|
|
541
|
+
minimax) echo "MiniMax-M2.5" ;;
|
|
542
|
+
kilo) echo "auto" ;;
|
|
543
|
+
*) echo "" ;;
|
|
544
|
+
esac
|
|
545
|
+
;;
|
|
546
|
+
standard|medium|balanced)
|
|
547
|
+
case "$consultant" in
|
|
548
|
+
claude) echo "sonnet-4.6" ;;
|
|
549
|
+
gemini) echo "gemini-3-flash-preview" ;;
|
|
550
|
+
codex) echo "gpt-5.3" ;;
|
|
551
|
+
mistral) echo "mistral-medium-latest" ;;
|
|
552
|
+
cursor) echo "composer-1.5" ;; # Same as premium (single model)
|
|
553
|
+
deepseek) echo "deepseek-v3.2" ;;
|
|
554
|
+
glm) echo "glm-5" ;; # Same as premium (no mid-tier GLM)
|
|
555
|
+
grok) echo "grok-3" ;;
|
|
556
|
+
qwen3) echo "qwen3.5-plus" ;; # Same as premium (single tier available)
|
|
557
|
+
aider) echo "gpt-5.3" ;;
|
|
558
|
+
amp) echo "amp" ;; # Same model (no tiers)
|
|
559
|
+
ollama) echo "llama3.3" ;;
|
|
560
|
+
kimi) echo "kimi-code/kimi-for-coding" ;;
|
|
561
|
+
minimax) echo "MiniMax-M2.1" ;;
|
|
562
|
+
kilo) echo "auto" ;;
|
|
563
|
+
*) echo "" ;;
|
|
564
|
+
esac
|
|
565
|
+
;;
|
|
566
|
+
economy|fast|quick)
|
|
567
|
+
case "$consultant" in
|
|
568
|
+
claude) echo "haiku-4.5" ;;
|
|
569
|
+
gemini) echo "gemini-2.0-flash" ;;
|
|
570
|
+
codex) echo "gpt-4o-mini" ;;
|
|
571
|
+
mistral) echo "devstral-small-2" ;;
|
|
572
|
+
cursor) echo "gemini-2.0-flash" ;;
|
|
573
|
+
deepseek) echo "deepseek-chat" ;;
|
|
574
|
+
glm) echo "glm-4-flash" ;;
|
|
575
|
+
grok) echo "grok-3-mini" ;;
|
|
576
|
+
qwen3) echo "qwen3-32b" ;;
|
|
577
|
+
aider) echo "gpt-4o-mini" ;;
|
|
578
|
+
amp) echo "amp" ;; # Same model (no tiers)
|
|
579
|
+
ollama) echo "llama3.2" ;;
|
|
580
|
+
kimi) echo "kimi-code/kimi-for-coding" ;;
|
|
581
|
+
minimax) echo "MiniMax-M2.5-highspeed" ;;
|
|
582
|
+
kilo) echo "auto" ;;
|
|
583
|
+
*) echo "" ;;
|
|
584
|
+
esac
|
|
585
|
+
;;
|
|
586
|
+
*)
|
|
587
|
+
echo "" ;;
|
|
588
|
+
esac
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
# Apply model tier to all consultants
|
|
592
|
+
# Usage: apply_model_tier <tier: premium|standard|economy>
|
|
593
|
+
# Premium = latest flagship models, highest quality
|
|
594
|
+
# Standard = good balance of quality and cost
|
|
595
|
+
# Economy = optimized for speed and low cost
|
|
596
|
+
apply_model_tier() {
|
|
597
|
+
local tier="$1"
|
|
598
|
+
|
|
599
|
+
# Validate tier name
|
|
600
|
+
case "$tier" in
|
|
601
|
+
premium|max|best|standard|medium|balanced|economy|fast|quick) ;;
|
|
602
|
+
*)
|
|
603
|
+
echo "Unknown model tier: $tier" >&2
|
|
604
|
+
echo "Available tiers: premium, standard, economy" >&2
|
|
605
|
+
return 1
|
|
606
|
+
;;
|
|
607
|
+
esac
|
|
608
|
+
|
|
609
|
+
local consultants="claude gemini codex mistral cursor deepseek glm grok qwen3 minimax aider amp kimi ollama"
|
|
610
|
+
for c in $consultants; do
|
|
611
|
+
local model
|
|
612
|
+
model=$(get_model_for_tier "$c" "$tier")
|
|
613
|
+
if [[ -n "$model" ]]; then
|
|
614
|
+
local var_name
|
|
615
|
+
var_name="$(echo "$c" | tr '[:lower:]' '[:upper:]')_MODEL"
|
|
616
|
+
export "$var_name=$model"
|
|
617
|
+
fi
|
|
618
|
+
done
|
|
619
|
+
|
|
620
|
+
return 0
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
# =============================================================================
|
|
624
|
+
# CONFIGURATION PRESETS (v2.2)
|
|
625
|
+
# =============================================================================
|
|
626
|
+
|
|
627
|
+
# Presets allow quick configuration for different use cases:
|
|
628
|
+
# minimal - 2 models (fast, cheap): Gemini + Codex
|
|
629
|
+
# balanced - 4 models (good coverage): + Mistral + Kilo
|
|
630
|
+
# thorough - 5 models (comprehensive): + Cursor
|
|
631
|
+
# high-stakes - All models + debate (maximum rigor)
|
|
632
|
+
#
|
|
633
|
+
# Quality Tiers (v2.5):
|
|
634
|
+
# max_quality - All consultants + premium models + debate + reflection
|
|
635
|
+
# medium - 4 consultants + standard models + light debate
|
|
636
|
+
# fast - 2 consultants + economy models, no debate
|
|
637
|
+
#
|
|
638
|
+
# Usage: ./consult_all.sh --preset balanced "Your question"
|
|
639
|
+
|
|
640
|
+
# Helper: Disable all consultants
|
|
641
|
+
_disable_all_consultants() {
|
|
642
|
+
export ENABLE_GEMINI=false ENABLE_CODEX=false ENABLE_MISTRAL=false
|
|
643
|
+
export ENABLE_KILO=false ENABLE_CURSOR=false ENABLE_AIDER=false
|
|
644
|
+
export ENABLE_AMP=false ENABLE_KIMI=false ENABLE_CLAUDE=false
|
|
645
|
+
export ENABLE_QWEN3=false ENABLE_GLM=false ENABLE_GROK=false
|
|
646
|
+
export ENABLE_DEEPSEEK=false ENABLE_MINIMAX=false ENABLE_OLLAMA=false
|
|
647
|
+
export ENABLE_DEBATE=false ENABLE_REFLECTION=false
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
# Apply a preset configuration
|
|
651
|
+
# Usage: apply_preset <preset_name>
|
|
652
|
+
apply_preset() {
|
|
653
|
+
local preset="$1"
|
|
654
|
+
|
|
655
|
+
# Start with all disabled, then enable what's needed
|
|
656
|
+
_disable_all_consultants
|
|
657
|
+
|
|
658
|
+
case "$preset" in
|
|
659
|
+
minimal)
|
|
660
|
+
export ENABLE_GEMINI=true ENABLE_CODEX=true
|
|
661
|
+
;;
|
|
662
|
+
balanced)
|
|
663
|
+
export ENABLE_GEMINI=true ENABLE_CODEX=true
|
|
664
|
+
export ENABLE_MISTRAL=true ENABLE_KILO=true
|
|
665
|
+
;;
|
|
666
|
+
thorough)
|
|
667
|
+
export ENABLE_GEMINI=true ENABLE_CODEX=true
|
|
668
|
+
export ENABLE_MISTRAL=true ENABLE_KILO=true ENABLE_CURSOR=true
|
|
669
|
+
;;
|
|
670
|
+
high-stakes)
|
|
671
|
+
export ENABLE_GEMINI=true ENABLE_CODEX=true ENABLE_MISTRAL=true
|
|
672
|
+
export ENABLE_KILO=true ENABLE_CURSOR=true ENABLE_AIDER=true
|
|
673
|
+
export ENABLE_DEBATE=true DEBATE_ROUNDS=2
|
|
674
|
+
export ENABLE_REFLECTION=true REFLECTION_CYCLES=1
|
|
675
|
+
;;
|
|
676
|
+
local)
|
|
677
|
+
# Local inference with Ollama - use economy tier for speed
|
|
678
|
+
apply_model_tier "economy"
|
|
679
|
+
export ENABLE_OLLAMA=true
|
|
680
|
+
export OLLAMA_MODELS="${OLLAMA_MODELS:-llama3.2,codellama}"
|
|
681
|
+
;;
|
|
682
|
+
security)
|
|
683
|
+
export ENABLE_GEMINI=true ENABLE_CODEX=true
|
|
684
|
+
export ENABLE_MISTRAL=true ENABLE_CURSOR=true
|
|
685
|
+
export ENABLE_DEBATE=true DEBATE_ROUNDS=2
|
|
686
|
+
;;
|
|
687
|
+
cost-capped)
|
|
688
|
+
export ENABLE_GEMINI=true ENABLE_MISTRAL=true ENABLE_OLLAMA=true
|
|
689
|
+
export MAX_SESSION_COST=0.10
|
|
690
|
+
;;
|
|
691
|
+
# --- Quality Tier Presets (v2.5) ---
|
|
692
|
+
max_quality|max-quality)
|
|
693
|
+
# Maximum quality - all premium models + all features
|
|
694
|
+
apply_model_tier "premium"
|
|
695
|
+
export ENABLE_GEMINI=true ENABLE_CODEX=true ENABLE_MISTRAL=true
|
|
696
|
+
export ENABLE_KILO=true ENABLE_CURSOR=true ENABLE_AIDER=true
|
|
697
|
+
export ENABLE_CLAUDE=true
|
|
698
|
+
export ENABLE_DEBATE=true DEBATE_ROUNDS=3
|
|
699
|
+
export ENABLE_REFLECTION=true REFLECTION_CYCLES=2
|
|
700
|
+
export ENABLE_PEER_REVIEW=true
|
|
701
|
+
;;
|
|
702
|
+
medium)
|
|
703
|
+
# Balanced quality - standard models, good coverage
|
|
704
|
+
apply_model_tier "standard"
|
|
705
|
+
export ENABLE_GEMINI=true ENABLE_CODEX=true
|
|
706
|
+
export ENABLE_MISTRAL=true ENABLE_KILO=true
|
|
707
|
+
export ENABLE_DEBATE=true DEBATE_ROUNDS=1
|
|
708
|
+
;;
|
|
709
|
+
fast)
|
|
710
|
+
# Super fast - economy models, minimal consultants
|
|
711
|
+
apply_model_tier "economy"
|
|
712
|
+
export ENABLE_GEMINI=true ENABLE_CODEX=true
|
|
713
|
+
export ENABLE_DEBATE=false ENABLE_REFLECTION=false
|
|
714
|
+
export ENABLE_COMPACT_REPORT=true
|
|
715
|
+
;;
|
|
716
|
+
*)
|
|
717
|
+
echo "Unknown preset: $preset" >&2
|
|
718
|
+
echo "Available presets: minimal, balanced, thorough, high-stakes, local, security, cost-capped, max_quality, medium, fast" >&2
|
|
719
|
+
return 1
|
|
720
|
+
;;
|
|
721
|
+
esac
|
|
722
|
+
|
|
723
|
+
return 0
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
# List available presets with descriptions
|
|
727
|
+
list_presets() {
|
|
728
|
+
cat << 'EOF'
|
|
729
|
+
Available presets:
|
|
730
|
+
|
|
731
|
+
Quality Tiers (v2.5):
|
|
732
|
+
max_quality All consultants + premium models + debate + reflection
|
|
733
|
+
medium 4 consultants + standard models + light debate
|
|
734
|
+
fast 2 consultants + economy models, no debate
|
|
735
|
+
|
|
736
|
+
Use Cases:
|
|
737
|
+
minimal 2 models (Gemini + Codex) - Fast, cheap
|
|
738
|
+
balanced 4 models (+ Mistral + Kilo) - Good coverage [DEFAULT]
|
|
739
|
+
thorough 5 models (+ Cursor) - Comprehensive analysis
|
|
740
|
+
high-stakes All models + debate - Maximum rigor for critical decisions
|
|
741
|
+
local Ollama only - Full privacy, no API calls
|
|
742
|
+
security Security-focused models + debate - For security reviews
|
|
743
|
+
cost-capped Budget-conscious options - Minimal API costs
|
|
744
|
+
|
|
745
|
+
Usage: ./consult_all.sh --preset <name> "Your question"
|
|
746
|
+
EOF
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
# =============================================================================
|
|
750
|
+
# VERSION
|
|
751
|
+
# =============================================================================
|
|
752
|
+
|
|
753
|
+
AI_CONSULTANTS_VERSION="2.10.0"
|