import type { RuleDefinition, RuleDecision, RuleConflict, EngineInput, EngineOutput } from "./types.js"; export declare class DecisionEngine { private rules; constructor(); /** * Filter rules by tech stack. */ filterByTechStack(techStack: string[]): RuleDefinition[]; /** * Run the four-question judgment flow for all applicable rules. */ evaluate(input: EngineInput): EngineOutput; /** * Detect conflicts between decisions using the conflict matrix. * Only reports conflicts where both rules are active in the decision set. */ detectConflicts(decisions: RuleDecision[]): RuleConflict[]; /** * Four-question judgment flow for a single rule. * * Q1: 可形式化吗? (checkFormalizable) * Q2: 代价多高? (adjustCost) * Q3: 反馈要多快? (estimateFeedbackSpeed) * Q4: 频率多高? (estimateFrequency) */ private _decide; /** Q1: 可形式化吗? */ private _checkFormalizable; /** Q2: 代价多高?(考虑项目阶段调整) */ private _adjustCost; /** Q3: 反馈要多快?(直接使用 rule 定义的 feedbackSpeed) */ private _estimateFeedbackSpeed; /** Q4: 频率多高?(考虑团队规模调整) */ private _estimateFrequency; /** * Special rules that require fixed medium assignments. * These bypass the four-question flow for safety/process reasons. * Returns the fixed medium or null to fall through to normal decision flow. */ private _specialCases; /** * Map (formalizable, cost, feedbackSpeed, frequency) → RuleMedium. * * Core logic: * - formalizable + low cost + fast feedback → linter_warn * - formalizable + high frequency + commit-time → hook * - formalizable + slow feedback needed → ci * - not formalizable + high frequency → claude_md (cognitive) * - high cost + medium frequency → settings (soft nudge) * - fallthrough: use rule's recommendedMedium */ private _finalDecision; /** Calculate confidence score (0-1) based on decision alignment. */ private _calculateConfidence; } //# sourceMappingURL=engine.d.ts.map