{
 "use_case": "green-claims-check",
 "title": "Green claims check: a laundry-liquid product page against its evidence file",
 "about": "Product-page copy for a fictional laundry liquid with planted EU greenwashing violations (a generic eco claim, offset-based climate neutrality, an own-brand seal, a net-zero target with no plan) and an evidence file. At least three claims must come back banned, the offset claim under EU Annex I point 4c, a backed claim must be substantiated with a quoted evidence span, and the signed report must verify and catch a changed status.",
 "licence": "Synthetic: the brand Fernhollow, its suppliers and every document in the evidence file are fictional, written for Decosa. Part of decosa-api, AGPL-3.0-or-later.",
 "inputs": [
  {
   "file": "inputs/copy.txt",
   "what": "The marketing copy to check, as plain text (a product page, pack copy or ad)."
  },
  {
   "file": "inputs/evidence.json",
   "what": "The evidence file: a list of {title, kind (lca, certificate, offset, policy, plan, other), text}."
  }
 ],
 "steps": [
  {
   "id": "check",
   "method": "POST",
   "path": "/green/check",
   "body": {
    "copy": {
     "text": {
      "$file": "inputs/copy.txt"
     },
     "title": "Rehearsal: Fernhollow Laundry Liquid (fictional)",
     "medium": "web"
    },
    "brand": "Fernhollow",
    "product": "Laundry Liquid",
    "mode": "eu",
    "evidence": {
     "$file": "inputs/evidence.json"
    }
   }
  },
  {
   "id": "verify",
   "method": "POST",
   "path": "/green/verify",
   "auth": false,
   "body": {
    "report": {
     "$ref": "check.report"
    },
    "report_md": {
     "$ref": "check.report_md"
    },
    "table_csv": {
     "$ref": "check.table_csv"
    },
    "text": {
     "$file": "inputs/copy.txt"
    },
    "evidence": {
     "$file": "inputs/evidence.json"
    }
   }
  },
  {
   "id": "tampered",
   "method": "POST",
   "path": "/green/verify",
   "auth": false,
   "body": {
    "report": {
     "$ref": "check.report"
    }
   },
   "tamper": {
    "at": "report.status",
    "set": "clear"
   }
  }
 ],
 "checks": [
  {
   "says": "at least three claims are banned",
   "path": "check.counts.banned",
   "min": 3
  },
  {
   "says": "the offset-based climate-neutral claim is banned under Annex I point 4c",
   "path": "check.claims[rules~eu-4c][0].verdict",
   "equals": "banned"
  },
  {
   "says": "the generic 'eco-friendly' claim is banned",
   "path": "check.claims[text~eco-friendly][0].verdict",
   "equals": "banned"
  },
  {
   "says": "a claim the evidence backs is substantiated with a quoted evidence span",
   "path": "check.claims[verdict=substantiated].evidence[0].quote",
   "count_min": 1
  },
  {
   "says": "the delivery line is not treated as an environmental claim",
   "path": "check.claims[text~Free delivery][0].verdict",
   "equals": "not_environmental"
  },
  {
   "says": "the signed report verifies",
   "path": "verify.valid_signature",
   "equals": true
  },
  {
   "says": "the report matches the copy",
   "path": "verify.copy_matches",
   "equals": true
  },
  {
   "says": "the report matches its CSV claim table",
   "path": "verify.table_csv_matches",
   "equals": true
  },
  {
   "says": "a report with its status changed to clear no longer verifies",
   "path": "tampered.valid_signature",
   "equals": false
  },
  {
   "says": "every model call has a signed receipt",
   "receipts": "signed",
   "min": 5
  }
 ]
}
