diff --git a/AGENTS.md b/AGENTS.md index 73359b2c..bb8b7c5e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ # oh-my-opencode — OpenCode Plugin -**Generated:** 2026-02-19 | **Commit:** 5dc437f4 | **Branch:** dev +**Generated:** 2026-02-19 | **Commit:** 29ebd8c4 | **Branch:** dev ## OVERVIEW @@ -86,7 +86,7 @@ Fields: agents (14 overridable), categories (8 built-in + custom), disabled_* ar - **Test pattern**: Bun test (`bun:test`), co-located `*.test.ts`, given/when/then style - **Factory pattern**: `createXXX()` for all tools, hooks, agents -- **Hook tiers**: Session (22) → Tool-Guard (9) → Transform (4) → Continuation (7) → Skill (2) +- **Hook tiers**: Session (21) → Tool-Guard (10) → Transform (4) → Continuation (7) → Skill (2) - **Agent modes**: `primary` (respects UI model) vs `subagent` (own fallback chain) vs `all` - **Model resolution**: 3-step: override → category-default → provider-fallback → system-default - **Config format**: JSONC with comments, Zod v4 validation, snake_case keys diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 265c049f..477d559c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -109,18 +109,20 @@ After making changes, you can test your local build in OpenCode: ``` oh-my-opencode/ ├── src/ -│ ├── agents/ # AI agents (OmO, oracle, librarian, explore, etc.) -│ ├── hooks/ # 21 lifecycle hooks -│ ├── tools/ # LSP (11), AST-Grep, Grep, Glob, etc. -│ ├── mcp/ # MCP server integrations (context7, grep_app) -│ ├── features/ # Claude Code compatibility layers -│ ├── config/ # Zod schemas and TypeScript types -│ ├── auth/ # Google Antigravity OAuth -│ ├── shared/ # Common utilities -│ └── index.ts # Main plugin entry (OhMyOpenCodePlugin) -├── script/ # Build utilities (build-schema.ts, publish.ts) -├── assets/ # JSON schema -└── dist/ # Build output (ESM + .d.ts) +│ ├── index.ts # Plugin entry (OhMyOpenCodePlugin) +│ ├── plugin-config.ts # JSONC multi-level config (Zod v4) +│ ├── agents/ # 11 agents (Sisyphus, Hephaestus, Oracle, Librarian, Explore, Atlas, Prometheus, Metis, Momus, Multimodal-Looker, Sisyphus-Junior) +│ ├── hooks/ # 44 lifecycle hooks across 39 directories +│ ├── tools/ # 26 tools across 15 directories +│ ├── mcp/ # 3 built-in remote MCPs (websearch, context7, grep_app) +│ ├── features/ # 19 feature modules (background-agent, skill-loader, tmux, MCP-OAuth, etc.) +│ ├── config/ # Zod v4 schema system +│ ├── shared/ # Cross-cutting utilities +│ ├── cli/ # CLI: install, run, doctor, mcp-oauth (Commander.js) +│ ├── plugin/ # 8 OpenCode hook handlers + hook composition +│ └── plugin-handlers/ # 6-phase config loading pipeline +├── packages/ # Monorepo: comment-checker, opencode-sdk +└── dist/ # Build output (ESM + .d.ts) ``` ## Development Workflow diff --git a/docs/category-skill-guide.md b/docs/category-skill-guide.md index ac520e51..8cee4d5c 100644 --- a/docs/category-skill-guide.md +++ b/docs/category-skill-guide.md @@ -28,7 +28,7 @@ A Category is an agent configuration preset optimized for specific domains. | `quick` | `anthropic/claude-haiku-4-5` | Trivial tasks - single file changes, typo fixes, simple modifications | | `unspecified-low` | `anthropic/claude-sonnet-4-6` | Tasks that don't fit other categories, low effort required | | `unspecified-high` | `anthropic/claude-opus-4-6` (max) | Tasks that don't fit other categories, high effort required | -| `writing` | `google/gemini-3-flash` | Documentation, prose, technical writing | +| `writing` | `kimi-for-coding/k2p5` | Documentation, prose, technical writing | ### Usage diff --git a/docs/cli-guide.md b/docs/cli-guide.md index 97d368ff..e8641ce9 100644 --- a/docs/cli-guide.md +++ b/docs/cli-guide.md @@ -23,8 +23,8 @@ npx oh-my-opencode | `install` | Interactive Setup Wizard | | `doctor` | Environment diagnostics and health checks | | `run` | OpenCode session runner | -| `auth` | Google Antigravity authentication management | -| `version` | Display version information | +| `mcp oauth` | MCP OAuth authentication management | +| `get-local-version` | Display local version information | --- @@ -131,6 +131,15 @@ bunx oh-my-opencode run [prompt] |--------|-------------| | `--enforce-completion` | Keep session active until all TODOs are completed | | `--timeout ` | Set maximum execution time | +| `--agent ` | Specify agent to use | +| `--directory ` | Set working directory | +| `--port ` | Set port for session | +| `--attach` | Attach to existing session | +| `--json` | Output in JSON format | +| `--no-timestamp` | Disable timestamped output | +| `--session-id ` | Resume existing session | +| `--on-complete ` | Action on completion | +| `--verbose` | Enable verbose logging | --- @@ -267,14 +276,17 @@ bunx oh-my-opencode doctor --json > doctor-report.json ``` src/cli/ -├── index.ts # Commander.js-based main entry +├── cli-program.ts # Commander.js-based main entry ├── install.ts # @clack/prompts-based TUI installer -├── config-manager.ts # JSONC parsing, multi-source config management +├── config-manager/ # JSONC parsing, multi-source config management +│ └── *.ts ├── doctor/ # Health check system │ ├── index.ts # Doctor command entry │ └── checks/ # 17+ individual check modules ├── run/ # Session runner -└── commands/auth.ts # Authentication management +│ └── *.ts +└── mcp-oauth/ # OAuth management commands + └── *.ts ``` ### Adding New Doctor Checks diff --git a/docs/features.md b/docs/features.md index d2c14667..37a90a97 100644 --- a/docs/features.md +++ b/docs/features.md @@ -10,12 +10,12 @@ Oh-My-OpenCode provides 11 specialized AI agents. Each has distinct expertise, o | Agent | Model | Purpose | |-------|-------|---------| -| **Sisyphus** | `anthropic/claude-opus-4-6` | **The default orchestrator.** Plans, delegates, and executes complex tasks using specialized subagents with aggressive parallel execution. Todo-driven workflow with extended thinking (32k budget). Fallback: k2p5 → kimi-k2.5-free → glm-4.7 → glm-4.7-free. | +| **Sisyphus** | `anthropic/claude-opus-4-6` | **The default orchestrator.** Plans, delegates, and executes complex tasks using specialized subagents with aggressive parallel execution. Todo-driven workflow with extended thinking (32k budget). Fallback: k2p5 → kimi-k2.5-free → glm-5 → big-pickle. | | **Hephaestus** | `openai/gpt-5.3-codex` | **The Legitimate Craftsman.** Autonomous deep worker inspired by AmpCode's deep mode. Goal-oriented execution with thorough research before action. Explores codebase patterns, completes tasks end-to-end without premature stopping. Named after the Greek god of forge and craftsmanship. Requires gpt-5.3-codex (no fallback - only activates when this model is available). | | **oracle** | `openai/gpt-5.2` | Architecture decisions, code review, debugging. Read-only consultation - stellar logical reasoning and deep analysis. Inspired by AmpCode. | -| **librarian** | `zai-coding-plan/glm-4.7` | Multi-repo analysis, documentation lookup, OSS implementation examples. Deep codebase understanding with evidence-based answers. Fallback: glm-4.7-free → claude-sonnet-4-6. | -| **explore** | `github-copilot/grok-code-fast-1` | Fast codebase exploration and contextual grep. Fallback: claude-haiku-4-5 → gpt-5-nano. | -| **multimodal-looker** | `google/gemini-3-flash` | Visual content specialist. Analyzes PDFs, images, diagrams to extract information. Fallback: gpt-5.2 → glm-4.6v → k2p5 → kimi-k2.5-free → claude-haiku-4-5 → gpt-5-nano. | +| **librarian** | `google/gemini-3-flash` | Multi-repo analysis, documentation lookup, OSS implementation examples. Deep codebase understanding with evidence-based answers. Fallback: minimax-m2.5-free → big-pickle. | +| **explore** | `github-copilot/grok-code-fast-1` | Fast codebase exploration and contextual grep. Fallback: minimax-m2.5-free → claude-haiku-4-5 → gpt-5-nano. | +| **multimodal-looker** | `kimi-for-coding/k2p5` | Visual content specialist. Analyzes PDFs, images, diagrams to extract information. Fallback: kimi-k2.5-free → gemini-3-flash → gpt-5.2 → glm-4.6v. | ### Planning Agents diff --git a/src/AGENTS.md b/src/AGENTS.md index 65ddb9eb..9a278aa7 100644 --- a/src/AGENTS.md +++ b/src/AGENTS.md @@ -33,8 +33,8 @@ loadPluginConfig(directory, ctx) ``` createHooks() ├─→ createCoreHooks() # 35 hooks - │ ├─ createSessionHooks() # 22: contextWindowMonitor, thinkMode, ralphLoop, sessionRecovery, jsonErrorRecovery, sisyphusGptHephaestusReminder, taskReminder... - │ ├─ createToolGuardHooks() # 9: commentChecker, rulesInjector, writeExistingFileGuard... + │ ├─ createSessionHooks() # 21: contextWindowMonitor, thinkMode, ralphLoop, sessionRecovery, jsonErrorRecovery, sisyphusGptHephaestusReminder, anthropicEffort... + │ ├─ createToolGuardHooks() # 10: commentChecker, rulesInjector, writeExistingFileGuard, hashlineEditDiffEnhancer... │ └─ createTransformHooks() # 4: claudeCodeHooks, keywordDetector, contextInjector, thinkingBlockValidator ├─→ createContinuationHooks() # 7: todoContinuationEnforcer, atlas, stopContinuationGuard... └─→ createSkillHooks() # 2: categorySkillReminder, autoSlashCommand diff --git a/src/plugin/AGENTS.md b/src/plugin/AGENTS.md index 6bacbea2..4c11f30f 100644 --- a/src/plugin/AGENTS.md +++ b/src/plugin/AGENTS.md @@ -23,8 +23,8 @@ Core glue layer. 20 source files assembling the 8 OpenCode hook handlers and com | File | Tier | Count | |------|------|-------| -| `create-session-hooks.ts` | Session | 22 | -| `create-tool-guard-hooks.ts` | Tool Guard | 9 | +| `create-session-hooks.ts` | Session | 21 | +| `create-tool-guard-hooks.ts` | Tool Guard | 10 | | `create-transform-hooks.ts` | Transform | 4 | | `create-continuation-hooks.ts` | Continuation | 7 | | `create-skill-hooks.ts` | Skill | 2 | @@ -40,6 +40,8 @@ Core glue layer. 20 source files assembling the 8 OpenCode hook handlers and com | `recent-synthetic-idles.ts` | Dedup rapid idle events | | `unstable-agent-babysitter.ts` | Track unstable agent behavior across sessions | | `types.ts` | `PluginContext`, `PluginInterface`, `ToolsRecord`, `TmuxConfig` | +| `ultrawork-model-override.ts` | Ultrawork mode model override logic | +| `ultrawork-db-model-override.ts` | DB-level model override for ultrawork | ## KEY PATTERNS diff --git a/src/tools/AGENTS.md b/src/tools/AGENTS.md index c7ceff2f..42992217 100644 --- a/src/tools/AGENTS.md +++ b/src/tools/AGENTS.md @@ -1,4 +1,4 @@ -# src/tools/ — 26 Tools Across 14 Directories +# src/tools/ — 26 Tools Across 15 Directories **Generated:** 2026-02-19