{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/feason-com/json-schema/feason-com-evidence-packet-schema.json",
  "title": "EvidencePacket",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/feason-com-openapi.yml#/components/schemas/EvidencePacket",
  "type": "object",
  "required": [
    "question",
    "primarySources",
    "scripture",
    "historicalContext",
    "patristicSources",
    "councilSources",
    "interpretivePositions",
    "areasOfConsensus",
    "areasOfDisagreement",
    "sourceProvenance",
    "retrievalMetadata",
    "confidence"
  ],
  "properties": {
    "question": {
      "type": "string"
    },
    "primarySources": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EvidenceItem"
      }
    },
    "scripture": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EvidenceItem"
      }
    },
    "historicalContext": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EvidenceItem"
      }
    },
    "patristicSources": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EvidenceItem"
      }
    },
    "councilSources": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EvidenceItem"
      }
    },
    "doctrinalConnections": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "interpretivePositions": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "areasOfConsensus": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "areasOfDisagreement": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "relevantTerms": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "sourceProvenance": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "retrievalMetadata": {
      "type": "object",
      "additionalProperties": true
    },
    "confidence": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    }
  },
  "$defs": {
    "EvidenceItem": {
      "type": "object",
      "required": [
        "passageId",
        "sourceId",
        "sourceTitle",
        "sourceType",
        "tradition",
        "canonicalReference",
        "text",
        "confidence",
        "provenance",
        "retrieval"
      ],
      "properties": {
        "passageId": {
          "type": "string"
        },
        "sourceId": {
          "type": "string"
        },
        "sourceTitle": {
          "type": "string"
        },
        "author": {
          "type": [
            "string",
            "null"
          ]
        },
        "sourceType": {
          "enum": [
            "scripture",
            "creed",
            "council",
            "patristic",
            "historical",
            "confession",
            "lexicon"
          ]
        },
        "tradition": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "canonicalReference": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "relationship": {
          "type": [
            "string",
            "null"
          ]
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "provenance": {
          "type": "object",
          "required": [
            "sourceUrl",
            "license",
            "licenseNotes",
            "verificationStatus"
          ],
          "properties": {
            "sourceUrl": {
              "type": "string",
              "format": "uri"
            },
            "translation": {
              "type": [
                "string",
                "null"
              ]
            },
            "translator": {
              "type": [
                "string",
                "null"
              ]
            },
            "edition": {
              "type": [
                "string",
                "null"
              ]
            },
            "license": {
              "type": "string"
            },
            "licenseNotes": {
              "type": "string"
            },
            "verificationStatus": {
              "enum": [
                "unverified",
                "machine_checked",
                "curated",
                "scholarly_reviewed"
              ]
            }
          }
        },
        "retrieval": {
          "type": "object",
          "required": [
            "score",
            "matchedBy"
          ],
          "properties": {
            "score": {
              "type": "number"
            },
            "matchedBy": {
              "type": "array",
              "items": {
                "enum": [
                  "lexical",
                  "semantic",
                  "ontology"
                ]
              }
            }
          }
        }
      }
    }
  }
}