{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://ailattice.ai/data/latest/lattice.schema.json",
 "title": "AI Lattice dataset",
 "type": "object",
 "required": [
  "version",
  "as_of",
  "entities",
  "links",
  "chokepoints"
 ],
 "properties": {
  "version": {
   "type": "string"
  },
  "as_of": {
   "type": "string",
   "format": "date"
  },
  "entities": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "id",
     "name",
     "layer",
     "kind",
     "role",
     "forces"
    ],
    "properties": {
     "id": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "layer": {
      "type": "string"
     },
     "kind": {
      "enum": [
       "company",
       "lab",
       "grid",
       "government"
      ]
     },
     "ticker": {
      "type": [
       "string",
       "null"
      ]
     },
     "role": {
      "type": "string",
      "description": "Observed one-line role."
     },
     "forces": {
      "type": "array",
      "items": {
       "enum": [
        "compute",
        "interface",
        "alignment",
        "energy"
       ]
      }
     },
     "url": {
      "type": "string"
     }
    }
   }
  },
  "links": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "id",
     "from",
     "to",
     "kind",
     "what",
     "evidence",
     "basis",
     "source"
    ],
    "properties": {
     "id": {
      "type": "string",
      "description": "Stable link ID, e.g. L001."
     },
     "from": {
      "type": "string",
      "description": "Supplier entity id."
     },
     "to": {
      "type": "string",
      "description": "Customer or dependent entity id."
     },
     "kind": {
      "enum": [
       "chips",
       "memory",
       "tools",
       "manufacturing",
       "packaging",
       "power",
       "compute",
       "capital",
       "distribution",
       "data",
       "rules"
      ]
     },
     "what": {
      "type": "string"
     },
     "evidence": {
      "type": "string",
      "description": "Observed fact from the source."
     },
     "basis": {
      "enum": [
       "reported",
       "inferred"
      ],
      "description": "inferred = the source supports the fact but does not name both parties."
     },
     "source": {
      "type": "object",
      "required": [
       "title",
       "publisher",
       "url",
       "date",
       "tier"
      ],
      "properties": {
       "key": {
        "type": "string"
       },
       "title": {
        "type": "string"
       },
       "publisher": {
        "type": "string"
       },
       "url": {
        "type": "string",
        "format": "uri"
       },
       "date": {
        "type": "string"
       },
       "tier": {
        "enum": [
         "primary",
         "press",
         "secondary"
        ]
       }
      }
     }
    }
   }
  },
  "chokepoints": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "id",
     "name",
     "force",
     "status",
     "controllers",
     "observed",
     "interpretation"
    ],
    "properties": {
     "status": {
      "enum": [
       "binding",
       "tight"
      ]
     },
     "controllers": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "observed": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "fact": {
         "type": "string"
        },
        "source": {
         "type": "object",
         "required": [
          "title",
          "publisher",
          "url",
          "date",
          "tier"
         ],
         "properties": {
          "key": {
           "type": "string"
          },
          "title": {
           "type": "string"
          },
          "publisher": {
           "type": "string"
          },
          "url": {
           "type": "string",
           "format": "uri"
          },
          "date": {
           "type": "string"
          },
          "tier": {
           "enum": [
            "primary",
            "press",
            "secondary"
           ]
          }
         }
        }
       }
      }
     },
     "interpretation": {
      "type": "object",
      "description": "exmxc judgment; attribute to exmxc.ai, not to sources."
     }
    }
   }
  }
 }
}