2025-12-24 17:11:18 +09:00
|
|
|
# FEATURES KNOWLEDGE BASE
|
|
|
|
|
|
|
|
|
|
## OVERVIEW
|
2026-01-02 10:42:38 +09:00
|
|
|
Claude Code compatibility layer + core feature modules. Commands, skills, agents, MCPs, hooks from Claude Code work seamlessly.
|
2025-12-24 17:11:18 +09:00
|
|
|
|
|
|
|
|
## STRUCTURE
|
|
|
|
|
```
|
|
|
|
|
features/
|
2026-01-17 19:16:49 +09:00
|
|
|
├── background-agent/ # Task lifecycle, notifications (1165 lines manager.ts)
|
|
|
|
|
├── boulder-state/ # Boulder/Todo state persistence
|
|
|
|
|
├── builtin-commands/ # Built-in slash commands (ralph-loop, refactor, init-deep)
|
|
|
|
|
├── builtin-skills/ # Built-in skills (1203 lines skills.ts)
|
|
|
|
|
│ ├── git-master/ # Atomic commits, history search
|
|
|
|
|
│ ├── playwright/ # Browser automation
|
|
|
|
|
│ └── frontend-ui-ux/ # Designer-developer skill
|
2026-01-02 10:42:38 +09:00
|
|
|
├── claude-code-agent-loader/ # ~/.claude/agents/*.md
|
|
|
|
|
├── claude-code-command-loader/ # ~/.claude/commands/*.md
|
2026-01-17 19:16:49 +09:00
|
|
|
├── claude-code-mcp-loader/ # .mcp.json files with ${VAR} expansion
|
2026-01-13 21:00:00 +09:00
|
|
|
├── claude-code-plugin-loader/ # installed_plugins.json
|
2025-12-24 17:11:18 +09:00
|
|
|
├── claude-code-session-state/ # Session state persistence
|
2026-01-17 19:16:49 +09:00
|
|
|
├── context-injector/ # AGENTS.md/README.md/Rules injection
|
2026-01-02 10:42:38 +09:00
|
|
|
├── opencode-skill-loader/ # Skills from OpenCode + Claude paths
|
2026-01-17 19:16:49 +09:00
|
|
|
├── skill-mcp-manager/ # MCP servers in skill YAML (stdio/http transports)
|
|
|
|
|
├── task-toast-manager/ # Task status toast notifications
|
|
|
|
|
└── hook-message-injector/ # Message injection into conversation streams
|
2025-12-24 17:11:18 +09:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## LOADER PRIORITY
|
2026-01-02 10:42:38 +09:00
|
|
|
| Loader | Priority (highest first) |
|
|
|
|
|
|--------|--------------------------|
|
2025-12-24 17:11:18 +09:00
|
|
|
| Commands | `.opencode/command/` > `~/.config/opencode/command/` > `.claude/commands/` > `~/.claude/commands/` |
|
2025-12-30 10:42:05 +09:00
|
|
|
| Skills | `.opencode/skill/` > `~/.config/opencode/skill/` > `.claude/skills/` > `~/.claude/skills/` |
|
2025-12-24 17:11:18 +09:00
|
|
|
| Agents | `.claude/agents/` > `~/.claude/agents/` |
|
|
|
|
|
| MCPs | `.claude/.mcp.json` > `.mcp.json` > `~/.claude/.mcp.json` |
|
|
|
|
|
|
|
|
|
|
## CONFIG TOGGLES
|
2026-01-17 19:16:49 +09:00
|
|
|
```jsonc
|
2025-12-24 17:11:18 +09:00
|
|
|
{
|
|
|
|
|
"claude_code": {
|
2026-01-02 10:42:38 +09:00
|
|
|
"mcp": false, // Skip .mcp.json
|
|
|
|
|
"commands": false, // Skip commands/*.md
|
|
|
|
|
"skills": false, // Skip skills/*/SKILL.md
|
|
|
|
|
"agents": false, // Skip agents/*.md
|
2025-12-24 17:11:18 +09:00
|
|
|
"hooks": false // Skip settings.json hooks
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2026-01-02 10:42:38 +09:00
|
|
|
## BACKGROUND AGENT
|
2026-01-17 19:16:49 +09:00
|
|
|
- **Lifecycle**: `launch` → `poll` (idle/stability detection) → `complete`.
|
|
|
|
|
- **Concurrency**: Per-provider/model limits in `concurrency.ts`.
|
|
|
|
|
- **Notification**: Auto-injects system reminders into parent session on task completion.
|
|
|
|
|
- **Cleanup**: Shutdown handler cancels pending waiters; idle tasks pruning (30m TTL).
|
2026-01-02 00:14:38 +09:00
|
|
|
|
2026-01-02 10:42:38 +09:00
|
|
|
## SKILL MCP
|
2026-01-17 19:16:49 +09:00
|
|
|
- **Lazy Loading**: Clients connect on first tool call via `SkillMcpManager`.
|
|
|
|
|
- **Transports**: `stdio` (local process) or `http` (SSE/Streamable HTTP).
|
|
|
|
|
- **Environment**: `${VAR}` expansion in config via `env-expander.ts`.
|
|
|
|
|
- **Lifecycle**: Session-scoped clients; auto-cleanup after 5m idle.
|
2026-01-02 00:14:38 +09:00
|
|
|
|
2026-01-02 10:42:38 +09:00
|
|
|
## ANTI-PATTERNS
|
2026-01-17 19:16:49 +09:00
|
|
|
- **Sequential Delegation**: Calling agents one-by-one; use `delegate_task` for parallel runs.
|
|
|
|
|
- **Self-Report Trust**: Trusting agent's "I'm done" without verifying against session state.
|
|
|
|
|
- **Main Thread Blocks**: Heavy I/O or long-running logic during loader initialization.
|
|
|
|
|
- **Manual Versioning**: Updating `package.json` version field; managed exclusively by CI.
|