Build just this flow: a quote arrives, a scorecard fans out to automated risk assessors (parallel scoring modules — wildfire, flood, prior loss…), and an underwriter decides accept/refer/decline. Advance the maturity stage to add the scorecard, then the event-sourced audit + AI, 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.
QuoteRequested from the bus (deduped on event_id) and writes a submission row to its own Cloud SQL.scorecard_result row.uw_decision log on WORM storage (tamper-evident), stamped with the model + rule + product_version so it's reconstructable for regulators.outbox row; the relay publishes DecisionMade(accept|refer|decline) to the bus.accept, Pricing's subscription picks it up next. The decision + eventual outcome (access-controlled, personal data removed) is also written to the decision_log/rag_document store and embedded into pgvector, so the agent learns from real decisions.| Direction | Contract | Who |
|---|---|---|
| Consumes | QuoteRequested, ProductVersionPublished, peril scores | Customer, Product, Cat-model |
| Emits | DecisionMade {accept/refer/decline, actor} | Pricing, Case, RAG |