{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Rule Metadata",
  "type": "object",
  "required": [
    "id",
    "name",
    "type",
    "provider",
    "harnesses",
    "summary",
    "source_type",
    "official_docs",
    "security_notes",
    "last_verified",
    "path"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9-]*$"
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "type": {
      "const": "rule"
    },
    "provider": {
      "enum": [
        "aws",
        "azure",
        "oracle",
        "oci",
        "gcp",
        "kubernetes",
        "terraform",
        "multi-cloud",
        "generic",
        "microsoft",
        "databricks",
        "snowflake"
      ]
    },
    "harnesses": {
      "type": "array",
      "minItems": 1,
      "items": {
        "enum": [
          "codex",
          "copilot",
          "claude-code",
          "cursor",
          "gemini",
          "kiro",
          "other"
        ]
      }
    },
    "summary": {
      "type": "string",
      "minLength": 20
    },
    "source_type": {
      "enum": [
        "original",
        "adapted",
        "reference-only"
      ]
    },
    "official_docs": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "security_notes": {
      "type": "string",
      "minLength": 20
    },
    "last_verified": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "path": {
      "type": "string",
      "minLength": 1
    }
  },
  "additionalProperties": true
}