News

Intended Architecture Can Now Be Stored in the Repository in SonarQube Cloud

SonarQube Cloud now lets you store the intended architecture in the repository as sonar-architecture.json and review changes in a pull request.

2 min read

In SonarQube Cloud, a project’s Intended Architecture can now also be defined in a file stored in the repository. Users with the Administer Issues permission on the project can edit the definition as well, so those working closest to the code can get started without requesting separate permissions.

What has changed

  • A file in the project root: sonar-architecture.json uses the same definition as the public Web API, the SonarQube CLI and the SonarQube MCP Server, so the team and the coding agent edit a single format. The next analysis reads the file and checks the code against the architecture it describes. The SonarQube Intended Architecture page also displays the model managed through the file.
  • Review in a pull request: the architecture file can be changed together with the related code, in the same pull request. The pull request analysis measures the code against the file on that branch, so the deviations flagged by the new model are visible before the merge. The main branch keeps its own model until the merge, and reverting the commit restores the previous intended architecture.
  • A single source per project: by default, the file is authoritative if it exists; if it does not, the model saved in SonarQube is used. While the file manages the model, web editing is disabled and a message explains why. In the project settings, you can switch to using only the web interface and ignore the file.

Permissions

Users and groups with the Administer Issues permission can create, edit and delete a project’s intended architecture. Developers and tech leads typically already have this through their default groups. For stricter separation of duties, the organization administrator can turn off the “Allow issue administrators to manage project architecture” setting in the organization settings; after that, only users and groups with the separate “Administer Architecture” permission can edit it.

Availability

The feature is already available in SonarQube Cloud. SonarQube Server support arrives in the next version. Supported languages: Java, C#, JavaScript, TypeScript, Python. According to the documentation, architecture analysis is available in the Team and Enterprise plans; the documentation’s overview page does not yet cover the file-based approach.

What to do: export the current model with the SonarQube CLI sonar architecture command (or ask your coding agent to write the file from the current architecture), commit the file to the project root, open a pull request, review the deviations, then merge the branch.

Original announcement

Gabriel Vivas profile picture

Gabriel Vivas, Product Manager (Sonar)

Originally published on the Sonar Community forum on 24 November 2026: Keep your Intended Architecture in your repository

About the author

Dr. Kabai Márton Tamás

Dr. Kabai Márton Tamás, Owner and Managing Director, Szitár-Net Kft.

Source: Sonar Community

Back to all news

Written by

Dr. Márton Tamás Kabai

Managing Director, Szitár-Net Kft.

Managing Director of Szitár-Net Kft. The company has worked with automated source code analysis for more than 10 years and, as the official SonarSource partner in Hungary, helps banks, public institutions and large enterprises adopt SonarQube. His talks cover code quality, cybersecurity compliance and secure AI-assisted development.

More articles LinkedIn Work with us

More news

SonarSource Partner