{
  "$defs": {
    "AppliedScoreCap": {
      "additionalProperties": false,
      "properties": {
        "category": {
          "enum": [
            "mission",
            "resource",
            "architecture",
            "programmatic"
          ],
          "title": "Category",
          "type": "string"
        },
        "category_score": {
          "maximum": 100,
          "minimum": 0,
          "title": "Category Score",
          "type": "number"
        },
        "maximum_overall": {
          "maximum": 100,
          "minimum": 0,
          "title": "Maximum Overall",
          "type": "number"
        },
        "threshold": {
          "maximum": 100,
          "minimum": 0,
          "title": "Threshold",
          "type": "number"
        }
      },
      "required": [
        "category",
        "category_score",
        "threshold",
        "maximum_overall"
      ],
      "title": "AppliedScoreCap",
      "type": "object"
    },
    "ArtifactReference": {
      "additionalProperties": false,
      "properties": {
        "artifact_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Artifact Id",
          "type": "string"
        },
        "media_type": {
          "maxLength": 128,
          "minLength": 3,
          "title": "Media Type",
          "type": "string"
        },
        "relative_path": {
          "maxLength": 512,
          "minLength": 1,
          "title": "Relative Path",
          "type": "string"
        },
        "sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Sha256",
          "type": "string"
        },
        "size_bytes": {
          "minimum": 0,
          "title": "Size Bytes",
          "type": "integer"
        }
      },
      "required": [
        "artifact_id",
        "media_type",
        "relative_path",
        "sha256",
        "size_bytes"
      ],
      "title": "ArtifactReference",
      "type": "object"
    },
    "AssessmentStatus": {
      "enum": [
        "pass",
        "warn",
        "fail",
        "not_assessed"
      ],
      "title": "AssessmentStatus",
      "type": "string"
    },
    "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"
    },
    "CategoryScore": {
      "additionalProperties": false,
      "properties": {
        "category": {
          "enum": [
            "mission",
            "resource",
            "architecture",
            "programmatic"
          ],
          "title": "Category",
          "type": "string"
        },
        "contributions": {
          "default": [],
          "items": {
            "$ref": "#/$defs/ScoreContribution"
          },
          "title": "Contributions",
          "type": "array"
        },
        "missing_kpi_ids": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Missing Kpi Ids",
          "type": "array"
        },
        "omitted_kpi_ids": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Omitted Kpi Ids",
          "type": "array"
        },
        "score": {
          "anyOf": [
            {
              "maximum": 100,
              "minimum": 0,
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Score"
        },
        "state": {
          "enum": [
            "complete",
            "incomplete",
            "inapplicable"
          ],
          "title": "State",
          "type": "string"
        }
      },
      "required": [
        "category",
        "state"
      ],
      "title": "CategoryScore",
      "type": "object"
    },
    "EvaluationEvidence": {
      "additionalProperties": false,
      "properties": {
        "applicability": {
          "anyOf": [
            {
              "$ref": "#/$defs/ModelApplicabilityStatus"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "authority_ids": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Authority Ids",
          "type": "array"
        },
        "confidence": {
          "$ref": "#/$defs/EvidenceConfidence",
          "default": "unknown"
        },
        "evidence_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Evidence Id",
          "type": "string"
        },
        "knowledge_state": {
          "$ref": "#/$defs/KnowledgeState",
          "default": "unknown"
        },
        "limitation_ids": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Limitation Ids",
          "type": "array"
        },
        "reason": {
          "maxLength": 2000,
          "minLength": 1,
          "title": "Reason",
          "type": "string"
        },
        "source_tiers": {
          "default": [],
          "items": {
            "$ref": "#/$defs/EvidenceTier"
          },
          "title": "Source Tiers",
          "type": "array"
        },
        "sources": {
          "default": [],
          "items": {
            "$ref": "#/$defs/EvaluationSourceReference"
          },
          "title": "Sources",
          "type": "array"
        },
        "state": {
          "enum": [
            "present",
            "missing",
            "inapplicable",
            "deferred"
          ],
          "title": "State",
          "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"
        },
        "value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Value"
        }
      },
      "required": [
        "evidence_id",
        "state",
        "unit",
        "reason"
      ],
      "title": "EvaluationEvidence",
      "type": "object"
    },
    "EvaluationPolicyReference": {
      "additionalProperties": false,
      "properties": {
        "policy_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Policy Id",
          "type": "string"
        },
        "sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Sha256",
          "type": "string"
        },
        "version": {
          "const": "1.0.0",
          "default": "1.0.0",
          "title": "Version",
          "type": "string"
        }
      },
      "required": [
        "policy_id",
        "sha256"
      ],
      "title": "EvaluationPolicyReference",
      "type": "object"
    },
    "EvaluationSource": {
      "additionalProperties": false,
      "properties": {
        "artifact_index_sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Artifact Index Sha256",
          "type": "string"
        },
        "candidate_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Candidate Id",
          "type": "string"
        },
        "contract_version": {
          "const": "1.0.0",
          "default": "1.0.0",
          "title": "Contract Version",
          "type": "string"
        },
        "input_snapshot_sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Input Snapshot Sha256",
          "type": "string"
        },
        "manifest_sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Manifest Sha256",
          "type": "string"
        },
        "result_index_sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Result Index Sha256",
          "type": "string"
        },
        "run_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Run Id",
          "type": "string"
        }
      },
      "required": [
        "candidate_id",
        "run_id",
        "manifest_sha256",
        "input_snapshot_sha256",
        "result_index_sha256",
        "artifact_index_sha256"
      ],
      "title": "EvaluationSource",
      "type": "object"
    },
    "EvaluationSourceReference": {
      "additionalProperties": false,
      "description": "A manifest-declared capture plus a pointer, never a host file locator.",
      "properties": {
        "artifact": {
          "$ref": "#/$defs/ArtifactReference"
        },
        "component_id": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Component Id"
        },
        "mode_id": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Mode Id"
        },
        "pointer": {
          "default": "",
          "maxLength": 1024,
          "pattern": "^(?:/(?:[^~]|~[01])*)*$",
          "title": "Pointer",
          "type": "string"
        },
        "result_id": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Result Id"
        },
        "scenario_id": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Scenario Id"
        }
      },
      "required": [
        "artifact"
      ],
      "title": "EvaluationSourceReference",
      "type": "object"
    },
    "EvidenceConfidence": {
      "enum": [
        "authoritative",
        "supplier_based",
        "verified",
        "estimated",
        "assumed",
        "unknown"
      ],
      "title": "EvidenceConfidence",
      "type": "string"
    },
    "EvidenceTier": {
      "enum": [
        "verified",
        "credible",
        "engineering_estimate",
        "policy_default",
        "unknown"
      ],
      "title": "EvidenceTier",
      "type": "string"
    },
    "KnowledgeState": {
      "enum": [
        "known",
        "estimated",
        "defaulted",
        "unknown"
      ],
      "title": "KnowledgeState",
      "type": "string"
    },
    "KpiDesirability": {
      "additionalProperties": false,
      "properties": {
        "category": {
          "enum": [
            "mission",
            "resource",
            "architecture",
            "programmatic"
          ],
          "title": "Category",
          "type": "string"
        },
        "controlling_component_ids": {
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "minItems": 1,
          "title": "Controlling Component Ids",
          "type": "array"
        },
        "kpi_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Kpi Id",
          "type": "string"
        },
        "score": {
          "maximum": 100,
          "minimum": 0,
          "title": "Score",
          "type": "number"
        }
      },
      "required": [
        "kpi_id",
        "category",
        "score",
        "controlling_component_ids"
      ],
      "title": "KpiDesirability",
      "type": "object"
    },
    "KpiObservation": {
      "additionalProperties": false,
      "properties": {
        "category": {
          "enum": [
            "mission",
            "resource",
            "architecture",
            "programmatic"
          ],
          "title": "Category",
          "type": "string"
        },
        "components": {
          "default": [],
          "items": {
            "$ref": "#/$defs/EvaluationEvidence"
          },
          "title": "Components",
          "type": "array"
        },
        "kpi_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Kpi Id",
          "type": "string"
        },
        "reason": {
          "maxLength": 2000,
          "minLength": 1,
          "title": "Reason",
          "type": "string"
        },
        "role": {
          "enum": [
            "scored",
            "advisory",
            "deferred"
          ],
          "title": "Role",
          "type": "string"
        },
        "state": {
          "enum": [
            "present",
            "missing",
            "inapplicable",
            "deferred"
          ],
          "title": "State",
          "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"
        },
        "value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Value"
        }
      },
      "required": [
        "kpi_id",
        "role",
        "category",
        "state",
        "unit",
        "reason"
      ],
      "title": "KpiObservation",
      "type": "object"
    },
    "MandatoryAssessment": {
      "additionalProperties": false,
      "properties": {
        "check_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Check Id",
          "type": "string"
        },
        "rationale": {
          "maxLength": 2000,
          "minLength": 1,
          "title": "Rationale",
          "type": "string"
        },
        "reason_code": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Reason Code",
          "type": "string"
        },
        "sources": {
          "default": [],
          "items": {
            "$ref": "#/$defs/EvaluationSourceReference"
          },
          "title": "Sources",
          "type": "array"
        },
        "statement_id": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Statement Id"
        },
        "status": {
          "$ref": "#/$defs/AssessmentStatus"
        }
      },
      "required": [
        "check_id",
        "status",
        "reason_code",
        "rationale"
      ],
      "title": "MandatoryAssessment",
      "type": "object"
    },
    "ModelApplicabilityStatus": {
      "enum": [
        "applicable",
        "degraded",
        "unsupported"
      ],
      "title": "ModelApplicabilityStatus",
      "type": "string"
    },
    "ObjectiveValue": {
      "additionalProperties": false,
      "properties": {
        "direction": {
          "enum": [
            "maximize",
            "minimize"
          ],
          "title": "Direction",
          "type": "string"
        },
        "objective_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Objective Id",
          "type": "string"
        },
        "sources": {
          "default": [],
          "items": {
            "$ref": "#/$defs/EvaluationSourceReference"
          },
          "title": "Sources",
          "type": "array"
        },
        "statement_id": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Statement Id"
        },
        "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"
        },
        "value": {
          "title": "Value",
          "type": "number"
        }
      },
      "required": [
        "objective_id",
        "value",
        "unit",
        "direction"
      ],
      "title": "ObjectiveValue",
      "type": "object"
    },
    "ScoreContribution": {
      "additionalProperties": false,
      "properties": {
        "kpi_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Kpi Id",
          "type": "string"
        },
        "normalized_weight": {
          "exclusiveMinimum": 0,
          "maximum": 1,
          "title": "Normalized Weight",
          "type": "number"
        },
        "points": {
          "maximum": 100,
          "minimum": 0,
          "title": "Points",
          "type": "number"
        },
        "score": {
          "maximum": 100,
          "minimum": 0,
          "title": "Score",
          "type": "number"
        }
      },
      "required": [
        "kpi_id",
        "score",
        "normalized_weight",
        "points"
      ],
      "title": "ScoreContribution",
      "type": "object"
    }
  },
  "$id": "urn:sindri:contracts:1.0.0:candidate-evaluation",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "caps": {
      "default": [],
      "items": {
        "$ref": "#/$defs/AppliedScoreCap"
      },
      "title": "Caps",
      "type": "array"
    },
    "categories": {
      "default": [],
      "items": {
        "$ref": "#/$defs/CategoryScore"
      },
      "maxItems": 4,
      "title": "Categories",
      "type": "array"
    },
    "comparison_context_sha256": {
      "pattern": "^[0-9a-f]{64}$",
      "title": "Comparison Context Sha256",
      "type": "string"
    },
    "desirabilities": {
      "default": [],
      "items": {
        "$ref": "#/$defs/KpiDesirability"
      },
      "maxItems": 20,
      "title": "Desirabilities",
      "type": "array"
    },
    "limitations": {
      "default": [],
      "items": {
        "type": "string"
      },
      "title": "Limitations",
      "type": "array"
    },
    "mandatory": {
      "items": {
        "$ref": "#/$defs/MandatoryAssessment"
      },
      "minItems": 1,
      "title": "Mandatory",
      "type": "array"
    },
    "mandatory_status": {
      "$ref": "#/$defs/AssessmentStatus"
    },
    "normalized_category_weights": {
      "default": [],
      "items": {
        "$ref": "#/$defs/CategoryPolicy"
      },
      "title": "Normalized Category Weights",
      "type": "array"
    },
    "objective_exclusion_reasons": {
      "default": [],
      "items": {
        "type": "string"
      },
      "title": "Objective Exclusion Reasons",
      "type": "array"
    },
    "objective_values": {
      "default": [],
      "items": {
        "$ref": "#/$defs/ObjectiveValue"
      },
      "title": "Objective Values",
      "type": "array"
    },
    "observations": {
      "items": {
        "$ref": "#/$defs/KpiObservation"
      },
      "maxItems": 20,
      "title": "Observations",
      "type": "array"
    },
    "overall_score": {
      "anyOf": [
        {
          "maximum": 100,
          "minimum": 0,
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Overall Score"
    },
    "policy": {
      "$ref": "#/$defs/EvaluationPolicyReference"
    },
    "schema_kind": {
      "const": "candidate_evaluation",
      "default": "candidate_evaluation",
      "title": "Schema Kind",
      "type": "string"
    },
    "schema_version": {
      "const": "1.0.0",
      "default": "1.0.0",
      "title": "Schema Version",
      "type": "string"
    },
    "score_state": {
      "enum": [
        "complete",
        "incomplete",
        "ineligible"
      ],
      "title": "Score State",
      "type": "string"
    },
    "source": {
      "$ref": "#/$defs/EvaluationSource"
    },
    "uncapped_score": {
      "anyOf": [
        {
          "maximum": 100,
          "minimum": 0,
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Uncapped Score"
    }
  },
  "required": [
    "source",
    "policy",
    "comparison_context_sha256",
    "mandatory",
    "mandatory_status",
    "observations",
    "score_state"
  ],
  "title": "CandidateEvaluation",
  "type": "object",
  "x-sindri-contract-suite": "sindri.contracts",
  "x-sindri-contract-version": "1.0.0"
}
