Skip to content

OpenCode

Package

The OpenCode adapter package is @kompassdev/opencode.

What it provides

Inside OpenCode, the adapter exposes:

  • Kompass commands
  • Kompass agents
  • Kompass tools
  • project override loading from local config files

Project overrides

OpenCode projects can customize Kompass with .opencode/kompass.jsonc or the other supported override file names.

You can use overrides to:

  • enable or disable commands
  • swap command templates
  • enable or disable agents
  • remap tool names
  • change defaults such as the base branch
  • adjust adapter behavior such as agentMode and subtaskCommandMode

Agent model

Most command execution runs on the bundled worker agent.

Kompass also provides the worker, navigator, planner, and reviewer agent roles for structured workflow execution and review-specific execution.

OpenCode also exposes the command_expansion tool, which resolves explicit command-plus-body inputs into the rendered prompt that a navigator can delegate immediately through task.

Useful OpenCode notes

  • the preferred override file is .opencode/kompass.jsonc
  • for session debugging, use opencode session list and opencode export <sessionID>

Generated output

Compiled OpenCode review artifacts are written to packages/opencode/.opencode/ in this repository.

Do not edit that generated directory directly.