Zum Inhalt springen

Architecture, risk hotspots, types and projects

Architecture views explain dependencies and cycles. Risk hotspots rank types using complexity, coverage and findings.

Under Code — Show in screenshot, Architecture — Show in screenshot and Risk hotspots — Show in screenshot show dependencies, cycles and types that need closer review. Type and project pages add findings and coverage for the affected code. These views help prepare changes and select additional tests.

Question Starting point and next step
How is the solution layered? Open the project map in Architecture — Show in screenshot and select a project. The side panel shows its dependencies.
Which connection sustains a namespace cycle? Select a group in Cycles and inspect the breaking edges and their references.
What structural changes does a branch introduce? Start the comparison with the default branch and inspect added cycles and coupling changes.
Which types need review first? Open Risk hotspots — Show in screenshot and inspect the factors behind a high score. A type name leads to findings, coverage and dependencies.
Which other types might a change affect? Open the type page and use Neighbourhood — Show in screenshot or Who breaks — Show in screenshot.

Namespace cycles

Architecture — Show in screenshot requires a selected workspace. The Cycles — Show in screenshot tab groups cyclically connected namespaces. An entry can therefore contain several loops.

With a loaded workspace, five metrics appear above the tabs:

Metric Meaning
Projects — Show in screenshot Number of projects in the loaded analysis.
Types — Show in screenshot Number of recorded code types.
Namespace dependencies — Show in screenshot Number of connected namespace pairs. Multiple reference kinds between the same pair count as one dependency.
Namespace cycles — Show in screenshot Number of detected cycles, with the change over 30 days.
Median instability — Show in screenshot Middle instability value of the recorded types.

The Cycles — Show in screenshot tab shows the current dependency graph. The Cycle selector switches between detected groups. A ring draws namespaces and their connections; Current cycles — Show in screenshot lists one shortest loop per group.

The cycles tab with the ring graph and the edges that break the cycle The cycles tab with the ring graph and the edges that break the cycle

The cycle graph, project map and type neighbourhood offer a table view of nodes and connections alongside the drawing. It supports looking up individual dependencies even in crowded graphs.

The ring shows at most 40 namespaces by default and identifies omissions. The assessment of possible ways to break the cycle still uses the complete cycle. Re-check cycles starts a fresh analysis.

For an unloaded workspace, stored information such as date, cycle count and history remains visible. Load workspace loads the analysis after confirmation. Opening the page alone loads nothing. A timeout offers another attempt and leaves the workspace loaded.

Breaking a cycle by decoupling

A red dashed edge marks a dependency whose removal would break the cycle. The side panel Edges that break the cycle alone — Show in screenshot lists these edges and their reference counts. Fewer references can be a useful starting point for investigation; the actual effort depends on the code.

For the edge with the fewest references, the page lists the involved types and reference kind. The kinds distinguish inheritance, implementation, usage, calls, attributes and creation. Each row identifies a connection to review when considering how to separate the namespaces.

If no single edge breaks the cycle, several changes are needed. The reference list requires the loaded analysis. If it has been unloaded or responds too late, the panel explains why.

Project map

The project map shows the solution's layers: entry points at the top, foundational projects below. An arrow means “uses”; its width represents the reference count.

Control Effect
Select a project Highlights its connections. The side panel shows its types, the projects it uses and those using it.
Hide projects — Show in screenshot Limits the drawing and table to the remaining projects.
Show all projects Restores hidden projects.

Edges omitted for readability are identified. When the project map is too large to draw, its table view remains available.

The project map tab with the layers of the workspace and the arrows for "uses" The project map tab with the layers of the workspace and the arrows for "uses"

The map helps assess project boundaries. View cycles — Show in screenshot leads to dependency loops at namespace level.

Compare with default branch

The comparison shows types, dependencies and namespace cycles added or removed by a branch. The base is the default branch from origin/HEAD, with main or master as fallbacks.

Start comparison requires confirmation. The first comparison builds the base in a separate worktree and can take several minutes. Later comparisons can use cached results.

Results show additions and removals together, such as “+3 / −1”. Newly introduced cycles are highlighted. The latest comparison names its branch, base and time. Structural effect of the branches presents the latest comparisons for up to 20 branches:

Field Meaning and next step
Branch and time Associate the result with a branch and comparison run. A linked time opens the associated run.
Types, dependencies and cycles Separate counts for added and removed elements.
Largest coupling change Identifies the largest change in fan-in and fan-out. The type name opens its detail page.

Stored comparisons require the insights store.

Hubs, fan-in and fan-out

Hubs are highly connected types. Changes to them can affect many other types. The tab ranks the 20 types with the highest combined fan-in and fan-out in the loaded analysis.

Metric Meaning
Fan-in Number of types using this type.
Fan-out Number of types this type uses.
Instability Fan-out divided by fan-in plus fan-out. 0 means no outgoing dependencies; 1 means no incoming dependencies. With no dependencies, the value is undefined.

Further columns complement the coupling values:

Column Meaning
Type and project Identify the type and its project.
Fan-in + fan-out Sum of both directions; determines the ranking.
Lines Code size from the stored analysis; helps distinguish similarly coupled types by size.
Cyclomatic, Cognitive and MI Add complexity and maintainability from the stored analysis to the coupling values. The type page leads to the corresponding metrics and findings.

Values from Lines onwards come from the latest stored analysis of the named branch. The page identifies missing data. The ranking is approximate means the selection was bounded, and other highly connected types may be absent.

Risk hotspots

Risk hotspots — Show in screenshot prioritizes types using complexity, coverage, fan-in and open findings. The ranking provides a starting point for reviews and additional tests.

The table of risk hotspots The table of risk hotspots

The table shows the 25 highest-scoring types. It uses stored data from the most recently analysed branch and works with an unloaded workspace. Without a workspace selection, it includes all workspaces and adds a Workspace column. The subtitle gives the number of assessed types.

Column Meaning
Type — Show in screenshot Type name with its project; opens the type detail.
Cyclomatic — Show in screenshot Complexity of the type based on its execution paths.
Coverage — Show in screenshot Line coverage from the latest full run. A dash identifies a missing measurement.
Fan-in — Show in screenshot Number of types that depend on this type.
Open findings — Show in screenshot Unresolved rule violations for this type. The funnel opens them in the explorer.
Risk score — Show in screenshot Combined value of the four factors, with a comparison bar. The calculation explains weighting and missing coverage.

Types without measured coupling are excluded because their fan-in is unknown; the page states their count. Without an analysis, it shows No metrics yet.

When a selection across workspaces is limited, the page notes that some workspaces were not included. Selecting one workspace focuses the assessment on its types.

Risk score calculation

Score = cyclomatic × (1 − coverage + 0.05) × (1 + fan-in / 5) × (1 + open findings)
Factor Effect
Cyclomatic complexity Supplies the starting value based on possible execution paths.
Coverage Reduces the score as coverage increases. Even full coverage retains 5 % of the complexity factor.
Fan-in Increases the score with the number of dependent types.
Open findings Increase the score for problems already reported.

Example: complexity 40, coverage 50 %, fan-in 10 and two open findings produce 40 × 0.55 × 3 × 3 = 198. Coverage enters the formula as a fraction between 0 and 1.

Coverage comes from the latest full coverage run. Unmeasured types count as 0 % for the score. They remain marked with a dash in the table. A coverage measurement replaces this assumption with measured values.

One type in detail

A type name in findings, hubs or tables opens its detail page. It names the workspace, project and branch. Types with the same name in several projects require a project selection first.

Type and project pages use stored results from the most recently analysed branch. Links from older runs or findings also open this state. Graph tabs query the currently loaded analysis; their structure can therefore differ in age from stored metrics and coverage.

Metric Meaning
Cyclomatic, Cognitive and Maintainability Stored type metrics for the displayed branch. The Metrics — Show in screenshot tab adds complexity over time.
Fan-in / fan-out Incoming and outgoing dependencies, with instability.
Coverage Measured line coverage with the number of covered lines.
Lines Code size of the type.
Agent graph queries Approximate number of graph queries targeting this type; opens the corresponding runs in the explorer.

A dash means not measured — Show in screenshot. It does not represent a measured value of zero.

The page of one type with its neighbourhood of the types it uses and the types that use it The page of one type with its neighbourhood of the types it uses and the types that use it
Tab Purpose
Neighbourhood — Show in screenshot Shows incoming and outgoing references up to two steps away. Controls are explained below the table.
Who breaks — Show in screenshot Shows dependent types up to two steps away, sorted by coverage.
Metrics — Show in screenshot Shows measurements with their recording time and complexity over time.
Findings — Show in screenshot Shows this type's open findings, by severity and then recency. Location links open the editor; Open in explorer leads to the full set.

The two graph tabs require a loaded analysis and offer Load analysis when needed. Metrics and findings remain available from the insights store.

Metrics and history

The Metrics — Show in screenshot tab adds nesting depth and inheritance depth to the header metrics. Not every analysis measures all values:

Values Prerequisite
Cyclomatic and cognitive complexity, nesting depth, lines Recorded by every analysis.
Maintainability index, inheritance depth, fan-in and fan-out Recorded when an evaluated rule needs these metrics. Otherwise, a dash appears.

The history plots cyclomatic and cognitive complexity. With only one measurement, its date replaces the chart. If the type is absent from a later analysis, the history shows a gap; earlier values are not retained as current metrics.

Explore the neighbourhood

Neighbourhood — Show in screenshot provides these controls:

Control Effect
Colour by — Show in screenshot Colours types by namespace, open findings or coverage.
References — Show in screenshot Shows all reference kinds or limits connections to one selected kind. Types hidden as a result are counted.
Select a type Shows namespace, distance, coverage, open findings and connections in the side panel. The link to a new centre opens that type’s neighbourhood.
Risk of a change Lists dependent types with less than 75 % line coverage or no measurement.

Impact on dependent types

Who breaks — Show in screenshot helps assess possible effects of a change and additional testing needs. The table sorts measured types by ascending coverage; types without a measurement follow.

Column Meaning
Type Dependent type with a link to its detail page.
Relation Reference kind and intermediate type on the path to the type being examined.
Distance One step for a direct dependency, two for an indirect dependency.
Coverage Stored line coverage of the dependent type.
Open findings Unresolved findings for that type.

Further cards connect the type with requirements and testing needs:

Card Content and use
Anchored requirements — Show in screenshot Requirements whose anchors refer to this type; links open their verdict history.
Methods with uncovered lines Up to 25 methods with complexity, uncovered line count and line coverage. Method names and measurements help select additional tests.

One project in detail

The project page summarizes stored results for a project.

Metric Meaning
Types Number of recorded types in the project.
Open findings Number of unresolved findings in the project.
Median complexity Middle cyclomatic complexity value across the project's types.
Coverage Line coverage from the latest full coverage run.

The type table uses the type metrics: lines, cyclomatic and cognitive complexity, maintainability index (MI), fan-in, fan-out and coverage. An additional column counts open findings per type.

Type names open detail pages; more rows can be loaded. Unmeasured values appear as a dash. The view also works with an unloaded workspace.