Inspect subsystem composition

The problem

You have opened a module or package subtree, but you still do not have a feel for what is inside it. Before judging dependencies, cycles, or risk signals, you need a map of its package hierarchy, its depth, and where most of the code sits.

Why it matters

A subsystem can look simple at its boundary while hiding a very uneven internal shape. One deep branch may hold most of the code. One package may dominate the source-unit count. Seeing that composition first gives every later investigation some context, so you do not mistake "large" for "bad" or treat a tiny adapter like a core domain package.

Where to start

Begin with Composition.

Step by step

  1. Choose the scope you want to inspect.

    Start exploring preserves an existing Root, whether it is a module or package subtree. Without a Root, Composition starts from the whole-project module overview. Set as Root in Topology or Matrix first only when you deliberately want a narrower starting scope.

  2. Start with the neutral hierarchy view.

    Start exploring opens Composition as a Sunburst measured by LOC. Read the branch structure and nesting depth before turning on another metric.

  3. Compare proportions in Treemap.

    Switch to Treemap when you want to compare relative size. Adaptive starts with a readable frontier, so you can see the main branches without flattening the complete hierarchy.

  4. Compare two kinds of growth.

    Switch Measure between LOC and Classes for Java or Kotlin, or Source files for TypeScript. A branch with more code per unit has a different shape from one made up of many small units.

  5. Add one signal when it answers a real question.

    Use the CogC Max heatmap to find the strongest cognitive-complexity concentration when that metric is available. In Java or Kotlin, Distance can show packages away from the main sequence. Treat either colour as a prompt to inspect the package's role, not as a quality verdict.

  6. Drill into the branch that deserves a closer look.

    Double-click a Sunburst segment or Treemap rectangle to make that package the Current Focus. Use the breadcrumb to move back up. Turn Heatmap off and return to Sunburst whenever you want the clean hierarchy and size reading again.

Interpreting results

The largest branch is not automatically the worst branch. This workflow gives you bearings: which packages make up the subsystem, how deeply they nest, and whether code mass, source-unit count, or an optional metric concentrates in one part of the tree. Leave with a short list of questions worth taking into a coupling, complexity, boundary, or cycle investigation.

Export & share

Use Export → Snapshot as PNG when the current Composition hierarchy is useful in a review. For a broader recurring review across multiple lenses, continue with Project architecture health review and generate the Architecture Report only after you have inspected the live evidence.