gid-core
Rust core library for Graph Indexed Development — graph-based project management and code intelligence.
This is the source of truth for all GID logic. Used by gid-cli, RustClaw, and swebench-agent.
Installation
[]
= "0.1"
Or from git:
[]
= { = "https://github.com/tonitangpotato/graph-indexed-development" }
Quick Start
Load and Query a Graph
use ;
use QueryEngine;
use Path;
// Load the project graph
let graph = load_graph?;
// Get ready tasks (todo with all deps done)
let ready = graph.ready_tasks;
for task in ready
// Query dependencies
let engine = new;
let impacted = engine.impact; // What breaks if this changes?
let deps = engine.deps; // Transitive dependencies
let path = engine.path; // Shortest path between nodes
Create and Save a Graph
use ;
let mut graph = new;
// Add nodes
graph.add_node;
graph.add_node;
// Add edges
graph.add_edge;
// Update status
graph.update_status;
// Save
save_graph?;
Code Analysis (tree-sitter)
use ;
use Path;
// Extract code structure from a directory
let code_graph = extract_from_dir;
// Find relevant code for a bug description
let keywords = vec!;
let relevant = code_graph.find_relevant_nodes;
// Impact analysis — what breaks if I change these files?
let impact = analyze_impact;
println!;
// Trace test failures to root cause
let symptoms = vec!;
let chains = code_graph.trace_causal_chains_from_symptoms;
Task Management with Knowledge
use ;
let mut graph = load_graph?;
// Nodes have built-in knowledge fields
if let Some = graph.get_node_mut
save_graph?;
Modules
| Module | Description |
|---|---|
graph |
Core types: Graph, Node, Edge, NodeStatus |
parser |
YAML load/save: load_graph(), save_graph() |
query |
Graph queries: impact, deps, path, common cause, topo sort |
validator |
Validation: cycles, orphans, missing refs, duplicates |
code_graph |
Code intelligence with tree-sitter (Python, extensible) |
history |
Version history: snapshots, diff, restore |
visual |
Visualization: ASCII, DOT, Mermaid |
advise |
Health analysis and improvement suggestions |
design |
Generate graph from natural language requirements |
semantify |
Upgrade file graph to semantic graph (layers, components) |
refactor |
Graph refactoring: rename, merge, split, extract |
working_mem |
Agent working memory and impact analysis |
task_graph_knowledge |
Per-node knowledge storage (findings, file cache, tool history) |
complexity |
Change complexity assessment |
unified |
Merge code graph + task graph |
ignore |
.gitignore-style pattern matching |
Key Types
// Graph structure
// Nodes can be tasks, components, files, etc.
// Edges define relationships
// Code analysis types
Who Uses This
- gid-cli — Command-line interface for GID
- RustClaw — Agent harness
- swebench-agent — SWE-bench agent
Stats
- 165 public functions
- 50 tests
- ~10,000 lines of Rust
License
MIT — See LICENSE for details.