Skip to main content

Crate rto_graph

Crate rto_graph 

Source
Expand description

Provenance-tagged knowledge graph store.

Every edge in a Roteiro graph carries a Provenance tag recording how it was produced: deterministically derived from source ASTs, authored by a human or agent in an ADR/blueprint, or inferred heuristically from docs and other artifacts. See ADR-0001.

The graph is a set of Nodes addressed by a deterministic natural Node::key, connected by Edges. Facts extracted from one source blob are grouped into a FactSet and applied atomically to a Store.

Structs§

BlobRef
A blob in a tree: its repository-relative path and hex object id.
Edge
An edge in the knowledge graph, connecting two nodes by their keys.
FactSet
The set of nodes and edges extracted from a single source blob (or otherwise assembled together). Applying a fact set to a crate::Store is atomic.
FileNodeExtractor
Fallback extractor: emits a single file node per blob, tagged with its blob hash and basic size metadata. Produces no edges. Used for files with no registered language.
Node
A node in the knowledge graph.
ObjectCache
A content-addressed store of fact sets on disk.
Registry
Dispatches extraction to a language-aware extractor by file extension, falling back to FileNodeExtractor when no language is registered.
Repo
A discovered git repository.
RustExtractor
Derived extractor for Rust source, backed by tree-sitter. Emits a file node, one symbol node per fn/struct/enum/trait/mod (and a few others) with defines/contains edges reflecting lexical nesting, and imports edges for use declarations. Each function records the simple names it calls in meta.calls for later cross-file resolution.
Span
A byte-offset range within a source blob (start..end).
Store
A Roteiro graph store backed by a single SQLite database.
SyncReport
A summary of the work a sync performed.

Enums§

CacheError
Errors raised by the object cache.
Direction
Direction of traversal when querying a node’s neighbours.
EdgeKind
The kind of a graph edge (the relationship it records).
GitError
Errors raised while reading from a git repository.
NodeKind
The kind of a graph node.
Provenance
How an edge in the graph was produced.
StoreError
Errors raised by the store.
SyncError
Errors raised while syncing.

Traits§

Extractor
Turns one source blob into the nodes and edges derived from it.

Functions§

sync
Sync store to the repository’s HEAD tree, extracting changed blobs with extractor and caching results in cache.