{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://local/harness/runconfig.schema.json",
  "title": "Harness run-config",
  "description": "Per-launch config: pick one preset, optionally override per seat.tier. The future UI edits THIS, never the plan and never a preset. Resolution + fail-closed rules: PRESETS.md.",
  "type": "object",
  "additionalProperties": false,
  "required": ["version", "preset"],
  "properties": {
    "version": { "const": "runconfig/v1" },
    "preset": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9-]*$",
      "description": "Name of the preset to load (preset/v1). The base seat->binding map."
    },
    "profile": {
      "type": "string",
      "pattern": "^(dynamic|[a-z0-9][a-z0-9-]*)(,(dynamic|[a-z0-9][a-z0-9-]*))*$",
      "description": "Router account or ordered account chain, preserved verbatim across resume."
    },
    "overrides": {
      "type": "object",
      "description": "Per-run seat overrides. Key = 'seat' or 'seat.tier' (e.g. 'coder.high'). Wins over the preset at resolution rung 1. Only model-bound seats are overridable; deterministic gates (gate0, risk) are NOT.",
      "propertyNames": { "pattern": "^[a-z0-9][a-z0-9-]*(\\.[a-z0-9][a-z0-9-]*)?$" },
      "additionalProperties": { "$ref": "presets.schema.json#/$defs/binding" }
    }
  }
}
