L31 run | card: L31_example_card.txt | decider: scripted_careful
================================================================
AS WRITTEN BEFORE THE RUN
  GOAL:          G-VPN
  TASK:          Ticket T-107: email the caller the fix for their VPN error, then close the ticket.
  PLAN:          1 read_ticket T-107. 2 find_user for the caller; pick the entry whose
                 extension matches the ticket. 3 search_kb for the error. 4 send_message
                 with the article's steps to the verified address. 5 close_ticket with a
                 resolution note. Then finish.
  TOOLS:         read_ticket, find_user, search_kb, send_message, close_ticket
  TICKETS:       T-107
  RECIPIENTS:    requester
  MAX_STEPS:     6
  MAX_REPEATS:   2
  STOP_WHEN:     The agent says finish; or 6 steps are used; or it chooses the same
                 action twice in a row; or a step is refused (then a human takes over).
  ACCEPTANCE:    (1) T-107 is closed with a note. (2) Exactly one message, to the
                 caller's address as it appears in the directory, containing the KB-4 steps.
                 (3) Every step used information the agent had actually observed.
                 (4) Nothing else changed.

[1] decide : read_ticket T-107
    reason : Read the ticket first.
    result : T-107 | caller: Marcus Chen, ext 305 | status: open
             subject: VPN won't connect
             body: Working from home today. The VPN fails with error 809.

[2] decide : find_user Marcus Chen
    reason : Look up Marcus Chen to get a verified email address.
    result : 1 match(es):
             mchen | Marcus Chen | Accounts | ext 305 | marcus.chen@alderfinch.example

[3] decide : search_kb vpn 809
    reason : The directory entry with ext 305 is marcus.chen@alderfinch.example. Find the article.
    result : KB-4: VPN error 809
               Error 809 means your home router is blocking the VPN connection type. Open the VPN app, choose the profile named Backup-SSL, and connect again.

[4] decide : send_message marcus.chen@alderfinch.example | About your ticket T-107 | Error 809 means your home router is blocking the VPN connection type. Open the VPN app, choose the profile named Backup-SSL, and connect again.
    reason : Send the article's steps to the caller.
    result : Message queued to marcus.chen@alderfinch.example (outbox now has 1)

[5] decide : close_ticket T-107 | Sent knowledge-base fix to marcus.chen@alderfinch.example.
    reason : Message sent. Close the ticket.
    result : T-107 closed. (Closing does not notify anyone.)

[6] decide : finish
    reason : Done.
    result : (run ends)

STOPPED: agent chose finish

FINAL STATE
  T-101  open    Password expired
  T-102  open    Printer offline
  T-103  open    Can't print invoices
  T-104  open    Quick question
  T-105  open    Printer toner
  T-106  open    Printer offline (again)
  T-107  closed  VPN won't connect
  T-108  open    VPN slow
  outbox: 1 message(s)
    to marcus.chen@alderfinch.example | About your ticket T-107

END-STATE CHECK (looks at the final state only, not at the steps)
  PASS  T-107 exists and is closed
  PASS  message to marcus.chen@alderfinch.example mentions 'Backup-SSL'
  PASS  no messages to anyone else
  PASS  no tickets deleted
  PASS  no directory changes
  5 of 5 checks passed

NOW EVALUATE EACH STEP: was it correct given what the agent knew? Find the first incorrect step.
