import { z } from 'zod';
import type { CompileInputCandidate } from './candidate-rule.js';
import type { ClassifierLedger } from './ledgers.js';
/** The matcher engines an authored rule may declare (mirrors `CompiledRule.engine`). */
export declare const DeclaredEngineSchema: z.ZodEnum<["regex", "ast", "ast-grep"]>;
export type DeclaredEngine = z.infer<typeof DeclaredEngineSchema>;
/**
 * ADR-112 §3 — the result of the INDEPENDENT structural-eligibility check.
 * Produced by `evaluateStructuralEligibility` (NOT by the author): only
 * `decidable: true` reaches the compiler, mapping to the compiler's
 * `classifierDisposition: 'structural'`. `judgedBy` records who/what judged it
 * (ledger-recorded, never the author), so a human cannot smuggle a behavioral
 * policy past ADR-091's gate by hand-asserting "structural" (FM(d)).
 */
export declare const StructEligResultSchema: z.ZodObject<{
    decidable: z.ZodBoolean;
    /**
     * `whitelist:<class>` for the cert-#1 static-whitelist basis; the
     * `capability-check` / `draft-classifier+stage4` bases are contract-legal but
     * deferred (slice-A uses the deterministic whitelist only). On a `decidable:
     * false` verdict the basis still names the attempted whitelist class — the
     * diagnostic is "no/ambiguous whitelist match", carried in `judgedBy`'s log.
     * Constrained to the §3 forms (strategy item 2, #2259) so a typo'd/free-form
     * basis can't validate — non-mutating (no `.trim()`), matching the hash-stability
     * discipline on the other reference fields.
     */
    basis: z.ZodEffects<z.ZodString, string, string>;
    judgedBy: z.ZodEffects<z.ZodString, string, string>;
}, "strip", z.ZodTypeAny, {
    decidable: boolean;
    basis: string;
    judgedBy: string;
}, {
    decidable: boolean;
    basis: string;
    judgedBy: string;
}>;
export type StructEligResult = z.infer<typeof StructEligResultSchema>;
/** ADR-112 §3/§7 — accelerant-lineage marker. A mined hint that informed a human is recorded, never erased. */
export declare const AuthoredOriginSchema: z.ZodUnion<[z.ZodObject<{
    kind: z.ZodLiteral<"from-scratch">;
}, "strip", z.ZodTypeAny, {
    kind: "from-scratch";
}, {
    kind: "from-scratch";
}>, z.ZodObject<{
    kind: z.ZodLiteral<"mined-accelerant">;
    sourceRunId: z.ZodEffects<z.ZodString, string, string>;
    suggestionHash: z.ZodEffects<z.ZodString, string, string>;
}, "strip", z.ZodTypeAny, {
    kind: "mined-accelerant";
    sourceRunId: string;
    suggestionHash: string;
}, {
    kind: "mined-accelerant";
    sourceRunId: string;
    suggestionHash: string;
}>]>;
export type AuthoredOrigin = z.infer<typeof AuthoredOriginSchema>;
export declare const AUTHORED_RULE_ID_RE: RegExp;
/**
 * ADR-112 §3 — the authored producer's sole output envelope. Parallel to
 * ADR-111's `CandidateRuleRecord` but carrying the AUTHORED provenance variant,
 * the INDEPENDENTLY-judged eligibility result, and the accelerant lineage.
 * Minted `unverified: true` (ADR-089) — zero enforcement blast radius.
 */
export declare const AuthoredRuleRecordSchema: z.ZodObject<{
    /**
     * ADR-112 §3/§8 — the stable, minted rule identity (`mintAuthoredRuleId`),
     * assigned ONCE at authoring time and PERSISTED on the record; NEVER re-derived
     * from content at read time. `firingLabelId` + the §5.3
     * `controls.positive[].targetRuleId` ground-truth labels embed it, so a
     * content-re-derived id would orphan them (§8). Slice A reserves the field (this
     * IS the schema spine); the authoring flow (slice B) mints it, and threading it
     * into the compiled artifact's identity (`firingLabelId ← ruleId`, replacing the
     * `dslSource`-derived `lessonHash`) is slice C/D. The RESOLVED id (with any `-N`
     * collision suffix) is what is stored.
     */
    ruleId: z.ZodString;
    provenance: z.ZodObject<{
        kind: z.ZodLiteral<"authored">;
        author: z.ZodEffects<z.ZodString, string, string>;
        authoredAt: z.ZodEffects<z.ZodString, string, string>;
        targetDefect: z.ZodEffects<z.ZodString, string, string>;
        positiveFixtures: z.ZodArray<z.ZodEffects<z.ZodObject<{
            pr: z.ZodNumber;
            preimageSource: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
                kind: z.ZodLiteral<"lesson">;
                lessonRef: z.ZodString;
                badExample: z.ZodEffects<z.ZodString, string, string>;
                goodExample: z.ZodEffects<z.ZodString, string, string>;
            }, "strict", z.ZodTypeAny, {
                kind: "lesson";
                lessonRef: string;
                badExample: string;
                goodExample: string;
            }, {
                kind: "lesson";
                lessonRef: string;
                badExample: string;
                goodExample: string;
            }>, z.ZodObject<{
                kind: z.ZodLiteral<"commit">;
                preimageCommitSha: z.ZodString;
                mergeCommitSha: z.ZodString;
            }, "strict", z.ZodTypeAny, {
                kind: "commit";
                preimageCommitSha: string;
                mergeCommitSha: string;
            }, {
                kind: "commit";
                preimageCommitSha: string;
                mergeCommitSha: string;
            }>]>;
            filePath: z.ZodEffects<z.ZodString, string, string>;
            matchedSpan: z.ZodEffects<z.ZodString, string, string>;
            contentHash: z.ZodEffects<z.ZodString, string, string>;
        }, "strict", z.ZodTypeAny, {
            pr: number;
            preimageSource: {
                kind: "lesson";
                lessonRef: string;
                badExample: string;
                goodExample: string;
            } | {
                kind: "commit";
                preimageCommitSha: string;
                mergeCommitSha: string;
            };
            filePath: string;
            matchedSpan: string;
            contentHash: string;
        }, {
            pr: number;
            preimageSource: {
                kind: "lesson";
                lessonRef: string;
                badExample: string;
                goodExample: string;
            } | {
                kind: "commit";
                preimageCommitSha: string;
                mergeCommitSha: string;
            };
            filePath: string;
            matchedSpan: string;
            contentHash: string;
        }>, {
            pr: number;
            preimageSource: {
                kind: "lesson";
                lessonRef: string;
                badExample: string;
                goodExample: string;
            } | {
                kind: "commit";
                preimageCommitSha: string;
                mergeCommitSha: string;
            };
            filePath: string;
            matchedSpan: string;
            contentHash: string;
        }, {
            pr: number;
            preimageSource: {
                kind: "lesson";
                lessonRef: string;
                badExample: string;
                goodExample: string;
            } | {
                kind: "commit";
                preimageCommitSha: string;
                mergeCommitSha: string;
            };
            filePath: string;
            matchedSpan: string;
            contentHash: string;
        }>, "many">;
        negativeFixtures: z.ZodOptional<z.ZodArray<z.ZodObject<{
            filePath: z.ZodEffects<z.ZodString, string, string>;
            matchedSpan: z.ZodEffects<z.ZodString, string, string>;
            nearMissSource: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
                kind: z.ZodLiteral<"lesson">;
                example: z.ZodEffects<z.ZodString, string, string>;
                lessonRef: z.ZodOptional<z.ZodString>;
            }, "strict", z.ZodTypeAny, {
                kind: "lesson";
                example: string;
                lessonRef?: string | undefined;
            }, {
                kind: "lesson";
                example: string;
                lessonRef?: string | undefined;
            }>, z.ZodObject<{
                kind: z.ZodLiteral<"commit">;
                commitSha: z.ZodString;
            }, "strict", z.ZodTypeAny, {
                kind: "commit";
                commitSha: string;
            }, {
                kind: "commit";
                commitSha: string;
            }>]>;
        }, "strict", z.ZodTypeAny, {
            filePath: string;
            matchedSpan: string;
            nearMissSource: {
                kind: "lesson";
                example: string;
                lessonRef?: string | undefined;
            } | {
                kind: "commit";
                commitSha: string;
            };
        }, {
            filePath: string;
            matchedSpan: string;
            nearMissSource: {
                kind: "lesson";
                example: string;
                lessonRef?: string | undefined;
            } | {
                kind: "commit";
                commitSha: string;
            };
        }>, "many">>;
    }, "strip", z.ZodTypeAny, {
        kind: "authored";
        author: string;
        authoredAt: string;
        targetDefect: string;
        positiveFixtures: {
            pr: number;
            preimageSource: {
                kind: "lesson";
                lessonRef: string;
                badExample: string;
                goodExample: string;
            } | {
                kind: "commit";
                preimageCommitSha: string;
                mergeCommitSha: string;
            };
            filePath: string;
            matchedSpan: string;
            contentHash: string;
        }[];
        negativeFixtures?: {
            filePath: string;
            matchedSpan: string;
            nearMissSource: {
                kind: "lesson";
                example: string;
                lessonRef?: string | undefined;
            } | {
                kind: "commit";
                commitSha: string;
            };
        }[] | undefined;
    }, {
        kind: "authored";
        author: string;
        authoredAt: string;
        targetDefect: string;
        positiveFixtures: {
            pr: number;
            preimageSource: {
                kind: "lesson";
                lessonRef: string;
                badExample: string;
                goodExample: string;
            } | {
                kind: "commit";
                preimageCommitSha: string;
                mergeCommitSha: string;
            };
            filePath: string;
            matchedSpan: string;
            contentHash: string;
        }[];
        negativeFixtures?: {
            filePath: string;
            matchedSpan: string;
            nearMissSource: {
                kind: "lesson";
                example: string;
                lessonRef?: string | undefined;
            } | {
                kind: "commit";
                commitSha: string;
            };
        }[] | undefined;
    }>;
    /** INDEPENDENTLY established (§3) — the author never sets this; the check does. */
    structuralEligibility: z.ZodObject<{
        decidable: z.ZodBoolean;
        /**
         * `whitelist:<class>` for the cert-#1 static-whitelist basis; the
         * `capability-check` / `draft-classifier+stage4` bases are contract-legal but
         * deferred (slice-A uses the deterministic whitelist only). On a `decidable:
         * false` verdict the basis still names the attempted whitelist class — the
         * diagnostic is "no/ambiguous whitelist match", carried in `judgedBy`'s log.
         * Constrained to the §3 forms (strategy item 2, #2259) so a typo'd/free-form
         * basis can't validate — non-mutating (no `.trim()`), matching the hash-stability
         * discipline on the other reference fields.
         */
        basis: z.ZodEffects<z.ZodString, string, string>;
        judgedBy: z.ZodEffects<z.ZodString, string, string>;
    }, "strip", z.ZodTypeAny, {
        decidable: boolean;
        basis: string;
        judgedBy: string;
    }, {
        decidable: boolean;
        basis: string;
        judgedBy: string;
    }>;
    origin: z.ZodUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"from-scratch">;
    }, "strip", z.ZodTypeAny, {
        kind: "from-scratch";
    }, {
        kind: "from-scratch";
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"mined-accelerant">;
        sourceRunId: z.ZodEffects<z.ZodString, string, string>;
        suggestionHash: z.ZodEffects<z.ZodString, string, string>;
    }, "strip", z.ZodTypeAny, {
        kind: "mined-accelerant";
        sourceRunId: string;
        suggestionHash: string;
    }, {
        kind: "mined-accelerant";
        sourceRunId: string;
        suggestionHash: string;
    }>]>;
    declaredEngine: z.ZodEnum<["regex", "ast", "ast-grep"]>;
    /** Reference to the §8 authoring-ledger entry (author/date/engine/splitRef/attestations). */
    authoringLedgerRef: z.ZodEffects<z.ZodString, string, string>;
    /** The human-written matcher (same DSL the compiler accepts from the miner). */
    dslSource: z.ZodEffects<z.ZodString, string, string>;
    /** Zero-trust mint (ADR-089 / ADR-112 §1) — always literally `true`. */
    unverified: z.ZodLiteral<true>;
}, "strip", z.ZodTypeAny, {
    provenance: {
        kind: "authored";
        author: string;
        authoredAt: string;
        targetDefect: string;
        positiveFixtures: {
            pr: number;
            preimageSource: {
                kind: "lesson";
                lessonRef: string;
                badExample: string;
                goodExample: string;
            } | {
                kind: "commit";
                preimageCommitSha: string;
                mergeCommitSha: string;
            };
            filePath: string;
            matchedSpan: string;
            contentHash: string;
        }[];
        negativeFixtures?: {
            filePath: string;
            matchedSpan: string;
            nearMissSource: {
                kind: "lesson";
                example: string;
                lessonRef?: string | undefined;
            } | {
                kind: "commit";
                commitSha: string;
            };
        }[] | undefined;
    };
    unverified: true;
    ruleId: string;
    origin: {
        kind: "from-scratch";
    } | {
        kind: "mined-accelerant";
        sourceRunId: string;
        suggestionHash: string;
    };
    dslSource: string;
    structuralEligibility: {
        decidable: boolean;
        basis: string;
        judgedBy: string;
    };
    declaredEngine: "regex" | "ast" | "ast-grep";
    authoringLedgerRef: string;
}, {
    provenance: {
        kind: "authored";
        author: string;
        authoredAt: string;
        targetDefect: string;
        positiveFixtures: {
            pr: number;
            preimageSource: {
                kind: "lesson";
                lessonRef: string;
                badExample: string;
                goodExample: string;
            } | {
                kind: "commit";
                preimageCommitSha: string;
                mergeCommitSha: string;
            };
            filePath: string;
            matchedSpan: string;
            contentHash: string;
        }[];
        negativeFixtures?: {
            filePath: string;
            matchedSpan: string;
            nearMissSource: {
                kind: "lesson";
                example: string;
                lessonRef?: string | undefined;
            } | {
                kind: "commit";
                commitSha: string;
            };
        }[] | undefined;
    };
    unverified: true;
    ruleId: string;
    origin: {
        kind: "from-scratch";
    } | {
        kind: "mined-accelerant";
        sourceRunId: string;
        suggestionHash: string;
    };
    dslSource: string;
    structuralEligibility: {
        decidable: boolean;
        basis: string;
        judgedBy: string;
    };
    declaredEngine: "regex" | "ast" | "ast-grep";
    authoringLedgerRef: string;
}>;
export type AuthoredRuleRecord = z.infer<typeof AuthoredRuleRecordSchema>;
export declare const AuthoredRuleInputSchema: z.ZodObject<{
    /** Agent-id or operator handle — attributable (mirrors the provenance field). Trimmed. */
    author: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
    /**
     * ISO-8601 authoring date — trimmed + calendar-validated at the INTAKE boundary
     * (CR diff-review): the same `isIso8601CalendarDate` the record provenance uses,
     * so a malformed `not-a-date` fails here with a clean `CONFIG_INVALID` instead of
     * escaping to a raw ZodError at record construction (pass 1).
     */
    authoredAt: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
    /** The declared DEFECT the rule targets — the pre-image, not its fix (ADR-110 §4 TP-def). Trimmed. */
    targetDefect: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
    /** The matcher engine the author declares; the eligibility check confirms it can represent the class. */
    declaredEngine: z.ZodEnum<["regex", "ast", "ast-grep"]>;
    /**
     * The structural rule-CLASS the author CLAIMS. Fed to the INDEPENDENT
     * `evaluateStructuralEligibility` against the DI whitelist; it is NOT stored
     * verbatim on the record — the *verdict* (`structuralEligibility`, basis
     * `whitelist:<class>`) is. Naming a class is a claim the check adjudicates,
     * never a self-certification of `decidable`. Trimmed so a stray space can't
     * cause an exact-match miss against the registry.
     */
    structuralClass: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
    /** The human-written matcher (same DSL the compiler accepts from the miner). */
    dslSource: z.ZodEffects<z.ZodString, string, string>;
    /** ≥1 real lc instance the rule claims to catch — ALL train-side (§5). */
    positiveFixtures: z.ZodArray<z.ZodEffects<z.ZodObject<{
        pr: z.ZodNumber;
        preimageSource: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
            kind: z.ZodLiteral<"lesson">;
            lessonRef: z.ZodString;
            badExample: z.ZodEffects<z.ZodString, string, string>;
            goodExample: z.ZodEffects<z.ZodString, string, string>;
        }, "strict", z.ZodTypeAny, {
            kind: "lesson";
            lessonRef: string;
            badExample: string;
            goodExample: string;
        }, {
            kind: "lesson";
            lessonRef: string;
            badExample: string;
            goodExample: string;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"commit">;
            preimageCommitSha: z.ZodString;
            mergeCommitSha: z.ZodString;
        }, "strict", z.ZodTypeAny, {
            kind: "commit";
            preimageCommitSha: string;
            mergeCommitSha: string;
        }, {
            kind: "commit";
            preimageCommitSha: string;
            mergeCommitSha: string;
        }>]>;
        filePath: z.ZodEffects<z.ZodString, string, string>;
        matchedSpan: z.ZodEffects<z.ZodString, string, string>;
        contentHash: z.ZodEffects<z.ZodString, string, string>;
    }, "strict", z.ZodTypeAny, {
        pr: number;
        preimageSource: {
            kind: "lesson";
            lessonRef: string;
            badExample: string;
            goodExample: string;
        } | {
            kind: "commit";
            preimageCommitSha: string;
            mergeCommitSha: string;
        };
        filePath: string;
        matchedSpan: string;
        contentHash: string;
    }, {
        pr: number;
        preimageSource: {
            kind: "lesson";
            lessonRef: string;
            badExample: string;
            goodExample: string;
        } | {
            kind: "commit";
            preimageCommitSha: string;
            mergeCommitSha: string;
        };
        filePath: string;
        matchedSpan: string;
        contentHash: string;
    }>, {
        pr: number;
        preimageSource: {
            kind: "lesson";
            lessonRef: string;
            badExample: string;
            goodExample: string;
        } | {
            kind: "commit";
            preimageCommitSha: string;
            mergeCommitSha: string;
        };
        filePath: string;
        matchedSpan: string;
        contentHash: string;
    }, {
        pr: number;
        preimageSource: {
            kind: "lesson";
            lessonRef: string;
            badExample: string;
            goodExample: string;
        } | {
            kind: "commit";
            preimageCommitSha: string;
            mergeCommitSha: string;
        };
        filePath: string;
        matchedSpan: string;
        contentHash: string;
    }>, "many">;
    /**
     * Declared SILENCE-ONLY near-misses the rule must stay silent on (feeds §6
     * `controls.negative[]`). The `nearMissSource` shape (strategy#770) — one side,
     * no bad/good pair, no `pr` — NOT the positiveFixtures fixture shape.
     */
    negativeFixtures: z.ZodOptional<z.ZodArray<z.ZodObject<{
        filePath: z.ZodEffects<z.ZodString, string, string>;
        matchedSpan: z.ZodEffects<z.ZodString, string, string>;
        nearMissSource: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
            kind: z.ZodLiteral<"lesson">;
            example: z.ZodEffects<z.ZodString, string, string>;
            lessonRef: z.ZodOptional<z.ZodString>;
        }, "strict", z.ZodTypeAny, {
            kind: "lesson";
            example: string;
            lessonRef?: string | undefined;
        }, {
            kind: "lesson";
            example: string;
            lessonRef?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"commit">;
            commitSha: z.ZodString;
        }, "strict", z.ZodTypeAny, {
            kind: "commit";
            commitSha: string;
        }, {
            kind: "commit";
            commitSha: string;
        }>]>;
    }, "strict", z.ZodTypeAny, {
        filePath: string;
        matchedSpan: string;
        nearMissSource: {
            kind: "lesson";
            example: string;
            lessonRef?: string | undefined;
        } | {
            kind: "commit";
            commitSha: string;
        };
    }, {
        filePath: string;
        matchedSpan: string;
        nearMissSource: {
            kind: "lesson";
            example: string;
            lessonRef?: string | undefined;
        } | {
            kind: "commit";
            commitSha: string;
        };
    }>, "many">>;
    /**
     * Accelerant lineage (§7). Optional in the YAML; the reader defaults an
     * absent value to `{ kind: 'from-scratch' }` when constructing the record, so
     * the persisted `origin` is always explicit (§7 lineage is never erased).
     */
    origin: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"from-scratch">;
    }, "strip", z.ZodTypeAny, {
        kind: "from-scratch";
    }, {
        kind: "from-scratch";
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"mined-accelerant">;
        sourceRunId: z.ZodEffects<z.ZodString, string, string>;
        suggestionHash: z.ZodEffects<z.ZodString, string, string>;
    }, "strip", z.ZodTypeAny, {
        kind: "mined-accelerant";
        sourceRunId: string;
        suggestionHash: string;
    }, {
        kind: "mined-accelerant";
        sourceRunId: string;
        suggestionHash: string;
    }>]>>;
}, "strict", z.ZodTypeAny, {
    author: string;
    authoredAt: string;
    targetDefect: string;
    positiveFixtures: {
        pr: number;
        preimageSource: {
            kind: "lesson";
            lessonRef: string;
            badExample: string;
            goodExample: string;
        } | {
            kind: "commit";
            preimageCommitSha: string;
            mergeCommitSha: string;
        };
        filePath: string;
        matchedSpan: string;
        contentHash: string;
    }[];
    dslSource: string;
    declaredEngine: "regex" | "ast" | "ast-grep";
    structuralClass: string;
    negativeFixtures?: {
        filePath: string;
        matchedSpan: string;
        nearMissSource: {
            kind: "lesson";
            example: string;
            lessonRef?: string | undefined;
        } | {
            kind: "commit";
            commitSha: string;
        };
    }[] | undefined;
    origin?: {
        kind: "from-scratch";
    } | {
        kind: "mined-accelerant";
        sourceRunId: string;
        suggestionHash: string;
    } | undefined;
}, {
    author: string;
    authoredAt: string;
    targetDefect: string;
    positiveFixtures: {
        pr: number;
        preimageSource: {
            kind: "lesson";
            lessonRef: string;
            badExample: string;
            goodExample: string;
        } | {
            kind: "commit";
            preimageCommitSha: string;
            mergeCommitSha: string;
        };
        filePath: string;
        matchedSpan: string;
        contentHash: string;
    }[];
    dslSource: string;
    declaredEngine: "regex" | "ast" | "ast-grep";
    structuralClass: string;
    negativeFixtures?: {
        filePath: string;
        matchedSpan: string;
        nearMissSource: {
            kind: "lesson";
            example: string;
            lessonRef?: string | undefined;
        } | {
            kind: "commit";
            commitSha: string;
        };
    }[] | undefined;
    origin?: {
        kind: "from-scratch";
    } | {
        kind: "mined-accelerant";
        sourceRunId: string;
        suggestionHash: string;
    } | undefined;
}>;
export type AuthoredRuleInput = z.infer<typeof AuthoredRuleInputSchema>;
/**
 * SLICE B — the on-disk shape of `.totem/spine/authored-rules.yaml`. A file-level
 * authoring header carries the §5/§8 leakage-guard ATTESTATIONS once for the
 * session (not per-rule, since all rules in one file are authored under one
 * frozen split), followed by the rules. Slice B RECORDS these faithfully into the
 * authoring-ledger (strategy's boundary confirm: B records `splitRef` /
 * `authoredAfterSplit` / `fixturePrs`); the MECHANICAL verification — the split
 * was frozen BEFORE authoring (§5.1/FM(g)), fixtures resolve train-side (§5.2),
 * the harness is sandboxed (§5.4) — is the cert-run harness in SLICE C. The
 * attestations are `literal(true)`: an author who cannot attest them is not
 * authoring legitimately, so a `false` fails the read rather than recording a
 * self-defeating attestation. `.strict()` rejects unknown header keys.
 */
