Skip to content

[Feature] Relationship graph — lightweight edges between memories #16

@rahilp

Description

@rahilp

Why
Memories don't exist in isolation. "We decided to use Vectorize" is connected to "Vectorize has a 5MB metadata limit" which is connected to "we moved content storage to D1." Right now those connections only exist implicitly via semantic similarity. Making them explicit unlocks causality queries, dependency traversal, and timeline reconstruction.

What

  • Edge types: Project → Decision, Decision → Outcome, Person → Project, Task → Status, Idea → Related Idea
  • Edge creation: manual (user explicitly links two entries) and automatic (AI infers relationships at store time)
  • Graph traversal in recall: when recalling entry X, optionally fetch all entries connected to X
    Implementation notes
  • New D1 table: edges (id, source_id, target_id, relationship_type, created_at)
  • Keep it lightweight — this is not a graph database, just a join table
  • Graph traversal: simple recursive D1 query up to depth 2-3
  • Web UI: show linked memories as "Related" section on memory detail view

Metadata

Metadata

Assignees

No one assigned

    Labels

    databaseRequires Database ChangesenhancementNew feature or requesttier-4Dependency Chain

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions