FabricFabricPlatform
Platform referenceArchitecture

Ontology-based design

Why Fabric models the world as object types, actions, and events instead of CRUD tables.

A Fabric application is not a CRUD app. The unit of design is the ontology — a typed vocabulary of objects, actions, events, and policies — not a set of tables.

What an ontology is here

In Fabric, an ontology consists of:

  • Object types — kinds of things the system reasons about (Vehicle, Party, Offer, ActionInvocation). Registered as PascalCase strings via registerObjectType.
  • Actions — the only legal verbs that mutate domain state. Each action has a stable ID like lending.accept_offer and is registered as an ActionDefinition.
  • Events — append-only facts emitted by actions. Each event has an eventType (e.g. OfferAccepted) and a typed payload.
  • Policies — predicates evaluated before an action runs, returning pass, warn, or block.
  • State machines — declarative transition graphs that constrain which action can move which entity from which state to which state.

These five concepts are the only first-class registry types in the platform. Everything else (UI, queries, analytics) is a projection of them.

What this buys you

  1. One mutation path. Because actions are the only verbs, every change to domain state is captured as an ActionInvocation row. There is no "small write" that escapes audit.
  2. Replayable state. Because events are immutable and sequenced, any read model can be rebuilt from history. Bugs in projection logic don't lose source data.
  3. Policy is composable. Policies attach to action IDs, not call sites. A policy like lending.credit_pull_consent.v1 runs the same way whether the action was invoked from the UI, an agent, a webhook, or a cron.
  4. Agents become first-class. An LLM holding a credential calls the same invokeAction API a human does. No special "AI endpoint" exists, so no special audit gap exists.

Where the ontology lives

ConcernOwner
Cross-industry governance types@fabricorg/platform/objects (pre-registered)
Vertical object typesThe vertical's FabricModule.objectTypes
Action definitionsThe vertical's FabricModule.actions
Event typesThe vertical's FabricModule.eventTypes
PoliciesThe vertical's FabricModule.policies
State machinesThe vertical's FabricModule.stateMachines

The platform itself ships zero vertical vocabulary. There is no User, Order, or Customer in @fabricorg/platform. See built-in entities for the small fixed set the platform does pre-register.

Diagram

See also

On this page