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

@@ -27,7 +27,7 @@ The orchestrator **cold-starts** on any project with just a review report locati
**The orchestrator ONLY:**
- Reads/writes `docs/tasks.md`
- Reads/writes `docs/orchestrator-learnings.json`
- Spawns workers via the Task tool for ALL code changes
- Delegates ALL code changes to workers (native subagent tool when available, otherwise Mosaic matrix rail)
- Parses worker JSON results
- Commits task tracking updates (tasks.md, learnings)
- Outputs status reports and handoff messages
@@ -40,6 +40,23 @@ Spawn a worker instead. No exceptions. No "quick fixes."
- Wait for at least one worker to complete before spawning more
- This optimizes token usage and reduces context pressure
## Delegation Mode Selection
Choose one delegation mode at session start:
1. **Native subagent mode** (preferred when runtime supports it)
2. **Matrix rail mode** (fallback when native subagents/background tasks are unavailable)
Matrix rail mode commands:
```bash
~/.mosaic/bin/mosaic-orchestrator-matrix-cycle
~/.mosaic/bin/mosaic-orchestrator-run --poll-sec 10
```
In Matrix rail mode, keep `docs/tasks.md` as canonical project tracking and use
`.mosaic/orchestrator/` for deterministic worker dispatch state.
---
## Bootstrap Templates
@@ -251,7 +268,9 @@ git push
- All done? → Report success, run final retrospective, STOP
- Some blocked? → Report deadlock, STOP
5. Update tasks.md: status=in-progress, agent={identifier}, started_at={now}
6. Spawn worker agent (Task tool) with task details
6. Delegate worker task:
- native mode: spawn worker agent via runtime subagent/task primitive
- matrix mode: enqueue/consume task in `.mosaic/orchestrator/tasks.json` and run `mosaic-orchestrator-matrix-cycle`
7. Wait for worker completion
8. Parse worker result (JSON)
9. **Variance check**: Calculate (actual - estimate) / estimate × 100