/**
 * Phase 5 Build — Stage 7: Post-Generation Code Validator
 *
 * Implements ADR-PIPELINE-065 (which is the implementation spec for the
 * Accepted-but-unimplemented ADR-PIPELINE-042 Post-Generation Code Validation).
 *
 * Unlike `implementation-quality-gate.ts` which is a PRE-generation prompt
 * quality gate (it scans Phase 2 artifacts BEFORE code is generated), this
 * validator scans the GENERATED project tree AFTER all other Phase 5 stages
 * have run. It applies 10 rules that enforce the patterns documented in
 * ADR-PIPELINE-046/047/049/051/059/064 and catches regressions in observability,
 * typed API boundaries, audit trails, and test coverage.
 *
 * Non-blocking by default. When AGENTICS_STRICT_POSTGEN=true, any rule at
 * severity 'error' fails the stage and — per coordinator configuration —
 * can block the pipeline.
 *
 * Error codes:
 *   ECLI-P5-040  Post-generation validation failed (strict mode)
 *   ECLI-P5-041  Generated project directory not found
 */
import type { Phase5BuildContext } from '../types.js';
export interface ValidationFinding {
    readonly ruleId: string;
    readonly filePath: string;
    readonly line: number;
    readonly message: string;
    readonly severity: 'error' | 'warn';
}
export interface PostGenerationReport {
    readonly passed: boolean;
    readonly score: number;
    readonly findings: ValidationFinding[];
    readonly filesScanned: number;
    readonly rulesApplied: number;
    readonly errorCount: number;
    readonly warnCount: number;
    readonly projectDir: string | null;
}
export interface PostGenerationStageOutput {
    readonly stage: 'post-generation-validation';
    readonly status: 'completed' | 'failed';
    readonly timing: number;
    readonly artifacts: string[];
    readonly summary: string;
    readonly data: PostGenerationReport;
}
/**
 * A validation rule. Receives the full file map so rules can do per-file
 * regex scans or cross-file analysis (e.g., route file without sibling test).
 */
export interface GeneratedCodeValidationRule {
    readonly id: string;
    readonly title: string;
    readonly severity: 'error' | 'warn';
    readonly adrReference: string;
    readonly check: (files: ReadonlyMap<string, string>) => ValidationFinding[];
}
export declare const RULES: readonly GeneratedCodeValidationRule[];
/**
 * Run all validation rules against the files in a project directory.
 * Pure function — no I/O side effects beyond reading files.
 */
export declare function validateGeneratedCode(projectDir: string): PostGenerationReport;
/**
 * Execute the post-generation code validator as a Phase 5 pipeline stage.
 *
 * Non-blocking by default. When AGENTICS_STRICT_POSTGEN=true, any error-level
 * finding fails the stage. The coordinator decides whether stage failure
 * blocks the pipeline.
 */
export declare function executePostGenerationValidator(context: Phase5BuildContext): {
    stageOutput: PostGenerationStageOutput;
};
//# sourceMappingURL=post-generation-validator.d.ts.map