1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//! # RAG — Codebase Indexing and Semantic Search
//!
//! This module provides RAG (Retrieval-Augmented Generation) capabilities for semantic
//! code search across large projects. It combines vector embeddings with BM25 keyword
//! search to enable intelligent code retrieval.
//!
//! ## Architecture
//!
//! - `client::RagClient` — Core library API (indexing, querying, git search)
//! - `embedding` — FastEmbed (all-MiniLM-L6-v2) local embedding generation
//! - `indexer` — File walking, AST-based chunking for 12 languages
//! - `git` — Git history walking and commit chunking
//! - `cache` — Persistent hash cache for incremental updates
//! - `git_cache` — Git commit tracking cache
//! - `config` — Configuration management
//! - `types` — Request/response types with validation
//! - `error` — Domain-specific error types
//!
//! ## External Dependencies (from sibling crates/modules)
//!
//! - Vector database operations → `brainwires_storage::vector_db`
//! - BM25 keyword search → `brainwires_storage::bm25_search`
//! - Path utilities → `brainwires_storage::paths`
//! - Glob utilities → `brainwires_storage::glob_utils`
//! - Code analysis (definitions, references) → `crate::code_analysis`
//! - Spectral reranking → `crate::spectral`
// ── Always-available modules ────────────────────────────────────────────────
/// Domain-specific error types for the RAG system.
/// Request/response types with validation.
// ── Core RAG modules ────────────────────────────────────────────────────────
/// Persistent file hash cache for incremental updates.
/// Configuration management with environment variable support.
/// Embedding generation using FastEmbed.
/// Git history walking and commit chunking.
/// Git commit tracking cache.
/// File walking, AST parsing, and code chunking.
/// Core library client API (indexing, querying, search, git history).
/// Document processing, chunking, and hybrid search.
// ── Re-exports ──────────────────────────────────────────────────────────────
pub use RagClient;
pub use Config;
pub use RagError;
pub use ;
pub use ;