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:
- Project conventions and patterns
- User preferences and workflow choices
- Frequently used commands and tools
- Architectural decisions and their rationale
Long-Term Memory
The long-term memory system uses SQLite (~/.clew/projects/<project>/session-memory.db) with a human-like consolidation model:
| Age | Level | Detail |
|---|---|---|
| < 7 days | Raw | Full session detail |
| 1-4 weeks | Weekly digest | Summary + patterns |
| > 1 month | Monthly digest | High-level trends |
| Ancient | Patterns only | Recurring 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