Research & Memory

Clew Code learns from your sessions over time. The memory system persists knowledge, preferences, and project context across sessions.

Auto-Memory

Clew Code automatically captures lessons from edit and exec sessions, storing them in .moocode/memory.md. The system tracks:

Long-Term Memory

The long-term memory system uses SQLite (~/.clew/projects/<project>/session-memory.db) with a human-like consolidation model:

AgeLevelDetail
< 7 daysRawFull session detail
1-4 weeksWeekly digestSummary + patterns
> 1 monthMonthly digestHigh-level trends
AncientPatterns onlyRecurring topics preserved

Memory Commands

❯ /memory save            # save session summary
❯ /memory timeline        # show chronological session history
❯ /memory stats           # activity density chart
❯ /memory digest          # weekly/monthly digests
❯ /memory preview         # preview sessions ready for consolidation
❯ /memory consolidate     # mark old sessions as consolidated
❯ /memory search <q>     # search stored memory entries

Research System

The research system enables deep-dive investigations with persistent findings. Research results are indexed and searchable across sessions.

❯ /research start "topic"    # start a research session
❯ /research list              # list all research topics
❯ /research show <id>        # show research findings