/**
 * Constitution Schema
 *
 * Zod schema for autofix constitution files that govern
 * which patterns can be auto-applied and under what conditions.
 *
 * @module autofix/constitution.schema
 */
import { z } from "zod";
/**
 * Risk tolerance levels for autofix operations
 */
export declare const RiskToleranceSchema: z.ZodEnum<["conservative", "moderate", "aggressive"]>;
/**
 * Severity levels
 */
export declare const SeveritySchema: z.ZodEnum<["info", "low", "medium", "high", "critical"]>;
/**
 * Conditions for pattern approval
 */
export declare const PatternConditionsSchema: z.ZodOptional<z.ZodObject<{
    /** Only allow in specific directories */
    allowedPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    /** Exclude from specific directories */
    excludedPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    /** Maximum lines changed per fix */
    maxLinesChanged: z.ZodOptional<z.ZodNumber>;
    /** Only if severity at or above this level */
    minSeverity: z.ZodOptional<z.ZodEnum<["info", "low", "medium", "high", "critical"]>>;
}, "strip", z.ZodTypeAny, {
    allowedPaths?: string[] | undefined;
    excludedPaths?: string[] | undefined;
    maxLinesChanged?: number | undefined;
    minSeverity?: "info" | "critical" | "high" | "medium" | "low" | undefined;
}, {
    allowedPaths?: string[] | undefined;
    excludedPaths?: string[] | undefined;
    maxLinesChanged?: number | undefined;
    minSeverity?: "info" | "critical" | "high" | "medium" | "low" | undefined;
}>>;
/**
 * Pattern approval configuration
 */
export declare const PatternApprovalSchema: z.ZodObject<{
    /** Pattern ID from FIX_PATTERNS */
    patternId: z.ZodString;
    /** Whether this pattern can be auto-applied */
    autoApprove: z.ZodBoolean;
    /** Required reviewer if not auto-approved */
    requiredReviewer: z.ZodOptional<z.ZodString>;
    /** Additional conditions for auto-approval */
    conditions: z.ZodOptional<z.ZodObject<{
        /** Only allow in specific directories */
        allowedPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        /** Exclude from specific directories */
        excludedPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        /** Maximum lines changed per fix */
        maxLinesChanged: z.ZodOptional<z.ZodNumber>;
        /** Only if severity at or above this level */
        minSeverity: z.ZodOptional<z.ZodEnum<["info", "low", "medium", "high", "critical"]>>;
    }, "strip", z.ZodTypeAny, {
        allowedPaths?: string[] | undefined;
        excludedPaths?: string[] | undefined;
        maxLinesChanged?: number | undefined;
        minSeverity?: "info" | "critical" | "high" | "medium" | "low" | undefined;
    }, {
        allowedPaths?: string[] | undefined;
        excludedPaths?: string[] | undefined;
        maxLinesChanged?: number | undefined;
        minSeverity?: "info" | "critical" | "high" | "medium" | "low" | undefined;
    }>>;
}, "strip", z.ZodTypeAny, {
    patternId: string;
    autoApprove: boolean;
    requiredReviewer?: string | undefined;
    conditions?: {
        allowedPaths?: string[] | undefined;
        excludedPaths?: string[] | undefined;
        maxLinesChanged?: number | undefined;
        minSeverity?: "info" | "critical" | "high" | "medium" | "low" | undefined;
    } | undefined;
}, {
    patternId: string;
    autoApprove: boolean;
    requiredReviewer?: string | undefined;
    conditions?: {
        allowedPaths?: string[] | undefined;
        excludedPaths?: string[] | undefined;
        maxLinesChanged?: number | undefined;
        minSeverity?: "info" | "critical" | "high" | "medium" | "low" | undefined;
    } | undefined;
}>;
/**
 * PR creation rules
 */
