/**
 * TDD (Test-Driven Development) Mode
 *
 * Implements test-first code generation workflow.
 * Research shows TDD improves Pass@1 by 45.97% (ICSE 2024).
 *
 * Workflow:
 * 1. User describes feature requirements
 * 2. LLM generates comprehensive tests
 * 3. User reviews/approves tests
 * 4. LLM implements code to pass tests
 * 5. Tests are run automatically
 * 6. LLM iterates until all tests pass
 */
import { EventEmitter } from "events";
import { TestResult } from "./auto-test.js";
/**
 * TDD state
 */
export type TDDState = "idle" | "requirements" | "generating-tests" | "reviewing-tests" | "implementing" | "running-tests" | "iterating" | "complete";
/**
 * TDD cycle result
 */
export interface TDDCycleResult {
    success: boolean;
    iterations: number;
    testsGenerated: number;
    testsPassed: number;
    testsFailed: number;
    filesCreated: string[];
    filesModified: string[];
    duration: number;
    errors?: string[];
}
/**
 * TDD configuration
 */
export interface TDDConfig {
    maxIterations: number;
    autoApproveTests: boolean;
    generateEdgeCases: boolean;
    generateMocks: boolean;
    testCoverage: "minimal" | "standard" | "comprehensive";
    language: string;
}
/**
 * Default TDD configuration
 */
export declare const DEFAULT_TDD_CONFIG: TDDConfig;
/**
 * Test generation template
 */
export interface TestTemplate {
    language: string;
    framework: string;
    template: string;
    edgeCasesTemplate: string;
    mocksTemplate: string;
}
/**
 * Built-in test templates
 */
export declare const TEST_TEMPLATES: Record<string, TestTemplate>;
/**
 * TDD Mode Manager
 *
 * Manages the TDD workflow for test-first development.
 */
export declare class TDDModeManager extends EventEmitter {
    private config;
    private state;
    private workingDirectory;
    private currentCycle;
    constructor(workingDirectory: string, config?: Partial<TDDConfig>);
    /**
     * Get current state
     */
    getState(): TDDState;
    /**
     * Set state
     */
    private setState;
    /**
     * Start TDD cycle with requirements
     */
    startCycle(requirements: string): void;
    /**
     * Generate test prompt for LLM
     */
    generateTestPrompt(): string;
    /**
     * Record generated tests
     */
    recordGeneratedTests(tests: string[], testFiles: string[]): void;
    /**
     * Approve tests and move to implementation
     */
    approveTests(): void;
    /**
     * Generate implementation prompt for LLM
     */
    generateImplementationPrompt(failedTests?: TestResult): string;
    /**
     * Record implementation
     */
    recordImplementation(sourceFiles: string[]): void;
    /**
     * Process test results
     */
    processTestResults(results: TestResult): Promise<{
        continue: boolean;
        complete: boolean;
    }>;
    /**
     * Get cycle result
     */
    getCycleResult(): TDDCycleResult | null;
    /**
     * Cancel current cycle
     */
    cancelCycle(): void;
    /**
     * Reset to idle
     */
    reset(): void;
    /**
     * Format status for display
     */
    formatStatus(): string;
    /**
     * Get configuration
     */
    getConfig(): TDDConfig;
    /**
     * Update configuration
     */
    updateConfig(config: Partial<TDDConfig>): void;
    /**
     * Check if TDD mode is active
     */
    isActive(): boolean;
}
/**
 * Get or create TDD manager instance
 */
export declare function getTDDManager(workingDirectory?: string, config?: Partial<TDDConfig>): TDDModeManager;
/**
 * Initialize TDD manager
 */
export declare function initializeTDD(workingDirectory: string, config?: Partial<TDDConfig>): TDDModeManager;
