IntentLang
IntentLang is a declarative specification language for human-AI collaboration.
Humans write what the system must do and what constraints must hold. Agents handle how — generating verifiable implementations from specs. The toolchain proves the implementation satisfies the contract.
From vibe coding to agentic engineering
Vibe coding proved something important: you can describe what you want in plain language and an AI will generate code for it. But it also exposed a gap — without formal contracts, you're left eyeballing the output and hoping it works.
IntentLang closes that gap. It keeps the natural language starting point that makes vibe coding accessible, then adds the structure that makes the result trustworthy: formal specs, machine-checked contracts, and an audit trail that traces every line of generated code back to a requirement.
The shift is simple: instead of prompting and praying, you specify and verify.
How it works
IntentLang addresses this with four layers:
- Natural Language — Describe what you want in plain English. An AI agent generates a formal spec from your description. The lowest-barrier entry point.
- Intent Layer — Write or refine declarative specs directly: entities, actions, pre/postconditions, invariants. Readable by anyone on the team, formally parseable by machines.
- Agent IR — Agents generate a dense, typed intermediate representation from specs. Optimized for machine generation, not human authoring.
- Audit Bridge — Tooling maps every IR construct back to a spec requirement. Orphan code (implementation without spec justification) is a first-class error.
Layers 0 and 1 are both human-facing — the system meets you where you are.
Quick Example
module TransferFunds
--- A fund transfer between two accounts within the same currency.
entity Account {
id: UUID
balance: Decimal(precision: 2)
currency: CurrencyCode
status: Active | Frozen | Closed
}
action Transfer {
from: Account
to: Account
amount: Decimal(precision: 2)
requires {
from.status == Active
to.status == Active
from.currency == to.currency
amount > 0
from.balance >= amount
}
ensures {
from.balance == old(from.balance) - amount
to.balance == old(to.balance) + amount
}
}
invariant NoNegativeBalances {
forall a: Account => a.balance >= 0
}
$ intent check examples/transfer.intent
OK: TransferFunds — 7 top-level item(s), no issues found
Prior Art
IntentLang draws on Design by Contract (requires/ensures), Dafny (verification-aware programming), TLA+ (system-level invariants), and Alloy (lightweight formal modeling).