Structured multi-perspective deliberation for hard decisions. Run full councils, focused triads, or duo debates across Claude Code, Codex, Gemini CLI, and OpenCode.
Shell agent-skillai-agentsclaude-codecodexdecision-makingdeliberationgemini-clillm-routingmulti-agent-systemsmulti-llmopen-sourceopencodeprompt-engineeringstructured-debate
chore: pre-wipe backup 2026-06-21
0xNyk3c5d8f393116
diff --git a/.DS_Store b/.DS_Storenew file mode 100644index 0000000..c328838Binary files /dev/null and b/.DS_Store differdiff --git a/.gstack/browse-startup-error.log b/.gstack/browse-startup-error.lognew file mode 100644index 0000000..da598dd--- /dev/null+++ b/.gstack/browse-startup-error.log@@ -0,0 +1,21 @@+2026-05-22T17:23:15.350Z launch: Executable doesn't exist at /Users/nyk/Library/Caches/ms-playwright/chromium_headless_shell-1208/chrome-headless-shell-mac-arm64/chrome-headless-shell+╔═════════════════════════════════════════════════════════════════════════╗+║ Looks like Playwright Test or Playwright was just installed or updated. ║+║ Please run the following command to download new browsers: ║+║ ║+║ npx playwright install ║+║ ║+║ <3 Playwright Team ║+╚═════════════════════════════════════════════════════════════════════════╝+launch: Executable doesn't exist at /Users/nyk/Library/Caches/ms-playwright/chromium_headless_shell-1208/chrome-headless-shell-mac-arm64/chrome-headless-shell+╔═════════════════════════════════════════════════════════════════════════╗+║ Looks like Playwright Test or Playwright was just installed or updated. ║+║ Please run the following command to download new browsers: ║+║ ║+║ npx playwright install ║+║ ║+║ <3 Playwright Team ║+╚═════════════════════════════════════════════════════════════════════════╝+ at launch (/Users/nyk/.claude/skills/gstack/browse/src/browser-manager.ts:183:35)+ at start (/Users/nyk/.claude/skills/gstack/browse/src/server.ts:1353:28)+ at processTicksAndRejections (native:7:39)diff --git a/CHANGELOG.md b/CHANGELOG.mdindex d25f55b..8418f98 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -6,6 +6,9 @@ This project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).## [Unreleased]+### Added+- Cursor CLI provider support (`cursor_cli` archetype) — sixth dispatch path alongside subagent / codex_exec / gemini_cli / ollama_run / openai_compatible_api. Auto-detected via the `cursor-agent` binary; members run headless and read-only (`cursor-agent -p --mode ask --model <id>`). Cursor is a model aggregator (GPT-5.x / Claude / Gemini / Grok through one CLI), so routing treats it as a single provider for spread and steers diversity seats to cross-family models to avoid duplicating Anthropic bias. New `configs/provider-model-slots.cursor.example.yaml`, `cursor_cli` tiers in `configs/auto-route-defaults.yaml`, and `cursor_cli` as a valid `--chairman` tag.+## [1.1.0] - 2026-05-21### Addeddiff --git a/README.md b/README.mdindex b02d9fd..1651518 100644--- a/README.md+++ b/README.md@@ -209,9 +209,12 @@ The council automatically detects installed LLM providers and distributes member| Google | `gemini` | `gemini -p` || Ollama (local) | `ollama` | `ollama run` || NVIDIA NIM | `NVIDIA_API_KEY` env | `openai_compatible_api` |+| Cursor | `cursor-agent` | `cursor-agent -p` |NVIDIA NIM ([build.nvidia.com](https://build.nvidia.com)) exposes 130+ open-weight models (DeepSeek, Kimi, MiniMax, GLM, Qwen, Nemotron) via an OpenAI-compatible endpoint. Free tier: 1,000 credits, 40 RPM. Detection requires only `export NVIDIA_API_KEY=nvapi-...` — no CLI binary needed. See `configs/provider-model-slots.nim.example.yaml` for a sample seat allocation.+Cursor CLI ([cursor.com/cli](https://cursor.com/cli)) is a model **aggregator** — one binary (`cursor-agent`) serves GPT-5.x, Claude, Gemini, and Grok families through a single `CURSOR_API_KEY` (or `cursor-agent login`). Members route via headless read-only mode (`cursor-agent -p --mode ask --model <id>`). Install with `curl https://cursor.com/install -fsS | bash`. Because Cursor can serve `claude-*` models, pick **cross-family** Cursor models (e.g. `gpt-5.4-high`, `gemini-2.5-pro`, `grok-4`) when a seat needs to add diversity rather than duplicate Anthropic bias. List live IDs with `cursor-agent --list-models`. See `configs/provider-model-slots.cursor.example.yaml` for a sample seat allocation.+**How routing works:**1. Polarity pairs are separated across providers (hard constraint)2. Members spread evenly across available providers@@ -282,6 +285,7 @@ Restart your target client(s) after installing. Run `./scripts/council-simulatio- [Codex CLI](https://github.com/openai/codex) (OpenAI) — `npm i -g @openai/codex`- [Gemini CLI](https://github.com/google-gemini/gemini-cli) (Google) — see [gemini-cli repo](https://github.com/google-gemini/gemini-cli)- [Ollama](https://ollama.com) (local models) — install from ollama.com+- [Cursor CLI](https://cursor.com/cli) (GPT/Claude/Gemini/Grok aggregator) — `curl https://cursor.com/install -fsS | bash`## Contributingdiff --git a/SKILL.codex.md b/SKILL.codex.mdindex a0bf6a9..cd29f8c 100644--- a/SKILL.codex.md+++ b/SKILL.codex.md@@ -136,16 +136,24 @@ Wait with `spawn_timeout_ms`. If a seat fails or times out:If live seats drop below `hard_min_live_seats`, switch to fully simulated mode for all seats and state this explicitly.-### Step 3.5: OpenAI-Compatible Seats (NIM and future)+### Step 3.5: External Seats (HTTP and CLI archetypes)-For seats whose provider archetype is `openai_compatible_api` (NVIDIA NIM today; Together / Fireworks / vLLM in the future), dispatch via HTTP rather than the host runtime's `spawn_agent`:+Some provider archetypes are dispatched outside the host runtime's `spawn_agent`. Anonymization (Step 4) and Chairman selection (Step 5) apply equally to these seats — no special-case logic.++**`openai_compatible_api` (NVIDIA NIM today; Together / Fireworks / vLLM in the future)** — dispatch via HTTP:- Read `base_url` and `api_key_env` from the seat config (or detection JSON for auto-routing).- Resolve the API key from the env var at routing time. Never inline.- POST to `{base_url}/chat/completions` with an OpenAI-compatible payload (system+user messages, `temperature: 0.7`, `max_tokens: 1200`).- Extract `.choices[0].message.content`. If empty or non-2xx, mark the seat `degraded` and apply the standard fallback (anthropic per the agent's `model` frontmatter).- Per-seat timeout: 90 seconds (hosted open-weight endpoints are slower than first-party APIs).-- The Round 2 anonymization protocol (Step 4) and Chairman selection (Step 5) apply equally to NIM seats — no special-case logic.++**`cursor_cli` (Cursor)** — dispatch via subprocess. Cursor is a model aggregator: one binary (`cursor-agent`) serves GPT-5.x, Claude, Gemini, and Grok families.++- Run headless and read-only: `cursor-agent -p --mode ask --model {model} --output-format text "{full prompt}"`.+- Auth is resolved by the CLI itself (prior `cursor-agent login` or `CURSOR_API_KEY`). Never inline a key. On auth error, mark the seat `degraded` and apply the standard fallback.+- Empty stdout or non-zero exit → `degraded` + fallback. Per-seat timeout: 90 seconds.+- Counts as a single provider for spread. Because Cursor can serve `claude-*` models, prefer cross-family models (`gpt-*`, `gemini-*`, `grok-*`) for any seat opposite a native `anthropic` seat in a polarity pair. Verify live IDs with `cursor-agent --list-models`.### Step 4: Deliberation Rounds@@ -189,7 +197,7 @@ Round execution reliability policy:Synthesis is performed by an explicit **Chairman** — a model that did NOT deliberate in Rounds 1–3. The Chairman is selected before Round 1 using this algorithm (first match wins):-1. **Explicit override**: `--chairman <name>` was passed (provider tag or model alias).+1. **Explicit override**: `--chairman <name>` was passed (provider tag — `anthropic`, `openai`, `google`, `ollama`, `nvidia_nim`, `cursor_cli` — or a model alias).2. **Auto-select**: highest-tier model among available providers, **preferring one not on the panel** when possible. Tie-breaker: provider listed first by the host runtime.3. **Single-provider fallback**: use that provider's highest tier and note the overlap in the verdict.diff --git a/SKILL.md b/SKILL.mdindex 82e7276..6d1baf6 100644--- a/SKILL.md+++ b/SKILL.md@@ -194,7 +194,7 @@ Follow these steps in order. Do NOT skip steps or merge rounds.**Auto-routing algorithm** (apply in order):1. **Polarity pair separation** (hard constraint): For any polarity pair where both members are on the panel, assign them to different providers. Check the `council.polarity_pairs` field in each member's frontmatter.-2. **Provider spread** (hard constraint): Distribute members across available providers as evenly as possible. With N providers and M members, each provider gets floor(M/N) or ceil(M/N) members. NIM (`nvidia_nim`) is treated as a single "provider" for spread purposes even though it serves multiple model families — the within-NIM diversity is captured by `models[]`.+2. **Provider spread** (hard constraint): Distribute members across available providers as evenly as possible. With N providers and M members, each provider gets floor(M/N) or ceil(M/N) members. Aggregators — NIM (`nvidia_nim`) and Cursor (`cursor_cli`) — are each treated as a single "provider" for spread purposes even though they serve multiple model families; the within-aggregator diversity is captured by `models[]`. Because Cursor can serve `claude-*` models, do not place a Cursor seat using a `claude-*` model opposite a native `anthropic` seat in a polarity pair (rule 1) — pick a cross-family Cursor model (`gpt-*`, `gemini-*`, `grok-*`) for that seat instead.3. **Provider affinity** (soft tiebreaker): Use the `council.provider_affinity` field in each member's frontmatter. When choosing which provider to assign a member to, prefer providers listed earlier in their affinity array. Members whose affinity does not list `nvidia_nim` should be assigned NIM only when no other provider has capacity.4. **Tier matching** (soft): Members with `model: opus` in frontmatter get high-tier models per `configs/auto-route-defaults.yaml` `provider_models.<provider>.high`. Members with `model: sonnet` get `.mid`. For NIM, `high` is the largest available reasoning model (default `deepseek-ai/deepseek-v4-pro`); `mid` is a smaller/faster variant.5. **OpenAI-compatible seat hydration**: For every seat assigned to a provider with `exec_method: openai_compatible_api`, the coordinator reads `base_url` and `api_key_env` from the detection JSON entry (NIM defaults to `https://integrate.api.nvidia.com/v1` and `NVIDIA_API_KEY`). The resolved API key is held in coordinator state only — never written to logs or transcripts.@@ -232,7 +232,7 @@ The Chairman is the synthesizer — a named, audited role distinct from the deli**Selection algorithm** (apply in order — first match wins):-1. **Explicit override**: If `--chairman <name>` was passed, use it. `<name>` can be a provider tag (`anthropic`, `openai`, `google`, `ollama`, `nvidia_nim`) or a model alias (`opus`, `sonnet`, `gpt-5.4`, `gemini-2.5-pro`).+1. **Explicit override**: If `--chairman <name>` was passed, use it. `<name>` can be a provider tag (`anthropic`, `openai`, `google`, `ollama`, `nvidia_nim`, `cursor_cli`) or a model alias (`opus`, `sonnet`, `gpt-5.4`, `gemini-2.5-pro`).2. **Config override**: If `configs/auto-route-defaults.yaml` has a non-null `chairman:` block, use it.3. **Auto-select** (default): Pick the highest-tier model among detected providers, **preferring a provider not already on the panel** when possible. Tie-breaker: provider listed first in the detected-providers JSON.4. **Single-provider fallback**: If only one provider is detected (Claude-only), use that provider's highest tier (`opus` by default). Note in the verdict that the Chairman shares a provider with one or more panel members.@@ -246,6 +246,7 @@ The Chairman is the synthesizer — a named, audited role distinct from the deli| google | `gemini-2.5-pro` || ollama | first available local model || nvidia_nim | `deepseek-ai/deepseek-v4-pro` |+| cursor_cli | `gpt-5.4-high` |**Constraints:**- Chairman is NOT a deliberating member in the same session (hard constraint — a panel member's prior outputs are exactly what the Chairman is auditing).@@ -292,6 +293,18 @@ ollama run {model} "{full prompt}" 2>/dev/null```3. Capture stdout. Timeout: 120 seconds (local models are slower).+**For `cursor_cli` (Cursor)** — run via Bash tool:+1. Read and extract identity sections (same as codex_exec above).+2. Authentication is resolved by the Cursor CLI itself (prior `cursor-agent login` or `CURSOR_API_KEY` env var) — never inline a key. If the call returns an auth error, apply the Fallback rule.+3. Run in headless print mode, read-only (`--mode ask` keeps the member from touching the filesystem — council members only reason):+```bash+cursor-agent -p --mode ask --model {model} --output-format text "{full prompt}" 2>/dev/null+```+4. Capture stdout as the member's output. Timeout: 90 seconds.+5. If stdout is empty or the command exits non-zero, treat as a failed call and apply the Fallback rule.++Cursor is a model **aggregator** — one binary (`cursor-agent`) serves GPT-5.x, Claude, Gemini, and Grok families. For provider-spread purposes it counts as a single provider, but a seat routed to Cursor's `claude-*` model shares Anthropic's training bias with native `anthropic` seats. Prefer cross-family Cursor models (e.g. `gpt-5.4-high`, `gemini-2.5-pro`, `grok-4`) when Cursor is filling a diversity seat. Verify live model IDs with `cursor-agent --list-models`.+**For `openai_compatible_api` (NVIDIA NIM, Together, Fireworks, vLLM, any OpenAI-compatible endpoint)** — run via Bash tool:1. Read and extract identity sections (same as codex_exec above).2. Resolve credentials at runtime: read `api_key_env` from the seat config and look up the value from the environment. If the env var is unset or empty, fall back to anthropic per the Fallback rule below — do NOT inline a placeholder.@@ -433,7 +446,7 @@ No new arguments — only crystallization of your stance.### STEP 7: Synthesize Verdict (CHAIRMAN)-Synthesis is performed by the **Chairman selected in STEP 1.7**, not by the coordinator. Dispatch the synthesis as a single call (subagent / codex_exec / gemini_cli / ollama_run / openai-compatible — whichever matches the Chairman's provider) using the prompt template below.+Synthesis is performed by the **Chairman selected in STEP 1.7**, not by the coordinator. Dispatch the synthesis as a single call (subagent / codex_exec / gemini_cli / ollama_run / cursor_cli / openai-compatible — whichever matches the Chairman's provider) using the prompt template below.**Chairman prompt template:**```diff --git a/configs/auto-route-defaults.yaml b/configs/auto-route-defaults.yamlindex d6a4344..f898e26 100644--- a/configs/auto-route-defaults.yaml+++ b/configs/auto-route-defaults.yaml@@ -19,6 +19,11 @@ provider_models:nvidia_nim:high: deepseek-ai/deepseek-v4-promid: deepseek-ai/deepseek-v4-flash+ cursor_cli:+ # Aggregator — cross-family defaults so a Cursor seat adds diversity.+ # Verify live IDs with `cursor-agent --list-models`.+ high: gpt-5.4-high+ mid: gemini-2.5-pro# Chairman defaults — used by SKILL.md STEP 1.7 selection algorithm.# Per-provider tier used when the auto-select algorithm picks that provider as Chairman.@@ -28,6 +33,7 @@ chairman_defaults:google: gemini-2.5-proollama: null # uses first available local modelnvidia_nim: deepseek-ai/deepseek-v4-pro+ cursor_cli: gpt-5.4-high# Explicit override for the Chairman across all sessions.# Leave null/commented to use the STEP 1.7 selection algorithm.diff --git a/configs/provider-model-slots.cursor.example.yaml b/configs/provider-model-slots.cursor.example.yamlnew file mode 100644index 0000000..31559c0--- /dev/null+++ b/configs/provider-model-slots.cursor.example.yaml@@ -0,0 +1,79 @@+# Cursor CLI provider example for Council of High Intelligence.+# Use with: /council --profile exploration-orthogonal --models configs/provider-model-slots.cursor.example.yaml "..."+#+# Cursor CLI (cursor.com/cli) is a model AGGREGATOR: one binary (`cursor-agent`)+# serves GPT-5.x, Claude, Gemini, and Grok families through a single account.+# This makes it the lowest-friction way to get a multi-family panel without+# installing four separate CLIs — but it has one caveat (see below).+#+# Setup:+# 1. Install: curl https://cursor.com/install -fsS | bash+# 2. Authenticate: `cursor-agent login` (browser) OR `export CURSOR_API_KEY=...`+# 3. List live model IDs: `cursor-agent --list-models`+#+# DIVERSITY CAVEAT: Because Cursor can serve `claude-*` models, a Cursor seat+# pinned to a Claude model shares Anthropic's training bias with native+# `anthropic` seats — defeating the point of provider spread. The seats below+# deliberately route Cursor to NON-Anthropic families (gpt / gemini / grok) and+# keep Claude reasoning on the native `anthropic` provider. Never place a+# Cursor `claude-*` seat opposite a native `anthropic` seat in a polarity pair.+#+# All Cursor seats dispatch headless and read-only:+# cursor-agent -p --mode ask --model <id> --output-format text "<prompt>"++profile: exploration-orthogonal+strategy:+ provider_spread_first: true+ avoid_pair_collocation: true+ force_counterfactual_if_consensus_gt: 0.70+ require_dissenting_members: 2++seats:+ # Native Anthropic seats for high-stakes reasoning roles (keep Claude here,+ # NOT on Cursor, so it counts as a distinct provider family for spread).+ socrates:+ provider: anthropic+ model: claude-sonnet-4+ reasoning_mode: analytical+ aurelius:+ provider: anthropic+ model: claude-opus-4+ reasoning_mode: normative++ # Cursor seats — each routed to a DIFFERENT non-Anthropic family so one CLI+ # delivers genuine cross-model diversity.+ feynman:+ provider: cursor_cli+ model: gpt-5.4-high+ exec_method: cursor_cli+ reasoning_mode: mechanistic+ sun-tzu:+ provider: cursor_cli+ model: gemini-2.5-pro+ exec_method: cursor_cli+ reasoning_mode: strategic+ machiavelli:+ provider: cursor_cli+ model: grok-4+ exec_method: cursor_cli+ reasoning_mode: adversarial+ ada:+ provider: cursor_cli+ model: gpt-5.4-high+ exec_method: cursor_cli+ reasoning_mode: formal++ # A second native Anthropic seat for an emergent lens, kept off Cursor.+ lao-tzu:+ provider: anthropic+ model: claude-sonnet-4+ reasoning_mode: emergent+ torvalds:+ provider: cursor_cli+ model: gemini-2.5-pro+ exec_method: cursor_cli+ reasoning_mode: pragmatic++fallback:+ provider: anthropic+ model: claude-sonnet-4diff --git a/scripts/detect-providers.sh b/scripts/detect-providers.shindex 06a1bbd..7b365ae 100755--- a/scripts/detect-providers.sh+++ b/scripts/detect-providers.sh@@ -76,6 +76,17 @@ if [[ -n "$ollama_bin" ]]; thenfiproviders+=("$(json_provider "ollama" "$ollama_available" "ollama_run" "${ollama_bin:-not_found}" "$ollama_models")")+# Cursor via Cursor CLI (cursor-agent) — model aggregator: serves GPT-5.x,+# Claude, Gemini, and Grok families through one binary + CURSOR_API_KEY.+cursor_bin="$(check_command cursor-agent)"+if [[ -n "$cursor_bin" ]] && run_with_timeout cursor-agent --version >/dev/null 2>&1; then+ # Cross-family defaults so a Cursor seat adds real diversity, not a+ # second Anthropic-biased model. Verify live IDs with `cursor-agent --list-models`.+ providers+=("$(json_provider "cursor_cli" "true" "cursor_cli" "$cursor_bin" '"gpt-5.4-high","claude-opus-4-7-thinking-high","gemini-2.5-pro","grok-4"')")+else+ providers+=("$(json_provider "cursor_cli" "false" "cursor_cli" "${cursor_bin:-not_found}" '')")+fi+# NVIDIA NIM (OpenAI-compatible hosted endpoint at build.nvidia.com)# Detection: NVIDIA_API_KEY env var + optional reachability check.nim_available=false