# alvinunreal/oh-my-opencode-slim architecture

> Architecture diagram of the GitHub repository alvinunreal/oh-my-opencode-slim, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alvinunreal/oh-my-opencode-slim
- Repository: https://github.com/alvinunreal/oh-my-opencode-slim

## Overview

oh-my-opencode-slim is an OpenCode plugin that routes user work to specialized agents, commonly as parallel background tasks, then reconciles their results for the orchestrator. Its main runtime entry is `src/index.ts`; configuration and agent construction shape the team, while task-session management tracks child work. The README also documents code-intelligence tools, interviews, presets, marketplace packages, live multiplexer panes, and an optional desktop companion. Relationships reflect documented capabilities and sampled calls; some subsystem wiring is not visible in the excerpts.

Main entry points: [`src/index.ts`](https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/index.ts) (Plugin entry), [`src/agents/index.ts`](https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/agents/index.ts) (Agent definitions), [`src/agents`](https://github.com/alvinunreal/oh-my-opencode-slim/tree/master/src/agents) (Specialist agents), [`src/hooks/task-session-manager/index.ts`](https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/hooks/task-session-manager/index.ts) (Task session manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Plugin runtime"]
  node_plugin["Plugin entry<br/>[index.ts]"]
  node_config["Configuration<br/>[index.ts]"]
end

subgraph group_agents["Agent team"]
  node_agentfactory["Agent definitions<br/>[index.ts]"]
  node_specialists["Specialist agents"]
  node_council["Council synthesis<br/>[council.ts]"]
end

subgraph group_tasks["Task coordination"]
  node_taskmanager["Task session manager<br/>[index.ts]"]
  node_jobboard[("Background job state")]
  node_tasktools["Task controls"]
end

subgraph group_features["User features"]
  node_tooling["Code intelligence"]
  node_mcp["Docs and code MCPs<br/>[index.ts]"]
  node_interview["Interview workflow<br/>[manager.ts]"]
  node_marketplace["Marketplace packages<br/>[service.ts]"]
end

subgraph group_interfaces["User interfaces"]
  node_preset["Preset switching<br/>[preset-switch.ts]"]
  node_multiplexer["Pane integration<br/>[index.ts]"]
  node_companion["Desktop companion<br/>[manager.ts]"]
end

node_user(("OpenCode user"))
node_host(("OpenCode host"))
node_models(("Model providers"))
node_registry(("Package registry"))

node_user -->|"submits work"| node_host
node_host -->|"loads plugin"| node_plugin
node_plugin -->|"loads settings"| node_config
node_plugin -->|"builds agents"| node_agentfactory
node_agentfactory -->|"configures roles"| node_specialists
node_specialists -->|"invoke models"| node_models
node_plugin -->|"tracks sessions"| node_taskmanager
node_taskmanager -->|"updates jobs"| node_jobboard
node_tasktools -->|"reads job state"| node_jobboard
node_plugin -->|"registers tools"| node_tasktools
node_plugin -->|"registers tools"| node_tooling
node_tooling -->|"uses MCPs"| node_mcp
node_plugin -->|"enables interviews"| node_interview
node_plugin -->|"exposes packages"| node_marketplace
node_marketplace -.->|"fetches packages"| node_registry
node_user -->|"requests synthesis"| node_council
node_user -->|"switches preset"| node_preset
node_plugin -.->|"enables panes"| node_multiplexer
node_plugin -.->|"updates activity"| node_companion

click node_plugin "https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/index.ts"
click node_config "https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/config/index.ts"
click node_agentfactory "https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/agents/index.ts"
click node_specialists "https://github.com/alvinunreal/oh-my-opencode-slim/tree/master/src/agents"
click node_council "https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/agents/council.ts"
click node_taskmanager "https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/hooks/task-session-manager/index.ts"
click node_jobboard "https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/utils/background-job-board.ts"
click node_tasktools "https://github.com/alvinunreal/oh-my-opencode-slim/tree/master/src/tools"
click node_tooling "https://github.com/alvinunreal/oh-my-opencode-slim/tree/master/src/tools"
click node_mcp "https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/mcp/index.ts"
click node_interview "https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/interview/manager.ts"
click node_marketplace "https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/marketplace/service.ts"
click node_preset "https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/tools/preset-switch.ts"
click node_multiplexer "https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/multiplexer/index.ts"
click node_companion "https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/companion/manager.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_plugin,node_config,node_user toneBlue
class node_agentfactory,node_specialists,node_council toneAmber
class node_taskmanager,node_jobboard,node_tasktools toneMint
class node_tooling,node_mcp,node_interview,node_marketplace toneRose
class node_preset,node_multiplexer,node_companion,node_host,node_models,node_registry toneIndigo
```

## Components

### Plugin runtime

- [Plugin entry](https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/index.ts): `src/index.ts`
- [Configuration](https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/config/index.ts): `src/config/index.ts`

### Agent team

- [Agent definitions](https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/agents/index.ts): `src/agents/index.ts`
- [Specialist agents](https://github.com/alvinunreal/oh-my-opencode-slim/tree/master/src/agents): `src/agents`
- [Council synthesis](https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/agents/council.ts): `src/agents/council.ts`

### Task coordination

- [Task session manager](https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/hooks/task-session-manager/index.ts): `src/hooks/task-session-manager/index.ts`
- [Background job state](https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/utils/background-job-board.ts): `src/utils/background-job-board.ts`
- [Task controls](https://github.com/alvinunreal/oh-my-opencode-slim/tree/master/src/tools): `src/tools`

### User features

- [Code intelligence](https://github.com/alvinunreal/oh-my-opencode-slim/tree/master/src/tools): `src/tools`
- [Docs and code MCPs](https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/mcp/index.ts): `src/mcp/index.ts`
- [Interview workflow](https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/interview/manager.ts): `src/interview/manager.ts`
- [Marketplace packages](https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/marketplace/service.ts): `src/marketplace/service.ts`

### User interfaces

- [Preset switching](https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/tools/preset-switch.ts): `src/tools/preset-switch.ts`
- [Pane integration](https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/multiplexer/index.ts): `src/multiplexer/index.ts`
- [Desktop companion](https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/companion/manager.ts): `src/companion/manager.ts`

### Other components

- **OpenCode user**
- **OpenCode host**
- **Model providers**
- **Package registry**

## Connections

- OpenCode user → OpenCode host: submits work
- OpenCode host → Plugin entry: loads plugin
- Plugin entry → Configuration: loads settings
- Plugin entry → Agent definitions: builds agents
- Agent definitions → Specialist agents: configures roles
- Specialist agents → Model providers: invoke models
- Plugin entry → Task session manager: tracks sessions
- Task session manager → Background job state: updates jobs
- Task controls → Background job state: reads job state
- Plugin entry → Task controls: registers tools
- Plugin entry → Code intelligence: registers tools
- Code intelligence → Docs and code MCPs: uses MCPs
- Plugin entry → Interview workflow: enables interviews
- Plugin entry → Marketplace packages: exposes packages
- Marketplace packages → Package registry: fetches packages
- OpenCode user → Council synthesis: requests synthesis
- OpenCode user → Preset switching: switches preset
- Plugin entry → Pane integration: enables panes
- Plugin entry → Desktop companion: updates activity
