{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.vraimony.com/data/diagnostic/case-diagnostic.schema.v1.json",
  "title": "Vraimony Case Diagnostic Schema v1",
  "type": "object",
  "required": [
    "case_type",
    "reason_code",
    "signals"
  ],
  "properties": {
    "case_type": {
      "type": "string",
      "enum": [
        "chargeback",
        "delivery_denial",
        "vendor_review",
        "handover_dispute",
        "refund_dispute"
      ]
    },
    "reason_code": {
      "type": "string"
    },
    "deadline_days_left": {
      "type": "number"
    },
    "signals": {
      "type": "object",
      "properties": {
        "has_order_id": {
          "type": "boolean"
        },
        "has_payment_proof": {
          "type": "boolean"
        },
        "identity_linked": {
          "type": "boolean"
        },
        "has_timeline": {
          "type": "boolean"
        },
        "timeline_gap_days": {
          "type": "number"
        },
        "critical_events_missing": {
          "type": "integer"
        },
        "has_tracking": {
          "type": "boolean"
        },
        "has_delivery_confirmation": {
          "type": "boolean"
        },
        "order_tracking_linked": {
          "type": "boolean"
        },
        "attachment_count": {
          "type": "integer"
        },
        "channel_count": {
          "type": "integer"
        },
        "has_evidence_map": {
          "type": "boolean"
        },
        "has_summary": {
          "type": "boolean"
        },
        "has_decision_ask": {
          "type": "boolean"
        },
        "has_acknowledgment": {
          "type": "boolean"
        },
        "policy_relevance_score": {
          "type": "number"
        },
        "has_contradiction": {
          "type": "boolean"
        },
        "contradiction_count": {
          "type": "integer"
        },
        "missing_critical_count": {
          "type": "integer"
        },
        "claim_scope_unclear": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": true
}