codemod-runner
AgentWrites and runs codemod scripts that replace hardcoded visual values with token references in ui/src/index.css. Use for Phase 2…
Defines agent personalities (Orchestrator, Explorer, etc.) and manages their configuration lifecycle. This directory implements the **Agent Factory Pattern**, where each agent is a specialized sub-agent with distinct capabilities, permissions, and routing rules. The Orchestrator
Claude Code
$ npx -y skills add alvinunreal/oh-my-opencode-slim --agent claude-code
Cursor
Cursor also loads subagents from .claude/agents, so copy this file there to use it in Cursor.
Defines agent personalities (Orchestrator, Explorer, etc.) and manages their configuration lifecycle. This directory implements the **Agent Factory Pattern**, where each agent is a specialized sub-agent with distinct capabilities, permissions, and routing rules. The Orchestrator agent (src/agents/index.ts) coordinates task delegation to these specialists. Note: Council and Councillor agents are included for multi-model consensus, with Councillors created dynamically per preset.
Each agent is a **prompt-driven specialist** with a factory function that creates an `AgentDefinition`:
| Agent | Factory | Role | Permissions | Model Default | |-------|---------|------|-------------|---------------| | **orchestrator** | `createOrchestratorAgent()` | Workflow manager that delegates tasks to specialists | Primary agent with available guarded controls | Resolved from config or runtime preset | | **explorer** | `createExplorerAgent()` | Fast codebase search, pattern matching, and external docs/library/web research | Read-only defaults; tool descriptions own mechanics | DEFAULT_MODELS.explorer | | **oracle** | `createOracleAgent()` | Strategic technical advisor and code reviewer | Read-only defaults | DEFAULT_MODELS.oracle | | **designer** | `createDesignerAgent()` | UI/UX design, review, and implementation | Read/write defaults | DEFAULT_MODELS.designer | | **fixer** | `createFixerAgent()` | Fast implementation specialist for bounded tasks | Read/write defaults | DEFAULT_MODELS.fixer | | **observer** | `createObserverAgent()` | Visual analysis specialist (images, PDFs, diagrams) | Strict read-only defaults (no edit/write/shell/execute); requires a vision-capable model | DEFAULT_MODELS.observer | | **council** | `createCouncilAgent()` | Multi-model consensus synthesis (read-only, no tools) | Read-only (council permission) | DEFAULT_MODELS.council | | **councillor** | Created dynamically by `buildCouncillorAgents()` | Read-only council advisor; registered per preset seat as `councillor-<name>` | Read-only defaults | Inherited from council preset |
SDK and registry projections derive merged agent overrides/model arrays once per pass. MCP consumers receive that same override view. Marketplace activation and agent construction arrive through `marketplace.implementation`, loaded by the asynchronous composition root only after its existing enabled gate; the registry remains synchronous. Permission policies and host precedence do not change. Shared capabilities/ID schemas do not load the full manifest graph.
1. **Agent creation**: `createAgents(config)` instantiates all agents with merged configuration 2. **Dynamic councillors**: `buildCouncillorAgents()` (`council-agents.ts`) creates one `councillor-<name>` subagent per council preset seat, attaching `_modelArray` fallback chains for multi-model councillors 3. **Permission application**: `applyDefaultPermissions()` emits generated `allow` grants only for tools this generation registers, while preserving generated denies (the v2 base allows unmatched names). `question`, task tools, and interview submission stay primary-scoped by default — a parked child question has no headless answerer (explicit per-agent config wins). `task_report` is available to subagents by default except for agents whose factory map already denies `'*'` (Observer and councillors); its runtime still requires a host-confirmed parent session. Marketplace/ACP/AST grants follow their registration gates, and `disabled_tools: ["acp_run"]` also removes the wrappers that could call it. It then adds skill grants on top of each agent's map, preserving key order 4. **Task-rejection instruction**: `appendTaskRejectionInstruction()` appends the "outside your role" instruction to specialist prompts (`task-rejection.ts`) 5. **Display name injection**: Orchestrator prompt rewrites `@agent` mentions to user-configured display names 6. **Configuration export**: `getAgentConfigs()` converts `AgentDefinition` to OpenCode SDK format with classification metadata
// 1. Gather sub-agent definitions with custom prompts
const protoSubAgents = Object.entries(SUBAGENT_FACTORIES)
.filter(([name]) => !disabled.has(name))
.map(([name, factory]) => {
const customPrompts = loadAgentPrompt(name, config?.preset);
return factory(getModelForAgent(name), customPrompts.prompt, customPrompts.appendPrompt);
});
// 2. Apply overrides and default permissions
const builtInSubAgents = protoSubAgents.map((agent) => {
const override = getOverrideFromAgents(config, agent.name);
if (override) applyOverrides(agent, override);
applyDefaultPermissions(agent, registeredTools, override?.skills, runtime, hostFlavor);
return agent;
});
// 3. Create Orchestrator (with its own overrides and custom prompts)
const orchestrator = createOrchestratorAgent(
orchestratorModel,
orchestratorPrompts.prompt,
orchestratorPrompts.appendPrompt,
);
applyDefaultPermissions(orchestLean, fine tuned Opencode multi agent suite · Mix any models · Auto delegate tasks
Writes and runs codemod scripts that replace hardcoded visual values with token references in ui/src/index.css. Use for Phase 2…
Complete migration plan for converting command-based system to intelligent agent-based system
Accessibility standards and assistive features — remapping, text scaling, colorblind modes, screen reader support.