oh-my-opencode-slim 0.6.2 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +15 -777
  2. package/dist/background/background-manager.d.ts +69 -32
  3. package/dist/background/tmux-session-manager.d.ts +33 -21
  4. package/dist/cli/config-io.d.ts +0 -1
  5. package/dist/cli/index.js +34 -112
  6. package/dist/cli/providers.d.ts +7 -71
  7. package/dist/cli/types.d.ts +3 -3
  8. package/dist/config/schema.d.ts +7 -0
  9. package/dist/index.js +299 -589
  10. package/dist/tools/background.d.ts +4 -52
  11. package/dist/tools/index.d.ts +0 -1
  12. package/package.json +5 -2
  13. package/dist/agents/prompts.d.ts +0 -17
  14. package/dist/agents/types.d.ts +0 -14
  15. package/dist/cli/model-mappings.d.ts +0 -25
  16. package/dist/features/background-manager.d.ts +0 -94
  17. package/dist/features/index.d.ts +0 -2
  18. package/dist/features/tmux-session-manager.d.ts +0 -46
  19. package/dist/shared/agent-variant.d.ts +0 -23
  20. package/dist/shared/binary-downloader.d.ts +0 -14
  21. package/dist/shared/formatters.d.ts +0 -7
  22. package/dist/shared/index.d.ts +0 -2
  23. package/dist/shared/logger.d.ts +0 -1
  24. package/dist/shared/polling.d.ts +0 -23
  25. package/dist/shared/tmux.d.ts +0 -42
  26. package/dist/shared/zip-extractor.d.ts +0 -1
  27. package/dist/tools/cartography/index.d.ts +0 -6
  28. package/dist/tools/cartography/tool.d.ts +0 -2
  29. package/dist/tools/lsp/protocol-parser.d.ts +0 -14
  30. package/dist/tools/lsp/text-editor.d.ts +0 -13
  31. package/dist/tools/poc_orchestrator.d.ts +0 -6
  32. package/dist/tools/shared/downloader-utils.d.ts +0 -46
  33. package/dist/tools/skill/builtin.d.ts +0 -45
  34. package/dist/tools/skill/constants.d.ts +0 -3
  35. package/dist/tools/skill/index.d.ts +0 -3
  36. package/dist/tools/skill/mcp-manager.d.ts +0 -25
  37. package/dist/tools/skill/tools.d.ts +0 -8
  38. package/dist/tools/skill/types.d.ts +0 -92
  39. package/src/skills/cartography/scripts/__pycache__/cartographer.cpython-312.pyc +0 -0
package/README.md CHANGED
@@ -1,205 +1,39 @@
1
1
  <div align="center">
2
-
3
- # oh-my-opencode-slim
4
-
5
- **A lightweight, powerful agent orchestration plugin for OpenCode**
6
-
7
- <img src="img/team.png" alt="The Pantheon - Agent Team" width="800">
8
-
9
- *Six divine beings emerged from the dawn of code, each an immortal master of their craft await your command to forge order from chaos and build what was once thought impossible.*
10
-
2
+ <img src="img/team.png" alt="Pantheon agents" width="420">
3
+ <p><i>Six divine beings emerged from the dawn of code, each an immortal master of their craft await your command to forge order from chaos and build what was once thought impossible.</i></p>
4
+ <p><b>Multi Agent Suite</b> · Mix any models · Auto delegate tasks</p>
11
5
  </div>
12
6
 
