Audit and analysis rules for Choreo.Domain diagrams.
Validates Event Storming graphs against logical rules:
- Commands must target an Aggregate or Workflow.
- Events must be emitted by an Aggregate, Workflow, or External System.
- Events must not be dead-ends (they should trigger a Policy, Read Model, or Actor).
- Policies must trigger a Command.
Summary
Functions
Generates a Markdown-formatted table representing the Ubiquitous Language (glossary) extracted from all nodes, aggregates, events, and types defined in the domain.
Runs semantic validation rules against a domain model.
Runs semantic audit rules against a domain model.
Functions
@spec ubiquitous_language(Choreo.Domain.t()) :: String.t()
Generates a Markdown-formatted table representing the Ubiquitous Language (glossary) extracted from all nodes, aggregates, events, and types defined in the domain.
@spec validate(Choreo.Domain.t()) :: [{:error | :warning, String.t()}]
Runs semantic validation rules against a domain model.
Returns a list of {severity, message} tuples for cross-module composability.
Severity levels:
:error— structural issues (missing targets, missing causes):warning— soft semantic checks (dead-ends, passive actors)
This is the cross-module validation entry point. It is equivalent to
warnings/1, which is kept as a domain-specific alias.
@spec warnings(Choreo.Domain.t()) :: [{:error | :warning, String.t()}]
Runs semantic audit rules against a domain model.