Deliberationv4.6.1

Installing Deliberation in OpenCode

OpenCode (external) (by SST) reads modular project artifacts from a .opencode/ directory and MCP servers from an opencode.json config. The Deliberation artifacts are generated by scripts/sync-hosts.js from the canonical sources (prompts/*.md, plus the shared command/expert tables), and ship as:

  • .opencode/commands/*.md - one thin slash-command per fan-out / single-provider tool (/ask-all, /consensus, /ask-gpt, /ask-gemini, /ask-grok, /ask-openrouter, /reload-mcp). Each calls the matching Deliberation MCP tool; /reload-mcp lists the update steps.
  • .opencode/agents/*.md - one subagent per expert persona (architect, plan-reviewer, scope-analyst, code-reviewer, security-analyst, researcher, debugger, writing-editor), each with mode: subagent.

The MCP server itself is registered in your opencode.json (see below).

Install

The install steps for OpenCode are on the install page, with every other host. This page has the rest: what the plugin ships, provider keys, updating and notes.

Other ways to install

Global install, for every project: put the mcp block in ~/.config/opencode/opencode.json and copy commands/ and agents/ into ~/.config/opencode/. OpenCode uses the same plural subdirectory names in both locations.

Provider credentials

The MCP server (npx -y @antonbabenko/deliberation-mcp, stdio) reads provider credentials from the host environment. Set whichever providers you use:

Provider How it authenticates
GPT (Codex) Codex CLI auth (codex login, e.g. ChatGPT - codex login --device-auth on a remote machine; or CODEX_ACCESS_TOKEN; else CODEX_API_KEY)
Gemini GEMINI_API_KEY (Google AI Studio key). Opt-in fallback: the Antigravity CLI (agy) - see the terms note below
Grok (xAI) XAI_API_KEY
OpenRouter OPENROUTER_API_KEY (advisory-only; declare models in ~/.config/deliberation/config.json)

Gemini note: with no key, Gemini falls back to the Antigravity CLI (agy). Read the Antigravity terms (external) first. Section 6 lists "Using third party software, tools, or services to access the Service (e.g. using OpenClaw with Antigravity OAuth)" as a breach that "may be grounds for suspension or termination of your Antigravity and/or Gemini CLI accounts". Deliberation drives agy as third-party software.

You only need the providers you intend to call - missing keys just disable that one provider.

Optional npm plugin (not shipped)

A .opencode/plugins/ JS plugin could add a proactive "consider delegating" nudge, and opencode.json supports an npm plugin array:

json
{ "plugin": ["@antonbabenko/opencode-deliberation"] }

The npm name @antonbabenko/opencode-deliberation is currently unpublished and available (npm returns 404). It is reserved here but intentionally not shipped: the verified plugin hook API (event, tool.execute.before, tool.execute.after, shell.env, experimental.session.compacting) has no hook that injects a proactive delegation hint into the system prompt, so a plugin would add a runtime dependency for no verified behavior win. The subagents plus the command wrappers already give OpenCode the native delegation surface. If a suitable hook is added upstream, confirm the export shape at opencode.ai/docs/plugins (external) before shipping.

Distribution

  • npm - reserve / publish @antonbabenko/opencode-deliberation if a plugin ever ships (the MCP server is already on npm as @antonbabenko/deliberation-mcp).
  • OpenCode ecosystem listing - submit to the official ecosystem page at opencode.ai/docs/ecosystem (external). [unverified] Confirm the exact submission path / PR target there.
  • awesome-opencode - open a PR to the community awesome-opencode (external) list. [unverified] Confirm the repo path and listing format.

Notes / verified vs. unverified

Verified against the official docs (fetched live):

  • Command files live in .opencode/commands/ (plural); frontmatter keys description, agent, model, subtask; $ARGUMENTS / $1...$N for input. Source: opencode.ai/docs/commands (external).
  • Agent files live in .opencode/agents/ (plural); subagent uses mode: subagent; frontmatter description (required), mode, model, temperature, permission. Source: opencode.ai/docs/agents (external).
  • MCP mcp key shape (type: "local", command array, enabled, environment) and $schema: "https://opencode.ai/config.json". Source: opencode.ai/docs/mcp-servers (external).
  • The docs state the .opencode and ~/.config/opencode directories use plural subdirectory names (agents/, commands/, plugins/, ...); the config file opencode.json lives at the project root / global, not inside .opencode/. Source: opencode.ai/docs/config (external).
  • Plugin directory is .opencode/plugins/ (plural); a plugin is a named async export returning a hooks object. Source: opencode.ai/docs/plugins (external).
  • @antonbabenko/opencode-deliberation is unpublished/available on npm (404).

Unverified (confirm at the linked doc before relying on it):

  • The exact OpenCode ecosystem submission flow and awesome-opencode listing format.
  • Whether OpenCode does ${VAR} substitution inside environment (Deliberation reads keys from the process env, so this is not needed).

Updating

OpenCode starts the server with npx -y @antonbabenko/deliberation-mcp. The npm package does not include this repository's scripts/ folder. After an update:

bash
# stop the dashboard; prints "no running dashboard" if none runs
npx -y @antonbabenko/deliberation-mcp dashboard --stop
# drop the cached old build of this package (macOS, Linux)
find ~/.npm/_npx -type d -path '*/@antonbabenko/deliberation-mcp' -prune -exec rm -rf {} +

On Windows, dashboard --stop is not supported: close the dashboard process first, then delete the @antonbabenko\deliberation-mcp folders under %LocalAppData%\npm-cache\_npx.

Then restart OpenCode so it starts the new server. The /reload-mcp command gives the same steps. In a clone of this repository, bash scripts/commands/reload-mcp.sh clears the cached package, restarts the dashboard and audits the running Deliberation processes.

If you use the dashboard, start it again on the new version with npx -y @antonbabenko/deliberation-mcp dashboard.

Rendered from docs/hosts/opencode.md in the repository.

Type to search the site.