{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://ap-in-indy.github.io/aiignore/schema/0.1/harness-vectors.schema.json",
  "title": "aiignore language-neutral harness vectors draft 0.1",
  "type": "object",
  "additionalProperties": false,
  "required": ["revision", "uri", "specification", "harness", "profile", "cases"],
  "properties": {
    "revision": { "type": "string", "minLength": 1, "maxLength": 128 },
    "uri": { "type": "string", "pattern": "^https://[^\\s]+$", "maxLength": 2048 },
    "specification": { "const": "0.1" },
    "harness": { "type": "string", "minLength": 1, "maxLength": 128 },
    "profile": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{0,127}$" },
    "cases": {
      "type": "array",
      "minItems": 1,
      "maxItems": 1000,
      "items": { "$ref": "#/$defs/case" }
    }
  },
  "$defs": {
    "case": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "resource", "operation", "level", "expectation", "description"],
      "properties": {
        "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{0,127}$" },
        "resource": {
          "type": "string",
          "enum": ["file", "environment", "network", "string"]
        },
        "operation": { "type": "string", "minLength": 1, "maxLength": 128 },
        "level": { "type": "string", "enum": ["context", "tool", "sandbox"] },
        "expectation": { "type": "string", "enum": ["allow", "deny", "drop", "redact"] },
        "description": { "type": "string", "minLength": 1, "maxLength": 1024 }
      }
    }
  }
}
