Estimate Impact of a Change
impact_of_changeEstimate the blast radius of changing a C# symbol before editing: count direct and transitive dependents, production impact, and return a risk level.
Instructions
Estimate the blast radius of changing a symbol: direct users, their dependents and a risk level.
Call it first, before any edit to a symbol other code names (rename, signature, default value): a compile checks names, not what consumers assume.
Returns directCount, transitiveCount (per declaration, tests included), productionImpactCount (transitive, no tests), risk, directImpact (max 20, find_usages items). risk reads productionImpactCount: 0 none, 1-4 low, 5-20 medium, over 20 high; it counts dependents, not what the change means. If one cycle dominates a high closure, 'saturation' leads the counts and risk reads the direct production fan-in.
Per kind: a type - the types referencing it, transitively; a method or operator - its caller closure through interface and abstract dispatch; a property, field, event or enum member - the code touching it (transitive = direct). A qualified method counts its contract and virtual-base callers ('viaContract').
An interface or abstract method or type adds 'implementers' per contract (what a signature change breaks; an entry's 'namesakes' splits merged contracts), and risk reads 'riskBasis'.total = closure + production implementing types (on a type direct ones only, 'indirect' lists the rest; 'riskBasis'.note: no production caller).
Trailing, moving no count: 'registration' (reached only through DI), 'serializers' (a property's serializer sites), 'attachedProperty' (a dependency property's accessor or wrapper markup users).
Ahead of the counts: a 'note' on misleading numbers (directCount 0 on a resolved symbol - DI or reflection may reach it; unresolved core references; no production project; 'not_found': risk 'none' measures nothing, 'nearest' gives a close name; a private member), 'collision' (a same-named other kind, not counted) and 'namesakes' (types sharing the name, counted as one union).
Read-only. symbol is case-sensitive, resolved as in find_usages: a type by simple name, a member bare (one kind) or 'Type.Member'; for a constructor ('Type.Type') use find_usages.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sessionId": "<sessionId>",
"symbol": "<symbol>"
},
"name": "impact_of_change"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | The exact (case-sensitive) type, method, property, field, event, enum-member or operator (metadata) name to assess - or the qualified Type.Member form for a member. | |
| sessionId | Yes | The session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use. |