Skip to content

Graph Memory: canonical entity/fact temporal schema in Postgres #48

@aurexav

Description

@aurexav

Summary

Define the canonical graph memory model for ELF on top of Postgres as source of truth.

Problem

ELF currently stores notes and structured fields, but has no first-class entity/fact temporal model for graph memory.

In Scope

  • Add additive Postgres schema for:
    • entities
    • facts (subject, predicate, object)
    • fact-evidence bindings
    • temporal validity (valid_from, valid_to)
  • Define graph invariants and conflict semantics.
  • Keep graph state auditable and evidence-linked.

Out of Scope

  • No Neo4j or other graph database adoption.
  • No multi-hop traversal/ranking algorithms.

Deliverables

  • SQL migrations.
  • Service-layer model and repository support.
  • Docs with invariants and examples.

Acceptance Criteria

  • Migrations are backward-compatible.
  • Facts can represent active and superseded knowledge.
  • Every fact is linked to at least one evidence-bearing source.
  • Invariants are documented and testable.

Dependencies

  • None.

Implementation Checklist

  • Schema design review approved.
  • Migration files merged.
  • Read/write repo layer added.
  • Invariant docs added.
  • Integration tests for temporal validity and evidence linkage.

Done When

  • A single canonical graph data model exists in Postgres and is ready for ingestion integration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:storagePostgres schema, SQL queries, and storage correctness.kind:specSpecification or contract definition (APIs, schemas, invariants, query semantics).theme:reliabilityCorrectness, consistency, failure handling, and operational robustness.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions