Mneme's second job is to turn scattered memory notes into a usable pack.
Not by publishing someone's private memory. Not by pretending summaries are truth. By compiling notes into reviewable artifacts with provenance.
Take this:
MEMORY.mdmemory/*.md
And produce this:
compiled/documents.jsonlcompiled/entries.jsonlcompiled/projects.mdcompiled/systems.mdcompiled/decisions.mdcompiled/incidents.mdcompiled/people.mdcompiled/timeline.mdcompiled/report.md
- keep provenance
- redact obvious secrets in generated text
- treat output as candidate memory, not final truth
- prefer concise durable facts over session sludge
- do not commit private compiled memory packs to the public repo by default
- do not commit raw evidence packs (
raw/) to the public repo by default
Script:
scripts/mneme_compile_memory.py
What it does in the first pass:
- reads Mneme raw evidence (
raw/sources.jsonl,raw/items.jsonl) when available - falls back to direct markdown parsing only as a legacy path
- extracts candidate lines by simple deterministic rules
- filters heading-only entries out of compiled memory
- suppresses low-value project noise such as TODOs, branch names, and commit-hash litter
- groups lines into project/system/decision/incident buckets
- deduplicates timeline events more aggressively
- builds a timeline from evidence/source metadata
- writes structured compiled JSONL
- renders markdown views from the compiled layer
- writes a report with source counts
What it does not do yet:
- contradiction resolution
- staleness scoring
- entity linking
- promotion back into
MEMORY.md - LLM synthesis
./scripts/mneme_compile_memory.py --root /path/to/workspace --raw /path/to/raw --out /path/to/compiledExample for a local OpenClaw workspace:
./scripts/mneme_compile_memory.py --root ~/.openclaw/workspace --raw ./raw --out ./compiledRaw memory files are chronological. Useful memory is structural.
The compiler is the bridge between the two.
The compiler now uses stronger heading-aware routing and includes a people lane so identity/profile material is less likely to leak into project/system/decision buckets.