export interface ClaimDisciplineFinding {
    ruleId: string;
    ruleHeading: string;
    file: string;
    line: number;
    match: string;
    severity: 'error' | 'warning';
}
export interface ClaimDisciplineResult {
    /** False only when an `error`-severity finding fires AND no bypass is recorded. */
    valid: boolean;
    findings: ClaimDisciplineFinding[];
    warnings: string[];
    /** True when TOTEM_GATE_BYPASS_JUSTIFICATION is set with non-empty value. */
    bypassed: boolean;
    /** Verbatim justification text when bypassed; undefined otherwise. */
    bypassJustification?: string;
}
export interface ClaimDisciplineOptions {
    /** Override env reading for tests (production uses process.env). */
    envForTest?: NodeJS.ProcessEnv;
    /** Override file discovery for tests (production walks WWND surfaces on disk). */
    filesForTest?: string[];
    /** Override repo root for tests (production calls resolveGitRoot). */
    repoRootForTest?: string;
    /**
     * When provided, narrow the in-scope WWND surface set to the intersection of
     * (literal+glob walk) AND `changedFiles`. Paths must be posix-style (forward
     * slashes), repo-root-relative — same shape as `git diff --name-only` output.
     *
     * `undefined` preserves the standing-gate behavior (full surface scan).
     * Empty array means "no diff-touched WWND surfaces" → no findings.
     *
     * Anchor: mmnto-ai/totem#2002 — pre-existing WWND warnings at standing-gate
     * surfaces (e.g. `docs/wiki/governing-ai-agents.md:58`) fire on every push
     * regardless of diff scope. Diff-scope narrowing prevents that scope bug
     * without papering over it via an allowlist.
     */
    changedFiles?: readonly string[];
}
/**
 * Programmatic surface — returns the result without exiting or throwing.
 * The CLI action layer wraps this and throws a `TotemError` when
 * `result.valid === false` so the top-level `handleError` produces the exit
 * code (avoids direct `process.exit()` calls per AGENTS.md doctrine).
 */
export declare function doctorClaimDisciplineCommand(options?: ClaimDisciplineOptions): Promise<ClaimDisciplineResult>;
export interface ClaimDisciplineCliOptions extends ClaimDisciplineOptions {
    /**
     * Strict mode: promote `warning`-severity findings to gate failures (same
     * semantic as `totem doctor --strict`). Absent the flag, only
     * `error`-severity findings fail the gate. The pre-push hook invokes
     * `--claim-discipline --strict` per Proposal 279 § Implementation Notes Q3.
     *
     * `strict` is CLI-presentation-only — the programmatic `doctorClaimDisciplineCommand`
     * always returns the same findings; this flag controls whether the CLI throws on
     * warning-severity findings. Inherited test-injection fields (`envForTest`,
     * `filesForTest`, `repoRootForTest`) pass through to the programmatic command for
     * integration testing.
     */
    strict?: boolean;
    /**
     * Diff-scope narrowing flag (mmnto-ai/totem#2002). When set, the CLI resolves
     * the operator's diff-touched files via `git diff --name-only --diff-filter=ACMR
     * <merge-base>...HEAD` and forwards the list as `changedFiles` to the
     * programmatic command. Merge-base resolution prefers `git merge-base HEAD
     * @{upstream}`; falls back to `HEAD~1` for unconfigured branches. On total
     * resolution failure (detached HEAD with no parent + no upstream), emits a
     * warning and proceeds with the standing-gate full scan.
     *
     * The pre-push hook passes `--scope-to-diff` so the gate only fires on files
     * the operator's push actually touches — eliminating the #2002 false-positive
     * class where unrelated diffs trigger pre-existing standing-gate warnings.
     */
    scopeToDiff?: boolean;
    /**
     * Test-only injection point for the diff-resolved file list. When set, bypasses
     * the actual `git diff --name-only` invocation and forwards the array directly
     * as `changedFiles`. Production callers leave this `undefined` and rely on
     * `scopeToDiff` to trigger the real git resolution.
     */
    changedFilesForTest?: readonly string[];
}
/**
 * CLI entry — wraps `doctorClaimDisciplineCommand` and throws on hard
 * failure so the top-level `handleError` produces the non-zero exit code
 * without a direct `process.exit` call. Warning-severity findings are
 * reported to the user; they fail the gate only under `--strict`.
 */
export declare function doctorClaimDisciplineCliCommand(options?: ClaimDisciplineCliOptions): Promise<void>;
//# sourceMappingURL=doctor-claim-discipline.d.ts.map