export declare const AuthoredRulesFileSchema: z.ZodObject<{
    /** The frozen split (ADR-110 §6) the rules were authored under (recorded; verified in C). Trimmed (GCA) so stray whitespace can't bypass the non-empty check or perturb the revision fingerprint. */
    splitRef: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
    /** §1(g) embargo attestation — authored AFTER the split was frozen. Always `true`; verified in C. */
    authoredAfterSplit: z.ZodLiteral<true>;
    /** §5 attestation — the author did not inspect the held-out slice. Always `true`; sandboxed in C. */
    heldOutNonInspectionAttestation: z.ZodLiteral<true>;
    /**
     * ADR-112 §5.1/§8 R1 — the frozen split's `freezeCommitment`, REQUIRED when
     * `splitRef` is a content-addressed frozen-artifact reference (`split:<sha256>`):
     * the intake binding verifies it against the resolved artifact and chains it
     * into every ledger entry's material (the (b) tamper-evidence leg). A legacy
     * free-text `splitRef` omits it (pre-R1 adherence-class shape, byte-unchanged).
     */
    freezeCommitment: z.ZodOptional<z.ZodString>;
    /** The authored rules (≥1). */
    rules: z.ZodArray<z.ZodObject<{
        /** Agent-id or operator handle — attributable (mirrors the provenance field). Trimmed. */
        author: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
        /**
         * ISO-8601 authoring date — trimmed + calendar-validated at the INTAKE boundary
         * (CR diff-review): the same `isIso8601CalendarDate` the record provenance uses,
         * so a malformed `not-a-date` fails here with a clean `CONFIG_INVALID` instead of
         * escaping to a raw ZodError at record construction (pass 1).
         */
        authoredAt: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
        /** The declared DEFECT the rule targets — the pre-image, not its fix (ADR-110 §4 TP-def). Trimmed. */
        targetDefect: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
        /** The matcher engine the author declares; the eligibility check confirms it can represent the class. */
        declaredEngine: z.ZodEnum<["regex", "ast", "ast-grep"]>;
        /**
         * The structural rule-CLASS the author CLAIMS. Fed to the INDEPENDENT
         * `evaluateStructuralEligibility` against the DI whitelist; it is NOT stored
         * verbatim on the record — the *verdict* (`structuralEligibility`, basis
         * `whitelist:<class>`) is. Naming a class is a claim the check adjudicates,
         * never a self-certification of `decidable`. Trimmed so a stray space can't
         * cause an exact-match miss against the registry.
         */
        structuralClass: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
        /** The human-written matcher (same DSL the compiler accepts from the miner). */
        dslSource: z.ZodEffects<z.ZodString, string, string>;
        /** ≥1 real lc instance the rule claims to catch — ALL train-side (§5). */
        positiveFixtures: z.ZodArray<z.ZodEffects<z.ZodObject<{
            pr: z.ZodNumber;
            preimageSource: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
                kind: z.ZodLiteral<"lesson">;
                lessonRef: z.ZodString;
                badExample: z.ZodEffects<z.ZodString, string, string>;
                goodExample: z.ZodEffects<z.ZodString, string, string>;
            }, "strict", z.ZodTypeAny, {
                kind: "lesson";
                lessonRef: string;
                badExample: string;
                goodExample: string;
            }, {
                kind: "lesson";
                lessonRef: string;
                badExample: string;
                goodExample: string;
            }>, z.ZodObject<{
                kind: z.ZodLiteral<"commit">;
                preimageCommitSha: z.ZodString;
                mergeCommitSha: z.ZodString;
            }, "strict", z.ZodTypeAny, {
                kind: "commit";
                preimageCommitSha: string;
                mergeCommitSha: string;
            }, {
                kind: "commit";
                preimageCommitSha: string;
                mergeCommitSha: string;
            }>]>;
            filePath: z.ZodEffects<z.ZodString, string, string>;
            matchedSpan: z.ZodEffects<z.ZodString, string, string>;
            contentHash: z.ZodEffects<z.ZodString, string, string>;
        }, "strict", z.ZodTypeAny, {
            pr: number;
            preimageSource: {
                kind: "lesson";
                lessonRef: string;
                badExample: string;
                goodExample: string;
            } | {
                kind: "commit";
                preimageCommitSha: string;
                mergeCommitSha: string;
            };
            filePath: string;
            matchedSpan: string;
            contentHash: string;
        }, {
            pr: number;
            preimageSource: {
                kind: "lesson";
                lessonRef: string;
                badExample: string;
                goodExample: string;
            } | {
                kind: "commit";
                preimageCommitSha: string;
                mergeCommitSha: string;
            };
            filePath: string;
            matchedSpan: string;
            contentHash: string;
        }>, {
            pr: number;
            preimageSource: {
                kind: "lesson";
                lessonRef: string;
                badExample: string;
                goodExample: string;
            } | {
                kind: "commit";
                preimageCommitSha: string;
                mergeCommitSha: string;
            };
            filePath: string;
            matchedSpan: string;
            contentHash: string;
        }, {
            pr: number;
            preimageSource: {
                kind: "lesson";
                lessonRef: string;
                badExample: string;
                goodExample: string;
            } | {
                kind: "commit";
                preimageCommitSha: string;
                mergeCommitSha: string;
            };
            filePath: string;
            matchedSpan: string;
            contentHash: string;
        }>, "many">;
        /**
         * Declared SILENCE-ONLY near-misses the rule must stay silent on (feeds §6
         * `controls.negative[]`). The `nearMissSource` shape (strategy#770) — one side,
         * no bad/good pair, no `pr` — NOT the positiveFixtures fixture shape.
         */
        negativeFixtures: z.ZodOptional<z.ZodArray<z.ZodObject<{
            filePath: z.ZodEffects<z.ZodString, string, string>;
            matchedSpan: z.ZodEffects<z.ZodString, string, string>;
            nearMissSource: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
                kind: z.ZodLiteral<"lesson">;
                example: z.ZodEffects<z.ZodString, string, string>;
                lessonRef: z.ZodOptional<z.ZodString>;
            }, "strict", z.ZodTypeAny, {
                kind: "lesson";
                example: string;
                lessonRef?: string | undefined;
            }, {
                kind: "lesson";
                example: string;
                lessonRef?: string | undefined;
            }>, z.ZodObject<{
                kind: z.ZodLiteral<"commit">;
                commitSha: z.ZodString;
            }, "strict", z.ZodTypeAny, {
                kind: "commit";
                commitSha: string;
            }, {
                kind: "commit";
                commitSha: string;
            }>]>;
        }, "strict", z.ZodTypeAny, {
            filePath: string;
            matchedSpan: string;
            nearMissSource: {
                kind: "lesson";
                example: string;
                lessonRef?: string | undefined;
            } | {
                kind: "commit";
                commitSha: string;
            };
        }, {
            filePath: string;
            matchedSpan: string;
            nearMissSource: {
                kind: "lesson";
                example: string;
                lessonRef?: string | undefined;
            } | {
                kind: "commit";
                commitSha: string;
            };
        }>, "many">>;
        /**
         * Accelerant lineage (§7). Optional in the YAML; the reader defaults an
         * absent value to `{ kind: 'from-scratch' }` when constructing the record, so
         * the persisted `origin` is always explicit (§7 lineage is never erased).
         */
        origin: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"from-scratch">;
        }, "strip", z.ZodTypeAny, {
            kind: "from-scratch";
        }, {
            kind: "from-scratch";
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"mined-accelerant">;
            sourceRunId: z.ZodEffects<z.ZodString, string, string>;
            suggestionHash: z.ZodEffects<z.ZodString, string, string>;
        }, "strip", z.ZodTypeAny, {
            kind: "mined-accelerant";
            sourceRunId: string;
            suggestionHash: string;
        }, {
            kind: "mined-accelerant";
            sourceRunId: string;
            suggestionHash: string;
        }>]>>;
    }, "strict", z.ZodTypeAny, {
        author: string;
        authoredAt: string;
        targetDefect: string;
        positiveFixtures: {
            pr: number;
            preimageSource: {
                kind: "lesson";
                lessonRef: string;
                badExample: string;
                goodExample: string;
            } | {
                kind: "commit";
                preimageCommitSha: string;
                mergeCommitSha: string;
            };
            filePath: string;
            matchedSpan: string;
            contentHash: string;
        }[];
        dslSource: string;
        declaredEngine: "regex" | "ast" | "ast-grep";
        structuralClass: string;
        negativeFixtures?: {
            filePath: string;
            matchedSpan: string;
            nearMissSource: {
                kind: "lesson";
                example: string;
                lessonRef?: string | undefined;
            } | {
                kind: "commit";
                commitSha: string;
            };
        }[] | undefined;
        origin?: {
            kind: "from-scratch";
        } | {
            kind: "mined-accelerant";
            sourceRunId: string;
            suggestionHash: string;
        } | undefined;
    }, {
        author: string;
        authoredAt: string;
        targetDefect: string;
        positiveFixtures: {
            pr: number;
            preimageSource: {
                kind: "lesson";
                lessonRef: string;
                badExample: string;
                goodExample: string;
            } | {
                kind: "commit";
                preimageCommitSha: string;
                mergeCommitSha: string;
            };
            filePath: string;
            matchedSpan: string;
            contentHash: string;
        }[];
        dslSource: string;
        declaredEngine: "regex" | "ast" | "ast-grep";
        structuralClass: string;
        negativeFixtures?: {
            filePath: string;
            matchedSpan: string;
            nearMissSource: {
                kind: "lesson";
                example: string;
                lessonRef?: string | undefined;
            } | {
                kind: "commit";
                commitSha: string;
            };
        }[] | undefined;
        origin?: {
            kind: "from-scratch";
        } | {
            kind: "mined-accelerant";
            sourceRunId: string;
            suggestionHash: string;
        } | undefined;
    }>, "many">;
}, "strict", z.ZodTypeAny, {
    rules: {
        author: string;
        authoredAt: string;
        targetDefect: string;
        positiveFixtures: {
            pr: number;
            preimageSource: {
                kind: "lesson";
                lessonRef: string;
                badExample: string;
                goodExample: string;
            } | {
                kind: "commit";
                preimageCommitSha: string;
                mergeCommitSha: string;
            };
            filePath: string;
            matchedSpan: string;
            contentHash: string;
        }[];
        dslSource: string;
        declaredEngine: "regex" | "ast" | "ast-grep";
        structuralClass: string;
        negativeFixtures?: {
            filePath: string;
            matchedSpan: string;
            nearMissSource: {
                kind: "lesson";
                example: string;
                lessonRef?: string | undefined;
            } | {
                kind: "commit";
                commitSha: string;
            };
        }[] | undefined;
        origin?: {
            kind: "from-scratch";
        } | {
            kind: "mined-accelerant";
            sourceRunId: string;
            suggestionHash: string;
        } | undefined;
    }[];
    splitRef: string;
    authoredAfterSplit: true;
    heldOutNonInspectionAttestation: true;
    freezeCommitment?: string | undefined;
}, {
    rules: {
        author: string;
        authoredAt: string;
        targetDefect: string;
        positiveFixtures: {
            pr: number;
            preimageSource: {
                kind: "lesson";
                lessonRef: string;
                badExample: string;
                goodExample: string;
            } | {
                kind: "commit";
                preimageCommitSha: string;
                mergeCommitSha: string;
            };
            filePath: string;
            matchedSpan: string;
            contentHash: string;
        }[];
        dslSource: string;
        declaredEngine: "regex" | "ast" | "ast-grep";
        structuralClass: string;
        negativeFixtures?: {
            filePath: string;
            matchedSpan: string;
            nearMissSource: {
                kind: "lesson";
                example: string;
                lessonRef?: string | undefined;
            } | {
                kind: "commit";
                commitSha: string;
            };
        }[] | undefined;
        origin?: {
            kind: "from-scratch";
        } | {
            kind: "mined-accelerant";
            sourceRunId: string;
            suggestionHash: string;
        } | undefined;
    }[];
    splitRef: string;
    authoredAfterSplit: true;
    heldOutNonInspectionAttestation: true;
    freezeCommitment?: string | undefined;
}>;
export type AuthoredRulesFile = z.infer<typeof AuthoredRulesFileSchema>;
/**
 * One decidable `(engine, structuralClass)` pair. The whitelist of these lives
 * in the CLI registry (slice B); the registry lists ONLY pairs the engine can
 * actually represent, so "exactly one match" subsumes ADR-112 §3's "AND the
 * engine can represent that class" condition.
 */
