Skip to content

Reconcile conversation history into a compact MEMORY.md #31

Description

@owainlewis

Status

Prerequisites #56 and #62 have shipped. The feature remains intentionally deferred until real usage shows that canonical SQLite history plus fresh-session rehydration are insufficient.

Goal

Optionally distil Push's canonical conversation history into a small, inspectable MEMORY.md that Claude Code, Codex, and Pi can read when relevant.

Prerequisites

Scope

  • Run reconciliation outside the message response path.
  • Read completed exchanges after a durable message watermark.
  • Produce a bounded MEMORY.md containing durable preferences, active projects, and confirmed decisions.
  • Update the file atomically and make reconciliation safe to retry.
  • Treat explicit user statements and confirmed decisions as stronger evidence than agent-generated or externally retrieved content.
  • Keep SQLite history as the source of truth and MEMORY.md as replaceable derived context.
  • Add the gateway-owned SOUL footer only when MEMORY.md exists.
  • A reconciliation failure must never block replies.
  • Do not add embeddings, semantic retrieval, autonomous identity changes, or agent-owned writes.

Acceptance criteria

  • Document the real usage failure that justifies adding reconciliation.
  • MEMORY.md stays within a documented size bound.
  • Re-running from the same watermark is idempotent.
  • Source messages remain traceable when inspecting or regenerating memory.
  • Untrusted retrieved content cannot silently become a durable instruction.
  • Backends can read the file but Push remains the intended writer.
  • The feature can be disabled and removed without losing canonical history.
  • Tests cover watermark restart, atomic replacement, retry, size bounds, and conflicting updates.

Design

Follow the deferred memory section of docs/core-system/design.md.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew or improved product or engineering behaviour.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions