{
  "$defs": {
    "CategoryCapRule": {
      "additionalProperties": false,
      "properties": {
        "below": {
          "maximum": 100,
          "minimum": 0,
          "title": "Below",
          "type": "number"
        },
        "categories": {
          "items": {
            "enum": [
              "mission",
              "resource",
              "architecture",
              "programmatic"
            ],
            "type": "string"
          },
          "maxItems": 4,
          "minItems": 1,
          "title": "Categories",
          "type": "array"
        },
        "maximum_overall": {
          "maximum": 100,
          "minimum": 0,
          "title": "Maximum Overall",
          "type": "number"
        }
      },
      "required": [
        "categories",
        "below",
        "maximum_overall"
      ],
      "title": "CategoryCapRule",
      "type": "object"
    },
    "CategoryPolicy": {
      "additionalProperties": false,
      "properties": {
        "category": {
          "enum": [
            "mission",
            "resource",
            "architecture",
            "programmatic"
          ],
          "title": "Category",
          "type": "string"
        },
        "weight": {
          "exclusiveMinimum": 0,
          "title": "Weight",
          "type": "number"
        }
      },
      "required": [
        "category",
        "weight"
      ],
      "title": "CategoryPolicy",
      "type": "object"
    },
    "DesirabilityAnchor": {
      "additionalProperties": false,
      "properties": {
        "score": {
          "maximum": 100,
          "minimum": 0,
          "title": "Score",
          "type": "number"
        },
        "value": {
          "title": "Value",
          "type": "number"
        }
      },
      "required": [
        "value",
        "score"
      ],
      "title": "DesirabilityAnchor",
      "type": "object"
    },
    "DesirabilityMapping": {
      "additionalProperties": false,
      "properties": {
        "anchors": {
          "items": {
            "$ref": "#/$defs/DesirabilityAnchor"
          },
          "maxItems": 32,
          "minItems": 2,
          "title": "Anchors",
          "type": "array"
        },
        "component_id": {
          "default": "value",
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Component Id",
          "type": "string"
        },
        "unit": {
          "enum": [
            "ratio",
            "1",
            "K",
            "deg",
            "m/s",
            "s",
            "W",
            "Wh",
            "W/kg",
            "W/m3",
            "W/m2",
            "kg",
            "m3",
            "m2",
            "dB",
            "bit/day",
            "bit",
            "USD",
            "EUR",
            "GBP",
            "count",
            "composite",
            "inventory",
            "score_points",
            "text",
            "bool",
            "V",
            "A",
            "m",
            "N",
            "degC",
            "km",
            "year",
            "deg/s",
            "rpm",
            "N*m",
            "N*m*s",
            "A*m2",
            "bit/s",
            "USD_2025",
            "arcsec",
            "enum",
            "m/s2"
          ],
          "title": "Unit",
          "type": "string"
        }
      },
      "required": [
        "unit",
        "anchors"
      ],
      "title": "DesirabilityMapping",
      "type": "object"
    },
    "KpiPreferenceOverride": {
      "additionalProperties": false,
      "properties": {
        "kpi_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Kpi Id",
          "type": "string"
        },
        "mappings": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/DesirabilityMapping"
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Mappings"
        },
        "weight": {
          "anyOf": [
            {
              "exclusiveMinimum": 0,
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Weight"
        }
      },
      "required": [
        "kpi_id"
      ],
      "title": "KpiPreferenceOverride",
      "type": "object"
    }
  },
  "$id": "urn:sindri:contracts:1.0.0:evaluation-policy-overrides",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Sparse soft preferences, bound to an exact authored authorization digest.",
  "properties": {
    "authorization_statement_ids": {
      "items": {
        "maxLength": 128,
        "minLength": 1,
        "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
        "type": "string"
      },
      "minItems": 1,
      "title": "Authorization Statement Ids",
      "type": "array"
    },
    "base_policy_sha256": {
      "pattern": "^[0-9a-f]{64}$",
      "title": "Base Policy Sha256",
      "type": "string"
    },
    "caps": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/CategoryCapRule"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Caps"
    },
    "categories": {
      "default": [],
      "items": {
        "$ref": "#/$defs/CategoryPolicy"
      },
      "maxItems": 4,
      "title": "Categories",
      "type": "array"
    },
    "material_difference_points": {
      "anyOf": [
        {
          "maximum": 100,
          "minimum": 0,
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Material Difference Points"
    },
    "metrics": {
      "default": [],
      "items": {
        "$ref": "#/$defs/KpiPreferenceOverride"
      },
      "maxItems": 20,
      "title": "Metrics",
      "type": "array"
    },
    "schema_kind": {
      "const": "evaluation_policy_overrides",
      "default": "evaluation_policy_overrides",
      "title": "Schema Kind",
      "type": "string"
    },
    "schema_version": {
      "const": "1.0.0",
      "default": "1.0.0",
      "title": "Schema Version",
      "type": "string"
    }
  },
  "required": [
    "base_policy_sha256",
    "authorization_statement_ids"
  ],
  "title": "EvaluationPolicyOverrides",
  "type": "object",
  "x-sindri-contract-suite": "sindri.contracts",
  "x-sindri-contract-version": "1.0.0"
}
