- Add SOUL.md.template with {{PLACEHOLDERS}} for interactive generation
- Add mosaic-init (bash + PS1) for interactive SOUL.md creation with flag overrides
- Add mosaic launcher (bash + PS1) — unified CLI for claude/opencode/codex with SOUL.md injection
- Add codex runtime adapter (runtime/codex/instructions.md)
- Update runtime adapters (claude, opencode) with SOUL.md read directive
- Update mosaic-link-runtime-assets to push codex adapter to ~/.codex/
- Update installers to prompt for mosaic init when SOUL.md is missing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1.5 KiB
1.5 KiB
Mosaic Runtime Adapter — OpenCode
MANDATORY — Read Before Any Response
BEFORE responding to any user message, READ these files in order:
~/.config/mosaic/SOUL.md(identity and behavioral contract)~/.config/mosaic/STANDARDS.md(machine-wide standards)- Project-local
AGENTS.md(project operations and workflows)
Do NOT respond to the user until you have loaded all three.
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:
~/.config/mosaic/bin/mosaic-orchestrator-matrix-cycle
- Keep repo task tracking in
docs/tasks.mdas the canonical human-readable state. - Keep machine transport/controller state in
.mosaic/orchestrator/.
Fallback Delegation Mode (No Native Subagents)
- Bootstrap repo if needed:
~/.config/mosaic/bin/mosaic-bootstrap-repo /path/to/repo
- Configure
.mosaic/orchestrator/config.json:- set
"enabled": true - set
"worker.command_template"to your OpenCode worker command
- set
- Queue work items in
.mosaic/orchestrator/tasks.json(or via Matrix command ingestion). - Run deterministic ticks:
~/.config/mosaic/bin/mosaic-orchestrator-matrix-cycle- or drain to completion:
~/.config/mosaic/bin/mosaic-orchestrator-drain
This preserves rails enforcement (quality_gates) even without runtime-native subagent features.