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 verify+review pipeline.
What it does
- Yang Wenli as coordinator — plans, delegates, synthesizes, never asks for routine permission
- Automatic workflow: implement → build/test (Spock) → review (Rust + Odokawa) → repair (Geralt) → re-verify
- 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 | claude-opus-4-6 |
| thorfinn | Thorfinn | General implementation | claude-sonnet-4-6 |
| ginko | Ginko | Web and doc research | claude-sonnet-4-6 |
| rust | Rust Cohle | Senior code review (read-only) | claude-opus-4-6 |
| odokawa | Odokawa | Cross-model review (read-only) | gpt-5.4 |
| spock | Spock | Build, test, lint verification | claude-sonnet-4-6 |
| geralt | Geralt of Rivia | Scoped failure repair | claude-sonnet-4-6 |
| edward | Edward Elric | Frontend, browser testing | claude-sonnet-4-6 |
| killua | Killua Zoldyck | Fast codebase exploration | claude-sonnet-4-6 |
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 initHooks
| 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