/** * FR-D01: Stage Transition Auto-Trigger. * * Automatically triggers gate checks when PipelineEngine transitions * between stages. On rejection, generates structured fixTasks and * emits 'gate-auto-triggered' event. * * (spec §FR-D01, AC-D01.1 through AC-D01.7) */ import type { StageId, ArtifactRef } from '../types/index.js'; import type { GateEngine } from '../gate/gate-engine.js'; import type { GateAutoTriggerRecord, TransitionGateBinding } from './types.js'; /** Result of an auto-triggered gate evaluation. */ export interface AutoTriggerResult { /** Whether the gate passed. */ passed: boolean; /** The full trigger record (AC-D01.6). */ record: GateAutoTriggerRecord; } /** * StageTransitionTrigger — evaluates gates at stage transition points. * * AC-D01.1: Automatically triggers gate when stage transitions. * AC-D01.2: Reuses FR-23/FR-25 evaluator chain via GateEngine. * AC-D01.5: Does not change gate pass/block semantics. */ export declare class StageTransitionTrigger { private readonly gateEngine; private readonly bindings; constructor(gateEngine: GateEngine, bindings: TransitionGateBinding[]); /** * Check if a transition point has a bound gate. */ hasGateBinding(fromStage: StageId, toStage: StageId): boolean; /** * Get the gate type for a transition point. */ getGateType(fromStage: StageId, toStage: StageId): string | undefined; /** * Evaluate the gate at a transition point. * * AC-D01.1: Auto-triggers without manual call. * AC-D01.2: Reuses GateEngine evaluation (FR-23/FR-25). * AC-D01.3: Generates fixTasks on rejection. * AC-D01.5: Same pass/block semantics as manual gate. * AC-D01.6: Returns full record for audit trail. */ evaluate(fromStage: StageId, toStage: StageId, artifacts: ArtifactRef[]): AutoTriggerResult | null; /** * Generate structured fix tasks from gate verdict blockers (AC-D01.3). * Each blocker is mapped to a fix task with frId, acId, description, and severity. */ private generateFixTasks; /** * Infer severity from gate score and blocker position. * Lower scores and earlier blockers get higher severity. */ private inferSeverity; /** * Infer FR ID from stage and blocker text. * Maps stage to the most likely FR that owns it. */ private inferFrId; /** * Infer AC ID from blocker text and index. */ private inferAcId; } //# sourceMappingURL=stage-transition-trigger.d.ts.map