/** * Is a path required to exist in a checkout at all? * * The dominant false positive on `dead-reference` was never a stale comment: it * was a correct reference to a file git is told not to track. Ranked over this * repository, the top twelve "dead" citations were `.claude/settings.local.json`, * `.peaks/_runtime/session.json`, `.peaks/.session.json`, * `.peaks/_runtime/active-skill.json`, `.codegraph/config.json`, * `.peaks/preferences.json` and friends — all generated state, all named * correctly by the code that writes them. * * So the probe answers "exists OR ignored", and the ignore reading is deliberately * bounded: trailing-slash prefixes, whole-path entries, and bare-basename entries. * That limit has a direction, and the direction is the safe one — a rule * `.gitignore` expresses fancily (negation, `**`, character classes) is NOT read * here, so such a path stays reported. A missed exemption is a finding a human * reads and dismisses; a phantom exemption is a silent false green in a gate that * exists to catch claims that outlived their referent. */ type IgnoreRules = { /** Directory rules: match the path and everything below it. */ readonly prefixes: readonly string[]; /** File rules written with a slash: match that exact repo-relative path. */ readonly exact: ReadonlySet; /** Basename rules: match that name in any directory. */ readonly basenames: ReadonlySet; }; /** True when `.gitignore` says this repo-relative path need not be on disk. */ export declare function isIgnoredPath(relPath: string, rules: IgnoreRules): boolean; /** * Build the existence probe a scan should use: a real filesystem lookup, widened * by the repository's own ignore list read from its root. * * The second export below is the deliberate exception. "Is this an installed * package name?" must NOT be widened by the ignore list, because `node_modules` is * itself ignored — an ignore-aware probe answers yes for every first segment, and * the whole `dead-reference` count collapses to zero while looking perfectly * healthy. */ export declare function createRepoProbe(repoRoot: string): (relPath: string) => boolean; /** Filesystem-only existence, for questions where "git ignores it" is no answer. */ export declare function createFsProbe(repoRoot: string): (relPath: string) => boolean; export {};