/**
 * .codebuddyrules File Support
 *
 * Project-specific AI behavior configuration:
 * - Custom instructions per project
 * - Code style preferences
 * - Framework-specific guidelines
 * - Ignore patterns
 * - Security policies
 *
 * Inspired by Cursor's .cursorrules feature.
 */
import { EventEmitter } from 'events';
export interface CodeBuddyRules {
    /** Version of the rules format */
    version?: string;
    /** Project description */
    description?: string;
    /** Languages used in project */
    languages?: string[];
    /** Frameworks and libraries */
    frameworks?: string[];
    /** Custom instructions for the AI */
    instructions?: string[];
    /** Code style preferences */
    style?: {
        /** Indentation (spaces/tabs) */
        indentation?: 'spaces' | 'tabs';
        /** Indent size */
        indentSize?: number;
        /** Max line length */
        maxLineLength?: number;
        /** Quote style */
        quotes?: 'single' | 'double';
        /** Semicolons */
        semicolons?: boolean;
        /** Trailing commas */
        trailingCommas?: 'none' | 'es5' | 'all';
        /** Import order */
        importOrder?: string[];
    };
    /** Naming conventions */
    naming?: {
        /** Variables */
        variables?: 'camelCase' | 'snake_case' | 'PascalCase';
        /** Functions */
        functions?: 'camelCase' | 'snake_case' | 'PascalCase';
        /** Classes */
        classes?: 'PascalCase' | 'camelCase';
        /** Files */
        files?: 'kebab-case' | 'camelCase' | 'PascalCase' | 'snake_case';
        /** Constants */
        constants?: 'UPPER_SNAKE_CASE' | 'camelCase';
    };
    /** Patterns to always include in context */
    include?: string[];
    /** Patterns to exclude from context */
    exclude?: string[];
    /** File patterns to ignore completely */
    ignore?: string[];
    /** Security policies */
    security?: {
        /** Allowed shell commands */
        allowedCommands?: string[];
        /** Blocked shell commands */
        blockedCommands?: string[];
        /** Require confirmation for destructive ops */
        confirmDestructive?: boolean;
        /** Allowed file extensions for write */
        allowedExtensions?: string[];
        /** Blocked paths */
        blockedPaths?: string[];
    };
    /** Testing preferences */
    testing?: {
        /** Test framework */
        framework?: string;
        /** Test file pattern */
        pattern?: string;
        /** Coverage threshold */
        coverageThreshold?: number;
        /** Test directory */
        directory?: string;
    };
    /** Documentation preferences */
    documentation?: {
        /** Doc style (JSDoc, docstring, etc) */
        style?: string;
        /** Require docs for public APIs */
        requirePublic?: boolean;
        /** Include examples */
        includeExamples?: boolean;
    };
    /** Git preferences */
    git?: {
        /** Commit message format */
        commitFormat?: string;
        /** Branch naming convention */
        branchFormat?: string;
        /** Require conventional commits */
        conventionalCommits?: boolean;
    };
    /** Context window management */
    context?: {
        /** Max files to include */
        maxFiles?: number;
        /** Max tokens for context */
        maxTokens?: number;
        /** Priority files (always include) */
        priorityFiles?: string[];
    };
    /** Custom prompts */
    prompts?: Record<string, string>;
    /** Persona/character for AI */
    persona?: {
        name?: string;
        tone?: 'formal' | 'casual' | 'technical' | 'friendly';
        expertise?: string[];
    };
    /** Raw additional instructions (appended to system prompt) */
    raw?: string;
}
export interface CodeBuddyRulesConfig {
    /** Search paths for rules files */
    searchPaths: string[];
    /** File names to search for */
    fileNames: string[];
    /** Enable inheritance from parent directories */
    inheritFromParent: boolean;
    /** Enable global rules from home directory */
    enableGlobalRules: boolean;
}
export declare class CodeBuddyRulesManager extends EventEmitter {
    private config;
    private rules;
    private loadedFiles;
    private initialized;
    constructor(config?: Partial<CodeBuddyRulesConfig>);
    /**
     * Initialize and load rules for a directory
     */
    initialize(workingDir?: string): Promise<void>;
    /**
     * Get current rules
     */
    getRules(): CodeBuddyRules;
    /**
     * Get loaded files
     */
    getLoadedFiles(): string[];
    /**
     * Check if rules are loaded
     */
    isInitialized(): boolean;
    /**
     * Generate system prompt additions from rules
     */
    getSystemPromptAdditions(): string;
    /**
     * Get ignore patterns
     */
    getIgnorePatterns(): string[];
    /**
     * Get include patterns
     */
    getIncludePatterns(): string[];
    /**
     * Check if command is allowed
     */
    isCommandAllowed(command: string): boolean;
    /**
     * Check if path is allowed
     */
    isPathAllowed(filePath: string): boolean;
    /**
     * Get custom prompt by name
     */
    getCustomPrompt(name: string): string | undefined;
    /**
     * Create default rules file
     */
    createDefaultRules(targetDir: string): Promise<string>;
    /**
     * Format rules summary
     */
    formatSummary(): string;
    private loadGlobalRules;
    private loadRulesFromDirectory;
    private loadRulesFile;
    private parseMarkdownRules;
    private getDirectoryHierarchy;
    private mergeRules;
    /**
     * Dispose and clean up resources
     */
    dispose(): void;
}
export declare function getCodeBuddyRulesManager(config?: Partial<CodeBuddyRulesConfig>): CodeBuddyRulesManager;
export declare function initializeCodeBuddyRules(workingDir?: string): Promise<CodeBuddyRulesManager>;
export declare function resetCodeBuddyRulesManager(): void;
