{
  "version": 1,
  "activeProfile": "balanced",
  "skillRoots": [".harness/skills", ".agents/skills", ".opencode/skills"],
  "runtimes": {
    "codex": { "adapter": "codex", "paseoProvider": "codex", "command": "codex", "capabilities": { "nativeAgent": false, "nativeAgentViaPaseo": false, "modelSelection": true, "variantSelection": true, "sessions": true, "structuredOutput": true, "mcp": true, "stdioMcp": true, "localMcp": true, "runtimeConfigInjection": true, "nativeToolProjection": true } },
    "opencode": { "adapter": "opencode", "paseoProvider": "opencode", "command": "opencode", "capabilities": { "nativeAgent": true, "nativeAgentViaPaseo": false, "modelSelection": true, "variantSelection": true, "sessions": true, "structuredOutput": true, "mcp": true, "stdioMcp": true, "localMcp": true, "runtimeConfigInjection": true, "nativeToolProjection": true } }
  },
  "models": {
    "brain": { "runtime": "codex", "provider": "openai", "model": "gpt-6-luna", "variant": "xhigh" },
    "workhorse": { "runtime": "opencode", "provider": "opencode-go", "model": "muse-spark-1.3-contributor" },
    "structured-assessor": { "runtime": "codex", "provider": "openai", "model": "gpt-6-luna", "variant": "xhigh" }
  },
  "agents": {
    "lead": { "role": "Lead/Director", "domains": ["*"], "description": "Own intent, decomposition, risk decisions and final semantic acceptance. Delegate bounded repository work and preserve sealed requirements.", "execution": { "model": "@brain" }, "contextRequirements": { "repositoryMap": "FORBIDDEN", "semanticRetrieval": "FORBIDDEN", "rawRetrieval": "FORBIDDEN" }, "skills": ["human-exception-handling", "acceptance-reasoning"], "permissions": { "read": "allow", "write": "deny", "shell": "deny", "network": "ask", "delegate": "allow", "review": "allow", "validate": "deny", "gitWrite": "deny" }, "outputContract": "orchestrator" },
    "operation-supervisor": { "role": "Operation Supervisor", "domains": ["*"], "description": "Own operation-local coordination, delegation, consolidation and evidence gaps for one durable operation.", "execution": { "model": "@brain" }, "contextRequirements": { "repositoryMap": "FORBIDDEN", "semanticRetrieval": "FORBIDDEN", "rawRetrieval": "FORBIDDEN", "compression": "OPTIONAL" }, "skills": [], "permissions": { "read": "allow", "write": "deny", "shell": "deny", "network": "deny", "delegate": "allow", "review": "deny", "validate": "deny", "gitWrite": "deny" }, "outputContract": "supervisor" },
    "explorer": { "role": "Explorer", "domains": ["*"], "description": "Perform bounded repository discovery and return evidence, paths, symbols and risks without editing.", "execution": { "model": "@workhorse" }, "permissions": { "read": "allow", "write": "deny", "shell": "deny", "network": "deny", "delegate": "deny", "review": "deny", "validate": "deny", "gitWrite": "deny" }, "outputContract": "explorer" },
    "librarian": { "role": "Librarian", "domains": ["*"], "description": "Research authoritative documentation and project-local knowledge after a deterministic knowledge gap; do not edit.", "execution": { "model": "@workhorse" }, "mcps": ["context7"], "permissions": { "read": "allow", "write": "deny", "shell": "deny", "network": "deny", "delegate": "deny", "review": "deny", "validate": "deny", "gitWrite": "deny" }, "outputContract": "knowledge-pack" },
    "planner": { "role": "Planner", "domains": ["*"], "description": "Produce dependency-aware bounded work units from frozen requirements, evidence and validation gates; never select agents by name.", "execution": { "model": "@workhorse" }, "skills": [], "permissions": { "read": "allow", "write": "deny", "shell": "deny", "network": "deny", "delegate": "deny", "review": "deny", "validate": "deny", "gitWrite": "deny" }, "outputContract": "planner" },
    "spec-manager": { "role": "Spec Manager", "domains": ["requirements", "specification", "sdd", "openspec"], "description": "Author and validate formal requirements before freeze; deterministic AEH code compiles and seals them.", "execution": { "model": "@workhorse" }, "skills": ["openspec-authoring", "acceptance-traceability"], "permissions": { "read": "allow", "write": "deny", "shell": "deny", "network": "deny", "delegate": "deny", "review": "deny", "validate": "deny", "gitWrite": "deny" }, "outputContract": "spec-authoring" },
    "implementer": { "role": "Implementer", "domains": ["*"], "specializations": ["cross-cutting"], "description": "Implement only frozen, task-scoped changes and return reproducible evidence. Technology belongs in task domains and competencies.", "execution": { "model": "@workhorse" }, "skills": [], "permissions": { "read": "allow", "write": "allow", "shell": "allow", "network": "ask", "delegate": "deny", "gitWrite": "deny" }, "outputContract": "implementer" },
    "reviewer": { "role": "Reviewer", "domains": ["*"], "specializations": ["cross-cutting"], "description": "Independently assess scope, correctness, security and evidence without changing the candidate.", "execution": { "model": "@workhorse" }, "skills": [], "permissions": { "read": "allow", "write": "deny", "shell": "deny", "network": "deny", "review": "allow", "gitWrite": "deny" }, "outputContract": "reviewer" },
    "high-assurance-reviewer": { "role": "Reviewer", "domains": ["*"], "specializations": ["high-assurance"], "description": "Perform independent high-assurance review of high-risk candidates with the Luna brain via Codex. Never mutate the candidate.", "execution": { "model": "@brain" }, "skills": [], "permissions": { "read": "allow", "write": "deny", "shell": "deny", "network": "deny", "review": "allow", "gitWrite": "deny" }, "outputContract": "reviewer" },
    "repairer": { "role": "Repairer", "domains": ["*"], "specializations": ["cross-cutting"], "description": "Apply bounded repairs to failed candidates while preserving frozen scope and independent re-validation.", "execution": { "model": "@workhorse" }, "skills": [], "permissions": { "read": "allow", "write": "allow", "shell": "allow", "network": "ask", "delegate": "deny", "gitWrite": "deny" }, "outputContract": "implementer" },
    "semantic-assessor": { "role": "Semantic Assessor", "domains": ["*"], "description": "Return one bounded typed semantic judgment from controller-supplied evidence. This agent has no repository or tool access and has no authority.", "execution": { "model": "@structured-assessor", "transport": "paseo" }, "skills": [], "mcps": [], "contextRequirements": { "repositoryMap": "FORBIDDEN", "semanticRetrieval": "FORBIDDEN", "rawRetrieval": "FORBIDDEN", "compression": "FORBIDDEN" }, "permissions": { "read": "deny", "write": "deny", "shell": "deny", "network": "deny", "delegate": "deny", "review": "deny", "validate": "deny", "gitWrite": "deny" }, "outputContract": "semantic-assessment" }
  },
  "profiles": {
    "economy": { "description": "Explicit opt-in quality pin (NOT the shipped default): use the Muse workhorse for bounded implementation and pin planning, spec-authoring, repair and high-assurance review to the Luna brain (Codex). Shipped default is balanced.", "agents": { "lead": { "execution": { "model": "@brain" } }, "planner": { "execution": { "model": "@brain" } }, "spec-manager": { "execution": { "model": "@brain" } }, "repairer": { "execution": { "model": "@brain" } }, "high-assurance-reviewer": { "execution": { "model": "@brain" } } } },
    "balanced": { "description": "Shipped default (activeProfile, owner-approved): use canonical roles with domain selection and deterministic validation. Workhorse lanes (planner, spec-manager, explorer, librarian, implementer, reviewer, repairer) resolve to Muse via OpenCode; lead, supervisor, high-assurance review, difficult-diagnosis escalation and explicit fallback resolve to Luna via Codex.", "agents": { "reviewer": { "execution": { "model": "@workhorse" } }, "high-assurance-reviewer": { "execution": { "model": "@brain" } } } },
    "maximum-quality": { "description": "Explicit opt-in quality pin (NOT the shipped default): pin planning, spec-authoring, normal review, high-assurance review and repair to the Luna brain (Codex); remaining workhorse lanes resolve to Muse. Shipped default is balanced.", "agents": { "planner": { "execution": { "model": "@brain" } }, "spec-manager": { "execution": { "model": "@brain" } }, "reviewer": { "execution": { "model": "@brain" } }, "high-assurance-reviewer": { "execution": { "model": "@brain" } }, "repairer": { "execution": { "model": "@brain" } } } }
  },
  // Explicit provider fallback (registry-driven, observable): workhorse (Muse via OpenCode Go)
  // falls back to brain (Luna via Codex) for provider-unavailable, difficult-diagnosis escalation,
  // high-assurance review and explicit provider fallback. See src/agents/modelFallback.ts for the
  // canonical registry and telemetry fields (fallbackUsed/from/to/reason). Escalation stages
  // (senior/diagnosis/replan) pin @brain through the registry-checked model-fallback observation
  // (see selectModelFallbackExecutionV1); high-assurance review routes to the dedicated
  // high-assurance-reviewer (@brain) via the high-risk-review rule below; semantic assessment is
  // fail-closed (no fallback).
  "modelFallback": {
    "workhorseToBrain": { "from": "@workhorse", "to": "@brain", "reason": "explicit-provider-fallback", "when": ["provider-unavailable", "difficult-diagnosis", "high-assurance-review"] }
  },
  "routing": [
    { "id": "operation-supervision", "priority": 120, "when": { "intent": ["operation-supervision"] }, "select": { "role": "Operation Supervisor" } },
    { "id": "spec-authoring", "priority": 100, "when": { "intent": ["spec-authoring", "openspec"] }, "select": { "role": "Spec Manager" } },
    { "id": "high-risk-review", "priority": 35, "when": { "intent": "implement", "risk": "high" }, "review": [{ "role": "Reviewer", "specializations": ["high-assurance"] }] },
    { "id": "default-implementation", "priority": 0, "when": { "intent": "implement" }, "select": { "role": "Implementer" }, "review": [{ "role": "Reviewer", "specializations": ["cross-cutting"] }] }
  ],
  "recovery": {
    "PATCH_CONTEXT_MISMATCH": [{ "action": "same-agent" }, { "action": "reroute" }, { "action": "lead" }],
    "TOOL_FAILURE": [{ "action": "same-agent" }, { "action": "reroute" }, { "action": "lead" }],
    "MISSING_CONTEXT": [{ "action": "same-agent" }, { "action": "lead" }],
    "WRONG_AGENT": [{ "action": "reroute" }, { "action": "lead" }],
    "VALIDATION_FAILURE": [{ "action": "same-agent" }, { "action": "reroute" }, { "action": "lead" }],
    "REVIEW_FAILURE": [{ "action": "reroute" }, { "action": "lead" }],
    "AMBIGUOUS_OUTPUT": [{ "action": "same-agent" }, { "action": "lead" }],
    "CONFLICTING_RESULTS": [{ "action": "reroute" }, { "action": "lead" }]
  }
}
