/** * Gate Engine — core gate evaluation logic. * * Validates inputs, checks review role coverage, and delegates to the * Verdict Aggregator for conclusion derivation. * * (arc42 §5.2.3, spec §FR-02/FR-04/FR-06) */ import type { GateVerdict, ReviewBundle, ArtifactRef, RuleVerdict, StageId, Result, ObjectiveKeyResult, GoalAlignment } from '../types/index.js'; import type { GateRule } from './gate-rule.js'; /** * Evaluate a gate with the provided review bundles. * * @param gateId - Identifier of the gate to evaluate. * @param reviewBundles - Review results from assigned reviewers. * @returns Result containing GateVerdict on success, RouterError on failure. */ export declare function evaluate(gateId: string, reviewBundles: ReviewBundle[]): Result; /** * Assess how well current-stage artifacts align with the OKR tree. * * Returns 'aligned' when ≥80% of KRs are on track, * 'drifting' when 50-79%, 'misaligned' when <50%. * * This is advisory only — it does not change gate pass/fail logic (AC-18.7). */ export declare function assessGoalAlignment(okrTree: ObjectiveKeyResult[], _artifacts: ArtifactRef[]): GoalAlignment; /** * GateEngine — SPI-based artifact evaluation. * * Register GateRule instances, then call evaluateGate() with a stageId * and artifacts. The engine filters applicable rules, evaluates each, * and aggregates results into a RuleVerdict. */ export declare class GateEngine { private readonly rules; /** Register a rule. Duplicate ids are allowed (evaluated independently). */ registerRule(rule: GateRule): void; /** * Load rules from a JSON configuration object (AC-4.53). * * Config format: * ```json * { "rules": [ * { "id": "my-rule", "appliesTo": ["implement", "review"], * "check": { "artifactType": "test-result", "minCount": 1 }, * "severity": "blocker", "message": "At least one test required" } * ]} * ``` */ loadRulesFromConfig(config: GateRuleConfig): void; /** Get all registered rules. */ getRules(): readonly GateRule[]; /** * Evaluate all applicable rules for a stage against the provided artifacts. * Returns a RuleVerdict with pass/fail, blockers, warnings, and score. * Empty rule set → default pass (score=1). */ evaluateGate(stageId: StageId, artifacts: ArtifactRef[]): RuleVerdict; } /** Configuration format for loading gate rules from JSON/YAML (AC-4.53). */ export interface GateRuleConfig { rules: Array<{ id: string; appliesTo: string[]; check: { artifactType?: string; minCount?: number; }; severity?: 'blocker' | 'warning'; message?: string; }>; } //# sourceMappingURL=gate-engine.d.ts.map