/**
 * Expert Orchestrator
 *
 * Picks an ordered sequence of expert droids for a given task, using the
 * existing CapabilityRouter for the primary match plus a canonical lifecycle
 * sequence (plan → architect → implement → review → release) to layer
 * appropriate experts at each phase.
 *
 * Persists per-droid success rates by reusing the AdaptivePatternStore
 * abstraction so the chain composition improves over time.
 */
import type { Task } from '../tasks/types.js';
import { CapabilityRouter, type RoutingResult } from './capability-router.js';
export type ChainPhase = 'ideate' | 'plan' | 'design' | 'implement' | 'review' | 'release';
export interface ChainStep {
    phase: ChainPhase;
    droid: string;
    rationale: string;
    /** Parallel-safe with other steps in the same phase. */
    parallel: boolean;
    /** Estimated success rate from adaptive metrics; null if not enough data. */
    successRate: number | null;
}
export interface ChainPlan {
    task: string;
    capability: RoutingResult;
    steps: ChainStep[];
    /** Capability-router confidence for the primary match (0–1). */
    confidence: number;
}
interface OrchestratorOptions {
    /** Override the canonical phase sequence (mainly for tests). */
    phases?: ChainPhase[];
    /** Custom CapabilityRouter (mainly for tests). */
    router?: CapabilityRouter;
    /** Adaptive-success lookup. Returns null when there is no history. */
    successRateFor?: (droid: string) => number | null;
    /**
     * Prepend the opt-in `ideate` phase (open-collider divergent ideation).
     * Off by default — ideation only pays off for genuinely novel problems.
     * Ignored when `phases` is supplied explicitly.
     */
    includeIdeation?: boolean;
}
/**
 * Orchestrator entry point. Stateless — instantiating is cheap; persistence
 * for adaptive metrics is delegated to the injected `successRateFor`.
 */
export declare class ExpertOrchestrator {
    private readonly router;
    private readonly phases;
    private readonly successRateFor;
    constructor(options?: OrchestratorOptions);
    /**
     * Build a recommended chain for the given task. Task content drives the
     * capability match; the phase roster fills out the lifecycle layers.
     */
    plan(task: Task, affectedFiles?: string[]): ChainPlan;
}
/**
 * Convenience for callers that have a free-form task description rather than
 * a full `Task`. Wraps the string in a minimal Task shape.
 */
export declare function planFromDescription(description: string, orchestrator?: ExpertOrchestrator, affectedFiles?: string[]): ChainPlan;
export {};
//# sourceMappingURL=expert-orchestrator.d.ts.map