Repository X-Ray

The Architecture Diagram maps how your repositories relate to each other. X-Ray looks inside a single repository: it reconstructs the components that make it up, how they depend on one another, how healthy each one is, and which of them a given pull request would disturb.

X-Ray reads the code Codity has already indexed for a branch. It never clones or re-downloads your repository.

Before You Start

  • The branch must be indexed. X-Ray analyzes indexed content, so index the repository from Code Navigation first. Repositories that have never been indexed do not show the X-Ray button.
  • An active subscription is required. X-Ray is gated on your organization having an active plan.
  • All four providers are supported: GitHub, GitLab, Azure DevOps, and Bitbucket.

Opening X-Ray

  1. Navigate to Code Navigation in the sidebar.
  2. Add the repository to the canvas from the repository drawer on the left.
  3. On the repository node, click the <> button ("Open X-Ray").

X-Ray analyzes the branch the node is currently set to. Switching the node's branch and reopening X-Ray gives you a separate analysis for that branch.

The first time you open a repository you'll see No analysis found for this repository. Click Trigger Analysis. Analysis usually takes a minute or two; the panel shows a placeholder while it runs and fills in on its own when it finishes. If it is still running after 90 seconds you'll see a notice. This is normal for large repositories.

The Panel

X-Ray opens full-screen with a detail column on the left and the graph on the right. Three controls sit in the panel header, next to the repository name and branch:

Control What it does
Clock, Health History Opens the trend chart for each component
Refresh, Re-analyze Re-runs the analysis on the current branch
× Closes the panel and returns to the diagram

The left column has three tabs: Graph, Health, and Issues.

Graph Tab

Overview

The Overview groups everything X-Ray found into nine categories. Each card shows the category name, how many components fall into it, and the average health of those components.

Category Contains
Frontend Frontend code
Backend Backend services and shared libraries
Database Schema, migrations, data access
Queue Message queues and workers
Infrastructure Infrastructure and configuration
CI / CD Pipelines and build/release scripts
Tests Test suites and fixtures
Docs Documentation
Observability Metrics and instrumentation

Health bars are colored green at 70% and above, amber between 40% and 69%, and red below 40%.

Click a category card to drill into the components inside it.

Components

Switch the toggle from Overview to Components to see every component individually. Components are laid out in columns by type, with connections drawn between them. Each connection carries a type:

Edge type Meaning
Imports One component imports code from another
Calls One component invokes another at runtime
Tests A test component exercises another component
Configures One component supplies configuration to another
Deploys One component deploys another
Monitors One component observes another

Component Details

Click any component or connection to open the detail drawer on the right.

Health: the four sub-scores behind the component's overall number.

Ownership: the top contributors to the files in this component, based on recent commit history for the analyzed branch. The most frequent contributor is marked Top contributor. Ownership is read live from your provider, so it reflects the current repository rather than the moment X-Ray last ran.

Predicted Issues: an AI reading of the component, listing Weaknesses it has today and Improvements worth making. Click Regenerate insights to run it again.

Evidence: why each file was attributed to this component. Every piece of evidence is tagged with how it was found: an import, a manifest entry, an AST reference, a file path, a config file, a framework convention, or a semantic match.

Overrides: corrections you can apply when X-Ray gets a component wrong:

Action Effect
Rename… Give the component a name that matches your team's vocabulary
Reclassify type Move it to the correct component type
Thumbs up, Confirm Mark the detection as correct
Thumbs down, Reject Hide the component from the graph

Health Tab

The Health tab lists every component with four indicator dots and an overall score. Expand a row to see the breakdown.

Metric What it measures
Test Coverage How much of the component is exercised by tests, from both test dependencies and the symbol names tests reference
Doc Coverage The share of the component's code that carries docstrings or equivalent documentation
Observability Whether the component reports metrics or imports an observability library
CI Coverage Whether your CI configuration actually references this component's directories

The overall score is the average of the four.

Issues Tab

X-Ray flags structural problems it can prove from the dependency graph. A clean repository shows No issues detected.

Issue Severity What it means
Cyclic dependency High Components depend on each other in a loop
God component High One component absorbs a large share of all inbound dependencies and should be split
Layer violation High A frontend component reaches a database component directly, with no API layer between them
Untested critical Medium A component that many others depend on has no test coverage
Orphan Low A component with no inbound or outbound connections
Co-change coupling Low Two components share files but declare no dependency on each other

PR Impact

X-Ray can tell you which components a pull request touches, directly and by knock-on effect, before you review it.

  1. Click Analyze PR Impact in the left column.
  2. Pick a pull request from Select an open PR… (up to five open pull requests or merge requests), or paste one into Or paste a PR link / number….
  3. Click Analyze Impact.

The picker accepts a plain number or a full URL from any supported provider. GitHub pull requests, GitLab merge requests, Azure DevOps pull requests, and Bitbucket pull requests all parse.

Results appear in the left column and annotate the graph:

Result Meaning
Risk score The share of the repository's components the change lands on directly
N files changed in PR How many files X-Ray resolved from the pull request
Directly affected Components that own at least one changed file
Transitively affected Components reachable from a directly affected one, up to three dependency hops away
No test coverage Transitively affected components that no test component covers. The change reaches them and nothing guards them

Nodes on the graph pick up an AFFECTED badge so you can see the spread at a glance.

Health History

Click the clock icon in the panel header to open Health History.

Pick a component from the chips at the top, then toggle which series to plot: Overall, Tests, Docs, Observability, and CI. The footer tells you how many points the chart holds. Each point is one re-analysis of that branch.

A component keeps its history across re-analyses because X-Ray anchors a component's identity to the files it covers rather than to its name. Renaming or re-detecting a component does not restart its trend.

Repositories analyzed only once show a single point and a note explaining that trends appear after further re-analyses.

Re-analyzing

Click the refresh icon in the panel header to re-run X-Ray on the current branch. Do this after a significant merge, or after re-indexing the repository.

Results are stored per repository and branch, so analyzing a feature branch leaves your main analysis intact.

Troubleshooting

What you see What it means
"This repository hasn't been indexed yet. Index it via Code Navigation first, then run X-Ray." The branch has no indexed content. Index it from Code Navigation, then trigger X-Ray again
"Analysis failed" with a detail line Something went wrong mid-analysis. Click Retry Analysis; the detail line describes the cause
Still generating after 90 seconds Expected on large repositories. Leave the panel open; it fills in when the run completes
No <> button on a repository node The repository is not indexed yet, or indexing is still in progress
Ownership shows no contributors Codity could not reach your provider for commit history. Reconnect the provider from Settings
A component you expect is missing It may have been rejected via an override, or it covers no files on this branch