Skip to content

feat: cross-session project memory store #24

Description

@alpibrupa

Problem

Sessions are fully isolated. Architectural decisions, naming conventions, or context established in session A are invisible in session B. There is no persistent project-level knowledge base.

Design

New module: src/memory/ with:

  • memory.lex — CRUD over a .lex/memory.db SQLite store
    • remember(key: Str, value: Str, tags: List[Str]) -> Unit
    • recall(query: Str) -> List[MemoryEntry] — fuzzy match on key/tags/value
    • forget(key: Str) -> Unit

New tools: memory_write, memory_read, memory_search

These should be available to build, refactor, explore, and plan agents.

The memory store is per-project (rooted at the .lex/ directory), not global.

Stretch goal

Tag entries with SigIds so memory entries stay valid after refactors (a SigId-linked memory entry that refers to a deleted function can be flagged as stale).

Acceptance

  • Memory persists across lex-code invocations in the same project directory
  • lex check --strict src/ passes
  • Tests in tests/test_memory.lex

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions