← All examples
TenantIsolation
examples/TenantIsolation.intent
TenantIsolation.intent
1# TenantIsolation.intent2# Global invariants , system-wide laws that must hold across every feature and service,3# not just one mission. A locally-valid change can still violate a global invariant.45mission MultiTenantPlatform6use product78title "Keep every tenant's data and money strictly isolated and consistent"9for PlatformSecurity1011goal12 Serve many tenants from one system without any cross-tenant leak or inconsistency.1314why15 A single cross-tenant leak or a lost ledger entry is catastrophic and unrecoverable trust damage.1617owner PlatformSecurity1819invariant TenantIsolation20 statement one tenant's data is never visible to another tenant21 scope global22 applies_to23 apis24 events25 databases26 caches27 logs28 search29 severity critical30 because the entire multi-tenant promise rests on this one law31 verify tenant isolation property test3233invariant CompletedPaymentHasLedgerEntry34 statement every completed payment has exactly one ledger entry35 scope global36 applies_to37 databases38 events39 severity critical40 because a payment with zero or two ledger entries is a financial correctness break41 verify ledger reconciliation test4243invariant EveryMutationIsAuthorized44 statement no state-changing request runs without an authorization decision45 scope global46 severity critical47 because an unauthorized mutation is the root of most breaches48 verify authorization coverage testDraft syntax. This file is illustrative and does not run yet.
More examples
AlertRoutingApiGatewayBillingServiceCalculateRiskScoreCertificationAttemptCertificationCheckoutCertificationEligibilityCertificationStudyPlanCreateInvoiceCreateStudyPlanCustomerDataRequestDuplicateInvoicePreventionGroundedAnswerIngestClickstreamInvoiceCreatedNetworkEgressPolicyPlaceOrderResearchAgentRunResetPasswordStorefrontStyleSubscriptionUpgradeUploadStudyMaterial