This playbook now captures a converged OpenCode setup with:
- native primary agents for low-cost and deep work
- command-driven planning, TDD anchoring, implementation, review, and verification
- a persisted
PLAN.mdcontract for non-trivial work - lightweight local plugins for compaction and verification discipline
- Sentry MCP for runtime evidence
- optional skills and optional OpenSpec, not mandatory baseline dependencies
Use this if you mainly want the planning and execution model without copying every detail:
- Install and configure OpenCode.
- Copy
config/opencode.template.json,config/AGENTS.template.md, andconfig/agents/reviewer.template.mdinto your environment. - Add the command templates for
/plan,/spec,/implement,/review, and/verify. - Add Sentry MCP later if you actually need runtime evidence.
Use this if you want the full implementation documented by this repo:
- Install and configure OpenCode.
- Configure both
openaiandgithub-copilotproviders. - Copy the full template set from
config/. - Configure Sentry MCP in local-command mode and authenticate it.
Run
sentry-mcp auth login, or provideSENTRY_ACCESS_TOKENin the environment when you start OpenCode. - Add optional skills only when a framework-specific domain clearly justifies them.
- Add OpenSpec only if you want a larger change lifecycle than
PLAN.mdprovides.
Before finalizing the setup, verify that the model IDs in your config actually exist for your providers. This repository documents one working April 2026 baseline, not a universal set of provider slugs.
~/.config/opencode/
├── opencode.json
├── package.json
└── node_modules/
~/.opencode/
├── agents/
│ └── reviewer.md
├── commands/
│ ├── plan.md
│ ├── spec.md
│ ├── implement.md
│ ├── review.md
│ ├── verify.md
│ └── release.md
└── plugins/
├── smart-compaction.ts
└── verify-gate.ts
~/projects/my-repo/
├── AGENTS.md
└── PLAN.md
PLAN.md is task-local and repo-local. It should be created during planning, not stored as a global default file.
- Install OpenCode and authenticate your providers.
- Copy
opencode.template.jsonand the agent/command/plugin templates. - Configure
mcp.sentryinopencode.jsonto call your localsentry-mcpbinary, then complete authentication withsentry-mcp auth loginorSENTRY_ACCESS_TOKEN. - Run a small smoke test: switch agents, use
/plan, and verify thatPLAN.mdcan be created. - Add optional skills later, after you see repeated domain-specific needs.
- Keep one active planning-and-execution baseline.
- Do not let optional skills silently redefine your routing rules.
- If you add OpenSpec, treat it as an explicit extension for persistent artifacts, not as a hidden duplicate of
/planand/spec.
Use the config/ directory as the shareable baseline:
opencode.template.jsonAGENTS.template.mdagents/reviewer.template.mdcommands/*.template.mdplugins/*.template.ts
The legacy routing and environment-check templates are still included as historical references in config/ROUTING_POLICY.template.md and config/ENV_SELF_CHECK_POLICY.template.md, but they are no longer required for the baseline stack.