Expand description
Arbor Graph - Code relationship management
This crate manages the graph of code entities and their relationships. It provides fast lookups, traversals, and centrality scoring for prioritizing context in AI queries.
§Architecture
The graph uses petgraph internally with additional indexes for:
- Name-based lookups
- File-based grouping (for incremental updates)
- Kind-based filtering
§Example
use arbor_graph::ArborGraph;
use arbor_core::{CodeNode, NodeKind};
let mut graph = ArborGraph::new();
// Add nodes from parsing
let node = CodeNode::new("validate", "UserService.validate", NodeKind::Method, "user.rs");
let id = graph.add_node(node);
// Query the graph
let matches = graph.find_by_name("validate");Re-exports§
pub use store::GraphStore;pub use store::StoreError;pub use symbol_table::SymbolTable;
Modules§
Structs§
- Arbor
Graph - The code relationship graph.
- Centrality
Scores - Stores centrality scores after computation.
- Dependent
Info - Information about a dependent node.
- Edge
- An edge in the code graph with location info.
- Graph
Builder - Builds an ArborGraph from parsed code nodes.
- Graph
Edge - A simplified edge for graph export/visualization.
- Impact
Result - Result of an impact analysis query.
- Node
Info - Basic information about a node.
- Query
Result - Result of a context query.
Enums§
- Edge
Kind - The type of relationship between two code entities.
Functions§
- compute_
centrality - Computes centrality scores for all nodes in the graph.
Type Aliases§
- NodeId
- Unique identifier for a node in the graph.