import type { ProfileId } from '../profiles/index.js';
import type { PhaseOverride, WorkflowPhase } from '../types/index.js';
export type PhaseDefinition = {
    id: WorkflowPhase;
    profile: ProfileId;
    profiles: ProfileId[];
    label: string;
    order: number;
    alwaysIncluded: boolean;
    triggeredByProfiles: string[];
    gatesAfter: WorkflowPhase[];
    deliversTo: WorkflowPhase[];
    validatesWith: WorkflowPhase[];
    playbooks: string[];
};
export type TaskRoleDeclaration = {
    required: string[];
    optional: string[];
};
export declare const PHASE_REGISTRY: PhaseDefinition[];
export declare function getPhaseDefinition(phase: WorkflowPhase): PhaseDefinition;
export declare function phaseToProfile(phase: WorkflowPhase): ProfileId;
export declare function allPhaseIds(): WorkflowPhase[];
export declare function phasePlaybooks(phase: WorkflowPhase): string[];
export declare function resolvePhaseSequenceFromRoles(taskRoles?: TaskRoleDeclaration, activeProfiles?: string[]): WorkflowPhase[];
export type PhasePlanInput = {
    taskRoles?: TaskRoleDeclaration;
    activeProfiles?: string[];
    overrides?: PhaseOverride[];
    declaredPhases?: WorkflowPhase[];
};
export type ResolvedPhasePlan = {
    included: Array<{
        phase: WorkflowPhase;
        profile: ProfileId;
        source: 'always' | 'role-required' | 'role-optional' | 'profile-trigger' | 'override-add' | 'declared';
        gateAfter: boolean;
    }>;
    skipped: Array<{
        phase: WorkflowPhase;
        reason: string;
    }>;
    gates: string[];
};
export declare function buildPhasePlan(input: PhasePlanInput): ResolvedPhasePlan;
export declare function derivePhaseGates(phases: WorkflowPhase[]): Set<string>;
export declare function phaseDeliversTo(phase: WorkflowPhase): WorkflowPhase[];
export declare function phaseValidatesWith(phase: WorkflowPhase): WorkflowPhase[];
