{
  "$schema": "https://openworkflowgraph.org/schemas/core/v0.92.json",
  "owg_version": "0.92",
  "id": "rights-clearance-draft",
  "project_id": "rights-clearance-draft",
  "profiles": ["core"],
  "description": "DRAFT — rights and clearance on one composition. A VFX vendor keeps its rig and licenses the final frames to the studio; a brand's logo appears in the shot under a separate clearance. v0.92 has no rights or clearance node, so this document carries the proposed shape under x- keys in metadata: an ODRL-shaped policy on each asset and a clearance record on the context. It validates today and shows what the proposal would say. A delivery task is gated on a rights check.",
  "objective": "Show who may do what with each component of a delivered shot, and block delivery until the check passes.",
  "organizations": [
    { "id": "org_studio", "name": "Example Studio", "role": "studio" },
    { "id": "org_vfx", "name": "Example VFX Vendor", "role": "service-provider" }
  ],
  "participants": [
    { "id": "vfx_lead", "kind": "human", "name": "VFX Lead", "role": "supervisor", "organization_id": "org_vfx" },
    { "id": "legal", "kind": "human", "name": "Studio Legal", "role": "supervisor", "organization_id": "org_studio" },
    { "id": "svc_delivery", "kind": "service", "name": "Delivery Service", "organization_id": "org_vfx" }
  ],
  "infrastructure": [
    { "id": "cloud_platform", "type": "saas_platform", "owner": "org_vfx" }
  ],
  "contexts": [
    {
      "id": "shot_0140",
      "name": "Shot 0140",
      "work_type": "creative-fictional",
      "metadata": {
        "type": "production_scene",
        "x-clearance": [
          {
            "id": "clr_brand_logo",
            "kind": "property_release",
            "subject": "Example Brand logo on the vehicle door",
            "granted_by": "Example Brand Inc.",
            "scope": { "territory": "worldwide", "media": "all", "term": "perpetual" },
            "source_document": { "contract_id": "CLR-2026-0091" }
          }
        ]
      }
    }
  ],
  "assets": [
    {
      "id": "hero_rig",
      "role": "source",
      "type": "scene.rig",
      "content_type": "application/octet-stream",
      "state": "accepted",
      "storage": { "provider": "s3", "locator": "s3://vfx/shot0140/hero-rig-v3.usd", "zone": "us-west-2" },
      "metadata": {
        "x-rights": {
          "kind": "Agreement",
          "permission": [
            { "action": "use", "assignee": "org_vfx", "constraint": [{ "leftOperand": "purpose", "operator": "eq", "rightOperand": "production" }] }
          ],
          "prohibition": [
            { "action": "transfer", "assignee": "org_studio" }
          ],
          "source_document": { "contract_id": "VFX-2026-0147" }
        }
      }
    },
    {
      "id": "final_frames",
      "role": "delivery",
      "type": "image.sequence",
      "content_type": "image/x-exr",
      "produced_by": "render_final",
      "predecessor": "hero_rig",
      "version_relation": "derivation",
      "state": "in_review",
      "depicts": ["shot_0140"],
      "storage": { "provider": "s3", "locator": "s3://vfx/shot0140/final/", "zone": "us-west-2" },
      "metadata": {
        "x-rights": {
          "kind": "Agreement",
          "permission": [
            { "action": "distribute", "assignee": "org_studio", "constraint": [{ "leftOperand": "spatial", "operator": "eq", "rightOperand": "worldwide" }] }
          ],
          "source_document": { "contract_id": "VFX-2026-0147" }
        }
      }
    },
    {
      "id": "rights_check_report",
      "role": "intermediate",
      "type": "document.note",
      "content_type": "application/json",
      "produced_by": "check_rights",
      "storage": { "provider": "s3", "locator": "s3://vfx/shot0140/rights-check.json", "zone": "us-west-2" }
    }
  ],
  "tasks": [
    {
      "id": "render_final",
      "label": "Render final frames from the rig",
      "type": "task",
      "executor": { "type": "service", "ref": "render.farm", "environment": "cloud" },
      "performed_by": "svc_delivery",
      "ran_on": "cloud_platform",
      "used": ["hero_rig"],
      "produced": ["final_frames"],
      "failure_mode": "HALT"
    },
    {
      "id": "check_rights",
      "label": "Check rights and clearances for every component",
      "type": "qc",
      "executor": { "type": "service", "ref": "rights.check", "environment": "saas" },
      "performed_by": "svc_delivery",
      "used": ["hero_rig", "final_frames"],
      "produced": ["rights_check_report"],
      "checks": ["distribute_permitted_for_studio", "no_prohibited_transfer", "clearances_cover_depicted_items"],
      "depends_on": ["render_final"],
      "failure_mode": "HALT"
    },
    {
      "id": "legal_signoff",
      "label": "Studio legal signs off",
      "type": "review",
      "executor": { "type": "human", "ref": "review.approve", "environment": "desktop" },
      "performed_by": "legal",
      "used": ["final_frames", "rights_check_report"],
      "depends_on": ["check_rights"],
      "failure_mode": "HALT"
    },
    {
      "id": "deliver_frames",
      "label": "Deliver final frames to the studio",
      "type": "delivery",
      "executor": { "type": "saas_api", "ref": "deliver.package", "environment": "saas" },
      "performed_by": "svc_delivery",
      "used": ["final_frames"],
      "depends_on": ["legal_signoff"],
      "failure_mode": "HALT"
    }
  ]
}
