Expand description
Read-only mirror of a coding tool’s per-project memory store. Read-only mirror of a coding tool’s per-project memory store.
Coding tools such as Claude Code write per-project “memory” (running notes,
next steps, corrections) into their own private stores that other tools
cannot see. This module mirrors those files into Lore’s memories table so
any LLM can read them through Lore’s MCP server.
The mirror is strictly READ-ONLY: it never creates, modifies, or deletes files in the tool’s memory folder. It only reflects the current folder state into the database, adding new memories, updating changed ones, and removing memories whose source file no longer exists.
Claude Code stores per-project data under ~/.claude/projects/<slug>/ where
<slug> is the project’s absolute path with the path separator replaced by
- (for example /Users/me/proj becomes -Users-me-proj). Sessions live
in the sessions/ folder; memory lives in the sibling memory/ folder as a
MEMORY.md index plus per-fact markdown files. Each fact file carries YAML
frontmatter with name, description, and metadata.type, followed by the
fact body.
Structs§
- Memory
Mirror - Mirrors a coding tool’s memory folder into Lore’s database.
- Mirror
Stats - Statistics describing what a single refresh changed.
- Parsed
Memory - A memory parsed from a single markdown file on disk.
Constants§
- CLAUDE_
CODE_ TOOL - The source-tool identifier used for Claude Code memories.
Functions§
- parse_
memory_ dir - Parses all memory markdown files in a folder.
- resolve_
project_ path - Resolves the project path to scope memories to.