{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://clarainsure.com/risk-md/schema/ai-risk-intake-v1.schema.json",
  "title": "Clara AI Risk Intake v1",
  "description": "Customer- and agent-supplied answers for Clara account intake and expert risk review. Server-owned identity, lifecycle, reviewer, and account fields are intentionally excluded.",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema_version", "company", "ai_systems", "data_systems", "authority", "controls", "customers_contracts", "events", "insurance_context", "evidence", "review"],
  "properties": {
    "schema_version": { "const": "clara-ai-risk-intake-v1" },
    "company": { "$ref": "#/$defs/company" },
    "ai_systems": { "type": "array", "items": { "$ref": "#/$defs/aiSystem" } },
    "data_systems": { "$ref": "#/$defs/dataSystems" },
    "authority": { "type": "array", "items": { "$ref": "#/$defs/authority" } },
    "controls": { "type": "array", "items": { "$ref": "#/$defs/control" } },
    "customers_contracts": { "$ref": "#/$defs/contracts" },
    "events": { "type": "array", "items": { "$ref": "#/$defs/event" } },
    "insurance_context": { "$ref": "#/$defs/insurance" },
    "evidence": { "type": "array", "items": { "$ref": "#/$defs/evidence" } },
    "review": { "$ref": "#/$defs/review" }
  },
  "$defs": {
    "text": { "type": "string", "maxLength": 8000 },
    "list": { "type": "array", "items": { "type": "string", "maxLength": 200 } },
    "company": {
      "type": "object", "additionalProperties": false,
      "required": ["legal_name", "operating_name", "website", "headquarters", "operating_jurisdictions", "stage", "employee_band", "revenue_band", "customers", "product", "business_model"],
      "properties": {
        "legal_name": { "type": "string", "maxLength": 300 }, "operating_name": { "type": "string", "maxLength": 300 }, "website": { "type": "string", "maxLength": 300 }, "headquarters": { "type": "string", "maxLength": 300 }, "operating_jurisdictions": { "$ref": "#/$defs/list" }, "stage": { "type": "string", "maxLength": 300 }, "employee_band": { "type": "string", "maxLength": 300 }, "revenue_band": { "type": "string", "maxLength": 300 }, "customers": { "$ref": "#/$defs/text" }, "product": { "$ref": "#/$defs/text" }, "business_model": { "$ref": "#/$defs/text" }, "uses_ai_in_production": { "enum": ["yes", "no", "unknown"] }, "builds_for_others": { "$ref": "#/$defs/text" }
      }
    },
    "actionSurface": {
      "type": "object", "additionalProperties": false,
      "required": ["systems", "tools", "credentials", "data", "code", "wallets", "vendors", "customers", "regulated_work", "external_communications", "physical_systems"],
      "properties": {
        "systems": { "$ref": "#/$defs/list" }, "tools": { "$ref": "#/$defs/list" }, "credentials": { "$ref": "#/$defs/list" }, "data": { "$ref": "#/$defs/list" }, "code": { "$ref": "#/$defs/list" }, "wallets": { "$ref": "#/$defs/list" }, "vendors": { "$ref": "#/$defs/list" }, "customers": { "$ref": "#/$defs/list" }, "regulated_work": { "$ref": "#/$defs/list" }, "external_communications": { "$ref": "#/$defs/list" }, "physical_systems": { "$ref": "#/$defs/list" }
      }
    },
    "aiSystem": {
      "type": "object", "additionalProperties": false,
      "required": ["name", "job", "production_status", "operator", "users", "autonomy_level", "model_provider", "material_changes", "action_surface"],
      "properties": {
        "name": { "type": "string", "maxLength": 300 }, "job": { "$ref": "#/$defs/text" }, "production_status": { "enum": ["production", "pilot", "pre_product", "stalled", "retired", "unknown"] }, "operator": { "type": "string", "maxLength": 300 }, "users": { "$ref": "#/$defs/text" }, "autonomy_level": { "type": "string", "maxLength": 300 }, "model_provider": { "type": "string", "maxLength": 300 }, "harness": { "type": "string", "maxLength": 300 }, "material_changes": { "$ref": "#/$defs/text" }, "action_surface": { "$ref": "#/$defs/actionSurface" }
      }
    },
    "authority": {
      "type": "object", "additionalProperties": false,
      "required": ["system_name", "category", "declared", "enforced", "observed", "limit", "enforcement_mechanism", "evidence_titles"],
      "properties": {
        "system_name": { "type": "string", "maxLength": 300 }, "category": { "enum": ["access", "decide", "spend", "promise", "publish", "change", "deploy", "transact", "physically_actuate"] }, "declared": { "$ref": "#/$defs/text" }, "enforced": { "$ref": "#/$defs/text" }, "observed": { "$ref": "#/$defs/text" }, "limit": { "type": "string", "maxLength": 300 }, "enforcement_mechanism": { "$ref": "#/$defs/text" }, "evidence_titles": { "$ref": "#/$defs/list" }
      }
    },
    "control": { "type": "object", "additionalProperties": false, "required": ["name", "type", "design", "enforcement", "owner"], "properties": { "name": { "type": "string", "maxLength": 300 }, "type": { "type": "string", "maxLength": 300 }, "design": { "$ref": "#/$defs/text" }, "enforcement": { "$ref": "#/$defs/text" }, "owner": { "type": "string", "maxLength": 300 } } },
    "event": { "type": "object", "additionalProperties": false, "required": ["kind", "description", "occurred_at", "consequence", "detection", "recovery"], "properties": { "kind": { "enum": ["incident", "near_miss", "blocked_action", "claim", "dispute", "none_known"] }, "description": { "$ref": "#/$defs/text" }, "occurred_at": { "type": "string", "maxLength": 64 }, "consequence": { "$ref": "#/$defs/text" }, "detection": { "$ref": "#/$defs/text" }, "recovery": { "$ref": "#/$defs/text" } } },
    "dataSystems": { "type": "object", "additionalProperties": false, "required": ["data_categories", "sources", "destinations", "credentials", "code", "customer_systems", "regulated_data", "retention", "model_reuse"], "properties": { "data_categories": { "$ref": "#/$defs/list" }, "sources": { "$ref": "#/$defs/list" }, "destinations": { "$ref": "#/$defs/list" }, "credentials": { "$ref": "#/$defs/list" }, "code": { "$ref": "#/$defs/list" }, "customer_systems": { "$ref": "#/$defs/list" }, "regulated_data": { "$ref": "#/$defs/list" }, "retention": { "$ref": "#/$defs/text" }, "model_reuse": { "$ref": "#/$defs/text" } } },
    "contracts": { "type": "object", "additionalProperties": false, "required": ["customer_obligations", "limitation_and_indemnity_facts", "third_party_dependencies", "responsibility_allocation", "required_limits"], "properties": { "customer_obligations": { "$ref": "#/$defs/text" }, "limitation_and_indemnity_facts": { "$ref": "#/$defs/text" }, "third_party_dependencies": { "$ref": "#/$defs/text" }, "responsibility_allocation": { "$ref": "#/$defs/text" }, "required_limits": { "$ref": "#/$defs/text" } } },
    "insurance": { "type": "object", "additionalProperties": false, "required": ["insurance_trigger", "current_broker", "current_coverage_facts", "renewal_date", "desired_review_purpose", "contractual_requirements"], "properties": { "insurance_trigger": { "$ref": "#/$defs/text" }, "current_broker": { "type": "string", "maxLength": 300 }, "current_coverage_facts": { "$ref": "#/$defs/text" }, "renewal_date": { "type": "string", "maxLength": 64 }, "desired_review_purpose": { "$ref": "#/$defs/text" }, "contractual_requirements": { "$ref": "#/$defs/text" } } },
    "evidence": { "type": "object", "additionalProperties": false, "required": ["title", "source_type", "source_date", "freshness", "confidence", "pointer", "notes"], "properties": { "title": { "type": "string", "maxLength": 300 }, "source_type": { "type": "string", "maxLength": 300 }, "source_date": { "type": "string", "maxLength": 64 }, "freshness": { "enum": ["current", "stale", "unknown"] }, "confidence": { "enum": ["confirmed", "estimated", "unknown", "unsupported", "stale", "conflicting"] }, "pointer": { "type": "string", "maxLength": 500 }, "notes": { "type": "string", "maxLength": 4000 } } },
    "review": { "type": "object", "additionalProperties": false, "required": ["unknowns", "authorized_to_provide", "acknowledges_non_advice", "intended_use"], "properties": { "unknowns": { "$ref": "#/$defs/list" }, "authorized_to_provide": { "type": "boolean" }, "acknowledges_non_advice": { "type": "boolean" }, "intended_use": { "$ref": "#/$defs/text" } } }
  }
}
