{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://oms.local/schemas/structured-role-request.schema.json",
  "title": "OMS fresh interactive Claude structured-role request",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "request_id",
    "role_id",
    "evidence_schema",
    "model_id",
    "policy_digest",
    "claude_session_id",
    "claude_version",
    "created_at",
    "input"
  ],
  "properties": {
    "schema_version": { "const": 1 },
    "request_id": {
      "type": "string",
      "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$"
    },
    "role_id": {
      "enum": ["oms.grader.claude", "oms.bounded-dreamer"]
    },
    "evidence_schema": {
      "enum": ["grader-output.v1", "reflection.v1"]
    },
    "model_id": { "type": "string", "minLength": 1, "maxLength": 256 },
    "policy_digest": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
    "claude_session_id": {
      "type": "string",
      "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[1-8][a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$"
    },
    "claude_version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
    "created_at": {
      "type": "string",
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,3})?Z$"
    },
    "input": { "type": "object" }
  }
}
