ai-consultants 2.19.2 → 2.21.0
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:help.md +1 -0
- package/.claude/commands/ai-consultants:roster-audit.md +38 -0
- package/CLAUDE.md +44 -8
- package/README.md +9 -2
- package/SKILL.md +10 -4
- package/bin/ai-consultants +5 -0
- package/docs/COST_RATES.md +1 -1
- package/docs/SETUP.md +9 -5
- package/docs/SMART_ROUTING.md +115 -1
- package/docs/cost_rates.json +1 -1
- package/docs/releases/v2.20.0.md +65 -0
- package/docs/releases/v2.21.0.md +65 -0
- package/package.json +1 -1
- package/references/affinity.json +31 -1
- package/references/calibration_benchmark.json +65 -0
- package/references/configuration.md +52 -10
- package/scripts/config.sh +70 -12
- package/scripts/consult_all.sh +39 -0
- package/scripts/doctor.sh +21 -5
- package/scripts/lib/api_query.sh +9 -0
- package/scripts/lib/common.sh +58 -5
- package/scripts/lib/orchestration.sh +33 -5
- package/scripts/lib/personas.sh +10 -3
- package/scripts/lib/reflection.sh +4 -1
- package/scripts/lib/reliability.sh +132 -0
- package/scripts/lib/routing.sh +75 -2
- package/scripts/lib/stance.sh +70 -0
- package/scripts/lib/voting.sh +131 -27
- package/scripts/peer_review.sh +18 -9
- package/scripts/query_gemini.sh +12 -7
- package/scripts/query_kilo.sh +7 -0
- package/scripts/query_kimi.sh +24 -4
- package/scripts/query_minimax.sh +72 -7
- package/scripts/release.sh +220 -0
- package/scripts/roster_audit.sh +157 -0
- package/scripts/roster_calibrate.sh +223 -0
- package/scripts/run_calibration.sh +76 -0
- package/scripts/synthesize.sh +12 -5
- package/scripts/taste_elo.sh +171 -0
- package/scripts/test_capability_weighting.sh +135 -0
- package/scripts/test_e2e.sh +84 -0
- package/scripts/test_fixtures/stub_cli.sh +45 -0
- package/scripts/test_release.sh +220 -0
- package/scripts/test_reliability.sh +83 -0
- package/scripts/test_roster_audit.sh +65 -0
- package/scripts/test_roster_calibrate.sh +91 -0
- package/scripts/test_stance.sh +67 -0
- package/scripts/test_suite.sh +11 -0
- package/scripts/test_taste_elo.sh +61 -0
- package/scripts/test_update_clis.sh +79 -0
- package/scripts/test_user_config.sh +45 -1
- package/scripts/test_voting_metadata.sh +69 -0
- package/scripts/update_clis.sh +238 -0
|
@@ -13,6 +13,7 @@ All skill details (consultants, personas, presets, strategies, features, configu
|
|
|
13
13
|
|---------|-------------|
|
|
14
14
|
| `/ai-consultants:consult` | Main consultation — ask AI consultants a coding question |
|
|
15
15
|
| `/ai-consultants:debate` | Run consultation with multi-round debate |
|
|
16
|
+
| `/ai-consultants:roster-audit` | Audit which consultants add distinct value vs echo the panel |
|
|
16
17
|
| `/ai-consultants:help` | Show this help |
|
|
17
18
|
|
|
18
19
|
## Quick Examples
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Audit the consultant roster for uncorrelated value — which consultants contribute a distinct approach vs echo the panel (candidates to drop or down-weight). Use when deciding roster composition or after noticing redundant consultations.
|
|
3
|
+
argument-hint: [--recent N] [--threshold PCT] [dir ...]
|
|
4
|
+
allowed-tools: Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# AI Consultants - Roster Audit
|
|
8
|
+
|
|
9
|
+
Measure each consultant's *uncorrelated value* across past consultations: a
|
|
10
|
+
consultant whose approach rarely differs from the rest (low keyword overlap) is
|
|
11
|
+
redundant; one that is often distinct earns its seat on diversity. This is the
|
|
12
|
+
"does it add signal the others miss?" bar, applied to the panel.
|
|
13
|
+
|
|
14
|
+
**Arguments:** $ARGUMENTS
|
|
15
|
+
|
|
16
|
+
## Instructions
|
|
17
|
+
|
|
18
|
+
1. Run the audit (pass `$ARGUMENTS` through; with no args it audits the most
|
|
19
|
+
recent consultations under the output base):
|
|
20
|
+
```bash
|
|
21
|
+
cd "${AI_CONSULTANTS_DIR:-$HOME/.claude/skills/ai-consultants}" && ./scripts/roster_audit.sh $ARGUMENTS
|
|
22
|
+
```
|
|
23
|
+
- No args → the 20 most recent consultation dirs.
|
|
24
|
+
- `--recent N` → the N most recent; `--threshold PCT` → correlation cutoff (default 20%).
|
|
25
|
+
- Or pass explicit consultation output dirs; add `--json` for machine-readable output.
|
|
26
|
+
|
|
27
|
+
2. **Present the table** as-is (consultant · participated · distinct · distinct% ·
|
|
28
|
+
verdict), then interpret each verdict:
|
|
29
|
+
- **unique-value** — pulls its weight on diversity; keep.
|
|
30
|
+
- **some-value** — contributes occasionally.
|
|
31
|
+
- **redundant?** — correlated with the panel; candidate to drop or down-weight
|
|
32
|
+
in `references/affinity.json` (lower its category affinities, or its
|
|
33
|
+
capability axes when capability routing is enabled).
|
|
34
|
+
- **insufficient-data** — too few samples; audit more consultations.
|
|
35
|
+
|
|
36
|
+
3. If the audit prints "nothing to audit" (exit 1), tell the user no consultations
|
|
37
|
+
with ≥2 responders were found and suggest running some consultations first —
|
|
38
|
+
each `consult_all.sh` run writes an output directory the audit can read.
|
package/CLAUDE.md
CHANGED
|
@@ -6,7 +6,7 @@ AI Consultants is a multi-model AI deliberation system that queries up to 15 AI
|
|
|
6
6
|
|
|
7
7
|
**Self-Exclusion**: The invoking agent is automatically excluded from the panel to prevent self-consultation. Claude Code won't query Claude, Codex CLI won't query Codex, etc.
|
|
8
8
|
|
|
9
|
-
**Version**: 2.
|
|
9
|
+
**Version**: 2.21.0
|
|
10
10
|
|
|
11
11
|
## Distribution
|
|
12
12
|
|
|
@@ -38,7 +38,12 @@ ai-consultants/
|
|
|
38
38
|
│ ├── consult_all.sh # Main orchestrator - entry point
|
|
39
39
|
│ ├── config.sh # Centralized configuration
|
|
40
40
|
│ ├── doctor.sh # Diagnostic and auto-fix tool (v2.2)
|
|
41
|
+
│ ├── update_clis.sh # Check/update installed consultant CLIs (v2.21)
|
|
41
42
|
│ ├── peer_review.sh # Anonymous peer review (v2.2)
|
|
43
|
+
│ ├── roster_audit.sh # Roster uncorrelated-value audit (v2.20)
|
|
44
|
+
│ ├── roster_calibrate.sh # Measured capability calibration, Tier A (v2.20)
|
|
45
|
+
│ ├── run_calibration.sh # Calibration data-collection harness (v2.20)
|
|
46
|
+
│ ├── taste_elo.sh # Pairwise-judge taste Elo, Tier B (v2.20)
|
|
42
47
|
│ ├── install.sh # One-liner installer (v2.2)
|
|
43
48
|
│ ├── query_*.sh # Wrapper for each consultant
|
|
44
49
|
│ ├── query_claude.sh # Claude consultant (v2.2)
|
|
@@ -55,6 +60,7 @@ ai-consultants/
|
|
|
55
60
|
│ ├── voting.sh # Voting/consensus + confidence intervals
|
|
56
61
|
│ ├── routing.sh # Smart routing + cost-aware routing
|
|
57
62
|
│ ├── orchestration.sh # Dynamic orchestration planner + shapes (v2.16)
|
|
63
|
+
│ ├── stance.sh # Stance-based semantic consensus (v2.21, opt-in)
|
|
58
64
|
│ ├── session.sh # Session management
|
|
59
65
|
│ ├── costs.sh # Cost tracking + response limits
|
|
60
66
|
│ ├── cache.sh # Semantic caching (v2.3)
|
|
@@ -281,7 +287,7 @@ curl -fsSL https://ampcode.com/install.sh | bash
|
|
|
281
287
|
```
|
|
282
288
|
|
|
283
289
|
**Environment Variables:**
|
|
284
|
-
- `ENABLE_AMP` - Enable Amp consultant (default:
|
|
290
|
+
- `ENABLE_AMP` - Enable Amp consultant (default: true)
|
|
285
291
|
- `AMP_CMD` - CLI command (default: amp)
|
|
286
292
|
- `AMP_TIMEOUT` - Timeout in seconds (default: 180)
|
|
287
293
|
- `AMP_API_KEY` - API key for authentication
|
|
@@ -322,7 +328,7 @@ Qwen3 now supports CLI/API mode switching using the qwen-code CLI.
|
|
|
322
328
|
export QWEN3_USE_API=false
|
|
323
329
|
./scripts/consult_all.sh "question"
|
|
324
330
|
|
|
325
|
-
# API mode (
|
|
331
|
+
# API mode (opt-in)
|
|
326
332
|
export QWEN3_USE_API=true
|
|
327
333
|
export QWEN3_API_KEY="your-dashscope-key"
|
|
328
334
|
./scripts/consult_all.sh "question"
|
|
@@ -338,7 +344,7 @@ npm install -g @qwen-code/qwen-code@latest
|
|
|
338
344
|
## v2.6 Features
|
|
339
345
|
|
|
340
346
|
### CLI/API Mode Switching
|
|
341
|
-
|
|
347
|
+
Six consultants can now switch between CLI and API mode: **Gemini, Codex, Claude, Mistral, Qwen3, MiniMax**.
|
|
342
348
|
|
|
343
349
|
When API mode is enabled for an agent, CLI mode is disabled (mutual exclusivity).
|
|
344
350
|
|
|
@@ -375,6 +381,7 @@ New environment variables in `config.sh`:
|
|
|
375
381
|
| `CLAUDE_USE_API` | false | Use Anthropic API instead of claude CLI |
|
|
376
382
|
| `MISTRAL_USE_API` | false | Use Mistral API instead of vibe CLI |
|
|
377
383
|
| `QWEN3_USE_API` | false | Use DashScope API instead of qwen CLI (v2.7) |
|
|
384
|
+
| `MINIMAX_USE_API` | false | Use MiniMax API instead of the mmx CLI (v2.21) |
|
|
378
385
|
| `GEMINI_API_URL` | https://generativelanguage.googleapis.com/v1beta/models | Google AI endpoint |
|
|
379
386
|
| `CODEX_API_URL` | https://api.openai.com/v1/chat/completions | OpenAI endpoint |
|
|
380
387
|
| `CLAUDE_API_URL` | https://api.anthropic.com/v1/messages | Anthropic endpoint |
|
|
@@ -645,7 +652,7 @@ for f in scripts/*.sh scripts/lib/*.sh; do bash -n "$f" && echo "OK: $f"; done
|
|
|
645
652
|
| Variable | Default | Description |
|
|
646
653
|
|----------|---------|-------------|
|
|
647
654
|
| `INVOKING_AGENT` | unknown | Agent invoking the skill (for self-exclusion) |
|
|
648
|
-
| `ENABLE_CLAUDE` |
|
|
655
|
+
| `ENABLE_CLAUDE` | true | Enable Claude consultant (auto-excluded under Claude Code) |
|
|
649
656
|
| `ENABLE_DEBATE` | false | Enable Multi-Agent Debate |
|
|
650
657
|
| `DEBATE_ROUNDS` | 1 | Number of debate rounds |
|
|
651
658
|
| `ENABLE_SYNTHESIS` | true | Auto-synthesis of responses |
|
|
@@ -668,15 +675,23 @@ for f in scripts/*.sh scripts/lib/*.sh; do bash -n "$f" && echo "OK: $f"; done
|
|
|
668
675
|
| `ENABLE_COST_AWARE_ROUTING` | false | Cost-based model routing (v2.3) |
|
|
669
676
|
| `ENABLE_DEBATE_OPTIMIZATION` | false | Skip debate if all agree (v2.3, opt-in) |
|
|
670
677
|
| `ENABLE_COMPACT_REPORT` | true | Compact report format (v2.3) |
|
|
678
|
+
| `ENABLE_CAPABILITY_WEIGHTING` | false | Capability-weighted voting (v2.20, opt-in) |
|
|
679
|
+
| `ENABLE_CAPABILITY_ROUTING` | false | Capability-aware panel composition (v2.20, opt-in) |
|
|
680
|
+
| `CAPABILITY_WEIGHT_STRENGTH` | 10 | Vote-weight modulation: conf*(S+cap)/S (v2.20) |
|
|
681
|
+
| `CAPABILITY_DEFAULT` | 5 | Fallback capability for a missing consultant/axis (v2.20) |
|
|
682
|
+
| `ENABLE_STANCE_CONSENSUS` | false | Enumerated-stance exact-match consensus (v2.21, opt-in; +1 LLM call/run) |
|
|
683
|
+
| `STANCE_MAX_OPTIONS` | 5 | Max stance options generated per question (v2.21) |
|
|
671
684
|
| `ENABLE_BUDGET_LIMIT` | false | Budget enforcement (v2.4, opt-in) |
|
|
672
685
|
| `BUDGET_ACTION` | warn | Action on budget exceeded: warn/stop (v2.4) |
|
|
673
686
|
| `QWEN3_USE_API` | false | Use DashScope API instead of qwen CLI (v2.7) |
|
|
674
687
|
| `QWEN3_CMD` | qwen | Qwen CLI command (v2.7) |
|
|
675
|
-
| `ENABLE_KIMI` |
|
|
688
|
+
| `ENABLE_KIMI` | true | Enable Kimi consultant (v2.9) |
|
|
676
689
|
| `KIMI_CMD` | kimi | Kimi CLI command (v2.9) |
|
|
677
690
|
| `KIMI_MODEL` | kimi-code/kimi-for-coding | Kimi model (v2.9) |
|
|
678
|
-
| `ENABLE_MINIMAX` |
|
|
679
|
-
| `
|
|
691
|
+
| `ENABLE_MINIMAX` | true | Enable MiniMax consultant (v2.10; CLI via mmx v2.21) |
|
|
692
|
+
| `MINIMAX_USE_API` | false | Use MiniMax API instead of the mmx CLI (v2.21) |
|
|
693
|
+
| `MINIMAX_CMD` | mmx | MiniMax CLI command (v2.21) |
|
|
694
|
+
| `MINIMAX_API_KEY` | - | MiniMax API key (API mode only) (v2.10) |
|
|
680
695
|
| `MINIMAX_MODEL` | MiniMax-M2.7 | MiniMax model (v2.10) |
|
|
681
696
|
|
|
682
697
|
## External Dependencies
|
|
@@ -691,6 +706,7 @@ for f in scripts/*.sh scripts/lib/*.sh; do bash -n "$f" && echo "OK: $f"; done
|
|
|
691
706
|
- `kimi` CLI - Kimi Code (v2.9)
|
|
692
707
|
- `claude` CLI - Claude (v2.2, also used for synthesis)
|
|
693
708
|
- `qwen` CLI - Qwen via qwen-code (v2.7, optional)
|
|
709
|
+
- `mmx` CLI - MiniMax via mmx-cli (v2.21, optional; `npm i -g mmx-cli`, auth `mmx auth login`)
|
|
694
710
|
- `ollama` CLI - Local models (v2.2)
|
|
695
711
|
- `jq` - JSON parsing
|
|
696
712
|
|
|
@@ -826,6 +842,26 @@ curl -fsSL https://raw.githubusercontent.com/matteoscurati/ai-consultants/main/s
|
|
|
826
842
|
|
|
827
843
|
## Changelog
|
|
828
844
|
|
|
845
|
+
### v2.21.0
|
|
846
|
+
- **CLI-first transport (principle).** Every `*_USE_API` defaults `false`; a consultant with a CLI always uses it, API is opt-in (CLI-less model or explicit choice). `ENABLE_AMP`/`ENABLE_CLAUDE` default true.
|
|
847
|
+
- **MiniMax via `mmx` CLI** (was API-only). `query_minimax.sh` runs `mmx text chat --non-interactive …` in CLI mode; `config.sh` adds `MINIMAX_CMD` + auto-resolves `MINIMAX_USE_API` (API iff `MINIMAX_API_KEY` set — back-compat), drops MiniMax from `API_CONSULTANTS`; `doctor.sh` treats it as switchable.
|
|
848
|
+
- **`scripts/update_clis.sh`** (+ `ai-consultants update-clis`): per CLI-backed consultant, `detect_method` (brew formula/cask, npm, uv, pipx, pip, self-update, curl installer) → update. `--dry-run`, `--only`.
|
|
849
|
+
- **Stance consensus** (opt-in, `ENABLE_STANCE_CONSENSUS`): new `lib/stance.sh` (`generate_stance_options` — one synthesizer call wrapped in `run_with_timeout`; `_stance_clean`; `build_stance_prompt`). `consult_all.sh` generates the shared set → `stance_options.json` + exports `STANCE_OPTIONS_PROMPT`; injected via `personas.sh` (CLI) + `api_query.sh` (API). `voting.sh::calculate_consensus_score` scores the plurality stance over the PANEL size (not the count of emitted stances). `STANCE_MAX_OPTIONS`, `STANCE_TIMEOUT`.
|
|
850
|
+
- **Smoke-test reliability**: `query_gemini.sh` (`agy -p "$QUERY"`), `query_kimi.sh` (`stream-json` + `_kimi_extract_content`), `query_kilo.sh` (de-fence). Shared `_is_consultant_response_file` metadata filter in `common.sh`, applied across `voting.sh`/`synthesize.sh`/`peer_review.sh`/`reflection.sh`. `orchestration.sh` stalled→stable relabel (set -e-safe) + debate-round promote validation.
|
|
851
|
+
- **Persona fix**: `_AGENT_DEFAULT_PERSONAS` mapped `GLM|17`/`DEEPSEEK|7` (each got the other's persona) → `GLM|7`/`DEEPSEEK|17`.
|
|
852
|
+
- **Dev/reliability**: reliability tracking + Amp/Claude default-on; offline e2e test; `scripts/release.sh` version-bump automation; calibration fixes (diagnosable peer-review failures + cost-only path); `test_user_config.sh` XDG test made hermetic (unset the exported `_AI_CONSULTANTS_XDG_*` intermediates). `npm test` = 18 suites. Hardened by a `/code-review max` pass.
|
|
853
|
+
|
|
854
|
+
### v2.20.0
|
|
855
|
+
- **Capability axes (borrowed from the delegation-kit cost/intelligence/taste table).** `references/affinity.json` → v1.1: new `capabilities` (per-consultant {intelligence, taste, cost}, 1-10), `category_axis` (category → the quality axis it stresses: taste for API_DESIGN/ARCHITECTURE/CODE_REVIEW/GENERAL, intelligence otherwise), `capability_default`. New `lib/routing.sh::get_capability` / `get_category_axis` (cached like `get_affinity`).
|
|
856
|
+
- **Capability-weighted voting** (`ENABLE_CAPABILITY_WEIGHTING`, opt-in): `lib/voting.sh::_effective_vote_weight` modulates a vote by the consultant's capability on the run's axis — `confidence × (S + cap) / S` (`S = CAPABILITY_WEIGHT_STRENGTH`, default 10). Applied in `calculate_weighted_recommendation` and `calculate_final_score` (normalizer uses the same weight → 1-10 scale preserved). Axis from `QUESTION_CATEGORY`. `cost` never weights a vote (tie-break intelligence > taste > cost).
|
|
857
|
+
- **Capability-aware composition** (`ENABLE_CAPABILITY_ROUTING`, opt-in): `select_consultants` keeps the raw-affinity eligibility filter but ranks eligible consultants by `affinity + (cap − capability_default)`, so under a size limit the quality axis reorders who makes the cut.
|
|
858
|
+
- **Roster audit** — `scripts/roster_audit.sh` scores each consultant's "distinct approach" rate (max pairwise Jaccard of approaches < threshold) across consultations; verdicts unique-value / some-value / redundant? / insufficient-data. Wired as `doctor.sh --roster-audit` (short-circuit mode) and the `/ai-consultants:roster-audit` slash command (3 hosts). Reuses `voting.sh` keyword/Jaccard helpers.
|
|
859
|
+
- **Measured calibration** — `scripts/roster_calibrate.sh` (Tier A): intelligence/taste = mean blind peer-review score sliced by `category_axis`, cost = mean observed `tokens_used`×rate (60/40 split, rank-normalized cheapest=10); emits a `capabilities` block (`--json`/`--write`). `scripts/taste_elo.sh` (Tier B): taste via pairwise-judge Elo (pluggable judge — `JUDGE_CLI` / `TASTE_JUDGE_CMD`). `scripts/run_calibration.sh` drives `references/calibration_benchmark.json` (50 questions, 20 taste / 30 intelligence) through the panel with peer review, then calibrates.
|
|
860
|
+
- **Config** (`config.sh`): `ENABLE_CAPABILITY_WEIGHTING`, `ENABLE_CAPABILITY_ROUTING` (both false), `CAPABILITY_WEIGHT_STRENGTH` (10), `CAPABILITY_DEFAULT` (5). **Observability**: `consult_all.sh` records `capability{weighting_enabled, routing_enabled, axis}` in `optimization_metrics.json`.
|
|
861
|
+
- **Tests**: `test_capability_weighting` (17), `test_roster_audit` (6), `test_roster_calibrate` (10), `test_taste_elo` (6) — 12 suites total. All opt-in; with flags off, existing voting/routing/parity tests pass unchanged. shellcheck clean.
|
|
862
|
+
- **Docs**: `SMART_ROUTING.md` (capability + roster-audit + measured-calibration sections), `.env.example`, `references/configuration.md`, env-var table + structure list here. Website feature card added (sync on push).
|
|
863
|
+
- **Seeds are subjective** (Claude/Codex grounded on the model-routing table; the rest heuristic) — the calibration workflow measures them empirically. Fully back-compat.
|
|
864
|
+
|
|
829
865
|
### v2.19.2
|
|
830
866
|
- **Cost tracking silently lost on a fresh install — fixed.** `lib/costs.sh::track_session_cost` wrote to `$COST_TRACKING_FILE` (`$XDG_DATA_HOME/ai-consultants/costs.json`, i.e. `~/.local/share/...`) without ever creating the parent directory. That dir doesn't exist until something makes it, and `costs.json` is the only artifact stored there — so on a fresh install every session's cost write failed with "No such file or directory" (swallowed under `set -e` in the caller) and cumulative cost tracking never accumulated. Fix: `mkdir -p "$(dirname "$COST_TRACKING_FILE")"` up front; on failure, `log_warn` + `return 0`.
|
|
831
867
|
- **Function split for lock discipline**: `track_session_cost` (outer) now owns dir creation + locking and delegates the read-modify-write to a new inner `_track_session_cost_update`, which runs with the lock held and never propagates failure. Rationale documented inline: the caller in `consult_all.sh` runs under `set -e` *after* every consultant has already been queried and billed, so a bookkeeping failure must degrade to a warning, never abort the run.
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# AI Consultants v2.
|
|
1
|
+
# AI Consultants v2.21.0
|
|
2
2
|
|
|
3
3
|
> **A harness for every question.** A panel of up to 15 frontier models that writes its own playbook per question — fan out, debate to convergence, cross-examine under adversarial review, or run a tournament — and checks its work before it reaches you.
|
|
4
4
|
|
|
5
|
-
[](https://github.com/matteoscurati/ai-consultants)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
[](https://docs.anthropic.com/en/docs/claude-code/skills)
|
|
8
8
|
[](https://github.com/matteoscurati/ai-consultants)
|
|
@@ -580,6 +580,8 @@ ai-consultants doctor --json # JSON for automa
|
|
|
580
580
|
ai-consultants doctor --live # Real ping per consultant — catches installed-but-unauthenticated CLIs
|
|
581
581
|
ai-consultants doctor --suggest-config # Print recommended ENABLE_* based on detected CLIs
|
|
582
582
|
ai-consultants doctor --suggest-preset --question "..." # Recommend preset + strategy for a question
|
|
583
|
+
ai-consultants update-clis # Check & update every installed consultant CLI
|
|
584
|
+
ai-consultants update-clis --dry-run # Preview: each CLI's install method + update command
|
|
583
585
|
```
|
|
584
586
|
|
|
585
587
|
> When a consultant fails mid-consultation, the run surfaces the captured reason (e.g. `CLI not found`, `401 Unauthorized`) instead of a bare "Failed", so you can tell *not installed* from *not authenticated* from *transient*.
|
|
@@ -609,6 +611,11 @@ The **shape** is chosen per question (or pinned via `ORCHESTRATION_MODE`):
|
|
|
609
611
|
|
|
610
612
|
Set `ORCHESTRATION_MODE=fixed` for the classic fixed-round pipeline.
|
|
611
613
|
|
|
614
|
+
Consensus is measured lexically by default; set `ENABLE_STANCE_CONSENSUS=true`
|
|
615
|
+
(opt-in, v2.21) to have the panel pick from a shared set of enumerated stance
|
|
616
|
+
options and score agreement by exact match instead — see
|
|
617
|
+
[references/configuration.md](references/configuration.md#semantic-consensus-v221-opt-in).
|
|
618
|
+
|
|
612
619
|
With peer review:
|
|
613
620
|
```
|
|
614
621
|
Responses -> Anonymize -> Peer Ranking -> De-anonymize -> Peer Scores
|
package/SKILL.md
CHANGED
|
@@ -5,10 +5,10 @@ license: MIT
|
|
|
5
5
|
compatibility: Requires bash, jq, and at least 2 AI CLI tools (agy, codex, vibe, etc.). macOS and Linux.
|
|
6
6
|
metadata:
|
|
7
7
|
author: matteoscurati
|
|
8
|
-
version: 2.
|
|
8
|
+
version: 2.21.0
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
# AI Consultants v2.
|
|
11
|
+
# AI Consultants v2.21.0 - AI Expert Panel
|
|
12
12
|
|
|
13
13
|
**A harness for every question.** Convene a panel of AI "consultants" for coding questions — and let the engine pick *how* they deliberate: a quick read, a convergence loop, an adversarial refutation gate, a tournament, or an exhaustive sweep. Each consultant has a **configurable persona** that shapes its analysis.
|
|
14
14
|
|
|
@@ -42,11 +42,12 @@ Configuration (presets, strategies, features, personas, API keys) can be managed
|
|
|
42
42
|
| **Kimi** | `kimi` | The Eastern Sage | Holistic, balanced perspectives |
|
|
43
43
|
| **Claude** | `claude` | The Synthesizer | Big picture, synthesis |
|
|
44
44
|
| **Qwen** | `qwen` | The Analyst | Data-driven, metrics |
|
|
45
|
+
| **MiniMax** | `mmx` | The Pragmatic Optimizer | Performance, efficiency, pragmatism |
|
|
45
46
|
| **Ollama** | `ollama` | The Local Expert | Privacy-first, zero cost |
|
|
46
47
|
|
|
47
|
-
**API-only consultants**: GLM (The Methodologist), Grok (The Provocateur), DeepSeek (The Code Specialist)
|
|
48
|
+
**API-only consultants**: GLM (The Methodologist), Grok (The Provocateur), DeepSeek (The Code Specialist)
|
|
48
49
|
|
|
49
|
-
**CLI/API Mode**: Gemini, Codex, Claude, Mistral, and
|
|
50
|
+
**CLI/API Mode**: Gemini, Codex, Claude, Mistral, Qwen, and MiniMax can switch between CLI and API mode via `*_USE_API` environment variables. Gemini auto-selects API mode when `GEMINI_API_KEY` is set (no `agy` install needed) and the CLI otherwise.
|
|
50
51
|
|
|
51
52
|
**Self-Exclusion**: The invoking agent is automatically excluded from the panel. When invoked from Claude Code, Claude is excluded; when invoked from Codex CLI, Codex is excluded, etc.
|
|
52
53
|
|
|
@@ -96,6 +97,7 @@ Query is classified, then sent to consultants in parallel. Responses are scored,
|
|
|
96
97
|
| **Smart Routing** | Auto-select best consultants per question type | `ENABLE_SMART_ROUTING` |
|
|
97
98
|
| **Cost Tracking** | Track API usage costs | `ENABLE_COST_TRACKING` |
|
|
98
99
|
| **Panic Mode** | Auto-add rigor when uncertainty detected | `ENABLE_PANIC_MODE` |
|
|
100
|
+
| **Stance Consensus** | Panel picks from enumerated stances; agreement by exact match (opt-in, v2.21) | `ENABLE_STANCE_CONSENSUS` |
|
|
99
101
|
|
|
100
102
|
## Configuration
|
|
101
103
|
|
|
@@ -136,6 +138,10 @@ Diagnose and fix issues:
|
|
|
136
138
|
./scripts/doctor.sh --live # Real ping per consultant — catches installed-but-unauthenticated CLIs
|
|
137
139
|
```
|
|
138
140
|
|
|
141
|
+
Keep the consultant CLIs current with `ai-consultants update-clis` (`--dry-run` to
|
|
142
|
+
preview, `--only <cli>` to target one) — it detects how each CLI was installed
|
|
143
|
+
(brew/npm/uv/pipx/curl/self-update) and updates it.
|
|
144
|
+
|
|
139
145
|
When a consultant fails during a consultation, the run prints the captured reason (e.g. "CLI not found", "401 Unauthorized"). The run is also **graded** MET/DEGRADED/FAILED by how many responded (`QUORUM_MIN`), with a "Diagnosed Failures" section in the report. Set `ENABLE_HEALTH_GATE=true` to ping consultants and drop the dead ones *before* the run.
|
|
140
146
|
|
|
141
147
|
## Interpreting Results
|
package/bin/ai-consultants
CHANGED
|
@@ -55,6 +55,7 @@ Usage:
|
|
|
55
55
|
ai-consultants --preset <name> "question" Use a configuration preset
|
|
56
56
|
ai-consultants --strategy <name> "question" Use a synthesis strategy
|
|
57
57
|
ai-consultants doctor [--fix] [--json] Run diagnostics
|
|
58
|
+
ai-consultants update-clis [--dry-run] Check & update installed consultant CLIs
|
|
58
59
|
ai-consultants init [--force] Scaffold ~/.config/ai-consultants/{config.sh,.env}
|
|
59
60
|
ai-consultants install Install slash commands to ~/.claude/commands/
|
|
60
61
|
ai-consultants version Show version
|
|
@@ -78,6 +79,10 @@ EOF
|
|
|
78
79
|
shift
|
|
79
80
|
exec "$SCRIPTS_DIR/doctor.sh" "$@"
|
|
80
81
|
;;
|
|
82
|
+
update-clis|update)
|
|
83
|
+
shift
|
|
84
|
+
exec "$SCRIPTS_DIR/update_clis.sh" "$@"
|
|
85
|
+
;;
|
|
81
86
|
init)
|
|
82
87
|
shift
|
|
83
88
|
FORCE=false
|
package/docs/COST_RATES.md
CHANGED
package/docs/SETUP.md
CHANGED
|
@@ -358,15 +358,19 @@ curl -L code.kimi.com/install.sh | bash
|
|
|
358
358
|
|
|
359
359
|
Verify: `kimi --version`
|
|
360
360
|
|
|
361
|
-
### MiniMax (
|
|
361
|
+
### MiniMax (CLI via mmx) - v2.21
|
|
362
362
|
|
|
363
|
-
MiniMax
|
|
363
|
+
MiniMax runs via the `mmx` CLI by default (CLI-first, OAuth). Install and sign in:
|
|
364
364
|
|
|
365
365
|
```bash
|
|
366
|
-
|
|
367
|
-
|
|
366
|
+
npm install -g mmx-cli
|
|
367
|
+
mmx auth login # OAuth (browser); or: mmx auth login --api-key <key>
|
|
368
368
|
```
|
|
369
369
|
|
|
370
|
+
API mode is opt-in: set `MINIMAX_USE_API=true` with `MINIMAX_API_KEY`.
|
|
371
|
+
|
|
372
|
+
Verify: `mmx --version`
|
|
373
|
+
|
|
370
374
|
---
|
|
371
375
|
|
|
372
376
|
## Ollama (Local Models) - v2.2
|
|
@@ -521,7 +525,7 @@ INVOKING_AGENT=codex ./scripts/consult_all.sh "Question"
|
|
|
521
525
|
|
|
522
526
|
## CLI/API Mode Switching (v2.6+)
|
|
523
527
|
|
|
524
|
-
|
|
528
|
+
Six consultants can switch between CLI mode (using local CLI tools) and API mode (direct API calls): **Gemini, Codex, Claude, Mistral, Qwen3, and MiniMax**.
|
|
525
529
|
|
|
526
530
|
### Why Use API Mode?
|
|
527
531
|
|
package/docs/SMART_ROUTING.md
CHANGED
|
@@ -46,13 +46,21 @@ customization possible without editing bash.
|
|
|
46
46
|
|
|
47
47
|
```json
|
|
48
48
|
{
|
|
49
|
-
"version": "1.
|
|
49
|
+
"version": "1.1",
|
|
50
50
|
"default_score": 5,
|
|
51
51
|
"general_score": 8,
|
|
52
|
+
"capability_default": 5,
|
|
52
53
|
"known_consultants": ["Gemini", "Codex", "..."],
|
|
53
54
|
"categories": {
|
|
54
55
|
"CODE_REVIEW": { "Gemini": 7, "Codex": 10, "..." },
|
|
55
56
|
"BUG_DEBUG": { "..." }
|
|
57
|
+
},
|
|
58
|
+
"capabilities": {
|
|
59
|
+
"Gemini": { "intelligence": 8, "taste": 8, "cost": 6 },
|
|
60
|
+
"Codex": { "intelligence": 8, "taste": 5, "cost": 4 }
|
|
61
|
+
},
|
|
62
|
+
"category_axis": {
|
|
63
|
+
"API_DESIGN": "taste", "CODE_REVIEW": "taste", "ALGORITHM": "intelligence"
|
|
56
64
|
}
|
|
57
65
|
}
|
|
58
66
|
```
|
|
@@ -119,6 +127,112 @@ COMPLEXITY_THRESHOLD_MEDIUM=6 # Score 4-6 = use standard models
|
|
|
119
127
|
|
|
120
128
|
See [COST_RATES.md](COST_RATES.md) for model pricing by tier.
|
|
121
129
|
|
|
130
|
+
## Capability-Aware Routing & Voting (v2.20+)
|
|
131
|
+
|
|
132
|
+
Beyond category *fit* (the affinity matrix), v1.1 of `affinity.json` adds a
|
|
133
|
+
per-consultant **capability** score on three axes (1-10): `intelligence`,
|
|
134
|
+
`taste`, and `cost`. A `category_axis` map names the quality axis each category
|
|
135
|
+
stresses — **taste** for design-shaped work (API_DESIGN, ARCHITECTURE,
|
|
136
|
+
CODE_REVIEW, GENERAL), **intelligence** otherwise.
|
|
137
|
+
|
|
138
|
+
Two opt-in features consume this:
|
|
139
|
+
|
|
140
|
+
- **`ENABLE_CAPABILITY_WEIGHTING`** — a consultant's vote weight becomes
|
|
141
|
+
`confidence × (S + capability) / S` (`S = CAPABILITY_WEIGHT_STRENGTH`, default
|
|
142
|
+
10), so on a taste-shaped question a high-taste model's opinion counts for more.
|
|
143
|
+
- **`ENABLE_CAPABILITY_ROUTING`** — panel *eligibility* still uses raw affinity,
|
|
144
|
+
but the *sort rank* becomes `affinity + (capability − CAPABILITY_DEFAULT)`, so
|
|
145
|
+
under a size limit the quality axis reorders which eligible consultants make
|
|
146
|
+
the cut.
|
|
147
|
+
|
|
148
|
+
`cost` is an efficiency axis for budget-aware composition only — **never** a
|
|
149
|
+
vote weight (tie-break order: intelligence > taste > cost). Scores are
|
|
150
|
+
subjective, point-in-time seeds — re-derive them for your own panel. Helpers:
|
|
151
|
+
`get_capability <consultant> <axis>` and `get_category_axis <category>` in
|
|
152
|
+
`lib/routing.sh`.
|
|
153
|
+
|
|
154
|
+
## Roster Audit — Uncorrelated Value (v2.20+)
|
|
155
|
+
|
|
156
|
+
Adding a consultant only helps if it says something the others don't. The
|
|
157
|
+
`scripts/roster_audit.sh` tool measures this across past consultations: a
|
|
158
|
+
consultant's approach is *distinct* in a round when its keyword set has low
|
|
159
|
+
Jaccard overlap (`< --threshold`, default 20%) with **every** other consultant
|
|
160
|
+
that round. A consultant that is rarely distinct is correlated with the panel —
|
|
161
|
+
a candidate to drop or down-weight; one that is often distinct earns its seat on
|
|
162
|
+
diversity.
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# audit specific consultation output dirs
|
|
166
|
+
./scripts/roster_audit.sh /path/to/consultation_dir ...
|
|
167
|
+
|
|
168
|
+
# or the N most recent under the consultations base
|
|
169
|
+
./scripts/roster_audit.sh --recent 30
|
|
170
|
+
|
|
171
|
+
# machine-readable
|
|
172
|
+
./scripts/roster_audit.sh --json --recent 30
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Read-only; reuses the `voting.sh` keyword/Jaccard machinery. Consultations with
|
|
176
|
+
fewer than two responders are skipped (correlation is undefined). This is the
|
|
177
|
+
model-routing "before a new model earns a row" bar (contribute >=1 thing the
|
|
178
|
+
incumbents miss) applied to the consultation panel instead of a review lane.
|
|
179
|
+
|
|
180
|
+
## Measured Calibration — Replacing the Heuristic Seeds (v2.20+)
|
|
181
|
+
|
|
182
|
+
The `capabilities` scores in `affinity.json` ship as subjective seeds. To
|
|
183
|
+
**measure** them instead of guessing, three tools derive each axis from data the
|
|
184
|
+
tool already produces — sliced by the same `category_axis` that consumes them:
|
|
185
|
+
|
|
186
|
+
| Tool | Derives | From |
|
|
187
|
+
|---|---|---|
|
|
188
|
+
| `scripts/roster_calibrate.sh` | intelligence, taste, cost (**Tier A**) | blind peer-review scores (sliced by axis) + observed `tokens_used` × catalog rate |
|
|
189
|
+
| `scripts/taste_elo.sh` | taste (**Tier B**) | pairwise LLM-as-judge Elo over taste-axis answers (removes peer self-bias) |
|
|
190
|
+
| `references/calibration_benchmark.json` | the question set | 50 questions, 5 per category, balanced across the two axes |
|
|
191
|
+
| `scripts/run_calibration.sh` | the data | runs the benchmark through the panel with `ENABLE_PEER_REVIEW=true`, then calibrates |
|
|
192
|
+
|
|
193
|
+
### Workflow
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
# 1. Collect data: run the benchmark through the full panel (real calls — costs money).
|
|
197
|
+
./scripts/run_calibration.sh --limit 10 --dry-run # preview
|
|
198
|
+
./scripts/run_calibration.sh # full 50-question run
|
|
199
|
+
|
|
200
|
+
# 2. Tier A: measured intelligence/taste/cost -> capabilities block
|
|
201
|
+
./scripts/roster_calibrate.sh --recent 50 # print measured block
|
|
202
|
+
./scripts/roster_calibrate.sh --recent 50 --write # merge into affinity.json (keeps unmeasured cells)
|
|
203
|
+
|
|
204
|
+
# 3. Tier B (optional): refine taste via pairwise-judge Elo
|
|
205
|
+
./scripts/taste_elo.sh --recent 50 --write
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Both `roster_calibrate.sh` and `taste_elo.sh` also accept explicit consultation
|
|
209
|
+
dirs and `--json`, and back up `affinity.json` to `.bak` before `--write`.
|
|
210
|
+
|
|
211
|
+
### How each axis is measured
|
|
212
|
+
|
|
213
|
+
- **cost** — mean *observed* `$/response` (`tokens_used` × catalog rate, 60/40
|
|
214
|
+
input/output split), rank-normalized so the cheapest = 10. This is cost per
|
|
215
|
+
*task* (verbosity + completion), not per-token sticker price — a terse pricey
|
|
216
|
+
model can still rank cheap.
|
|
217
|
+
- **intelligence / taste** — mean **blind peer-review** `quality_score` (already
|
|
218
|
+
1-10), sliced by `category_axis`: intelligence = performance on
|
|
219
|
+
intelligence-axis categories, taste = on taste-axis categories.
|
|
220
|
+
- **taste (Tier B)** — taste has no ground truth, so `taste_elo.sh` measures it
|
|
221
|
+
*relative to a chosen judge*. Each pair of answers on a taste-axis question is
|
|
222
|
+
shown to the judge, which picks the better one on design taste only; wins feed
|
|
223
|
+
an Elo ranking. The judge is pluggable:
|
|
224
|
+
- `JUDGE_CLI` — CLI for the built-in judge (default `claude`).
|
|
225
|
+
- `TASTE_JUDGE_CMD` — external judge `cmd <ctx> <A.json> <B.json>` printing
|
|
226
|
+
`A`/`B` (used by tests and custom judges).
|
|
227
|
+
|
|
228
|
+
### Companion: which consultants earn a seat
|
|
229
|
+
|
|
230
|
+
`roster_audit.sh` (above) answers *who to keep*; calibration answers *how much
|
|
231
|
+
each is worth per axis*. Together they make the roster data-driven: audit to
|
|
232
|
+
prune redundant consultants, calibrate to score the survivors, then enable
|
|
233
|
+
`ENABLE_CAPABILITY_WEIGHTING` / `ENABLE_CAPABILITY_ROUTING` to act on the
|
|
234
|
+
measured scores.
|
|
235
|
+
|
|
122
236
|
## Timeout per Category
|
|
123
237
|
|
|
124
238
|
Timeouts optimized based on category complexity:
|
package/docs/cost_rates.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.
|
|
2
|
+
"version": "2.21.0",
|
|
3
3
|
"updated": "2026-06-24",
|
|
4
4
|
"models": {
|
|
5
5
|
"_comment_units": "All rates are USD per 1,000 tokens (per-1K). lib/costs.sh computes cost as (token_count / 1000) * rate, so every value here MUST be a per-1K rate = (provider $/1M price) / 1000. Do NOT paste $/MTok figures directly.",
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Release v2.20.0
|
|
2
|
+
|
|
3
|
+
**Date:** 2026-07-12
|
|
4
|
+
**Type:** Minor — capability-aware deliberation + measured roster calibration
|
|
5
|
+
**Previous:** v2.19.2
|
|
6
|
+
|
|
7
|
+
## Highlights
|
|
8
|
+
|
|
9
|
+
- **Capability-aware voting & composition** — weight votes and rank the panel by each model's capability on the quality axis a question stresses (intelligence or taste). Opt-in.
|
|
10
|
+
- **Roster audit** — see which consultants add distinct value vs merely echo the panel.
|
|
11
|
+
- **Measured calibration** — derive the capability scores from data (blind peer review + observed cost + pairwise-judge Elo) instead of heuristics.
|
|
12
|
+
- Everything new is opt-in and additive: with the flags off, behavior is identical to v2.19.2.
|
|
13
|
+
|
|
14
|
+
## What's New
|
|
15
|
+
|
|
16
|
+
### Capability axes (`affinity.json` v1.1)
|
|
17
|
+
|
|
18
|
+
Beyond category *fit* (the affinity matrix), each consultant now has a `capabilities` score on three axes (1-10) and a `category_axis` map names the quality axis each category stresses — **taste** for API_DESIGN / ARCHITECTURE / CODE_REVIEW / GENERAL, **intelligence** otherwise.
|
|
19
|
+
|
|
20
|
+
| Flag (default off) | Effect |
|
|
21
|
+
|---|---|
|
|
22
|
+
| `ENABLE_CAPABILITY_WEIGHTING` | A consultant's vote weight becomes `confidence × (S + capability) / S` on the run's axis (`S = CAPABILITY_WEIGHT_STRENGTH`, default 10). |
|
|
23
|
+
| `ENABLE_CAPABILITY_ROUTING` | Panel *eligibility* still uses raw affinity, but eligible consultants are ranked by `affinity + capability`, so under a size limit the quality axis reorders who makes the cut. |
|
|
24
|
+
|
|
25
|
+
`cost` is a composition/budget axis only — never a vote weight (tie-break order: intelligence > taste > cost).
|
|
26
|
+
|
|
27
|
+
### Roster audit — uncorrelated value
|
|
28
|
+
|
|
29
|
+
`scripts/roster_audit.sh` scores each consultant's *distinctiveness* across past consultations: an approach with low keyword overlap versus every other consultant that round is "distinct". A consultant rarely distinct is correlated with the panel (candidate to drop or down-weight); one often distinct earns its seat. Also available as `doctor.sh --roster-audit` and the `/ai-consultants:roster-audit` slash command. Read-only.
|
|
30
|
+
|
|
31
|
+
### Measured calibration (Tier A + Tier B)
|
|
32
|
+
|
|
33
|
+
Replace the heuristic capability seeds with measurements, each derived from a signal the tool already records and sliced by the same `category_axis`:
|
|
34
|
+
|
|
35
|
+
- **`scripts/roster_calibrate.sh` (Tier A)** — intelligence/taste = mean **blind peer-review** score on that axis's categories; cost = mean **observed** `tokens_used` × catalog rate (60/40 split, rank-normalized, cheapest = 10 → cost per *task*, not per token).
|
|
36
|
+
- **`scripts/taste_elo.sh` (Tier B)** — taste via **pairwise LLM-as-judge Elo** on taste-axis answers (removes the peer panel's self-bias). Judge is pluggable: `JUDGE_CLI` (default `claude`) or `TASTE_JUDGE_CMD`.
|
|
37
|
+
- **`scripts/run_calibration.sh` + `references/calibration_benchmark.json`** — 50 questions (20 taste / 30 intelligence) run through the panel with `ENABLE_PEER_REVIEW=true`, then calibrated.
|
|
38
|
+
|
|
39
|
+
Both calibrators accept `--json` and `--write` (merge measured scores into `affinity.json`, backing it up first).
|
|
40
|
+
|
|
41
|
+
## Breaking Changes
|
|
42
|
+
|
|
43
|
+
None. All features are opt-in; with the flags off, behavior is identical to v2.19.2. The shipped `capabilities` scores are subjective seeds (Claude/Codex grounded on the model-routing table, the rest heuristic) until you run the calibration workflow.
|
|
44
|
+
|
|
45
|
+
## Upgrade Guide
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
cd ~/.claude/skills/ai-consultants && git pull # or: npx ai-consultants@latest install
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Optional — measure capability scores for your own panel:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
./scripts/run_calibration.sh # collect data (real calls; --limit to sample)
|
|
55
|
+
./scripts/roster_calibrate.sh --write # Tier A: intelligence/taste/cost -> affinity.json
|
|
56
|
+
./scripts/taste_elo.sh --write # Tier B: refine taste (optional)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Commits
|
|
60
|
+
|
|
61
|
+
- `_______` feat: capability-aware voting/routing + roster audit + measured calibration (v2.20.0)
|
|
62
|
+
|
|
63
|
+
## Contributors
|
|
64
|
+
|
|
65
|
+
- @matteoscurati
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Release v2.21.0
|
|
2
|
+
|
|
3
|
+
**Date:** 2026-07-14
|
|
4
|
+
**Type:** Minor — CLI-first transport, MiniMax on the mmx CLI, `update-clis`, and opt-in stance consensus
|
|
5
|
+
**Previous:** v2.20.0
|
|
6
|
+
|
|
7
|
+
## Highlights
|
|
8
|
+
|
|
9
|
+
- **CLI-first is now the rule.** Any consultant that ships a CLI uses it by default; API mode is opt-in — only for CLI-less models or an explicit `*_USE_API=true`. Amp and Claude are on by default.
|
|
10
|
+
- **MiniMax runs on the `mmx` CLI** (it was API-only). Existing API-only setups keep working: `MINIMAX_USE_API` auto-resolves to API mode only when `MINIMAX_API_KEY` is set.
|
|
11
|
+
- **`ai-consultants update-clis`** keeps every consultant CLI current, detecting how each was installed.
|
|
12
|
+
- **Stance-based semantic consensus** (opt-in): the panel picks from a shared set of enumerated stance options, so agreement is scored by exact match instead of lexical similarity.
|
|
13
|
+
- A batch of smoke-test-surfaced reliability fixes across the Gemini/Kimi/Kilo adapters and the voting/synthesis pipeline, plus a runtime persona fix. Hardened by a multi-agent `/code-review max` pass.
|
|
14
|
+
|
|
15
|
+
## What's New
|
|
16
|
+
|
|
17
|
+
### CLI-first transport
|
|
18
|
+
|
|
19
|
+
Every `*_USE_API` flag now defaults to `false`. A consultant with a CLI always uses it; API mode is reserved for models without a CLI or an explicit opt-in. `ENABLE_AMP` and `ENABLE_CLAUDE` default on.
|
|
20
|
+
|
|
21
|
+
### MiniMax via the `mmx` CLI
|
|
22
|
+
|
|
23
|
+
`query_minimax.sh` runs `mmx text chat --non-interactive --quiet --no-color --output text …` by default. `MINIMAX_CMD` (default `mmx`) sets the binary. To preserve pre-2.21 behavior, `MINIMAX_USE_API` auto-resolves:
|
|
24
|
+
|
|
25
|
+
- `MINIMAX_API_KEY` set → API mode (the only transport before 2.21 — nothing breaks on upgrade).
|
|
26
|
+
- otherwise → the `mmx` CLI.
|
|
27
|
+
|
|
28
|
+
An explicit `MINIMAX_USE_API=true|false` always wins. `doctor` validates the CLI in CLI mode and the key in API mode.
|
|
29
|
+
|
|
30
|
+
### `update-clis`
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
ai-consultants update-clis # update every installed consultant CLI
|
|
34
|
+
ai-consultants update-clis --dry-run # show each CLI's install method + the exact update command
|
|
35
|
+
ai-consultants update-clis --only mmx # limit to one CLI (by consultant name or binary)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
For each CLI-backed consultant it detects the install method — brew formula/cask, npm, uv, pipx, pip, a self-updating binary, or a curl installer — and updates it via the matching command, best-effort.
|
|
39
|
+
|
|
40
|
+
### Stance-based semantic consensus (opt-in)
|
|
41
|
+
|
|
42
|
+
| Flag (default) | Effect |
|
|
43
|
+
|---|---|
|
|
44
|
+
| `ENABLE_STANCE_CONSENSUS` (false) | One LLM call enumerates 2–`STANCE_MAX_OPTIONS` mutually-exclusive stance options for the question; each consultant picks one verbatim; consensus = the plurality stance's share of the **panel**. |
|
|
45
|
+
| `STANCE_MAX_OPTIONS` (5) | Cap on the generated option set. |
|
|
46
|
+
| `STANCE_TIMEOUT` (60) | Seconds for the stance-generation call (guards a blocking/unauthenticated synthesizer at startup). |
|
|
47
|
+
|
|
48
|
+
The lexical cluster (Jaccard over the free-text `approach`) can't tell that "Commit the lockfile" and "Always keep package-lock in git" agree; the stance signal makes agreement exact-matchable. Every path degrades to the lexical cluster if fewer than two stances are emitted or generation fails, so it is always safe to enable. The generated options are written to `stance_options.json` in the output dir.
|
|
49
|
+
|
|
50
|
+
### Reliability fixes
|
|
51
|
+
|
|
52
|
+
- **CLI adapters** (from a full-panel smoke test): Gemini (`agy -p "$QUERY"`, not the broken `-p -`), Kimi (`--output-format stream-json` + a hardened extractor), and Kilo (strip the ```json fence) return structured responses instead of the unstructured fallback.
|
|
53
|
+
- **Metadata pollution**: a shared `_is_consultant_response_file` filter keeps pipeline files (`voting.json`, `orchestration.json`, `stance_options.json`, …) out of every voting/synthesis/peer-review glob, so they can't become phantom votes, reviewees, or synthesis inputs. Consensus is the largest agreeing cluster (single-linkage over Jaccard).
|
|
54
|
+
- **Orchestration**: a lexical "stalled" is relabeled "stable" when the panel's own per-round signal says positions stopped moving (now `set -e`-safe against a malformed round summary); a debate round's refined stance is validated before it is grafted.
|
|
55
|
+
- **Personas**: GLM and DeepSeek were transposed at runtime — each consultant ran under the other's persona name and prompt. Fixed.
|
|
56
|
+
|
|
57
|
+
### Under the hood
|
|
58
|
+
|
|
59
|
+
Reliability tracking with Amp/Claude default-on; an offline end-to-end integration test; `scripts/release.sh` version-bump automation; calibration fixes (diagnosable peer-review failures + a cost-only path). `npm test` now runs 18 suites.
|
|
60
|
+
|
|
61
|
+
## Upgrade notes
|
|
62
|
+
|
|
63
|
+
- **Fully back-compat.** With the new flags off, behavior matches v2.20.0.
|
|
64
|
+
- **MiniMax users**: if you ran MiniMax via `MINIMAX_API_KEY`, nothing changes — it stays on the API. To switch to the CLI, `npm install -g mmx-cli` and `mmx auth login`, then unset the key (or set `MINIMAX_USE_API=false`).
|
|
65
|
+
- **New opt-in flags**: `ENABLE_STANCE_CONSENSUS`, `STANCE_MAX_OPTIONS`, `STANCE_TIMEOUT`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-consultants",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.21.0",
|
|
4
4
|
"description": "A harness for every question - a panel of up to 15 AI models that picks its own deliberation strategy per question (convergence, adversarial verification, tournament) and checks its work before answering",
|
|
5
5
|
"bin": {
|
|
6
6
|
"ai-consultants": "bin/ai-consultants"
|