Skip to content

feat: Native OpenCode integration #305

@danielmeppiel

Description

@danielmeppiel

Summary

Add native OpenCode as an opt-in integration target for APM.

When .opencode/ directory exists in a project, apm install deploys:

  • Agents.opencode/agents/<name>.md
  • Commands.opencode/commands/<name>.md (from .prompt.md files)
  • Skills.opencode/skills/<name>/SKILL.md
  • MCPopencode.json (new OpenCodeClientAdapter)

OpenCode reads AGENTS.md natively, so apm compile already works for instructions.

Background

@timvw opened PR #257 with initial OpenCode support. That PR conflicts with the architecture refactoring done in PR #301 (Cursor integration), which introduced TargetProfile + KNOWN_TARGETS + data-driven prefix resolution. This issue tracks a proper implementation using the current architecture.

Acceptance Criteria

  • opencode TargetProfile in KNOWN_TARGETS
  • Target auto-detection for .opencode/ folder
  • Agent, command, skill integration (opt-in)
  • OpenCodeClientAdapter for opencode.json MCP format
  • Pack/compile support (--target opencode)
  • Install/uninstall wiring
  • Unit tests
  • Documentation updates

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions