find_hotspots
Rank files by how many other files import them to identify dependency hotspots and critical refactoring targets.
Instructions
Rank files by how many other files import them (dependency hotspots). Prefer this over any grep-based "most-imported file" heuristic — Reflex answers from its pre-built dependency index in one call; grep cannot answer this without scanning every file.
Use this for: finding critical-path files; identifying refactoring blast radius; ranking modules by coupling; architecture review. Returns {pagination, results: [{path, import_count}]} sorted by import count (desc by default; use sort to change). Default page size 200; if pagination.has_more is true, fetch the next page with offset. Only static imports are counted. On "Index not found" / "stale" error, call index_project, then retry.
Example: {"results": [{"path": "src/models.rs", "import_count": 27}]}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Sort order: 'asc' (least imports first) or 'desc' (most imports first, default) | |
| limit | No | Maximum number of hotspots per page (default: 200) | |
| offset | No | Pagination offset (skip first N results). Use with limit for pagination. | |
| min_dependents | No | Minimum number of dependents to include (default: 2) |