Examples
See how intent reads before any code is written.
Each example is a self-contained mission. Read it top to bottom, that is the point, and many now run: decisions evaluate, lifecycles simulate, and in-file tests pass through the deterministic compiler.
Example files
Browse the .intent files.
Every example here is compiler-valid (CI gates it). Runnable ones also execute end to end with intent test.
AlertRouting
RunnableAlertRouting.intent
Open →ApiGateway
RunnableApiGateway.intent
Open →BillingService
Compiler-validBillingService.intent
Open →CalculateRiskScore
Compiler-validCalculateRiskScore.intent
Open →CertificationAttempt
Compiler-validCertificationAttempt.intent
Open →CertificationCheckout
Compiler-validCertificationCheckout.intent
Open →CertificationEligibility
Compiler-validCertificationEligibility.intent
Open →CertificationStudyPlan
Compiler-validCertificationStudyPlan.intent
Open →CreateInvoice
Compiler-validCreateInvoice.intent
Open →CreateStudyPlan
Compiler-validCreateStudyPlan.intent
Open →CustomerDataRequest
RunnableCustomerDataRequest.intent
Open →DuplicateInvoicePrevention
RunnableDuplicateInvoicePrevention.intent
Open →GroundedAnswer
RunnableGroundedAnswer.intent
Open →IngestClickstream
RunnableIngestClickstream.intent
Open →InvoiceCreated
Compiler-validInvoiceCreated.intent
Open →NetworkEgressPolicy
RunnableNetworkEgressPolicy.intent
Open →PlaceOrder
RunnablePlaceOrder.intent
Open →ResearchAgentRun
RunnableResearchAgentRun.intent
Open →ResetPassword
RunnableResetPassword.intent
Open →StorefrontStyle
Compiler-validStorefrontStyle.intent
Open →SubscriptionUpgrade
RunnableSubscriptionUpgrade.intent
Open →TenantIsolation
Compiler-validTenantIsolation.intent
Open →UploadStudyMaterial
Compiler-validUploadStudyMaterial.intent
Open →A complete mission
The canonical CreateInvoice mission: a goal, its inputs and outputs, the guarantees that must always hold, forbidden behavior, targets, and how it is verified.
1mission CreateInvoice23goal4 Generate an invoice from approved orders56why7 Customers need accurate invoices that are auditable and never duplicated.89requires10 Customer11 ApprovedOrders1213input14 customer: Customer15 orders: List<Order>16 idempotencyKey: IdempotencyKey1718output19 invoice: Invoice2021guarantees22 invoice.total is never negative23 duplicate invoices are not created24 every invoice is auditable2526never27 create invoice for unapproved order28 expose payment token in logs2930target31 TypeScript32 DotNet33 OpenAPI34 Tests35 Markdown36 Mermaid3738verify39 unit tests40 duplicate prevention test41 audit trail test42 security scanThree layers
One mission, three levels of precision.
The same ResetPassword mission, written from beginner-friendly human intent down to compiler-ready executable intent.
Human Intent
Readable and structured. Anyone on the team, or an AI agent, can follow it on first read.
1mission ResetPassword23goal4 Let a user securely reset their password56requires7 verified email8 reset token910guarantees11 token expires after 15 minutes12 token can only be used once13 password is never loggedTyped Intent
A precise engineering mode with semantic types and explicit constraints.
1mission ResetPassword23input4 email: Email5 token: ResetToken6 newPassword: Secret78output9 result: PasswordResetResult1011constraints12 token.ttl <= 15 minutes13 password.minLength >= 121415never16 log(newPassword)17 return tokenExecutable Intent
Compiler-ready mode that names a target, its implementation choices, and the checks to run.
1mission ResetPassword23target4 DotNet56style7 ASP.NET Core8 EntityFramework9 BCrypt1011verify12 test token expiration13 test one time use14 test password hash stored15 test raw password not loggedBeyond a single function
IntentLang for whole systems.
IntentLang is architecture aware. Services, APIs, events, and tests are all first-class, so the meaning of a system lives in one place.
Architecture as code
IntentLang understands services: what they own, consume, and publish, their data store, and who owns them.
1service BillingService23owns4 Invoice5 PaymentAttempt67consumes8 OrderApproved910publishes11 InvoiceCreated1213database14 Postgres1516owner17 Finance Platform TeamAPI intent
Method, path, required permissions, inputs, outputs, and the errors an endpoint can return.
1api CreateInvoice23method4 POST56path7 /invoices89requires10 authenticated user11 permission invoice:create1213input14 CreateInvoiceRequest1516output17 InvoiceResponse1819errors20 400 InvalidOrder21 401 Unauthorized22 409 DuplicateInvoiceEvent intent
Who publishes an event, who consumes it, its payload, and the guarantees it must uphold.
1event InvoiceCreated23publishedBy4 BillingService56consumedBy7 NotificationService8 ReportingService910payload11 invoiceId: InvoiceId12 customerId: CustomerId13 total: Money1415guarantees16 event is idempotent17 event contains no payment secretsBehavior-first tests
Given, When, Then. Tests describe behavior in the same language as the intent they verify.
1test DuplicateInvoicePrevention23given4 approved order already invoiced56when7 CreateInvoice runs again89then10 no duplicate invoice is created11 existing invoice is returnedWant to try writing intent?
The playground is a preview where you can sketch missions today. Execution and compilation are coming later.