/** * DependencyAnalyzer Domain Service * * Analyzes dependencies between tasks * * @see REQ-PAD-001 - Dependency Analysis * @see DES-PAD-001 - DependencyAnalyzer */ import type { SubagentSpec } from '../entities/SubagentSpec.js'; /** * Dependency graph node */ export interface DependencyNode { /** Node ID (spec ID) */ readonly id: string; /** Dependencies (IDs this node depends on) */ readonly dependencies: readonly string[]; /** Dependents (IDs that depend on this node) */ readonly dependents: readonly string[]; } /** * Dependency graph */ export interface DependencyGraph { /** All nodes */ readonly nodes: ReadonlyMap; /** Execution levels (parallel groups) */ readonly levels: readonly (readonly string[])[]; /** Has circular dependencies */ readonly hasCircular: boolean; /** Circular dependency path if found */ readonly circularPath?: readonly string[]; } /** * Dependency analyzer interface */ export interface IDependencyAnalyzer { /** * Build dependency graph from specs * @param specs - Subagent specifications * @returns Dependency graph */ buildGraph(specs: SubagentSpec[]): DependencyGraph; /** * Get independent specs (no dependencies) * @param specs - Subagent specifications * @returns Independent specs */ getIndependentSpecs(specs: SubagentSpec[]): SubagentSpec[]; /** * Get execution order (topological sort) * @param graph - Dependency graph * @returns Ordered spec IDs */ getExecutionOrder(graph: DependencyGraph): string[]; /** * Check for circular dependencies * @param specs - Subagent specifications * @returns Circular path or null */ findCircularDependencies(specs: SubagentSpec[]): string[] | null; } /** * Create a dependency analyzer * * @returns IDependencyAnalyzer implementation */ export declare function createDependencyAnalyzer(): IDependencyAnalyzer; //# sourceMappingURL=DependencyAnalyzer.d.ts.map