[
  {
    "kind": "trigger",
    "title": "New invoice in the inbox",
    "body": "Watches the AP inbox and the drive drop folder, running in the cloud as long as the backlog takes."
  },
  {
    "kind": "shell",
    "title": "Parse the PDF",
    "body": "Extract raw text and line items from each invoice file."
  },
  {
    "kind": "prompt",
    "title": "Run two independent passes",
    "body": "Two sub-agents extract vendor, amount, PO, and line items separately."
  },
  {
    "kind": "prompt",
    "title": "Reconcile the passes",
    "body": "Compare field by field; anything that disagrees is a mismatch."
  },
  {
    "kind": "prompt",
    "title": "Match the PO",
    "body": "Check the reconciled invoice against the open PO in the ledger sheet."
  },
  {
    "kind": "result",
    "title": "Post or queue",
    "body": "Clean matches post to the ledger; mismatches queue for review."
  }
]