{
  "decision": {
    "name": "Example \u00b7 Travel delay claim",
    "inputs": {
      "delay_hours": {
        "type": "number >= 0",
        "desc": "Whole hours of flight delay",
        "from": "claim JSON"
      },
      "delay_minutes_part": {
        "type": "number [0..59]",
        "desc": "Remaining minutes after the whole delay hours",
        "from": "claim JSON"
      },
      "meal_receipts": {
        "type": "number >= 0",
        "desc": "Total meal receipts in EUR",
        "from": "claim JSON"
      },
      "hotel_receipts": {
        "type": "number >= 0",
        "desc": "Total hotel receipts in EUR",
        "from": "claim JSON"
      },
      "cause": {
        "type": "weather|strike|technical|other",
        "desc": "Cause of the flight delay",
        "from": "Jev",
        "options": {
          "weather": "weather",
          "strike": "strike",
          "technical": "technical",
          "other": "other"
        }
      },
      "tier": {
        "type": "standard|silver|gold",
        "desc": "Traveller loyalty tier",
        "from": "claim JSON",
        "options": {
          "standard": "standard",
          "silver": "silver",
          "gold": "gold"
        }
      },
      "travel_date": {
        "type": "date",
        "desc": "Travel date",
        "from": "claim JSON"
      },
      "claimed_on": {
        "type": "date",
        "desc": "Claim submission date",
        "from": "claim JSON"
      },
      "overnight_probability": {
        "type": "number [0..1]",
        "desc": "Jev probability: Did the delay require an overnight stay?",
        "from": "Jev"
      }
    },
    "decisions": {
      "evidence_threshold": {
        "type": "number [0..1]",
        "desc": "Minimum Jev probability required to establish an affirmative fact",
        "expr": "0.8"
      },
      "delay_minutes": {
        "type": "number",
        "desc": "Flight delay in minutes",
        "expr": "delay_hours * 60 + delay_minutes_part"
      },
      "claim_age_days": {
        "type": "number",
        "desc": "Days from travel to claim",
        "expr": "(claimed_on - travel_date).days"
      },
      "covered": {
        "type": "boolean",
        "desc": "Is the claim covered?",
        "table": [
          [
            "cause",
            "claim_age_days",
            "=> boolean",
            "# why"
          ],
          [
            "strike",
            "-",
            "false",
            "Strikes are excluded from this demo policy."
          ],
          [
            "-",
            "> 30",
            "false",
            "Claim submitted after the 30-day window."
          ],
          [
            "-",
            "< 0",
            "false",
            "Claim date is before travel."
          ],
          [
            "-",
            "-",
            "true",
            "Weather, technical and other delays are covered within 30 days."
          ]
        ]
      },
      "meal_band_cap": {
        "type": "number",
        "desc": "Meal cap before tier adjustment in EUR",
        "table": [
          [
            "delay_minutes",
            "=> number",
            "# why"
          ],
          [
            "< 120",
            "0",
            "Meals start at 2 hours of delay."
          ],
          [
            "< 240",
            "20",
            "Meal cap EUR 20 for 2 to under 4 hours."
          ],
          [
            "< 480",
            "30",
            "Meal cap EUR 30 for 4 to under 8 hours."
          ],
          [
            "-",
            "50",
            "Meal cap EUR 50 from 8 hours."
          ]
        ]
      },
      "tier_bonus": {
        "type": "number",
        "desc": "Tier meal-cap addition in EUR",
        "table": [
          [
            "tier",
            "=> number",
            "# why"
          ],
          [
            "gold",
            "10",
            "Gold tier adds EUR 10 to the meal cap."
          ],
          [
            "silver",
            "5",
            "Silver tier adds EUR 5 to the meal cap."
          ],
          [
            "-",
            "0",
            "Standard tier uses the base cap."
          ]
        ]
      },
      "meal_cap": {
        "type": "number",
        "desc": "Applicable meal cap in EUR",
        "expr": "if meal_band_cap = 0 then 0 else meal_band_cap + tier_bonus"
      },
      "meals_paid": {
        "type": "number",
        "desc": "Meals reimbursed in EUR",
        "expr": "if not(covered) then 0 else if meal_receipts < meal_cap then meal_receipts else meal_cap"
      },
      "hotel_cap": {
        "type": "number",
        "desc": "Hotel reimbursement cap in EUR",
        "table": [
          [
            "covered",
            "delay_minutes",
            "overnight",
            "=> number",
            "# why"
          ],
          [
            "false",
            "-",
            "-",
            "0",
            "This claim is excluded."
          ],
          [
            "-",
            "< 480",
            "-",
            "0",
            "Hotel not covered below 8 hours; coverage starts at 8 hours."
          ],
          [
            "-",
            "-",
            "false",
            "0",
            "Hotel coverage requires an overnight stay."
          ],
          [
            "-",
            "-",
            "-",
            "150",
            "Overnight hotel cap is EUR 150 from 8 hours."
          ]
        ]
      },
      "hotel_paid": {
        "type": "number",
        "desc": "Hotel reimbursed in EUR",
        "expr": "if hotel_receipts < hotel_cap then hotel_receipts else hotel_cap"
      },
      "payout": {
        "type": "number",
        "desc": "Total travel-delay payout in EUR",
        "expr": "meals_paid + hotel_paid"
      },
      "overnight": {
        "type": "boolean",
        "desc": "Did the delay require an overnight stay?",
        "expr": "overnight_probability >= evidence_threshold"
      }
    }
  },
  "state": {
    "delay_hours": 5,
    "delay_minutes_part": 40,
    "meal_receipts": 38,
    "hotel_receipts": 120,
    "tier": "silver",
    "travel_date": "2026-09-15",
    "claimed_on": "2026-09-18",
    "incident_report": "Flight delayed due to weather. No overnight stay was required."
  },
  "questions": {
    "cause": {
      "type": "choice",
      "instructions": "Classify the cause of the flight delay from incident_report. Do not apply coverage rules or calculate payment.",
      "criteria": {
        "weather": "The report attributes the delay to weather.",
        "strike": "The report attributes the delay to a strike or industrial action.",
        "technical": "The report attributes the delay to a technical or equipment fault.",
        "other": "The report explicitly identifies another cause."
      }
    },
    "overnight_probability": {
      "type": "noul",
      "instructions": "Does incident_report explicitly say that the delay required an overnight stay? A hotel receipt alone does not establish this fact.",
      "criteria": {
        "true": "The report confirms an overnight stay was necessary because of the delay.",
        "false": "The traveller did not need an overnight stay."
      }
    }
  }
}
