{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://miruntime.com/downloads/miruntime-policy-decision.schema.json",
  "title": "MiRuntime Conceptual Policy Decision",
  "description": "Editorial reference schema for a typed runtime policy result evaluated outside model prose.",
  "type": "object",
  "additionalProperties": false,
  "required": ["decisionId", "runId", "timestampUtc", "policyVersion", "subject", "action", "resource", "result", "rationale"],
  "properties": {
    "decisionId": { "type": "string", "minLength": 1 },
    "runId": { "type": "string", "minLength": 1 },
    "timestampUtc": { "type": "string", "format": "date-time" },
    "policyVersion": { "type": "string", "minLength": 1 },
    "subject": { "type": "string", "minLength": 1 },
    "action": { "type": "string", "minLength": 1 },
    "resource": { "type": "string", "minLength": 1 },
    "result": { "type": "string", "enum": ["allow", "deny", "transform", "require-approval", "escalate"] },
    "rationale": { "type": "array", "minItems": 1, "items": { "type": "string" } },
    "conditions": { "type": "array", "items": { "type": "string" } },
    "requiredApprovals": { "type": "array", "items": { "type": "string" } },
    "transformedAction": { "type": ["object", "null"] },
    "expiresAtUtc": { "type": ["string", "null"], "format": "date-time" },
    "evidenceEventId": { "type": "string" }
  }
}
