Cohesive Systems logoCOHESIVE SYSTEMS

Building Blocks

Cohesive.Entities & Transitions

Cohesive Entities and Transitions icon

Cohesive.Entities & Transitions is the state semantics layer: entities define what exists, and transitions define how state may legally evolve.

Most systems model structure. Fewer model change precisely. This block makes both first-class so relations, queries, workflows, storage, indexes, and APIs can compose on top of explicit state semantics.

Entities

An entity is more than a class, record, or table. It is a semantic identity, a collection of first-class fields, a possible state space, and a set of invariants that must hold.

Fields are addressable semantic elements. They can participate in transitions, relations, policies, invariants, storage bindings, search mappings, migration logic, and feature extraction.

Transitions

A transition defines a permitted state transformation. It is typed, declares preconditions, preserves invariants, and produces deterministic effects.

Transitions are pure semantics. They do not call external systems, publish messages, start workflows, or perform I/O. They declare intent; execution belongs to process runtimes, storage adapters, API bindings, or host infrastructure.

Effects

Effects are the semantic output of a transition. A domain event is one kind of effect, but effects can also represent requests for computation, workflow triggers, integration intents, or generated state changes.

Effects are data-only, deterministic, replay-safe, and serializable. This makes them useful for outbox patterns, event sourcing, process orchestration, audit trails, and testing.

State And Patches

In Cohesive, meaning comes before mutation. A state-transforming effect defines how prior state becomes next state. A patch can be derived from that semantic effect and the prior snapshot instead of becoming the primary source of truth.

This avoids duplicating "what happened" and "what changed" across separate artifacts.

Adoption

LevelWhat teams modelValue
MinimalEntity shapes, identity, fields, and invariants.A clearer domain backbone for validation, storage, APIs, and generated contracts.
DeeperTransitions with preconditions, updates, effects, read sets, and write sets.Legal state change becomes testable, deterministic, and reusable.
All inTransitions connected to processes, storage, APIs, identity, presentation, and outbox streams.State semantics become the center of execution rather than incidental handler code.