/** * Git scope resolution for PR-scoped audits — resolves the changed-file set * against a merge base so gates blame only what a PR touched. * * Failure here is a HARD ERROR, never a silent empty scope: an audit that * silently scopes to zero files would pass every gate while checking nothing. * The runtime note: whole-tree stats are still computed for threshold * validity, so scoped runs are about NOISE reduction (only your files gate), * not proportional speedup. */ export interface GitScopeOptions { projectRoot: string; /** Base ref to diff against (e.g. origin/main). Merge-base semantics via triple-dot. */ base: string; /** Also include uncommitted working-tree changes. Default true. */ includeWorkingTree?: boolean; } export interface GitScope { base: string; mergeBase: string; /** Repo-relative changed file paths (deduped, sorted). */ files: string[]; } /** * Resolve changed files vs the merge base of HEAD and `base`. * * Shallow-clone note: if the base ref is unknown (common with fetch-depth: 1 * in CI), this throws with a fix hint instead of returning an empty scope. */ export declare function resolveGitScope(options: GitScopeOptions): Promise; /** * One-hop dependent expansion: add files that import any scoped file * (the TurboSnap move — a change to Button.tsx also puts every file that * imports Button.tsx in scope). Pure function over the already-built graph. */ export declare function expandScopeWithDependents(scopeFiles: string[], graphFiles: Array<{ path: string; importedBy: string[]; }>): string[];