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,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Consult AI experts (Gemini, Codex, Mistral, Kilo, Cursor, Aider, Amp, Kimi, Qwen, GLM, Grok, DeepSeek, MiniMax, Ollama) for coding questions. Use when weighing trade-offs, comparing approaches, or wanting multiple expert perspectives on non-trivial decisions.
|
|
3
|
+
argument-hint: <question> [file1] [file2] ...
|
|
4
|
+
allowed-tools: Bash Read Glob Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# AI Consultants - Expert Panel
|
|
8
|
+
|
|
9
|
+
Query multiple AI models for expert opinions on a coding question.
|
|
10
|
+
|
|
11
|
+
**User's Question:** $ARGUMENTS
|
|
12
|
+
|
|
13
|
+
## Instructions
|
|
14
|
+
|
|
15
|
+
1. If no question provided in $ARGUMENTS, ask the user what they want to consult about.
|
|
16
|
+
|
|
17
|
+
2. **File context handling**: Check if $ARGUMENTS contains file paths (tokens containing `/` or extensions like `.ts`, `.js`, `.py`, `.sh`, `.json`, `.yaml`, `.yml`, `.md`, `.go`, `.rs`, `.java`, `.rb`, `.css`, `.html`, `.tsx`, `.jsx`, `.c`, `.cpp`, `.h`).
|
|
18
|
+
If file paths are found:
|
|
19
|
+
- Extract each file path token from $ARGUMENTS
|
|
20
|
+
- Read each file using the **Read** tool
|
|
21
|
+
- Build an enriched query by replacing file path tokens with their inline contents:
|
|
22
|
+
```
|
|
23
|
+
<original question text without file paths>
|
|
24
|
+
|
|
25
|
+
--- File: path/to/file.ts ---
|
|
26
|
+
<file contents>
|
|
27
|
+
--- End File ---
|
|
28
|
+
```
|
|
29
|
+
- Use this enriched query in step 3 instead of raw $ARGUMENTS
|
|
30
|
+
|
|
31
|
+
3. **Run the consultation**:
|
|
32
|
+
```bash
|
|
33
|
+
cd "${AI_CONSULTANTS_DIR:-$HOME/.claude/skills/ai-consultants}" && INVOKING_AGENT=claude ./scripts/consult_all.sh '<query>'
|
|
34
|
+
```
|
|
35
|
+
Replace `<query>` with the enriched query from step 2 (or $ARGUMENTS if no files were detected). Use single quotes around the query to prevent shell expansion of special characters.
|
|
36
|
+
**Capture the last line of stdout** — it contains the output directory path (e.g., `/tmp/ai_consultations/20260315_143022_12345/`).
|
|
37
|
+
|
|
38
|
+
4. **Read the results** from the output directory captured in step 3:
|
|
39
|
+
- Read `<output_dir>/report.md` using the **Read** tool
|
|
40
|
+
- Read `<output_dir>/synthesis.json` using the **Read** tool (may not exist if synthesis was skipped or failed)
|
|
41
|
+
- If neither exists, use the **Glob** tool with pattern `<output_dir>/*.json` to discover individual consultant response files, then read each one
|
|
42
|
+
|
|
43
|
+
5. **Present the results** using this template:
|
|
44
|
+
|
|
45
|
+
### Consensus
|
|
46
|
+
- **Score**: <consensus_percentage>% (<consensus_level: strong/medium/low/none>)
|
|
47
|
+
- **Category**: <question_category>
|
|
48
|
+
|
|
49
|
+
### Consultant Summary
|
|
50
|
+
| Consultant | Confidence | Approach | Key Insight |
|
|
51
|
+
|------------|-----------|----------|-------------|
|
|
52
|
+
| <name> | <score>/10 | <approach> | <one-line from summary> |
|
|
53
|
+
|
|
54
|
+
### Synthesized Recommendation
|
|
55
|
+
- **Recommended approach**: <approach>
|
|
56
|
+
- **Summary**: <synthesized summary>
|
|
57
|
+
|
|
58
|
+
### Key Agreements
|
|
59
|
+
- <points most consultants agree on>
|
|
60
|
+
|
|
61
|
+
### Key Disagreements
|
|
62
|
+
- <points where consultants diverge>
|
|
63
|
+
|
|
64
|
+
### Risk Assessment
|
|
65
|
+
- <caveats and uncertainty factors raised>
|
|
66
|
+
|
|
67
|
+
### Suggested Next Steps
|
|
68
|
+
- <actionable items based on the recommendation>
|
|
69
|
+
|
|
70
|
+
If `synthesis.json` is missing, build the summary table and recommendation directly from the individual consultant JSON files in the output directory.
|
|
71
|
+
|
|
72
|
+
6. **Error recovery**:
|
|
73
|
+
- **Exit code 1** (general failure): Tell the user and suggest running diagnostics:
|
|
74
|
+
```bash
|
|
75
|
+
cd "${AI_CONSULTANTS_DIR:-$HOME/.claude/skills/ai-consultants}" && ./scripts/doctor.sh
|
|
76
|
+
```
|
|
77
|
+
- **Exit code 124** (timeout): Suggest `--preset fast` for quicker results or increasing the timeout (e.g., `GEMINI_TIMEOUT=300`)
|
|
78
|
+
- **Partial failures** (some consultants responded, others didn't): Present the successful results normally and note which consultants failed at the end
|
|
79
|
+
- **Empty output directory** (no JSON files produced): Suggest running `doctor.sh` to verify CLI installations and API keys
|
|
80
|
+
|
|
81
|
+
## Options
|
|
82
|
+
|
|
83
|
+
| Variable | Effect |
|
|
84
|
+
|----------|--------|
|
|
85
|
+
| `ENABLE_DEBATE=true` | Enable multi-round debate for deeper analysis |
|
|
86
|
+
| `ENABLE_SMART_ROUTING=true` | Auto-select best consultants for the question type |
|
|
87
|
+
| `DEBATE_ROUNDS=2` | Number of debate rounds (1-3) |
|
|
88
|
+
|
|
89
|
+
## Follow-up
|
|
90
|
+
|
|
91
|
+
For follow-up questions on the same consultation:
|
|
92
|
+
```bash
|
|
93
|
+
cd "${AI_CONSULTANTS_DIR:-$HOME/.claude/skills/ai-consultants}" && INVOKING_AGENT=claude ./scripts/followup.sh '<follow-up question>'
|
|
94
|
+
```
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run AI consultation with multi-round debate where consultants critique each other's positions. Use for architecture decisions, security reviews, controversial trade-offs, or when a standard consultation produced low consensus.
|
|
3
|
+
argument-hint: <question> [file1] [file2] ...
|
|
4
|
+
allowed-tools: Bash Read Glob Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# AI Consultants - Debate Mode
|
|
8
|
+
|
|
9
|
+
Run a multi-round debate where AI consultants critique each other's responses and refine their positions.
|
|
10
|
+
|
|
11
|
+
**Question:** $ARGUMENTS
|
|
12
|
+
|
|
13
|
+
## When to Use Debate
|
|
14
|
+
|
|
15
|
+
- **Architecture decisions**: Microservices vs monolith, database choices, system design
|
|
16
|
+
- **Security reviews**: Threat modeling, authentication strategies, data protection approaches
|
|
17
|
+
- **Low-consensus results**: A previous `/ai-consultants:consult` returned low consensus — debate forces deeper analysis
|
|
18
|
+
- **Controversial trade-offs**: Performance vs maintainability, speed vs correctness, build vs buy
|
|
19
|
+
|
|
20
|
+
## Instructions
|
|
21
|
+
|
|
22
|
+
1. If no question provided in $ARGUMENTS, ask the user what they want to debate.
|
|
23
|
+
|
|
24
|
+
2. **File context handling**: Check if $ARGUMENTS contains file paths (tokens containing `/` or extensions like `.ts`, `.js`, `.py`, `.sh`, `.json`, `.yaml`, `.yml`, `.md`, `.go`, `.rs`, `.java`, `.rb`, `.css`, `.html`, `.tsx`, `.jsx`, `.c`, `.cpp`, `.h`).
|
|
25
|
+
If file paths are found:
|
|
26
|
+
- Extract each file path token from $ARGUMENTS
|
|
27
|
+
- Read each file using the **Read** tool
|
|
28
|
+
- Build an enriched query by replacing file path tokens with their inline contents:
|
|
29
|
+
```
|
|
30
|
+
<original question text without file paths>
|
|
31
|
+
|
|
32
|
+
--- File: path/to/file.ts ---
|
|
33
|
+
<file contents>
|
|
34
|
+
--- End File ---
|
|
35
|
+
```
|
|
36
|
+
- Use this enriched query in step 3 instead of raw $ARGUMENTS
|
|
37
|
+
|
|
38
|
+
3. **Run the debate consultation**:
|
|
39
|
+
```bash
|
|
40
|
+
cd "${AI_CONSULTANTS_DIR:-$HOME/.claude/skills/ai-consultants}" && INVOKING_AGENT=claude ENABLE_DEBATE=true DEBATE_ROUNDS="${DEBATE_ROUNDS:-2}" ./scripts/consult_all.sh '<query>'
|
|
41
|
+
```
|
|
42
|
+
Replace `<query>` with the enriched query from step 2 (or $ARGUMENTS if no files were detected). Use single quotes around the query to prevent shell expansion of special characters.
|
|
43
|
+
**Capture the last line of stdout** — it contains the output directory path.
|
|
44
|
+
|
|
45
|
+
4. **Read the results** from the output directory captured in step 3:
|
|
46
|
+
- Read `<output_dir>/report.md` using the **Read** tool
|
|
47
|
+
- Read `<output_dir>/synthesis.json` using the **Read** tool (may not exist)
|
|
48
|
+
- Use the **Glob** tool with pattern `<output_dir>/round_*/round_summary.json` to find debate round summaries, then read each one
|
|
49
|
+
- Use the **Glob** tool with pattern `<output_dir>/round_*/*.json` to find debate round responses (exclude `round_summary.json` — these individual files contain position changes, critiques, and confidence deltas)
|
|
50
|
+
- Round 1 (initial responses) are stored directly in `<output_dir>/*.json`; subsequent rounds are in `<output_dir>/round_N/` subdirectories
|
|
51
|
+
|
|
52
|
+
5. **Present the results** using this debate-specific template:
|
|
53
|
+
|
|
54
|
+
### Consensus
|
|
55
|
+
- **Score**: <consensus_percentage>% (<consensus_level>)
|
|
56
|
+
- **Category**: <question_category>
|
|
57
|
+
|
|
58
|
+
### Position Evolution
|
|
59
|
+
| Consultant | Initial Approach | Changed? | Final Approach | Confidence Delta |
|
|
60
|
+
|------------|-----------------|----------|---------------|-----------------|
|
|
61
|
+
| <name> | <round 1 approach> | Yes/No | <final approach> | <+N/-N> |
|
|
62
|
+
|
|
63
|
+
### Key Critiques
|
|
64
|
+
- **<consultant>** on **<target>**: <critique summary> (severity: <minor/moderate/major>)
|
|
65
|
+
|
|
66
|
+
### Debate Stability
|
|
67
|
+
- **Assessment**: <stable/mostly_stable/volatile> — <N> of <total> consultants changed position
|
|
68
|
+
- If stable: "Strong agreement — consultants held their positions after cross-critique"
|
|
69
|
+
- If volatile: "Significant disagreement — positions shifted substantially during debate"
|
|
70
|
+
|
|
71
|
+
### Synthesized Recommendation
|
|
72
|
+
- **Recommended approach**: <approach>
|
|
73
|
+
- **Summary**: <synthesized summary>
|
|
74
|
+
|
|
75
|
+
### Key Agreements
|
|
76
|
+
- <points reinforced through debate>
|
|
77
|
+
|
|
78
|
+
### Key Disagreements
|
|
79
|
+
- <unresolved points of contention>
|
|
80
|
+
|
|
81
|
+
### Risk Assessment
|
|
82
|
+
- <caveats and uncertainty factors>
|
|
83
|
+
|
|
84
|
+
### Suggested Next Steps
|
|
85
|
+
- <actionable items>
|
|
86
|
+
|
|
87
|
+
If `synthesis.json` is missing, build the summary from individual consultant JSON files.
|
|
88
|
+
|
|
89
|
+
6. **Error recovery**:
|
|
90
|
+
- **Exit code 1** (general failure): Tell the user and suggest running diagnostics:
|
|
91
|
+
```bash
|
|
92
|
+
cd "${AI_CONSULTANTS_DIR:-$HOME/.claude/skills/ai-consultants}" && ./scripts/doctor.sh
|
|
93
|
+
```
|
|
94
|
+
- **Exit code 124** (timeout): Debate is more expensive — suggest reducing `DEBATE_ROUNDS=1` or using `--preset fast`
|
|
95
|
+
- **Partial failures**: Present successful results and note which consultants failed
|
|
96
|
+
- **Empty output**: Suggest running `doctor.sh` to verify CLI installations
|
|
97
|
+
|
|
98
|
+
## Options
|
|
99
|
+
|
|
100
|
+
| Variable | Default | Effect |
|
|
101
|
+
|----------|---------|--------|
|
|
102
|
+
| `DEBATE_ROUNDS` | `2` | Number of debate rounds (1-3). More rounds = deeper analysis but higher cost |
|
|
103
|
+
| `ENABLE_SMART_ROUTING` | `false` | Auto-select best consultants for the question type |
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Show help and usage for AI Consultants skill
|
|
3
|
+
allowed-tools:
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AI Consultants - Help
|
|
7
|
+
|
|
8
|
+
All skill details (consultants, personas, presets, strategies, features, configuration) are shown in the skill overview loaded alongside this command. Here's a quick reference:
|
|
9
|
+
|
|
10
|
+
## Commands
|
|
11
|
+
|
|
12
|
+
| Command | Description |
|
|
13
|
+
|---------|-------------|
|
|
14
|
+
| `/ai-consultants:consult` | Main consultation — ask AI consultants a coding question |
|
|
15
|
+
| `/ai-consultants:debate` | Run consultation with multi-round debate |
|
|
16
|
+
| `/ai-consultants:help` | Show this help |
|
|
17
|
+
|
|
18
|
+
## Quick Examples
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
/ai-consultants:consult "How to optimize this SQL query?"
|
|
22
|
+
/ai-consultants:consult "Review this code" src/utils.ts
|
|
23
|
+
/ai-consultants:debate "Microservices or monolith?"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Configuration (presets, strategies, features, personas, API keys) can be managed via natural language — just ask.
|
|
27
|
+
|
|
28
|
+
Troubleshooting: run `./scripts/doctor.sh` or `./scripts/doctor.sh --fix`.
|
|
29
|
+
|
|
30
|
+
Full docs: https://github.com/matteoscurati/ai-consultants
|