/**
 * AI Code Review Module
 *
 * Implements automated code review before commits.
 * Research shows 73.8% of AI review comments are resolved (industrial study).
 *
 * Features:
 * - Review staged changes before commit
 * - Identify bugs, security issues, code smells
 * - Suggest improvements
 * - Integration with git workflow
 */
import { EventEmitter } from "events";
/**
 * Review issue severity
 */
export type IssueSeverity = "critical" | "major" | "minor" | "info";
/**
 * Review issue type
 */
export type IssueType = "bug" | "security" | "performance" | "style" | "maintainability" | "documentation" | "test-coverage" | "complexity";
/**
 * Code review issue
 */
export interface ReviewIssue {
    id: string;
    file: string;
    line: number;
    endLine?: number;
    type: IssueType;
    severity: IssueSeverity;
    message: string;
    suggestion?: string;
    code?: string;
    fixable: boolean;
}
/**
 * File diff information
 */
export interface FileDiff {
    file: string;
    status: "added" | "modified" | "deleted" | "renamed";
    additions: number;
    deletions: number;
    hunks: DiffHunk[];
}
/**
 * Diff hunk
 */
export interface DiffHunk {
    oldStart: number;
    oldLines: number;
    newStart: number;
    newLines: number;
    content: string;
}
/**
 * Code review result
 */
export interface ReviewResult {
    success: boolean;
    files: FileDiff[];
    issues: ReviewIssue[];
    summary: {
        filesReviewed: number;
        totalIssues: number;
        critical: number;
        major: number;
        minor: number;
        info: number;
    };
    duration: number;
    recommendation: "approve" | "request-changes" | "comment";
}
/**
 * Code review configuration
 */
export interface CodeReviewConfig {
    enabled: boolean;
    checkSecurity: boolean;
    checkPerformance: boolean;
    checkStyle: boolean;
    checkComplexity: boolean;
    checkTestCoverage: boolean;
    maxComplexity: number;
    autoFix: boolean;
    ignorePatterns: string[];
}
/**
 * Default code review configuration
 */
export declare const DEFAULT_REVIEW_CONFIG: CodeReviewConfig;
/**
 * Code Review Manager
 *
 * Manages automated code review for staged changes.
 */
export declare class CodeReviewManager extends EventEmitter {
    private config;
    private workingDirectory;
    constructor(workingDirectory: string, config?: Partial<CodeReviewConfig>);
    /**
     * Get staged changes
     */
    private getStagedDiff;
    /**
     * Parse git diff output
     */
    private parseDiff;
    /**
     * Check for pattern matches in content
     */
    private checkPatterns;
    /**
     * Analyze file for issues
     */
    private analyzeFile;
    /**
     * Simple glob pattern matching
     */
    private matchPattern;
    /**
     * Calculate nesting level (simple heuristic)
     */
    private calculateNestingLevel;
    /**
     * Review staged changes
     */
    reviewStagedChanges(): Promise<ReviewResult>;
    /**
     * Generate LLM prompt for detailed review
     */
    generateReviewPrompt(diff: string): string;
    /**
     * Format review results for display
     */
    formatResults(result: ReviewResult): string;
    /**
     * Get configuration
     */
    getConfig(): CodeReviewConfig;
    /**
     * Update configuration
     */
    updateConfig(config: Partial<CodeReviewConfig>): void;
}
/**
 * Get or create code review manager instance
 */
export declare function getCodeReviewManager(workingDirectory?: string, config?: Partial<CodeReviewConfig>): CodeReviewManager;
/**
 * Initialize code review manager
 */
export declare function initializeCodeReview(workingDirectory: string, config?: Partial<CodeReviewConfig>): CodeReviewManager;
