« All posts

trelix v1.0 to v2.7: From Simple Search to a Platform

trelix's evolution from v1.0 to v2.7 covers a knowledge graph, seven retrieval legs, an agentic loop, and production hardening that turned it into a platform.

Thirteen days after trelix's v1.0 launch, its creator discovered that a config parameter he'd added was being silently ignored: AdaptiveRouter kept rebuilding its settings from environment variables instead of honoring the retrieval_config passed to it. The bug never crashed anything — it just made careful configuration invisible. The fix didn't land until v2.7.0 (PR #55), and in between the project underwent a fundamental transformation.

v2.0 and v2.1 introduced trelix/graph/, turning the codebase from a flat symbol list into a modeled system: a unified CodeGraph of call, import, and type edges, Louvain-based community detection for architectural modules, and an LLM-driven ConceptExtractor to name them. Graph search became a fourth retrieval leg, pagerank-style centrality boosted architecturally important symbols, and watch mode kept the graph updated incrementally. The release also shipped one deliberate breaking change, renaming the old trelix graph command to trelix call-graph.

On the retrieval side, the system grew from three legs to seven, each grounded in a specific paper: RAPTOR-style file summarization, HyDE's query-to-synthetic-code translation, multi-query expansion, and FLARE's confidence-gated re-retrieval loop. A CoIR-format eval harness and query telemetry arrived alongside. One detail stands out: MultiQueryExpander existed as a class in v2.1 but nothing called it — it wasn't actually wired in until v2.3.0, and a single-character slice (variants[1:] instead of variants[:]) was what kept the original query from double-counting in fusion.

v2.2.0 pushed trelix beyond pure retrieval with a ReAct-style agentic loop, real taint/data-flow analysis, SPLADE-Code sparse retrieval, and multi-granularity indexing. The same window brought preemptive production hardening: DimensionGuard now catches embedding provider/dimension mismatches at startup instead of letting them silently corrupt similarity scores, with the same guard later extended to the file watcher. The MCP surface matured too, adding reusable resources, prompts, and subscription-based update notifications instead of one-off tool calls.