module Rigor::ModuleGraph::Reachability

Restricts an edge list to the subgraph reachable from a set of root nodes within a hop limit.

Used by the +–from+ / +–depth+ CLI flags to make a graph focused on one or a few constants tractable to look at on a large project (where dumping every edge produces 1000+-node Mermaid output that browsers refuse to render).

Direction is configurable:

+:out+:: follow edges in the natural direction (depends-on) +:in+:: follow edges backwards (depended-on-by) +:both+:: union of the two (the default — usually what “what’s around Article?” means)