import type { SpecStatus, UpdateStatusInput, ToolResult } from '../../types/index.js';
import type { ReadinessGateOutput } from '../../types/spec/inputs.js';
import type { Spec } from '../../types/spec/core.js';
/**
 * Valid state transitions for spec lifecycle.
 * draft -> review -> approved -> implementing -> done
 * Also allow: review -> draft (send back), approved -> review (reconsider)
 *
 * SPEC-733: Terminal states (done, discarded) now support reverse transitions
 * with a mandatory reason. See REVERSE_TRANSITIONS.
 */
export declare const VALID_TRANSITIONS: Record<SpecStatus, SpecStatus[]>;
/**
 * Allowed reverse transition pairs (from terminal state back to active).
 * Only these two pairs are supported. Any other reverse pair is rejected.
 */
export declare const REVERSE_TRANSITIONS: (readonly [SpecStatus, SpecStatus])[];
/**
 * Returns true if the (from, to) pair is a whitelisted reverse transition.
 */
export declare function isReverseTransition(from: SpecStatus, to: SpecStatus): boolean;
/**
 * Validates that a reverse transition has the required reason.
 *
 * @returns `{ ok: true }` when valid, or `{ ok: false, error, fixHint }` when invalid.
 */
export declare function validateReverseTransition(input: {
    from: SpecStatus;
    to: SpecStatus;
    reason?: string;
}): {
    ok: true;
} | {
    ok: false;
    error: string;
    fixHint: string;
};
/**
 * SPEC-280: Returns the intermediate states to silently traverse when the
 * caller requests a forward jump (e.g. draft → approved skips review).
 *
 * Returns an array of intermediate statuses to execute before the target,
 * or null when no auto-advance is needed (direct transition or backward).
 */
export declare function resolveAutoAdvanceSteps(currentStatus: SpecStatus, targetStatus: SpecStatus): SpecStatus[] | null;
/**
 * Validates that a status transition is allowed.
 * Returns an error ToolResult if invalid, null if valid.
 */
export declare function checkTransition(currentStatus: SpecStatus, newStatus: SpecStatus): ToolResult | null;
/**
 * Validates DoR gate before transitioning to 'implementing'.
 * Returns an error ToolResult if blocked, null if passed.
 */
export declare function checkDorGate(spec: Spec, specId: string, projectId: string, newStatus: SpecStatus): ToolResult | null;
/**
 * SPEC-632: Block transition to 'approved' if ambiguity score < 70.
 * Best-effort: if spec file cannot be read, gate is skipped.
 */
export declare function checkAmbiguityGate(spec: Spec, newStatus: SpecStatus): Promise<ToolResult | null>;
/**
 * SPEC-769/SPEC-492: Readiness gate — block 'review'/'approved' when spec
 * quality is too low or the persisted spec document is not English.
 * Best-effort: if spec.md cannot be read, the gate is skipped (returns no block).
 *
 * - 0 criteria → InteractiveQuestion (hard block, no force path)
 * - score < 70 on approved && !forceApprove → InteractiveQuestion with 3 options
 * - score < 70 on approved && forceApprove → proceed, qualityWarnings populated
 * - score < 70 on review → block and keep draft
 * - non-English prose → hard block
 * - score >= 70 → proceed, no warnings
 */
export declare function checkReadinessGate(spec: Spec, newStatus: SpecStatus, forceApprove: boolean | undefined): Promise<ReadinessGateOutput>;
/**
 * SPEC-964: Challenge gate — block 'review' if challenge_spec was never run
 * or did not generate enough addressed scenarios.
 *
 * - Requires challengeReport to exist on the spec
 * - Requires at least 3 scenarios addressed
 * - High-risk specs (high/critical) require all 5 focus areas
 */
export declare function checkChallengeGate(spec: Spec, newStatus: SpecStatus): ToolResult | null;
export type { UpdateStatusInput };
//# sourceMappingURL=transition-guard.d.ts.map