{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://kinra.ai/docs/truth-machine/schemas/read-result.schema.json",
  "title": "Truth Machine governed-read result",
  "description": "The JSON contract shared by the Kit's governed read and adoption check: an aggregate three-valued status over checks that each carry expected, observed, source, and meaning.",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema_version", "status", "checks"],
  "properties": {
    "schema_version": {"const": 1},
    "status": {"enum": ["match", "mismatch", "unknown"]},
    "error": {"type": "string", "minLength": 1},
    "checks": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["id", "status", "expected", "observed", "source", "meaning"],
        "properties": {
          "id": {"type": "string", "minLength": 1},
          "status": {"enum": ["match", "mismatch", "unknown"]},
          "expected": {},
          "observed": {},
          "source": {"type": "string", "minLength": 1},
          "meaning": {"type": "string", "minLength": 1}
        }
      }
    }
  }
}
