YeonGyu-Kim 73453a7191 docs(agents): update hook counts 44→46, add hashline-edit documentation
- Update root AGENTS.md: hook count 44→46, commit fcb90d92, generated 2026-02-24
- Update src/AGENTS.md: core hooks 35→37, session hooks 21→23
- Update src/hooks/AGENTS.md: 46 hooks total, add modelFallback/noSisyphusGpt/noHephaestusNonGpt/runtimeFallback, jsonErrorRecovery moved to tool-guard (tier 2)
- Create src/tools/hashline-edit/AGENTS.md (93 lines): documents three-op model, LINE#ID format, execution pipeline
- Refresh timestamps: 2026-02-21→2026-02-24 on 28 files
- Update plugin/AGENTS.md hook composition counts

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2026-02-25 00:02:05 +09:00

3.4 KiB

src/features/ — 19 Feature Modules

Generated: 2026-02-24

OVERVIEW

Standalone feature modules wired into plugin/ layer. Each is self-contained with own types, implementation, and tests.

MODULE MAP

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)
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
run-continuation-state 5 LOW Persistent state for run command continuation across sessions
tool-metadata-store 2 LOW Tool execution metadata cache

KEY MODULES

background-agent (49 files, ~10k LOC)

Core orchestration engine. BackgroundManager manages task lifecycle:

  • States: pending → running → completed/error/cancelled/interrupt
  • Concurrency: per-model/provider limits via ConcurrencyManager (FIFO queue)
  • 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)

4-scope skill discovery (project > opencode > user > global):

  • YAML frontmatter parsing from SKILL.md files
  • Skill merger with priority deduplication
  • Template resolution with variable substitution
  • Provider gating for model-specific skills

tmux-subagent (27 files, ~3.6k LOC)

State-first tmux integration:

  • TmuxSessionManager: pane lifecycle, grid planning
  • Spawn action decider + target finder
  • Polling manager for session health
  • Event handlers for pane creation/destruction

builtin-skills (6 skill objects)

Skill Size MCP Tools
git-master 1111 LOC Bash
playwright 312 LOC @playwright/mcp
agent-browser (in playwright.ts) Bash(agent-browser:*)
playwright-cli 268 LOC Bash(playwright-cli:*)
dev-browser 221 LOC Bash
frontend-ui-ux 79 LOC

Browser variant selected by browserProvider config: playwright (default) | playwright-cli | agent-browser.