Moment is a specification language for temporal domains. Author contexts, events, and crossings as code — and Moment compiles them into a living flow you test in Facet, before any implementation exists.
Every construct you write commits a piece of the flow on the right. The diagram is a build artifact of the spec — not a drawing you maintain by hand.
There has never been a way to simulate event flows, validate crossing contracts, or test saga orchestration before writing implementation. The gap between the model you agreed to and the code you shipped has never been instrumented — and AI agents now widen it at machine speed.
You test commands. You test queries. The temporal flows between bounded contexts go straight to production untested.
Your model lives in the wiki, the types, the tests, the docs, the API spec, and someone's head. Six copies that drifted on day two.
Where events cross boundaries, contracts break, and sagas fail — that's the untested frontier where incidents are born.
Same specification, same output, every time — clean git diffs by construction.
A Langium grammar parses .moment into a typed intermediate representation.
Test topologies, facet.json scenarios, saga state machines, and impact analysis.
Gherkin features, specification docs, AsyncAPI 3.0, and Cucumber JSON.
Types, aggregate contracts, and test scaffolds written deterministically to disk.
Moment compiles your spec into a scenario that loads straight into Facet — the test surface for the temporal model. The sequence is visualized the instant you save, and every data contract at every boundary is asserted. No aggregate classes. No glue code. No running system.
Save the spec and Facet renders the temporal sequence — order, timing, and crossings — on the spot.
Every boundary crossing carries a contract. Facet asserts each one against the scenario, not against hope.
The harness is generated, not written. Nothing to wire up, nothing to keep in sync by hand.
Moment diagnoses every gap between the specification and the implementation by severity — ERROR blocks convergence, WARNING is advisory, INFO tracks fitness. Drift detection makes divergence visible at AST-level precision instead of letting it surface as an incident, and moment reconcile closes the loop in either direction.
One .moment file drives types, tests, docs, and visualizations. Domain knowledge stops scattering.
Test topologies, simulation scenarios, and negative cases derived straight from the spec.
AST-level diffing catches when implementation diverges from the spec — before it's a bug.
A four-phase lifecycle — Active, Deprecated, End-of-Life, Removed — with consumption tracking.
A Model Context Protocol server exposes 7 tools to Claude, Copilot, and Cursor — fully offline.
Auto-regenerate artifacts on spec changes. Deterministic output means clean diffs every run.
Complai is an eight-product ecosystem for delivering software in regulated markets through generative AI. Moment is the keystone — the full pipeline runs with zero Complai dependency. Every other product is optional commercial acceleration that plugs in around it.
Automates Event Storming and supplies a converged spec. Optional input — hand-authoring is the primary path.
Versioned regulatory rule packs, consumed through an anti-corruption layer. Empty when no pack is active.
Gives DDD its missing temporal dimension — spec to typed code, tests, docs, and simulation. Open source.
The visual test surface — renders the sequence from facet.json and asserts every crossing contract.
Turns the building-block inventory and flow definitions into work items and execution plans.
Evaluates Moment artifacts against governing protocols and audits co-evolution debt.
Learns from every Moment stream — a pure consumer, never in the request path.
Signals cascades across the platform; Moment owns its own cascade response.
Adopt incrementally — one bounded context at a time. Generated artifacts are standard TypeScript, Gherkin, Markdown, and AsyncAPI. If you stop using Moment, your code still works.
No. Generated artifacts are standard TypeScript, Gherkin, Markdown, and AsyncAPI. The .moment file is the only Moment-specific artifact, and your generated code keeps working without it.
moment drift catches when implementation diverges from the spec. Fix the spec or reconcile the implementation — either direction works.
Yes. Start with one bounded context. Moment generates artifacts alongside your existing code, context by context, aggregate by aggregate.
Moment is v1.0 stable. The full pipeline runs end to end, and all 10 packages — schema governance, drift detection, visualization, and the MCP server — are published on npm under @mmmnt.
Basic familiarity with aggregates, commands, and events helps, but the DSL reads like a domain description, not an academic paper.
FSL-1.1-Apache-2.0: source-available now with full read and use rights. Two years after each release it converts to Apache 2.0. The only FSL-period restriction is competing commercial use.
Functionally complete. Ten packages. MCP-ready. Source-available under FSL-1.1-Apache-2.0.