بنقرة واحدة
flexibility-analysis
// Use when deciding between flexible and non-refundable tickets, or when travel plans might change. Triggers on refundable vs non-refundable, cancel risk, change fee, should I buy flexible ticket.
// Use when deciding between flexible and non-refundable tickets, or when travel plans might change. Triggers on refundable vs non-refundable, cancel risk, change fee, should I buy flexible ticket.
Use when planning flights, comparing ticket prices, or asking about flight costs, airline fees, travel dates, or route options. Triggers on booking flights, cheap tickets, flight search, vé máy bay, săn vé rẻ, tối ưu chi phí bay, đặt vé, virtual interlining, or any flight-related cost question.
Use when traveler has flexible dates and wants to find the cheapest departure/return combination. Triggers on cheapest day to fly, flexible dates, when to book, price calendar.
Use when looking for airline promo codes, flash sales, or credit card discounts before booking. Triggers on promo code, discount, sale, deal, coupon, cashback, loyalty discount.
Use when advertised flight price seems too good, or when comparing LCC vs legacy carrier total costs. Triggers on hidden fees, baggage cost, true price, real cost, checkout surprise.
Use when searching for flights, comparing airlines, or finding virtual interlining combinations across multiple carriers. Triggers on find flights, search routes, compare airlines, best price.
Use when user explicitly asks about hidden city ticketing, skiplagging, or throwaway ticketing. Requires explicit consent before analysis. Triggers on hidden city, skiplag, get off at layover.
| name | flexibility-analysis |
| description | Use when deciding between flexible and non-refundable tickets, or when travel plans might change. Triggers on refundable vs non-refundable, cancel risk, change fee, should I buy flexible ticket. |
Prevent the "$150 savings that costs $720" scenario. When travelers buy non-refundable tickets to save money, they're making an implicit bet that their plans won't change. This skill makes that bet explicit with break-even probability analysis.
flight_options[] with fare classes from flight-searchrisk_tolerance from profileschedule_certainty (user estimate: "How sure are you this trip happens as planned?")
Calculate based on fare rules:
flex_score = change_score (0-30)
+ cancel_score (0-30)
+ rebooking_score (0-20)
+ protection_score (0-20)
Change Score (0-30):
Cancel Score (0-30):
Rebooking Score (0-20):
Protection Score (0-20):
For each option, calculate cost under 3 scenarios:
| Scenario | What Happens | Cost |
|---|---|---|
| As planned | Nothing changes | ticket_price |
| Date change ±2 days | Need to shift by 2 days | change_fee + fare_diff_estimate |
| Full cancellation | Trip doesn't happen | ticket_price - refund_amount |
| No-show | Miss the flight | ticket_price (total loss) |
Present as table:
SCENARIO COSTING: HAN → SFO
Saver ($750) Flex ($920) Refundable ($1,100)
As planned $750 $920 $1,100
Change ±2 days $750+$100+diff $920+$0+diff $1,100+$0+diff
Full cancel $750 → $0 lost $920 → $750 credit $1,100 → $1,050 refund
No-show $750 lost $920 lost** $1,100 → $900 credit**
** Some airlines forfeit no-show even on flex tickets
The key calculation: "At what probability of needing to change does the flexible ticket become the better deal?"
Formula:
premium = flex_price - saver_price
loss_if_cancel = saver_price - saver_refund
break_even_probability = premium / loss_if_cancel × 100
Example:
Saver: $750 (refund: $0)
Flex: $920 (refund: $750 credit)
Premium: $920 - $750 = $170
Loss if cancel saver: $750 - $0 = $750
Break-even: $170 / $750 = 22.7%
→ If there's more than a 23% chance your plans change,
the Flex ticket is the smarter financial decision.
Flag terms that travelers often miss:
Based on break-even analysis + user's schedule_certainty:
FLEXIBILITY RECOMMENDATION:
Your schedule certainty: 75% (uncertain)
Break-even probability: 23%
Your implied change probability: 25% (100% - 75%)
Since 25% > 23% → BUY THE FLEX TICKET ($920)
Expected cost calculation:
Saver: 75% × $750 + 25% × $750(lost) = $750 guaranteed, but
risk-adjusted: $750 + 25% × $750 = $938 expected cost
Flex: $920 guaranteed, with $750 credit if canceled
risk-adjusted: 75% × $920 + 25% × $170 = $733 expected cost
Flex ticket saves you $205 in expected value.
FLEXIBILITY SCORECARD
Option Price Flex Score Break-even Recommendation
Saver Economy $750 15/100 - Only if 95%+ certain
Flex Economy $920 65/100 23% ✅ Best for your profile
Full Refundable $1,100 95/100 47% Only if < 53% certain
Business Flex $2,400 90/100 N/A Overkill for this trip
Read references/fare-class-rules.md for airline-specific fare class breakdown.