Skip to content

Schema model

The Schema model defines Entity kinds, Relationships, and Interfaces so Records and their consumers share the same meaning.

The Schema model defines kinds, fields, and links in Company Schema. It gives Records a shape before they hold values.

Ownership

The Schema model gives each Entity kind a stable name, a display name, and declared fields. An Entity is the type. A Record is one stored instance. In the Console, /schema/entities holds Entity definitions. A field names one value slot and its rule. A reference field points to its declared target. It does not accept any Record that happens to share an identifier.

Relationships and Interfaces

The Schema model uses Relationships to define links between kinds. /schema/relationships holds those definitions. An Interface instead names a role that several kinds can fill. /schema/interfaces shows the roles and their bindings. Pipelineable, Contactable, Listable, Scoreable, and Agreement are Interfaces. A kind binds its fields to the required roles. A List targeting an Interface can then accept Records from more than one kind.

Choose an Entity or a Relationship by what the thing is. An Entity is an object the business manages on its own, like a Project or an Agreement. A Relationship is a declared connection between objects, like participation, assignment, or affiliation.

ConcernEntityRelationship
MeaningAn independently managed business objectA declared connection between identified objects
Required identityKind and Record IDDefinition and version, source and target kind and Record, and the declared duplicate rule
MutationEntity operations validate the kind's fields and the Record revisionRelationship operations also check both endpoints, the author, cardinality, duplicates, evidence, and which correction or retraction wins
Changing endpointsAn ordinary field update changes that Record's valuesA different endpoint pair is a different connection. Remove or correct the first and create the second under the definition's policy
ValuesText, reference, and media fieldsDeclared scalar and date properties, with enums, ranges, visibility, and search rules. The server owns evidence references
LifecycleThe object's own business state and Record historyThe connection's identity, effective dates, current acceptance, retraction or correction, and projection revisions
ServingCurrent Records and declared Record queriesCurrent accepted connections, read by endpoint or by type, and their history

Both have IDs, attributes, permission checks, and history. Neither is inferred by default. An AI-made Entity or Relationship follows the same evidence and acceptance policy as a person's. An affiliation with a role, a title, dates, and a confirmation is still a Relationship. An Agreement stays an Entity. It has Relationships to its parties. Its document, duties, and work are managed on their own.

Declare a new business connection once, as a Relationship. A reference field is only an address. An endpoint or a technical pointer uses it. It is not a second writable copy of the connection. Related-record lists are reads over the Relationship. New Product source cannot declare a reference array for a business connection. A Release that already has one stays readable under its exact published contract. A later Release retires the old field.

Lifecycle

The Schema model compares a change with the current definition. Added fields, removed fields, changed types, and changed Interface bindings carry different risks. Change schema safely explains which changes need a warning check or an approved plan. A retired field keeps its name reserved. The field stays in the definition for history, and its stored Record values remain.

Boundaries

The Schema model can bind a field to an exact Value Type revision. The field cannot override that revision's options, reference target, or media rule. Reusable logic owns those shared rules. The model grants no access to a field's values. Record reads and writes still apply the current Workspace and policy decisions, including when a consumer reaches the Record through an Interface.

Failures

The Schema model refuses an Interface binding whose fields do not satisfy the role. A missing field or a type that cannot fill the role makes the kind unsuitable. Reserved names such as account, person, contact, deal, and product cannot become declared business kinds. A breaking definition change also requires a matching approved plan before the write can proceed.

Product compilation and Relationship declaration refuse a connection with two writable authorities. The diagnostics are connection.reference_array_unsupported, connection.duplicate_authority, connection.connector_entity_duplicate, connection.role_binding_missing, and connection.role_binding_ambiguous. A reference array has no admissible form. Exact predecessor bytes stay readable for inspection, but they cannot be imported, planned or installed. A refused Product makes no Release and no partial install. A Workspace pins Product Releases and supplies role bindings. It cannot embed a Product definition.

Recovery

The Schema model names the field or binding that needs repair. Read the current kind and correct the named field or role. Then preview the changed definition. Choose a non-reserved kind name for a business type. Use ontology.declareKind for the exact call contract and change controls. Read the kind back to check which definition became current.

For a refused connection, keep the Relationship as the one authority. Remove the reference field, the second definition, or the kind that only joins two others. To keep an old reference array, select the exact predecessor Release, unchanged. Read the Relationship back to confirm one identity. Then compile the same Workspace again. Sealed Releases are never edited.

Export and delegation

The Schema model gives Records, Pipelines, Actions, and Products one shared meaning for each Entity and field. Merulan retains that single revision of each definition and the history of its changes. Catalog screens and validation may run in another tool. An exported schema keeps its definitions, but a copied table cannot correct or write to the company model. Moving the Schema model elsewhere means every consumer adopts the outside version.

  • Reusable logic helps builders choose a shared value rule or selection after the model is clear.
  • Change schema safely guides a builder through compatibility and approval before changing a kind.
  • Records and history explains what an operator reads under the declared model.