Add PostgreSQL full-text search alongside pgvector for exact matches
on Jira keys, error messages, file paths. Merge results with
Reciprocal Rank Fusion. Default mode: hybrid, with graceful
degradation to keyword-only when embeddings unavailable.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
SHA-256 hash check before embedding API call eliminates ~60-80% of
redundant embedding requests. Consolidates dual INSERT paths to single
INSERT with nullable embedding column.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When session_id is not provided, falls back to getSessionId() which
reads from CLAUDE_SESSION_ID env or ~/.cache/session-memory/current_session.
Fixes NOT NULL constraint violation on session_notes.session_id.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 7 complete: Advanced session analysis capabilities
New MCP Tools (3):
1. session_semantic_search - Vector similarity search across all sessions
2. session_productivity_analytics - Metrics (avg duration, tasks, commits, tokens)
3. session_pattern_detection - Detect patterns (tool usage, task types)
Features:
- Semantic search with embedding-based similarity
- Fallback to ILIKE text search if embeddings unavailable
- Analytics over configurable time periods (week/month/quarter)
- Pattern detection with frequency analysis
Use Cases:
- Find similar past work: "sessions about WhatsApp integration"
- Track productivity: avg commits/tasks per session
- Identify tool usage patterns: which tools used most often
- Analyze task type distribution
All 7 phases complete! System ready for testing.
Related: CF-257
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>