Skip to content

Data model reference ​

The data layer defines the durable wire objects narrative products exchange. Objects are transport-agnostic; the required extensions.<namespace> bag and the closed-core rule are specified once in the extensions contract. Field tables below trace to the committed schemas in schemas/data/ and schemas/common/.

Shared definitions ​

DefinitionShapeNotes
SchemaVersioninteger ≥ 1Wire schema version
Timestampstring, RFC 3339 UTCCreated / updated / occurred times
ExtensionMapobject; keys ^[a-z][a-z0-9_-]*$, values opaque JSON objectsProduct namespace bag; round-trip preserves unknown namespaces and keys
ModuleMapobject; keys ^[a-z][a-z0-9_-]*$, values structured JSON (object or array)Cross-product functional-dialect bag; round-trip preserves unknown module namespaces
SourceSpan{ start, end } (inclusive start, exclusive end)Span within a source artifact
TimelineScaleopen string; core list brief, narrative, momentL5 projection tier
ForkIdstring ≥ 1 charOpaque world-history branch identity (l5-fork)
Scopeobject; required scope_id; optional viewpoint (ke-ownership)Shared ops selector — see Ops wire reference and Ownership governance
BodyAttribute{ trait_type, value, display_type?, max_value? }ERC721-style trait item; duplicate trait_type allowed at array level
ComputableFieldMapopen map of field names to domain valuesShared by body.state and body.computable under l2-computable
ComputableLogEntry{ logged_at, entry_id, changes[] } + optional session_id / messageMoment-scale presentation of computable field changes (l2-computable)

KnowledgeEntry ​

The atomic knowledge-base unit. Required: schema_version, entry_id, entry_type, canonical_name, status, body, extensions.

FieldTypeNotes
entry_idstringStable id, opaque to the protocol
entry_typeopen stringCore list (documented, not enforced): character, location, event (ontology label — distinct from the TimelineEvent wire object), scene, act, organization, item, conflict, info_point, era, worldbuilding, note, research, ability, rule (ontology label — distinct from the L6 Rule wire object). Products MAY emit values outside this list
canonical_namestring ≥ 1 charHuman-stable name
statusopen stringCore list (documented, not enforced): provisional, confirmed, deprecated, merged, deleted
bodyclosed objectsummary?, tags[]?, attributes[]? (BodyAttribute); state? / computable? (ComputableFieldMap) under l2-computable
source_anchorSourceAnchor, optionalProvenance pointer
revisioninteger ≥ 0Optimistic concurrency revision
created_at / updated_atTimestamp
extensionsExtensionMap, required
modulesModuleMap, optionalCapability-flagged narrative-modules; carries per-entry dialects (e.g. modules.activation)
ownerstring ≥ 1 char, optionalHolder-KnowledgeEntry entry_id in the product's collaboration context (ke-ownership)
disclosureopen string, optionalGovernance disclosure vocabulary; the sole core value is owner-private (ke-ownership)

Relation ​

Directed edge between two KnowledgeEntries (or a KnowledgeEntry and a source anchor). Required: schema_version, relation_id, relation_type, from_id, to_id, extensions.

FieldTypeNotes
relation_idstringStable relation id
relation_typeopen stringCore list (documented, not enforced): related_to, parent_of, member_of, located_in, participates_in, causes, foreshadows
from_id / to_idstringSource / target endpoint ids
labelstring, optionalHuman label
metadataopen object, optional
revisioninteger ≥ 0Optimistic concurrency revision
extensionsExtensionMap, required

SourceAnchor ​

Pointer to a source artifact span (manuscript, scene, external locator). Required: schema_version, source_id, extensions.

FieldTypeNotes
source_idstringOpaque source locator; products define the grammar
spanSourceSpan, optionalByte or character span within the source
labelstring, optionalHuman label
mime_typestring, optionalMIME type of the referenced source
extensionsExtensionMap, required

Finding ​

Checker output — a distinct artifact from a KnowledgeEntry body. Required: schema_version, finding_id, severity, status, title, description, extensions.

FieldTypeNotes
finding_idstringStable finding id
severityopen stringCore list (documented, not enforced): info, warning, error
statusopen stringCore list (documented, not enforced): open, resolved, dismissed
title / descriptionstringShort title and detail text
kindstring, optionalChecker kind or category
target_entry_idstring, optionalKnowledgeEntry the finding targets
source_anchorSourceAnchor, optionalProvenance pointer
suggested_fixstring, optionalSuggested remediation text
text_positionobject, optionalPosition hint within source text
extensionsExtensionMap, required

AssemblePacket ​

Wire-only context-assembly payload. Required: schema_version, packet_id, entries, extensions.

FieldTypeNotes
packet_idstringStable packet id
entriesarraySlim context entries (default); full KnowledgeEntry embedding is op-specific
extensionsExtensionMap, required
modulesModuleMap, optionalCapability-flagged narrative-modules; carries packet-level recipes (modules.placement, modules.activation_trace)

