If you’ve been using coding agents in your daily routine, you’ve probably spent a lot of time getting them to “do things the right way”. For example, it might decide to take shortcuts and violate the architecture of your project, accessing layers it should not. Or it will make rookie mistakes that Sonar invariably catches on PR analysis. Repeatedly.
If you are lucky (if you can call it that), this will come to you as you review your agent’s output. If you are not, it will be caught much later in the PR. In both cases you waste time and tokens as you try to get your agent to “do the right thing”. Over and over again.
To help make the best use of agents, we’ve been working on a framework we call the Agent-Centric Development Cycle (AC/DC) built around three things: Guide, Verify, Solve. To get consistent results from an agent, you need a harness that enforces this.
Today we are very excited to announce we are releasing two features that support you in using agents efficiently under that framework.
Sonar Context Augmentation handles the Guide side.
Sonar Context Augmentation brings the wealth of knowledge Sonar builds during the analysis to your agent.
This comes a set of tools available through the SonarQube MCP server, that will
- Deliver guidelines with the rules relevant to the task at hand, based on the prompt and on the files being modified.
- Allow your agent to pull the intended architecture of your project. No more layer violations due to your agent making the wrong decision.
- Equip your agent with efficient ways to navigate your codebase: no more blind searches throughout directories to find the one method it needs.
No need to maintain this information in MD files. You can use the Architecture feature of SonarQube Cloud to manage your intended architecture, and this will automatically flow down to your agent.
Here’s a step-by-step on how to start using Context Augmentation with Claude Code.
SonarQube Agentic Analysis handles the Verify side.
Agentic Analysis brings the power of Sonar analysis straight to your agent, so that it can verify its code as it generates it and correct any mistakes it makes.
Concretely, your agent will be able to ask for a fast and accurate analysis of any file it touches to get a list of issues we find and correct them. The result: those mistakes never even make it to you or your PR. This will save you from having to point out the obvious issues to your agent, and will let you concentrate on what is important: making sure the agent achieved the task correctly.
Here’s a step-by-step on how to start using SonarQube Agentic Analysis with Claude Code.
To get started, head to your organization administration page on SonarQube Cloud to enable either of those features under “Agent-Centric Development”.
Once this is done, install the MCP server in your project directory, add a short set of guidelines to your agent file, and you can start using it right away. The documentation pages linked above will give you all the information you need.
Both of these features are available in Beta for our customers on a Team or Enterprise plan on SonarQube Cloud.
Context Augmentation supports all languages available on SonarQube Cloud (architectural awareness is fully supported for Java, with partial support for C#, Python, JavaScript, and TypeScript). Agentic Analysis currently supports Java, JavaScript, TypeScript, C#, Python, C++, CSS, HTML, XML, Docker, Terraform, and Kubernetes — with more languages on the way.
Go try it out, and let us know what you think, we eagerly await your feedback!