Skip to main content

Crate drft

Crate drft 

Source

Modules§

builders
Builders turn a source’s (path, bytes) records into graph nodes and edges. v0.8 ships the fs node builder plus two text builders (parsers): markdown (edges) and frontmatter (edges + metadata).
compose
Composition: the projection from the raw set of per-graph fragments into a single composed graph. This is the only module that knows about more than one graph, and the only place the reserved @ and _ sigils appear.
config
diagnostic
graphs
Graph wiring: build each configured graph independently into its own bare-path namespace, producing the raw GraphSet (the substrate). Composition into a single graph is a separate projection (see crate::compose).
impact
drft impact: list the nodes transitively affected by a change to the seed nodes, as a flat, instruction-bearing list sorted by review priority. The ranking metrics (impact_radius, betweenness) are computed inline over the composed graph — there is no separate analyses layer.
lock
The lockfile: a snapshot of node content hashes and per-node outbound edge target hashes, keyed by path. Lock is infrastructure, not a graph — the graph carries current observations only; drft check joins this snapshot to derive staleness.
model
Core graph data model and JGF (JSON Graph Format) serialization.
parsers
Text parsers: the link/metadata extractors the text builders wrap. markdown extracts body links; frontmatter extracts YAML frontmatter links and the metadata block.
rules
v0.8 rules over the composed graph: staleness (drift vs the lockfile) and structural findings, orchestrated by check.
sources
Sources deliver (path, bytes) records to builders. v0.8 ships a single built-in source: fs, the filesystem walk.
util
Path, URI, and hashing utilities shared by the sources, builders, and rules.