add opencode runtime adapter and matrix fallback orchestration guidance

This commit is contained in:
Jason Woltje
2026-02-17 14:05:39 -06:00
parent 014654972c
commit e16ff8af70
5 changed files with 60 additions and 3 deletions

View File

@@ -0,0 +1,28 @@
# Mosaic Runtime Adapter — OpenCode
Load and apply in this order:
1. `~/.mosaic/STANDARDS.md`
2. repo-local `AGENTS.md` (and `SOUL.md` when present)
This file is an OpenCode adapter layer. It does not replace project guidance.
## Orchestrator Capability Contract
- OpenCode sessions may not expose a native subagent/background task primitive in all deployments.
- When native subagent delegation is unavailable, use Mosaic's deterministic orchestrator rail:
- `~/.mosaic/bin/mosaic-orchestrator-matrix-cycle`
- Keep repo task tracking in `docs/tasks.md` as the canonical human-readable state.
- Keep machine transport/controller state in `.mosaic/orchestrator/`.
## Fallback Delegation Mode (No Native Subagents)
1. Bootstrap repo if needed:
- `~/.mosaic/bin/mosaic-bootstrap-repo /path/to/repo`
2. Configure `.mosaic/orchestrator/config.json`:
- set `"enabled": true`
- set `"worker.command_template"` to your OpenCode worker command
3. Queue work items in `.mosaic/orchestrator/tasks.json` (or via Matrix command ingestion).
4. Run deterministic ticks:
- `~/.mosaic/bin/mosaic-orchestrator-matrix-cycle`
This preserves rails enforcement (`quality_gates`) even without runtime-native subagent features.