← 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 randomness3334implement with ai35 id: calculate-risk-score36 scope: function_body37 strategy: generate_once38 editing: collaborative39 risk: medium40 approval: required41 may_modify42 CalculateRiskScore.body43 must_not_modify44 CalculateRiskScore.contract45 Customer46 RiskScore47 architecture4849verify50 example low risk customer produces score below 3051 example high risk customer produces score above 7052 property score.value between 0 and 10053 property deterministic for identical inputDraft syntax. This file is illustrative and does not run yet.