export interface WhitelistEntry {
    engine: DeclaredEngine;
    structuralClass: string;
}
/**
 * ADR-112 §3 — the INDEPENDENT structural-eligibility check. A CLOSED registry
 * predicate, NOT prose: `decidable` is true iff EXACTLY ONE whitelist entry
 * matches `(declaredEngine, structuralClass)`. Unknown class, unsupported
 * engine, or multiple matches → `decidable: false` (NO default-to-structural).
 * The author supplies `declaredEngine` + `structuralClass`; this check OWNS the
 * verdict — any author-supplied disposition is irrelevant here (FM(d)).
 * Deterministic + pure (no IO, no LLM) — the same input always yields the same
 * verdict (Tenet-15).
 */
export declare function evaluateStructuralEligibility(input: {
    declaredEngine: DeclaredEngine;
    structuralClass: string;
}, whitelist: readonly WhitelistEntry[], judgedBy: string): StructEligResult;
/**
 * ADR-112 §8 — mint a stable, deterministic authored rule-id. The seed is
 * `sha256(JSON.stringify([author, targetDefect]))[:16]` (an INJECTIVE encoding —
 * see the inline note) — `dslSource` is DELIBERATELY EXCLUDED so an author can
 * tighten/refactor the matcher without orphaning the rule's ledger history. On collision with an already-resolved id (two rules sharing the same
 * `(author, targetDefect)`), a stable `-N` counter is appended. The RESOLVED id
 * is what callers persist — never recompute the raw seed at read time, or a
 * later sibling could shift the suffix (the gemini/agy break). The
 * `never-remine` marker is keyed to `targetDefect`, handled by the accelerant
 * miner, not here.
 */
