Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
290aba1
build: add tsc --checkJs --noEmit typecheck gate for core
antonbabenko May 30, 2026
fedd9c5
feat(core): add DelegationRequest/Result/Provider typedefs
antonbabenko May 30, 2026
dd9988b
feat(core): add Provider contract, toErrorResult, opinion schema
antonbabenko May 30, 2026
f428879
refactor(gemini): export runGemini + extract buildAgyArgs for core ad…
antonbabenko May 30, 2026
72bdbbd
feat(core): server-side askAll fan-out + minimal consensus (isolated,…
antonbabenko May 30, 2026
cc0e7c1
feat(core): registry selection + per-alias OpenRouter expansion (clos…
antonbabenko May 30, 2026
1400dfe
feat(core): openai-compatible adapter (bounded sessions)
antonbabenko May 30, 2026
0a13fb6
feat(core): grok adapter (advisory, fileUpload)
antonbabenko May 30, 2026
a12f1f8
feat(core): antigravity (gemini) adapter (real error classification)
antonbabenko May 30, 2026
280a19d
feat(core): codex adapter (Option A spawn, leak-safe)
antonbabenko May 30, 2026
3b1187e
build: real typecheck gate (typescript + @types/node devDeps)
antonbabenko May 30, 2026
420072f
build: restore strict typecheck gate; @ts-nocheck legacy bridges
antonbabenko May 30, 2026
e4a8e6e
refactor(core): DelegationResult as Success|Error discriminated union
antonbabenko May 30, 2026
bee552f
feat(mcp): stdio server over deliberation-core (ask-* + ask-all + con…
antonbabenko May 30, 2026
0800cef
refactor(plugin): /ask-all and /consensus dispatch via deliberation-m…
antonbabenko May 30, 2026
26acdf7
Merge pull request #50 from antonbabenko/feat/deliberation-core
antonbabenko May 30, 2026
826be40
ci(validate): npm ci before typecheck so tsc devDep is installed
antonbabenko May 30, 2026
9353400
Merge pull request #51 from antonbabenko/fix/ci-npm-ci
antonbabenko May 30, 2026
54fe082
fix(setup): register deliberation MCP server so /ask-all and /consens…
antonbabenko May 30, 2026
21ec5e7
Merge pull request #52 from antonbabenko/fix/setup-register-deliberation
antonbabenko May 30, 2026
a24bbf7
feat(plugin)!: rebrand claude-delegator -> deliberation + namespace b…
antonbabenko May 30, 2026
90cfffa
chore(assets): regenerate social-preview for deliberation rebrand (#56)
antonbabenko May 30, 2026
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
18 changes: 10 additions & 8 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "antonbabenko-claude-delegator",
"name": "antonbabenko-deliberation",
"owner": {
"name": "Anton Babenko",
"url": "https://github.com/antonbabenko"
},
"plugins": [
{
"name": "claude-delegator",
"name": "deliberation",
"source": "./",
"description": "GPT (Codex CLI), Gemini (bundled MCP bridge), and Grok (xAI HTTP bridge) expert subagents for Claude Code. Seven specialized experts: Architect, Plan Reviewer, Scope Analyst, Code Reviewer, Security Analyst, Researcher, Debugger.",
"description": "Use when you want a delegated second opinion or implementation from GPT (Codex), Gemini, Grok (xAI), or OpenRouter (config-driven, 400+ models) - seven expert subagents (Architect, Plan Reviewer, Scope Analyst, Code Reviewer, Security Analyst, Researcher, Debugger) and bundled ask-gpt/ask-gemini/ask-grok/ask-openrouter/ask-all/consensus commands, advisory (read-only) or implementation (write; Grok and OpenRouter are advisory-only).",
"version": "1.18.0",
"author": {
"name": "Anton Babenko",
"url": "https://github.com/antonbabenko"
},
"homepage": "https://github.com/antonbabenko/claude-delegator",
"repository": "https://github.com/antonbabenko/claude-delegator",
"homepage": "https://github.com/antonbabenko/deliberation",
"repository": "https://github.com/antonbabenko/deliberation",
"license": "MIT",
"keywords": [
"delegation",
Expand All @@ -27,11 +27,13 @@
"google",
"grok",
"xai",
"files",
"openrouter",
"experts",
"subagents",
"orchestration"
"orchestration",
"code-review",
"architecture"
]
}
]
}
}
29 changes: 29 additions & 0 deletions .claude-plugin/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"mcpServers": {
"codex": {
"command": "codex",
"args": ["mcp-server"],
"type": "stdio"
},
"gemini": {
"command": "node",
"args": ["${CLAUDE_PLUGIN_ROOT}/server/gemini/index.js"],
"type": "stdio"
},
"grok": {
"command": "node",
"args": ["${CLAUDE_PLUGIN_ROOT}/server/grok/index.js"],
"type": "stdio"
},
"openrouter": {
"command": "node",
"args": ["${CLAUDE_PLUGIN_ROOT}/server/openrouter/index.js"],
"type": "stdio"
},
"deliberation": {
"command": "node",
"args": ["${CLAUDE_PLUGIN_ROOT}/server/mcp/index.js"],
"type": "stdio"
}
}
}
8 changes: 4 additions & 4 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "claude-delegator",
"description": "GPT (Codex CLI), Gemini (bundled MCP bridge), and Grok (xAI HTTP bridge) expert subagents for Claude Code. Seven specialized experts: Architect, Plan Reviewer, Scope Analyst, Code Reviewer, Security Analyst, Researcher, Debugger.",
"name": "deliberation",
"description": "Use when you want a delegated second opinion or implementation from GPT (Codex), Gemini, Grok (xAI), or OpenRouter (config-driven, 400+ models) - seven expert subagents (Architect, Plan Reviewer, Scope Analyst, Code Reviewer, Security Analyst, Researcher, Debugger) and bundled ask-gpt/ask-gemini/ask-grok/ask-openrouter/ask-all/consensus commands, advisory (read-only) or implementation (write; Grok and OpenRouter are advisory-only).",
"version": "1.18.0",
"author": {
"name": "Anton Babenko",
"url": "https://github.com/antonbabenko"
},
"homepage": "https://github.com/antonbabenko/claude-delegator",
"repository": "https://github.com/antonbabenko/claude-delegator",
"homepage": "https://github.com/antonbabenko/deliberation",
"repository": "https://github.com/antonbabenko/deliberation",
"license": "MIT",
"keywords": ["delegation", "mcp", "codex", "gpt", "openai", "gemini", "antigravity", "agy", "google", "grok", "xai", "files", "experts", "subagents", "orchestration"]
}
7 changes: 7 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Typecheck
run: npm run typecheck

