← All examples
CreateInvoice
examples/CreateInvoice.intent
CreateInvoice.intent
1# CreateInvoice.intent2# Draft IntentLang (v0). Illustrative only; there is no compiler yet.34mission CreateInvoice56goal7 Generate an invoice from approved orders89why10 Customers need accurate invoices that are auditable and never duplicated.1112requires13 Customer14 ApprovedOrders1516input17 customer: Customer18 orders: List<Order>19 idempotencyKey: IdempotencyKey2021output22 invoice: Invoice2324guarantees25 invoice.total is never negative26 duplicate invoices are not created27 every invoice is auditable2829guarantee duplicate invoices are not created30 because duplicate billing damages customer trust31 verify duplicate prevention test3233never34 create invoice for unapproved order35 expose payment token in logs3637never expose payment token in logs38 because logs may be visible to support and observability tools39 verify security scan4041target42 TypeScript43 DotNet44 OpenAPI45 Tests46 Markdown47 Mermaid4849style50 CleanArchitecture51 CQRS5253verify54 unit tests55 duplicate prevention test56 audit trail test57 security scanDraft syntax. This file is illustrative and does not run yet.
More examples