2025-12-24 17:11:18 +09:00
|
|
|
# FEATURES KNOWLEDGE BASE
|
|
|
|
|
|
|
|
|
|
## OVERVIEW
|
2026-01-17 22:01:56 +09:00
|
|
|
|
2026-01-23 02:14:08 +09:00
|
|
|
Core feature modules + Claude Code compatibility layer. Background agents, skill MCP, builtin skills/commands, 5 loaders.
|
2025-12-24 17:11:18 +09:00
|
|
|
|
|
|
|
|
## STRUCTURE
|
2026-01-17 22:01:56 +09:00
|
|
|
|
2025-12-24 17:11:18 +09:00
|
|
|
```
|
|
|
|
|
features/
|
2026-01-23 02:14:08 +09:00
|
|
|
├── background-agent/ # Task lifecycle (1335 lines)
|
|
|
|
|
│ ├── manager.ts # Launch → poll → complete
|
|
|
|
|
│ ├── concurrency.ts # Per-provider limits
|
2026-01-17 22:01:56 +09:00
|
|
|
│ └── types.ts # BackgroundTask, LaunchInput
|
2026-01-25 13:12:40 +09:00
|
|
|
├── skill-mcp-manager/ # MCP client lifecycle (520 lines)
|
2026-01-23 02:14:08 +09:00
|
|
|
│ ├── manager.ts # Lazy loading, cleanup
|
|
|
|
|
│ └── types.ts # SkillMcpConfig
|
2026-01-17 22:01:56 +09:00
|
|
|
├── builtin-skills/ # Playwright, git-master, frontend-ui-ux
|
2026-01-23 02:14:08 +09:00
|
|
|
│ └── skills.ts # 1203 lines
|
2026-01-25 13:12:40 +09:00
|
|
|
├── builtin-commands/ # ralph-loop, refactor, init-deep, start-work, remove-deadcode
|
|
|
|
|
│ ├── commands.ts # Command registry
|
|
|
|
|
│ └── templates/ # Command templates (4 files)
|
2026-01-02 10:42:38 +09:00
|
|
|
├── claude-code-agent-loader/ # ~/.claude/agents/*.md
|
|
|
|
|
├── claude-code-command-loader/ # ~/.claude/commands/*.md
|
2026-01-23 02:14:08 +09:00
|
|
|
├── claude-code-mcp-loader/ # .mcp.json
|
2026-01-13 21:00:00 +09:00
|
|
|
├── claude-code-plugin-loader/ # installed_plugins.json
|
2026-01-23 02:14:08 +09:00
|
|
|
├── claude-code-session-state/ # Session persistence
|
|
|
|
|
├── opencode-skill-loader/ # Skills from 6 directories
|
2026-01-17 22:01:56 +09:00
|
|
|
├── context-injector/ # AGENTS.md/README.md injection
|
|
|
|
|
├── boulder-state/ # Todo state persistence
|
2026-01-25 13:12:40 +09:00
|
|
|
├── hook-message-injector/ # Message injection
|
|
|
|
|
└── task-toast-manager/ # Background task notifications
|
2025-12-24 17:11:18 +09:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## LOADER PRIORITY
|
2026-01-17 22:01:56 +09:00
|
|
|
|
|
|
|
|
| Type | Priority (highest first) |
|
|
|
|
|
|------|--------------------------|
|
2026-01-23 02:14:08 +09:00
|
|
|
| Commands | `.opencode/command/` > `~/.config/opencode/command/` > `.claude/commands/` |
|
|
|
|
|
| Skills | `.opencode/skills/` > `~/.config/opencode/skills/` > `.claude/skills/` |
|
2025-12-24 17:11:18 +09:00
|
|
|
| MCPs | `.claude/.mcp.json` > `.mcp.json` > `~/.claude/.mcp.json` |
|
|
|
|
|
|
2026-01-17 22:01:56 +09:00
|
|
|
## BACKGROUND AGENT
|
|
|
|
|
|
2026-01-23 02:14:08 +09:00
|
|
|
- **Lifecycle**: `launch` → `poll` (2s) → `complete`
|
|
|
|
|
- **Stability**: 3 consecutive polls = idle
|
|
|
|
|
- **Concurrency**: Per-provider/model limits
|
|
|
|
|
- **Cleanup**: 30m TTL, 3m stale timeout
|
2026-01-17 22:01:56 +09:00
|
|
|
|
|
|
|
|
## SKILL MCP
|
|
|
|
|
|
2026-01-23 02:14:08 +09:00
|
|
|
- **Lazy**: Clients created on first call
|
|
|
|
|
- **Transports**: stdio, http (SSE/Streamable)
|
|
|
|
|
- **Lifecycle**: 5m idle cleanup
|
2025-12-24 17:11:18 +09:00
|
|
|
|
2026-01-02 10:42:38 +09:00
|
|
|
## ANTI-PATTERNS
|
2026-01-17 22:01:56 +09:00
|
|
|
|
2026-01-23 02:14:08 +09:00
|
|
|
- **Sequential delegation**: Use `delegate_task` parallel
|
|
|
|
|
- **Trust self-reports**: ALWAYS verify
|
2026-01-17 22:01:56 +09:00
|
|
|
- **Main thread blocks**: No heavy I/O in loader init
|