A detailed account of rewriting Kodit, a code RAG system combining BM25 and vector search, from Python to Go using Claude Code for AI-assisted migration. The author documents key architectural decisions and specific failures: the AI resurrected a deprecated snippets table by following dead code references, defaulted to burying everything in Go's internal/ package (blocking library use), scattered configuration across files, and implemented in-memory pagination. Multiple testing layers were required to catch issues—unit tests alone were insufficient, and a ranking comparison test revealed embedding truncation errors, an RRF off-by-one bug, and wrong embedding reads. The Go rewrite delivers a native client library, ~5x performance improvement, and cleaner architecture, but required constant human oversight to correct AI-generated architectural mistakes.

11m read timeFrom blog.helix.ml
Post cover image
Table of contents
The Migration ApproachArchitectural DecisionsTesting and ValidationWhat the AI Got WrongThe New KoditWhat’s NextConclusion

Sort: