Documentation Index
Fetch the complete documentation index at: https://mintlify.com/coleam00/claude-memory-compiler/llms.txt
Use this file to discover all available pages before exploring further.
compile.py is the core of the system — the “LLM compiler” that reads your daily conversation logs (the raw source material in daily/) and produces organized, cross-referenced knowledge articles in knowledge/. Each compilation run calls the Claude Agent SDK with file-access tools, letting Claude read your logs and write concept articles, connection articles, and index entries directly to disk. You can run it manually at any time or let the end-of-day automation handle it.
CLI commands
Incremental compilation
By default,compile.py skips daily logs that have not changed since their last compilation. It tracks each log’s state in scripts/state.json using SHA-256 hashes:
flush.py appended new entries), the log is recompiled. After a successful compilation, state.json is updated with the new hash, a timestamp, and the API cost.
End-of-day auto-compilation
You do not need to remember to runcompile.py. After 6 PM local time, flush.py checks whether today’s daily log has changed since its last compilation and, if so, spawns compile.py as another detached background process:
What the compiler produces
Each compilation run may create or update several files. Claude reads the entireAGENTS.md schema, the current knowledge/index.md, all existing articles, and the target daily log, then decides what to write:
- New concept articles in
knowledge/concepts/— one.mdfile per atomic piece of knowledge (decisions, patterns, gotchas, lessons learned). A single daily log typically produces 3–10 concept articles. - Connection articles in
knowledge/connections/— created when the log reveals a non-obvious relationship between two or more existing concepts. - Updated concept articles — existing articles are enriched with new information from the log rather than duplicated; the source list in the frontmatter is extended.
knowledge/index.mdupdates — new rows are added to the master catalog table for each new or updated article.knowledge/log.mdappends — a timestamped entry is added recording what was compiled, which articles were created or updated, and from which source log.
permission_mode="acceptEdits" so all file writes are accepted automatically without prompts.