Contextfulv0.23.0

Docs / Specification

contract read · 20-read.md · 21-memory.md · guide · card

Synthesized memory

Implementers use this page for stored claims, entity identities, relationships and prediction outcomes. Memory uses the same tables, commit operations and access controls as ingested data. The memory commands and tools write, revise and retrieve these records. Subject erasure uses the disclosure contract’s erase operation.

Memory tables and the operations that write and read their rows:

Flowchart diagram Flowchart, top to bottom. 12 nodes, 14 edges. landed rows → synthesis pass [extract since cursor] synthesis pass → memory_entities [resolve mentions]; → memory_edges [relate entities]; → memory_facts [consolidate, supersede]; → dead-letter table [failed batch] memory tables: memory_facts → query handlers [recall with evidence] memory tables: memory_entities memory tables: memory_edges → query handlers [bounded walk] memory tables: dead-letter table memory tables: predictions → outcome_labels [settle by join] memory tables: outcomes → outcome_labels [settle by join] memory tables: outcome_labels erasure cascade → memory_facts [tombstone subject] query handlers → application [claims and evidence] application → memory_facts [write claims directly]; → predictions [register prediction]; → outcomes [observe outcome] memory tables settle by join settle by join memory_facts memory_entities memory_edges dead-letter table predictions outcomes outcome_labels extract since cursor resolve mentions relate entities consolidate, supersede failed batch write claims directly recall with evidence bounded walk claims and evidence register prediction observe outcome tombstone subject landed rows synthesis pass erasure cascade query handlers application

declare

Memory table schemas, required columns, trust tiers, scopes and relation types.

synthesize

Claim extraction, entity resolution, consolidation, evidence, deduplication, audit records and coverage gaps.

unsettled: Which consolidation merges two claims of one dedup key, and what record does a coverage gap leave? owner: read-path affects: read.synthesize

revise

Claim replacement within a validity interval, confidence decay, direct writes, timestamps, expiry, retention and promotion.

unsettled: What binds the asserted agent member to the writer? owner: authority affects: read.revise

unsettled: What declared bound expires a researched claim, and which served write promotes a claim to curated? owner: read-path affects: read.revise

recall

Ranked and keyed claim retrieval, read timestamps, tier ordering, scope and tombstone filters, and evidence checks.

Scenarios

resolve-entity

Entity matching, aliases, identity cards, location relationships, edges and ownership queries.

unsettled: Which edges carry aliases and nearness’s parent closure? owner: read-path affects: read.resolve-entity

Scenarios

settle

Prediction registration, observations, required verdict citations and outcome label views.

traverse

Graph traversal from a seed entity, bounded by time, hop count and readable edges in the caller’s session.

unsettled: Does a graph arm seeded by the query’s resolved entities fuse into fusion as a third leg, and at what weight? owner: read-path affects: read.traverse

Shapes

A declaration naming a shape and its declared relation types:

[[table]]
name  = "team_memory"
shape = "memory_facts"

[[relation.declared]]
name        = "reports_to"
direction   = "directed"
cardinality = "one"
walkable    = true

[[relation.declared]]
name        = "owns_service"
direction   = "directed"
cardinality = "many"
walkable    = true

The reserved-traits table:

Relationdirectioncardinalitywalkable
supportsdirectedmanytrue
contradictsundirectedmanytrue
supersedesdirectedmanytrue
aboutdirectedmanyfalse
derived_fromdirectedmanytrue

The label view:

CREATE VIEW outcome_labels AS
SELECT p.prediction_id, p.subject, p.resolution_source,
       o.verdict, o.signal, o.settling_citation,
       epoch(CAST(o.observed_at AS TIMESTAMP)) - epoch(CAST(p.predicted_at AS TIMESTAMP)) AS lead_time_s
FROM predictions p
JOIN outcomes o ON o.prediction_id = p.prediction_id
WHERE o.observed_at IS NOT NULL
  AND o.signal IS DISTINCT FROM 'self-rated'
  AND epoch(CAST(o.observed_at AS TIMESTAMP)) >= epoch(CAST(p.predicted_at AS TIMESTAMP))
  AND epoch(CAST(o.observed_at AS TIMESTAMP)) <= epoch(CAST(p.deadline_at AS TIMESTAMP)) + 86400;