/**
 * Discrepancy Detector
 *
 * Compares extracted code signatures against parsed specs to identify discrepancies.
 * Core principle: CODE is source of truth. When specs differ from code, specs need updating.
 *
 * @module core/discrepancy/detector
 */
import { Logger } from '../../utils/logger.js';
import { ParsedSpec } from './spec-parser.js';
import { FunctionSignature, TypeDefinition, ApiRoute } from './analyzers/index.js';
/**
 * Type of discrepancy detected.
 */
export type DiscrepancyType = 'api-route' | 'function-signature' | 'type-definition';
/**
 * Category of discrepancy (what changed).
 */
export type DiscrepancyCategory = 'added' | 'removed' | 'modified';
/**
 * Severity of the discrepancy.
 */
export type DiscrepancySeverity = 'trivial' | 'minor' | 'major' | 'breaking';
/**
 * Recommended action for the discrepancy.
 */
export type DiscrepancyRecommendation = 'auto-update' | 'review-required' | 'notify' | 'alert';
/**
 * Represents a detected discrepancy between code and spec.
 */
export interface Discrepancy {
    id: string;
    type: DiscrepancyType;
    category: DiscrepancyCategory;
    severity: DiscrepancySeverity;
    recommendation: DiscrepancyRecommendation;
    specPath: string;
    specLineNumber: number;
    codePath: string;
    codeLineNumber: number;
    specValue: string;
    codeValue: string;
    description: string;
    detectedAt: string;
}
/**
 * Code signatures extracted from the codebase.
 */
export interface CodeSignatures {
    functions: FunctionSignature[];
    types: TypeDefinition[];
    routes: ApiRoute[];
}
/**
 * Result of discrepancy detection.
 */
export interface DetectionResult {
    discrepancies: Discrepancy[];
    summary: {
        total: number;
        byCategory: Record<DiscrepancyCategory, number>;
        bySeverity: Record<DiscrepancySeverity, number>;
        byType: Record<DiscrepancyType, number>;
    };
}
/**
 * Detects discrepancies between code and specifications.
 */
export declare class DiscrepancyDetector {
    private readonly logger;
    private discrepancyCounter;
    constructor(options?: {
        logger?: Logger;
    });
    /**
     * Detect all discrepancies between specs and code.
     */
    detect(specs: ParsedSpec[], code: CodeSignatures): DetectionResult;
    private compareApiRoutes;
    private compareFunctions;
    private compareTypes;
    private findSimilarRoute;
    private findMovedRoute;
    private normalizePath;
    private compareSignatures;
    private formatFunctionSignature;
    private createDiscrepancy;
    private classifySeverity;
    private recommendAction;
    private calculateSummary;
}
//# sourceMappingURL=detector.d.ts.map