1a8a16002e
engram_cosine_sim() was defined and embeddings were computed per-node via nomic-embed-text on write, but the function was never called during activation scoring. The goal_bias computation used only lexical substring matching, ignoring all stored embedding vectors. This change adds engram_embed_query() to embed the query string at search time (5s timeout so Ollama latency never blocks activation), then blends cosine similarity into the working-memory bias with α=0.3: bias_final = goal_bias(lexical) * (1 + 0.3 * max(0, cosine_sim)) Nodes with high semantic similarity to the query but low lexical overlap now receive up to 30% bias boost into working memory promotion. Gracefully degrades to pure lexical when Ollama is unavailable or node has no embedding.