{
  "type": "object",
  "required": [
    "header",
    "decisionId",
    "intentId",
    "outcome",
    "reasonCodes",
    "requiredApprovals",
    "decidedAt",
    "policyVersion"
  ],
  "properties": {
    "header": {
      "type": "object",
      "required": [
        "namespace",
        "major",
        "minor"
      ],
      "properties": {
        "namespace": {
          "type": "string",
          "const": "ai.aletheion.asm"
        },
        "major": {
          "type": "number",
          "const": 1
        },
        "minor": {
          "type": "integer",
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "decisionId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "intentId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "outcome": {
      "anyOf": [
        {
          "type": "string",
          "const": "allow"
        },
        {
          "type": "string",
          "const": "deny"
        },
        {
          "type": "string",
          "const": "require_approval"
        }
      ]
    },
    "reasonCodes": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "minItems": 1,
      "uniqueItems": true
    },
    "requiredApprovals": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "uniqueItems": true
    },
    "decidedAt": {
      "type": "string",
      "format": "date-time"
    },
    "policyVersion": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    }
  },
  "additionalProperties": false,
  "$id": "asm-policy-v1"
}