- name: Run bridge tests
run: node --test test/*.test.js
Expand Down
20 changes: 10 additions & 10 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ A Claude Code plugin that provides GPT (via Codex CLI), Gemini 3 (via the Antigr

```bash
# Test plugin locally (loads from working directory)
claude --plugin-dir /path/to/claude-delegator
claude --plugin-dir /path/to/deliberation

# Run setup to test installation flow
/claude-delegator:setup
/deliberation:setup

# Run uninstall to test removal flow
/claude-delegator:uninstall
/deliberation:uninstall
```

No build step, no dependencies. Codex exposes a native MCP server; Gemini, Grok, and OpenRouter use bundled zero-dependency Node bridges (`server/gemini/index.js`, `server/grok/index.js`, `server/openrouter/index.js`). The Gemini bridge wraps the Antigravity CLI (`agy`) in print mode. The OpenRouter bridge calls any OpenAI-compatible `/chat/completions` endpoint.
Expand All @@ -25,7 +25,7 @@ No build step, no dependencies. Codex exposes a native MCP server; Gemini, Grok,

### Orchestration Flow

Claude acts as orchestratordelegates to specialized experts based on task type. Supports both **single-shot** (independent calls) and **multi-turn** (context preserved via `threadId`).
Claude acts as orchestrator - delegates to specialized experts based on task type. Supports both **single-shot** (independent calls) and **multi-turn** (context preserved via `threadId`).

```
User Request → Claude Code → [Match trigger → Select expert & provider]
Expand All @@ -44,7 +44,7 @@ User Request → Claude Code → [Match trigger → Select expert & provider]
1. **Match trigger** - Check `rules/triggers.md` for semantic patterns
2. **Read expert prompt** - Load from `prompts/[expert].md`
3. **Build 7-section prompt** - Use format from `rules/delegation-format.md`
4. **Call provider tool** - `mcp__codex__codex`, `mcp__gemini__gemini`, `mcp__grok__grok`, or `mcp__openrouter__openrouter`
4. **Call provider tool** - `mcp__deliberation-codex__codex`, `mcp__deliberation-gemini__gemini`, `mcp__deliberation-grok__grok`, or `mcp__deliberation-openrouter__openrouter`
5. **Synthesize response** - Never show raw output; interpret and verify

### The 7-Section Delegation Format
Expand All @@ -62,11 +62,11 @@ Retries use multi-turn (`*-reply` with `threadId`) so the expert remembers previ

| Component | Purpose | Notes |
|-----------|---------|-------|
| `rules/*.md` | When/how to delegate | Installed to `~/.claude/rules/delegator/` |
| `rules/*.md` | When/how to delegate | Installed to `~/.claude/rules/deliberation/` |
| `prompts/*.md` | Expert personalities | Injected via `developer-instructions` |
| `commands/*.md` | Slash commands | `/setup`, `/uninstall` |
| `config/providers.json` | Provider metadata | Not used at runtime |
| `~/.claude/claude-delegator/config.json` | OpenRouter model config | Live SSOT; stat-gated hot-reload |
| `~/.claude/deliberation/config.json` | OpenRouter model config | Live SSOT; stat-gated hot-reload |

> Expert prompts adapted from [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode)

Expand All @@ -82,15 +82,15 @@ Retries use multi-turn (`*-reply` with `threadId`) so the expert remembers previ
| **Researcher** | `prompts/researcher.md` | External libraries, docs, best practices | "how do I use X", "find examples of Y" |
| **Debugger** | `prompts/debugger.md` | Root-cause analysis, minimal fixes | "why does this crash", "debug this failing test" |

Every expert can operate in **advisory** (`sandbox: read-only`) or **implementation** (`sandbox: workspace-write`) mode based on the task. OpenRouter models are always advisory - per-model expert eligibility is controlled by the `experts` field in `~/.claude/claude-delegator/config.json`.
Every expert can operate in **advisory** (`sandbox: read-only`) or **implementation** (`sandbox: workspace-write`) mode based on the task. OpenRouter models are always advisory - per-model expert eligibility is controlled by the `experts` field in `~/.claude/deliberation/config.json`.

## Grok file access

Grok reads attached files via `files[]` and resolves them under `roots[]` (top-level array of absolute directories) or `cwd`. `path` and `dir` entries take an optional `mode: "auto" | "inline" | "upload"` inline embeds the file as `input_text` so Grok reads it line-by-line (best for source code); upload routes through the xAI Files API and is SHA-256 dedup-cached locally. `file_id` / `file_url` entries pass through unchanged and do not accept `mode`. Directory expansion via `{dir}` entries. See **[TECHNICAL.md: Grok files and cleanup](TECHNICAL.md#grok-files-and-cleanup)** for parameters, the inline-vs-upload tradeoff, cross-repo usage, cache layout, and the `gc` cleanup subcommand.
Grok reads attached files via `files[]` and resolves them under `roots[]` (top-level array of absolute directories) or `cwd`. `path` and `dir` entries take an optional `mode: "auto" | "inline" | "upload"` - inline embeds the file as `input_text` so Grok reads it line-by-line (best for source code); upload routes through the xAI Files API and is SHA-256 dedup-cached locally. `file_id` / `file_url` entries pass through unchanged and do not accept `mode`. Directory expansion via `{dir}` entries. See **[TECHNICAL.md: Grok files and cleanup](TECHNICAL.md#grok-files-and-cleanup)** for parameters, the inline-vs-upload tradeoff, cross-repo usage, cache layout, and the `gc` cleanup subcommand.

## Key Design Decisions

1. **Native & Bridge MCP** - Codex has a native `mcp-server` command. Gemini requires a bundled bridge (`server/gemini/index.js`) that wraps the Antigravity CLI (`agy`) in print mode. Grok has no MCP or CLI server mode, so a bundled bridge (`server/grok/index.js`) wraps the xAI **Responses API** (`/v1/responses`) directly - advisory-only (no file editing), but it can READ attached files (`files:[{path|file_id|file_url|dir}]`, optional `roots[]`, per-entry `mode` for upload-vs-inline delivery); uploaded files are SHA-256 dedup-cached locally, auto-expire (7-day default, `GROK_FILE_TTL_SECONDS`), and are managed with `/grok-files` (`server/grok/files-admin.js`: `list`/`prune`/`gc`). Details in [TECHNICAL.md § Grok files and cleanup](TECHNICAL.md#grok-files-and-cleanup). OpenRouter uses a bundled bridge (`server/openrouter/index.js`) that calls any OpenAI-compatible `POST {apiBase}/chat/completions` endpoint - advisory-only, text-inline file attachment only (`{path}`/`{dir}`; no upload path), config-driven via `~/.claude/claude-delegator/config.json`. Details in [TECHNICAL.md § OpenRouter bridge](TECHNICAL.md#openrouter-bridge).
1. **Native & Bridge MCP** - Codex has a native `mcp-server` command. Gemini requires a bundled bridge (`server/gemini/index.js`) that wraps the Antigravity CLI (`agy`) in print mode. Grok has no MCP or CLI server mode, so a bundled bridge (`server/grok/index.js`) wraps the xAI **Responses API** (`/v1/responses`) directly - advisory-only (no file editing), but it can READ attached files (`files:[{path|file_id|file_url|dir}]`, optional `roots[]`, per-entry `mode` for upload-vs-inline delivery); uploaded files are SHA-256 dedup-cached locally, auto-expire (7-day default, `GROK_FILE_TTL_SECONDS`), and are managed with `/grok-files` (`server/grok/files-admin.js`: `list`/`prune`/`gc`). Details in [TECHNICAL.md § Grok files and cleanup](TECHNICAL.md#grok-files-and-cleanup). OpenRouter uses a bundled bridge (`server/openrouter/index.js`) that calls any OpenAI-compatible `POST {apiBase}/chat/completions` endpoint - advisory-only, text-inline file attachment only (`{path}`/`{dir}`; no upload path), config-driven via `~/.claude/deliberation/config.json`. Details in [TECHNICAL.md § OpenRouter bridge](TECHNICAL.md#openrouter-bridge).
2. **Single-shot + multi-turn** - Single-shot for advisory (full context per call), multi-turn via `threadId` for chained implementation and retries
3. **Dual mode** - Any expert can advise or implement based on task
4. **Synthesize, don't passthrough** - Claude interprets expert output, applies judgment
Expand Down
20 changes: 10 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing to claude-delegator
# Contributing to deliberation

Contributions welcome. This document covers how to contribute effectively.

Expand All @@ -8,15 +8,15 @@ Contributions welcome. This document covers how to contribute effectively.

```bash
# Clone the repo
git clone https://github.com/antonbabenko/claude-delegator
cd claude-delegator
git clone https://github.com/antonbabenko/deliberation
cd deliberation

# Run `claude` and install plugin in Claude Code
claude
/claude-delegator:setup
/deliberation:setup

# Or test your changes locally without reinstalling
claude --plugin-dir /path/to/claude-delegator
claude --plugin-dir /path/to/deliberation
```

---
Expand All @@ -36,7 +36,7 @@ claude --plugin-dir /path/to/claude-delegator
## Project Structure

```
claude-delegator/
deliberation/
├── .claude-plugin/ # Plugin manifest
│ └── plugin.json
├── commands/ # Slash commands (/setup, /uninstall)
Expand All @@ -53,7 +53,7 @@ claude-delegator/

### Before Submitting

1. **Test your changes** - Run `/claude-delegator:setup` and verify
1. **Test your changes** - Run `/deliberation:setup` and verify
2. **Update docs** - If you change behavior, update relevant docs
3. **Keep commits atomic** - One logical change per commit

Expand Down Expand Up @@ -94,7 +94,7 @@ You never bump versions by hand.
3. It opens a `chore(release): vX.Y.Z` PR that updates `version.json`, `CHANGELOG.md`, and
the synced manifests, then auto-merges it once the `validate` check passes.
4. On merge, a second workflow tags `vX.Y.Z` and publishes the GitHub Release.
5. The `antonbabenko/agent-plugins` marketplace then re-pins `claude-delegator` to the new
5. The `antonbabenko/agent-plugins` marketplace then re-pins `deliberation` to the new
release (immediately if its dispatch token is set, otherwise within a day via cron).

`version.json` is the single source of truth. `.claude-plugin/plugin.json`,
Expand Down Expand Up @@ -163,8 +163,8 @@ check fails if they drift.
After changes, verify with actual MCP calls:

1. Install the plugin in Claude Code
2. Run `/claude-delegator:setup`
3. Verify MCP tools are available (`mcp__codex__codex`)
2. Run `/deliberation:setup`
3. Verify MCP tools are available (`mcp__deliberation-codex__codex`)
4. Test MCP tool calls via oracle delegation
5. Verify responses are properly synthesized
6. Test error cases (timeout, missing CLI)
Expand Down
Loading
Loading