Every DDD team starts with the model.
Whiteboards first. Then a diagram tool, or a context-mapping canvas. Sometimes it ends up as Gherkin scenarios, or as a page in a wiki: bounded contexts, a context map, the events that cross a boundary, the states an entity moves through.
In most teams the model lives here, and nothing in that workflow tells you when it contradicts itself. A diagram can draw an arrow from Billing to Ordering, but it cannot tell you that the event on that arrow is never declared. A Gherkin scenario checks that the system behaves as described in an example; it does not check that the model is consistent with itself. A wiki page is prose — accurate on the day it was written.
So the model — the artifact every implementation decision derives from — is the only one in the process with no validation. The schema has a validator, the code has a compiler and tests, the model has a picture.
Thinai is a modeling language that closes that gap. It does not generate code: you write the model in text, in the same terms you would draw — bounded contexts, context maps, aggregates, events, services, queries, modules, journeys — and the structure of the model is checked, in the editor as you type and from the command line.
1. An event consumed with no publisher
In Thinai, a cross-context reference is not a free-text label. It resolves through the context map: a consumer can only reach an integration event that the publishing context exposes — through every enclosing module — and only if the map declares the relationship between the two contexts.
Rename the event, move it into a module that does not re-export it, or remove the map entry, and the reference stops resolving. You find out while editing, not in production.
2. A transition on a field the entity does not declare
State changes are part of the model, not comments:
in bounded context Shipping { aggregate Shipment { root entity Shipment { identifier id: ShipmentId status: ShipmentStatus initial Pending method start() { transition status from Pending to Started emits ShipmentStarted } } value object ShipmentId { raw: string } } enum ShipmentStatus { Pending, Started } event ShipmentStarted } Write transition statuss from Pending to Started and the model rejects it:
A transition must target an enum field declared on the owning entity. That is the domain-level message, and it is one of four. Every name in a transition is a link, so the editor also reports the unresolved field and the two state values separately — one typo, four errors, all before you run anything.
3. A state no transition can reach
Add a Cancelled state and a cancel() method that starts from it:
method cancel() { transition status from Cancelled to Pending } and the model rejects it:
State 'Cancelled' is unreachable from initial state 'Pending'. The validator walks the transition graph from the initial state. A state nothing can reach is dead code in the model — and a diagram will never tell you that, because a diagram has no notion of reachability.
What it does not check
Preconditions, postconditions and behavior descriptions are prose. Thinai checks that the links inside them resolve — a [[Shipment.status]] pointing at a field that does not exist is an error — but not whether the sentence is true. Nothing here proves the behavior is correct; that still needs code and tests.
What it does prove is narrower: the model does not contradict itself. The connections between parts, which used to depend on a reviewer remembering to check them, are now links that fail loudly when they break.
Why a language instead of a linter or a document
A linter checks code after the design has already been encoded three different ways. A document describes the rules but cannot evaluate them, so the rules decay into conventions that reviewers are expected to remember.
A model in a language is the thing itself: the same artifact you reason about is the artifact that gets checked. And because it is text with a schema, an agent can read it too — an MCP server exposes the model, so a coding agent can compare what it is about to write against the model it is meant to follow.
What it costs to try
It is a VS Code extension, alpha, Apache-2.0, no signup:
code --install-extension thinai-lang.vscode-thinai --pre-release Repository: https://github.com/thinai-lang/thinai
Docs: https://thinai-lang.dev
What I would like to know
Which of these checks would have caught something real in your system — and which one gets in the way when you sit down to describe a business?
The syntax will change — it is alpha — but what a model should be able to prove is the part I care about getting right.

