Choreo.Domain.Analysis (Choreo v0.9.0)

Copy Markdown View Source

Audit and analysis rules for Choreo.Domain diagrams.

Validates Event Storming graphs against logical rules:

  1. Commands must target an Aggregate or Workflow.
  2. Events must be emitted by an Aggregate, Workflow, or External System.
  3. Events must not be dead-ends (they should trigger a Policy, Read Model, or Actor).
  4. 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 audit rules against a domain model and returns a list of {severity, message} tuples for cross-module composability.

Functions

ubiquitous_language(domain)

@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.

warnings(domain)

@spec warnings(Choreo.Domain.t()) :: [{:error | :warning, String.t()}]

Runs semantic audit rules against a domain model and 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)