PROJECT.md 939 B

PROJECT: memory-compactor

Aim

Compact noisy conversational memory stretches (especially debug sessions) into durable resolved summaries while preserving recall quality.

Current implementation

  • HTTP client for custom mem0 server endpoints:
    • POST /memories/all
    • POST /memories
    • DELETE /memory/{id}
  • temporal clustering (gap-minutes)
  • debug-arc heuristic and compact summary writer
  • dry-run reporting

Operating mode

  • default dry-run
  • --apply to mutate memory state
  • bounded deletions with --max-deletes

Design notes

  • keep newest item in each compacted cluster as guardrail
  • write compacted summary before deleting old entries
  • annotate summaries with provenance metadata (compacted_from_ids)

Next steps

  1. Add rollback snapshot file before apply
  2. Add explicit per-user allowlist
  3. Add cron integration helper (OpenClaw cron payload template)
  4. Add quality checks pre/post compaction