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.
Files changed (62) hide show
  1. package/.claude/commands/ai-consultants:consult.md +94 -0
  2. package/.claude/commands/ai-consultants:debate.md +103 -0
  3. package/.claude/commands/ai-consultants:help.md +30 -0
  4. package/CLAUDE.md +839 -0
  5. package/LICENSE +21 -0
  6. package/README.md +758 -0
  7. package/SKILL.md +156 -0
  8. package/bin/ai-consultants +96 -0
  9. package/docs/COST_RATES.md +172 -0
  10. package/docs/JSON_SCHEMA.md +305 -0
  11. package/docs/SETUP.md +879 -0
  12. package/docs/SMART_ROUTING.md +219 -0
  13. package/docs/cost_rates.json +143 -0
  14. package/package.json +47 -0
  15. package/references/configuration.md +141 -0
  16. package/references/details.md +60 -0
  17. package/scripts/build_context.sh +562 -0
  18. package/scripts/classify_question.sh +148 -0
  19. package/scripts/config.sh +753 -0
  20. package/scripts/configure.sh +1093 -0
  21. package/scripts/consult_all.sh +934 -0
  22. package/scripts/debate_round.sh +421 -0
  23. package/scripts/doctor.sh +642 -0
  24. package/scripts/followup.sh +197 -0
  25. package/scripts/install.sh +319 -0
  26. package/scripts/lib/api.sh +640 -0
  27. package/scripts/lib/api_query.sh +228 -0
  28. package/scripts/lib/cache.sh +338 -0
  29. package/scripts/lib/chunking.sh +880 -0
  30. package/scripts/lib/code_optimizer.sh +671 -0
  31. package/scripts/lib/common.sh +1088 -0
  32. package/scripts/lib/costs.sh +674 -0
  33. package/scripts/lib/personas.sh +372 -0
  34. package/scripts/lib/progress.sh +251 -0
  35. package/scripts/lib/reflection.sh +447 -0
  36. package/scripts/lib/routing.sh +566 -0
  37. package/scripts/lib/schema.json +165 -0
  38. package/scripts/lib/session.sh +327 -0
  39. package/scripts/lib/symbol_map.sh +445 -0
  40. package/scripts/lib/voting.sh +495 -0
  41. package/scripts/peer_review.sh +460 -0
  42. package/scripts/preflight_check.sh +452 -0
  43. package/scripts/query_aider.sh +83 -0
  44. package/scripts/query_amp.sh +67 -0
  45. package/scripts/query_claude.sh +99 -0
  46. package/scripts/query_codex.sh +92 -0
  47. package/scripts/query_cursor.sh +72 -0
  48. package/scripts/query_deepseek.sh +17 -0
  49. package/scripts/query_gemini.sh +85 -0
  50. package/scripts/query_glm.sh +17 -0
  51. package/scripts/query_grok.sh +17 -0
  52. package/scripts/query_kilo.sh +140 -0
  53. package/scripts/query_kimi.sh +67 -0
  54. package/scripts/query_minimax.sh +17 -0
  55. package/scripts/query_mistral.sh +97 -0
  56. package/scripts/query_ollama.sh +328 -0
  57. package/scripts/query_qwen3.sh +93 -0
  58. package/scripts/setup_wizard.sh +367 -0
  59. package/scripts/skillport-install.sh +196 -0
  60. package/scripts/synthesize.sh +332 -0
  61. package/templates/consultation_report.md +323 -0
  62. package/templates/synthesis_prompt.md +120 -0
