CycleAdvisor
Turns detected dependency cycles into actionable break-up advice: for each cycle, the specific edge(s) to remove to make it acyclic.
The approach, per strongly connected component (over main edges only):
Take the SCC's induced subgraph.
Compute a feedback arc set - a set of edges whose removal breaks every cycle - with the Eades-Lin-Smyth greedy heuristic (deterministic, near-linear).
Map each arc back to the declared DependencyEdge so the suggestion can name the build file and the exact
configuration(project(...))line to delete.
Minimum feedback arc set is NP-hard, so the result is a good greedy approximation - honest as a suggestion. Removing all suggested edges for a component is still guaranteed to break its cycles. Pure functions - no I/O, no mutation of the input.
Functions
Suggests edges to cut to break every cycle in graph, strongest (largest cycle) first. Returns an empty list for an acyclic graph.