{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://clavenar.com/schemas/hil-decision.schema.json",
  "title": "Clavenar HIL Decision Request",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "decision"
  ],
  "properties": {
    "decision": {
      "enum": [
        "approve",
        "deny",
        "modify"
      ]
    },
    "decided_by": {
      "type": "string",
      "description": "Legacy auth-disabled attribution; authenticated deployments derive the principal."
    },
    "reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "modification_diff": {
      "type": [
        "object",
        "null"
      ]
    },
    "modified_payload": {
      "description": "Deprecated detector field; a new HIL rejects any supplied whole-document rewrite."
    },
    "approver_assertion": {},
    "decided_via": {
      "type": [
        "string",
        "null"
      ]
    },
    "tenant": {
      "type": [
        "string",
        "null"
      ],
      "description": "Legacy auth-disabled field; authenticated deployments derive tenant scope."
    }
  }
}