HostCapabilityManifest ​

Host self-description for in-process collaboration. Required: schema_version, host_id, roles, capabilities, namespaces, extensions.

FieldTypeNotes
host_idstring ≥ 1 charStable host identity, opaque to the protocol
rolesstring[], min 1, uniqueOpen vocabulary. Core list (documented, not enforced): data-store, input-source, checker, assembler, computable-engine
capabilitiesstring[], min 1, uniqueOpen string capability flags. Core list (documented, not enforced): spoke-baseline, l2-computable, l5-fork, l5-mind, narrative-modules, ke-extraction, ke-ownership, spoke-connect
namespacesstring[], min 1, unique; keys ^[a-z][a-z0-9_-]*$Extension namespace keys this host owns in a collaboration context
authority{ scope_key }, optionalExplicit single-writer authority scope; when absent with data-store in roles, implicit authority is this manifest's host_id
extensionsExtensionMap, requiredDeployment metadata — distinct surface from KnowledgeEntry extensions

Rule ​

Declarative constraint input to check — never checker output. Required: schema_version, rule_id, canonical_name, kind, extensions.

FieldTypeNotes
rule_idstringStable rule id, opaque to the protocol
canonical_namestring ≥ 1 charHuman-stable name
kindopen stringCore list (documented, not enforced): rule, prohibition, style
statementstring, optionalDeclarative constraint text (human- or machine-readable; products choose the grammar)
target_entry_typesstring[], optionalOntology filter matching KnowledgeEntry entry_type vocabulary
severity_hintopen string, optionalCore list (documented, not enforced): info, warning, error
statusopen string, optionalCore list (documented, not enforced): draft, active, deprecated
source_anchorSourceAnchor, optionalWhen the rule is anchored to a manuscript
extensionsExtensionMap, required

TimelineEvent ​

First-class when-axis temporal object (L5). Required: schema_version, timeline_event_id, canonical_name, extensions.

FieldTypeNotes
timeline_event_idstringStable id, opaque to the protocol
canonical_namestringHuman-stable label
timeline_scaleTimelineScale, optionalProjection tier: brief, narrative, moment
occurred_atstringRFC 3339 or opaque fuzzy label (e.g. "Third Age")
descriptionstring, optionalLonger narrative summary
participant_entry_idsstring[], optionalRelated KnowledgeEntry ids
source_anchorSourceAnchor, optional
sort_keystring, optionalOpaque ordering hint within a timeline
fork_id / parent_fork_idForkId, optionalWorld-history branch metadata (l5-fork)
computable_logsComputableLogEntry[], optionalMoment-scale computable change history (l2-computable)
modulesModuleMap, optionalCapability-flagged narrative-modules; carries event observation metadata (modules.observation under l5-mind)
extensionsExtensionMap, required

MindState is the companion L5 temporal record for mental state on the same when-axis — see MindState reference.

Ownership governance (ke-ownership) ​

The optional ke-ownership capability carries ownership facts on the KnowledgeEntry envelope and a reader selector on the shared Scope. KnowledgeEntry.owner names the holder KnowledgeEntry (entry_id) in the product's collaboration context; when owner is absent, ownership is unspecified. KnowledgeEntry.disclosure carries the governance disclosure vocabulary, whose sole core value is owner-private; when disclosure is absent, the entry is shared within the already selected KB context. A holder is an ordinary KnowledgeEntry that the product resolves in its own context.

Scope.viewpoint is an optional non-empty string on the shared selector: the reader's holder-KnowledgeEntry entry_id. The core disclosure predicate admits an owner-private entry only when its owner equals the requesting viewpoint exactly — string equality on the ids as supplied; an entry without disclosure stays visible regardless of viewpoint.

The three Scope-bearing remote ops — port.scope.list_knowledge_entries, port.scope.list_timeline_events, port.fork.list_timeline_events — require ke-ownership in addition to their row capability when the request's Scope carries a non-empty viewpoint. See the connect reference.

Open vocabulary ​

entry_type, relation_type, statuses, severities, and kind values are open strings with documented core lists — the schema keeps them open, and the core lists serve as reference values. Products emit their own values; Domain Profiles document published vocabulary (for example the profile-only entry_type: "beat"); adapters round-trip unknown values verbatim.

Distinct artifacts ​

  • Rule is declarative checker input; Finding is checker output — each keeps its own role.
  • TimelineEvent is the L5 when-axis object; entry_type: "event" is an ontology label — one local concept may map to both (dual-concern).
  • MindState is the L5 temporal mental-state record (l5-mind); entry_type: "character" / profile mind are ontology labels — the record is strictly derivative of the holder's modules.mental / modules.belief (settled home), never a second authority.
  • HostCapabilityManifest carries host metadata (roles, capabilities, namespaces) on its dedicated surface, separate from KnowledgeEntry extensions.