--- id: dc9c2638-360e-4e15-990c-76fcd16672c0 type: decision title: "Cognitive memory data dir moved to XDG-compliant path (~/.local/share/cognitive-memory/)" tags: ["[\\\\\\\"cognitive-memory\\\\\\\"", xdg, architecture, portability, "\\\\\\\"configuration\\\\\\\"]"] importance: 0.85 confidence: 0.8 created: "2026-02-28T20:56:13.079823+00:00" updated: "2026-02-28T20:57:20.365199+00:00" relations: - target: b1ba1b27-d2bf-44f9-a1f5-0ace2017dc18 type: BUILDS_ON direction: incoming strength: 0.8 edge_id: 1f7a87ef-5d03-45bb-a1d2-3fd8796b1e7f - target: 9ea72015-0b85-4a42-9ae1-144866f8d86f type: FOLLOWS direction: outgoing strength: 0.8 edge_id: 30dd2fb7-f75f-4083-8b7c-52b8ce95cfc8 --- # Cognitive Memory: XDG Base Directory Compliance Moved default data directory from hardcoded `~/.claude/memory/` to XDG Base Directory spec compliant location. ## Resolution Order 1. `COGNITIVE_MEMORY_DIR` env var 2. `$XDG_DATA_HOME/cognitive-memory/` 3. `~/.local/share/cognitive-memory/` (XDG default) ## Rationale Makes the system distributable as a plugin without assuming Claude Code-specific paths. ## Details - `GRAPHS_BASE_DIR` is now a sibling: `cognitive-memory-graphs/` - All scripts updated: `memory-git-sync.sh`, `ensure-symlinks.sh`, `edge-proposer.py` - Cal's data physically moved from `~/.claude/memory/` to `~/.local/share/cognitive-memory/` - Env var overrides removed from `bashrc`, fish config, and MCP server config — XDG default resolves naturally