Documentation Index
Fetch the complete documentation index at: https://docs.cast.digitalfinancehq.com/llms.txt
Use this file to discover all available pages before exploring further.
primitive.case — the fifth primitive, for everything that does not go to plan.Constraint
Why exceptions are first-class
In most systems, exceptions live outside the model — in an inbox, a spreadsheet, a side conversation. That is exactly where audit trails go to die. CAST treats the exception as a governed object with its own lifecycle, so the unusual path is as inspectable as the happy path.Example lifecycle
case_opened
A bank-account change is detected versus the prior payment. The payment is blocked; a case is created.
trade_message_sent
A confirmation request goes to the vendor. The payment stays held — it cannot release until a bilateral event exists.
Because a case is built from events, its resolution is itself provable. “This dispute was raised at this time, handled this way, and closed under this policy version” is a verifiable statement, not a recollection.