/** * Transitive Reduction * * Computes the transitive reduction of a DAG: the minimal set of edges that * preserves the exact same reachability (transitive closure) as the input graph. * * For a DAG the transitive reduction is unique. An edge u → v is redundant when v * is reachable from u through some OTHER direct child w of u (w ≠ v). Removing all * redundant edges yields the reduced graph. * * This is purely a VIEW transformation for architecture/dependencies.json — it must * never feed back into package.json or build order. Build order continues to follow * nx's full project graph (via `^build`); reduction preserves reachability, so any * topological order valid for the full graph is also valid for the reduced graph. * * The input MUST be acyclic. Reduction is undefined on cycles; callers run the * cycle-detecting topological sort (graph-sorter) which throws on cycles first. */ /** * Compute the transitive reduction of a DAG. * * @param graph - Full DAG as { project: [directChildren] } * @returns Reduced graph { project: [minimalDirectChildren] } (children sorted) */ export declare function transitiveReduction(graph: Record): Record;