topos_refactor
Identify refactoring hotspots by analyzing cycle, dependency, process, or graph structure. Returns a ranked list of suggestions to guide code improvements.
Instructions
Rank structural refactor hotspots for one file (read-only, advisory).
Does not score the four pillars — use topos_evaluate_* for
medals and topos_assess_* to verify edits afterward. target
selects the engine: cycles (CFG loop/branch bodies),
dependencies (MDG Forman curvature on imports; needs .gitnexus),
process (execution choke points; needs .gitnexus), or graphify
(orphan/fragile edges; needs a Graphify graph from
topos_generate_graphify_graph). Returns a RefactorResult with ranked
hotspots (kind, label, score, suggestion, optional lines).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum hotspots to return (default 5). | |
| target | Yes | Which analysis engine to run: `cycles` (CFG), `dependencies` / `process` (need `.gitnexus`), or `graphify` (need Graphify graph). | |
| filepath | Yes | Source file path relative to the MCP file root. | |
| gitnexus_dir | No | Override `.gitnexus` directory (`dependencies` / `process` targets). | |
| graphify_dir | No | Override Graphify output directory (`target=graphify` only). |