{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "additionalProperties": false,
  "required": ["schemaVersion", "capabilities"],
  "properties": {
    "schemaVersion": { "const": 2 },
    "capabilities": {
      "type": "object",
      "minProperties": 1,
      "additionalProperties": {
        "type": "object",
        "additionalProperties": false,
        "required": ["description", "defaultProvider", "defaultMode", "risk"],
        "properties": {
          "description": { "type": "string", "minLength": 1 },
          "defaultProvider": { "type": "string", "minLength": 1 },
          "defaultMode": { "enum": ["off", "registered", "auto", "project", "always"] },
          "risk": { "enum": ["low", "medium", "high"] },
          "conflicts": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
          "projectSignals": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
          "skills": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }
        }
      }
    }
  }
}
