/**
 * Verification gates management - ported from lib/validation/verification.sh
 *
 * Implements gate dependency chains, round management, failure logging,
 * epic lifecycle transitions, and circular validation prevention.
 *
 * Gate Dependency Chain:
 *   implemented -> testsPassed -> qaPassed -> cleanupDone -> securityPassed -> documented
 *
 * @task T4526
 * @epic T4454
 */
export declare const VERIFICATION_GATE_ORDER: readonly ["implemented", "testsPassed", "qaPassed", "cleanupDone", "securityPassed", "documented"];
export type GateName = (typeof VERIFICATION_GATE_ORDER)[number];
export declare const VERIFICATION_VALID_AGENTS: readonly ["planner", "coder", "testing", "qa", "cleanup", "security", "docs"];
export type AgentName = (typeof VERIFICATION_VALID_AGENTS)[number];
export interface FailureLogEntry {
    gate: GateName;
    agent: string;
    reason: string;
    timestamp: string;
    round: number;
}
export interface VerificationGates {
    implemented: boolean | null;
    testsPassed: boolean | null;
    qaPassed: boolean | null;
    cleanupDone: boolean | null;
    securityPassed: boolean | null;
    documented: boolean | null;
}
export interface Verification {
    passed: boolean;
    round: number;
    gates: VerificationGates;
    lastAgent: string | null;
    lastUpdated: string;
    failureLog: FailureLogEntry[];
}
export type VerificationStatus = 'pending' | 'in-progress' | 'passed' | 'failed';
/** @task T4526 */
export declare function isValidGateName(name: string): name is GateName;
/** @task T4526 */
export declare function isValidAgentName(name: string): name is AgentName;
/** @task T4526 */
export declare function getGateOrder(): GateName[];
/** @task T4526 */
export declare function getGateIndex(gateName: GateName): number;
/** @task T4526 */
export declare function getDownstreamGates(fromGate: GateName): GateName[];
/**
 * Initialize a new verification object with default values.
 * @task T4526
 */
export declare function initVerification(): Verification;
/**
 * Compute whether verification has passed based on required gates.
 * @task T4526
 */
export declare function computePassed(verification: Verification, requiredGates?: GateName[]): boolean;
/**
 * Update the passed field on a verification object.
 * @task T4526
 */
export declare function setVerificationPassed(verification: Verification, passed: boolean): Verification;
/**
 * Update a single gate value.
 * @task T4526
 */
export declare function updateGate(verification: Verification, gateName: GateName, value: boolean | null, agent?: string): Verification;
/**
 * Reset all downstream gates to null after a gate failure.
 * @task T4526
 */
export declare function resetDownstreamGates(verification: Verification, fromGate: GateName): Verification;
/**
 * Increment the round counter.
 * Returns null if max rounds exceeded.
 * @task T4526
 */
export declare function incrementRound(verification: Verification, maxRounds?: number): Verification | null;
/**
 * Log a failure to the failureLog array.
 * @task T4526
 */
export declare function logFailure(verification: Verification, gateName: GateName, agent: string, reason: string): Verification;
/**
 * Check if all required gates have passed.
 * @task T4526
 */
export declare function checkAllGatesPassed(verification: Verification, requiredGates?: GateName[]): boolean;
/**
 * Check if verification is complete (passed = true).
 * @task T4526
 */
export declare function isVerificationComplete(verification: Verification | null): boolean;
/**
 * Get verification status for display.
 * @task T4526
 */
export declare function getVerificationStatus(verification: Verification | null): VerificationStatus;
/**
 * Check if a task type should require verification.
 * @task T4526
 */
export declare function shouldRequireVerification(taskType?: string, verificationEnabled?: boolean): boolean;
/**
 * Get gate names that are not yet true.
 * @task T4526
 */
export declare function getMissingGates(verification: Verification, requiredGates?: GateName[]): GateName[];
/**
 * Get gate summary for display.
 * @task T4526
 */
export declare function getGateSummary(verification: Verification): {
    passed: boolean;
    round: number;
    gates: VerificationGates;
    lastAgent: string | null;
    lastUpdated: string;
    failureCount: number;
};
export interface CircularValidationResult {
    valid: boolean;
    error?: string;
    code?: number;
}
/**
 * Check for circular validation (self-approval prevention).
 * Prevents: creator validating own work, validator re-testing, tester self-creating.
 * @task T4526
 */
export declare function checkCircularValidation(currentAgent: string, createdBy?: string | null, validatedBy?: string | null, testedBy?: string | null): CircularValidationResult;
export interface TaskForVerification {
    id: string;
    status: string;
    parentId?: string | null;
    type?: string;
    verification?: Verification | null;
    epicLifecycle?: string;
}
/**
 * Check if all children of an epic have verification.passed = true.
 * @task T4526
 */
export declare function allEpicChildrenVerified(epicId: string, tasks: TaskForVerification[]): boolean;
/**
 * Check if all siblings of a task are verified.
 * @task T4526
 */
export declare function allSiblingsVerified(parentId: string, tasks: TaskForVerification[]): boolean;
//# sourceMappingURL=verification.d.ts.map