chrismdp / counting-house-live

Fernwick Air: a live contact, rebook after a missed connection

Public ·
Version 2 of 2
  1. #2 · chrismdp · · 0.6ShowingLatest
  2. #1 · chrismdp · · 0.6
Fork

workflow.yaml

workflow.yaml is AWML 0.6, as it was pushed. The registry draws, checks and fits it converted to AWML 0.8.

awml: "0.6"
title: "Fernwick Air: a live contact, rebook after a missed connection"
description: |
  The live contact at tier transact. A gateway tokenises the customer's message, the clerk replies
  under the policy row's sign-off and proposes a write intent, and the orchestrator re-checks it
  against the live booking system and runs the rebooking as a saga. Refusals go to the exception
  queue with a reason code. Each closed case is tokenised for scoring. Fernwick Air is fictional.
scopes:
  - { id: tokenised, label: "tokenised: Fernwick staff", processing: { anthropic: any } }
  - { id: ops, label: "ops: Fernwick staff", processing: none, in: tokenised }
parts:
  - { id: asks, kind: trigger, label: "A customer writes in: rebook me after a missed connection", wait: PT1H, untrusted: true }
  - { id: contact, kind: connector, label: "Fernwick's contact centre: email and chat", in: ops, untrusted: true }
  - { id: bookings, kind: connector, label: "Fernwick's booking system, live", in: ops }
  - { id: tokenise, kind: code, op: bring-in, label: "PII gateway: swap names, booking references and contact details for tokens", in: ops }
  - { id: vault, kind: context, label: "The PII vault: the real value behind each token", in: ops }
  - { id: case, kind: context, label: "The tokenised case", in: tokenised }
  - { id: policy_table, kind: context, label: "The policy table: each intent's model, tier, SOP, tools and approvers", in: tokenised, ref: chrismdp/counting-house-promotion#policy_table }
  - { id: flights, kind: connector, label: "Flight status and seats, read only, through the MCP gateway", in: tokenised }
  - { id: clerk, kind: ai, op: draft, label: "The clerk drafts a reply and a write intent for the rebooking", in: tokenised }
  - { id: answer, kind: context, label: "The clerk's answer", in: tokenised }
  - { id: send, kind: code, op: do, label: "PII gateway: swap the real values back into the clerk's reply and send it", in: ops }
  - { id: policy, kind: approval, label: "CX and legal's standing approval: replies on this intent only, risk accepted on the October scored set (judge-graded exam above the human baseline)", in: ops }
  - { id: reply, kind: outside, label: "Reply to the customer: Ask", in: ops }
  - { id: sent_list, kind: surface, label: "Each reply the clerk sent, for QA to sample", in: ops }
  - { id: eligible, kind: code, op: check, label: "Orchestrator: pass on only the write intent's booking reference and new flight, once they match its schema and the live booking system shows the booking is this customer's, the connection was missed and the seat is free", in: ops, cleans: true }
  - { id: file, kind: code, op: do, label: "Orchestrator: file the refusal with its reason code", in: ops }
  - { id: queue, kind: context, label: "The exception queue: each refusal with its reason code and booking reference", in: ops }
  - { id: execute, kind: code, op: do, label: "Orchestrator: run the rebooking saga once per idempotency key, reading back each write and undoing every step if one fails", in: ops }
  - { id: cap, kind: approval, label: "Customer ops' standing approval: same-cabin rebookings, fare difference up to 200 pounds each", in: ops }
  - { id: approved_list, kind: surface, label: "Each rebooking made under the cap, with how to undo it", in: ops }
  - { id: supervisor, kind: review, label: "A supervisor's yes to the exact rebooking, over the cap", in: ops }
  - { id: rebook, kind: outside, label: "Rebook the passenger: Ask", in: ops }
  - { id: tokenise_out, kind: code, op: bring-in, label: "PII gateway: tokenise the closed case", in: ops }
  - { id: closed, kind: context, label: "Closed cases, tokenised: what was asked, what the clerk answered, what was sent and done", in: tokenised }
  - { id: itinerary, kind: comment, label: "The new itinerary goes to the customer from the booking system when the ticket is reissued, as one of the saga's steps" }
lines:
  - { from: asks, to: tokenise, kind: start }
  - { from: contact, to: tokenise, kind: data, label: the message }
  - { from: tokenise, to: vault, kind: data }
  - { from: tokenise, to: case, kind: data, label: "tokens only, under Fernwick's data rule" }
  - { from: tokenise, to: clerk, kind: start }
  - { from: case, to: clerk, kind: data }
  - { from: policy_table, to: clerk, kind: data, label: the intent's row }
  - { from: flights, to: clerk, kind: data }
  - { from: clerk, to: answer, kind: data }
  - { from: clerk, to: send, kind: start }
  - { from: answer, to: send, kind: data }
  - { from: vault, to: send, kind: data }
  - { from: send, to: policy, kind: start }
  - { from: policy, to: reply, kind: data, label: "[within the policy row]" }
  - { from: policy, to: sent_list, kind: data, label: each reply sent }
  - { from: reply, to: contact, kind: data }
  - { from: clerk, to: eligible, kind: start }
  - { from: answer, to: eligible, kind: data, label: the write intent }
  - { from: vault, to: eligible, kind: data }
  - { from: bookings, to: eligible, kind: data }
  - { from: policy_table, to: eligible, kind: data, label: the cap }
  - { from: eligible, to: file, kind: start, label: "[refused] the reason code" }
  - { from: file, to: queue, kind: data }
  - { from: eligible, to: execute, kind: start, label: "[eligible]" }
  - { from: execute, to: cap, kind: start, label: "[under the cap]" }
  - { from: cap, to: rebook, kind: data, label: "[within limits]" }
  - { from: cap, to: approved_list, kind: data, label: "each rebooking, with how to undo it" }
  - { from: execute, to: supervisor, kind: start, label: "[over the cap]" }
  - { from: supervisor, to: rebook, kind: data, label: "[yes]" }
  - { from: rebook, to: bookings, kind: data }
  - { from: execute, to: tokenise_out, kind: start }
  - { from: answer, to: tokenise_out, kind: data }
  - { from: contact, to: tokenise_out, kind: data, label: the reply sent }
  - { from: bookings, to: tokenise_out, kind: data, label: the rebooking made }
  - { from: vault, to: tokenise_out, kind: data }
  - { from: tokenise_out, to: closed, kind: data, label: "tokens only, under Fernwick's data rule" }
  - { from: rebook, to: itinerary, kind: tie }