{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://querykey.com/schema/whitepaper-schema-v1.json",
  "title": "QueryKey Whitepaper Manifest",
  "description": "Machine-readable manifest describing a QueryKey research whitepaper artifact, its verification history, integrity, and access gating attributes.",
  "type": "object",
  "required": ["id","title","version","updated","access","integrity","metrics","taxonomy"],
  "properties": {
  "id": {"type":"string","pattern":"^[a-z0-9\\-]+$","description":"Stable slug identifier"},
    "title": {"type":"string","minLength":5},
    "summary": {"type":"string","description":"Concise executive summary"},
    "abstract": {"type":"string","description":"Extended abstract paragraph(s)"},
  "version": {"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+(-[a-z0-9]+)?$"},
    "updated": {"type":"string","format":"date"},
    "access": {
      "type":"object",
      "required":["inline_view_tier","download_tier"],
      "properties": {
        "inline_view_tier": {"type":"string","enum":["free","professional","enterprise"]},
        "download_tier": {"type":"string","enum":["free","professional","enterprise"]}
      }
    },
    "integrity": {
      "type":"object",
      "required":["hash","trust"],
      "properties": {
        "hash": {"type":"string","pattern":"^sha256:[a-f0-9]{8,}$"},
        "trust": {"type":"number","minimum":0,"maximum":1},
        "evidence_layers": {"type":"array","items":{"type":"string"}}
      }
    },
    "metrics": {
      "type":"object",
      "required":["cases_analyzed","mean_case_quality"],
      "properties": {
        "cases_analyzed": {"type":"integer","minimum":0},
        "mean_case_quality": {"type":"number","minimum":0,"maximum":100}
      }
    },
    "taxonomy": {
      "type":"object",
      "required":["ecosystems"],
      "properties": {
        "ecosystems": {"type":"array","items":{"type":"string"}},
        "tags": {"type":"array","items":{"type":"string"}},
        "pillar": {"type":"string"}
      }
    }
  },
  "additionalProperties": false
}
