{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "/schemas/3.1.0-rc.4/content-standards/calibrate-content-response.json",
  "title": "Calibrate Content Response",
  "description": "Response payload with verdict and detailed explanations for collaborative calibration",
  "type": "object",
  "allOf": [
    {
      "$ref": "/schemas/3.1.0-rc.4/core/version-envelope.json"
    },
    {
      "$ref": "/schemas/3.1.0-rc.4/core/protocol-envelope.json"
    }
  ],
  "oneOf": [
    {
      "type": "object",
      "description": "Success response with detailed calibration feedback",
      "properties": {
        "verdict": {
          "$ref": "/schemas/3.1.0-rc.4/enums/binary-verdict.json"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1,
          "description": "Model confidence in the verdict (0-1)"
        },
        "explanation": {
          "type": "string",
          "description": "Detailed natural language explanation of the decision"
        },
        "features": {
          "type": "array",
          "description": "Per-feature breakdown with explanations. Mirrors validate_content_delivery feature shape so calibration loops can correlate against production verdicts by policy_id.",
          "items": {
            "type": "object",
            "properties": {
              "feature_id": {
                "type": "string",
                "description": "Which feature was evaluated. Data features come from the content-standards feature catalog (e.g., 'brand_safety', 'brand_suitability', 'competitor_adjacency'). Record-level structural checks use reserved namespaces: 'record:malformed_artifact'. Reserved prefixes: 'record:', 'delivery:'."
              },
              "status": {
                "$ref": "/schemas/3.1.0-rc.4/enums/feature-check-status.json"
              },
              "policy_id": {
                "type": "string",
                "description": "Policy ID that triggered this result. Enables the calibration loop to iterate on specific policies by correlating sample outcomes to policy ids.",
                "x-entity": "governance_registry_policy"
              },
              "explanation": {
                "type": "string",
                "description": "Human-readable explanation of why this feature passed or failed"
              },
              "confidence": {
                "type": "number",
                "minimum": 0,
                "maximum": 1,
                "description": "Optional evaluator confidence in this result (0-1). Distinguishes certain verdicts from ambiguous ones."
              }
            },
            "required": [
              "feature_id",
              "status"
            ]
          }
        },
        "context": {
          "$ref": "/schemas/3.1.0-rc.4/core/context.json"
        },
        "ext": {
          "$ref": "/schemas/3.1.0-rc.4/core/ext.json"
        }
      },
      "required": [
        "verdict"
      ]
    },
    {
      "type": "object",
      "description": "Error response",
      "properties": {
        "errors": {
          "type": "array",
          "items": {
            "$ref": "/schemas/3.1.0-rc.4/core/error.json"
          }
        },
        "context": {
          "$ref": "/schemas/3.1.0-rc.4/core/context.json"
        },
        "ext": {
          "$ref": "/schemas/3.1.0-rc.4/core/ext.json"
        }
      },
      "required": [
        "errors"
      ]
    }
  ],
  "properties": {}
}
