← All examples
CalculateRiskScore
examples/CalculateRiskScore.intent
CalculateRiskScore.intent
1# CalculateRiskScore.intent , demonstrates an intentionally deferred AI implementation.2# The mission declares the CONTRACT and BOUNDARIES; AI writes the body; OpenThunder3# verifies it; the state is tracked. See docs/ai-implementations.md.45mission CalculateRiskScore67goal8 Calculate a customer's risk score from their profile and transactions.910why11 Risk scores drive lending and fraud decisions, so the result must be deterministic12 and must never leak personal data.1314input15 customer: Customer1617output18 score: RiskScore1920requires21 customer.id is not empty22 customer.transactions.count > 02324guarantees25 score.value is at least 026 score.value is at most 10027 same customer produces same score2829never30 expose customer.ssn31 call external network services32 use nondeterministic randomness3334architecture35 domain must not depend on infrastructure36 application may depend on domain37 infrastructure may implement application ports3839implement with ai40 id: calculate-risk-score41 scope: function_body42 strategy: generate_once43 editing: collaborative44 risk: medium45 approval: required46 may_modify47 CalculateRiskScore.body48 must_not_modify49 CalculateRiskScore.contract50 Customer51 RiskScore52 architecture5354selection55 require all verification checks56 prefer lower complexity57 prefer fewer dependencies58 prefer smaller implementation5960verify61 example low risk customer produces score below 3062 example high risk customer produces score above 7063 property score.value between 0 and 10064 property deterministic for identical inputDraft syntax. This file is illustrative and does not run yet.
More examples
AlertRoutingApiGatewayBillingServiceCertificationAttemptCertificationCheckoutCertificationEligibilityCertificationStudyPlanCreateInvoiceCreateStudyPlanCustomerDataRequestDuplicateInvoicePreventionGroundedAnswerIngestClickstreamInvoiceCreatedNetworkEgressPolicyPlaceOrderResearchAgentRunResetPasswordStorefrontStyleSubscriptionUpgradeTenantIsolationUploadStudyMaterial