sensaffectPagesIdeas, standards & reference
Standard / Edition 1.0 / 8 September 2026

Logical schema

Chapter 5 of 9

The following is an illustrative typed contract, not a claim of an existing API or a complete machine-readable validation schema. Versioned implementations must add formal validation and define reference resolution. Scores are optional when their methods are not established.

type Provenance = {
  product: string;
  sourceRecordId: string | null;
  method: string | null;
  recordedAt: string | null; // ISO 8601 when known
};
type Metric = {
  value: number | null; // signed [-1, 1]; null means unavailable
  origin: 'observed' | 'inferred' | 'aggregated' | 'unavailable';
};
type AffectState = {
  id: string;
  vad: { valence: Metric; arousal: Metric; dominance: Metric };
  emotionWord: {
    label: string;
    origin: 'reported' | 'selected' | 'derived';
    lexiconVersion: string | null;
  } | null;
  confidence: number | null; // [0, 1], not intensity or rank
  source: Provenance;
};
type MemoryAtom = {
  schemaVersion: string;
  id: string;
  memory: {
    id: string;
    contentRefs: Array<{ id: string; mediaType: string }>;
    recordedAt: string | null;
    recalledAt: string | null;
    source: Provenance;
    relationships: Array<{ type: string; targetMemoryId: string }>;
  };
  feeling: {
    interpretationId: string;
    revision: string;
    source: Provenance;
    primary: AffectState | null;
    secondary: AffectState | null;
    tertiary: AffectState | null;
  } | null;
  context: {
    items: Array<{
      id: string;
      kind: 'time' | 'place' | 'person' | 'situation' | 'other';
      label: string; // e.g. a person's name, place or situation description
      value: string; // ISO 8601 for a known precise time; otherwise source wording
      entityRef: string | null; // stable person/place/etc. identity when available
      temporalScope: 'occurrence' | 'recall' | 'unspecified';
      interpretationRef: { id: string; revision: string } | null;
      origin: 'recorded' | 'user-confirmed' | 'inferred';
      confidence: number | null; // [0, 1] when supplied
      source: Provenance;
    }>;
    affectLinks: Array<{
      id: string;
      contextItemId: string;
      affectStateId: string;
      interpretationId: string;
      interpretationRevision: string;
      influence: number | null; // [0, 1]; null is unknown, not zero
      confidence: number | null; // independent of influence
      origin: 'user-reported' | 'inferred';
      source: Provenance; // method identifies the scoring policy when inferred
    }>;
    topics: Array<{ id: string; label: string; source: Provenance }>;
    sentiment: {
      category: string;
      score: number | null;
      source: Provenance;
    } | null;
    occurredAt: string | null;
    relationships: Array<{
      type: string;
      targetId: string;
      source: Provenance;
    }>;
    clusterIds: string[];
    eventIds: string[];
    narrativeCloudIds: string[];
    themeCloudIds: string[];
  };
};

Entity and content references resolve to separately identified records. Influence links must resolve to existing context items and affect states in the named interpretation revision. Confidence is not automatically a calibrated probability. A numeric influence requires a declared scoring method; inferred values require the producing method/model version in provenance. A release schema must specify how those method versions are encoded.

If context is shared across atoms, each local association retains its provenance. Raw media need not be copied into the renderer. Access to related memory content remains subject to the source application's permissions.

On this page

Chapter overviewScoring: what remains unestablished