get_surprises
Identify unexpected cross-module dependencies that reveal hidden coupling. Ranks file edges by surprise score based on folder distance and target popularity.
Instructions
Rank cross-module file edges by how unexpected they look (deep folder distance + popular target + few edges = high surprise). Surfaces hidden coupling that shotgun-changes through unrelated modules. Requires detect_communities to have been run first. Read-only. Returns JSON: { edges: [{ sourceFile, targetFile, surpriseScore, ... }], totalCommunities }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No | Number of top surprising edges to return (default 20) |