Package Exports
- opencode-pair
- opencode-pair/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (opencode-pair) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
opencode-pair
OpenCode harness with opinionated agent orchestration. One coordinator, eight specialized workers, automatic verification, and risk-based review.
What it does
- Yang Wenli as coordinator — plans, delegates, synthesizes, never asks for routine permission
- Automatic workflow: scout/packetize → implement → verify → repair/re-verify as needed → risk-based review
- Plan/Execute mode switching via
/goand/plancommands - Session memory with cross-session continuity
- Observation logging and pattern learning
- Comment guard that catches AI-slop in generated code
- Emotion-informed prompt design based on Anthropic's research
Agents
| Agent | Character | Role | Model |
|---|---|---|---|
| yang | Yang Wenli | Coordinator — plans, delegates | openai/gpt-5.4-fast |
| thorfinn | Thorfinn | Backend and refactor implementation | openai/gpt-5.4-fast |
| ginko | Ginko | Web and doc research | openai/gpt-5.4-fast |
| rust | Rust Cohle | Default senior review, faster lane (read-only) | openai/gpt-5.4-fast |
| rust_deep | Rust Deep | Escalation review, slower/deeper lane (read-only) | openai/gpt-5.4-fast |
| spock | Spock | Build, test, lint verification | openai/gpt-5.4-fast |
| geralt | Geralt of Rivia | Scoped failure repair | openai/gpt-5.4-fast |
| edward | Edward Elric | Frontend, browser testing | openai/gpt-5.4-fast |
| killua | Killua Zoldyck | Fast codebase exploration | openai/gpt-5.4-fast |
MCP Servers
| MCP | What | API Key |
|---|---|---|
context7 |
Library and framework documentation | No |
grep_app |
GitHub code search across public repos | No |
searxng |
Web search (Google/Bing/DDG via self-hosted SearXNG) | No |
web-agent-mcp |
CloakBrowser — browser testing, screenshots | No |
pg-mcp |
PostgreSQL read-only client | No |
ssh-mcp |
Remote command execution on configured SSH hosts | No |
mariadb |
MariaDB client | No |
MCP access is controlled per-agent via src/prompts/mcp-access.ts — single source of truth.
Prerequisites
- Docker — required for SearXNG (auto-provisioned by installer)
Quick start
bunx opencode-pair installThe installer will:
- Wire agents, MCPs, and commands into OpenCode config
- Install shell strategy instructions
- Vendor
pg-mcp,ssh-mcp, bundled skills - Auto-provision SearXNG Docker container (
--restart unless-stopped) - Enable JSON format in SearXNG settings
From source:
git clone https://github.com/cemalturkcan/opencode-pair.git
cd opencode-pair
bun install && bun run build && bun link
opencode-pair installCommands
opencode-pair install # wire into OpenCode config
opencode-pair fresh-install # rebuild harness files, keep user config
opencode-pair uninstall # remove harness wiring
opencode-pair init # create project-local config
opencode-pair print-config # inspect generated configConfig
Merges from two layers (project wins):
~/.config/opencode/opencode-pair.jsonc— user-level<project>/.opencode/opencode-pair.jsonc— project-level
Create project config:
opencode-pair initWorkflow defaults are quality-balanced: complex tasks scout first, broad work is packetized into focused changes, verification starts targeted when possible, Rust is the default faster review lane, and Rust Deep is escalation-only for deeper high-risk review.
workflow.compact_subagent_context defaults to true. It shortens the project-fact line injected into subagent sessions; set it to false to keep the longer human-readable format.
Hooks
| Hook | What it does |
|---|---|
session.created |
Prepare session context injection |
chat.message |
Inject mode, project docs, session memory (coordinator) or project facts (workers) |
tool.execute.before |
Plan mode gate, git push build gate, WSL auto-transform |
tool.execute.after |
Comment guard, file tracking, compact suggestions |
session.idle |
Save session summary, promote learned patterns, cleanup old sessions |
session.compacting |
Pre-compact observation snapshot |
Architecture
src/
├── prompts/
│ ├── mcp-access.ts # Single source of truth for agent MCP access
│ ├── shared.ts # Coordinator core, worker cores, response discipline
│ ├── workers.ts # Per-worker character prompts + MCP guidance
│ └── coordinator.ts # Worker catalog, delegation, plan mode, workflows
├── agents.ts # Agent definitions (models, tools, permissions)
├── mcp.ts # MCP server registration
├── hooks/ # Runtime hooks (plan gate, comment guard, etc.)
├── config.ts # Config schema + loading
├── installer.ts # CLI installer
└── index.ts # Plugin entry point