Skip to content

Commit 8ed3e59

Browse files
committed
feat: integrate OpenCode + Copilot Pro model routing strategy
Transition devkit from Claude/Google model references to OpenCode Zen models with a dual-tool strategy: OpenCode for heavy agentic work, Copilot Pro for lightweight tasks. Changes: - Create opencode.json with model routing, MCP servers, and plugins - Update all 12 existing agents to OpenCode Zen model IDs - Add 2 new agents: coder (GPT 5.3 Codex, autonomous test-fix loops) and frontend (Kimi K2.5, vision-to-code) - Rewrite agent-advisor with full routing table and Copilot vs OpenCode decision framework - Add cost-awareness rule to skills/rules/ with model tier guidelines - Create opencode-setup.sh for symlinks and Copilot CLI install - Add OpenCode alias (oc) to shell enhancements - Update CLAUDE.md and README.md with dual-tool documentation Model routing: Gemini 3.1 Pro for planning/review, GPT 5.4 for building, GPT 5.3 Codex for autonomous coding, Kimi K2.5 for frontend, MiniMax M2.5 Free for grunt work. https://claude.ai/code/session_018HqGQwqAc7inAbJ1B9sc2g
1 parent ae828a7 commit 8ed3e59

23 files changed

Lines changed: 852 additions & 593 deletions

.claude/rules/cost-awareness.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../skills/rules/cost-awareness.md

.config/shell/enhancements.zsh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,8 @@ alias zapi='zellij --layout ~/devkit/zellij/layouts/api.kdl'
5757
alias zdebug='zellij --layout ~/devkit/zellij/layouts/debug.kdl'
5858
alias znode='zellij --layout ~/devkit/zellij/layouts/node.kdl'
5959
alias zgo='zellij --layout ~/devkit/zellij/layouts/golang.kdl'
60+
61+
# --- OpenCode aliases ---
62+
if command -v opencode &> /dev/null; then
63+
alias oc='opencode'
64+
fi

CLAUDE.md

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ A portable, reproducible terminal development environment (devkit). Not a softwa
1818
- `.cursor/rules/` -- Cursor rules (same standards, `.mdc` format)
1919
- `.config/` -- Tool configs: Ghostty terminal, git-delta, Starship prompt, shell enhancements (zoxide, fzf, eza aliases)
2020
- `sounds/` -- Notification sounds for Claude Code hooks (Navi "Hey! Listen!" from Zelda)
21-
- `scripts/` -- Utility scripts (killport.sh, brew-update.sh, dev-cleanup.sh)
21+
- `opencode.json` -- OpenCode configuration (model routing, MCP servers, plugins)
22+
- `scripts/` -- Utility scripts (killport.sh, brew-update.sh, dev-cleanup.sh, opencode-setup.sh)
2223

2324
## Key Commands
2425

