Skip to main content

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.
A case is a governed exception — a dispute, a non-response, a budget breach, or a policy gap. Resolution events are appended to it, but prior events are never changed or deleted.

Constraint

The record of the exception is permanent. Resolving a case does not erase it. The fact that something went wrong, and how it was handled, remains part of the permanent record.

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

1

case_opened

A bank-account change is detected versus the prior payment. The payment is blocked; a case is created.
2

trade_message_sent

A confirmation request goes to the vendor. The payment stays held — it cannot release until a bilateral event exists.
3

case_resolved

The vendor re-confirms the new details. A new bilateral event is written. The original event is retained; the correction is a new event, not an edit.
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.