{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://iarpg.com/operation-package.schema.json",
  "title": "IARPG Operation Package 2.0.4-wip",
  "description": "Portable local bundle for a fictional intelligence operation with manifest, role handoffs, deterministic simulation, evidence, debrief, migration, and integrity metadata.",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "package_id",
    "package_version",
    "release",
    "title",
    "mission_brief",
    "authority_profile",
    "role_profiles",
    "information_asymmetry",
    "evidence_packet",
    "simulation_configuration",
    "deterministic_seed",
    "expected_state_transitions",
    "debrief_contract",
    "conformance_report",
    "related_standards",
    "supporting_reports",
    "migration",
    "component_checksums",
    "package_manifest",
    "role_handoff_log"
  ],
  "properties": {
    "package_id": {
      "type": "string",
      "minLength": 3
    },
    "package_version": {
      "const": "2.0.4-wip"
    },
    "title": {
      "type": "string",
      "minLength": 3
    },
    "release": {
      "type": "object",
      "required": [
        "standard",
        "version",
        "status",
        "created_utc"
      ],
      "properties": {
        "standard": {
          "const": "IARPG-OPS-2"
        },
        "version": {
          "const": "2.0.4-wip"
        },
        "status": {
          "type": "string"
        },
        "created_utc": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "mission_brief": {
      "type": "object"
    },
    "authority_profile": {
      "type": "object"
    },
    "role_profiles": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object"
      }
    },
    "information_asymmetry": {
      "type": "object"
    },
    "evidence_packet": {
      "type": "object"
    },
    "simulation_configuration": {
      "type": "object"
    },
    "deterministic_seed": {
      "type": "string",
      "minLength": 1
    },
    "expected_state_transitions": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object"
      }
    },
    "debrief_contract": {
      "type": "object"
    },
    "conformance_report": {
      "type": "object"
    },
    "related_standards": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string"
      }
    },
    "related_mission_examples": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "supporting_reports": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "migration": {
      "type": "object",
      "required": [
        "source_release",
        "target_release",
        "preserve_unknown_fields"
      ],
      "properties": {
        "source_release": {
          "type": "string"
        },
        "source_version": {
          "type": "string"
        },
        "target_release": {
          "const": "IARPG-OPS-2"
        },
        "target_version": {
          "const": "2.0.4-wip"
        },
        "preserve_unknown_fields": {
          "const": true
        },
        "unmapped_data": {
          "type": "object"
        }
      }
    },
    "component_checksums": {
      "type": "object"
    },
    "extensions": {
      "type": "object"
    },
    "package_manifest": {
      "type": "object",
      "required": [
        "manifest_version",
        "canonicalization_profile",
        "hash_algorithm",
        "generated_by_build",
        "generated_utc",
        "authenticity_notice"
      ],
      "properties": {
        "manifest_version": {
          "type": "string"
        },
        "canonicalization_profile": {
          "const": "IARPG-CJSON-1"
        },
        "hash_algorithm": {
          "const": "SHA-256"
        },
        "generated_by_build": {
          "type": "string"
        },
        "generated_utc": {
          "type": "string",
          "format": "date-time"
        },
        "authenticity_notice": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "role_handoff_log": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "handoff_id",
          "timestamp_utc",
          "from_role",
          "to_role",
          "information_sent",
          "information_withheld",
          "acknowledgement",
          "state_effect",
          "original_record_id"
        ]
      }
    }
  }
}
