/** * DecisionEngine — Evaluates signals and plans actions * * Given a signal, determines the appropriate action considering: * - Signal severity and target type (affects risk) * - Historical success rate (affects confidence) * - Current trust level and permissions * - Governance rules */ import { Signal, PlannedAction } from '../types.js'; import { TrustManager } from '../governance/trust-manager.js'; import { RulesEngine } from '../governance/rules-engine.js'; export declare class DecisionEngine { private trustManager; private rulesEngine; constructor(trustManager: TrustManager, rulesEngine: RulesEngine); /** * Evaluate a signal and plan an action * * Returns a PlannedAction that: * 1. Has a recommended action from the rules engine * 2. Calculates risk based on signal and target type * 3. Calculates confidence from success history * 4. Checks if the action is permitted at current trust level * 5. Downgrades action if not permitted */ evaluate(signal: Signal): Promise; /** * Calculate risk level based on signal severity and target type * * - Component deletion = critical * - Breaking changes = critical * - Token renames = medium * - Documentation changes = low * - Default = based on signal severity */ private calculateRisk; /** * Calculate confidence score (0-1) based on trust manager's success rate * * Confidence = accepted / total completions * Caps at 0.95 to leave room for humility */ private calculateConfidence; /** * Downgrade an action to the highest permitted action at the current trust level * * Downgrade hierarchy (in order of permission): * escalate > auto_merge > auto_fix > create_pr > draft_pr > suggest > notify */ private downgradeAction; /** * Generate human-readable description of the planned action */ private describeAction; } //# sourceMappingURL=decision-engine.d.ts.map