Why this exists, and what I'd change
Why it exists. Single-file rolling memory gets noisy fast. Long-term decisions get buried under last week's standup chatter. This skill splits memory into three files (recent, long-term, project) and promotes the durable stuff up the chain.
Design tradeoffs.
- Three memory files instead of one. Recent (48h rolling), long-term (distilled facts and preferences), project (active initiative state). Cost: more files to grep, and promotion logic is heuristic and occasionally wrong.
- Nightly cron promotion via launchd, not in-session. Promotion runs at 2am local time. Cost: same-day insights don't move into long-term until tomorrow. If the cron breaks, memory drifts silently.
- Reads from
~/.claudelogs, not a dedicated event stream. I chose to scrape what's already there. Cost: depends on Claude Code's log format staying stable. Will break if Anthropic changes it.
What I'd change. Add an explicit "remember this" command that promotes a fact immediately to long-term, instead of waiting for the cron to maybe catch it.
Consolidate Memory
Keep a persistent memory layer up to date from real conversation history.
Scope
This skill does four things:
- Reads local conversation logs from
~/.claude(last 24h for extraction). - Updates rolling context in
memory/recent-memory.md(48h window). - Updates
memory/project-memory.md(active initiatives, open decisions, next actions). - Promotes durable facts/preferences/patterns into
memory/long-term-memory.md.
Commands
/consolidate-memory run
/consolidate-memory status
/consolidate-memory install-nightly
Equivalent CLI:
python scripts/memory/consolidate_memory.py --run
Files
memory/recent-memory.md- Rolling 48-hour memorymemory/long-term-memory.md- Distilled durable memorymemory/project-memory.md- Active project state
Legacy mirrors are kept in:
long-term-memory.mdcontext-library/pm-os-learning-log.md
Promotion Rules
Promote from recent -> long-term when signals look durable:
- repeated mentions (frequency threshold)
- explicit preference language (
prefer,always,never,tone,style) - durable operational facts (
scheduled,deadline, recurring workflows)
Nightly Automation (macOS)
Install/update launchd job:
bash scripts/memory/install_consolidate_memory_launchd.sh
This writes:
~/Library/LaunchAgents/com.pmos.consolidate-memory.plist
And schedules a nightly run at 2:20 AM local time.
Output Expectations
After each run, script prints a JSON summary:
- number of source files read
- extracted decisions/preferences/facts
- promoted facts/preferences/patterns