Documentation
¶
Overview ¶
Command spike6 proves vector search works in the same SQLite file as the graph.
Spike 6 of docs/ARCHITECTURE_PHASE1.md §9, with a twist. The plan was to test asg017/sqlite-vec, which CLAUDE.md flags as a risk: pre-1.0, breaking changes promised, pin the exact version. But ncruces/go-sqlite3 ships `ext/vec1` — SQLite's own vector extension (https://sqlite.org/vec1) — as a loadable WASM module already in the dependency tree.
So this tests vec1 first. If it works, M4 gets vector search with no new dependency and no pre-1.0 risk, and one documented risk disappears.
It does not just check that queries run. It checks that they return the right answers, by brute-forcing the same nearest-neighbour search in Go and comparing. A vector index that runs and ranks badly is worse than none.
Usage:
go run ./spikes/6-vectors