Repository navigation
Closed
Description
Epic: Knowledge Graph Intelligence — v0.8.0
Vision
Transform Cortex's graph from a passive fact viewer into an active intelligence layer — with smarter search ranking, blast-radius analysis, topic communities, richer MCP tools, and temporal exploration. Inspired by structural patterns in GitNexus (code knowledge graphs), adapted for Cortex's personal-memory domain where facts have confidence, temporal decay, and multi-source provenance.
Issues
| # | Issue | Category | Effort | Priority | Depends On |
|---|---|---|---|---|---|
| #205 | RRF (Reciprocal Rank Fusion) search mode | Search | S | P0 | — |
| #206 | Impact / blast-radius endpoint + UI view | Graph | M | P0 | — |
| #207 | Topic clustering with cohesion scores at import time | Graph | L | P1 | — |
| #208 | Graph-aware MCP tools (graph_explore, graph_impact) |
MCP | M | P1 | #206 |
| #209 | Temporal flow view — knowledge evolution timeline | Graph | L | P2 | — |
Suggested Execution Order
Phase 1 (parallel): #205 (RRF) + #206 (Impact endpoint)
Phase 2 (parallel): #207 (Clustering) + #208 (MCP tools, after #206 merges)
Phase 3: #209 (Timeline view)
#205 and #206 have zero dependencies and can be built simultaneously. #208 wraps #206's impact endpoint so it gates on that. #207 is independent but large. #209 is the most complex and benefits from all prior work being stable.
Design Principles
- Pre-compute at ingest time — clustering and scoring happen during import/extract, not at query time. Queries stay fast.
- SQLite-native — no new database engine. All new features build on existing FTS5 + WAL store. Graph traversal stays in Go.
- Backward compatible — existing
cortex search,cortex graph, and MCP tools keep working. New features are additive. - Observable — every new feature exposes stats (cluster count, RRF vs WSF comparison, impact depth) so we can validate quality.
Architecture
Import → Extract Facts → [NEW] Cluster Assignment + Cohesion Scoring (#207)
→ Store (SQLite)
→ [NEW] Temporal index (created_at bucketing) (#209)
Search → BM25 + Semantic → [NEW] RRF fusion option (#205)
→ [EXISTING] WSF fusion (default)
Graph API → /api/graph (existing)
→ [NEW] /api/impact?subject=X&depth=N (#206)
→ [NEW] /api/clusters (#207)
→ [NEW] /api/timeline?subject=X (#209)
MCP → [EXISTING] search tool
→ [NEW] graph_explore tool (#208)
→ [NEW] graph_impact tool (#208)
→ [NEW] list_clusters tool (#208, gated on #207)
Success Criteria
-
cortex search "trading" --mode rrfreturns results with RRF scores (feat(search): Add RRF (Reciprocal Rank Fusion) search mode #205) -
/api/impact?subject=tradingreturns grouped connected facts with confidence heatmap (feat(graph): Impact / blast-radius endpoint and UI view #206) -
cortex clusterlists topic communities with cohesion scores (feat(graph): Topic clustering with cohesion scores at import time #207) - Graph explorer shows color-coded clusters (feat(graph): Topic clustering with cohesion scores at import time #207)
- MCP
graph_exploreandgraph_impacttools registered and functional (feat(mcp): Graph-aware MCP tools (graph_explore, graph_impact) #208) - Timeline view shows fact evolution for a subject across dates (feat(graph): Temporal flow view — knowledge evolution timeline #209)
- All existing tests still pass (280+)
- 50+ new tests across all issues
Dependencies
- v0.7.0 released ✅ (tag: v0.7.0, Feb 24 2026)
- Graph explorer with search/filter/fact inspector ✅ (feat(graph): search, filter, and fact inspector in graph explorer #197)
- Search improvements with source weighting ✅ (feat(search): hybrid search improvements — freshness boost, source weighting #199)
References
- GitNexus — pre-computed clustering, impact analysis, RRF search, MCP tools
- Reciprocal Rank Fusion paper — Cormack et al. 2009
- Cortex v0.7.0 CHANGELOG for current graph/search capabilities
Activity
hurttlocker commentedon Feb 24, 2026
Merged in v0.8.0 release