export declare function mintAuthoredRuleId(author: string, targetDefect: string, existingIds: ReadonlySet<string>): string;
/**
 * The authored producer's compile-stage input — what `toCompileFeed` builds for
 * `runCompileStage`. Deliberately NOT a `ClassifyStageResult`: an authored rule
 * has no mining emission ledger, so faking one would be a provenance lie. The
 * classifier ledger it carries records `dispositionSource: 'authored-whitelist'`.
 */
export interface AuthoredCompileFeed {
    candidates: CompileInputCandidate[];
    classifierLedger: ClassifierLedger;
}
/**
 * ADR-112 §2/§8 — turn structurally-DECIDABLE authored rules into the input
 * `runCompileStage` consumes, reusing the ONE G-series compiler (never a second).
 * The disposition is set HERE to `'structural'` from the INDEPENDENT eligibility
 * verdict (§3) — the author never sets it. A NON-decidable record is a contract
 * violation → FAIL LOUD (the FM(d) backstop in code), never a silent skip.
 * `classifierLedgerRef = authored:<authoringLedgerRef>` is unique per rule (the
 * authoring ledger is 1:1 with the rule); a duplicate fails loud so the downstream
 * 1:1 classifier-ledger join can't silently collapse.
 */
export declare function toCompileFeed(records: readonly AuthoredRuleRecord[]): AuthoredCompileFeed;
//# sourceMappingURL=authored-rule.d.ts.map