Canonical model interface
The immutable authored-context model and typed operation seam shared by Modeller modules.
The Modeller.Model module provides the canonical semantic interface.
It represents an authored bounded context
as an immutable revision and changes it only through explicit typed model
operations.
Interface
ModelOperationResult CanonicalModel.Apply(
AuthoredContextRevision revision,
params ReadOnlySpan<ModelOperation> operations)An operation batch either returns one new revision or returns the original revision with structured diagnostics. No partial revision becomes observable. The initial operation set can add a top-level semantic definition or rename any top-level or nested first-class concept while preserving its stable UUIDv7 identity.
The authored model represents entities, lifecycles, stages, behaviours, outcomes, effects, events, transitions, typed facts, pure rules, conclusions, and explicit rule bindings.
Every first-class definition may carry typed documentation fields in the canonical order: purpose, ownership and identity, semantic contract, relationships, invariants and constraints, acceptance examples, evolution and compatibility, and implementation guidance. Incomplete authored documentation can be represented; completeness is diagnosed by the validation module.
Semantic relationships use nominal reference values. Entity, fact, rule, lifecycle, lifecycle-stage, and outcome references are different .NET types, so a caller cannot accidentally place a rule identity into an entity relationship without an explicit conversion. Binding those references to existing concepts remains the responsibility of staged validation and federation resolution.
Invariants
- Every semantic concept has one opaque UUIDv7 identity.
- Identity is unique across the complete bounded-context ownership tree.
- An author-controlled slug is unique among siblings.
- Renaming changes a name and slug but preserves identity.
- A rename retains the former qualified name as a migration alias.
- A failed batch returns the exact input revision.
- Collections and revisions are immutable.
FindConcept locates top-level and nested concepts by stable identity and
returns their kind, immediate owner, and qualified name derived from the
ownership path. Source files and diagram layout never participate in that path.
The model test project carries a machine-readable Child Care conformance observation. It independently fixes the expected identities, kinds, qualified names, and immediate owners for the ACCS tracer slice and is checked only through the public model interface.
An authored revision may contain unresolved references. Cross-reference, federation, expression, and behaviour-governance checks belong to the staged validation interface rather than this model-operation seam.
Child Care tracer slice
The executable fixture creates the Child Care context with the ACCS determination application entity and lifecycle, typed enrolment fact, Determine ACCS eligibility rule and conclusion, and Submit ACCS determination application behaviour. The behaviour owns its outcomes and submission transition and refers to the reusable rule through a requirement binding.
Persistence and the semantic digest are intentionally outside this module. They are delivered by the context-package and federation capability so canonical JSON does not leak into the model interface.
RML source is the normal authoring path into this interface, not another model representation.
Rule expressions and their authored finding codes are consumed through the rules-runtime reference interface; loading must not discard that canonical meaning or replace it with runtime convention.
Decision definitions own typed inputs, conclusions, a declared hit policy, and stable rows. Rows use explicit Truth conditions or wildcards and select conclusions by stable ID. They execute through the same rules-runtime interface rather than a second engine.
The model is also the semantic authority behind disposable diagram projections. Editors translate gestures into typed operations and apply semantic edits through this model interface before reprojecting; projection graphs and layout never mutate it.