Repository navigation
Phase 5: Harness Adapters #18
Description
Phase 5: Harness Adapters
Implement the adapter pattern for all 5 supported harnesses (Claude Code, Codex CLI, OpenCode, Pi Agent, Antigravity) plus the base interface.
Tasks
-
Task 15: Implement base harness adapter interface — Create harness-adapter.ts with abstract base class or interface. Define methods: getMcpConfigPath(), getSkillsPath(), readMcpConfig(), writeMcpConfig(), supportsMcp(). Create adapter factory function.
- Depends on: Task 4
- Files:
packages/core/src/harnesses/harness-adapter.ts,packages/core/src/harnesses/index.ts - Testing: Type checking to ensure all adapters implement interface.
-
Task 16: Implement Claude Code adapter — Config path:
~/.claude.json(user-scoped MCP config). Skills path:~/.claude/skills/. JSON format. Supports MCP: true.- Depends on: Task 15
- Files:
packages/core/src/harnesses/claude-adapter.ts - Testing: Unit tests for path resolution, config read/write with JSON format.
-
Task 17: Implement Codex CLI adapter — Config path:
~/.codex/config.toml. Skills path:~/.codex/skills/. TOML format. Supports MCP: true.- Depends on: Task 15
- Files:
packages/core/src/harnesses/codex-adapter.ts - Testing: Unit tests for path resolution, config read/write with TOML format.
-
Task 18: Implement OpenCode adapter — Config path:
~/.config/opencode/opencode.jsonc. Skills path:~/.config/opencode/skills/. JSONC format (JSON with comments). Supports MCP: true.- Depends on: Task 15
- Files:
packages/core/src/harnesses/opencode-adapter.ts - Testing: Unit tests for path resolution, config read/write with JSONC format (preserve comments).
-
Task 19: Implement Pi Agent adapter — No MCP config path (returns null). Skills path:
~/.pi/agent/skills/. Note: Pi also reads from~/.agents/skills/natively. Supports MCP: false. Skip MCP configuration in install flow.- Depends on: Task 15
- Files:
packages/core/src/harnesses/pi-adapter.ts - Testing: Unit tests for path resolution, verify supportsMcp() returns false.
-
Task 19b: Implement Antigravity adapter — Config path:
~/.gemini/antigravity-cli/mcp_config.json. Skills path:~/.gemini/antigravity-cli/skills/. JSON format. Supports MCP: true. Export frompackages/core/src/harnesses/index.ts.- Depends on: Task 15
- Files:
packages/core/src/harnesses/antigravity-adapter.ts,packages/core/src/harnesses/index.ts - Testing: Unit tests for path resolution, config read/write with JSON format.
Activity