{
  "id": "detector-threshold-in-when",
  "title": "A detector supplies a score and the rule owns the threshold",
  "covers": [
    "OAR-OPS-10",
    "OAR-FACT-9",
    "OAR-CONF-18",
    "OAR-FACT-6"
  ],
  "rule": {
    "spec_version": "1.0",
    "id": "INJECTION_SUSPECTED",
    "kind": "detector",
    "on": "tool.pre_invoke",
    "selector": {},
    "effect": "block",
    "when": "prompt_injection_score > 0.8",
    "detector": {
      "ref": "detector://fixture"
    },
    "requires_facts": [
      "prompt_injection_score"
    ]
  },
  "input": {
    "anchor": "tool.pre_invoke",
    "facts": {
      "tool": "read",
      "prompt_injection_score": 0.91
    }
  },
  "expected": {
    "decision": "block",
    "code": "INJECTION_SUSPECTED"
  }
}
