{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/agentpatternscatalog/patterns/framework-coverage.schema.json",
  "title": "Framework Coverage Matrix",
  "description": "Machine-readable mapping of agent frameworks to the patterns they support, drawn from this catalog. One row per framework. Pattern IDs in coverage maps must match a pattern in patterns-src/.",
  "type": "object",
  "additionalProperties": false,
  "required": ["last_analysis_date", "frameworks"],
  "properties": {
    "$schema": {"type": "string"},
    "title": {"type": "string"},
    "description": {"type": "string"},
    "last_analysis_date": {
      "type": "string",
      "format": "date",
      "description": "ISO date of the most recent global review across all framework rows. Per-framework rows carry their own last_analyzed."
    },
    "coverage_values": {
      "type": "object",
      "description": "Documentation of the allowed coverage values."
    },
    "frameworks": {
      "type": "array",
      "items": {"$ref": "#/$defs/framework"}
    }
  },
  "$defs": {
    "framework": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "name", "url", "last_analyzed", "coverage"],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-z0-9][a-z0-9-]*$",
          "description": "Stable kebab-case identifier."
        },
        "name": {"type": "string"},
        "vendor": {"type": "string"},
        "language": {"type": "string"},
        "url": {"type": "string", "format": "uri"},
        "aliases": {
          "type": "array",
          "items": {"type": "string"}
        },
        "status": {
          "type": "string",
          "enum": ["active", "maintenance", "deprecated", "abandoned"],
          "description": "Lifecycle status of the framework itself. Default: active."
        },
        "successor": {
          "type": "string",
          "description": "If status=deprecated, the framework id that replaced this one."
        },
        "last_analyzed": {
          "type": "string",
          "format": "date",
          "description": "ISO date this row was last reviewed against the framework's current docs."
        },
        "coverage": {
          "type": "object",
          "description": "Map from pattern id (kebab-case, must match a pattern in patterns-src/) to coverage value. Patterns omitted from this map are 'unknown' by convention.",
          "patternProperties": {
            "^[a-z0-9][a-z0-9-]*$": {
              "type": "string",
              "enum": ["fully", "limited", "none", "unknown"]
            }
          },
          "additionalProperties": false
        }
      }
    }
  }
}
