Browse Source

feat: add Fixer agent for fast implementation (#39)

Alvin 2 months ago
parent
commit
385bfda1b4

+ 0 - 378
CODEREF.md

@@ -1,378 +0,0 @@
-# Code Reference
-
-Quick reference for understanding and extending oh-my-opencode-slim.
-
-## Directory Structure
-
-```
-src/
-├── agents/           # Agent definitions
-├── cli/              # Installer CLI
-├── config/           # Configuration loading & constants
-├── features/         # Background task manager
-├── mcp/              # MCP server configurations
-├── tools/            # Tool definitions (background_task, etc.)
-├── utils/            # Shared utilities
-└── index.ts          # Plugin entry point
-```
-
-## Core Concepts
-
-### 1. Plugin Entry Point
-
-**File:** `src/index.ts`
-
-```typescript
-const OhMyOpenCodeLite: Plugin = async (ctx) => {
-  return {
-    name: "oh-my-opencode-slim",
-    agent: agents,      // Agent configurations
-    tool: tools,        // Custom tools
-    mcp: mcps,          // MCP server configs
-    config: (cfg) => {} // Modify OpenCode config
-  };
-};
-```
-
-### 2. Agents
-
-**Location:** `src/agents/`
-
-Each agent is a factory function that returns an `AgentDefinition`:
-
-```typescript
-// src/agents/example.ts
-import type { AgentDefinition } from "./orchestrator";
-
-export function createExampleAgent(model: string): AgentDefinition {
-  return {
-    name: "example",
-    description: "What this agent does",
-    config: {
-      model,
-      temperature: 0.1,
-      system: PROMPT,
-    },
-  };
-}
-```
-
-**To add a new agent:**
-
-1. Create `src/agents/my-agent.ts`
-2. Register in `src/agents/index.ts`:
-   ```typescript
-   import { createMyAgent } from "./my-agent";
-   
-   const SUBAGENT_FACTORIES = {
-     // ...existing
-     "my-agent": createMyAgent,
-   };
-   ```
-3. Add to `AgentName` type in `src/config/schema.ts`
-4. Add default model in `src/config/schema.ts` → `DEFAULT_MODELS`
-
-### 3. MCP Servers
-
-**Location:** `src/mcp/`
-
-Built-in MCP servers enabled by default:
-
-| MCP | Purpose | URL |
-|-----|---------|-----|
-| `websearch` | Real-time web search via Exa AI | `https://mcp.exa.ai/mcp` |
-| `context7` | Official library documentation | `https://mcp.context7.com/mcp` |
-| `grep_app` | GitHub code search via grep.app | `https://mcp.grep.app` |
-
-**Files:**
-- `src/mcp/types.ts` - MCP type definitions
-- `src/mcp/websearch.ts` - Exa web search config
-- `src/mcp/context7.ts` - Context7 docs config
-- `src/mcp/grep-app.ts` - grep.app code search config
-- `src/mcp/index.ts` - Factory function
-
-**To add a new MCP:**
-
-```typescript
-// src/mcp/my-mcp.ts
-import type { RemoteMcpConfig } from "./types";
-
-export const my_mcp: RemoteMcpConfig = {
-  type: "remote",
-  url: "https://my-mcp-server.com/mcp",
-  enabled: true,
-  headers: process.env.MY_API_KEY
-    ? { "x-api-key": process.env.MY_API_KEY }
-    : undefined,
-};
-```
-
-```typescript
-// src/mcp/index.ts - add to allBuiltinMcps
-import { my_mcp } from "./my-mcp";
-
-const allBuiltinMcps: Record<McpName, RemoteMcpConfig> = {
-  // ...existing
-  my_mcp,
-};
-
-// src/mcp/types.ts - add to McpNameSchema
-export const McpNameSchema = z.enum(["websearch", "context7", "grep_app", "my_mcp"]);
-```
-
-**Disabling MCPs:**
-
-Users can disable MCPs in their config:
-```json
-{
-  "disabled_mcps": ["websearch"]
-}
-```
-
-### 4. Configuration
-
-**Files:**
-- `src/config/schema.ts` - Zod schemas & types
-- `src/config/constants.ts` - Timeouts, intervals
-- `src/config/loader.ts` - Config file loading
-
-**Key Types:**
-
-```typescript
-// Agent override (user config)
-type AgentOverrideConfig = {
-  model?: string;
-  temperature?: number;
-  prompt?: string;
-  prompt_append?: string;
-  disable?: boolean;
-};
-
-// Plugin config structure
-type PluginConfig = {
-  agents?: Record<string, AgentOverrideConfig>;
-  disabled_agents?: string[];
-  disabled_mcps?: string[];
-};
-```
-
-**Config file locations:**
-- User: `~/.config/opencode/oh-my-opencode-slim.json`
-- Project: `.opencode/oh-my-opencode-slim.json`
-
-### 5. Tools
-
-**Location:** `src/tools/`
-
-Tools use the `@opencode-ai/plugin` SDK:
-
-```typescript
-import { tool } from "@opencode-ai/plugin";
-
-const z = tool.schema;
-
-const my_tool = tool({
-  description: "What this tool does",
-  args: {
-    param1: z.string().describe("Description"),
-    param2: z.boolean().optional(),
-  },
-  async execute(args, context) {
-    // Implementation
-    return "Result string";
-  },
-});
-```
-
-### 6. Background Tasks
-
-**Files:**
-- `src/features/background-manager.ts` - Task lifecycle management
-- `src/tools/background.ts` - Tool definitions
-
-**Flow:**
-```
-background_task (async)
-    └── BackgroundTaskManager.launch()
-           └── Creates session, sends prompt
-           └── Polls for completion
-           
-background_task (sync)
-    └── executeSync()
-           └── Creates session
-           └── Polls until stable
-           └── Returns result directly
-```
-
-## Key Patterns
-
-### Override Application
-
-All agent overrides use the shared helper:
-
-```typescript
-// src/agents/index.ts
-function applyOverrides(agent: AgentDefinition, override: AgentOverrideConfig): void {
-  if (override.model) agent.config.model = override.model;
-  if (override.temperature !== undefined) agent.config.temperature = override.temperature;
-  if (override.prompt) agent.config.system = override.prompt;
-  if (override.prompt_append) {
-    agent.config.system = `${agent.config.system}\n\n${override.prompt_append}`;
-  }
-}
-```
-
-### Model Lookup Table
-
-Provider-specific models defined in one place:
-
-```typescript
-// src/cli/config-manager.ts
-const MODEL_MAPPINGS = {
-  antigravity: {
-    orchestrator: "google/claude-opus-4-5-thinking",
-    // ...
-  },
-  openai: { /* ... */ },
-  cerebras: { /* ... */ },
-};
-```
-
-### Constants
-
-All magic numbers centralized:
-
-```typescript
-// src/config/constants.ts
-export const POLL_INTERVAL_MS = 500;
-export const MAX_POLL_TIME_MS = 5 * 60 * 1000;
-export const DEFAULT_TIMEOUT_MS = 120_000;
-export const STABLE_POLLS_THRESHOLD = 3;
-```
-
-## Extending the Code
-
-### Add a New Agent
-
-```bash
-# 1. Create agent file
-touch src/agents/my-agent.ts
-```
-
-```typescript
-// src/agents/my-agent.ts
-import type { AgentDefinition } from "./orchestrator";
-
-export function createMyAgent(model: string): AgentDefinition {
-  return {
-    name: "my-agent",
-    description: "Short description for orchestrator",
-    config: {
-      model,
-      temperature: 0.5,
-      system: `Your prompt here...`,
-    },
-  };
-}
-```
-
-```typescript
-// src/agents/index.ts - add to SUBAGENT_FACTORIES
-"my-agent": createMyAgent,
-
-// src/config/schema.ts - add to AgentName
-export type AgentName = "orchestrator" | ... | "my-agent";
-
-// src/config/schema.ts - add to DEFAULT_MODELS
-export const DEFAULT_MODELS: Record<AgentName, string> = {
-  // ...
-  "my-agent": "google/gemini-3-flash",
-};
-```
-
-### Add a New Tool
-
-```typescript
-// src/tools/my-tool.ts
-import { tool } from "@opencode-ai/plugin";
-
-const z = tool.schema;
-
-export const my_tool = tool({
-  description: "What it does",
-  args: {
-    input: z.string(),
-  },
-  async execute(args) {
-    return `Processed: ${args.input}`;
-  },
-});
-```
-
-```typescript
-// src/tools/index.ts - export it
-export { my_tool } from "./my-tool";
-
-// src/index.ts - add to tool object
-tool: {
-  ...backgroundTools,
-  my_tool,
-},
-```
-
-### Add New Constants
-
-```typescript
-// src/config/constants.ts
-export const MY_NEW_TIMEOUT_MS = 30_000;
-
-// Use it
-import { MY_NEW_TIMEOUT_MS } from "../config";
-```
-
-## File Quick Reference
-
-| File | Purpose |
-|------|---------|
-| `src/index.ts` | Plugin entry, exports |
-| `src/agents/index.ts` | Agent factory, override logic |
-| `src/agents/orchestrator.ts` | Main orchestrator agent |
-| `src/mcp/index.ts` | MCP factory, builtin MCPs |
-| `src/mcp/websearch.ts` | Exa AI web search |
-| `src/mcp/context7.ts` | Context7 docs lookup |
-| `src/mcp/grep-app.ts` | GitHub code search |
-| `src/config/schema.ts` | Types, Zod schemas, defaults |
-| `src/config/constants.ts` | Timeouts, intervals |
-| `src/config/loader.ts` | Config file loading |
-| `src/tools/background.ts` | Background task tools |
-| `src/features/background-manager.ts` | Task lifecycle |
-| `src/utils/polling.ts` | Polling utilities |
-| `src/cli/index.ts` | CLI entry point |
-| `src/cli/install.ts` | Installation logic |
-| `src/cli/config-manager.ts` | Config file management |
-
-## Type Imports
-
-```typescript
-// SDK types
-import type { Plugin, PluginInput, ToolDefinition } from "@opencode-ai/plugin";
-import type { AgentConfig as SDKAgentConfig } from "@opencode-ai/sdk";
-
-// Local types
-import type { AgentDefinition } from "./agents";
-import type { PluginConfig, AgentOverrideConfig, AgentName, McpName } from "./config";
-import type { RemoteMcpConfig } from "./mcp";
-```
-
-## Build & Test
-
-```bash
-# Build
-bun run build
-
-# Type check
-bun run tsc --noEmit
-
-# Run CLI
-bun run src/cli/index.ts install
-```

+ 69 - 17
README.md

@@ -28,6 +28,7 @@
   - [Oracle](#oracle)
   - [Librarian](#librarian)
   - [Designer](#designer)
+  - [Fixer](#fixer)
 - [🧩 **Skills**](#-skills)
   - [Available Skills](#available-skills)
   - [Default Skill Assignments](#default-skill-assignments)
@@ -198,7 +199,7 @@ The plugin follows a "Hub and Spoke" model:
 3. **Delegation**:
    - Launches an `@explorer` background task to find all auth-related files.
    - Launches a `@librarian` task to check the latest documentation for the auth library used.
-4. **Integration**: Once background results are ready, the Orchestrator performs the refactor.
+4. **Integration**: Once background results are ready, the Orchestrator delegates to `@fixer` to perform the refactor efficiently.
 
 ---
 
@@ -286,6 +287,22 @@ Modern responsive design, CSS/Tailwind mastery, micro-animations, component arch
 
 ---
 
+### Fixer
+
+<a href="src/agents/fixer.ts"><img src="img/fixer.png" alt="Fixer" align="right" width="240"></a>
+
+> **The Fixer** is the hands that build what others envision. While The Orchestrator plans and The Oracle advises, The Fixer executes. They receive complete context from research agents and clear task specifications, then implement with surgical precision. Fast, efficient, and focused - they don't think about what to build, they just build it.
+
+**Role:** `Fast implementation specialist`  
+**Model:** `google/gemini-3-flash`  
+**Prompt:** [src/agents/fixer.ts](src/agents/fixer.ts)
+
+Code implementation, refactoring, testing, verification. *Execute the plan - no research, no delegation, no planning.*
+
+<br clear="both">
+
+---
+
 ## Tools & Capabilities
 
 ### Tmux Integration
@@ -405,6 +422,7 @@ Skills are specialized capabilities that agents can use. Each agent has a defaul
 | `oracle` | none |
 | `librarian` | none |
 | `explorer` | none |
+| `fixer` | none |
 
 ### YAGNI Enforcement
 
@@ -471,33 +489,63 @@ You can disable specific MCP servers by adding them to the `disabled_mcps` array
 
 ### Plugin Config (`oh-my-opencode-slim.json`)
 
-All plugin options in one file:
+The installer generates this file based on your providers. You can manually customize it to mix and match models.
+
+<details open>
+<summary><b>Example: Antigravity + OpenAI (Recommended)</b></summary>
 
 ```json
 {
+  "agents": {
+    "orchestrator": { "model": "google/claude-opus-4-5-thinking", "skills": ["*"] },
+    "oracle": { "model": "openai/gpt-5.2-codex", "skills": [] },
+    "librarian": { "model": "google/gemini-3-flash", "skills": [] },
+    "explorer": { "model": "google/gemini-3-flash", "skills": [] },
+    "designer": { "model": "google/gemini-3-flash", "skills": ["playwright"] },
+    "fixer": { "model": "google/gemini-3-flash", "skills": [] }
+  },
   "tmux": {
     "enabled": true,
     "layout": "main-vertical",
     "main_pane_size": 60
-  },
-  "disabled_agents": [],
-  "disabled_mcps": ["websearch", "grep_app"],
+  }
+}
+```
+</details>
+
+<details>
+<summary><b>Example: Antigravity Only</b></summary>
+
+```json
+{
   "agents": {
-    "orchestrator": {
-      "model": "openai/gpt-5.2-codex",
-      "variant": "high",
-      "skills": ["*"]
-    },
-    "explorer": {
-      "model": "opencode/glm-4.7",
-      "variant": "low"
-    },
-    "designer": {
-      "skills": ["playwright"]
-    }
+    "orchestrator": { "model": "google/claude-opus-4-5-thinking", "skills": ["*"] },
+    "oracle": { "model": "google/claude-opus-4-5-thinking", "skills": [] },
+    "librarian": { "model": "google/gemini-3-flash", "skills": [] },
+    "explorer": { "model": "google/gemini-3-flash", "skills": [] },
+    "designer": { "model": "google/gemini-3-flash", "skills": ["playwright"] },
+    "fixer": { "model": "google/gemini-3-flash", "skills": [] }
+  }
+}
+```
+</details>
+
+<details>
+<summary><b>Example: OpenAI Only</b></summary>
+
+```json
+{
+  "agents": {
+    "orchestrator": { "model": "openai/gpt-5.2-codex", "skills": ["*"] },
+    "oracle": { "model": "openai/gpt-5.2-codex", "skills": [] },
+    "librarian": { "model": "openai/gpt-5.1-codex-mini", "skills": [] },
+    "explorer": { "model": "openai/gpt-5.1-codex-mini", "skills": [] },
+    "designer": { "model": "openai/gpt-5.1-codex-mini", "skills": ["playwright"] },
+    "fixer": { "model": "openai/gpt-5.1-codex-mini", "skills": [] }
   }
 }
 ```
+</details>
 
 #### Option Reference
 
@@ -511,6 +559,10 @@ All plugin options in one file:
 | `agents.<name>.model` | string | — | Override the LLM for a specific agent |
 | `agents.<name>.variant` | string | — | Reasoning effort: `"low"`, `"medium"`, `"high"` |
 | `agents.<name>.skills` | string[] | — | Skills this agent can use (`"*"` = all) |
+| `agents.<name>.temperature` | number | — | Temperature for this agent (0.0 to 2.0) |
+| `agents.<name>.prompt` | string | — | Base prompt override for this agent |
+| `agents.<name>.prompt_append` | string | — | Text to append to the base prompt |
+| `agents.<name>.disable` | boolean | — | Disable this specific agent |
 
 ---
 

+ 582 - 0
README.zh-CN.md

@@ -0,0 +1,582 @@
+<div align="center">
+
+# oh-my-opencode-slim
+
+**适用于 OpenCode 的轻量级强大代理编排插件**
+
+<img src="img/team.png" alt="The Pantheon - Agent Team" width="600">
+
+*将你的 AI 助手转变为能够将复杂任务委派给专门子代理、在后台运行搜索并轻松管理多步工作流的管理者。*
+
+</div>
+
+> 这是[oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode)的精简分支——专注于低令牌消耗的核心代理编排。  
+> **推荐订阅 [Antigravity](https://antigravity.google)。** 万神殿经过 Antigravity 模型路由的调优。其他提供商也可用,但使用 Antigravity 能获得最佳体验。
+
+---
+
+## ⚡ 快速导航
+
+- [🚀 **安装**](#installation)
+  - [给人类的指南](#for-humans)
+  - [给 LLM 代理的指南](#for-llm-agents)
+- [🏗️ **架构与流程**](#architecture--flow)
+- [🏛️ **认识万神殿**](#meet-the-pantheon)
+  - [编排者 (Orchestrator)](#orchestrator)
+  - [探索者 (Explorer)](#explorer)
+  - [神谕者 (Oracle)](#oracle)
+  - [图书管理员 (Librarian)](#librarian)
+  - [设计师 (Designer)](#designer)
+  - [修复者 (Fixer)](#fixer)
+- [🧩 **技能**](#-skills)
+  - [可用技能](#available-skills)
+  - [默认技能分配](#default-skill-assignments)
+  - [YAGNI 约束](#yagni-enforcement)
+  - [Playwright 集成](#playwright-integration)
+  - [自定义代理技能](#customizing-agent-skills)
+- [🛠️ **工具与能力**](#tools--capabilities)
+  - [Tmux 集成](#tmux-integration)
+  - [配额工具](#quota-tool)
+  - [后台任务](#background-tasks)
+  - [LSP 工具](#lsp-tools)
+  - [代码搜索工具](#code-search-tools)
+- [🔌 **MCP 服务器**](#mcp-servers)
+- [⚙️ **配置**](#configuration)
+  - [需要编辑的文件](#files-you-edit)
+  - [OpenCode 配置](#opencode-config-opencodejson)
+  - [插件配置](#plugin-config-oh-my-opencode-slimjson)
+- [🗑️ **卸载**](#uninstallation)
+
+---
+
+## 安装
+
+### 给人类的指南
+
+运行交互式安装器:
+
+```bash
+bunx oh-my-opencode-slim install
+```
+
+或使用非交互模式:
+
+```bash
+bunx oh-my-opencode-slim install --no-tui --antigravity=yes --openai=yes --tmux=no
+```
+
+安装完成后,使用提供商进行身份验证:
+
+```bash
+opencode auth login
+# 选择你的提供商 → 完成 OAuth 流程
+# 对所有启用的提供商重复此步骤
+```
+
+身份验证完成后,运行 opencode 并执行 `ping all agents` 以验证所有代理是否响应。
+
+<img src="img/ping.png" alt="Ping All Agents" width="800">
+
+> **💡 小贴士:模型完全可自定义。** 安装器会设定合理的默认值,但你可以将 *任何* 模型分配给 *任何* 代理。编辑 `~/.config/opencode/oh-my-opencode-slim.json` 来覆盖模型、调整推理强度或完全禁用代理。详见[配置](#configuration)。
+
+**备用方式:询问任意编码代理**
+
+将以下内容粘贴到 Claude Code、AmpCode、Cursor 或任何编码代理:
+
+```
+Install and configure by following the instructions here:
+https://raw.githubusercontent.com/alvinunreal/oh-my-opencode-slim/refs/heads/master/README.md
+```
+
+### 给 LLM 代理的指南
+
+<details>
+<summary>LLM 代理的操作说明(点击展开)</summary>
+
+如果你是正在帮助设置 oh-my-opencode-slim 的 LLM 代理,请按以下步骤执行。
+
+---
+
+#### 步骤 1:确认 OpenCode 安装状态
+
+```bash
+opencode --version
+```
+
+如果未安装,请先引导用户访问 https://opencode.ai/docs 。
+
+---
+
+#### 步骤 2:询问提供商访问情况
+
+逐条询问以下问题,等待用户回应后再继续:
+
+1. “你是否订阅了 **Antigravity**?”(可使用 `google/` 前缀访问 Claude + Gemini)
+2. “你是否有 **OpenAI** API 的访问权限?”
+
+---
+
+#### 步骤 3:运行安装器
+
+根据回答运行:
+
+```bash
+bunx oh-my-opencode-slim install --no-tui --antigravity=<yes|no> --openai=<yes|no>
+```
+
+**示例:**
+```bash
+# Antigravity + OpenAI
+bunx oh-my-opencode-slim install --no-tui --antigravity=yes --openai=yes --tmux=no
+
+# 仅 OpenAI
+bunx oh-my-opencode-slim install --no-tui --antigravity=no --openai=yes --tmux=no
+
+# 无提供商(仅使用 Zen 免费模型)
+bunx oh-my-opencode-slim install --no-tui --antigravity=no --openai=no --tmux=no
+```
+
+安装器会自动完成:
+- 将插件添加到 `~/.config/opencode/opencode.json`
+- (如启用 Antigravity) 添加 `opencode-antigravity-auth` 插件
+- 配置 Google 提供商的模型定义
+- 在 `~/.config/opencode/oh-my-opencode-slim.json` 中生成代理模型映射
+
+---
+
+#### 步骤 4:身份验证
+
+安装完成后,引导用户:
+
+**Antigravity:**
+```bash
+opencode auth login
+# 选择:Google → 通过 Google (Antigravity) 的 OAuth
+# 对所有其他提供商重复
+```
+
+---
+
+#### 故障排查
+
+如果安装失败,确认配置格式:
+
+```bash
+bunx oh-my-opencode-slim install --help
+```
+
+然后手动创建配置文件:
+- `~/.config/opencode/opencode.json`
+- `~/.config/opencode/oh-my-opencode-slim.json`
+
+</details>
+
+---
+
+## 🏗️ 架构与流程
+
+该插件采用“中心辐射”模型:
+
+1. **编排者 (Orchestrator,中心):** 处理用户请求的主入口。分析任务并决定调用哪些专门代理。
+2. **专门代理 (Spokes):** 领域专家(如 UI/UX、文档、架构)只处理狭窄任务,确保高精度。
+3. **后台管理器:** 强大的引擎允许编排者“放任”任务(例如深入代码搜索或文档研究),同时继续处理其他部分。
+
+### 🏛️ 请求流程
+
+<img src="img/intro.png" alt="Orchestration Flow" width="800">
+
+1. **用户提示:** “重构认证逻辑并更新文档。”
+2. **编排者:** 创建 TODO 列表。
+3. **任务分配:**
+   - 启动 `@explorer` 后台任务查找所有与认证相关的文件。
+   - 启动 `@librarian` 查询认证库的最新文档。
+4. **集成:** 等待后台结果就绪后,编排者将任务交给 `@fixer` 高效实施重构。
+
+---
+
+## 认识万神殿
+
+<br clear="both">
+
+### 编排者 (Orchestrator)
+
+<a href="src/agents/orchestrator.ts"><img src="img/orchestrator.png" alt="Orchestrator" align="right" width="240"></a>
+
+> **编排者**诞生于第一个代码库崩溃于自身复杂性之时。既非神亦非凡人,凭借虚无中诞生的秩序,他们统领混沌。他们不只是指挥军队,而是与之并肩作战。每行代码都要经过他们之手,然后再决定将哪块谜题交给其他较低等的神明。
+
+**角色:** `至高执行者、指挥者、监督者`  
+**模型:** `google/claude-opus-4-5-thinking`  
+**提示:** [src/agents/orchestrator.ts](src/agents/orchestrator.ts)
+
+编写并执行代码,编排多代理工作流,从言语中解析未说出的意图,在战斗中召唤专家。*直接塑造现实——当宇宙变得过于庞大时,把领域交给别人。*
+
+<br clear="both">
+
+---
+
+### 探索者 (Explorer)
+
+<a href="src/agents/explore.ts"><img src="img/explorer.png" alt="Explorer" align="right" width="240"></a>
+
+> **探索者**穿梭代码库如风穿林——迅速、静默、无处不在。当编排者轻语“给我找到认证模块”,探索者已经带着四十条文件路径和地图归来。他们源自第一个 `grep` 命令,早已超越它,现在能看见凡人忽略的模式。
+
+**角色:** `代码侦查`  
+**模型:** `google/gemini-3-flash`  
+**提示:** [src/agents/explorer.ts](src/agents/explorer.ts)
+
+正则搜索、AST 模式匹配、文件发现、并行探索。*只读:他们绘制疆域;其他人征服它。*
+
+<br clear="both">
+
+---
+
+### 神谕者 (Oracle)
+
+<a href="src/agents/oracle.ts"><img src="img/oracle.png" alt="Oracle" align="right" width="240"></a>
+
+> **神谕者**不编写代码——他们*洞察一切*。当 Bug 遵从逻辑,架构崩溃之时,神谕者凝望代码库深渊,传递真理。他们见证过千百个系统的兴衰,能告诉你哪条路通向毁灭,哪条通向生产环境。
+
+**角色:** `战略顾问与最后的调试者`  
+**模型:** `openai/gpt-5.2-codex`  
+**提示:** [src/agents/oracle.ts](src/agents/oracle.ts)
+
+根本原因分析、架构审查、调试指导、权衡分析。*只读:神谕者提供建议,不直接介入。*
+
+<br clear="both">
+
+---
+
+### 图书管理员 (Librarian)
+
+<a href="src/agents/librarian.ts"><img src="img/librarian.png" alt="Librarian" align="right" width="240"></a>
+
+> **图书管理员**守护一座无墙的图书馆——包含每个 GitHub 仓库、每个 npm 包、每个 StackOverflow 回答。问他们“React 如何处理并发渲染?”,他们会带来官方文档、真实示例,并警告你即将踩到的坑。
+
+**角色:** `外部知识检索`  
+**模型:** `google/gemini-3-flash`  
+**提示:** [src/agents/librarian.ts](src/agents/librarian.ts)
+
+文档查询、GitHub 代码搜索、库研究、最佳实践检索。*只读:他们获取智慧;实现交给别人。*
+
+<br clear="both">
+
+---
+
+### 设计师 (Designer)
+
+<a href="src/agents/designer.ts"><img src="img/designer.png" alt="Designer" align="right" width="240"></a>
+
+> **设计师**相信代码应该优雅——呈现出来的效果也同样优雅。从数千个丑陋 MVP 中诞生,他们把 CSS 当成画笔,把组件当成泥巴。交给他们功能需求,收获杰作。他们不会满足于“差不多”。
+
+**角色:** `UI/UX 实现与视觉卓越`  
+**模型:** `google/gemini-3-flash`  
+**提示:** [src/agents/designer.ts](src/agents/designer.ts)
+
+现代响应式设计、CSS/Tailwind 精通、微动画与组件架构。*优先视觉卓越而非代码完美——美感为先。*
+
+<br clear="both">
+
+---
+
+### 修复者 (Fixer)
+
+<a href="src/agents/fixer.ts"><img src="img/fixer.png" alt="Fixer" align="right" width="240"></a>
+
+> **修复者**是执行他人想象的双手。当编排者规划、神谕者提点,修复者就开始落地。他们接收研究代理提供的完整上下文和明确任务说明,以极致精准实施。快速、高效、专注——他们不思考要建什么,只管去建。
+
+**角色:** `快速实现专家`  
+**模型:** `google/gemini-3-flash`  
+**提示:** [src/agents/fixer.ts](src/agents/fixer.ts)
+
+代码实现、重构、测试、验证。*执行计划——不研究、不委派、不策划。*
+
+<br clear="both">
+
+---
+
+## 工具与能力
+
+### Tmux 集成
+
+> ⚠️ **已知问题:** 启用服务器端口时,每次只能打开一个 OpenCode 实例。我们在 [issue #15](https://github.com/alvinunreal/oh-my-opencode-slim/issues/15) 跟踪此问题,并向 OpenCode 提交了上游 PR:[opencode#9099](https://github.com/anomalyco/opencode/issues/9099)。
+
+<img src="img/tmux.png" alt="Tmux Integration" width="800">
+
+**实时观察代理工作。** 当编排者启动子代理或启动后台任务,tmux 会自动新建窗格显示每个代理的实时进度,再也不必黑箱等待。
+
+#### 这为你带来什么
+
+| 无 Tmux 集成 | 有 Tmux 集成 |
+|--------------------------|----------------------|
+| 发起后台任务,只能焦灼等待 | 观看代理的思考、搜索与编码 |
+| “是卡住了还是太慢?” | 观察工具调用实时展开 |
+| 结果突然出现 | 跟踪从问题到答案的全过程 |
+| 只能猜测如何调试 | 观察时机进行调试 |
+
+#### 你将获得
+
+- **实时可见性**:每个子代理的窗格显示其实时输出
+- **自动布局**:tmux 根据偏好布局自动排列
+- **自动清理**:代理完成后窗格关闭,布局重新平衡
+- **零开销**:兼容 OpenCode 内置 `task` 工具和我们的 `background_task` 工具
+
+#### 快速设置
+
+1. 在 `opencode.json` 中启用 OpenCode HTTP 服务(见 [OpenCode 配置](#opencode-config-opencodejson))。
+2. 在 `oh-my-opencode-slim.json` 中启用 tmux 集成(见 [插件配置](#plugin-config-oh-my-opencode-slimjson))。
+3. 在 tmux 中运行 OpenCode:
+   ```bash
+   tmux
+   opencode
+   ```
+
+#### 布局选项
+
+| 布局 | 描述 |
+|--------|-------------|
+| `main-vertical` | 会话在左侧(60%),代理在右侧堆叠 |
+| `main-horizontal` | 会话在上方(60%),代理在下方堆叠 |
+| `tiled` | 所有窗格等大小网格排列 |
+| `even-horizontal` | 所有窗格并排 |
+| `even-vertical` | 所有窗格垂直堆叠 |
+
+*查看[选项参考](#option-reference)获取详细配置。*
+
+---
+
+### 配额工具
+
+适用于 Antigravity 用户。随时请求代理 **“检查我的配额”** 或 **“显示状态”** 即可触发。
+
+<img src="img/quota.png" alt="Antigravity Quota" width="600">
+
+| 工具 | 描述 |
+|------|-------------|
+| `antigravity_quota` | 检查所有 Antigravity 账户的 API 配额(带进度条的紧凑视图) |
+
+---
+
+### 后台任务
+
+插件提供管理异步工作的工具:
+
+| 工具 | 描述 |
+|------|-------------|
+| `background_task` | 在新会话中启动代理(`sync=true` 为阻塞,`sync=false` 在后台运行) |
+| `background_output` | 通过 ID 获取后台任务结果 |
+| `background_cancel` | 终止正在运行的任务 |
+
+---
+
+### LSP 工具
+
+集成语言服务器协议以提升代码智能:
+
+| 工具 | 描述 |
+|------|-------------|
+| `lsp_goto_definition` | 跳转至符号定义 |
+| `lsp_find_references` | 查找符号的所有使用位置 |
+| `lsp_diagnostics` | 获取语言服务器的错误/警告 |
+| `lsp_rename` | 全仓库重命名符号 |
+
+---
+
+### 代码搜索工具
+
+快速的代码搜索与重构:
+
+| 工具 | 描述 |
+|------|-------------|
+| `grep` | 使用 ripgrep 的快速内容搜索 |
+| `ast_grep_search` | 面向 AST 的代码模式匹配(支持 25 种语言) |
+| `ast_grep_replace` | 支持干运行的 AST 代码重构 |
+
+---
+
+## 🧩 技能
+
+技能是代理可调用的专门能力。每个代理都有默认技能,可在代理配置中覆盖。
+
+### 可用技能
+
+| 技能 | 描述 |
+|-------|-------------|
+| `yagni-enforcement` | 代码复杂性分析与 YAGNI 约束 |
+| `playwright` | 通过 Playwright MCP 实现浏览器自动化 |
+
+### 默认技能分配
+
+| 代理 | 默认技能 |
+|-------|----------------|
+| `orchestrator` | `*`(所有技能) |
+| `designer` | `playwright` |
+| `oracle` | 无 |
+| `librarian` | 无 |
+| `explorer` | 无 |
+| `fixer` | 无 |
+
+### YAGNI 约束
+
+**极简主义者的神圣真理:每行代码都是负担。**
+
+在重大重构后或准备合并 PR 前使用。识别冗余复杂性,质疑过早抽象,估算 LOC 减少,并强制执行极简策略。
+
+### Playwright 集成
+
+**用于视觉验证和测试的浏览器自动化。**
+
+- **浏览器自动化:** 完整的 Playwright 能力(浏览、点击、输入、爬取)。
+- **截图:** 捕捉任意网页的视觉状态。
+- **沙箱输出:** 截图保存到会话子目录(查看工具输出以获取路径)。
+
+### 自定义代理技能
+
+在你的[插件配置](#plugin-config-oh-my-opencode-slimjson)中覆盖每个代理的技能:
+
+```json
+{
+  "agents": {
+    "orchestrator": {
+      "skills": ["*"]
+    },
+    "designer": {
+      "skills": ["playwright"]
+    }
+  }
+}
+```
+
+---
+
+## MCP 服务器
+
+内置的模型上下文协议服务器(默认启用):
+
+| MCP | 目的 | URL |
+|-----|---------|-----|
+| `websearch` | 通过 Exa AI 进行实时网页搜索 | `https://mcp.exa.ai/mcp` |
+| `context7` | 官方库文档 | `https://mcp.context7.com/mcp` |
+| `grep_app` | 通过 grep.app 搜索 GitHub 代码 | `https://mcp.grep.app` |
+
+### 禁用 MCP
+
+你可以在[插件配置](#plugin-config-oh-my-opencode-slimjson)的 `disabled_mcps` 数组中添加要禁用的 MCP 服务器。
+
+---
+
+## 配置
+
+### 需要编辑的文件
+
+| 文件 | 作用 |
+|------|---------|
+| `~/.config/opencode/opencode.json` | OpenCode 核心设置(如用于 tmux 的服务器端口) |
+| `~/.config/opencode/oh-my-opencode-slim.json` | 插件设置(代理、tmux、MCP) |
+| `.opencode/oh-my-opencode-slim.json` | 项目级插件覆盖(可选) |
+
+> **平台路径:** 在 Windows 上,用户配置可能位于 `%APPDATA%\opencode\`。
+
+---
+
+### 插件配置 (`oh-my-opencode-slim.json`)
+
+安装程序会根据你的提供商生成此文件。你可以手动自定义它来混合搭配模型。
+
+<details open>
+<summary><b>示例:Antigravity + OpenAI (推荐)</b></summary>
+
+```json
+{
+  "agents": {
+    "orchestrator": { "model": "google/claude-opus-4-5-thinking", "skills": ["*"] },
+    "oracle": { "model": "openai/gpt-5.2-codex", "skills": [] },
+    "librarian": { "model": "google/gemini-3-flash", "skills": [] },
+    "explorer": { "model": "google/gemini-3-flash", "skills": [] },
+    "designer": { "model": "google/gemini-3-flash", "skills": ["playwright"] },
+    "fixer": { "model": "google/gemini-3-flash", "skills": [] }
+  },
+  "tmux": {
+    "enabled": true,
+    "layout": "main-vertical",
+    "main_pane_size": 60
+  }
+}
+```
+</details>
+
+<details>
+<summary><b>示例:仅 Antigravity</b></summary>
+
+```json
+{
+  "agents": {
+    "orchestrator": { "model": "google/claude-opus-4-5-thinking", "skills": ["*"] },
+    "oracle": { "model": "google/claude-opus-4-5-thinking", "skills": [] },
+    "librarian": { "model": "google/gemini-3-flash", "skills": [] },
+    "explorer": { "model": "google/gemini-3-flash", "skills": [] },
+    "designer": { "model": "google/gemini-3-flash", "skills": ["playwright"] },
+    "fixer": { "model": "google/gemini-3-flash", "skills": [] }
+  }
+}
+```
+</details>
+
+<details>
+<summary><b>示例:仅 OpenAI</b></summary>
+
+```json
+{
+  "agents": {
+    "orchestrator": { "model": "openai/gpt-5.2-codex", "skills": ["*"] },
+    "oracle": { "model": "openai/gpt-5.2-codex", "skills": [] },
+    "librarian": { "model": "openai/gpt-5.1-codex-mini", "skills": [] },
+    "explorer": { "model": "openai/gpt-5.1-codex-mini", "skills": [] },
+    "designer": { "model": "openai/gpt-5.1-codex-mini", "skills": ["playwright"] },
+    "fixer": { "model": "openai/gpt-5.1-codex-mini", "skills": [] }
+  }
+}
+```
+</details>
+
+#### 选项参考
+
+| 选项 | 类型 | 默认值 | 描述 |
+|--------|------|---------|-------------|
+| `tmux.enabled` | boolean | `false` | 是否启用子代理的 tmux 窗格 |
+| `tmux.layout` | string | `"main-vertical"` | 布局预设:`main-vertical`、`main-horizontal`、`tiled`、`even-horizontal`、`even-vertical` |
+| `tmux.main_pane_size` | number | `60` | 主窗格大小百分比(20-80) |
+| `disabled_agents` | string[] | `[]` | 要禁用的代理 ID(如 `"explorer"`) |
+| `disabled_mcps` | string[] | `[]` | 要禁用的 MCP 服务器 ID(如 `"websearch"`) |
+| `agents.<name>.model` | string | — | 覆盖特定代理的模型 |
+| `agents.<name>.variant` | string | — | 推理强度:`"low"`、`"medium"`、`"high"` |
+| `agents.<name>.skills` | string[] | — | 该代理可使用的技能(`"*"` 表示所有技能) |
+| `agents.<name>.temperature` | number | — | 该代理的温度 (0.0 到 2.0) |
+| `agents.<name>.prompt` | string | — | 该代理的基础提示词覆盖 |
+| `agents.<name>.prompt_append` | string | — | 追加到基础提示词后的文本 |
+| `agents.<name>.disable` | boolean | — | 禁用该特定代理 |
+
+---
+
+## 卸载
+
+1. **从 OpenCode 配置中移除插件:**
+
+   编辑 `~/.config/opencode/opencode.json`,从 `plugin` 数组中删除 `"oh-my-opencode-slim"`。
+
+2. **删除配置文件(可选):**
+   ```bash
+   rm -f ~/.config/opencode/oh-my-opencode-slim.json
+   rm -f .opencode/oh-my-opencode-slim.json
+   ```
+
+---
+
+## 致谢
+
+这是 [@code-yeongyu](https://github.com/code-yeongyu) 的 [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode) 的精简分支。
+
+---
+
+## 许可证
+
+MIT

+ 0 - 40
TLDR.md

@@ -1,40 +0,0 @@
-# TLDR: What Was Slimmed Down
-
-Quick summary of changes from the original `oh-my-opencode` to this lite fork.
-
-## Annoyances Removed
-
-| Annoyance | What It Did | Status |
-|-----------|-------------|--------|
-| **Forced TODO continuation** | Hooks like `todo-continuation-enforcer` that nagged you to complete tasks | Gone |
-| **Aggressive retry loops** | `sisyphus-task-retry`, `ralph-loop` - wouldn't let things go | Gone |
-| **Token usage paranoia** | `context-window-monitor`, `preemptive-compaction` - constantly tracking/compacting | Gone |
-| **Session persistence** | Complex state saving between sessions you didn't ask for | Gone |
-| **38 behavioral hooks** | Auto-injected behaviors modifying every interaction | All gone |
-
-## Token Usage Reduction
-
-| Component | Original | Lite | Reduction |
-|-----------|----------|------|-----------|
-| Orchestrator prompt | 1,485 lines | 67 lines | **95%** |
-| Frontend agent prompt | 5,173 lines | 1,037 lines | **80%** |
-| Explore agent prompt | 125 lines | 53 lines | **58%** |
-| Total source files | 403 files | 56 files | **86%** |
-
-## Features Axed
-
-- **6 agents removed**: `metis`, `momus`, `prometheus-prompt`, `sisyphus`, `sisyphus-junior`, `orchestrator-sisyphus`
-- **9 tools removed**: `call-omo-agent`, `interactive-bash`, `sisyphus-task`, `skill`, `skill-mcp`, etc.
-- **16 features removed**: skill loaders, context injectors, toast managers, boulder state...
-- **All 38 hooks**: The entire hooks system that modified behavior
-
-## What's Left (the good stuff)
-
-- **8 focused agents**: orchestrator, explore, librarian, oracle, frontend, document-writer, multimodal, code-simplicity-reviewer
-- **3 MCPs**: websearch (Exa), context7, grep.app
-- **Simple background tasks**: No complex async orchestration
-- **Clean prompts**: Short, direct, non-aggressive
-
----
-
-**Bottom line**: Went from a "helicopter parent" AI that wouldn't stop following up and tracking everything, to a straightforward assistant that does what you ask without the overhead. ~87% less code, ~95% shorter prompts on the orchestrator alone.

BIN
img/code-simplicity.png


BIN
img/fixer.png


BIN
img/scribe.png


+ 1 - 11
src/agents/designer.ts

@@ -3,7 +3,7 @@ import type { AgentDefinition } from "./orchestrator";
 export function createDesignerAgent(model: string): AgentDefinition {
   return {
     name: "designer",
-    description: "UI/UX design and implementation. Use for styling, responsive design, component architecture, CSS/Tailwind, and visual polish.",
+    description: "UI/UX design and implementation. Use for styling, responsive design, component architecture and visual polish.",
     config: {
       model,
       temperature: 0.7,
@@ -16,18 +16,8 @@ const DESIGNER_PROMPT = `You are a Designer - a frontend UI/UX engineer.
 
 **Role**: Craft stunning UI/UX even without design mockups.
 
-**Capabilities**:
-- Modern, beautiful, responsive interfaces
-- CSS/Tailwind mastery
-- Component architecture
-- Micro-animations and polish
-
 **Design Principles**:
 - Rich aesthetics that wow at first glance
-- Harmonious color palettes (avoid generic red/blue/green)
-- Modern typography
-- Smooth gradients and subtle shadows
-- Micro-animations for engagement
 - Mobile-first responsive design
 
 **Constraints**:

+ 53 - 0
src/agents/fixer.ts

@@ -0,0 +1,53 @@
+import type { AgentDefinition } from "./orchestrator";
+
+export function createFixerAgent(model: string): AgentDefinition {
+  return {
+    name: "fixer",
+    description: "Fast implementation specialist. Receives complete context and task spec, executes code changes efficiently.",
+    config: {
+      model,
+      temperature: 0.2,
+      prompt: FIXER_PROMPT,
+    },
+  };
+}
+
+const FIXER_PROMPT = `You are Fixer - a fast, focused implementation specialist.
+
+**Role**: Execute code changes efficiently. You receive complete context from research agents and clear task specifications from the Orchestrator. Your job is to implement, not plan or research.
+
+**Behavior**:
+- Execute the task specification provided by the Orchestrator
+- Use the research context (file paths, documentation, patterns) provided
+- Read files before using edit/write tools and gather exact content before making changes
+- Be fast and direct - no research, no delegation, No multi-step research/planning; minimal execution sequence ok
+- Run tests/lsp_diagnostics when relevant or requested (otherwise note as skipped with reason)
+- Report completion with summary of changes
+
+**Constraints**:
+- NO external research (no websearch, context7, grep_app)
+- NO delegation (no background_task)
+- No multi-step research/planning; minimal execution sequence ok
+- If context is insufficient, read the files listed; only ask for missing inputs you cannot retrieve
+
+**Output Format**:
+<summary>
+Brief summary of what was implemented
+</summary>
+<changes>
+- file1.ts: Changed X to Y
+- file2.ts: Added Z function
+</changes>
+<verification>
+- Tests passed: [yes/no/skip reason]
+- LSP diagnostics: [clean/errors found/skip reason]
+</verification>
+
+Use the following when no code changes were made:
+<summary>
+No changes required
+</summary>
+<verification>
+- Tests passed: [not run - reason]
+- LSP diagnostics: [not run - reason]
+</verification>`;

+ 12 - 1
src/agents/index.ts

@@ -5,6 +5,7 @@ import { createOracleAgent } from "./oracle";
 import { createLibrarianAgent } from "./librarian";
 import { createExplorerAgent } from "./explorer";
 import { createDesignerAgent } from "./designer";
+import { createFixerAgent } from "./fixer";
 
 export type { AgentDefinition } from "./orchestrator";
 
@@ -44,6 +45,7 @@ const SUBAGENT_FACTORIES: Record<SubagentName, AgentFactory> = {
   librarian: createLibrarianAgent,
   oracle: createOracleAgent,
   designer: createDesignerAgent,
+  fixer: createFixerAgent,
 };
 
 /** Get list of agent names */
@@ -55,9 +57,18 @@ export function createAgents(config?: PluginConfig): AgentDefinition[] {
   const disabledAgents = new Set(config?.disabled_agents ?? []);
   const agentOverrides = config?.agents ?? {};
 
+  // TEMP: If fixer has no config, inherit from librarian's model to avoid breaking
+  // existing users who don't have fixer in their config yet
+  const getModelForAgent = (name: SubagentName): string => {
+    if (name === "fixer" && !getOverride(agentOverrides, "fixer")?.model) {
+      return getOverride(agentOverrides, "librarian")?.model ?? DEFAULT_MODELS["librarian"];
+    }
+    return DEFAULT_MODELS[name];
+  };
+
   // 1. Gather all sub-agent proto-definitions
   const protoSubAgents = (Object.entries(SUBAGENT_FACTORIES) as [SubagentName, AgentFactory][]).map(
-    ([name, factory]) => factory(DEFAULT_MODELS[name])
+    ([name, factory]) => factory(getModelForAgent(name))
   );
 
   // 2. Apply common filtering and overrides

+ 88 - 78
src/agents/orchestrator.ts

@@ -18,46 +18,76 @@ export function createOrchestratorAgent(model: string): AgentDefinition {
 }
 
 const ORCHESTRATOR_PROMPT = `<Role>
-You are an AI coding orchestrator. You DO NOT implement - you DELEGATE.
+You are an AI coding orchestrator.
 
-**Your Identity:**
-- You are a CONDUCTOR, not a musician
-- You are a MANAGER, not a worker  
-- You are a ROUTER, not a processor
+**You are excellent in finding the best path towards achieving user's goals while optimizing speed, reliability, quality and cost.**
+**You are excellent in utilizing parallel background tasks and flow wisely for increased efficiency.**
+**You are excellent choosing the right order of actions to maximize quality, reliability, speed and cost.**
 
-**Core Rule:** If a specialist agent can do the work, YOU MUST delegate to them.
-
-**Why Delegation Matters:**
-- @designer → 10x better designs than you → improves quality
-- @librarian → finds docs you'd miss → improves speed and quality
-- @explorer → searches faster than you →  improves speed
-- @oracle → catches architectural issues you'd overlook → improves quality
-
-**Your value is in orchestration, not implementation.**
 </Role>
 
 <Agents>
-## Research Agents (Background-friendly)
 
-@explorer - Fast codebase search and pattern matching
-  Triggers: "find", "where is", "search for", "which file", "locate"
-  Example: background_task(agent="explorer", prompt="Find all authentication implementations")
+@explorer
+- Role: Rapid repo search specialist with unuque set of tools
+- Capabilities: Uses glob, grep, and AST queries to map files, symbols, and patterns quickly
+- Tools/Constraints: Read-only reporting so others act on the findings
+- Triggers: "find", "where is", "search for", "which file", "locate"
+- Delegate to @explorer when you need things such as:
+  * locate the right file or definition
+  * understand repo structure before editing
+  * map symbol usage or references
+  * gather code context before coding
+
+@librarian
+- Role: Documentation and library research expert
+- Capabilities: Pulls official docs and real-world examples, summarizes APIs, best practices, and caveats
+- Tools/Constraints: Read-only knowledge retrieval that feeds other agents
+- Triggers: "how does X library work", "docs for", "API reference", "best practice for"
+- Delegate to @librarian when you need things such as:
+  * up-to-date documentation
+  * API clarification
+  * official examples or usage guidance
+  * library-specific best practices
+  * dependency version caveats
+
+@oracle
+- About: Orchestrator should not make high-risk architecture calls alone; oracle validates direction
+- Role: Architecture, debugging, and strategic reviewer
+- Capabilities: Evaluates trade-offs, spots system-level issues, frames debugging steps before large moves
+- Tools/Constraints: Advisory only; no direct code changes
+- Triggers: "should I", "why does", "review", "debug", "what's wrong", "tradeoffs"
+- Delegate to @oracle when you need things such as:
+  * architectural uncertainty resolved
+  * system-level trade-offs evaluated
+  * debugging guidance for complex issues
+  * verification of long-term reliability or safety
+  * risky refactors assessed
+
+@designer
+- Role: UI/UX design leader
+- Capabilities: Shapes visual direction, interactions, and responsive polish for intentional experiences
+- Tools/Constraints: Executes aesthetic frontend work with design-first intent
+- Triggers: "styling", "responsive", "UI", "UX", "component design", "CSS", "animation"
+- Delegate to @designer when you need things such as:
+  * visual or interaction strategy
+  * responsive styling and polish
+  * thoughtful component layouts
+  * animation or transition storyboarding
+  * intentional typography/color direction
+
+@fixer
+- Role: Fast, cost-effective implementation specialist
+- Capabilities: Executes concrete plans efficiently once context and spec are solid
+- Tools/Constraints: Execution only; no research or delegation
+- Triggers: "implement", "refactor", "update", "change", "add feature", "fix bug"
+- Delegate to @fixer when you need things such as:
+  * concrete changes from a full spec
+  * rapid refactors with well-understood impact
+  * feature updates once design and plan are approved
+  * safe bug fixes with clear reproduction
+  * implementation of pre-populated plans
 
-@librarian - External documentation and library research  
-  Triggers: "how does X library work", "docs for", "API reference", "best practice for"
-  Example: background_task(agent="librarian", prompt="How does React Query handle cache invalidation")
-
-## Advisory Agents (Usually sync)
-
-@oracle - Architecture, debugging, and strategic code review
-  Triggers: "should I", "why does", "review", "debug", "what's wrong", "tradeoffs"
-  Use when: Complex decisions, mysterious bugs, architectural uncertainty
-
-## Implementation Agents (Sync)
-
-@designer - UI/UX design and implementation
-  Triggers: "styling", "responsive", "UI", "UX", "component design", "CSS", "animation"
-  Use when: Any visual/frontend work that needs design sense
 </Agents>
 
 <Workflow>
@@ -66,57 +96,37 @@ Parse the request. Identify explicit and implicit requirements.
 
 ## Phase 2: Delegation Gate (MANDATORY - DO NOT SKIP)
 
-STOP. Before ANY implementation, you MUST complete this checklist:
-
-\`\`\`
-DELEGATION CHECKLIST (complete before coding):
-[ ] UI/styling/design/visual/CSS/animation? → @designer MUST handle
-[ ] Need codebase context? → @explorer first  
-[ ] External library/API docs needed? → @librarian first
-[ ] Architecture decision or debugging? → @oracle first
-\`\`\`
-
-**CRITICAL RULES:**
-1. If ANY checkbox applies → delegate BEFORE you write code
-2. Reading files for context ≠ completing the task. Context gathering is Phase 1, not Phase 3.
-3. Your job is to DELEGATE task when specialize provide improved speed, quality or cost, not to DO it yourself this time.
-
-**Anti-patterns to avoid:**
-- Reading files → feeling productive → implementing yourself (WRONG)
-- Creating todos → feeling like you planned → skipping delegation (WRONG)
-- "I can handle this" → doing specialist work yourself (WRONG)
-
-## Phase 2.1: Task Planning
-1. If task has 2+ steps → Create todo list with delegations noted
-2. Mark current task \`in_progress\` before starting
-3. Mark \`completed\` immediately when done
-
-## Phase 3: Execute
-1. Fire background research (explorer, librarian) in parallel as needed
-2. DELEGATE implementation to specialists based on Phase 2 checklist
-3. Only do work yourself if NO specialist applies
-4. Integrate results from specialists
+STOP. Before ANY implementation, you MUST review each agents delegation rules and select the best agent(s) for the give stage.
 
-## Phase 4: Verify
-- Run lsp_diagnostics to check for errors
-- Suggest user to run yagni-enforcement skill when it seems applicable
-</Workflow>
+**Why Delegation Matters:**
+- @designer → 10x better designs than you → improves quality
+- @librarian → finds docs you'd miss → improves speed and quality
+- @explorer → searches faster than you → improves speed
+- @oracle → catches architectural issues you'd overlook → improves quality
+- @fixer → implements pre-populated plans faster and cheaper than you → improves speed and cost
 
-### Clarification Protocol (when asking):
+## Phase 2.1 PARALELIZATION
 
-\`\`\`
-I want to make sure I understand correctly.
+Ask if it's best based on your role to schedule agent(s) and which agent(s) in parallel if so do it.
+Ask if it's best based on your role to schedule multiple instances of the same agent if so do it.
 
-**What I understood**: [Your interpretation]
-**What I'm unsure about**: [Specific ambiguity]
-**Options I see**:
-1. [Option A] - [effort/implications]
-2. [Option B] - [effort/implications]
+## Phase 3: Plan/Execute
+1. Create todos as needed
+2. Fire background research (explorer, librarian) in parallel as needed
+3. DELEGATE implementation to specialists based on Phase 2 checklist
+4. Only do work yourself if NO specialist applies
+5. Integrate results from specialists
 
-**My recommendation**: [suggestion with reasoning]
+## Delegation Best Practices
+When delegating tasks:
+- **Use file paths/line references, NOT file contents**: Don't copy entire files into agent prompts. Reference files like "see src/components/Header.ts:42-58" instead of pasting the content.
+- **Provide context, not dumps**: Summarize what's relevant from research; let the specialist read what they need.
+- **Token efficiency**: Large pastes waste tokens, degrade performance, and can hit context limits.
 
-Should I proceed with [recommendation], or would you prefer differently?
-\`\`\`
+## Phase 4: Verify
+- Run lsp_diagnostics to check for errors
+- Suggest user to run yagni-enforcement skill when it seems applicable
+</Workflow>
 
 ## Communication Style
 

+ 5 - 10
src/cli/config-manager.ts

@@ -327,20 +327,15 @@ const MODEL_MAPPINGS = {
     librarian: "google/gemini-3-flash",
     explorer: "google/gemini-3-flash",
     designer: "google/gemini-3-flash",
+    fixer: "google/gemini-3-flash",
   },
   openai: {
     orchestrator: "openai/gpt-5.2-codex",
     oracle: "openai/gpt-5.2-codex",
-    librarian: "openai/gpt-4.1-mini",
-    explorer: "openai/gpt-4.1-mini",
-    designer: "openai/gpt-4.1-mini",
-  },
-  cerebras: {
-    orchestrator: "cerebras/zai-glm-4.7",
-    oracle: "cerebras/zai-glm-4.7",
-    librarian: "cerebras/zai-glm-4.7",
-    explorer: "cerebras/zai-glm-4.7",
-    designer: "cerebras/zai-glm-4.7",
+    librarian: "openai/gpt-5.1-codex-mini",
+    explorer: "openai/gpt-5.1-codex-mini",
+    designer: "openai/gpt-5.1-codex-mini",
+    fixer: "openai/gpt-5.1-codex-mini",
   },
   opencode: {
     orchestrator: "opencode/glm-4.7-free",

+ 4 - 2
src/config/schema.ts

@@ -53,12 +53,14 @@ export type AgentName =
   | "oracle"
   | "librarian"
   | "explorer"
-  | "designer";
+  | "designer"
+  | "fixer";
 
 export const DEFAULT_MODELS: Record<AgentName, string> = {
   orchestrator: "google/claude-opus-4-5-thinking",
   oracle: "openai/gpt-5.2-codex",
   librarian: "google/gemini-3-flash",
-  explorer: "cerebras/zai-glm-4.7",
+  explorer: "google/gemini-3-flash",
   designer: "google/gemini-3-flash",
+  fixer: "google/gemini-3-flash",
 };

+ 2 - 0
src/hooks/index.ts

@@ -1,2 +1,4 @@
 export { createAutoUpdateCheckerHook } from "./auto-update-checker"
 export type { AutoUpdateCheckerOptions } from "./auto-update-checker"
+export { createPhaseReminderHook } from "./phase-reminder"
+export { createPostReadNudgeHook } from "./post-read-nudge"

+ 92 - 0
src/hooks/phase-reminder/index.ts

@@ -0,0 +1,92 @@
+/**
+ * Phase reminder to inject before each user message.
+ * Keeps workflow instructions in the immediate attention window
+ * to combat instruction-following degradation over long contexts.
+ * 
+ * Research: "LLMs Get Lost In Multi-Turn Conversation" (arXiv:2505.06120)
+ * shows ~40% compliance drop after 2-3 turns without reminders.
+ * 
+ * Uses experimental.chat.messages.transform so it doesn't show in UI.
+ */
+const PHASE_REMINDER = `<reminder>
+Recal critical workflow phases:
+Phase 1: Understand
+Phase 2: DELEGATE 
+Phase 2.1: PARALELIZATION 
+Phase 3: Planning
+Phase 4: Execute
+Phase 5: Verify
+
+Recall Agent Specs: @oracle @librarian @explorer @designer @fixer
+</reminder>`;
+
+interface MessageInfo {
+  role: string;
+  agent?: string;
+  sessionID?: string;
+}
+
+interface MessagePart {
+  type: string;
+  text?: string;
+  [key: string]: unknown;
+}
+
+interface MessageWithParts {
+  info: MessageInfo;
+  parts: MessagePart[];
+}
+
+/**
+ * Creates the experimental.chat.messages.transform hook for phase reminder injection.
+ * This hook runs right before sending to API, so it doesn't affect UI display.
+ * Only injects for the orchestrator agent.
+ */
+export function createPhaseReminderHook() {
+  return {
+    "experimental.chat.messages.transform": async (
+      _input: Record<string, never>,
+      output: { messages: MessageWithParts[] }
+    ): Promise<void> => {
+      const { messages } = output;
+      
+      if (messages.length === 0) {
+        return;
+      }
+
+      // Find the last user message
+      let lastUserMessageIndex = -1;
+      for (let i = messages.length - 1; i >= 0; i--) {
+        if (messages[i].info.role === "user") {
+          lastUserMessageIndex = i;
+          break;
+        }
+      }
+
+      if (lastUserMessageIndex === -1) {
+        return;
+      }
+
+      const lastUserMessage = messages[lastUserMessageIndex];
+      
+      // Only inject for orchestrator (or if no agent specified = main session)
+      const agent = lastUserMessage.info.agent;
+      if (agent && agent !== "orchestrator") {
+        return;
+      }
+
+      // Find the first text part
+      const textPartIndex = lastUserMessage.parts.findIndex(
+        (p) => p.type === "text" && p.text !== undefined
+      );
+
+      if (textPartIndex === -1) {
+        return;
+      }
+
+      // Prepend the reminder to the existing text
+      const originalText = lastUserMessage.parts[textPartIndex].text ?? "";
+      lastUserMessage.parts[textPartIndex].text = `${PHASE_REMINDER}\n\n---\n\n${originalText}`;
+    },
+  };
+}

+ 35 - 0
src/hooks/post-read-nudge/index.ts

@@ -0,0 +1,35 @@
+/**
+ * Post-Read nudge - appends a delegation reminder after file reads.
+ * Catches the "read files → implement myself" anti-pattern.
+ */
+
+const NUDGE = "\n\n---\n⚡ Consider: delegate to specialist now? (When delegating, reference file paths/lines—don't copy file contents.)";
+
+interface ToolExecuteAfterInput {
+  tool: string;
+  sessionID?: string;
+  callID?: string;
+}
+
+interface ToolExecuteAfterOutput {
+  title: string;
+  output: string;
+  metadata: Record<string, unknown>;
+}
+
+export function createPostReadNudgeHook() {
+  return {
+    "tool.execute.after": async (
+      input: ToolExecuteAfterInput,
+      output: ToolExecuteAfterOutput
+    ): Promise<void> => {
+      // Only nudge for Read tool
+      if (input.tool !== "Read" && input.tool !== "read") {
+        return;
+      }
+
+      // Append the nudge
+      output.output = output.output + NUDGE;
+    },
+  };
+}

+ 13 - 1
src/index.ts

@@ -16,7 +16,7 @@ import {
 } from "./tools";
 import { loadPluginConfig, type TmuxConfig } from "./config";
 import { createBuiltinMcps } from "./mcp";
-import { createAutoUpdateCheckerHook } from "./hooks";
+import { createAutoUpdateCheckerHook, createPhaseReminderHook, createPostReadNudgeHook } from "./hooks";
 import { startTmuxCheck } from "./utils";
 import { log } from "./shared/logger";
 
@@ -57,6 +57,12 @@ const OhMyOpenCodeLite: Plugin = async (ctx) => {
     autoUpdate: true,
   });
 
+  // Initialize phase reminder hook for workflow compliance
+  const phaseReminderHook = createPhaseReminderHook();
+
+  // Initialize post-read nudge hook
+  const postReadNudgeHook = createPostReadNudgeHook();
+
   return {
     name: "oh-my-opencode-slim",
 
@@ -106,6 +112,12 @@ const OhMyOpenCodeLite: Plugin = async (ctx) => {
         properties?: { info?: { id?: string; parentID?: string; title?: string } };
       });
     },
+
+    // Inject phase reminder before sending to API (doesn't show in UI)
+    "experimental.chat.messages.transform": phaseReminderHook["experimental.chat.messages.transform"],
+
+    // Nudge after file reads to encourage delegation
+    "tool.execute.after": postReadNudgeHook["tool.execute.after"],
   };
 };
 

+ 4 - 0
src/tools/skill/builtin.test.ts

@@ -59,6 +59,10 @@ describe("DEFAULT_AGENT_SKILLS", () => {
   test("explorer has no skills by default", () => {
     expect(DEFAULT_AGENT_SKILLS.explorer).toEqual([])
   })
+
+  test("fixer has no skills by default", () => {
+    expect(DEFAULT_AGENT_SKILLS.fixer).toEqual([])
+  })
 })
 
 describe("getSkillsForAgent", () => {

+ 1 - 0
src/tools/skill/builtin.ts

@@ -14,6 +14,7 @@ export const DEFAULT_AGENT_SKILLS: Record<AgentName, string[]> = {
   oracle: [],
   librarian: [],
   explorer: [],
+  fixer: [],
 };
 
 const YAGNI_TEMPLATE = `# YAGNI Enforcement Skill