{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ai-law-tracker-com/json-schema/ai-law-tracker-com-assessment-schema.json",
  "title": "Assessment",
  "description": "A company-profile applicability + risk assessment.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ai-law-tracker-com-assess-api-openapi.yml#/components/schemas/Assessment",
  "type": "object",
  "properties": {
    "risk": {
      "$ref": "#/$defs/Risk"
    },
    "applicable_law_count": {
      "type": "integer"
    },
    "jurisdictions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "obligations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Obligation"
      }
    },
    "no_law": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "jurisdiction": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "layer": {
            "type": "string"
          }
        }
      }
    },
    "unmapped_sectors": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "Obligation": {
      "type": "object",
      "description": "A derived AI-law obligation — who must do what, by when, or owe what penalty. Retrieved from curated primary sources (no LLM); NOT legal advice.",
      "properties": {
        "law": {
          "type": "string"
        },
        "jurisdiction": {
          "type": "string"
        },
        "layer": {
          "type": "string",
          "enum": [
            "state",
            "federal",
            "landscape",
            "country"
          ],
          "description": "“landscape” = a notable law that may not apply to you (out-of-state); see may_not_apply."
        },
        "applies_because": {
          "type": [
            "string",
            "null"
          ],
          "description": "Why this obligation was surfaced for the given context."
        },
        "obligation": {
          "type": [
            "string",
            "null"
          ],
          "description": "The plain-English duty (\"what must I do\")."
        },
        "deadline": {
          "type": [
            "string",
            "null"
          ],
          "description": "Free-text effective/compliance date verbatim from the source (\"by when\")."
        },
        "penalty": {
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "type": [
            "string",
            "null"
          ]
        },
        "citation": {
          "type": [
            "string",
            "null"
          ]
        },
        "government_body": {
          "type": [
            "string",
            "null"
          ]
        },
        "may_not_apply": {
          "type": "boolean",
          "description": "true when the law binds another jurisdiction and may not apply to the caller."
        },
        "source_url": {
          "type": [
            "string",
            "null"
          ],
          "description": "Primary/official source for this obligation."
        },
        "source_tier": {
          "type": "string",
          "enum": [
            "primary",
            "secondary",
            "unverified"
          ],
          "description": "Grounding tier of source_url."
        }
      }
    },
    "Risk": {
      "type": "object",
      "description": "Deterministic 1–10 risk score (same inputs → same score; no model).",
      "properties": {
        "score": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10
        },
        "level": {
          "type": "string",
          "enum": [
            "Low",
            "Medium",
            "High",
            "Critical"
          ]
        },
        "factors": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Named contributions to the score (full result only; withheld in a preview)."
        }
      }
    }
  }
}