import type { Spec, SpecDependencyGraph, SpecDependencyAnalysis } from '../types/index.js';
/**
 * Build a dependency graph from an array of specs.
 * Each spec's `dependencies` field lists the IDs it depends on.
 */
export declare function buildSpecDependencyGraph(specs: Spec[]): SpecDependencyGraph;
/**
 * Detect circular dependencies using DFS with a recursion stack.
 * Returns an array of cycles, each cycle being an array of spec IDs.
 */
export declare function detectCycles(graph: SpecDependencyGraph): string[][];
/**
 * Topological sort in waves (levels). Each wave contains specs that can
 * execute in parallel once all previous waves are complete.
 * Returns empty array if cycles exist.
 */
export declare function getExecutionOrder(graph: SpecDependencyGraph): string[][];
/**
 * Find the critical path — the longest chain by sum of estimates.
 * Uses dynamic programming on the DAG (assumes no cycles).
 */
export declare function findCriticalPath(graph: SpecDependencyGraph): string[];
/**
 * Generate a Mermaid flowchart diagram of the dependency graph.
 * Highlights the critical path in red.
 */
export declare function generateMermaidDiagram(graph: SpecDependencyGraph, criticalPath: string[]): string;
/**
 * Full analysis: build graph, detect cycles, compute critical path,
 * execution waves, and generate Mermaid diagram.
 */
export declare function analyzeSpecDependencies(specs: Spec[]): SpecDependencyAnalysis;
//# sourceMappingURL=spec-dependency-graph.d.ts.map