{
 "use_case": "animatic-studio",
 "title": "Script to animatic: the grounded shot list, the consent gate and one render",
 "about": "A 30-second ad script for a made-up brand. The shot list must cover every action, dialogue and on-screen-text line, and each dialogue line must be spoken exactly once, in the script's own words. The render casts the voice-over with a Decosa house voice (allowed) and DANA with a fictional performer whose consent covers a different campaign (refused by the consent ledger, so her line is subtitled). The render takes a few minutes of GPU; the step polls until it is done and checks the signed record.",
 "licence": "ad-script.txt: written for Decosa (CC0); Hollin Oats is a made-up brand.",
 "inputs": [
  {
   "file": "inputs/ad-script.txt",
   "what": "A 30-second ad script (scene paragraphs, VO: lines, one character line, a SUPER). Your own scripts, up to about two pages, go here."
  }
 ],
 "steps": [
  {
   "id": "shotlist",
   "method": "POST",
   "path": "/animatic/shotlist",
   "body": {
    "script": {
     "$file": "inputs/ad-script.txt"
    },
    "title": "Rehearsal ad",
    "style": "grey"
   },
   "timeout": 600
  },
  {
   "id": "render",
   "method": "POST",
   "path": "/animatic/runs/${shotlist.run_id}/render",
   "body": {
    "cast": {
     "VO": "id_house-af-heart",
     "DANA": "id_demo-ines-okafor"
    }
   }
  },
  {
   "id": "run",
   "method": "GET",
   "path": "/animatic/runs/${shotlist.run_id}",
   "until": {
    "path": "versions[0].status",
    "in": [
     "done",
     "failed"
    ]
   },
   "interval": 10,
   "max_wait": 2400
  }
 ],
 "checks": [
  {
   "says": "every action, dialogue and on-screen-text line is covered by a shot",
   "path": "shotlist.coverage.pct",
   "equals": 100.0
  },
  {
   "says": "each dialogue line is spoken exactly once, in the script's words",
   "path": "shotlist.coverage.dialogue_spoken_once",
   "equals": true
  },
  {
   "says": "the shot list has at least four shots",
   "path": "shotlist.shots",
   "count_min": 4
  },
  {
   "says": "the shot list and the grounding check made receipted model calls",
   "path": "shotlist.receipts",
   "count_min": 2
  },
  {
   "says": "the house voice for the VO is allowed by the consent ledger",
   "path": "render.consent[speaker=VO].allowed",
   "any_equals": true
  },
  {
   "says": "the performer whose consent covers another campaign is refused",
   "path": "render.consent[speaker=DANA].allowed",
   "any_equals": false
  },
  {
   "says": "the render finishes",
   "path": "run.versions[0].status",
   "equals": "done"
  },
  {
   "says": "the finished cut has a signed record of AI steps and human edits",
   "path": "run.versions[0].record.entries",
   "min": 10
  },
  {
   "says": "every model call has a signed receipt",
   "receipts": "signed",
   "ignore_prefix": [
    "cd_"
   ]
  }
 ]
}