@@ -0,0 +1,332 @@
1
+ #!/bin/bash
2
+ # synthesize.sh - Auto-synthesis engine for AI Consultants
3
+ #
4
+ # Analyzes responses from all consultants and generates an automatic synthesis
5
+ # with consensus score, weighted recommendation, and comparison table.
6
+ #
7
+ # Usage: ./synthesize.sh <responses_dir> <output_file>
8
+ #
9
+ # Requires: claude CLI for synthesis
10
+
11
+ set -euo pipefail
12
+
13
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
14
+ source "$SCRIPT_DIR/lib/common.sh"
15
+
16
+ # =============================================================================
17
+ # FALLBACK FUNCTION (defined before use)
18
+ # =============================================================================
19
+
20
+ generate_fallback_synthesis() {
21
+ local responses_dir="$1"
22
+
23
+ # Calculate basic statistics
24
+ local total_confidence=0
25
+ local count=0
26
+ local consultants_json="[]"
27
+
28
+ for f in "$responses_dir"/*.json; do
29
+ if [[ -f "$f" ]]; then
30
+ local conf=$(jq -r '.confidence.score // 5' "$f" 2>/dev/null)
31
+ local name=$(jq -r '.consultant // "unknown"' "$f" 2>/dev/null)
32
+ total_confidence=$((total_confidence + conf))
33
+ count=$((count + 1))
34
+ consultants_json=$(echo "$consultants_json" | jq --arg n "$name" '. + [$n]')
35
+ fi
36
+ done
37
+
38
+ local avg_confidence=5
39
+ if [[ $count -gt 0 ]]; then
40
+ avg_confidence=$((total_confidence / count))
41
+ fi
42
+
43
+ jq -n \
44
+ --arg timestamp "$(date -Iseconds)" \
45
+ --argjson count "$count" \
46
+ --argjson avg_conf "$avg_confidence" \
47
+ --argjson consultants "$consultants_json" \
48
+ '{
49
+ synthesis_version: "2.0-fallback",
50
+ timestamp: $timestamp,
51
+ consultants_analyzed: $count,
52
+ consensus: {
53
+ score: 50,
54
+ level: "unknown",
55
+ description: "Automatic synthesis not available - manual analysis required",
56
+ agreed_points: [],
57
+ disagreed_points: []
58
+ },
59
+ weighted_recommendation: {
60
+ approach: "manual_review",
61
+ summary: "Manual review of responses required",
62
+ detailed: "Automatic synthesis was not possible. Please consult individual responses.",
63
+ confidence_weighted_score: $avg_conf,
64
+ supporting_consultants: $consultants,
65
+ dissenting_consultants: [],
66
+ incorporated_insights: []
67
+ },
68
+ comparison_table: [],
69
+ risk_assessment: {
70
+ overall_risk: "unknown",
71
+ risks: []
72
+ },
73
+ action_items: [
74
+ {
75
+ priority: 1,
76
+ action: "Manual review of responses",
77
+ rationale: "Automatic synthesis not available"
78
+ }
79
+ ],
80
+ follow_up_questions: [],
81
+ fallback: true
82
+ }'
83
+ }
84
+
85
+ # =============================================================================
86
+ # MAIN SCRIPT
87
+ # =============================================================================
88
+
89
+ # --- Parameters ---
90
+ RESPONSES_DIR="${1:-}"
91
+ OUTPUT_FILE="${2:-/tmp/synthesis.json}"
92
+ ORIGINAL_QUESTION="${3:-}"
93
+
94
+ # --- Validation ---
95
+ if [[ -z "$RESPONSES_DIR" || ! -d "$RESPONSES_DIR" ]]; then
96
+ log_error "Usage: $0 <responses_dir> <output_file> [original_question]"
97
+ exit 1
98
+ fi
99
+
100
+ # --- Check for responses ---
101
+ RESPONSE_COUNT=$(find "$RESPONSES_DIR" -name "*.json" -type f 2>/dev/null | head -10 | wc -l)
102
+ if [[ "$RESPONSE_COUNT" -eq 0 ]]; then
103
+ log_error "No JSON responses found in $RESPONSES_DIR"
104
+ exit 1
105
+ fi
106
+
107
+ log_info "Starting automatic synthesis..."
108
+
109
+ # --- Collect all responses ---
110
+ COMBINED_RESPONSES=""
111
+ CONSULTANTS=()
112
+ CONFIDENCE_SCORES=()
113
+
114
+ # Use process substitution to handle filenames with spaces correctly
115
+ while IFS= read -r response_file; do
116
+ if [[ -f "$response_file" && -s "$response_file" ]]; then
117
+ CONSULTANT=$(jq -r '.consultant // "unknown"' "$response_file" 2>/dev/null)
118
+ CONFIDENCE=$(jq -r '.confidence.score // 5' "$response_file" 2>/dev/null)
119
+
120
+ CONSULTANTS+=("$CONSULTANT")
121
+ CONFIDENCE_SCORES+=("$CONFIDENCE")
122
+
123
+ # Token optimization v2.1: Extract only essential fields instead of full JSON
124
+ SYNTHESIS_EXTRACT_FIELDS="${SYNTHESIS_EXTRACT_FIELDS:-true}"
125
+ if [[ "$SYNTHESIS_EXTRACT_FIELDS" == "true" ]]; then
126
+ SUMMARY=$(jq -r '.response.summary // "N/A"' "$response_file" 2>/dev/null)
127
+ APPROACH=$(jq -r '.response.approach // "N/A"' "$response_file" 2>/dev/null)
128
+ PROS=$(jq -r '(.response.pros // []) | join("; ")' "$response_file" 2>/dev/null)
129
+ CONS=$(jq -r '(.response.cons // []) | join("; ")' "$response_file" 2>/dev/null)
130
+ CONF_REASONING=$(jq -r '.confidence.reasoning // "N/A"' "$response_file" 2>/dev/null)
131
+
132
+ COMBINED_RESPONSES+="
133
+ **$CONSULTANT** (conf:$CONFIDENCE/10, approach:$APPROACH)
134
+ Summary: $SUMMARY
135
+ +: $PROS | -: $CONS
136
+ Reasoning: $CONF_REASONING
137
+ ---
138
+ "
139
+ else
140
+ # Legacy mode: include full JSON
141
+ COMBINED_RESPONSES+="
142
+ ### $CONSULTANT (Confidence: $CONFIDENCE/10)
143
+ $(cat "$response_file")
144
+
145
+ ---
146
+ "
147
+ fi
148
+ fi
149
+ done < <(find "$RESPONSES_DIR" -name "*.json" -type f 2>/dev/null | head -10)
150
+
151
+ NUM_CONSULTANTS=${#CONSULTANTS[@]}
152
+ log_info "Found $NUM_CONSULTANTS responses to synthesize"
153
+
154
+ # --- Get synthesis strategy ---
155
+ SYNTHESIS_STRATEGY="${SYNTHESIS_STRATEGY:-majority}"
156
+ log_info "Using synthesis strategy: $SYNTHESIS_STRATEGY"
157
+
158
+ # --- Strategy-specific instructions ---
159
+ get_strategy_instructions() {
160
+ local strategy="$1"
161
+
162
+ case "$strategy" in
163
+ majority)
164
+ echo "STRATEGY: MAJORITY - Weight equally, most common wins, focus on consensus" ;;
165
+ risk_averse)
166
+ echo "STRATEGY: RISK AVERSE - Prioritize safety, weight risk mentions higher, prefer established solutions, highlight risks" ;;
167
+ security_first)
168
+ echo "STRATEGY: SECURITY FIRST - Prioritize security, highlight vulnerabilities, reject insecure recommendations" ;;
169
+ cost_capped)
170
+ echo "STRATEGY: COST CAPPED - Prefer simpler solutions, minimize complexity, note cost implications" ;;
171
+ compare_only)
172
+ echo "STRATEGY: COMPARE ONLY - No recommendation, present objectively, set approach to 'user_decision_required'" ;;
173
+ *)
174
+ echo "STRATEGY: DEFAULT (MAJORITY) - Weight equally, most common wins" ;;
175
+ esac
176
+ }
177
+
178
+ STRATEGY_INSTRUCTIONS=$(get_strategy_instructions "$SYNTHESIS_STRATEGY")
179
+
180
+ # --- Build synthesis prompt (token-optimized v2.2) ---
181
+ SYNTHESIS_PROMPT="You are an expert meta-analyst. Synthesize AI consultant responses.
182
+ Role context: Architect=scalability/design, Pragmatist=simplicity, Advocate=risks/edge-cases, Innovator=creativity.
183
+
184
+ ## Synthesis Strategy
185
+ $STRATEGY_INSTRUCTIONS
186
+ "
187
+
188
+ if [[ -n "$ORIGINAL_QUESTION" ]]; then
189
+ SYNTHESIS_PROMPT+="
190
+ ## Original Question
191
+ $ORIGINAL_QUESTION
192
+
193
+ "
194
+ fi
195
+
196
+ SYNTHESIS_PROMPT+="
197
+ ## Consultant Responses
198
+ $COMBINED_RESPONSES
199
+
200
+ ## Instructions
201
+
202
+ Analyze carefully and produce ONLY valid JSON (no text before or after):
203
+
204
+ {
205
+ \"synthesis_version\": \"2.2\",
206
+ \"timestamp\": \"$(date -Iseconds)\",
207
+ \"strategy\": \"$SYNTHESIS_STRATEGY\",
208
+ \"consultants_analyzed\": $NUM_CONSULTANTS,
209
+ \"consensus\": {
210
+ \"score\": <0-100>,
211
+ \"level\": \"<high|medium|low|none>\",
212
+ \"description\": \"<description of consensus level>\",
213
+ \"agreed_points\": [\"<points where >= 3 agree>\"],
214
+ \"disagreed_points\": [
215
+ {
216
+ \"topic\": \"<topic>\",
217
+ \"positions\": {
218
+ \"<consultant_name>\": \"<position for each consultant that responded, or N/A if they did not address this topic>\"
219
+ }
220
+ }
221
+ ]
222
+ },
223
+ \"weighted_recommendation\": {
224
+ \"approach\": \"<recommended approach>\",
225
+ \"summary\": \"<summary in 2-3 sentences>\",
226
+ \"detailed\": \"<detailed explanation>\",
227
+ \"confidence_weighted_score\": <1-10 weighted by confidence>,
228
+ \"supporting_consultants\": [\"<who supports>\"],
229
+ \"dissenting_consultants\": [\"<who dissents>\"],
230
+ \"incorporated_insights\": [\"<insights from each consultant included>\"]
231
+ },
232
+ \"comparison_table\": [
233
+ {
234
+ \"aspect\": \"Approach\",
235
+ \"<consultant_name>\": \"<value for each consultant that responded>\"
236
+ },
237
+ {
238
+ \"aspect\": \"Complexity\",
239
+ \"<consultant_name>\": \"<value for each consultant that responded>\"
240
+ },
241
+ {
242
+ \"aspect\": \"Scalability\",
243
+ \"<consultant_name>\": \"<value for each consultant that responded>\"
244
+ },
245
+ {
246
+ \"aspect\": \"Risks\",
247
+ \"<consultant_name>\": \"<value for each consultant that responded>\"
248
+ }
249
+ ],
250
+ \"risk_assessment\": {
251
+ \"overall_risk\": \"<low|medium|high>\",
252
+ \"risks\": [
253
+ {
254
+ \"description\": \"<risk>\",
255
+ \"severity\": \"<low|medium|high>\",
256
+ \"mitigation\": \"<how to mitigate>\",
257
+ \"identified_by\": [\"<who identified it>\"]
258
+ }
259
+ ]
260
+ },
261
+ \"action_items\": [
262
+ {
263
+ \"priority\": 1,
264
+ \"action\": \"<what to do>\",
265
+ \"rationale\": \"<why>\"
266
+ }
267
+ ],
268
+ \"follow_up_questions\": [\"<questions for further clarification>\"],
269
+ \"debate_evolution\": {
270
+ \"initial_positions\": {},
271
+ \"shifts\": [],
272
+ \"final_stance\": \"<final stance of the panel>\"
273
+ }
274
+ }
275
+
276
+ RULES:
277
+ - consensus.score: 100% = all agree, 75-99% = 3+ agree, 50-74% = 2v2, 25-49% = strong disagreement, 0-24% = no convergence
278
+ - confidence_weighted_score = weighted average by confidence of consultants supporting the approach
279
+ - Include ALL consultants that responded in comparison_table (use consultant name as key, \"N/A\" if no data)
280
+ - For disagreed_points, include all consultants that took a position on that topic
281
+ - Respond ONLY with valid JSON, no markdown or additional text
282
+ "
283
+
284
+ # --- Execute synthesis ---
285
+ TEMP_OUTPUT=$(mktemp)
286
+
287
+ # Resolve which CLI to use (avoids invoking agent, walks fallback chain)
288
+ SYNTH_CLI=$(resolve_synthesis_cli 2>/dev/null || echo "")
289
+
290
+ if [[ -n "$SYNTH_CLI" ]]; then
291
+ log_info "Running synthesis with $SYNTH_CLI..."
292
+ build_synthesis_args "$SYNTH_CLI"
293
+ echo "$SYNTHESIS_PROMPT" | "${SYNTHESIS_ARGS[@]}" > "$TEMP_OUTPUT" 2>/dev/null
294
+ exit_code=$?
295
+ else
296
+ log_warn "No synthesis CLI available, using local fallback"
297
+ # Fallback: generate basic synthesis without LLM
298
+ generate_fallback_synthesis "$RESPONSES_DIR" > "$TEMP_OUTPUT"
299
+ exit_code=0
300
+ fi
301
+
302
+ # --- Post-processing ---
303
+ if [[ $exit_code -eq 0 && -f "$TEMP_OUTPUT" && -s "$TEMP_OUTPUT" ]]; then
304
+ # Extract only JSON from response (remove any text before/after)
305
+ RAW_OUTPUT=$(cat "$TEMP_OUTPUT")
306
+
307
+ # Try to extract JSON
308
+ if echo "$RAW_OUTPUT" | jq -e '.' > /dev/null 2>&1; then
309
+ # It's already valid JSON
310
+ cat "$TEMP_OUTPUT" > "$OUTPUT_FILE"
311
+ else
312
+ # Try to extract JSON from text using sed (portable across macOS/Linux)
313
+ # This extracts from the first { to the last }
314
+ JSON_EXTRACTED=$(echo "$RAW_OUTPUT" | sed -n '/{/,/}/p' | tr '\n' ' ' || echo "")
315
+ if [[ -n "$JSON_EXTRACTED" ]] && echo "$JSON_EXTRACTED" | jq -e '.' > /dev/null 2>&1; then
316
+ echo "$JSON_EXTRACTED" | jq '.' > "$OUTPUT_FILE"
317
+ else
318
+ # Fallback: create minimal structure
319
+ generate_fallback_synthesis "$RESPONSES_DIR" > "$OUTPUT_FILE"
320
+ fi
321
+ fi
322
+
323
+ log_success "Synthesis completed: $OUTPUT_FILE"
324
+ rm -f "$TEMP_OUTPUT"
325
+ cat "$OUTPUT_FILE"
326
+ else
327
+ log_error "Synthesis failed"
328
+ generate_fallback_synthesis "$RESPONSES_DIR" > "$OUTPUT_FILE"
329
+ rm -f "$TEMP_OUTPUT"
330
+ cat "$OUTPUT_FILE"
331
+ exit 1
332
+ fi
@@ -0,0 +1,323 @@
1
+ # AI Consultation Report v2.0
2
+
3
+ ## Metadata
4
+
5
+ | Field | Value |
6
+ |-------|-------|
7
+ | **Date** | {{TIMESTAMP}} |
8
+ | **Category** | {{CATEGORY}} |
9
+ | **Consensus Score** | {{CONSENSUS_SCORE}}% ({{CONSENSUS_LEVEL}}) |
10
+ | **Active Consultants** | {{ACTIVE_CONSULTANTS}} |
11
+ | **Debate Rounds** | {{DEBATE_ROUNDS}} |
12
+
13
+ ---
14
+
15
+ ## Question
16
+
17
+ > {{QUERY}}
18
+
19
+ ---
20
+
21
+ ## Automatic Synthesis
22
+
23
+ {{#IF_SYNTHESIS}}
24
+
25
+ ### Weighted Recommendation
26
+
27
+ **Recommended Approach:** {{RECOMMENDED_APPROACH}}
28
+
29
+ **Confidence-Weighted Score:** {{WEIGHTED_SCORE}}/10
30
+
31
+ **Summary:** {{SYNTHESIS_SUMMARY}}
32
+
33
+ ### Supporting Consultants
34
+ {{SUPPORTING_CONSULTANTS}}
35
+
36
+ ### Dissenting Consultants
37
+ {{DISSENTING_CONSULTANTS}}
38
+
39
+ ### Points of Agreement
40
+ {{#EACH AGREED_POINTS}}
41
+ - {{.}}
42
+ {{/EACH}}
43
+
44
+ ### Points of Disagreement
45
+ {{#EACH DISAGREED_POINTS}}
46
+ - **{{TOPIC}}**: {{POSITIONS}}
47
+ {{/EACH}}
48
+
49
+ {{/IF_SYNTHESIS}}
50
+
51
+ {{#IF_NO_SYNTHESIS}}
52
+ *Automatic synthesis not available. See individual responses.*
53
+ {{/IF_NO_SYNTHESIS}}
54
+
55
+ ---
56
+
57
+ ## Consultant Comparison
58
+
59
+ | Aspect | Gemini | Codex | Mistral | Kilo |
60
+ |--------|--------|-------|---------|------|
61
+ | **Persona** | The Architect | The Pragmatist | The Devil's Advocate | The Innovator |
62
+ | **Approach** | {{GEMINI_APPROACH}} | {{CODEX_APPROACH}} | {{MISTRAL_APPROACH}} | {{KILO_APPROACH}} |
63
+ | **Confidence** | {{GEMINI_CONFIDENCE}}/10 | {{CODEX_CONFIDENCE}}/10 | {{MISTRAL_CONFIDENCE}}/10 | {{KILO_CONFIDENCE}}/10 |
64
+
65
+ ### Consensus Levels
66
+
67
+ | Level | Score | Description |
68
+ |-------|-------|-------------|
69
+ | **Unanimous** | 100% | All agree |
70
+ | **High** | 75-99% | Strong agreement |
71
+ | **Medium** | 50-74% | Partial agreement |
72
+ | **Low** | 25-49% | Significant disagreement |
73
+ | **None** | 0-24% | No points of convergence |
74
+
75
+ ---
76
+
77
+ ## Risk Assessment
78
+
79
+ {{#IF_RISKS}}
80
+
81
+ **Overall Risk:** {{OVERALL_RISK}}
82
+
83
+ | Risk | Severity | Mitigation | Identified by |
84
+ |------|----------|------------|---------------|
85
+ {{#EACH RISKS}}
86
+ | {{DESCRIPTION}} | {{SEVERITY}} | {{MITIGATION}} | {{IDENTIFIED_BY}} |
87
+ {{/EACH}}
88
+
89
+ {{/IF_RISKS}}
90
+
91
+ ---
92
+
93
+ ## Action Items
94
+
95
+ {{#EACH ACTION_ITEMS}}
96
+ {{PRIORITY}}. **{{ACTION}}** - {{RATIONALE}}
97
+ {{/EACH}}
98
+
99
+ ---
100
+
101
+ ## Individual Responses
102
+
103
+ ### Gemini - The Architect
104
+
105
+ **Confidence:** {{GEMINI_CONFIDENCE}}/10
106
+
107
+ **Approach:** {{GEMINI_APPROACH}}
108
+
109
+ **Summary:**
110
+ > {{GEMINI_SUMMARY}}
111
+
112
+ {{#IF GEMINI_CODE}}
113
+ **Code:**
114
+ ```{{GEMINI_LANGUAGE}}
115
+ {{GEMINI_CODE}}
116
+ ```
117
+ {{/IF}}
118
+
119
+ **Pros:**
120
+ {{#EACH GEMINI_PROS}}
121
+ - {{.}}
122
+ {{/EACH}}
123
+
124
+ **Cons:**
125
+ {{#EACH GEMINI_CONS}}
126
+ - {{.}}
127
+ {{/EACH}}
128
+
129
+ <details>
130
+ <summary>Full Response</summary>
131
+
132
+ {{GEMINI_DETAILED}}
133
+
134
+ </details>
135
+
136
+ ---
137
+
138
+ ### Codex - The Pragmatist
139
+
140
+ **Confidence:** {{CODEX_CONFIDENCE}}/10
141
+
142
+ **Approach:** {{CODEX_APPROACH}}
143
+
144
+ **Summary:**
145
+ > {{CODEX_SUMMARY}}
146
+
147
+ {{#IF CODEX_CODE}}
148
+ **Code:**
149
+ ```{{CODEX_LANGUAGE}}
150
+ {{CODEX_CODE}}
151
+ ```
152
+ {{/IF}}
153
+
154
+ **Pros:**
155
+ {{#EACH CODEX_PROS}}
156
+ - {{.}}
157
+ {{/EACH}}
158
+
159
+ **Cons:**
160
+ {{#EACH CODEX_CONS}}
161
+ - {{.}}
162
+ {{/EACH}}
163
+
164
+ <details>
165
+ <summary>Full Response</summary>
166
+
167
+ {{CODEX_DETAILED}}
168
+
169
+ </details>
170
+
171
+ ---
172
+
173
+ ### Mistral - The Devil's Advocate
174
+
175
+ **Confidence:** {{MISTRAL_CONFIDENCE}}/10
176
+
177
+ **Approach:** {{MISTRAL_APPROACH}}
178
+
179
+ **Summary:**
180
+ > {{MISTRAL_SUMMARY}}
181
+
182
+ {{#IF MISTRAL_CODE}}
183
+ **Code:**
184
+ ```{{MISTRAL_LANGUAGE}}
185
+ {{MISTRAL_CODE}}
186
+ ```
187
+ {{/IF}}
188
+
189
+ **Pros:**
190
+ {{#EACH MISTRAL_PROS}}
191
+ - {{.}}
192
+ {{/EACH}}
193
+
194
+ **Cons:**
195
+ {{#EACH MISTRAL_CONS}}
196
+ - {{.}}
197
+ {{/EACH}}
198
+
199
+ <details>
200
+ <summary>Full Response</summary>
201
+
202
+ {{MISTRAL_DETAILED}}
203
+
204
+ </details>
205
+
206
+ ---
207
+
208
+ ### Kilo - The Innovator
209
+
210
+ **Confidence:** {{KILO_CONFIDENCE}}/10
211
+
212
+ **Approach:** {{KILO_APPROACH}}
213
+
214
+ **Summary:**
215
+ > {{KILO_SUMMARY}}
216
+
217
+ {{#IF KILO_CODE}}
218
+ **Code:**
219
+ ```{{KILO_LANGUAGE}}
220
+ {{KILO_CODE}}
221
+ ```
222
+ {{/IF}}
223
+
224
+ **Pros:**
225
+ {{#EACH KILO_PROS}}
226
+ - {{.}}
227
+ {{/EACH}}
228
+
229
+ **Cons:**
230
+ {{#EACH KILO_CONS}}
231
+ - {{.}}
232
+ {{/EACH}}
233
+
234
+ <details>
235
+ <summary>Full Response</summary>
236
+
237
+ {{KILO_DETAILED}}
238
+
239
+ </details>
240
+
241
+ ---
242
+
243
+ {{#IF_DEBATE}}
244
+
245
+ ## Multi-Agent Debate
246
+
247
+ ### Round {{DEBATE_ROUND}}
248
+
249
+ | Consultant | Position Changed | Confidence Delta | Critiques |
250
+ |------------|------------------|------------------|-----------|
251
+ {{#EACH DEBATE_RESULTS}}
252
+ | {{CONSULTANT}} | {{POSITION_CHANGED}} | {{CONFIDENCE_DELTA}} | {{CRITIQUES_COUNT}} |
253
+ {{/EACH}}
254
+
255
+ **Stability:** {{DEBATE_STABILITY}}
256
+
257
+ {{/IF_DEBATE}}
258
+
259
+ ---
260
+
261
+ ## Suggested Follow-ups
262
+
263
+ {{#EACH FOLLOW_UP_QUESTIONS}}
264
+ - {{.}}
265
+ {{/EACH}}
266
+
267
+ ---
268
+
269
+ ## Output Files
270
+
271
+ | File | Description |
272
+ |------|-------------|
273
+ | `{{OUTPUT_DIR}}/context.md` | Built context |
274
+ | `{{OUTPUT_DIR}}/gemini.json` | Gemini response |
275
+ | `{{OUTPUT_DIR}}/codex.json` | Codex response |
276
+ | `{{OUTPUT_DIR}}/mistral.json` | Mistral response |
277
+ | `{{OUTPUT_DIR}}/kilo.json` | Kilo response |
278
+ | `{{OUTPUT_DIR}}/voting.json` | Voting report |
279
+ | `{{OUTPUT_DIR}}/synthesis.json` | Automatic synthesis |
280
+
281
+ ---
282
+
283
+ ## Raw Responses
284
+
285
+ <details>
286
+ <summary>Gemini Raw JSON</summary>
287
+
288
+ ```json
289
+ {{GEMINI_RAW}}
290
+ ```
291
+
292
+ </details>
293
+
294
+ <details>
295
+ <summary>Codex Raw JSON</summary>
296
+
297
+ ```json
298
+ {{CODEX_RAW}}
299
+ ```
300
+
301
+ </details>
302
+
303
+ <details>
304
+ <summary>Mistral Raw JSON</summary>
305
+
306
+ ```json
307
+ {{MISTRAL_RAW}}
308
+ ```
309
+
310
+ </details>
311
+
312
+ <details>
313
+ <summary>Kilo Raw JSON</summary>
314
+
315
+ ```json
316
+ {{KILO_RAW}}
317
+ ```
318
+
319
+ </details>
320
+
321
+ ---
322
+
323
+ *Report generated by AI Consultants v2.0*