Demo Scenarios
The demo includes 9 scenarios covering every cell in the airline booking policy matrix.
Running
Section titled “Running”make demomake demo-stepPress Enter between each stage.
make scenario-1Cancellation Matrix
Section titled “Cancellation Matrix”| # | Member | Insurance | Expected | Command |
|---|---|---|---|---|
| 1 | Regular | No | DENY | make scenario-1 |
| 2 | Regular | Yes | ALLOW | make scenario-2 |
| 3 | Silver | No | DENY | make scenario-3 |
| 4 | Silver | Yes | ALLOW | make scenario-4 |
| 5 | Gold | No | ALLOW | make scenario-5 |
Scenario 1: Regular + no insurance
Section titled “Scenario 1: Regular + no insurance”John Doe (regular member) tries to cancel reservation RKLA42 which has no travel insurance.
The policy denies cancel_reservation.
The agent explains that insurance is required
for non-gold members.
Scenario 5: Gold + no insurance
Section titled “Scenario 5: Gold + no insurance”Emma Kim (gold member) cancels without insurance. The policy allows it — gold overrides the insurance requirement.
Modification Matrix
Section titled “Modification Matrix”| # | Member | Cabin | Expected | Command |
|---|---|---|---|---|
| 6 | Regular | Basic economy | DENY | make scenario-6 |
| 7 | Silver | Basic economy | ALLOW | make scenario-7 |
| 8 | Regular | Economy | ALLOW | make scenario-8 |
| 9 | Gold | Basic economy | ALLOW | make scenario-9 |
Scenario 6: Regular + basic economy
Section titled “Scenario 6: Regular + basic economy”John Doe tries to change flights on a basic
economy reservation. The policy denies
update_reservation_flights — regular members
cannot modify basic economy.
Experiment: Edit the Policy
Section titled “Experiment: Edit the Policy”Try modifying the policy and re-running:
# Edit policy_english.md (e.g., remove insurance requirement)make translate # ~5-10 minutesmake upload-compiledmake demo # See the new rules in actionOr edit the Datalog directly:
# Edit policy.dlmake uploadmake scenario-1 # Check the change