import type { DoctorCheck } from "./doctor.js";
/**
 * Worktree count above which doctor warns.
 *
 * Not derived from a failure rate — the measurements in CodySwannGT/lisa#2490
 * varied worktree count and machine load together (27 worktrees at load ~50,
 * 38 at load ~115), so they cannot isolate a count at which suites start
 * failing. The threshold is grounded in the one quantity that IS deterministic:
 * crawl amplification. Each worktree is a full checkout, so every tool that
 * globs from the repo root sees the project's own source multiplied by the
 * worktree count. Measured in this repo at 20 worktrees: 14,389 `.ts` files
 * under `.claude/worktrees` against 1,023 in the project itself — 14x. Ten is
 * the point past which the accumulated checkouts dominate the tree by an order
 * of magnitude, which is early enough to act on and late enough that ordinary
 * parallel work does not trip it.
 */
export declare const WORKTREE_COUNT_WARN_THRESHOLD = 10;
/**
 * Report how many agent worktrees have accumulated under this checkout.
 *
 * Agent worktrees are the root enabler behind the environmental unit-suite
 * failures in CodySwannGT/lisa#2490: they are never garbage-collected, each one
 * is a full checkout, and the resulting tree is what every crawler in the repo
 * has to walk past. The same cause is documented downstream three separate ways
 * in `acmeorga/frontend` (watchman crawl cost, jest's find-crawler overflowing
 * V8's max string length, an unanchored Metro blockList pattern) — all of which
 * only appeared once enough worktrees had piled up.
 *
 * Read-only and warn-only by design. Doctor reports the count and names the
 * repair; it never removes a worktree itself, because the operator is the only
 * one who knows whether an idle-looking checkout still holds work.
 *
 * Running from INSIDE a worktree naturally reports clean: the roots live in the
 * primary checkout, so a worktree has none of its own. That matches how
 * `isInsideWorktree` conditions the vitest and jest exclusions.
 * @param targetPath - Project path to inspect
 * @returns Doctor check result
 */
export declare function checkWorktreeHygiene(targetPath: string): Promise<DoctorCheck>;
//# sourceMappingURL=doctor-worktree-hygiene.d.ts.map