Summary
CodeAlmanac currently runs lifecycle operations (build / ingest / garden) through Codex and Claude harnesses (via Yoke). Users who work primarily in OpenCode cannot use their existing OpenCode install, auth, and model routing as the execution backend for Almanac jobs.
Problem
- There is no
HarnessKind.OPENCODE path.
- Setup does not install OpenCode AGENTS / instruction guidance.
- Config does not accept OpenCode-style
provider/model IDs (including nested paths like openrouter/z-ai/glm-5).
- README / doctor / setup wizard surfaces do not treat OpenCode as a supported client.
Desired outcome
Add OpenCode as a first-class native CLI harness (opencode run), not only a Yoke provider surface, so that:
- Harness adapter —
opencode run drives lifecycle agents with event streaming, session/transcript capture, and agents staged under product-owned local state (not the user repo).
- Setup target —
codealmanac setup can install OpenCode instruction blocks (and uninstall cleanly).
- Config —
harness.default = opencode and harness.model = provider/model (any valid OpenCode model id) validate correctly; switching default harness resets model to that provider’s default.
- CLI / docs — setup wizard, parser choices, telemetry labels, and README document OpenCode alongside Codex and Claude.
- Tests — unit coverage for adapter, model parsing/validation, setup wiring, and related surfaces.
Why native OpenCode (not Yoke)
OpenCode is a router: the TUI already connects to whatever the user configured (OpenRouter, OpenAI, Anthropic, Zen free models, custom OpenAI-compatible endpoints, etc.). A Yoke-mediated path would:
- Depend on AlmanacCode/Yoke publishing and pinning an OpenCode provider release before CodeAlmanac can ship.
- Tend toward a product-curated model catalog (or Yoke’s known surface), which inevitably lags what a given user’s OpenCode install can already run.
- Duplicate auth/session concerns OpenCode already owns.
Driving opencode run --model provider/model reuses the same CLI, credentials, and live model list as interactive OpenCode. Config validates id shape only (provider/model, nested segments allowed). Users can set e.g. openrouter/... and get the same models they see in the OpenCode TUI — no second allowlist, no wait for a Yoke OpenCode release.
Acceptance criteria
Notes
Implementation: branch opencode-support / PR #42.
Summary
CodeAlmanac currently runs lifecycle operations (build / ingest / garden) through Codex and Claude harnesses (via Yoke). Users who work primarily in OpenCode cannot use their existing OpenCode install, auth, and model routing as the execution backend for Almanac jobs.
Problem
HarnessKind.OPENCODEpath.provider/modelIDs (including nested paths likeopenrouter/z-ai/glm-5).Desired outcome
Add OpenCode as a first-class native CLI harness (
opencode run), not only a Yoke provider surface, so that:opencode rundrives lifecycle agents with event streaming, session/transcript capture, and agents staged under product-owned local state (not the user repo).codealmanac setupcan install OpenCode instruction blocks (and uninstall cleanly).harness.default = opencodeandharness.model = provider/model(any valid OpenCode model id) validate correctly; switching default harness resets model to that provider’s default.Why native OpenCode (not Yoke)
OpenCode is a router: the TUI already connects to whatever the user configured (OpenRouter, OpenAI, Anthropic, Zen free models, custom OpenAI-compatible endpoints, etc.). A Yoke-mediated path would:
Driving
opencode run --model provider/modelreuses the same CLI, credentials, and live model list as interactive OpenCode. Config validates id shape only (provider/model, nested segments allowed). Users can set e.g.openrouter/...and get the same models they see in the OpenCode TUI — no second allowlist, no wait for a Yoke OpenCode release.Acceptance criteria
HarnessKind.OPENCODEis registered and wired through composition / harness kinds.provider/modelids (including OpenRouter nested paths) and rejects invalid / wrong-provider models for closed harnesses.Notes
Implementation: branch
opencode-support/ PR #42.