# Repository Briefing: coleam00/claude-memory-compiler
> Source: https://repoforai.com/repo/coleam00/claude-memory-compiler (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/coleam00/claude-memory-compiler
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Python
- **License**: See repository
- **Engineering Health**: C (38/100 · Maintenance 6/35 · Adoption 20/25 · Releases 6/20 · License 6/20)
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: CLI
- **Momentum**: 1,330 ★ total (+0 24h / +4 7d) · 332 forks
- **When to Use**: Best for: Claude Code users who want to carry project decisions and hard-won lessons across sessions in an inspectable, personal-scale Markdown knowledge base. Skip if: You need offline inference, cannot send session content to Claude, need large-corpus retrieval beyond a context-sized index, or require explicit redistribution rights before adoption.

## Overview
```text
### Architecture & Core Mechanics
This is a Claude Code hook extension backed by Python CLI scripts. `SessionEnd` and `PreCompact` capture transcripts and launch background extraction. `flush.py` uses the Claude Agent SDK to select decisions, patterns, lessons, and gotchas, then appends them to `daily/YYYY-MM-DD.md`. `compile.py` consolidates daily logs into cross-referenced Markdown under `knowledge/concepts/`, `knowledge/connections/`, and `knowledge/qa/`.

`SessionStart` injects the index, not the full article corpus, into subsequent sessions. That separates capture, synthesis, and retrieval and makes the daily logs and compiled articles independently inspectable. The runtime manifest specifies Python 3.12+, `claude-agent-sdk>=0.1.29`, `python-dotenv>=1.0.0`, and `tzdata>=2024.1`. The demonstrated extension mechanism is Claude Code hooks rather than an MCP server.

### Key Capabilities & Differentiators
The workflow captures completed sessions and provides a second capture point before context compaction. After 6 p.m. local time, the next session flush can trigger compilation of that day's logs. This is an event-driven trigger, not a scheduled job that fires at 6 p.m. without session activity. `uv run python scripts/compile.py` provides an explicit manual path.

`query.py` uses `index.md` to find relevant articles, and `--file-back` saves an answer back into the knowledge base. `lint.py` runs seven health checks, including checks for broken links, orphaned articles, contradictions, and staleness; `--structural-only` runs just the structural checks. Claude via the Agent SDK is the demonstrated model integration. No interchangeable provider or local model backend is established.

### Trade-offs & Limitations
Compared with vector RAG, an index and Markdown files eliminate the embedding pipeline and vector database, and make stored knowledge easier to inspect and edit. In exchange, retrieval depends on how well the index describes the articles and how much index text fits into model context. Treat 50–500 articles as personal-scale design guidance and roughly 2,000+ as a prompt to reassess retrieval, not a benchmark or hard cutoff.

Automatic extraction saves manual note taking, but it also creates a data-handling decision: session transcripts are processed through the Claude Agent SDK, and selected details persist in daily logs and compiled articles. Review what can be captured and retained before enabling the hooks on sensitive projects. No license is specified, so clarify reuse and redistribution rights before adopting the project as a shared dependency.

### Hardware & Deployment Guide
Use Python 3.12+, `uv`, Claude Code, and access to Claude through the Agent SDK. Run `uv sync`, then copy or merge the hook entries from `.claude/settings.json` into the target project without replacing unrelated settings. The hooks take effect when Claude Code is next opened. There is no documented Docker deployment, database service, or GPU setup required by this workflow.

The scripts and Markdown artifacts are local, but model processing depends on Claude. The described personal-use path uses an eligible Claude Max, Team, or Enterprise subscription rather than separate API credits; verify current usage terms before relying on that arrangement. `pyproject.toml` declares version `0.1.0`, but there is no published GitHub release to assess upgrade history or compatibility guarantees.
```

## Key Capabilities
```text
- Capture lifecycle: `SessionEnd` captures completed sessions, while `PreCompact` provides a capture point before context compaction.
- Extraction layer: `flush.py` uses the Claude Agent SDK to select durable takeaways and append them to `daily/YYYY-MM-DD.md`.
- Compilation trigger: the next flush after 6 p.m. local time can initiate compilation; `scripts/compile.py` also runs manually.
- Storage and retrieval: cross-linked Markdown articles live under `knowledge/`, with `index.md` guiding lookup instead of embeddings.
- Session continuity: `SessionStart` injects the index into future sessions; `query.py --file-back` can save an answer back.
- Maintenance: `lint.py` runs seven health checks, with `--structural-only` available for structural checks alone.
```

## Quick Start / Clone
```bash
uv run python scripts/compile.py                    # compile new daily logs
uv run python scripts/query.py "question"            # ask the knowledge base
uv run python scripts/query.py "question" --file-back # ask + save answer back
uv run python scripts/lint.py                        # run health checks
uv run python scripts/lint.py --structural-only      # free structural checks only
```
