WI-2: mutator-class guard for the compaction directive-freshness mechanism — command-position parser (prefix x var-indirection unified) + primitive-anchored invariant backstop + all-tools-hook fail-close. Parser-complete on principle: realistic evasion matrix RED-regression-covered, residual exotic evasions proven backstop-caught (B-tests), lens-convergence reached. closes #829
Adapter Contract
Runtime adapters translate task commands into concrete worker invocations.
Minimal Contract
Each task should define either:
commanddirectly intasks.json, or- controller-level
worker.command_templatein.mosaic/orchestrator/config.json
command_template may use:
{task_id}{task_title}{task_file}
Examples
Codex:
{
"worker": {
"command_template": "codex \"run task {task_id}: {task_title}\""
}
}
Claude:
{
"worker": {
"command_template": "mosaic claude -p \"Execute task {task_id}: {task_title}\""
}
}
OpenCode:
{
"worker": {
"command_template": "opencode \"execute task {task_id}: {task_title}\""
}
}
Recommendation
Prefer explicit per-task command for deterministic execution and auditability.