Skip to content

Re-enable OpenCode as a first-class Ballast target #188

Description

@markcallen

Summary

Re-enable OpenCode as a first-class AI-agent target in Ballast across CLI UX, generated outputs, packaging, and tests.

This should restore parity with other primary targets (cursor, claude, codex, gemini) and ensure OpenCode remains continuously validated in CI.

Problem

OpenCode was removed/replaced in target-facing workflows, which creates feature regression and inconsistent target support. Users should be able to install and validate OpenCode rules the same way they do for other first-class targets.

Scope

  • Restore OpenCode as a supported target in all relevant CLIs and wrappers.
  • Ensure generated rule outputs include OpenCode artifacts in expected paths and formats.
  • Re-enable docs/config references so OpenCode appears everywhere target options are documented.
  • Add/restore E2E coverage to prevent future regressions.

Requirements

1) Target support and CLI surface

  • opencode must be accepted anywhere targets are enumerated/validated, including:
    • install commands
    • multi-target config (.rulesrc.json)
    • target add/remove flows
    • help text and error messaging
  • Preserve backward compatibility for existing repos already configured with opencode.

2) Generated output behavior

  • ballast install --target opencode generates OpenCode rule files in canonical locations.
  • Generated content must stay aligned with source agents/ and skills/ definitions.
  • Ballast-managed sections and sync/build pipelines must include OpenCode outputs where applicable.

3) E2E and regression tests

Add/restore E2E tests that verify OpenCode end-to-end behavior, including at minimum:

  • Install rules for OpenCode in a fixture/project.
  • Assert expected OpenCode output files exist and contain Ballast-managed markers.
  • Validate target persistence and idempotent reinstall behavior.
  • Validate remove-target cleanup behavior for OpenCode.
  • Cross-language coverage where Ballast currently validates target parity (TypeScript/Python/Go paths as applicable).

4) CI coverage

  • Include OpenCode in CI paths that validate target matrix behavior.
  • Ensure OpenCode regressions fail CI with actionable errors.

5) Docs and examples

Update docs to consistently include OpenCode wherever supported targets are listed, including:

  • README usage examples
  • installation/reference docs
  • target-specific output path tables
  • any issue templates or guidance that enumerate first-class targets

Acceptance Criteria

  • opencode is fully supported again as a first-class target across CLI/config UX.
  • ballast install --target opencode generates correct OpenCode artifacts.
  • E2E tests cover OpenCode install, persistence/idempotency, and cleanup flows.
  • CI runs OpenCode validation in target-matrix/regression checks.
  • Documentation consistently lists OpenCode as a supported first-class target.
  • No regressions for existing targets (cursor, claude, codex, gemini).

Implementation Notes

  • Prefer updating source-of-truth rule/skill content and generation pipelines rather than patching generated outputs directly.
  • Keep repo-root target policy in sync with .rulesrc.json expectations.
  • If root target config or sync/build scripts change, regenerate and commit corresponding Ballast-managed outputs in the same PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions