{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://vesstandard.org/schemas/ves-decision-envelope-1.2-draft.schema.json",
  "title": "VES Decision Envelope 1.2 Draft",
  "description": "A portable point-in-time evidence envelope for one consequential organisational decision.",
  "type": "object",
  "required": ["ves_version", "decision_id", "decision_type", "decision_timestamp", "decision_subject", "decision_context", "governing_conditions", "business_authority", "system_contribution", "human_judgement", "outcome", "profile", "evidence", "verification"],
  "properties": {
    "ves_version": { "type": "string", "const": "1.2-draft", "description": "Pinned VES publication version governing the envelope semantics." },
    "decision_id": { "type": "string", "format": "uuid", "description": "Opaque identifier for one consequential organisational decision." },
    "decision_type": { "type": "string", "pattern": "^[a-z0-9]+(?:[._-][a-z0-9]+)+$", "description": "Namespaced classification of the decision under review." },
    "decision_timestamp": { "type": "string", "format": "date-time", "description": "Point in time at which the organisation committed to the outcome." },
    "decision_subject": {
      "type": "object", "required": ["reference", "reference_type"],
      "description": "Opaque subject or matter reference; personal data is not required.",
      "properties": { "reference": { "type": "string", "minLength": 6, "description": "Opaque reference retained by the implementing organisation." }, "reference_type": { "type": "string", "minLength": 2, "description": "Classification of the opaque reference." } }, "additionalProperties": false
    },
    "decision_context": { "$ref": "#/$defs/declaredComponent" },
    "governing_conditions": { "$ref": "#/$defs/declaredComponent" },
    "business_authority": { "$ref": "#/$defs/declaredComponent" },
    "system_contribution": { "$ref": "#/$defs/declaredComponent" },
    "human_judgement": { "$ref": "#/$defs/declaredComponent" },
    "outcome": {
      "type": "object", "description": "Declared organisational outcome and resulting commitment.", "required": ["code", "commitment"],
      "properties": { "code": { "type": "string", "minLength": 1, "description": "Implementation-defined outcome code." }, "commitment": { "type": "string", "minLength": 1, "description": "Human-readable description of the organisational commitment." }, "effective_at": { "type": ["string", "null"], "format": "date-time", "description": "Time from which the declared outcome takes effect, when distinct from decision_timestamp." } }, "additionalProperties": false
    },
    "profile": { "type": "string", "enum": ["ves.core.1.2-draft", "ves.insurance.claims-referral.1.2-draft"], "description": "VES profile against which the package is declared and assessed." },
    "evidence": { "type": "array", "minItems": 1, "description": "Native evidence references wrapped as VES External Evidence Objects.", "items": { "$ref": "https://vesstandard.org/schemas/ves-external-evidence-object-1.2-draft.schema.json" } },
    "verification": {
      "type": "object", "required": ["declared_at", "profile", "overall_status", "dimensions", "limitations"],
      "properties": {
        "declared_at": { "type": "string", "format": "date-time" },
        "profile": { "type": "string" },
        "overall_status": { "$ref": "#/$defs/status" },
        "dimensions": {
          "type": "object",
          "description": "Separate results for every public VES verification dimension.",
          "required": ["source_conformance", "integrity_and_provenance", "temporal_applicability", "business_authority", "structural_completeness", "replayability"],
          "properties": {
            "source_conformance": { "$ref": "#/$defs/status" },
            "integrity_and_provenance": { "$ref": "#/$defs/status" },
            "temporal_applicability": { "$ref": "#/$defs/status" },
            "business_authority": { "$ref": "#/$defs/status" },
            "structural_completeness": { "$ref": "#/$defs/status" },
            "replayability": { "$ref": "#/$defs/status" }
          },
          "additionalProperties": false
        },
        "limitations": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true }
      }, "additionalProperties": false
    },
    "extensions": { "type": "object", "description": "Implementation extensions keyed by a controlled namespace; extensions cannot change base VES semantics.", "propertyNames": { "pattern": "^[a-z0-9]+(?:[.-][a-z0-9]+)+$" }, "additionalProperties": true }
  },
  "additionalProperties": false,
  "$defs": {
    "status": { "type": "string", "enum": ["Verified", "Qualified", "Incomplete", "Indeterminate", "Failed"], "description": "Assessment status for the submitted package against its stated VES profile; never a rating of the decision outcome or organisation." },
    "declaredComponent": {
      "type": "object", "required": ["summary", "evidence_ids"],
      "properties": { "summary": { "type": "string", "minLength": 1, "description": "Declared public summary; sensitive source content may remain external." }, "evidence_ids": { "type": "array", "description": "Evidence Objects supporting or recording this component.", "items": { "type": "string", "format": "uuid" }, "uniqueItems": true } }, "additionalProperties": false
    }
  }
}
