{
  "name": "QADI AI Knowledge API Schema",
  "version": "1.0",
  "description": "Schema guide for QADI authority graph JSON responses.",
  "core_objects": {
    "unit": {
      "id": "Unit id such as curl, mflx, potn",
      "graph_id": "Graph id such as unit:curl",
      "name": "Human-readable unit name",
      "catalog": "Catalog record from qmu_units.json",
      "authority": "Unit authority record",
      "pandoc_authority": "Pandoc-derived authority record",
      "curated_override": "Human-curated override record",
      "graph_node": "Corresponding graph node",
      "links": "HTML and graph navigation links"
    },
    "equation": {
      "id": "Graph equation id such as equation:eq:LedgerOneAnchor",
      "node": "Equation node containing label, latex, qmu_refs, paper references, and graph metadata",
      "neighbors": "Directly connected graph node ids",
      "links": "HTML and graph navigation links"
    },
    "paper": {
      "id": "Paper id such as PAPER-QMU-METROLOGY-AND-PROTOCOLS",
      "graph_node": "Corresponding paper graph node",
      "paper_index": "Paper index record",
      "neighbors": "Directly connected graph node ids",
      "links": "HTML and graph navigation links"
    },
    "graph_node": {
      "id": "Graph node id",
      "type": "unit, equation, or paper",
      "label": "Display label",
      "degree": "Number of evidence graph connections",
      "metadata": "Node-specific fields"
    },
    "graph_edge": {
      "source": "Source graph node id",
      "target": "Target graph node id",
      "type": "Relationship type when available",
      "evidence": "Evidence metadata when available"
    }
  },
  "response_types": {
    "search": {
      "query": "Search string",
      "type_filter": "Optional node type filter",
      "count": "Number of returned results",
      "results": "Scored graph node matches"
    },
    "neighborhood": {
      "id": "Center graph node id",
      "center": "Center graph node",
      "degree": "Neighbor count",
      "neighbors": "Adjacent graph nodes"
    },
    "path": {
      "from": "Start graph node id",
      "to": "End graph node id",
      "found": "Whether a path was found",
      "path": "Ordered graph node ids",
      "nodes": "Node records for the path"
    },
    "knowledge_pack_full": {
      "nodes": "Complete graph node list",
      "edges": "Complete graph edge list",
      "unit_authority": "Unit authority data",
      "catalog_units": "Catalog unit definitions",
      "paper_index": "Paper index",
      "curated_unit_overrides": "Curated descriptions and dimensional-expression overrides"
    }
  },
  "id_conventions": {
    "unit": "curl",
    "unit_graph_node": "unit:curl",
    "equation_graph_node": "equation:eq:LedgerOneAnchor",
    "paper_graph_node": "paper:PAPER-QMU-METROLOGY-AND-PROTOCOLS"
  }
}