export declare const PRRulesSchema: z.ZodObject<{
    /** Require human approval before merge */
    requireApproval: z.ZodDefault<z.ZodBoolean>;
    /** Minimum number of approvers */
    minApprovers: z.ZodDefault<z.ZodNumber>;
    /** Required labels on all autofix PRs */
    requiredLabels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
    /** Assignees for autofix PRs */
    defaultAssignees: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
    /** Reviewers for autofix PRs */
    defaultReviewers: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
    /** Title prefix for autofix commits */
    commitPrefix: z.ZodDefault<z.ZodString>;
    /** Include Co-Authored-By in commits */
    includeCoAuthor: z.ZodDefault<z.ZodBoolean>;
    /** Maximum PRs to create in a single run */
    maxPRsPerRun: z.ZodDefault<z.ZodNumber>;
    /** Group fixes by this strategy */
    groupBy: z.ZodDefault<z.ZodEnum<["severity", "file", "pattern", "single"]>>;
}, "strip", z.ZodTypeAny, {
    groupBy: "file" | "severity" | "pattern" | "single";
    requireApproval: boolean;
    minApprovers: number;
    requiredLabels: string[];
    defaultAssignees: string[];
    defaultReviewers: string[];
    commitPrefix: string;
    includeCoAuthor: boolean;
    maxPRsPerRun: number;
}, {
    groupBy?: "file" | "severity" | "pattern" | "single" | undefined;
    requireApproval?: boolean | undefined;
    minApprovers?: number | undefined;
    requiredLabels?: string[] | undefined;
    defaultAssignees?: string[] | undefined;
    defaultReviewers?: string[] | undefined;
    commitPrefix?: string | undefined;
    includeCoAuthor?: boolean | undefined;
    maxPRsPerRun?: number | undefined;
}>;
/**
 * Directory-level restrictions
 */
export declare const DirectoryRulesSchema: z.ZodObject<{
    /** Never auto-fix in these directories */
    neverAutofix: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
    /** Always require review in these directories */
    requireReview: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
    /** Skip scanning these directories entirely */
    ignore: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
    neverAutofix: string[];
    requireReview: string[];
    ignore: string[];
}, {
    neverAutofix?: string[] | undefined;
    requireReview?: string[] | undefined;
    ignore?: string[] | undefined;
}>;
/**
 * Safety constraints
 */
export declare const SafetyConstraintsSchema: z.ZodObject<{
    /** Require clean git working tree before applying fixes */
    requireCleanWorkingTree: z.ZodDefault<z.ZodBoolean>;
    /** Create backup branch before applying fixes */
    createBackupBranch: z.ZodDefault<z.ZodBoolean>;
    /** Run tests after applying fixes */
    runTestsAfterFix: z.ZodDefault<z.ZodBoolean>;
    /** Test command to run */
    testCommand: z.ZodDefault<z.ZodString>;
    /** Revert fix if tests fail */
    revertOnTestFailure: z.ZodDefault<z.ZodBoolean>;
    /** Maximum total files to modify in one run */
    maxFilesPerRun: z.ZodDefault<z.ZodNumber>;
    /** Dry run by default (require explicit --apply) */
    dryRunDefault: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
    requireCleanWorkingTree: boolean;
    createBackupBranch: boolean;
    runTestsAfterFix: boolean;
    testCommand: string;
    revertOnTestFailure: boolean;
    maxFilesPerRun: number;
    dryRunDefault: boolean;
}, {
    requireCleanWorkingTree?: boolean | undefined;
    createBackupBranch?: boolean | undefined;
    runTestsAfterFix?: boolean | undefined;
    testCommand?: string | undefined;
    revertOnTestFailure?: boolean | undefined;
    maxFilesPerRun?: number | undefined;
    dryRunDefault?: boolean | undefined;
}>;
/**
 * Full constitution configuration
 */
