Quickstart
The fastest way to understand AXON is to watch it say no.
Install
cargo install axon-langOne binary,
axon. It needs a C compiler on the host (the cryptographic and tokenizer kernels are C23); on Windows, MSVC satisfies that.Write a program that carries regulated data
type PatientRecord compliance [HIPAA, GDPR] { ssn: String }shield PHIShield { scan: [pii_leak] on_breach: halt severity: criticalcompliance: [HIPAA, GDPR] }axonendpoint Api { method: POST path: "/p" body: PatientRecordexecute: F output: FlowEnvelope<PatientRecord> shield: PHIShieldbackend: anthropic compliance: [HIPAA, GDPR] }flow F(ssn: String) -> PatientRecord {step R { ask: "summarize" output: PatientRecord } }Save it as
app.axon. Four declarations: a type that carries two regulatory classes, a shield that covers them, an endpoint that crosses a trust boundary, and a flow that does the cognitive work.Check it
axon check app.axon # compile-time compliance verificationaxon dossier app.axon # regulatory posture, as JSONaxon audit app.axon --framework all # per-framework gap analysisaxon checkexits0. The endpoint carriesPatientRecord, whose classes are{HIPAA, GDPR}, andPHIShieldcovers both.Now break it
Delete
shield: PHIShieldfrom the endpoint and check again:X app.axon 1 error(s)error [line 4]: axon-T957 axonendpoint 'Api' carries regulated data(kappa = {GDPR, HIPAA}) across a trust boundary but declares no `shield:`.Regulated boundaries require a shield whose `compliance:` covers the type'skappa — the ESK coverage rule. […] Declaring the classes on theendpoint's own `compliance:` does NOT cover them: that list is a label,the shield is the control that acts on a breach.axon checkexits1.
Why that matters
That failure is a type error, not a lint warning. Nothing downstream builds.
And the rule is a real set difference over the regulatory classes carried by the
boundary's body: and output: types — so a shield that covers some of them
fails too, naming exactly the ones it misses. It is not a presence check on a
label.
The typo cannot save you either
The regulatory vocabulary is closed (axon-T1214). compliance: [HIPPA] does
not compile — it is refused with the suggestion HIPAA. That closure is what
makes the coverage rule sound: without it, a symmetric typo on both the type and
the shield would satisfy the set difference while protecting nothing.
The same set-difference rule guards channel declarations (axon-T1215: a
channel whose payload carries a regulated class needs a covering shield before
publish may extrude it), and is re-checked at runtime publish for IR that
never met the checker.