memory-search: add --query mode and prompt key boost

Two changes:

1. New -q/--query flag for direct search without hook machinery.
   Useful for debugging: memory-search -q inner-life-sexuality-intimacy
   shows seeds, spread results, and rankings.

2. Prompt key boost: when the current prompt contains a node key
   (>=5 chars) as a substring, boost that term by +10.0. This ensures
   explicit mentions fire as strong seeds for spread, while the graph
   still determines what gets pulled in.

Co-Authored-By: ProofOfConcept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-03-13 15:26:35 -04:00
parent 5024cf7002
commit 1da712874b
3 changed files with 100 additions and 8 deletions

View file

@ -42,7 +42,7 @@ pub struct SpectralEmbedding {
pub coords: HashMap<String, Vec<f64>>,
}
fn embedding_path() -> PathBuf {
pub fn embedding_path() -> PathBuf {
crate::store::memory_dir().join("spectral-embedding.json")
}