export declare const ConstitutionSchema: z.ZodObject<{
    /** Version of the constitution schema */
    version: z.ZodLiteral<"1.0">;
    /** Organization name */
    organization: z.ZodOptional<z.ZodString>;
    /** Overall risk tolerance */
    riskTolerance: z.ZodDefault<z.ZodEnum<["conservative", "moderate", "aggressive"]>>;
    /** Pattern-specific approvals */
    patterns: z.ZodDefault<z.ZodArray<z.ZodObject<{
        /** Pattern ID from FIX_PATTERNS */
        patternId: z.ZodString;
        /** Whether this pattern can be auto-applied */
        autoApprove: z.ZodBoolean;
        /** Required reviewer if not auto-approved */
        requiredReviewer: z.ZodOptional<z.ZodString>;
        /** Additional conditions for auto-approval */
        conditions: z.ZodOptional<z.ZodObject<{
            /** Only allow in specific directories */
            allowedPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            /** Exclude from specific directories */
            excludedPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            /** Maximum lines changed per fix */
            maxLinesChanged: z.ZodOptional<z.ZodNumber>;
            /** Only if severity at or above this level */
            minSeverity: z.ZodOptional<z.ZodEnum<["info", "low", "medium", "high", "critical"]>>;
        }, "strip", z.ZodTypeAny, {
            allowedPaths?: string[] | undefined;
            excludedPaths?: string[] | undefined;
            maxLinesChanged?: number | undefined;
            minSeverity?: "info" | "critical" | "high" | "medium" | "low" | undefined;
        }, {
            allowedPaths?: string[] | undefined;
            excludedPaths?: string[] | undefined;
            maxLinesChanged?: number | undefined;
            minSeverity?: "info" | "critical" | "high" | "medium" | "low" | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        patternId: string;
        autoApprove: boolean;
        requiredReviewer?: string | undefined;
        conditions?: {
            allowedPaths?: string[] | undefined;
            excludedPaths?: string[] | undefined;
            maxLinesChanged?: number | undefined;
            minSeverity?: "info" | "critical" | "high" | "medium" | "low" | undefined;
        } | undefined;
    }, {
        patternId: string;
        autoApprove: boolean;
        requiredReviewer?: string | undefined;
        conditions?: {
            allowedPaths?: string[] | undefined;
            excludedPaths?: string[] | undefined;
            maxLinesChanged?: number | undefined;
            minSeverity?: "info" | "critical" | "high" | "medium" | "low" | undefined;
        } | undefined;
    }>, "many">>;
    /** PR creation rules */
    prRules: z.ZodDefault<z.ZodObject<{
        /** Require human approval before merge */
        requireApproval: z.ZodDefault<z.ZodBoolean>;
        /** Minimum number of approvers */
        minApprovers: z.ZodDefault<z.ZodNumber>;
        /** Required labels on all autofix PRs */
        requiredLabels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
        /** Assignees for autofix PRs */
        defaultAssignees: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
        /** Reviewers for autofix PRs */
        defaultReviewers: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
        /** Title prefix for autofix commits */
        commitPrefix: z.ZodDefault<z.ZodString>;
        /** Include Co-Authored-By in commits */
        includeCoAuthor: z.ZodDefault<z.ZodBoolean>;
        /** Maximum PRs to create in a single run */
        maxPRsPerRun: z.ZodDefault<z.ZodNumber>;
        /** Group fixes by this strategy */
        groupBy: z.ZodDefault<z.ZodEnum<["severity", "file", "pattern", "single"]>>;
    }, "strip", z.ZodTypeAny, {
        groupBy: "file" | "severity" | "pattern" | "single";
        requireApproval: boolean;
        minApprovers: number;
        requiredLabels: string[];
        defaultAssignees: string[];
        defaultReviewers: string[];
        commitPrefix: string;
        includeCoAuthor: boolean;
        maxPRsPerRun: number;
    }, {
        groupBy?: "file" | "severity" | "pattern" | "single" | undefined;
        requireApproval?: boolean | undefined;
        minApprovers?: number | undefined;
        requiredLabels?: string[] | undefined;
        defaultAssignees?: string[] | undefined;
        defaultReviewers?: string[] | undefined;
        commitPrefix?: string | undefined;
        includeCoAuthor?: boolean | undefined;
        maxPRsPerRun?: number | undefined;
    }>>;
    /** Directory restrictions */
    directories: z.ZodDefault<z.ZodObject<{
        /** Never auto-fix in these directories */
        neverAutofix: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
        /** Always require review in these directories */
        requireReview: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
        /** Skip scanning these directories entirely */
        ignore: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
    }, "strip", z.ZodTypeAny, {
        neverAutofix: string[];
        requireReview: string[];
        ignore: string[];
    }, {
        neverAutofix?: string[] | undefined;
        requireReview?: string[] | undefined;
        ignore?: string[] | undefined;
    }>>;
    /** Safety constraints */
    safety: z.ZodDefault<z.ZodObject<{
        /** Require clean git working tree before applying fixes */
        requireCleanWorkingTree: z.ZodDefault<z.ZodBoolean>;
        /** Create backup branch before applying fixes */
        createBackupBranch: z.ZodDefault<z.ZodBoolean>;
        /** Run tests after applying fixes */
        runTestsAfterFix: z.ZodDefault<z.ZodBoolean>;
        /** Test command to run */
        testCommand: z.ZodDefault<z.ZodString>;
        /** Revert fix if tests fail */
        revertOnTestFailure: z.ZodDefault<z.ZodBoolean>;
        /** Maximum total files to modify in one run */
        maxFilesPerRun: z.ZodDefault<z.ZodNumber>;
        /** Dry run by default (require explicit --apply) */
        dryRunDefault: z.ZodDefault<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        requireCleanWorkingTree: boolean;
        createBackupBranch: boolean;
        runTestsAfterFix: boolean;
        testCommand: string;
        revertOnTestFailure: boolean;
        maxFilesPerRun: number;
        dryRunDefault: boolean;
    }, {
        requireCleanWorkingTree?: boolean | undefined;
        createBackupBranch?: boolean | undefined;
        runTestsAfterFix?: boolean | undefined;
        testCommand?: string | undefined;
        revertOnTestFailure?: boolean | undefined;
        maxFilesPerRun?: number | undefined;
        dryRunDefault?: boolean | undefined;
    }>>;
    /** Custom metadata to include in PRs */
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, "strip", z.ZodTypeAny, {
    version: "1.0";
    riskTolerance: "conservative" | "moderate" | "aggressive";
    patterns: {
        patternId: string;
        autoApprove: boolean;
        requiredReviewer?: string | undefined;
        conditions?: {
            allowedPaths?: string[] | undefined;
            excludedPaths?: string[] | undefined;
            maxLinesChanged?: number | undefined;
            minSeverity?: "info" | "critical" | "high" | "medium" | "low" | undefined;
        } | undefined;
    }[];
    prRules: {
        groupBy: "file" | "severity" | "pattern" | "single";
        requireApproval: boolean;
        minApprovers: number;
        requiredLabels: string[];
        defaultAssignees: string[];
        defaultReviewers: string[];
        commitPrefix: string;
        includeCoAuthor: boolean;
        maxPRsPerRun: number;
    };
    directories: {
        neverAutofix: string[];
        requireReview: string[];
        ignore: string[];
    };
    safety: {
        requireCleanWorkingTree: boolean;
        createBackupBranch: boolean;
        runTestsAfterFix: boolean;
        testCommand: string;
        revertOnTestFailure: boolean;
        maxFilesPerRun: number;
        dryRunDefault: boolean;
    };
    metadata?: Record<string, string> | undefined;
    organization?: string | undefined;
}, {
    version: "1.0";
    metadata?: Record<string, string> | undefined;
    organization?: string | undefined;
    riskTolerance?: "conservative" | "moderate" | "aggressive" | undefined;
    patterns?: {
        patternId: string;
        autoApprove: boolean;
        requiredReviewer?: string | undefined;
        conditions?: {
            allowedPaths?: string[] | undefined;
            excludedPaths?: string[] | undefined;
            maxLinesChanged?: number | undefined;
            minSeverity?: "info" | "critical" | "high" | "medium" | "low" | undefined;
        } | undefined;
    }[] | undefined;
    prRules?: {
        groupBy?: "file" | "severity" | "pattern" | "single" | undefined;
        requireApproval?: boolean | undefined;
        minApprovers?: number | undefined;
        requiredLabels?: string[] | undefined;
        defaultAssignees?: string[] | undefined;
        defaultReviewers?: string[] | undefined;
        commitPrefix?: string | undefined;
        includeCoAuthor?: boolean | undefined;
        maxPRsPerRun?: number | undefined;
    } | undefined;
    directories?: {
        neverAutofix?: string[] | undefined;
        requireReview?: string[] | undefined;
        ignore?: string[] | undefined;
    } | undefined;
    safety?: {
        requireCleanWorkingTree?: boolean | undefined;
        createBackupBranch?: boolean | undefined;
        runTestsAfterFix?: boolean | undefined;
        testCommand?: string | undefined;
        revertOnTestFailure?: boolean | undefined;
        maxFilesPerRun?: number | undefined;
        dryRunDefault?: boolean | undefined;
    } | undefined;
}>;
/**
 * Inferred types from schemas
 */
export type RiskTolerance = z.infer<typeof RiskToleranceSchema>;
export type Severity = z.infer<typeof SeveritySchema>;
export type PatternConditions = z.infer<typeof PatternConditionsSchema>;
export type PatternApproval = z.infer<typeof PatternApprovalSchema>;
export type PRRules = z.infer<typeof PRRulesSchema>;
export type DirectoryRules = z.infer<typeof DirectoryRulesSchema>;
export type SafetyConstraints = z.infer<typeof SafetyConstraintsSchema>;
export type Constitution = z.infer<typeof ConstitutionSchema>;
/**
 * Default constitution with conservative settings
 */
export declare const DEFAULT_CONSTITUTION: Constitution;
//# sourceMappingURL=constitution.schema.d.ts.map