Impact
impact
ImpactHook & DocImpactHook — blast-radius and doc-impact analysis.
Protocol hooks registered via axm.hooks entry points:
-
ast:impact→ImpactHook— callsanalyze_impact, returns the complete impact report asHookResultmetadata. Supports newline-separated symbol lists with max-score merge semantics. -
ast:doc-impact→DocImpactHook— callsanalyze_doc_impact, returnsdoc_refsasHookResultmetadata. Supports newline-separated symbol lists.
DocImpactHook
Run doc impact analysis on one or more symbols.
Reads path from params (or working_dir from context)
and symbol from params. When symbol contains newline
characters, each line is treated as a separate symbol.
Source code in packages/axm-ast/src/axm_ast/hooks/impact.py
execute(context, **params)
Execute the hook action.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
dict[str, object]
|
Session context dictionary. |
required |
**params
|
object
|
Must include |
{}
|
Returns:
| Type | Description |
|---|---|
HookResult
|
HookResult with full report ( |
Source code in packages/axm-ast/src/axm_ast/hooks/impact.py
EnrichedImpactResult
Bases: ImpactResult
ImpactResult enriched with witness-friendly aliases.
Adds test_paths (alias for test_files) and packages
(space-separated dirs from cross_package_impact) so that
witness templates can extract them directly.
Source code in packages/axm-ast/src/axm_ast/hooks/impact.py
ImpactHook
dataclass
Run impact analysis on one or more symbols.
Reads path from params (or working_dir from context)
and symbol from params. When symbol contains newline
characters, each line is analyzed separately and results are
merged (max score, concatenated lists, deduplicated modules/tests).
Source code in packages/axm-ast/src/axm_ast/hooks/impact.py
| Python | |
|---|---|
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | |
execute(context, **params)
Execute the hook action.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
dict[str, object]
|
Session context dictionary. |
required |
**params
|
object
|
Must include |
{}
|
Returns:
| Type | Description |
|---|---|
HookResult
|
HookResult with |
HookResult
|
|
HookResult
|
|
HookResult
|
|
HookResult
|
In compact mode, |
HookResult
|
a pre-formatted string instead. |
Source code in packages/axm-ast/src/axm_ast/hooks/impact.py
| Python | |
|---|---|
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | |