## Why BooCode agents lose all context between sessions and have no long-term memory. The 3-tier memory (Context→Daily→Core) provides cross-session persistence. Combined with context compression (DCP-style pruning) for tighter context windows, boulder state for work tracking across sessions, and a System Context model for typed context sources, this gives BooCode persistent agent intelligence. ## What Changes - Port memory_engine 3-tier memory to TypeScript (ContextTier + DailyTier + CoreTier) - Implement ContextTier: token-budget conversation summarization with RunningSummary - Implement DailyTier: Markdown-file-based daily records with lazy creation - Implement CoreTier: SQLite FTS5 + vector BLOB storage with hybrid search (vector 0.7 + keyword 0.3) - Implement Deep Dream consolidation: overnight LLM rewrite of long-term memory - Add manage-memory and search-memory tools for agents - Add context compression from opencode-dynamic-context-pruning (range/message dedup, purge errors, turn protection) - Add boulder state from oh-my-openagent (cross-session plan execution with auto-resumption) - Add System Context model from opencode (typed context sources, immutable epoch baselines, reconciliation) - Add SWR stale-while-revalidate caching for codecontext/boocontext tool results ## Capabilities ### New Capabilities - `context-tier`: Token-budget conversation summarization - `daily-tier`: Markdown-file-based daily memory records - `core-tier`: SQLite FTS5 + vector hybrid search long-term memory - `deep-dream`: Overnight LLM-based memory consolidation - `memory-tools`: Agent-accessible manage/search memory tools - `context-compression`: Range/message dedup, purge errors, turn protection - `boulder-state`: Cross-session plan execution with auto-resumption - `system-context`: Typed context sources with epoch baselines - `swr-caching`: Stale-while-revalidate for MCP tool results