Build just this flow: take an accepted risk, rate it, and freeze the premium into a write-once ledger at bind. Advance the maturity stage to add the rate warehouse (a BigQuery store of rate & loss models), then the write-once ledger + billing, then scale.
Every cross-flow arrow is the same async handoff — no flow calls another directly. 1. The sending flow commits its data row plus an outbox row in one transaction. 2. A relay publishes the event to the event bus (Pub/Sub on GCP · EventBridge→SQS on AWS). 3. The bus's push-subscription POSTs it to the receiving flow's Cloud Run API, which processes it idempotently (duplicates ignored, deduped on event_id). Synchronous reads (e.g. getProductVersion) are plain request/response.
uw_decision row (append-only) and an outbox row carrying DecisionMade(accept).DecisionMade to the event bus; Pricing's subscription delivers it by POSTing to the Pricing API (Cloud Run) — async, deduped on event_id so a redelivery can't double-rate.quote row with the exact factors used.ledger (write-once); later endorsements/refunds append deltas (change records), never edit the original.outbox row, so MarkedAsSold {policy_id, premium snapshot} publishes exactly once, atomically (as one all-or-nothing operation) with the commit; BillingInvoiceRequested goes to billing.MarkedAsSold — the sold case moves on without Pricing ever waiting.| Direction | Contract | Who |
|---|---|---|
| Consumes | DecisionMade(accept); product + rate versions (read) | Underwriting, Product |
| Emits | MarkedAsSold {premium snapshot}, BillingInvoiceRequested | Case, Billing (external) |