Packages in the wrong place

The problem

A refactor leaves a tiny package behind. It has one meaningful connection to the rest of its parent subtree, and you cannot tell whether it still represents a useful boundary or simply belongs with the package on the other side. The package might be intentional, misplaced, or leftover structure that nobody cleaned up.

Why it matters

Small, weakly connected fragments are cheap to inspect, but leaving accidental ones in place adds navigation and makes the package structure harder to explain. Not every small package is wrong. The useful question is whether that isolated boundary still has a clear job. Answering it now can turn a vague cleanup concern into a small merge, move, or explicit decision to keep the seam.

Where to start

Begin with the Topology Graph.

Step by step

  1. Start with the low-connectivity preset.

    Open this workflow from the Workflow Wizard. It starts Topology with Max refs set to your model's 25th-percentile reference count, Fan-in and Fan-out capped at 1, Hide Isolated enabled, and the Distance heatmap active.

  2. Limit the search to the relevant parent.

    Right-click the parent package and choose Set as Root, keeping Hide Isolated enabled. Use Expand completely on that parent so every candidate in its subtree is visible without expanding unrelated modules.

  3. Use Distance as supporting evidence.

    Higher Distance means a package's abstractness and instability balance sits farther from the ideal main sequence. That can add design pressure to an already weakly connected fragment, but it does not determine where the package belongs.

  4. Inspect the one meaningful connection.

    Select a candidate and click its remaining edge to see the concrete dependency evidence. Check what crosses the boundary, which direction it runs, and whether the fragment has a responsibility that deserves a separate package.

  5. Decide what the fragment should become.

    Merge it with the package on the other side when the boundary adds no value. Move it under a parent that better matches its job when the responsibility is real but the placement is not. Keep it when it forms an intentional seam you can explain.

Interpreting results

This workflow finds placement candidates, not automatic mistakes. Low connectivity makes a fragment inexpensive to investigate. Distance adds evidence about its abstractness and instability balance, not a verdict about intended package structure. The concrete connection and the responsibility you expect from the boundary decide the outcome: merge it, move it, or preserve it as an intentional seam.

Export & share

Use Snapshot as PNG to attach the filtered Topology view to a cleanup ticket. Use View as DOT when you need the exact visible structure for another tool.