/**
 * Ecosystem Capability Graph Loader (ADR-030)
 *
 * Reads, validates, and caches the ecosystem capability graph from
 * docs/ecosystem.graph.json. Provides typed lookup methods for
 * the capability classifier and graph router.
 */
import type { AgentInput } from './weighted-resolver.js';
import type { CompositionRule } from './composition-engine.js';
export type StageName = 'prompt_structuring' | 'simulation' | 'research' | 'sparc_generation' | 'sparc_handoff' | 'adr_ddd_architecture' | 'implementation_planning' | 'build' | 'validation' | 'integration_mapping' | 'governance_finops' | 'decision_packaging' | 'specification' | 'architecture' | 'deployment' | 'governance';
export interface CapabilityEntry {
    readonly name: string;
    readonly description?: string;
    readonly repos: readonly string[];
    /** Agents can be plain strings or weighted objects (ADR-031 Phase 1). */
    readonly agents: readonly AgentInput[];
    readonly stage?: StageName;
    readonly depends_on?: readonly string[];
    readonly tags?: readonly string[];
}
export interface EcosystemGraph {
    readonly version: string;
    readonly description: string;
    readonly stages: readonly StageName[];
    readonly capabilities: readonly CapabilityEntry[];
    /** Composition rules for capability interaction (ADR-031 Phase 3). */
    readonly compositions?: readonly CompositionRule[];
    /** Fragments directory for federated mode (ADR-031 Phase 4). */
    readonly fragments_dir?: string;
}
export interface GraphValidationError {
    readonly path: string;
    readonly message: string;
}
/**
 * Resolve the path to the ecosystem graph file.
 * Looks relative to the project root (the directory containing package.json).
 */
export declare function resolveGraphPath(projectRoot?: string): string;
/**
 * Load and validate the ecosystem capability graph.
 *
 * Returns a validated, immutable graph object. The result is cached for the
 * lifetime of the process. Pass `forceReload: true` to bypass the cache.
 *
 * @throws Error if the graph file cannot be read or fails validation.
 */
export declare function loadEcosystemGraph(options?: {
    graphPath?: string;
    forceReload?: boolean;
}): EcosystemGraph;
/**
 * Clear the cached graph. Useful for testing.
 */
export declare function clearGraphCache(): void;
/**
 * Look up a capability by exact name.
 */
export declare function getCapabilityByName(graph: EcosystemGraph, name: string): CapabilityEntry | undefined;
/**
 * Find all capabilities that have a matching tag.
 */
export declare function getCapabilitiesByTag(graph: EcosystemGraph, tag: string): readonly CapabilityEntry[];
/**
 * Find all capabilities assigned to a given stage.
 */
export declare function getCapabilitiesByStage(graph: EcosystemGraph, stage: StageName): readonly CapabilityEntry[];
/**
 * Resolve the full dependency tree for a set of capability names.
 * Returns all capability names including transitive dependencies.
 * Uses iterative BFS to avoid stack overflow on deep graphs.
 */
export declare function resolveDependencies(graph: EcosystemGraph, capabilityNames: readonly string[]): readonly string[];
//# sourceMappingURL=graph-loader.d.ts.map