diff --git a/CLAUDE.md b/CLAUDE.md index 041cfa3..2a47ad5 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -33,6 +33,16 @@ Cargo workspace with 16 crates under `crates/` (plus `libaec-sys`, an internal F the approximate `clawhdf5-ann` index for the vector stage (the index mirrors the cache and self-heals on drift). Build the agent with `--no-default-features --features float16` to force the exact linear cosine scan. + The index uses the HNSW paper's diversity heuristic for neighbour selection + (plain closest-M capped recall on clustered data: 0.31 recall@10 at 100K). Its + graph is saved to `.h5.ann` at each checkpoint and reloaded by `open()` + (tied to the checkpoint by a generation id; stale/damaged sidecars are + ignored and the index rebuilt). `hybrid_search` keeps one incremental BM25 + index for the life of the store and never writes the store: Hebbian + activation boosts are persisted by the next checkpoint (or on drop), not per + query. Measure any search-path change with + `cargo run --release -p clawhdf5-bench --bin search_harness` (baselines in + `BENCHMARKS.md`). - WAL (write-ahead log) for crash-safe persistence, with a chained CRC32 trailer per entry (each entry's CRC folds in the previous entry's CRC) so a corrupted, reordered, duplicated, or spliced entry stops replay cleanly