Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"metadata": {
"description": "Configurable multi-model consensus code review, plan review, and general review for Claude Code and Codex",
"version": "1.6.0"
"version": "1.7.0"
},
"plugins": [
{
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
.vscode/
node_modules/
draft.md
.antigravitycli/
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## [1.7.0] - 2026-05-20

### Changed

- Native Google/Gemini execution now uses Antigravity CLI (`agy`) instead of the retiring Gemini CLI.
- Claude command templates and Codex skill references route `gemini` model entries through `agy --sandbox -p`; convergence uses a fresh Antigravity prompt because `agy --continue -p` can include prior output before the new answer.
- Codex default config now keeps the stable `gemini` model id but uses `command: "agy"` and the display name `Gemini via Antigravity`.
- Setup docs now detect `agy` and treat bare `gemini` command values as legacy configs to migrate.
- Plugin metadata bumped to v1.7.0.

## [1.6.0] - 2026-05-20

### Added
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Alias skills are also provided for `code-review`, `plan-review`, `plan-reviwe`,
| Claude Code or Codex | Yes | The host environment determines the lead reviewer |
| Kilo CLI | Recommended | Routes OpenRouter models with one API key |
| OpenRouter API key | Recommended | Required for Kilo/OpenRouter models |
| Native CLIs | Optional | Claude supports `codex`, `gemini`, and `qwen`; Codex supports non-Codex native CLIs |
| Native CLIs | Optional | Claude supports `codex`, Antigravity CLI (`agy`), and `qwen`; Codex supports non-Codex native CLIs |
| CodeRabbit CLI | Optional | Supplementary static analysis for code reviews |

**Minimal setup**: the host lead plus 1 external model is enough for consensus reviews.
Expand All @@ -74,7 +74,7 @@ Alias skills are also provided for `code-review`, `plan-review`, `plan-reviwe`,
|-------|----------|---------------|---------------|----------------|
| Claude | Anthropic | built-in | lead | not used |
| Codex / GPT | OpenAI | `openai/gpt-5.4-codex` | `codex` | lead, not external |
| Gemini 3.1 Pro | Google | `google/gemini-3.1-pro-preview` | `gemini` | `gemini` |
| Gemini 3.1 Pro | Google | `google/gemini-3.1-pro-preview` | Antigravity CLI (`agy`) | Antigravity CLI (`agy`) |
| Kimi K2.6 | Moonshot | `moonshotai/kimi-k2.6` | Kilo | Kilo |
| Grok 4.20 | xAI | `x-ai/grok-4.20-beta` | Kilo | Kilo, disabled by default |
| MiniMax M2.7 | MiniMax | `minimax/minimax-m2.7` | Kilo | Kilo |
Expand All @@ -98,7 +98,7 @@ Example Codex config:

```json
{
"version": "1.6.0",
"version": "1.7.0",
"lead": {
"id": "codex",
"name": "Codex",
Expand All @@ -107,8 +107,8 @@ Example Codex config:
"models": [
{
"id": "gemini",
"name": "Gemini 3.1 Pro",
"command": "gemini",
"name": "Gemini via Antigravity",
"command": "agy",
"resume_flag": "",
"enabled": true
},
Expand Down
2 changes: 1 addition & 1 deletion plugins/consensus/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "consensus",
"version": "1.6.0",
"version": "1.7.0",
"description": "Configurable multi-model code review, plan review, and general review with consensus convergence for Claude Code",
"author": {
"name": "AltimateAI"
Expand Down
2 changes: 1 addition & 1 deletion plugins/consensus/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "consensus",
"version": "1.6.0",
"version": "1.7.0",
"description": "Codex-led multi-model code review, plan review, and general review with consensus convergence",
"author": {
"name": "AltimateAI",
Expand Down
2 changes: 1 addition & 1 deletion plugins/consensus/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Claude commands load model configuration from:
1. `~/.claude/consensus.json` - user config created by `/consensus-setup`
2. `plugins/consensus/consensus.config.json` - Claude plugin defaults

Claude is always the lead participant. Native CLIs (`codex`, `gemini`, `qwen`) are handled as special cases in the command templates.
Claude is always the lead participant. Native CLIs (`codex`, Antigravity CLI via `agy`, `qwen`) are handled as special cases in the command templates. The `gemini` model id remains stable, but native Google/Gemini execution should use `agy`; bare `gemini` is legacy only.

## Codex Configuration

Expand Down
17 changes: 9 additions & 8 deletions plugins/consensus/commands/code-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,13 @@ Source the API key (targeted — only export `OPENROUTER_API_KEY`):
For each model in `MODELS`, verify CLI availability:
- Commands starting with `kilo` -> check: `command -v kilo` AND `[ -n "$OPENROUTER_API_KEY" ]`
- Commands starting with `codex` -> check: `command -v codex`
- Commands starting with `gemini` -> check: `command -v gemini`
- Commands starting with `agy` -> check: `command -v agy`
- Commands starting with `gemini` -> legacy config; check `command -v agy`, run through the `agy` path below, and warn the user to rerun `/consensus-setup`
- Commands starting with `qwen` -> check: `command -v qwen`

Run all checks in parallel. Remove unavailable models from `MODELS` with a warning for each:
```
Warning: Skipping {model.name} — {reason: "kilo CLI not found" / "OPENROUTER_API_KEY not set" / "codex CLI not found"}
Warning: Skipping {model.name} — {reason: "kilo CLI not found" / "OPENROUTER_API_KEY not set" / "codex CLI not found" / "Antigravity CLI not found"}
```

**Check CodeRabbit availability:**
Expand Down Expand Up @@ -215,7 +216,7 @@ For each model, substitute `{MODEL_ID}`, `{MODEL_NAME}`, `{MODEL_COMMAND}`, `{MO

**Building `{EXTRA_DIRS_FLAGS}`** — if `EXTRA_DIRS` is non-empty, build per-CLI flags:
- For commands starting with `codex`: `--add-dir /path1 --add-dir /path2` (one `--add-dir` per directory)
- For commands starting with `gemini`: `--include-directories /path1,/path2` (comma-separated)
- For commands starting with `agy` or legacy `gemini`: `--add-dir /path1 --add-dir /path2` (one `--add-dir` per directory)
- For commands starting with `qwen`: `--include-directories /path1,/path2` (comma-separated)
- For commands starting with `kilo`: empty string (kilo has no flag — the paths are already in the prompt)

Expand All @@ -236,8 +237,8 @@ SESSION_DIR={SESSION_DIR}
**If `{MODEL_COMMAND}` starts with `codex`:**
codex exec -s read-only {EXTRA_DIRS_FLAGS} -o $SESSION_DIR/{MODEL_ID}.md - < $SESSION_DIR/prompt.md

**If `{MODEL_COMMAND}` starts with `gemini`:**
gemini {EXTRA_DIRS_FLAGS} -p "$(cat $SESSION_DIR/prompt.md)" --approval-mode plan > $SESSION_DIR/{MODEL_ID}.md 2>&1
**If `{MODEL_COMMAND}` starts with `agy` or legacy `gemini`:**
agy --sandbox {EXTRA_DIRS_FLAGS} -p "$(cat $SESSION_DIR/prompt.md)" > $SESSION_DIR/{MODEL_ID}.md 2>&1

**If `{MODEL_COMMAND}` starts with `qwen`:**
qwen {EXTRA_DIRS_FLAGS} --approval-mode plan -p "$(cat $SESSION_DIR/prompt.md)" -o text > $SESSION_DIR/{MODEL_ID}.md 2>&1
Expand All @@ -262,8 +263,8 @@ After sending the review, WAIT. The lead will send you a convergence prompt. Whe
**If `{MODEL_COMMAND}` starts with `codex`:**
codex exec resume --last - < $SESSION_DIR/convergence-prompt-{MODEL_ID}.md > $SESSION_DIR/{MODEL_ID}-convergence.md 2>&1

**If `{MODEL_COMMAND}` starts with `gemini`:**
gemini --resume latest -p "$(cat $SESSION_DIR/convergence-prompt-{MODEL_ID}.md)" --approval-mode plan > $SESSION_DIR/{MODEL_ID}-convergence.md 2>&1
**If `{MODEL_COMMAND}` starts with `agy` or legacy `gemini`:**
agy --sandbox -p "$(cat $SESSION_DIR/convergence-prompt-{MODEL_ID}.md)" > $SESSION_DIR/{MODEL_ID}-convergence.md 2>&1

**If `{MODEL_COMMAND}` starts with `qwen`:**
qwen -c -p "$(cat $SESSION_DIR/convergence-prompt-{MODEL_ID}.md)" -o text > $SESSION_DIR/{MODEL_ID}-convergence.md 2>&1
Expand Down Expand Up @@ -493,7 +494,7 @@ On failure: preserve `$SESSION_DIR` for debugging and tell the user where files
8. **Dynamic quorum.** Use `MIN_QUORUM` from config. Abort if fewer than `MIN_QUORUM` reviews available (including Claude).
9. **Convergence through messaging.** Lead sends draft to teammates, they run their model and report back. Max 2 rounds.
10. **No plan mode.** Code reviews are presented directly, not written to plan files.
11. **Be patient with teammates — they almost never fail.** External CLI models (Codex, Gemini, Kilo) take time to explore the codebase but almost always finish successfully. Follow this activity-based patience protocol:
11. **Be patient with teammates — they almost never fail.** External CLI models (Codex, Antigravity, Kilo) take time to explore the codebase but almost always finish successfully. Follow this activity-based patience protocol:
- **Poll output files** every ~1 minute using `wc -c < $SESSION_DIR/{model.id}.md 2>/dev/null || echo 0` to check file size.
- **Growing file (or no file yet)** = the model is working. Keep waiting.
- **A teammate is ONLY considered stuck if**: their output file exists AND its size has not changed for **10 consecutive checks** (10 minutes of zero growth).
Expand Down
26 changes: 16 additions & 10 deletions plugins/consensus/commands/consensus-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ command -v codex && echo "CODEX_OK" || echo "CODEX_MISSING"
```

```bash
command -v gemini && echo "GEMINI_OK" || echo "GEMINI_MISSING"
command -v agy && echo "AGY_OK" || echo "AGY_MISSING"
```

```bash
Expand All @@ -59,7 +59,7 @@ Report findings to the user:

- Kilo CLI: {installed / not found}
- Codex CLI: {installed / not found}
- Gemini CLI: {installed / not found}
- Antigravity CLI (`agy`): {installed / not found}
- Qwen CLI: {installed / not found}
- OpenRouter API key: {found in ~/.claude/.env / not found}
```
Expand All @@ -74,7 +74,7 @@ AskUserQuestion:
- label: "OpenRouter (Recommended)"
description: "1 API key, all 9 models via Kilo CLI. Simplest setup."
- label: "Native CLIs"
description: "Use codex, gemini, qwen CLIs directly where available. Requires each CLI installed separately."
description: "Use codex, Antigravity (`agy`), and qwen CLIs directly where available. Requires each CLI installed separately."
- label: "Both"
description: "Mix and match — use native CLIs where available, OpenRouter/Kilo for the rest."
```
Expand Down Expand Up @@ -122,7 +122,7 @@ The 9 supported models and their CLI mappings:
| Model ID | Name | OpenRouter (Kilo) | Native CLI |
|----------|------|-------------------|------------|
| `gpt` | GPT 5.4 Codex | `kilo run -m openrouter/openai/gpt-5.4-codex --auto` | `codex` (if codex CLI installed — note: native codex uses whatever model your `~/.codex/config.toml` specifies, e.g. `gpt-5.5`) |
| `gemini` | Gemini 3.1 Pro | `kilo run -m openrouter/google/gemini-3.1-pro-preview --auto` | `gemini` (if gemini CLI installed) |
| `gemini` | Gemini via Antigravity | `kilo run -m openrouter/google/gemini-3.1-pro-preview --auto` | `agy` (if Antigravity CLI installed) |
| `kimi` | Kimi K2.6 | `kilo run -m openrouter/moonshotai/kimi-k2.6 --auto` | OpenRouter only |
| `grok` | Grok 4.20 | `kilo run -m openrouter/x-ai/grok-4.20-beta --auto` | OpenRouter only |
| `minimax` | MiniMax M2.7 | `kilo run -m openrouter/minimax/minimax-m2.7 --auto` | OpenRouter only |
Expand All @@ -131,11 +131,11 @@ The 9 supported models and their CLI mappings:
| `mimo` | MiMo V2 Pro | `kilo run -m openrouter/xiaomi/mimo-v2-pro --auto` | OpenRouter only |
| `deepseek` | DeepSeek V4 Pro | `kilo run -m openrouter/deepseek/deepseek-v4-pro --auto` | OpenRouter only |

**Note on native CLIs**: For `codex`, `gemini`, and `qwen`, set the config's `command` field to just `codex`, `gemini`, or `qwen`. The teammate template in the review/plan commands detects these and uses the correct native invocation patterns automatically (e.g., `codex exec -s read-only` for reviews, `codex exec resume --last` for convergence, `gemini -p` for reviews, `gemini --resume latest` for convergence, `qwen --approval-mode plan -p` with `-o text` for reviews, `qwen -c -p` for convergence). The `resume_flag` field is ignored for native CLIs.
**Note on native CLIs**: For `codex`, `agy`, and `qwen`, set the config's `command` field to just `codex`, `agy`, or `qwen`. The teammate template in the review/plan commands detects these and uses the correct native invocation patterns automatically (e.g., `codex exec -s read-only` for reviews, `codex exec resume --last` for convergence, `agy --sandbox -p` for reviews and convergence prompts, `qwen --approval-mode plan -p` with `-o text` for reviews, `qwen -c -p` for convergence). The `resume_flag` field is ignored for native CLIs. If an existing config still contains `command: "gemini"`, treat it as legacy and migrate it to `agy` during reconfiguration.

Determine which models are available:
- **OpenRouter path**: All 9 available if `kilo` installed + API key set
- **Native path**: Only `gpt` (if codex installed), `gemini` (if gemini installed), and `qwen` (if qwen installed)
- **Native path**: Only `gpt` (if codex installed), `gemini` (if `agy` installed), and `qwen` (if qwen installed)
- **Both path**: Native CLI where available, OpenRouter/Kilo for the rest

```
Expand All @@ -147,7 +147,7 @@ AskUserQuestion:
- label: "GPT 5.4 Codex"
description: "{available via OpenRouter / available via codex CLI / not available}"
- label: "Gemini 3.1 Pro"
description: "{available via OpenRouter / available via gemini CLI / not available}"
description: "{available via OpenRouter / available via Antigravity CLI / not available}"
- label: "Kimi K2.6"
description: "{available via OpenRouter / not available}"
- label: "Grok 4.20"
Expand Down Expand Up @@ -208,7 +208,7 @@ Write the config to `~/.claude/consensus.json` using the Write tool:

```json
{
"version": "1.6.0",
"version": "1.7.0",
"models": [
{
"id": "{model_id}",
Expand Down Expand Up @@ -237,9 +237,15 @@ For each enabled model, run a quick test:

```bash
[ -f ~/.claude/.env ] && export OPENROUTER_API_KEY=$(grep '^OPENROUTER_API_KEY=' ~/.claude/.env | cut -d= -f2- | tr -d '"')
{model.command} "Reply with exactly: PONG" 2>&1 | head -20
```

Use the command pattern for the configured CLI:

- `codex`: `printf '%s\n' "Reply with exactly: PONG" | codex exec -s read-only - 2>&1 | head -20`
- `agy` or legacy `gemini`: `agy --sandbox -p "Reply with exactly: PONG" 2>&1 | head -20`
- `qwen`: `qwen --approval-mode plan -p "Reply with exactly: PONG" -o text 2>&1 | head -20`
- Kilo/OpenRouter: `{model.command} "Reply with exactly: PONG" 2>&1 | head -20`

Check if the output contains "PONG" (case-insensitive).

- **Pass**: Report success for that model
Expand Down Expand Up @@ -292,7 +298,7 @@ Print the final summary:

1. **9 fixed models only.** Do not offer custom model configuration. The wizard supports exactly the 9 models listed above.
2. **Idempotent .env updates.** When writing API keys, preserve all existing keys in the file. Only add/update the `OPENROUTER_API_KEY` line.
3. **Native CLI support for codex, gemini, and qwen.** When a user selects native CLIs, set the config's `command` field to `codex`, `gemini`, or `qwen`. The teammate template in the review/plan commands handles the full invocation patterns automatically. All other models use OpenRouter/Kilo only.
3. **Native CLI support for codex, agy, and qwen.** When a user selects native CLIs, set the config's `command` field to `codex`, `agy`, or `qwen`. The teammate template in the review/plan commands handles the full invocation patterns automatically. All other models use OpenRouter/Kilo only. Bare `gemini` is a legacy config value; migrate it to `agy` when rewriting the config.
4. **OpenRouter is the recommended path.** 1 key = 9 models. Emphasize this as the simplest setup.
5. **Enforce minimum 1 external model.** Claude alone is not a consensus.
6. **Hard-stop on quorum failure.** Never finalize a config that can't meet its own quorum.
Expand Down
17 changes: 9 additions & 8 deletions plugins/consensus/commands/plan-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,13 @@ Source the API key (targeted — only export `OPENROUTER_API_KEY`):
For each model in `MODELS`, verify CLI availability:
- Commands starting with `kilo` -> check: `command -v kilo` AND `[ -n "$OPENROUTER_API_KEY" ]`
- Commands starting with `codex` -> check: `command -v codex`
- Commands starting with `gemini` -> check: `command -v gemini`
- Commands starting with `agy` -> check: `command -v agy`
- Commands starting with `gemini` -> legacy config; check `command -v agy`, run through the `agy` path below, and warn the user to rerun `/consensus-setup`
- Commands starting with `qwen` -> check: `command -v qwen`

Run all checks in parallel. Remove unavailable models from `MODELS` with a warning for each:
```
Warning: Skipping {model.name} — {reason: "kilo CLI not found" / "OPENROUTER_API_KEY not set" / "codex CLI not found"}
Warning: Skipping {model.name} — {reason: "kilo CLI not found" / "OPENROUTER_API_KEY not set" / "codex CLI not found" / "Antigravity CLI not found"}
```

Count available models + 1 (Claude) = `TOTAL_PARTICIPANTS`.
Expand Down Expand Up @@ -228,7 +229,7 @@ For each model, substitute `{MODEL_ID}`, `{MODEL_NAME}`, `{MODEL_COMMAND}`, `{MO

**Building `{EXTRA_DIRS_FLAGS}`** — if `EXTRA_DIRS` is non-empty, build per-CLI flags:
- For commands starting with `codex`: `--add-dir /path1 --add-dir /path2` (one `--add-dir` per directory)
- For commands starting with `gemini`: `--include-directories /path1,/path2` (comma-separated)
- For commands starting with `agy` or legacy `gemini`: `--add-dir /path1 --add-dir /path2` (one `--add-dir` per directory)
- For commands starting with `qwen`: `--include-directories /path1,/path2` (comma-separated)
- For commands starting with `kilo`: empty string (kilo has no flag — the paths are already in the prompt)

Expand All @@ -249,8 +250,8 @@ SESSION_DIR={SESSION_DIR}
**If `{MODEL_COMMAND}` starts with `codex`:**
codex exec -s read-only {EXTRA_DIRS_FLAGS} -o $SESSION_DIR/{MODEL_ID}.md - < $SESSION_DIR/prompt.md

**If `{MODEL_COMMAND}` starts with `gemini`:**
gemini {EXTRA_DIRS_FLAGS} -p "$(cat $SESSION_DIR/prompt.md)" --approval-mode plan > $SESSION_DIR/{MODEL_ID}.md 2>&1
**If `{MODEL_COMMAND}` starts with `agy` or legacy `gemini`:**
agy --sandbox {EXTRA_DIRS_FLAGS} -p "$(cat $SESSION_DIR/prompt.md)" > $SESSION_DIR/{MODEL_ID}.md 2>&1

**If `{MODEL_COMMAND}` starts with `qwen`:**
qwen {EXTRA_DIRS_FLAGS} --approval-mode plan -p "$(cat $SESSION_DIR/prompt.md)" -o text > $SESSION_DIR/{MODEL_ID}.md 2>&1
Expand All @@ -275,8 +276,8 @@ After sending the plan, WAIT. The lead will send you a convergence prompt. When
**If `{MODEL_COMMAND}` starts with `codex`:**
codex exec resume --last - < $SESSION_DIR/convergence-prompt-{MODEL_ID}.md > $SESSION_DIR/{MODEL_ID}-convergence.md 2>&1

**If `{MODEL_COMMAND}` starts with `gemini`:**
gemini --resume latest -p "$(cat $SESSION_DIR/convergence-prompt-{MODEL_ID}.md)" --approval-mode plan > $SESSION_DIR/{MODEL_ID}-convergence.md 2>&1
**If `{MODEL_COMMAND}` starts with `agy` or legacy `gemini`:**
agy --sandbox -p "$(cat $SESSION_DIR/convergence-prompt-{MODEL_ID}.md)" > $SESSION_DIR/{MODEL_ID}-convergence.md 2>&1

**If `{MODEL_COMMAND}` starts with `qwen`:**
qwen -c -p "$(cat $SESSION_DIR/convergence-prompt-{MODEL_ID}.md)" -o text > $SESSION_DIR/{MODEL_ID}-convergence.md 2>&1
Expand Down Expand Up @@ -476,7 +477,7 @@ On failure: preserve `$SESSION_DIR` for debugging and tell the user where files
8. **Dynamic quorum.** Use `MIN_QUORUM` from config. Abort if fewer than `MIN_QUORUM` plans available (including Claude).
9. **Return to plan mode.** After final plan + cleanup, call `EnterPlanMode` for user review (with fallback to direct presentation).
10. **Convergence through messaging.** Lead sends draft to teammates, they run their model and report back. Max 2 rounds.
11. **Be patient with teammates — they almost never fail.** External CLI models (Codex, Gemini, Kilo) take time to explore the codebase but almost always finish successfully. Follow this activity-based patience protocol:
11. **Be patient with teammates — they almost never fail.** External CLI models (Codex, Antigravity, Kilo) take time to explore the codebase but almost always finish successfully. Follow this activity-based patience protocol:
- **Poll output files** every ~1 minute using `wc -c < $SESSION_DIR/{model.id}.md 2>/dev/null || echo 0` to check file size.
- **Growing file (or no file yet)** = the model is working. Keep waiting.
- **A teammate is ONLY considered stuck if**: their output file exists AND its size has not changed for **10 consecutive checks** (10 minutes of zero growth).
Expand Down
Loading