/** * `codebase-impact-analysis` tool — calculate the blast radius and breaking change risk of modifying a symbol. * * Usage: codebase-impact-analysis({ * symbol: string, // name of the function, method, class, or type to analyze * file?: string, // optional file path to disambiguate * transitive?: boolean, // traverse transitive callers (default: true) * }) */ import type { Tool } from '@wrongstack/core/types'; export interface ImpactAnalysisInput { /** The symbol name (function, method, class, interface, type) to analyze. */ symbol: string; /** Optional file path to disambiguate when multiple symbols share a name. */ file?: string | undefined; /** Whether to traverse transitive callers (callers of callers). Defaults to true. */ transitive?: boolean | undefined; } export type CodebaseImpactAnalysisInput = ImpactAnalysisInput; export interface ImpactCallSite { file: string; line: number; callerName: string; callerKind: string; callType: string; isTest: boolean; /** A caller of a caller: reached through the transitive tree, not a direct use. */ indirect?: boolean | undefined; } export interface ImpactAnalysisOutput { status: 'ok'; symbol: string; riskLevel: 'low' | 'medium' | 'high'; summary: string; totalCallSites: number; affectedProductionFiles: string[]; affectedTestFiles: string[]; callSites: ImpactCallSite[]; recommendedActionPlan: string[]; /** False when the symbol could not be resolved in the index. */ symbolFound?: boolean; /** True when a previous generation's cached answer was served during a refresh. */ stale?: boolean | undefined; } export type CodebaseImpactAnalysisOutput = ImpactAnalysisOutput; /** Whether a project-relative path looks like a test, fixture, mock, or bench file. */ export declare function isTestFilePath(relPath: string): boolean; export declare const codebaseImpactAnalysisTool: Tool; //# sourceMappingURL=codebase-impact-analysis-tool.d.ts.map