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
// Copyright (c) 2026 vectorless developers
// SPDX-License-Identifier: Apache-2.0
//! Document graph module — workspace-level cross-document relationship graph.
//!
//! This module provides:
//! - [`DocumentGraph`] — the graph data structure connecting documents by shared concepts
//! - [`DocumentGraphBuilder`] — constructs the graph from document keyword profiles
//! - [`DocumentGraphConfig`] — configuration for graph building and retrieval boosting
//!
//! The document graph is a workspace-scoped, weighted graph built from each document's
//! [`ReasoningIndex`](crate::document::ReasoningIndex) keyword data. It enables
//! graph-aware retrieval ranking where connected documents receive a relevance boost.
//!
//! # Data Flow
//!
//! ```text
//! Document Indexing → ReasoningIndex (topic_paths)
//! ↓
//! DocumentGraphBuilder::add_document()
//! ↓
//! DocumentGraph
//! ↓
//! Workspace::set_graph()
//! ↓
//! Engine::query() loads graph
//! ↓
//! CrossDocumentStrategy (graph boosting)
//! ```
// Re-export public API
pub use DocumentGraphBuilder;
pub use DocumentGraphConfig;
pub use ;