Dev48
Language
  • About
  • Services
  • Industries
  • Technologies
  • Articles
  • Contacts
Book a call
    Home/Articles/Sonarqube architecture management reviewable traceable and version controlled
Dev48
info@dev48.org+375 29 320-40-96WhatsApp@isky_by

© 2026 · All rights reserved.

SonarQube architecture management: Reviewable, traceable, and version-controlled

Source: SonarSource•December 1, 2026 at 06:29 PM

SonarQube architecture management: Reviewable, traceable, and version-controlled

Prevent architectural drift with SonarQube architecture management. Define intended architecture as JSON in the repo. Architecture definitions live alongside the branch and PRs they govern.

Architecture decisions shape every system in software development. When those decisions live outside your repository, they become invisible to the workflow that governs everything else: no review, no history, no rollback. Drift accumulates not because teams stop caring about architecture, but because architectural intent has no place in the process where code actually changes.

Intended architecture is the high-level blueprint of your project's structure. SonarQube checks your code against it and reports deviations. SonarQube now lets you define a project's intended architecture in sonar-architecture.json, a file that lives in your repository, travels through your pull requests, and follows the same version control discipline as your code. Available now in SonarQube Cloud.

How do architecture decisions become reviewable?

When architecture lives in a file, every change to it goes through a pull request on platforms like GitHub

. Your team reviews structural decisions the same way they review code: with context, with discussion, and with a clear record of who changed what and why. Nothing lands silently.

Add sonar-architecture.json to the base directory of your project. It uses the same intended architecture definition as the public web API, the SonarQube CLI, and the SonarQube MCP Server, so developers, tech leads, and coding agents all work from one consistent format. No translation between tools. No separate definition to keep in sync.

How do you assess the impact of an architecture change before you merge it?

Committing an architectural change without knowing what it breaks is a blind spot most teams only discover in production. SonarQube closes it.

Change the architecture file in the same pull request as the code it describes. Pull request analysis checks that code against the updated file in the branch, surfacing every deviation the new architecture would introduce before you merge. Plus, the architectural change follows the branch that necessitated the change. Your main branch keeps its existing model until the pull request is approved and merged, so reviewers see the full structural impact of a change while there is still time to act on it.

How do you roll back an architecture change?

Architectural decisions that turn out to be wrong should be as easy to undo as a bad commit. With architecture managed in version control, they are. Reverting the commit that changed sonar-architecture.json restores the previous intended architecture immediately. No manual reconfiguration. No reaching into a separate UI to undo a decision made weeks ago. The history is in the repository. The rollback is a standard Git operation.

How do you manage architecture in the workflow your team already uses?

The gap between architectural intent and code reality widens when architecture is managed in a separate system with a separate process. SonarQube eliminates that gap.

Architecture changes are committed alongside the code they govern in your version control systems. They go through the same pull request review. They appear in the same diff, with the same approvers, under the same branching strategy your team already enforces. Coding agents can write and update the file directly, so agent-generated structural decisions are version-controlled and reviewable alongside the code the agent produces.

Architecture is part of the Guide pillar in Sonar's Agent Centric Development Cycle(AC/DC) framework: agents receive architecture constraints as they write code. A reviewed file in the repository gives coding agents and reviewers the same intended architecture.

Each project maintains one source of truth. By default, SonarQube uses the file when it exists and the model saved in SonarQube when it does not. If your team prefers the web interface, a project setting lets you disable file-based management entirely.

Permissions that fit your team

Users and groups with the Administer Issues permission can create, edit, and delete a project's intended architecture. Developers and tech leads typically already hold this permission, so most teams can start immediately. Organizations that need stricter separation of duties can require the dedicated Administer Architecture permission through the organization settings.

Get started

  • Export your current intended architecture with Sonar architecture in the SonarQube CLI, or ask your coding agent to write the file from your existing structure.
  • Commit sonar-architecture.json to the base directory of your project and open a pull request.
  • Review the deviations SonarQube surfaces on the pull request, then merge.

Availability

Available now in SonarQube Cloud. SonarQube Server support arrives in the next version. Supported languages: Java, C#, JavaScript, TypeScript, and Python.

To learn more, see thedocumentation and thearchitecture resource center. For CLI setup, see theSonarQube CLI quickstart guide.

← All articles

What this article says

More in Software Development

All →
How to implement hierarchical memory for AI agents
Redis

How to implement hierarchical memory for AI agents

Social mentions in 2027: How to track and respond
Hootsuite

Social mentions in 2027: How to track and respond

Newsletter Nov'26
Medusajs

Newsletter Nov'26

International Import Shipping: 2026 Tariff Guide
Shopify

International Import Shipping: 2026 Tariff Guide

The little things that shipped in November
Comfy Org

The little things that shipped in November

JetBrains at 26: Our Priorities
JetBrains

JetBrains at 26: Our Priorities

More from SonarSource

Introducing Remediation campaigns: Work through your backlog and review the fixes in one pull request
SonarSource

Introducing Remediation campaigns: Work through your backlog and review the fixes in one pull request

How we cleared our backlog with SonarQube Remediation Agent
SonarSource

How we cleared our backlog with SonarQube Remediation Agent

OAuth comes to the SonarQube Cloud-hosted MCP server
SonarSource

OAuth comes to the SonarQube Cloud-hosted MCP server

Automatic analysis for Bitbucket Cloud is now available
SonarSource

Automatic analysis for Bitbucket Cloud is now available

Delphi language support is now built into SonarQube
SonarSource

Delphi language support is now built into SonarQube

Inside Secretless Analysis: from CI identity to project-scoped access
SonarSource

Inside Secretless Analysis: from CI identity to project-scoped access