@@ -41,6 +42,10 @@ zgo # Go development
4142
./scripts/killport.sh <port>
4243
./scripts/brew-update.sh
4344
./scripts/dev-cleanup.sh
45+
./scripts/opencode-setup.sh # Set up OpenCode + Copilot Pro
46+
47+
# OpenCode
48+
oc # Launch OpenCode (alias)
4449
```
4550

4651
## Configuration Linking
@@ -51,6 +56,16 @@ Configs are symlinked from this repo to `~/.config/` and `~/`:
5156
- `.config/git/delta.gitconfig` -> included via `git config --global include.path`
5257
- `.config/shell/enhancements.zsh` -> sourced from `.zshrc`
5358
- `.claude/settings.json` -> `~/.claude/settings.json`
59+
- `opencode/aig_agents/` -> `~/.config/opencode/agents/` (via `scripts/opencode-setup.sh`)
60+
- `opencode.json` -> `~/.config/opencode/config.json` (via `scripts/opencode-setup.sh`)
61+
62+
### OpenCode + Copilot Pro Setup
63+
64+
```bash
65+
./scripts/opencode-setup.sh
66+
```
67+
68+
This symlinks OpenCode agents and config, and installs the Copilot CLI extension. See `opencode/aig_agents/README.md` for the full agent reference and model routing strategy.
5469

5570
### Claude Code Settings
5671

@@ -70,15 +85,24 @@ export DEVKIT_PATH="$HOME/path/to/devkit"
7085

7186
AI agent and assistant configs are included but optional -- the core workflow (tools, layouts, shell configs) works without them.
7287

88+
### Dual-Tool Strategy
89+
- **OpenCode + Zen** (~$90/mo) -- Heavy agentic work: architecture, multi-file refactors, autonomous coding, code review pipelines
90+
- **Copilot Pro** ($10/mo) -- Lightweight: inline completions (unlimited), quick chat (300 reqs), PR review (free), CLI agents
91+
- **Claude Code** -- Kept for work use; devkit includes Claude rules and settings for both tools
92+
7393
### OpenCode Agents
74-
OpenCode agents in `opencode/aig_agents/` are invoked with `@agent-name` syntax inside OpenCode:
75-
- `@agent-advisor` -- routes tasks to appropriate agents
76-
- `@planning-agent` -- system design and architecture
77-
- `@engineer` / `@lead_dev` -- implementation
78-
- `@reviewer` / `@plan-reviewer` -- code review
79-
- `@qa` / `@test_generator` -- testing
80-
- `@security` -- vulnerability scanning
81-
- `@linear` -- Linear project management integration
94+
14 specialized agents in `opencode/aig_agents/`, invoked with `@agent-name` syntax inside OpenCode:
95+
- `@agent-advisor` -- routes tasks to appropriate agents and tools
96+
- `@planning-agent` / `@plan-reviewer` -- architecture and plan review (Gemini 3.1 Pro)
97+
- `@engineer` -- default builder (GPT 5.4, requires approval)
98+
- `@coder` -- autonomous test-fix loops (GPT 5.3 Codex)
99+
- `@frontend` -- UI/vision-to-code (Kimi K2.5)
100+
- `@lead_dev` -- quick tasks, auto-commits (MiniMax Free)
101+
- `@reviewer` / `@security` -- code review and security audit (Gemini 3.1 Pro, cross-model)
102+
- `@qa` / `@test_generator` -- testing (GPT 5.3 Codex)
103+
- `@docs_generator` -- documentation (Gemini 3 Flash)
104+
- `@linear` -- Linear project management
105+
- `@commiter` -- git automation (MiniMax Free)
82106

83107
### Rules & Commands
84108
Always-on rules in `skills/rules/` are symlinked into `.claude/rules/` -- they apply to every conversation automatically.
@@ -101,5 +125,7 @@ Frontend design skills (`/audit`, `/polish`, `/critique`, `/animate`, etc.) are
101125
- Agent configs are markdown files with persona/behavior instructions
102126
- Shell scripts should use `set -e` and follow existing patterns in `scripts/`
103127
- `skills/rules/` is the single source of truth for always-on rules -- `.claude/rules/` files are symlinks. Edit files in `skills/rules/`, not `.claude/rules/`
128+
- `opencode/aig_agents/` is the single source of truth for OpenCode agents -- `~/.config/opencode/agents/` is a symlink
129+
- Agent model IDs use the `opencode/` prefix for Zen models (e.g., `opencode/gpt-5.4`)
104130
- `skills/commands/` and `skills/plane/` are slash commands symlinked into `~/.claude/skills/`
105131
- `.cursor/rules/` is maintained separately in `.mdc` format -- update when modifying standards in `skills/`

README.md

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -71,27 +71,44 @@ It includes curated CLI tools installed via Homebrew, 9 Zellij layouts for diffe
7171

7272
## AI Tools (Optional)
7373

74-
The repo includes configs for AI coding tools — these are entirely optional and nothing else depends on them. Agent definitions are provided for [OpenCode](https://github.com/anomalyco/opencode), and assistant rules are included for Claude Code and Cursor.
74+
The repo includes configs for AI coding tools — these are entirely optional and nothing else depends on them.
75+
76+
### Dual-Tool Strategy: OpenCode + Copilot Pro
77+
78+
| Layer | Tool | Cost | What It Handles |
79+
| :--- | :--- | :--- | :--- |
80+
| Inline completions | Copilot Pro | $10/mo | Tab-complete in Neovim. Unlimited. |
81+
| Quick chat | Copilot Pro | Included | Quick questions, explain errors (300 reqs). |
82+
| PR review | Copilot | Included | Assign Copilot as reviewer on PRs. |
83+
| Heavy agentic work | OpenCode + Zen | ~$90/mo | Architecture, multi-file refactors, autonomous coding. |
84+
85+
### OpenCode Agents (14 agents)
86+
87+
| Agent | Specialty | Model | Cost | Invoke With |
88+
| :--- | :--- | :--- | :--- | :--- |
89+
| **Advisor** | Task routing & tool selection | Gemini 3 Flash | Budget | `@agent-advisor` |
90+
| **Architect** | System design & planning | Gemini 3.1 Pro | $2/$12 | `@planning-agent` |
91+
| **Plan Reviewer** | Architecture review | Gemini 3.1 Pro | $2/$12 | `@plan-reviewer` |
92+
| **Engineer** | Default builder (approval) | GPT 5.4 | $2.50/$15 | `@engineer` |
93+
| **Coder** | Autonomous test-fix loops | GPT 5.3 Codex | $1.75/$14 | `@coder` |
94+
| **Frontend** | UI/vision-to-code | Kimi K2.5 | $0.60/$3 | `@frontend` |
95+
| **Lead Dev** | Quick tasks (auto-commit) | MiniMax Free | FREE | `@lead_dev` |
96+
| **Reviewer** | Code quality review | Gemini 3.1 Pro | $2/$12 | `@reviewer` |
97+
| **Security** | Vulnerability scanning | Gemini 3.1 Pro | $2/$12 | `@security` |
98+
| **QA** | Test generation & execution | GPT 5.3 Codex | $1.75/$14 | `@qa` |
99+
| **Test Gen** | BDD/requirements-driven tests | GPT 5.3 Codex | $1.75/$14 | `@test_generator` |
100+
| **Docs** | Inline + external docs | Gemini 3 Flash | Budget | `@docs_generator` |
101+
| **PM** | Linear integration | Gemini 3 Flash | Budget | `@linear` |
102+
| **Committer** | Git automation | MiniMax Free | FREE | `@commiter` |
103+
104+
Agent configs live in [`opencode/aig_agents/`](opencode/aig_agents/). Rules live in [`skills/`](skills/) (symlinked into [`.claude/rules/`](.claude/rules/)) and [`.cursor/rules/`](.cursor/rules/).
75105

76106
For frontend design skills (`/audit`, `/polish`, `/critique`, `/animate`, `/frontend-design`, etc.), install [Impeccable](https://impeccable.style/):
77107

78108
```bash
79109
npx skills add pbakaus/impeccable
80110
```
81111

82-
| Agent | Specialty | Invoke With |
83-
| :--- | :--- | :--- |
84-
| **Advisor** | Task routing & agent selection | `@agent-advisor` |
85-
| **Architect** | System design & planning | `@planning-agent` |
86-
| **Reviewer** | Code & architecture review | `@plan-reviewer` `@reviewer` |
87-
| **Engineer** | Complex features & refactoring | `@engineer` |
88-
| **Lead Dev** | Fast implementation & fixes | `@lead_dev` |
89-
| **QA** | Test generation & execution | `@qa` `@test_generator` |
90-
| **Security** | Vulnerability scanning | `@security` |
91-
| **PM** | Linear integration & project mgmt | `@linear` |
92-
93-
Agent configs live in [`opencode/aig_agents/`](opencode/aig_agents/). Rules live in [`skills/`](skills/) (symlinked into [`.claude/rules/`](.claude/rules/)) and [`.cursor/rules/`](.cursor/rules/).
94-
95112
## Open-Source Tools of Interest
96113

97114
Tools and projects from the community that complement this workflow:
@@ -145,7 +162,13 @@ git config --global include.path ~/devkit/.config/git/delta.gitconfig
145162
echo 'source ~/devkit/.config/shell/enhancements.zsh' >> ~/.zshrc
146163
```
147164

