{
  "$schema": "https://openworkflowgraph.org/schemas/core/v0.92.json",
  "owg_version": "0.92",
  "id": "imf-master-package",
  "project_id": "imf-master-package",
  "profiles": ["core"],
  "description": "SMPTE IMF binding — turning a locked cut into an IMF package and gating delivery on validation. The package is one governed asset carrying its CPL, PKL and AssetMap identifiers. Each track file is an asset in its own right, related to the package by part_of edges, so OWG never opens the MXF or parses the CPL. All UUIDs are placeholders.",
  "objective": "Package a picture-locked cut as IMF, validate the package, and deliver it only if validation passes, keeping the identity of every track file that went into it.",
  "organizations": [
    { "id": "org_studio", "name": "Example Studio", "role": "studio" },
    { "id": "org_post", "name": "Example Post House", "role": "service-provider" }
  ],
  "participants": [
    { "id": "svc_packager", "kind": "service", "name": "IMF Packager", "organization_id": "org_post" },
    { "id": "svc_validator", "kind": "service", "name": "IMF Validator", "organization_id": "org_post" },
    { "id": "svc_delivery", "kind": "service", "name": "Delivery Service", "organization_id": "org_post" },
    { "id": "post_supervisor", "kind": "human", "name": "Post Supervisor", "role": "supervisor", "organization_id": "org_post" }
  ],
  "infrastructure": [
    { "id": "cloud_platform", "type": "saas_platform", "owner": "org_post" }
  ],
  "assets": [
    {
      "id": "locked_cut",
      "role": "source",
      "type": "video.master",
      "content_type": "application/json",
      "state": "accepted",
      "storage": { "provider": "s3", "locator": "s3://post/example/locked-cut.otio", "zone": "us-west-2" }
    },
    {
      "id": "track_video",
      "role": "intermediate",
      "type": "video.essence",
      "content_type": "application/mxf",
      "produced_by": "package_imf",
      "predecessor": "locked_cut",
      "version_relation": "representation",
      "storage": { "provider": "s3", "locator": "s3://post/example/imf/video-track.mxf", "zone": "us-west-2" }
    },
    {
      "id": "track_audio_en",
      "role": "intermediate",
      "type": "audio.essence",
      "content_type": "application/mxf",
      "produced_by": "package_imf",
      "predecessor": "locked_cut",
      "version_relation": "representation",
      "storage": { "provider": "s3", "locator": "s3://post/example/imf/audio-en.mxf", "zone": "us-west-2" }
    },
    {
      "id": "imf_package",
      "role": "delivery",
      "type": "video.package",
      "content_type": "application/xml",
      "produced_by": "package_imf",
      "predecessor": "locked_cut",
      "version_relation": "representation",
      "state": "in_review",
      "identifiers": [
        { "scope": "imf.cpl",      "id": "urn:uuid:5b1d7c0e-2f43-4d8a-8a55-0c6e91a7d301" },
        { "scope": "imf.pkl",      "id": "urn:uuid:c4e2a9f7-6b18-47d3-9e0a-71d5b3f8a112" },
        { "scope": "imf.assetmap", "id": "urn:uuid:0a93f5d2-1c7b-4e64-b8d9-3e2f6a4c7b90" }
      ],
      "storage": { "provider": "s3", "locator": "s3://post/example/imf/", "zone": "us-west-2" }
    },
    {
      "id": "validation_report",
      "role": "intermediate",
      "type": "document.note",
      "content_type": "application/json",
      "produced_by": "validate_imf",
      "storage": { "provider": "s3", "locator": "s3://post/example/imf/validation.json", "zone": "us-west-2" }
    }
  ],
  "tasks": [
    {
      "id": "package_imf",
      "label": "Package cut as IMF (track files, CPL, PKL, AssetMap)",
      "type": "task",
      "executor": { "type": "service", "ref": "imf.package", "environment": "saas" },
      "performed_by": "svc_packager",
      "ran_on": "cloud_platform",
      "used": ["locked_cut"],
      "produced": ["track_video", "track_audio_en", "imf_package"],
      "failure_mode": "HALT"
    },
    {
      "id": "validate_imf",
      "label": "Validate package structure and essence",
      "type": "qc",
      "executor": { "type": "service", "ref": "imf.validate", "environment": "saas" },
      "performed_by": "svc_validator",
      "ran_on": "cloud_platform",
      "used": ["imf_package", "track_video", "track_audio_en"],
      "produced": ["validation_report"],
      "checks": ["cpl_schema", "pkl_hashes", "assetmap_paths", "essence_conformance"],
      "depends_on": ["package_imf"],
      "failure_mode": "HALT"
    },
    {
      "id": "approve_package",
      "label": "Supervisor approves package",
      "type": "review",
      "executor": { "type": "human", "ref": "review.approve", "environment": "desktop" },
      "performed_by": "post_supervisor",
      "used": ["imf_package", "validation_report"],
      "depends_on": ["validate_imf"],
      "failure_mode": "HALT"
    },
    {
      "id": "deliver_imf",
      "label": "Deliver package",
      "type": "delivery",
      "executor": { "type": "saas_api", "ref": "deliver.package", "environment": "saas" },
      "performed_by": "svc_delivery",
      "used": ["imf_package"],
      "depends_on": ["approve_package"],
      "failure_mode": "HALT"
    }
  ],
  "relationships": [
    {
      "id": "rel_video_in_pkg",
      "relation": "part_of",
      "from": { "kind": "asset", "id": "track_video" },
      "to":   { "kind": "asset", "id": "imf_package" },
      "assurance": "asserted",
      "proposed_by": "svc_packager"
    },
    {
      "id": "rel_audio_in_pkg",
      "relation": "part_of",
      "from": { "kind": "asset", "id": "track_audio_en" },
      "to":   { "kind": "asset", "id": "imf_package" },
      "assurance": "asserted",
      "proposed_by": "svc_packager"
    }
  ]
}
