docs(agents): refresh generated AGENTS guides
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# oh-my-opencode — OpenCode Plugin
|
||||
# oh-my-opencode — O P E N C O D E Plugin
|
||||
|
||||
**Generated:** 2026-03-02 | **Commit:** 1c2caa09 | **Branch:** dev
|
||||
**Generated:** 2026-03-06 | **Commit:** 7fe44024 | **Branch:** dev
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
OpenCode plugin (npm: `oh-my-opencode`) that extends Claude Code (OpenCode fork) with multi-agent orchestration, 46 lifecycle hooks, 26 tools, skill/command/MCP systems, and Claude Code compatibility. 1243 TypeScript files, 155k LOC.
|
||||
OpenCode plugin (npm: `oh-my-opencode`) that extends Claude Code (OpenCode fork) with multi-agent orchestration, 46 lifecycle hooks, 26 tools, skill/command/MCP systems, and Claude Code compatibility. 1268 TypeScript files, 160k LOC.
|
||||
|
||||
## STRUCTURE
|
||||
|
||||
@@ -46,6 +46,7 @@ OhMyOpenCodePlugin(ctx)
|
||||
| `tool` | 26 registered tools |
|
||||
| `chat.message` | First-message variant, session setup, keyword detection |
|
||||
| `chat.params` | Anthropic effort level adjustment |
|
||||
| `chat.headers` | Copilot x-initiator header injection |
|
||||
| `event` | Session lifecycle (created, deleted, idle, error) |
|
||||
| `tool.execute.before` | Pre-tool hooks (file guard, label truncator, rules injector) |
|
||||
| `tool.execute.after` | Post-tool hooks (output truncation, metadata store) |
|
||||
@@ -73,6 +74,12 @@ OhMyOpenCodePlugin(ctx)
|
||||
Project (.opencode/oh-my-opencode.jsonc) → User (~/.config/opencode/oh-my-opencode.jsonc) → Defaults
|
||||
```
|
||||
|
||||
- `agents`, `categories`, `claude_code`: deep merged recursively
|
||||
- `disabled_*` arrays: Set union (concatenated + deduplicated)
|
||||
- All other fields: override replaces base value
|
||||
- Zod `safeParse()` fills defaults for omitted fields
|
||||
- `migrateConfigFile()` transforms legacy keys automatically
|
||||
|
||||
Fields: agents (14 overridable, 21 fields each), categories (8 built-in + custom), disabled_* arrays (agents, hooks, mcps, skills, commands, tools), 19 feature-specific configs.
|
||||
|
||||
## THREE-TIER MCP SYSTEM
|
||||
@@ -85,15 +92,19 @@ Fields: agents (14 overridable, 21 fields each), categories (8 built-in + custom
|
||||
|
||||
## CONVENTIONS
|
||||
|
||||
- **Runtime**: Bun only — never use npm/yarn
|
||||
- **TypeScript**: strict mode, ESNext, bundler moduleResolution, `bun-types` (never `@types/node`)
|
||||
- **Test pattern**: Bun test (`bun:test`), co-located `*.test.ts`, given/when/then style (nested describe with `#given`/`#when`/`#then` prefixes)
|
||||
- **CI test split**: mock-heavy tests run in isolation (separate `bun test` processes), rest in batch
|
||||
- **Factory pattern**: `createXXX()` for all tools, hooks, agents
|
||||
- **Hook tiers**: Session (23) → 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
|
||||
- **Model resolution**: 4-step: override → category-default → provider-fallback → system-default
|
||||
- **Config format**: JSONC with comments, Zod v4 validation, snake_case keys
|
||||
- **File naming**: kebab-case for all files/directories
|
||||
- **Module structure**: index.ts barrel exports, no catch-all files (utils.ts, helpers.ts banned), 200 LOC soft limit
|
||||
- **Imports**: relative within module, barrel imports across modules (`import { log } from "./shared"`)
|
||||
- **No path aliases**: no `@/` — relative imports only
|
||||
|
||||
## ANTI-PATTERNS
|
||||
|
||||
@@ -101,16 +112,21 @@ Fields: agents (14 overridable, 21 fields each), categories (8 built-in + custom
|
||||
- Never suppress lint/type errors
|
||||
- Never add emojis to code/comments unless user explicitly asks
|
||||
- Never commit unless explicitly requested
|
||||
- Never run `bun publish` directly — use GitHub Actions
|
||||
- Never modify `package.json` version locally
|
||||
- Test: given/when/then — never use Arrange-Act-Assert comments
|
||||
- Comments: avoid AI-generated comment patterns (enforced by comment-checker hook)
|
||||
- Never create catch-all files (`utils.ts`, `helpers.ts`, `service.ts`)
|
||||
- Empty catch blocks `catch(e) {}` — always handle errors
|
||||
- Never use em dashes (—), en dashes (–), or AI filler phrases in generated content
|
||||
- index.ts is entry point ONLY — never dump business logic there
|
||||
|
||||
## COMMANDS
|
||||
|
||||
```bash
|
||||
bun test # Bun test suite
|
||||
bun run build # Build plugin (ESM + declarations + schema)
|
||||
bun run build:all # Build + platform binaries
|
||||
bun run typecheck # tsc --noEmit
|
||||
bunx oh-my-opencode install # Interactive setup
|
||||
bunx oh-my-opencode doctor # Health diagnostics
|
||||
@@ -121,10 +137,12 @@ bunx oh-my-opencode run # Non-interactive session
|
||||
|
||||
| Workflow | Trigger | Purpose |
|
||||
|----------|---------|---------|
|
||||
| ci.yml | push/PR | Tests (split: mock-heavy isolated + batch), typecheck, build, schema auto-commit |
|
||||
| publish.yml | manual | Version bump, npm publish, platform binaries, GitHub release, merge to dev |
|
||||
| publish-platform.yml | called | 12 platform binaries via bun compile (darwin/linux/windows) |
|
||||
| sisyphus-agent.yml | @mention | AI agent handles issues/PRs |
|
||||
| ci.yml | push/PR to master/dev | Tests (split: mock-heavy isolated + batch), typecheck, build, schema auto-commit |
|
||||
| publish.yml | manual dispatch | Version bump, npm publish, platform binaries, GitHub release, merge to master |
|
||||
| publish-platform.yml | called by publish | 12 platform binaries via bun compile (darwin/linux/windows) |
|
||||
| sisyphus-agent.yml | @mention / dispatch | AI agent handles issues/PRs |
|
||||
| cla.yml | issue_comment/PR | CLA assistant for contributors |
|
||||
| lint-workflows.yml | push to .github/ | actionlint + shellcheck on workflow files |
|
||||
|
||||
## NOTES
|
||||
|
||||
@@ -135,3 +153,5 @@ bunx oh-my-opencode run # Non-interactive session
|
||||
- Config migration runs automatically on legacy keys (agent names, hook names, model versions)
|
||||
- Build: bun build (ESM) + tsc --emitDeclarationOnly, externals: @ast-grep/napi
|
||||
- Test setup: `test-setup.ts` preloaded via bunfig.toml, mock-heavy tests run in isolation in CI
|
||||
- 98 barrel export files (index.ts) establish module boundaries
|
||||
- Architecture rules enforced via `.sisyphus/rules/modular-code-enforcement.md`
|
||||
|
||||
+8
-8
@@ -1,21 +1,21 @@
|
||||
# src/ — Plugin Source
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
Root source directory. Entry point `index.ts` orchestrates 4-step initialization: config → managers → tools → hooks → plugin interface.
|
||||
Entry point `index.ts` orchestrates 5-step initialization: loadConfig → createManagers → createTools → createHooks → createPluginInterface.
|
||||
|
||||
## KEY FILES
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `index.ts` | Plugin entry, exports `OhMyOpenCodePlugin` |
|
||||
| `plugin-config.ts` | JSONC parse, multi-level merge (user → project → defaults), Zod validation |
|
||||
| `plugin-config.ts` | JSONC parse, multi-level merge, Zod v4 validation |
|
||||
| `create-managers.ts` | TmuxSessionManager, BackgroundManager, SkillMcpManager, ConfigHandler |
|
||||
| `create-tools.ts` | SkillContext + AvailableCategories + ToolRegistry |
|
||||
| `create-hooks.ts` | 3-tier hook composition: Core(37) + Continuation(7) + Skill(2) |
|
||||
| `plugin-interface.ts` | Assembles 8 OpenCode hook handlers into PluginInterface |
|
||||
| `create-tools.ts` | SkillContext + AvailableCategories + ToolRegistry (26 tools) |
|
||||
| `create-hooks.ts` | 3-tier: Core(37) + Continuation(7) + Skill(2) = 46 hooks |
|
||||
| `plugin-interface.ts` | 8 OpenCode hook handlers: config, tool, chat.message, chat.params, chat.headers, event, tool.execute.before, tool.execute.after |
|
||||
|
||||
## CONFIG LOADING
|
||||
|
||||
@@ -33,9 +33,9 @@ loadPluginConfig(directory, ctx)
|
||||
```
|
||||
createHooks()
|
||||
├─→ createCoreHooks() # 37 hooks
|
||||
│ ├─ createSessionHooks() # 23: contextWindowMonitor, thinkMode, ralphLoop, modelFallback, runtimeFallback, noSisyphusGpt, noHephaestusNonGpt, anthropicEffort...
|
||||
│ ├─ createSessionHooks() # 23: contextWindowMonitor, thinkMode, ralphLoop, modelFallback, runtimeFallback, noSisyphusGpt, noHephaestusNonGpt, anthropicEffort, intentGate...
|
||||
│ ├─ createToolGuardHooks() # 10: commentChecker, rulesInjector, writeExistingFileGuard, jsonErrorRecovery, hashlineReadEnhancer...
|
||||
│ └─ createTransformHooks() # 4: claudeCodeHooks, keywordDetector, contextInjector, thinkingBlockValidator
|
||||
├─→ createContinuationHooks() # 7: todoContinuationEnforcer, atlas, stopContinuationGuard...
|
||||
├─→ createContinuationHooks() # 7: todoContinuationEnforcer, atlas, stopContinuationGuard, ralphLoopActivator...
|
||||
└─→ createSkillHooks() # 2: categorySkillReminder, autoSlashCommand
|
||||
```
|
||||
|
||||
+12
-12
@@ -1,6 +1,6 @@
|
||||
# src/agents/ — 11 Agent Definitions
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
@@ -10,16 +10,16 @@ Agent factories following `createXXXAgent(model) → AgentConfig` pattern. Each
|
||||
|
||||
| Agent | Model | Temp | Mode | Fallback Chain | Purpose |
|
||||
|-------|-------|------|------|----------------|---------|
|
||||
| **Sisyphus** | claude-opus-4-6 | 0.1 | all | kimi-k2.5 → glm-5 → big-pickle | Main orchestrator, plans + delegates |
|
||||
| **Hephaestus** | gpt-5.3-codex | 0.1 | all | gpt-5.2 (copilot) | Autonomous deep worker |
|
||||
| **Oracle** | gpt-5.2 | 0.1 | subagent | gemini-3.1-pro → claude-opus-4-6 | Read-only consultation |
|
||||
| **Librarian** | kimi-k2.5 | 0.1 | subagent | gemini-3-flash → gpt-5.2 → glm-4.6v | External docs/code search |
|
||||
| **Explore** | grok-code-fast-1 | 0.1 | subagent | minimax-m2.5 → claude-haiku-4-5 → gpt-5-nano | Contextual grep |
|
||||
| **Multimodal-Looker** | gemini-3-flash | 0.1 | subagent | minimax-m2.5 → big-pickle | PDF/image analysis |
|
||||
| **Metis** | claude-opus-4-6 | **0.3** | subagent | gpt-5.2 → kimi-k2.5 → gemini-3.1-pro | Pre-planning consultant |
|
||||
| **Momus** | gpt-5.2 | 0.1 | subagent | claude-opus-4-6 → gemini-3.1-pro | Plan reviewer |
|
||||
| **Atlas** | kimi-k2.5 | 0.1 | primary | claude-sonnet-4-6 → gpt-5.2 | Todo-list orchestrator |
|
||||
| **Prometheus** | claude-opus-4-6 | 0.1 | — | kimi-k2.5 → gpt-5.2 → gemini-3.1-pro | Strategic planner (internal) |
|
||||
| **Sisyphus** | claude-opus-4-6 max | 0.1 | all | glm-5 → big-pickle | Main orchestrator, plans + delegates |
|
||||
| **Hephaestus** | gpt-5.3-codex medium | 0.1 | all | gpt-5.2 medium (copilot) | Autonomous deep worker |
|
||||
| **Oracle** | gpt-5.2 high | 0.1 | subagent | gemini-3.1-pro high → claude-opus-4-6 max | Read-only consultation |
|
||||
| **Librarian** | gemini-3-flash | 0.1 | subagent | minimax-m2.5-free → big-pickle | External docs/code search |
|
||||
| **Explore** | grok-code-fast-1 | 0.1 | subagent | minimax-m2.5-free → claude-haiku-4-5 → gpt-5-nano | Contextual grep |
|
||||
| **Multimodal-Looker** | gpt-5.3-codex medium | 0.1 | subagent | k2p5 → gemini-3-flash → glm-4.6v → gpt-5-nano | PDF/image analysis |
|
||||
| **Metis** | claude-opus-4-6 max | **0.3** | subagent | gpt-5.2 high → gemini-3.1-pro high | Pre-planning consultant |
|
||||
| **Momus** | gpt-5.4 xhigh | 0.1 | subagent | claude-opus-4-6 max → gemini-3.1-pro high | Plan reviewer |
|
||||
| **Atlas** | claude-sonnet-4-6 | 0.1 | primary | gpt-5.4 medium | Todo-list orchestrator |
|
||||
| **Prometheus** | claude-opus-4-6 max | 0.1 | — | gpt-5.4 high → gemini-3.1-pro | Strategic planner (internal) |
|
||||
| **Sisyphus-Junior** | claude-sonnet-4-6 | 0.1 | all | user-configurable | Category-spawned executor |
|
||||
|
||||
## TOOL RESTRICTIONS
|
||||
@@ -70,7 +70,7 @@ const createXXXAgent: AgentFactory = (model: string) => ({
|
||||
createXXXAgent.mode = "subagent" // or "primary" or "all"
|
||||
```
|
||||
|
||||
Model resolution: `AGENT_MODEL_REQUIREMENTS` in `shared/model-requirements.ts` defines fallback chains per agent.
|
||||
Model resolution: 4-step: override → category-default → provider-fallback → system-default. Defined in `shared/model-requirements.ts`.
|
||||
|
||||
## MODES
|
||||
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
# src/cli/ — CLI: install, run, doctor, mcp-oauth
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
@@ -51,9 +51,9 @@ cli/
|
||||
|
||||
## MODEL FALLBACK SYSTEM
|
||||
|
||||
Priority: Claude > OpenAI > Gemini > Copilot > OpenCode Zen > Z.ai > Kimi > big-pickle
|
||||
No single global priority. CLI install-time resolution uses per-agent fallback chains from `model-fallback-requirements.ts`.
|
||||
|
||||
Agent-specific: librarian→ZAI, explore→Haiku/nano, hephaestus→requires OpenAI/Copilot
|
||||
Common patterns: Claude/OpenAI/Gemini are preferred when an agent chain includes them, `librarian` prefers ZAI, `sisyphus` falls back through Kimi then GLM-5, and `hephaestus` requires OpenAI-compatible providers.
|
||||
|
||||
## DOCTOR CHECKS
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/cli/config-manager/ — CLI Installation Utilities
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/cli/run/ — Non-Interactive Session Launcher
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/config/ — Zod v4 Schema System
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
+21
-21
@@ -1,6 +1,6 @@
|
||||
# src/features/ — 19 Feature Modules
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
@@ -10,29 +10,29 @@ Standalone feature modules wired into plugin/ layer. Each is self-contained with
|
||||
|
||||
| Module | Files | Complexity | Purpose |
|
||||
|--------|-------|------------|---------|
|
||||
| **background-agent** | 49 | HIGH | Task lifecycle, concurrency (5/model), polling, spawner pattern |
|
||||
| **tmux-subagent** | 27 | HIGH | Tmux pane management, grid planning, session orchestration |
|
||||
| **opencode-skill-loader** | 25 | HIGH | YAML frontmatter skill loading from 4 scopes |
|
||||
| **mcp-oauth** | 10 | HIGH | OAuth 2.0 + PKCE + DCR (RFC 7591) for MCP servers |
|
||||
| **builtin-skills** | 10 | LOW | 6 skills: git-master, playwright, playwright-cli, agent-browser, dev-browser, frontend-ui-ux |
|
||||
| **skill-mcp-manager** | 10 | MEDIUM | MCP client lifecycle per session (stdio + HTTP) |
|
||||
| **opencode-skill-loader** | 33 | HIGH | YAML frontmatter skill loading from 4 scopes |
|
||||
| **background-agent** | 31 | HIGH | Task lifecycle, concurrency (5/model), polling, spawner pattern |
|
||||
| **tmux-subagent** | 30 | HIGH | Tmux pane management, grid planning, session orchestration |
|
||||
| **mcp-oauth** | 18 | HIGH | OAuth 2.0 + PKCE + DCR (RFC 7591) for MCP servers |
|
||||
| **builtin-skills** | 17 | LOW | 6 skills: git-master, playwright, playwright-cli, agent-browser, dev-browser, frontend-ui-ux |
|
||||
| **skill-mcp-manager** | 12 | MEDIUM | MCP client lifecycle per session (stdio + HTTP) |
|
||||
| **claude-code-plugin-loader** | 10 | MEDIUM | Unified plugin discovery from .opencode/plugins/ |
|
||||
| **builtin-commands** | 9 | LOW | Command templates: refactor, init-deep, handoff, etc. |
|
||||
| **claude-code-mcp-loader** | 5 | MEDIUM | .mcp.json loading with ${VAR} env expansion |
|
||||
| **context-injector** | 4 | MEDIUM | AGENTS.md/README.md injection into context |
|
||||
| **boulder-state** | 4 | LOW | Persistent state for multi-step operations |
|
||||
| **hook-message-injector** | 4 | MEDIUM | System message injection for hooks |
|
||||
| **claude-tasks** | 4 | MEDIUM | Task schema + file storage + OpenCode todo sync |
|
||||
| **task-toast-manager** | 3 | MEDIUM | Task progress notifications |
|
||||
| **claude-code-agent-loader** | 3 | LOW | Load agents from .opencode/agents/ |
|
||||
| **claude-code-command-loader** | 3 | LOW | Load commands from .opencode/commands/ |
|
||||
| **claude-code-session-state** | 2 | LOW | Subagent session state tracking |
|
||||
| **builtin-commands** | 11 | LOW | Command templates: refactor, init-deep, handoff, etc. |
|
||||
| **claude-tasks** | 7 | MEDIUM | Task schema + file storage + OpenCode todo sync |
|
||||
| **claude-code-mcp-loader** | 6 | MEDIUM | .mcp.json loading with ${VAR} env expansion |
|
||||
| **context-injector** | 6 | MEDIUM | AGENTS.md/README.md injection into context |
|
||||
| **run-continuation-state** | 5 | LOW | Persistent state for `run` command continuation across sessions |
|
||||
| **tool-metadata-store** | 2 | LOW | Tool execution metadata cache |
|
||||
| **hook-message-injector** | 5 | MEDIUM | System message injection for hooks |
|
||||
| **boulder-state** | 5 | LOW | Persistent state for multi-step operations |
|
||||
| **task-toast-manager** | 4 | MEDIUM | Task progress notifications |
|
||||
| **tool-metadata-store** | 3 | LOW | Tool execution metadata cache |
|
||||
| **claude-code-session-state** | 3 | LOW | Subagent session state tracking |
|
||||
| **claude-code-command-loader** | 3 | LOW | Load commands from .opencode/commands/ |
|
||||
| **claude-code-agent-loader** | 3 | LOW | Load agents from .opencode/agents/ |
|
||||
|
||||
## KEY MODULES
|
||||
|
||||
### background-agent (49 files, ~10k LOC)
|
||||
### background-agent (31 files, ~10k LOC)
|
||||
|
||||
Core orchestration engine. `BackgroundManager` manages task lifecycle:
|
||||
- States: pending → running → completed/error/cancelled/interrupt
|
||||
@@ -40,7 +40,7 @@ Core orchestration engine. `BackgroundManager` manages task lifecycle:
|
||||
- Polling: 3s interval, completion via idle events + stability detection (10s unchanged)
|
||||
- spawner/: 8 focused files composing via `SpawnerContext` interface
|
||||
|
||||
### opencode-skill-loader (25 files, ~3.2k LOC)
|
||||
### opencode-skill-loader (33 files, ~3.2k LOC)
|
||||
|
||||
4-scope skill discovery (project > opencode > user > global):
|
||||
- YAML frontmatter parsing from SKILL.md files
|
||||
@@ -48,7 +48,7 @@ Core orchestration engine. `BackgroundManager` manages task lifecycle:
|
||||
- Template resolution with variable substitution
|
||||
- Provider gating for model-specific skills
|
||||
|
||||
### tmux-subagent (27 files, ~3.6k LOC)
|
||||
### tmux-subagent (30 files, ~3.6k LOC)
|
||||
|
||||
State-first tmux integration:
|
||||
- `TmuxSessionManager`: pane lifecycle, grid planning
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/features/background-agent/ — Core Orchestration Engine
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/features/claude-tasks/ — Task Schema + Storage
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/features/mcp-oauth/ — OAuth 2.0 + PKCE + DCR for MCP Servers
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/features/opencode-skill-loader/ — 4-Scope Skill Discovery
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/features/tmux-subagent/ — Tmux Pane Management
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# src/hooks/ — 46 Lifecycle Hooks
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/hooks/anthropic-context-window-limit-recovery/ — Multi-Strategy Context Recovery
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/hooks/atlas/ — Master Boulder Orchestrator
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/hooks/claude-code-hooks/ — Claude Code Compatibility
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/hooks/keyword-detector/ — Mode Keyword Injection
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/hooks/ralph-loop/ — Self-Referential Dev Loop
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/hooks/rules-injector/ — Conditional Rules Injection
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/hooks/session-recovery/ — Auto Session Error Recovery
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/hooks/todo-continuation-enforcer/ — Boulder Continuation Mechanism
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# src/mcp/ — 3 Built-in Remote MCPs
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/plugin-handlers/ — 6-Phase Config Loading Pipeline
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/plugin/ — 8 OpenCode Hook Handlers + Hook Composition
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
@@ -17,14 +17,13 @@ Core glue layer. 20 source files assembling the 8 OpenCode hook handlers and com
|
||||
| `tool-execute-after.ts` | `tool.execute.after` | Post-tool hooks (output truncation, comment checker, metadata) |
|
||||
| `messages-transform.ts` | `experimental.chat.messages.transform` | Context injection, thinking block validation |
|
||||
| `tool-registry.ts` | `tool` | 26 tools assembled from factories |
|
||||
| `chat-headers.ts` | `chat.headers` | Copilot x-initiator header injection |
|
||||
| `skill-context.ts` | — | Skill/browser/category context for tool creation |
|
||||
|
||||
## HOOK COMPOSITION (hooks/ subdir)
|
||||
|
||||
| File | Tier | Count |
|
||||
|------|------|-------|
|
||||
| `create-session-hooks.ts` | Session | 21 |
|
||||
| `create-tool-guard-hooks.ts` | Tool Guard | 10 |
|
||||
| `create-session-hooks.ts` | Session | 23 |
|
||||
| `create-tool-guard-hooks.ts` | Tool Guard | 10 |
|
||||
| `create-skill-hooks.ts` | Skill | 2 |
|
||||
@@ -42,6 +41,7 @@ Core glue layer. 20 source files assembling the 8 OpenCode hook handlers and com
|
||||
| `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 |
|
||||
| `config-handler.ts` | Runtime config loading and caching |
|
||||
|
||||
## KEY PATTERNS
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/shared/ — 95+ Utility Files in 13 Categories
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
# src/tools/ — 26 Tools Across 15 Directories
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
| Tool | Factory | Parameters |
|
||||
|------|---------|------------|
|
||||
| `background_output` | `createBackgroundOutput` | task_id, block, timeout, full_session, include_thinking, message_limit |
|
||||
| `background_output` | `createBackgroundOutput` | task_id, block, timeout, full_session, include_thinking, message_limit, since_message_id, thinking_max_chars |
|
||||
| `background_cancel` | `createBackgroundCancel` | taskId, all |
|
||||
|
||||
### LSP Refactoring (6) — Direct ToolDefinition
|
||||
@@ -97,7 +97,7 @@
|
||||
| artistry | gemini-3.1-pro high | Creative approaches |
|
||||
| quick | claude-haiku-4-5 | Trivial tasks |
|
||||
| unspecified-low | claude-sonnet-4-6 | Moderate effort |
|
||||
| unspecified-high | claude-opus-4-6 max | High effort |
|
||||
| unspecified-high | gpt-5.4 high | High effort |
|
||||
| writing | kimi-k2p5 | Documentation |
|
||||
|
||||
## HOW TO ADD A TOOL
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/tools/background-task/ — Background Task Tool Wrappers
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/tools/call-omo-agent/ — Direct Agent Invocation Tool
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# src/tools/delegate-task/ — Task Delegation Engine
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
41 files. The `task` tool implementation — delegates work to subagents via background or sync sessions. Resolves categories, models, skills, and manages both async and synchronous execution flows.
|
||||
49 files. The `task` tool implementation — delegates work to subagents via background or sync sessions. Resolves categories, models, skills, and manages both async and synchronous execution flows. 8+ built-in categories.
|
||||
|
||||
## TWO EXECUTION MODES
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# src/tools/hashline-edit/ — Hash-Anchored File Edit Tool
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# src/tools/lsp/ — LSP Tool Implementations
|
||||
|
||||
**Generated:** 2026-03-02
|
||||
**Generated:** 2026-03-06
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
32 files. Full LSP (Language Server Protocol) client stack exposed as 6 tools. Custom implementation that manages server processes, opens files, and forwards requests — does NOT delegate to OpenCode's built-in LSP.
|
||||
33 files. Full LSP (Language Server Protocol) client stack exposed as 6 tools. Custom implementation that manages server processes, opens files, and forwards requests — does NOT delegate to OpenCode's built-in LSP.
|
||||
|
||||
## TOOL EXPOSURE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user