{
 "use_case": "expert-to-sop",
 "title": "Expert-to-SOP: a narrated crimp-height calibration on a fictional press panel",
 "about": "A 40-second screen recording of a fictional press operator panel: maintenance mode with a PIN, zero the height sensor, three test crimps, a height offset, save, and a log note, narrated by a stock synthetic voice. The narrator also says to wear cut-resistant gloves, which the recording never shows, and never mentions typing the offset, which it does show. The draft must mark the gloves instruction as needs confirmation, the offset step as seen but not narrated, the zeroing step as seen and said, cite a keyframe for every step, and keep the cited times inside the recording. A reviewer signs; the revision record must verify, and fail once a step count is changed.",
 "licence": "Synthetic: a fictional app written for Decosa, driven by a script and narrated by the Kokoro-82M stock voice am_michael (Apache-2.0). No real people, faces or voices. Recording CC0; part of decosa-api, AGPL-3.0-or-later.",
 "inputs": [
  {"file": "inputs/crimp-calibration.mp4", "what": "The recording (MP4, 40 s, 1280x720, with narration)."},
  {"file": "inputs/transcript.json", "what": "The narration as timed lines, as the diarizer transcribed it; sent with the recording so the rehearsal does not need a speech-to-text service."}
 ],
 "steps": [
  {"id": "draft", "method": "POST", "path": "/sop/draft", "timeout": 300,
   "body": {"video_b64": {"$b64": "inputs/crimp-calibration.mp4"}, "transcript": {"$file": "inputs/transcript.json"}, "title": "Calibrate crimp height on the CP-40 press", "stream": false}},
  {"id": "empty", "method": "POST", "path": "/sop/draft", "expect_status": 400, "body": {"title": "no recording"}},
  {"id": "signoff", "method": "POST", "path": "/sop/runs/${draft.run_id}/signoff",
   "body": {"name": "Rehearsal Reviewer", "role": "CI lead", "revision": "1", "default_decision": "remove", "confirm": true}},
  {"id": "verify", "method": "POST", "path": "/record/verify", "auth": false, "body": {"record": {"$ref": "signoff.record"}}},
  {"id": "tampered", "method": "POST", "path": "/record/verify", "auth": false, "body": {"record": {"$ref": "signoff.record"}},
   "tamper": {"at": "record.statement.count", "set": 99}}
 ],
 "checks": [
  {"says": "the gloves instruction (said, never shown) needs confirmation", "path": "draft.report.steps[action~glove].status", "any_equals": "needs_confirmation"},
  {"says": "the offset typed on screen but never said is marked not narrated", "path": "draft.report.steps[action~offset].status", "any_equals": "not_narrated"},
  {"says": "zeroing the height sensor is seen and said", "path": "draft.report.steps[action~zero].status", "any_equals": "confirmed"},
  {"says": "every step has a keyframe", "path": "draft.report.steps[keyframe=null]", "count": 0},
  {"says": "the cited times stay inside the recording (no timing warning)", "path": "draft.report.timing_warning", "falsy": true},
  {"says": "at least six steps are drafted", "path": "draft.report.totals.steps", "min": 6},
  {"says": "an empty request is refused", "path": "empty.error", "truthy": true},
  {"says": "the signed revision record verifies", "path": "verify.ok", "equals": true},
  {"says": "the record fails once it is changed", "path": "tampered.ok", "equals": false},
  {"says": "every model call has a signed receipt", "receipts": "signed", "min": 5}
 ]
}
