Skip to main content

Markdown-frontmatter memory curator: tiered indexing, semantic search, and contradiction flagging on top of any memory directory.

Project description

eml-memory-curate

Markdown-frontmatter memory curator for agentic Claude / LLM sessions.

Tiered indexing, semantic search, and contradiction flagging on top of any directory of Markdown files. Sister package to eml-memory — that one ships the typed JSONL store; this one curates a Markdown index of memory "topics" with one file per topic.

Install

# core (text search only)
pip install eml-memory-curate

# with semantic search
pip install eml-memory-curate[embeddings]

Quick start

Each topic lives in its own Markdown file with optional frontmatter:

---
name: Buzzard drama
description: Capacitor C7 spec mismatch caught at QC stage 3.
type: feedback
---

The vendor-supplied capacitor on revision B07 has a 30% lower
ESR rating than the BOM specifies. Caught by QC stage 3 thermal
imaging on 2026-04-28...

Run the curator on the directory:

$ eml-memory-curate audit ~/.claude-memory
  Memory dir:    ~/.claude-memory
  Entries:       111
  Total bytes:   424,049
  ...

$ eml-memory-curate curate ~/.claude-memory
  Curated 111 entries into 4 tier files.
    MEMORY.md           63 entries   22,920 bytes  (OK 22KB)
    MEMORY_RECENT.md    25 entries   12,400 bytes
    MEMORY_ARCHIVE.md   23 entries   18,200 bytes
    TAGS.md            111 entries   38,100 bytes

$ eml-memory-curate query ~/.claude-memory "buzzard drama"
  Top 3 semantic match(es) for 'buzzard drama':
    [0.821] 2026-04-28 [feedback    ] feedback_buzzard.md
        Capacitor C7 spec mismatch caught at QC stage 3.
    ...

What it does

subcommand description
audit Counts, sizes, oldest/newest, tier preview
curate Regenerate MEMORY.md + MEMORY_RECENT.md + MEMORY_ARCHIVE.md + TAGS.md
query Semantic search (with text fallback)
tags Show all inferred topic tags
embed Build the embedding index (requires [embeddings])
contradict Flag numeric conflicts between recent and older same-tag memories

Design

  • Per-topic files are sacred. The curator never edits or deletes source .md files. Only the four index files are regenerated.
  • Hot-tier byte cap. MEMORY.md stays under a configurable cap (default 22 KB) so it loads uncompressed in an LLM session. Older / less-critical entries flow into MEMORY_RECENT.md then MEMORY_ARCHIVE.md.
  • Evergreen rules. Entries typed feedback, user, or reference stay in the hot tier regardless of age. Sessions / projects age out.
  • Contradiction scan is advisory. When a recent memory says "21 backends" and an older same-tag memory said "18 backends", the curator flags it for human review. It never auto-resolves.

Configuration

Override the memory directory via $EML_MEMORY_CURATE_DIR or pass it as the first positional argument to every subcommand. Tier knobs (--hot-max-bytes, --recent-days, --archive-days, --title) live on the curate subcommand.

Python API

from eml_memory_curate import collect_entries, tier_entries, find_contradictions

entries = collect_entries(Path("~/.claude-memory").expanduser())
hot, recent, archive = tier_entries(entries)
conflicts = find_contradictions(entries, recent_n=10)

Roadmap

  • v0.2 — sync adapter for eml-memory's typed JSONL store, so the two packages share one source of truth.
  • v0.3 — registry-drift check (volatile keys vs live values), once generalized away from the monogate-research builder.
  • v1.0 — bundled embedding model + SQLite backend.

License

PROPRIETARY-PRE-RELEASE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eml_memory_curate-0.1.0.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eml_memory_curate-0.1.0-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file eml_memory_curate-0.1.0.tar.gz.

File metadata

  • Download URL: eml_memory_curate-0.1.0.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for eml_memory_curate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2a5a2e3ce17c3da4c7a590fe6c0be6f9c6c2731fbbd45b4cdfe59e4982d992e5
MD5 fe1c0f72b8a9e0d40afb427c903d218d
BLAKE2b-256 902ec88113a50eb4bc2b3891cca9e5b53e25fb2126151dc8b102e24fd1121d46

See more details on using hashes here.

File details

Details for the file eml_memory_curate-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for eml_memory_curate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8222641a891acc7d9bac0bc2b0aa36876813feac01012d6ee4027d71513caf64
MD5 bda8dbf681df91ca91241de6da132681
BLAKE2b-256 a5c6143a3d5b41f59fab84e7696a7c95b3f6dbc2a857bbdfdc6b1b86dc3ec960

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page