13
- > Slimmed-down fork of [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode) - focused on core agent orchestration with low token consumption.
14
-
15
- ---
16
-
17
- ## Table of Contents
18
-
19
- - [📦 Installation](#-installation)
20
- - [For Humans](#for-humans)
21
- - [For LLM Agents](#for-llm-agents)
22
- - [🏛️ Meet the Pantheon](#️-meet-the-pantheon)
23
- - [01. Orchestrator: The Embodiment Of Order](#01-orchestrator-the-embodiment-of-order)
24
- - [02. Explorer: The Eternal Wanderer](#02-explorer-the-eternal-wanderer)
25
- - [03. Oracle: The Guardian of Paths](#03-oracle-the-guardian-of-paths)
26
- - [04. Librarian: The Weaver of Knowledge](#04-librarian-the-weaver-of-knowledge)
27
- - [05. Designer: The Guardian of Aesthetics](#05-designer-the-guardian-of-aesthetics)
28
- - [06. Fixer: The Last Builder](#06-fixer-the-last-builder)
29
- - [🎚️ Presets](#️-presets)
30
- - [Switching Presets](#switching-presets)
31
- - [OpenAI Preset](#openai-preset)
32
- - [Antigravity via CLIProxy Preset](#antigravity-via-cliproxy-preset)
33
- - [Author's Preset](#authors-preset)
34
- - [🧩 Skills](#-skills)
35
- - [Simplify](#simplify)
36
- - [Agent Browser](#agent-browser)
37
- - [Cartography](#cartography)
38
- - [Skills Assignment](#skills-assignment)
39
- - [🔌 MCP Servers](#-mcp-servers)
40
- - [MCP Permissions](#mcp-permissions)
41
- - [Configuration & Syntax](#configuration--syntax-1)
42
- - [🛠️ Tools & Capabilities](#️-tools--capabilities)
43
- - [Tmux Integration](#tmux-integration)
44
- - [Background Tasks](#background-tasks)
45
- - [LSP Tools](#lsp-tools)
46
- - [Code Search Tools](#code-search-tools)
47
- - [Formatters](#formatters)
48
- - [⚙️ Configuration](#️-configuration)
49
- - [Files You Edit](#files-you-edit)
50
- - [Prompt Overriding](#prompt-overriding)
51
- - [Plugin Config (oh-my-opencode-slim.json)](#plugin-config-oh-my-opencode-slimjson)
52
- - [🗑️ Uninstallation](#️-uninstallation)
53
- - [🙏 Credits](#-credits)
54
- - [📄 License](#-license)
55
-
56
7
  ---
57
8
 
58
9
  ## 📦 Installation
59
10
 
60
- ### For Humans
61
-
62
- Run the interactive installer:
11
+ ### Quick Start
63
12
 
64
13
  ```bash
65
14
  bunx oh-my-opencode-slim@latest install
66
15
  ```
67
16
 
68
- Or use non-interactive mode:
69
-
70
- ```bash
71
- bunx oh-my-opencode-slim@latest install --no-tui --antigravity=yes --openai=yes --tmux=no
72
- ```
73
-
74
- After installation, authenticate with your providers:
17
+ Then authenticate:
75
18
 
76
19
  ```bash
77
20
  opencode auth login
78
- # Select your provider → Complete OAuth flow
79
- # Repeat for each provider you enabled
80
21
  ```
81
22
 
82
- Once authenticated, run opencode and `ping all agents` to verify all agents respond.
23
+ Run `ping all agents` to verify everything works.
83
24
 
84
- <img src="img/ping.png" alt="Ping All Agents" width="800">
25
+ > **💡 Models are fully customizable.** Edit `~/.config/opencode/oh-my-opencode-slim.json` to assign any model to any agent.
85
26
 
86
- > **💡 Tip: Models are fully customizable.** The installer sets sensible defaults, but you can assign *any* model to *any* agent. Edit `~/.config/opencode/oh-my-opencode-slim.json` to override models, adjust reasoning effort, or disable agents entirely. See [Configuration](#configuration) for details.
87
-
88
- **Alternative: Ask any coding agent**
27
+ ### For LLM Agents
89
28
 
90
- Paste this into Claude Code, AmpCode, Cursor, or any coding agent:
29
+ Paste this into any coding agent:
91
30
 
92
31
  ```
93
32
  Install and configure by following the instructions here:
94
33
  https://raw.githubusercontent.com/alvinunreal/oh-my-opencode-slim/refs/heads/master/README.md
95
34
  ```
96
35
 
97
- ### For LLM Agents
98
-
99
- <details>
100
- <summary>Instructions for LLM Agents (click to expand)</summary>
101
-
102
- If you're an LLM Agent helping set up oh-my-opencode-slim, follow these steps.
103
-
104
- ---
105
-
106
- #### Step 1: Check OpenCode Installation
107
-
108
- ```bash
109
- opencode --version
110
- ```
111
-
112
- If not installed, direct the user to https://opencode.ai/docs first.
113
-
114
- ---
115
-
116
- #### Step 2: Ask About Provider Access
117
-
118
- Ask these questions **one at a time**, waiting for responses:
119
-
120
- 1. "Do you have an **Antigravity** subscription (via cliproxy)?" *(Provides Claude + Gemini via `cliproxy/` prefix)*
121
- 2. "Do you have access to **OpenAI** API?" *(Enables `openai/` models)*
122
-
123
- Help the user understand the tradeoffs:
124
- - Antigravity via cliproxy provides Claude + Gemini routing.
125
- - OpenAI is optional; it enables `openai/` models.
126
- - If the user has **no providers**, the plugin still works using **OpenCode Zen** free models (`opencode/big-pickle`). They can switch to paid providers later by editing `~/.config/opencode/oh-my-opencode-slim.json`.
127
-
128
- ---
129
-
130
- #### Step 3: Run the Installer
131
-
132
- Based on answers, run:
133
-
134
- ```bash
135
- bunx oh-my-opencode-slim@latest install --no-tui --antigravity=<yes|no> --openai=<yes|no>
136
- ```
137
-
138
- **Examples:**
139
- ```bash
140
- # Antigravity + OpenAI
141
- bunx oh-my-opencode-slim@latest install --no-tui --antigravity=yes --openai=yes --tmux=no
142
-
143
- # OpenAI only
144
- bunx oh-my-opencode-slim@latest install --no-tui --antigravity=no --openai=yes --tmux=no
145
-
146
- # No providers (Zen free models only)
147
- bunx oh-my-opencode-slim@latest install --no-tui --antigravity=no --openai=no --tmux=no
148
- ```
149
-
150
- The installer automatically:
151
- - Adds the plugin to `~/.config/opencode/opencode.json`
152
- - Configures cliproxy provider for Antigravity models
153
- - Generates agent model mappings in `~/.config/opencode/oh-my-opencode-slim.json`
154
-
155
- **Crucial Advice for the User:**
156
- - They can easily assign **different models to different agents** by editing `~/.config/opencode/oh-my-opencode-slim.json`.
157
- - If they add a new provider later, they just need to update this file.
158
- - Read generated `~/.config/opencode/oh-my-opencode-slim.json` file and report the model configuration.
159
-
160
- ---
161
-
162
- #### Step 4: Install and Configure Cliproxy (if using Antigravity)
163
-
164
- If the user selected Antigravity, guide them to install cliproxy:
165
-
166
- **macOS:**
167
- ```bash
168
- brew install cliproxyapi
169
- brew services start cliproxyapi
170
- ```
171
-
172
- **Linux:**
173
- ```bash
174
- curl -fsSL https://raw.githubusercontent.com/brokechubb/cliproxyapi-installer/refs/heads/master/cliproxyapi-installer | bash
175
- ```
176
-
177
- **Authenticate with Antigravity:**
178
- ```bash
179
- ./cli-proxy-api --antigravity-login
180
- ```
181
-
182
- **For OpenAI (if enabled):**
183
- Ask user to run the following command.
184
- Don't run it yourself, it requires user interaction.
185
- ```bash
186
- opencode auth login
187
- # Select your provider and complete OAuth flow
188
- ```
189
-
190
- ---
191
-
192
- #### Troubleshooting
193
-
194
- If the installer fails, check the expected config format:
195
- ```bash
196
- bunx oh-my-opencode-slim@latest install --help
197
- ```
198
-
199
- Then manually create the config files at:
200
- - `~/.config/opencode/oh-my-opencode-slim.json`
201
-
202
- </details>
36
+ **Detailed installation guide:** [docs/installation.md](docs/installation.md)
203
37
 
204
38
  ---
205
39
 
@@ -229,23 +63,7 @@ Then manually create the config files at:
229
63
  </tr>
230
64
  <tr>
231
65
  <td colspan="2">
232
- <b>Recommended Models:</b> <code>cliproxy/gemini-claude-opus-4-5-thinking</code> <code>openai/gpt-5.2-codex</code>
233
- </td>
234
- </tr>
235
- <tr>
236
- <td colspan="2">
237
- <b>MCPs:</b> <code>websearch</code>
238
- </td>
239
- </tr>
240
- <tr>
241
- <td colspan="2">
242
- <b>Skills:</b> <code>simplify</code> <code>*</code>
243
- </td>
244
- </tr>
245
- <tr>
246
- <td colspan="2">
247
- <b>Capabilities:</b><br>
248
- Write and execute code, orchestrate multi-agent workflows, parse the unspoken from the spoken, summon specialists mid-battle. <i>Shape reality directly - and assign realms to others when the universe grows too vast.</i>
66
+ <b>Recommended Models:</b> <code>kimi-for-coding/k2p5</code> <code>openai/gpt-5.2-codex</code>
249
67
  </td>
250
68
  </tr>
251
69
  </table>
@@ -279,22 +97,6 @@ Then manually create the config files at:
279
97
  <b>Recommended Models:</b> <code>cerebras/zai-glm-4.7</code> <code>google/gemini-3-flash</code> <code>openai/gpt-5.1-codex-mini</code>
280
98
  </td>
281
99
  </tr>
282
- <tr>
283
- <td colspan="2">
284
- <b>MCPs:</b> none
285
- </td>
286
- </tr>
287
- <tr>
288
- <td colspan="2">
289
- <b>Skills:</b> none
290
- </td>
291
- </tr>
292
- <tr>
293
- <td colspan="2">
294
- <b>Capabilities:</b><br>
295
- Regex search, AST pattern matching, file discovery, parallel exploration. <i>Read-only: they chart the territory; others conquer it.</i>
296
- </td>
297
- </tr>
298
100
  </table>
299
101
 
300
102
  ---
@@ -323,23 +125,7 @@ Then manually create the config files at:
323
125
  </tr>
324
126
  <tr>
325
127
  <td colspan="2">
326
- <b>Recommended Models:</b> <code>openai/gpt-5.2-codex</code> <code>cliproxy/gemini-3-pro-high</code>
327
- </td>
328
- </tr>
329
- <tr>
330
- <td colspan="2">
331
- <b>MCPs:</b> none
332
- </td>
333
- </tr>
334
- <tr>
335
- <td colspan="2">
336
- <b>Skills:</b> none
337
- </td>
338
- </tr>
339
- <tr>
340
- <td colspan="2">
341
- <b>Capabilities:</b><br>
342
- Root cause analysis, architecture review, debugging guidance, tradeoff analysis. <i>Read-only: Oracles advise; they don't intervene.</i>
128
+ <b>Recommended Models:</b> <code>openai/gpt-5.2-codex</code> <code>kimi-for-coding/k2p5</code>
343
129
  </td>
344
130
  </tr>
345
131
  </table>
@@ -373,22 +159,6 @@ Then manually create the config files at:
373
159
  <b>Recommended Models:</b> <code>google/gemini-3-flash</code> <code>openai/gpt-5.1-codex-mini</code>
374
160
  </td>
375
161
  </tr>
376
- <tr>
377
- <td colspan="2">
378
- <b>MCPs:</b> <code>websearch</code> <code>context7</code> <code>grep_app</code>
379
- </td>
380
- </tr>
381
- <tr>
382
- <td colspan="2">
383
- <b>Skills:</b> none
384
- </td>
385
- </tr>
386
- <tr>
387
- <td colspan="2">
388
- <b>Capabilities:</b><br>
389
- Documentation lookup, GitHub code search, library research, best practice retrieval. <i>Read-only: they fetch wisdom; implementation is for others.</i>
390
- </td>
391
- </tr>
392
162
  </table>
393
163
 
394
164
  ---
@@ -420,22 +190,6 @@ Then manually create the config files at:
420
190
  <b>Recommended Models:</b> <code>google/gemini-3-flash</code>
421
191
  </td>
422
192
  </tr>
423
- <tr>
424
- <td colspan="2">
425
- <b>MCPs:</b> none
426
- </td>
427
- </tr>
428
- <tr>
429
- <td colspan="2">
430
- <b>Skills:</b> <code>agent-browser</code>
431
- </td>
432
- </tr>
433
- <tr>
434
- <td colspan="2">
435
- <b>Capabilities:</b><br>
436
- Modern responsive design, CSS/Tailwind mastery, micro-animations, component architecture. <i>Visual excellence over code perfection - beauty is the priority.</i>
437
- </td>
438
- </tr>
439
193
  </table>
440
194
 
441
195
  ---
@@ -467,530 +221,14 @@ Then manually create the config files at:
467
221
  <b>Recommended Models:</b> <code>cerebras/zai-glm-4.7</code> <code>google/gemini-3-flash</code> <code>openai/gpt-5.1-codex-mini</code>
468
222
  </td>
469
223
  </tr>
470
- <tr>
471
- <td colspan="2">
472
- <b>MCPs:</b> none
473
- </td>
474
- </tr>
475
- <tr>
476
- <td colspan="2">
477
- <b>Skills:</b> none
478
- </td>
479
- </tr>
480
- <tr>
481
- <td colspan="2">
482
- <b>Capabilities:</b><br>
483
- Code implementation, refactoring, testing, verification. <i>Execute the plan - no research, no delegation, no planning.</i>
484
- </td>
485
- </tr>
486
224
  </table>
487
225
 
488
226
  ---
489
227
 
490
- ## 🎚️ Presets
491
-
492
- Presets are pre-configured agent model mappings for different provider combinations. The installer generates these automatically based on your available providers, and you can switch between them instantly.
493
-
494
- ### Switching Presets
495
-
496
- **Method 1: Edit Config File**
497
-
498
- Edit `~/.config/opencode/oh-my-opencode-slim.json` and change the `preset` field:
499
-
500
- ```json
501
- {
502
- "preset": "openai"
503
- }
504
- ```
505
-
506
- **Method 2: Environment Variable**
507
-
508
- Set the environment variable before running OpenCode:
509
-
510
- ```bash
511
- export OH_MY_OPENCODE_SLIM_PRESET=openai
512
- opencode
513
- ```
514
-
515
- The environment variable takes precedence over the config file.
516
-
517
-
518
- ### OpenAI Preset
519
-
520
- Uses OpenAI models exclusively:
521
-
522
- ```json
523
- {
524
- "preset": "openai",
525
- "presets": {
526
- "openai": {
527
- "orchestrator": { "model": "openai/gpt-5.2-codex", "skills": ["*"], "mcps": ["websearch"] },
528
- "oracle": { "model": "openai/gpt-5.2-codex", "variant": "high", "skills": [], "mcps": [] },
529
- "librarian": { "model": "openai/gpt-5.1-codex-mini", "variant": "low", "skills": [], "mcps": ["websearch", "context7", "grep_app"] },
530
- "explorer": { "model": "openai/gpt-5.1-codex-mini", "variant": "low", "skills": [], "mcps": [] },
531
- "designer": { "model": "openai/gpt-5.1-codex-mini", "variant": "medium", "skills": ["agent-browser"], "mcps": [] },
532
- "fixer": { "model": "openai/gpt-5.1-codex-mini", "variant": "low", "skills": [], "mcps": [] }
533
- }
534
- }
535
- }
536
- ```
537
-
538
- ### Antigravity via CLIProxy Preset
539
-
540
- Routes through Antigravity's CLIProxy for Claude + Gemini models:
541
-
542
- ```json
543
- {
544
- "preset": "cliproxy",
545
- "presets": {
546
- "cliproxy": {
547
- "orchestrator": { "model": "cliproxy/gemini-claude-opus-4-5-thinking", "skills": ["*"], "mcps": ["websearch"] },
548
- "oracle": { "model": "cliproxy/gemini-3-pro-preview", "variant": "high", "skills": [], "mcps": [] },
549
- "librarian": { "model": "cliproxy/gemini-3-flash-preview", "variant": "low", "skills": [], "mcps": ["websearch", "context7", "grep_app"] },
550
- "explorer": { "model": "cliproxy/gemini-3-flash-preview", "variant": "low", "skills": [], "mcps": [] },
551
- "designer": { "model": "cliproxy/gemini-3-flash-preview", "variant": "medium", "skills": ["agent-browser"], "mcps": [] },
552
- "fixer": { "model": "cliproxy/gemini-3-flash-preview", "variant": "low", "skills": [], "mcps": [] }
553
- }
554
- }
555
- }
556
- ```
557
-
558
- <details>
559
- <summary>Verify provider configuration in ~/.config/opencode/opencode.json</summary>
560
-
561
- ```json
562
- {
563
- "provider": {
564
- "cliproxy": {
565
- "npm": "@ai-sdk/openai-compatible",
566
- "name": "CliProxy",
567
- "options": {
568
- "baseURL": "http://127.0.0.1:8317/v1",
569
- "apiKey": "your-api-key-1"
570
- },
571
- "models": {
572
- "gemini-3-pro-high": {
573
- "name": "Gemini 3 Pro High",
574
- "thinking": true,
575
- "attachment": true,
576
- "limit": { "context": 1048576, "output": 65535 },
577
- "modalities": { "input": [ "text", "image", "pdf" ], "output": [ "text" ] }
578
- },
579
- "gemini-3-flash-preview": {
580
- "name": "Gemini 3 Flash",
581
- "attachment": true,
582
- "limit": { "context": 1048576, "output": 65536 },
583
- "modalities": { "input": [ "text", "image", "pdf" ], "output": [ "text" ] }
584
- },
585
- "gemini-claude-opus-4-5-thinking": {
586
- "name": "Claude Opus 4.5 Thinking",
587
- "attachment": true,
588
- "limit": { "context": 200000, "output": 32000 },
589
- "modalities": { "input": [ "text", "image", "pdf" ], "output": [ "text" ] }
590
- },
591
- "gemini-claude-sonnet-4-5-thinking": {
592
- "name": "Claude Sonnet 4.5 Thinking",
593
- "attachment": true,
594
- "limit": { "context": 200000, "output": 32000 },
595
- "modalities": { "input": [ "text", "image", "pdf" ], "output": [ "text" ] }
596
- }
597
- }
598
- }
599
- }
600
- }
601
- ```
602
-
603
- </details>
604
-
605
- ### Author's Preset
606
-
607
- Mixed setup combining multiple providers:
608
-
609
- ```json
610
- {
611
- "preset": "alvin",
612
- "presets": {
613
- "alvin": {
614
- "orchestrator": { "model": "cliproxy/gemini-claude-opus-4-5-thinking", "skills": ["*"], "mcps": ["*"] },
615
- "oracle": { "model": "openai/gpt-5.2-codex", "variant": "high", "skills": [], "mcps": [] },
616
- "librarian": { "model": "cliproxy/gemini-3-flash-preview", "variant": "low", "skills": [], "mcps": ["websearch", "context7", "grep_app"] },
617
- "explorer": { "model": "cerebras/zai-glm-4.7", "variant": "low", "skills": [], "mcps": [] },
618
- "designer": { "model": "cliproxy/gemini-3-flash-preview", "variant": "medium", "skills": ["agent-browser"], "mcps": [] },
619
- "fixer": { "model": "cerebras/zai-glm-4.7", "variant": "low", "skills": [], "mcps": [] }
620
- }
621
- }
622
- }
623
- ```
624
-
625
- ---
626
-
627
- ## 🧩 Skills
628
-
629
- Skills are specialized capabilities provided by external agents and tools. Unlike MCPs which are servers, skills are prompt-based tool configurations installed via `npx skills add` during installation.
630
-
631
- ### Recommended Skills (via npx)
632
-
633
- | Skill | Description | Assigned To |
634
- |-------|-------------|-------------|
635
- | [`simplify`](#simplify) | YAGNI code simplification expert | `orchestrator` |
636
- | [`agent-browser`](#agent-browser) | High-performance browser automation | `designer` |
637
-
638
- ### Custom Skills (bundled in repo)
639
-
640
- | Skill | Description | Assigned To |
641
- |-------|-------------|-------------|
642
- | [`cartography`](#cartography) | Repository understanding and hierarchical codemap generation | `orchestrator` |
643
-
644
- ### Simplify
645
-
646
- **The Minimalist's sacred truth: every line of code is a liability.**
647
-
648
- `simplify` is a specialized skill for complexity analysis and YAGNI enforcement. It identifies unnecessary abstractions and suggests minimal implementations.
649
-
650
- ### Agent Browser
651
-
652
- **External browser automation for visual verification and testing.**
653
-
654
- `agent-browser` provides full high-performance browser automation capabilities. It allows agents to browse the web, interact with elements, and capture screenshots for visual state verification.
655
-
656
- ### Cartography
657
-
658
- **Automated repository mapping through hierarchical codemaps.**
659
-
660
- <img src="img/cartography.png" alt="Cartography Skill" width="800" style="border-radius: 10px; margin: 20px 0;">
661
-
662
- `cartography` empowers the Orchestrator to build and maintain a deep architectural understanding of any codebase. Instead of reading thousands of lines of code every time, agents refer to hierarchical `codemap.md` files that describe the *why* and *how* of each directory.
663
-
664
- **How to use:**
665
-
666
- Just ask the **Orchestrator** to `run cartography`. It will automatically detect if it needs to initialize a new map or update an existing one.
667
-
668
- **Why it's useful:**
669
-
670
- - **Instant Onboarding:** Help agents (and humans) understand unfamiliar codebases in seconds.
671
- - **Efficient Context:** Agents only read architectural summaries, saving tokens and improving accuracy.
672
- - **Change Detection:** Only modified folders are re-analyzed, making updates fast and efficient.
673
- - **Timeless Documentation:** Focuses on high-level design patterns that don't get stale.
674
-
675
- <details>
676
- <summary><b>Technical Details & Manual Control</b></summary>
677
-
678
- The skill uses a background Python engine (`cartographer.py`) to manage state and detect changes.
679
-
680
- **How it works under the hood:**
681
-
682
- 1. **Initialize** - Orchestrator analyzes repo structure and runs `init` to create `.slim/cartography.json` (hashes) and empty templates.
683
- 2. **Map** - Orchestrator spawns specialized **Explorer** sub-agents to fill codemaps with timeless architectural details (Responsibility, Design, Flow, Integration).
684
- 3. **Update** - On subsequent runs, the engine detects changed files and only refreshes codemaps for affected folders.
685
-
686
- **Manual Commands:**
687
-
688
- ```bash
689
- # Initialize mapping manually
690
- python3 ~/.config/opencode/skills/cartography/scripts/cartographer.py init \
691
- --root . \
692
- --include "src/**/*.ts" \
693
- --exclude "**/*.test.ts"
694
-
695
- # Check for changes since last map
696
- python3 ~/.config/opencode/skills/cartography/scripts/cartographer.py changes --root .
697
-
698
- # Sync hashes after manual map updates
699
- python3 ~/.config/opencode/skills/cartography/scripts/cartographer.py update --root .
700
- ```
701
- </details>
702
-
703
- ### Skills Assignment
704
-
705
- You can customize which skills each agent is allowed to use in `~/.config/opencode/oh-my-opencode-slim.json`.
706
-
707
- **Syntax:**
708
-
709
- | Syntax | Description | Example |
710
- |--------|-------------|---------|
711
- | `"*"` | All installed skills | `["*"]` |
712
- | `"!item"` | Exclude specific skill | `["*", "!agent-browser"]` |
713
- | Explicit list | Only listed skills | `["simplify"]` |
714
- | `"!*"` | Deny all skills | `["!*"]` |
715
-
716
- **Rules:**
717
- - `*` expands to all available skills
718
- - `!item` excludes specific skills
719
- - Conflicts (e.g., `["a", "!a"]`) → deny wins (principle of least privilege)
720
- - Empty list `[]` → no skills allowed
721
-
722
- **Example Configuration:**
723
-
724
- ```json
725
- {
726
- "presets": {
727
- "my-preset": {
728
- "orchestrator": {
729
- "skills": ["*", "!agent-browser"]
730
- },
731
- "designer": {
732
- "skills": ["agent-browser", "simplify"]
733
- }
734
- }
735
- }
736
- }
737
- ```
738
-
739
- ---
740
-
741
- ## 🔌 MCP Servers
742
-
743
- Built-in Model Context Protocol servers (enabled by default):
744
-
745
- | MCP | Purpose | URL |
746
- |-----|---------|-----|
747
- | `websearch` | Real-time web search via Exa AI | `https://mcp.exa.ai/mcp` |
748
- | `context7` | Official library documentation | `https://mcp.context7.com/mcp` |
749
- | `grep_app` | GitHub code search via grep.app | `https://mcp.grep.app` |
750
-
751
- ### MCP Permissions
752
-
753
- Control which agents can access which MCP servers using per-agent allowlists:
754
-
755
- | Agent | Default MCPs |
756
- |-------|--------------|
757
- | `orchestrator` | `websearch` |
758
- | `designer` | none |
759
- | `oracle` | none |
760
- | `librarian` | `websearch`, `context7`, `grep_app` |
761
- | `explorer` | none |
762
- | `fixer` | none |
763
-
764
- ### Configuration & Syntax
765
-
766
- You can configure MCP access in your plugin configuration file: `~/.config/opencode/oh-my-opencode-slim.json`.
767
-
768
- **Per-Agent Permissions**
769
-
770
- Control which agents can access which MCP servers using the `mcps` array in your preset. The syntax is the same as for skills:
771
-
772
- | Syntax | Description | Example |
773
- |--------|-------------|---------|
774
- | `"*"` | All MCPs | `["*"]` |
775
- | `"!item"` | Exclude specific MCP | `["*", "!context7"]` |
776
- | Explicit list | Only listed MCPs | `["websearch", "context7"]` |
777
- | `"!*"` | Deny all MCPs | `["!*"]` |
778
-
779
- **Rules:**
780
- - `*` expands to all available MCPs
781
- - `!item` excludes specific MCPs
782
- - Conflicts (e.g., `["a", "!a"]`) → deny wins
783
- - Empty list `[]` → no MCPs allowed
784
-
785
- **Example Configuration:**
786
-
787
- ```json
788
- {
789
- "presets": {
790
- "my-preset": {
791
- "orchestrator": {
792
- "mcps": ["websearch"]
793
- },
794
- "librarian": {
795
- "mcps": ["websearch", "context7", "grep_app"]
796
- },
797
- "oracle": {
798
- "mcps": ["*", "!websearch"]
799
- }
800
- }
801
- }
802
- }
803
- ```
804
-
805
- **Global Disabling**
806
-
807
- You can disable specific MCP servers globally by adding them to the `disabled_mcps` array at the root of your config object.
808
-
809
- ---
810
-
811
- ## 🛠️ Tools & Capabilities
812
-
813
- ### Tmux Integration
814
-
815
- > ⚠️ **Temporary workaround:** Start OpenCode with `--port` to enable tmux integration. The port must match the `OPENCODE_PORT` environment variable (default: 4096). This is required until the upstream issue is resolved. [opencode#9099](https://github.com/anomalyco/opencode/issues/9099).
816
-
817
- <img src="img/tmux.png" alt="Tmux Integration" width="800">
818
-
819
- **Watch your agents work in real-time.** When the Orchestrator launches sub-agents or initiates background tasks, new tmux panes automatically spawn showing each agent's live progress. No more waiting in the dark.
820
-
821
- #### Quick Setup
822
-
823
- 1. **Enable tmux integration** in `oh-my-opencode-slim.json` (see [Plugin Config](#plugin-config-oh-my-opencode-slimjson)).
824
-
825
- ```json
826
- {
827
- "tmux": {
828
- "enabled": true,
829
- "layout": "main-vertical",
830
- "main_pane_size": 60
831
- }
832
- }
833
- ```
834
-
835
- 2. **Run OpenCode inside tmux**:
836
- ```bash
837
- tmux
838
- opencode --port 4096
839
- ```
840
-
841
- Or use a custom port (must match `OPENCODE_PORT` env var):
842
- ```bash
843
- tmux
844
- export OPENCODE_PORT=5000
845
- opencode --port 5000
846
- ```
847
-
848
- This allows multiple OpenCode instances on different ports.
849
-
850
-
851
- #### Layout Options
852
-
853
- | Layout | Description |
854
- |--------|-------------|
855
- | `main-vertical` | Your session on the left (60%), agents stacked on the right |
856
- | `main-horizontal` | Your session on top (60%), agents stacked below |
857
- | `tiled` | All panes in equal-sized grid |
858
- | `even-horizontal` | All panes side by side |
859
- | `even-vertical` | All panes stacked vertically |
860
-
861
- ---
862
-
863
- ### Background Tasks
864
-
865
- The plugin provides tools to manage asynchronous work:
866
-
867
- | Tool | Description |
868
- |------|-------------|
869
- | `background_task` | Launch an agent in a new session (`sync=true` blocks, `sync=false` runs in background) |
870
- | `background_output` | Fetch the result of a background task by ID |
871
- | `background_cancel` | Abort running tasks |
872
-
873
- ---
874
-
875
- ### LSP Tools
876
-
877
- Language Server Protocol integration for code intelligence:
878
-
879
- | Tool | Description |
880
- |------|-------------|
881
- | `lsp_goto_definition` | Jump to symbol definition |
882
- | `lsp_find_references` | Find all usages of a symbol across the workspace |
883
- | `lsp_diagnostics` | Get errors/warnings from the language server |
884
- | `lsp_rename` | Rename a symbol across all files |
885
-
886
- > **Built-in LSP Servers:** OpenCode includes pre-configured LSP servers for 30+ languages (TypeScript, Python, Rust, Go, etc.). See the [official documentation](https://opencode.ai/docs/lsp/#built-in) for the full list and requirements.
887
-
888
- ---
889
-
890
- ### Code Search Tools
891
-
892
- Fast code search and refactoring:
893
-
894
- | Tool | Description |
895
- |------|-------------|
896
- | `grep` | Fast content search using ripgrep |
897
- | `ast_grep_search` | AST-aware code pattern matching (25 languages) |
898
- | `ast_grep_replace` | AST-aware code refactoring with dry-run support |
899
-
900
- ---
901
-
902
- ### Formatters
903
-
904
- OpenCode automatically formats files after they're written or edited using language-specific formatters.
905
-
906
- > **Built-in Formatters:** Includes support for Prettier, Biome, gofmt, rustfmt, ruff, and 20+ others. See the [official documentation](https://opencode.ai/docs/formatters/#built-in) for the complete list.
907
-
908
- ---
909
-
910
- ## ⚙️ Configuration
911
-
912
- ### Files You Edit
913
-
914
- | File | Purpose |
915
- |------|---------|
916
- | `~/.config/opencode/opencode.json` | OpenCode core settings |
917
- | `~/.config/opencode/oh-my-opencode-slim.json` | Plugin settings (agents, tmux, MCPs) |
918
- | `.opencode/oh-my-opencode-slim.json` | Project-local plugin overrides (optional) |
919
-
920
- ---
921
-
922
- ### Prompt Overriding
923
-
924
- You can customize agent prompts by creating markdown files in `~/.config/opencode/oh-my-opencode-slim/`:
925
-
926
- | File | Purpose |
927
- |------|---------|
928
- | `{agent}.md` | Replaces the default prompt entirely |
929
- | `{agent}_append.md` | Appends to the default prompt |
930
-
931
- **Example:**
932
-
933
- ```
934
- ~/.config/opencode/oh-my-opencode-slim/
935
- ├── orchestrator.md # Custom orchestrator prompt
936
- ├── orchestrator_append.md # Append to default orchestrator prompt
937
- ├── explorer.md
938
- ├── explorer_append.md
939
- └── ...
940
- ```
941
-
942
- **Usage:**
943
-
944
- - Create `{agent}.md` to completely replace an agent's default prompt
945
- - Create `{agent}_append.md` to add custom instructions to the default prompt
946
- - Both files can exist simultaneously - the replacement takes precedence
947
- - If neither file exists, the default prompt is used
948
-
949
- This allows you to fine-tune agent behavior without modifying the source code.
950
-
951
- ---
952
-
953
- ### Plugin Config (`oh-my-opencode-slim.json`)
954
-
955
- The installer generates this file based on your providers. You can manually customize it to mix and match models. See the [Presets](#️-presets) section for detailed configuration options.
956
-
957
- #### Option Reference
958
-
959
- | Option | Type | Default | Description |
960
- |--------|------|---------|-------------|
961
- | `preset` | string | - | Name of the preset to use (e.g., `"openai"`, `"cliproxy"`) |
962
- | `presets` | object | - | Named preset configurations containing agent mappings |
963
- | `presets.<name>.<agent>.model` | string | - | Model ID for the agent (e.g., `"google/claude-opus-4-5-thinking"`) |
964
- | `presets.<name>.<agent>.temperature` | number | - | Temperature setting (0-2) for the agent |
965
- | `presets.<name>.<agent>.variant` | string | - | Agent variant for reasoning effort (e.g., `"low"`, `"medium"`, `"high"`) |
966
- | `presets.<name>.<agent>.skills` | string[] | - | Array of skill names the agent can use (`"*"` for all, `"!item"` to exclude) |
967
- | `presets.<name>.<agent>.mcps` | string[] | - | Array of MCP names the agent can use (`"*"` for all, `"!item"` to exclude) |
968
- | `tmux.enabled` | boolean | `false` | Enable tmux pane spawning for sub-agents |
969
- | `tmux.layout` | string | `"main-vertical"` | Layout preset: `main-vertical`, `main-horizontal`, `tiled`, `even-horizontal`, `even-vertical` |
970
- | `tmux.main_pane_size` | number | `60` | Main pane size as percentage (20-80) |
971
- | `disabled_mcps` | string[] | `[]` | MCP server IDs to disable globally (e.g., `"websearch"`) |
972
-
973
- > **Note:** Agent configuration should be defined within `presets`. The root-level `agents` field is deprecated.
974
-
975
- ---
976
-
977
- ## 🗑️ Uninstallation
978
-
979
- 1. **Remove the plugin from your OpenCode config**:
980
-
981
- Edit `~/.config/opencode/opencode.json` and remove `"oh-my-opencode-slim"` from the `plugin` array.
982
-
983
- 2. **Remove configuration files (optional)**:
984
- ```bash
985
- rm -f ~/.config/opencode/oh-my-opencode-slim.json
986
- rm -f .opencode/oh-my-opencode-slim.json
987
- ```
988
-
989
- ---
990
-
991
- ## 🙏 Credits
228
+ ## 📚 Documentation
992
229
 
993
- This is a slimmed-down fork of [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode) by [@code-yeongyu](https://github.com/code-yeongyu).
230
+ - **[Quick Reference](docs/quick-reference.md)** - Presets, Skills, MCPs, Tools, Configuration
231
+ - **[Installation Guide](docs/installation.md)** - Detailed installation and troubleshooting
994
232
 
995
233
  ---
996
234