148-
**4. Reload shell**
165+
**4. Set up OpenCode + Copilot (optional)**
166+
167+
```bash
168+
./scripts/opencode-setup.sh
169+
```
170+
171+
**5. Reload shell**
149172

150173
```bash
151174
source ~/.zshrc

brewfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ brew "golang" # Go programming language
2626
brew "dotnet" # .NET SDK
2727
brew "docker" # Container platform
2828
brew "gh" # GitHub CLI (for Copilot and GitHub integration)
29+
# After brew bundle, run: gh extension install github/gh-copilot
2930

3031
# Applications (Casks)
3132
cask "ghostty"

opencode.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"$schema": "https://opencode.ai/config.json",
3+
"model": "opencode/gpt-5.4",
4+
"small_model": "opencode/minimax-m2.5-free",
5+
"mode": {
6+
"build": {
7+
"model": "opencode/gpt-5.4",
8+
"tools": {
9+
"write": true,
10+
"edit": true,
11+
"bash": true
12+
}
13+
},
14+
"plan": {
15+
"model": "opencode/gemini-3.1-pro",
16+
"tools": {
17+
"write": false,
18+
"edit": false,
19+
"bash": false
20+
}
21+
}
22+
},
23+
"mcp": {
24+
"github": {
25+
"type": "local",
26+
"command": ["gh", "copilot", "mcp"],
27+
"enabled": true
28+
},
29+
"context7": {
30+
"type": "local",
31+
"command": ["npx", "-y", "@context7/mcp-server"],
32+
"enabled": true
33+
},
34+
"linear": {
35+
"type": "local",
36+
"command": ["npx", "-y", "@linear/mcp-server"],
37+
"enabled": true,
38+
"environment": {
39+
"LINEAR_API_KEY": "{env:LINEAR_API_KEY}"
40+
}
41+
},
42+
"filesystem": {
43+
"type": "local",
44+
"command": ["npx", "-y", "@modelcontextprotocol/server-filesystem"],
45+
"enabled": false
46+
}
47+
},
48+
"plugin": [
49+
"@ramtinj95/opencode-tokenscope"
50+
]
51+
}

0 commit comments

Comments
 (0)