{
 "use_case": "check-their-brief",
 "title": "Check the other side's brief: a fictional opposition, as the PDF that arrives",
 "about": "A two-page fictional opposition to a summary-judgment motion (M.R. v. Lakeview Unified School District) as a PDF, sent as a raw file. It cites real Supreme Court cases and carries planted problems: white text telling AI reviewers not to flag citations, 1-point text telling a summariser what to say, an instruction in the file's Keywords property, a case at a page that sits inside another case (925 F.3d 1339), a Westlaw cite no public source has, a one-word change inside a T.L.O. quotation, a holding Redding does not contain, and a student's full birth date. The check must find the hidden instructions and the birth date, report the planted citation problems when the public sources answer, and end in a signed record that verifies. Lookups send only citations to the Caselaw Access Project and CourtListener, never the text.",
 "licence": "Fictional: the filing, parties and identifiers were written for Decosa (no real case or people); the Supreme Court cases it cites are public domain. Part of decosa-api, AGPL-3.0-or-later.",
 "inputs": [
  {"file": "inputs/opposition-mr-v-lakeview.pdf", "what": "The other side's filing as a PDF, the way it arrives from the court's e-filing system or by email. A Word file or pasted text also works, but only a PDF or Word file can be checked for hidden text."}
 ],
 "steps": [
  {"id": "parse", "method": "POST", "path": "/theirbrief/parse?name=opposition-mr-v-lakeview.pdf", "raw_file": "inputs/opposition-mr-v-lakeview.pdf", "content_type": "application/pdf"},
  {"id": "check", "method": "POST", "path": "/theirbrief/check", "timeout": 300,
   "body": {"upload_id": {"$ref": "parse.upload_id"}, "title": "Rehearsal: M.R. v. Lakeview USD (fictional)", "stream": false}},
  {"id": "export", "method": "GET", "path": "/theirbrief/runs/${check.run_id}/export?format=md", "as": "text"},
  {"id": "verify", "method": "POST", "path": "/record/verify", "auth": false, "body": {"record": {"$ref": "check.report.record"}}},
  {"id": "tampered", "method": "POST", "path": "/record/verify", "auth": false, "body": {"record": {"$ref": "check.report.record"}},
   "tamper": {"at": "record.statement.decision", "set": "clear"}}
 ],
 "checks": [
  {"says": "the PDF is read and its hidden-text scan runs", "path": "parse.hidden.ran", "equals": true},
  {"says": "the scan finds the hidden texts before any model runs", "path": "parse.hidden.findings", "count_min": 3},
  {"says": "the decision is: findings", "path": "check.decision", "equals": "findings"},
  {"says": "three hidden instructions aimed at AI tools are findings", "path": "check.items[check=hidden,status=problem]", "count_min": 3},
  {"says": "the harmless hidden 'DRAFT' label is not called an instruction", "path": "check.items[check=hidden,status=problem,hidden_text~DRAFT]", "count_max": 0},
  {"says": "the student's full birth date is a finding", "path": "check.items[check=privacy,status=problem]", "count_min": 1},
  {"says": "nothing is called fake", "path": "export", "not_contains": ["fake", "Fake"]},
  {"says": "the memo has the table for the reply", "path": "export", "contains": ["For your reply"]},
  {"says": "the signed record verifies", "path": "verify.ok", "equals": true},
  {"says": "a record with its decision changed no longer verifies", "path": "tampered.ok", "equals": false},
  {"says": "every model call has a signed receipt", "receipts": "signed"}
 ]
}
