feat(memory): hybrid retrieval — navigation index.md + RAG hardening

Expose a navigation layer to the agent and harden RAG, after analyzing the
OKF note and testing on the real KB.

- memory_search.search(): dedupe best-chunk-per-file (a relevant note can no
  longer be buried by another file's chunks) + keyword fallback tagged
  degraded:True when Ollama is unreachable (no more hard crash).
- update_notes_index.py: emit per-folder index.md + root router; prune empty
  folders; fix latent subcategory->project bug.
- Exclude generated index.md from RAG rglob (reindex/incremental) + indexer
  scans + heartbeat freshness check (prevents self-pollution / reindex thrash).
- CLAUDE.md: reframe memory as hybrid (navigation first, RAG for fuzzy recall).
- Delete stale orphan kb/youtube/index.json; correct the OKF source note.
- Tests: dedup, keyword fallback, index.md exclusion. Plan + review in docs/.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-27 17:52:27 +00:00
parent 6e9dfd137c
commit 5c9748ffb4
23 changed files with 1526 additions and 164 deletions

18
memory/kb/tools/index.md Normal file
View File

@@ -0,0 +1,18 @@
# Index — tools/
> 7 note. Citește acest index întâi; deschide doar fișierele relevante.
- **[Antfarm - Flux Complet cu Discovery & PRD](antfarm-flux-complet.md)**
> **PRD complet = feature complet.**
- **[Proiecte pe LXC 171 — claude-agent](claude-agent-projects.md)**
- **Infrastructură / Proxmox** → romfastsql
- **[Cron Jobs - Lista completă](cron-jobs.md)**
Vezi: [FLUX-JOBURI.md](../projects/FLUX-JOBURI.md)
- **[Infrastructură (Proxmox + Docker)](infrastructure.md)**
- Orice operație distructivă
- **[Ralph Workflow - Sistem Complet](ralph-workflow.md)**
**Next:** Integrare night-execute
- **[Sales Scripts & Tehnici NLP](sales-scripts.md)** `@work #sales #nlp #scripts #prospecting #cold-calls`
**Actualizat:** La fiecare tehnică nouă descoperită
- **[Session Initialization Rule](session-initialization.md)**
- [x] Echo updates notes at session end