arbor-graph 0.1.0

Graph schema and relationship tracking for Arbor
Documentation

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");