/**
 * Anti-drift declarative rule list (0.7.33 — unified-evaluator track).
 *
 * Per loop/docs/opensquid-anti-drift-unified-evaluator-design.md: one
 * declarative `Rule[]` list replaces the per-file hook handlers in
 * src/hooks/*. Each rule:
 *
 *   - `id`         stable identifier
 *   - `catches`    which D-entry (or "preexisting") this rule covers
 *   - `hook`       which lifecycle event this rule binds to
 *   - `when`       (cheap, synchronous) gate — short-circuits before
 *                  expensive `check` work
 *   - `check`      (async) returns a Verdict
 *   - `bypass`     optional env var that emergency-disables the rule
 *   - `rationale`  one-line agent-facing reason (used in error messages)
 *
 * Today the check functions DELEGATE to existing src/hooks/* helpers
 * (engine-vocab-gate, versioning-gate, workflow-gate, drift-patterns,
 * inline-report-check, etc.) so this patch ships the declarative
 * SURFACE without re-implementing every gate. The 0.7.35 cutover
 * moves the helper bodies into src/anti-drift/* and deletes the old
 * per-hook files.
 *
 * The evaluator (0.7.34) walks this list at each hook event, runs
 * applicable rules, aggregates verdicts (most-restrictive wins for
 * PreToolUse permissions; all surfaces accumulate at Stop/UPS).
 */
export type HookEvent = "PreToolUse" | "Stop" | "UserPromptSubmit" | "SessionEnd";
export type Verdict = {
    kind: "pass";
} | {
    kind: "block";
    message: string;
} | {
    kind: "warn";
    message: string;
} | {
    kind: "surface";
    message: string;
};
export interface HookContext {
    /** Lifecycle event this hook fire represents. */
    hookEvent: HookEvent;
    /** Claude Code session id. */
    sessionId?: string;
    /** Path to the session's JSONL transcript. */
    transcriptPath?: string;
    /** Working directory the tool will execute in. */
    cwd?: string;
    /** PreToolUse only: name of the tool about to be called. */
    toolName?: string;
    /** PreToolUse only: input object for the tool call. */
    toolInput?: Record<string, unknown>;
    /** Stop only: the just-completed assistant message text. */
    assistantText?: string;
    /** UserPromptSubmit only: the user's prompt text. */
    userPrompt?: string;
}
export interface Rule {
    id: string;
    catches: string;
    hook: HookEvent;
    when: (ctx: HookContext) => boolean;
    check: (ctx: HookContext) => Promise<Verdict>;
    bypass?: string;
    rationale: string;
}
export declare const RULES: Rule[];
/**
 * Pick the rules that apply to a given hook event AND that aren't
 * bypassed. Exported so the evaluator and tests share the same filter.
 */
export declare function rulesForEvent(event: HookEvent): Rule[];
/**
 * Walk applicable rules and collect verdicts. Stops at the first
 * `block` for PreToolUse events; aggregates all surfaces/warns for
 * Stop/UPS/SessionEnd events.
 */
export declare function evaluateRules(ctx: HookContext): Promise<Verdict[]>;
//# sourceMappingURL=rules.d.ts.map