/**
 * Phase 4 — LLM-Driven Code Generation (ADR-067)
 *
 * Shared utility for generating code via `claude --print` instead of
 * string templates. Each Phase 4 stage builds a prompt from SPARC output,
 * DDD model, ADRs, simulation context, and tech stack, then sends it
 * to Claude for code generation.
 *
 * Falls back to template generators when claude binary is unavailable.
 */
export interface LLMCodegenOptions {
    /** Human-readable label for logging (e.g., "schemas.ts", "routes.ts") */
    label: string;
    /** The full prompt including SPARC context, DDD model, etc. */
    prompt: string;
    /** Timeout in ms (default: 90s) */
    timeoutMs?: number;
    /** Model override (default: claude-sonnet-4-20250514) */
    model?: string;
}
export interface LLMCodegenResult {
    /** Generated code (or null if LLM unavailable) */
    code: string | null;
    /** Whether this came from LLM or was null (caller should use template fallback) */
    source: 'llm' | 'unavailable';
    /** Duration in ms */
    durationMs: number;
}
/**
 * Generate code via `claude --print`.
 * Returns null code if claude binary is unavailable — caller should fall back to template.
 */
export declare function generateCodeViaLLM(options: LLMCodegenOptions): LLMCodegenResult;
export interface CodegenContext {
    scenarioQuery: string;
    sparc?: {
        specification?: string;
        architecture?: string;
        pseudocode?: string;
        refinement?: string;
        completion?: string;
    };
    dddContexts: Array<{
        name: string;
        commands: Array<{
            name: string;
            description?: string;
            input?: readonly string[];
            preconditions?: readonly string[];
            postconditions?: readonly string[];
        }>;
        queries: Array<{
            name: string;
            description?: string;
            parameters?: readonly string[];
            returns?: string;
        }>;
        entities: Array<{
            name: string;
            description: string;
        }>;
        valueObjects: Array<{
            name: string;
            description: string;
        }>;
        domainEvents: Array<{
            name: string;
            description?: string;
            payload?: readonly string[];
            triggeredBy?: string;
        }>;
        invariants: string[];
    }>;
    adrs?: Array<{
        title: string;
        decision: string;
    }>;
    simulationContext?: {
        scenarios: ReadonlyArray<{
            id: string;
            name: string;
            costDelta: number;
            riskLevel: string;
            [key: string]: unknown;
        }>;
        costModel: unknown;
        simulationId: string | null;
        [key: string]: unknown;
    } | null;
    techStack: {
        erp?: string;
        cloud?: string;
        databases?: string[];
        languages?: string[];
        hasRustOptimizer?: boolean;
    };
}
export declare function formatDDDForPrompt(contexts: CodegenContext['dddContexts']): string;
export declare function formatSimulationForPrompt(simCtx: CodegenContext['simulationContext']): string;
//# sourceMappingURL=llm-codegen.d.ts.map