Agent Centric Development Cycle AC/DC
AC/DC runs across three loops. The Agentic Loop sits inside each agentic reasoning step, the CI Verification Loop runs at sandbox exit, and the Code Maintenance Loop remediates tech debt in the background.
A cycle built for how agents actually work
AC/DC runs at two levels. An inner loop sits inside each agentic reasoning step, and an outer loop at sandbox exit. Sonar covers all three stages, for every AI coding tool.
Inner loop
Per reasoning step · agent sandboxOuter loop
At sandbox exit · CI pipelineGuide. Verify. Solve.
Guide your agents with your standards and architecture context
Agents need the right and relevant context. Not too much, not too little. The Guide stage provides agents with guardrails and the most relevant context, standards, and architectural constraints so their output fits your organization's requirements.
Without the right context, agents produce code that is functionally correct but contextually wrong, violating your coding standards, style, or security posture. Sonar Vortex provides dynamic, task-relevant context at the start of every agentic session. Too little context means code that ignores your standards. Too much degrades model performance. The right context, dynamically selected, is the key.
Zero-trust, multi-layered verification.
Agents generate thousands of lines before stopping. At every checkpoint, inside the agent's inner loop and at sandbox exit, two complementary layers run together: SonarQube's deterministic mathematical analysis and Gitar's AI-native code review. Neither alone is sufficient. Together they cover the full surface.
Separate, deterministic, and fully auditable — every finding explained with its exact rule, location, and data flow.
SonarQube reasons across syntax, control and data flow, taint analysis, SCA, and architecture; Gitar adds AI-native review for the logic and behavioral bugs static analysis can't reach.
Industry leading false positive rate: 3.2%. Teams verify real issues, not noise.
Close the loop with automated remediation.
When verification fails, Sonar doesn't just report issues. It resolves them. The SonarQube Remediation Agent generates verified fixes, validates them against the same quality gate that failed, and opens a ready-to-merge pull request. No manual review cycle required.
The same workflow applies to existing backlogs. Teams with hundreds of accumulated security and quality findings can deploy the Remediation Agent to clear them systematically, turning a growing backlog into a continuously improving posture.
Get AC/DC running with your agents
Step-by-step guides for wiring AC/DC into your actual agent setup, organized by what you’re trying to accomplish, not by product.
Inject architecture context into Claude Code
Wire Sonar's context injection into Claude Code sessions. Your architecture, coding standards, and quality rules - available as MCP tool calls before the agent writes anything.
Inject architecture context into Codex CLI
Inject architecture, coding standards, and quality rules into Codex CLI before it generates a line of code — via MCP context injection.
Inject architecture context into GitHub Copilot
Wire Sonar’s context injection into GitHub Copilot sessions in VS Code. Your architecture, coding standards, and quality rules available before Copilot generates a line.
Verify code quality in your Claude Code agent loop
Put inner-loop verification to work. Run Sonar's analysis engine inside the agent’s reasoning cycle - every file, every step - not just at PR time.
Verify code quality in your Codex CLI agent loop
Run inner-loop verification in your Codex CLI workflow. Catching issues at the point of generation - not after the PR lands.
Verify code quality in your GitHub Copilot agent loop
Run inner-loop verification in GitHub Copilot in VS Code. Sonar’s analysis engine catches issues at the point of generation, before they compound.
Auto-fix PR issues when the quality gate fails
Wire automated remediation into your PR workflow. When the quality gate fails, verified fixes are generated, validated, and opened as a ready-to-merge PR - automatically.
Clear your security and quality backlog automatically
Put your existing issue backlog to work. Target accumulated findings - generating verified fixes and opening ready-to-merge PRs without manual review cycles.
Run the full AC/DC loop in the terminal
The complete Guide → Verify → Solve cycle without leaving the terminal. Agent generates; Sonar verifies; the loop repeats until the quality gate passes.
Connect Sonar to Claude Code via MCP
Make every Sonar capability available inside Claude Code as a native tool — architecture queries, quality gate checks, findings lookup, and more.
Install Sonar in Claude Code
Connect SonarQube to Claude Code so Sonar findings, quality gate status, and architecture context are available as native tools in every agent session.
Connect Sonar to Gemini Code Assist via MCP
Make every Sonar capability available inside Gemini Code Assist Agent Mode as native MCP tool calls. Architecture queries, quality gate checks, and findings lookups.
AC/DC for your agent, right now
Seamlessly integrate SonarQube with your preferred agent via dedicated SonarQube plugins. Guide your agents and Verify their output with Sonar Vortex in the agentic loop.
Open a Claude Code session
Install the SonarQube plugin from Anthropic's marketplace
/plugin install sonarqube@claude-plugins-officialIntegrate SonarQube with Claude Code with the plugin's integrate skill
/sonarqube:sonar-integrateThe integrate command installs or updates the SonarQube CLI, prompts for authentication to SonarQube, starts the SonarQube MCP Server, and configures Vortex when available (and secrets detection too).
Guide your agent and Verify its output
Start a fresh Claude Code session to unlock Vortex.
Open a Codex CLI session
Add SonarSource/sonarqube-agent-plugins as a plugin marketplace
codex plugin marketplace add SonarSource/sonarqube-agent-pluginsInstall the SonarQube plugin from that catalog
codex plugin add sonarqube@sonarIntegrate SonarQube with Codex CLI with the plugin's integrate skill
sonar integrate codexThe integrate command installs or updates the SonarQube CLI, prompts for authentication to SonarQube, starts the SonarQube MCP Server, and configures Vortex when available (and secrets detection too).
Guide your agent and Verify its output
Start a fresh Codex CLI session to unlock Vortex.
Open a GitHub Copilot CLI session
Install the SonarQube plugin from the pre-packaged awesome-copilot catalog
/plugin install sonarqube@awesome-copilotIntegrate SonarQube with GitHub Copilot CLI with the plugin's integrate skill
/sonarqube:sonar-integrateThe integrate command installs or updates the SonarQube CLI, prompts for authentication to SonarQube, starts the SonarQube MCP Server, and configures Vortex when available (and secrets detection too).
Guide your agent and Verify its output
Start a fresh GitHub Copilot CLI session to unlock Vortex.
Open an Antigravity session
Install the SonarQube plugin bundle
agy plugin install https://github.com/SonarSource/sonarqube-agent-pluginsIntegrate SonarQube with Antigravity with the plugin's integrate skill
/sonarqube:sonar-integrateThe integrate command installs or updates the SonarQube CLI, prompts for authentication to SonarQube, starts the SonarQube MCP Server, and configures Vortex when available (and secrets detection too).
Guide your agent and Verify its output
Start a fresh Antigravity session to unlock Vortex.
Open a Cursor session
Install the SonarQube plugin through Cursor's marketplace
/add-plugin sonarqubeIntegrate SonarQube with Cursor with the plugin's integrate skill
/sonarqube:sonar-integrateThe integrate command installs or updates the SonarQube CLI, prompts for authentication to SonarQube, starts the SonarQube MCP Server, and configures Vortex when available (and secrets detection too).
Guide your agent and Verify its output
Start a fresh Cursor session to unlock Vortex.
No plugin for your agent?
Use this when your agent has no dedicated SonarQube plugin and reaches SonarQube through the SonarQube MCP Server. If a plugin exists for your agent, install that instead — it wires the same capabilities through the SonarQube CLI and needs no directive file.
Set this up before the directives file does anything:
- The local (stdio) MCP server, not the SonarQube-hosted one. Vortex analyzes files on disk, and the hosted server has no filesystem access.
- Your workspace mounted into the container at
/app/mcp-workspace. SONARQUBE_TOOLSETSincludingvortex, the unified toolset covering both Vortex context and Vortex analysis tools. Addissues,quality-gates,rulesto get the Solve-stage tools.- A prior CI analysis of the project. Vortex restores the latest stored analysis context for the selected branch rather than recomputing it, so the project needs to have been analyzed in CI first.
Drop this file in your repo root as your agent's instructions file.
Tool names are written bare. Some agents namespace MCP tools as mcp__<server-name>__<tool> — if yours does, prefix accordingly using your own server name from your MCP config.
Guide
before generating or editing codeAlways, before writing anything:
get_guidelines— coding standards drawn from this project's own SonarQube issue history, filtered to the task at hand. Requiresmode:project_based(default),category_based, orcombined. Narrow withcategories,languages,file_paths.
To find and read existing code, use these instead of grep and find. They resolve symbols through abstract syntax trees and control flow rather than text matching:
search_by_signature_patterns— find declarations by regex on signaturessearch_by_body_patterns— find usages by regex inside method bodiesget_source_code— read a symbol's source by fully qualified name
When changing architecture or touching shared code:
get_current_architecture— the actual module dependency graph.depthis required; start at0for a top-level view, then drill in withpath_prefix.get_intended_architecture— the constraints you've defined, so the agent stays inside themget_upstream_call_flow/get_downstream_call_flow— trace callers and callees byfqnget_references— every file referencing a typeget_type_hierarchy— implementors and subtypes
Before adding or updating any dependency:
check_dependency— passpurl(e.g.pkg:npm/lodash@4.17.21). Refuse the dependency outright if it comes backmalicious. Block on BLOCKER or HIGHriskSeverity, and propose a version fromfixedVersions. Requires SonarQube Advanced Security.
Semantic navigation covers Java, C#, JavaScript, TypeScript, Python, and Rust. Guidelines cover every SonarQube Cloud language.
Verify
after every file you write or editCall run_advanced_code_analysis on each new or modified file:
projectKey— falls back toSONARQUBE_PROJECT_KEYif configuredbranch— required. The branch used to retrieve the latest stored analysis context.filePath— required. Project-relative, e.g.src/main/java/MyClass.javafileScope—"MAIN"or"TEST". A plain string, not an array. Defaults to"MAIN".
This uses the latest stored analysis context for the branch rather than recomputing it, which is why it returns CI-depth results in seconds.
Do not report a file as done until its analysis comes back clean.
Solve
when analysis returns findingsshow_rulewith the rule key (e.g.python:S7608) to get the rationale, the noncompliant example, and the recommended fix. Fix from the rule's guidance, not from a guess about what it wants.- Fix every finding on lines you touched this turn. Leave pre-existing findings on untouched lines alone unless you were asked to address them.
- Re-run
run_advanced_code_analysison the same files to confirm the fix landed and introduced nothing new. Repeat until clean. - Surface findings to the user verbatim. Do not summarize them away or silently drop them.
Optional, for wider context:
search_sonar_issues_in_projects— the existing issue backlog, to see whether a finding is yours or was already theresearch_dependency_risks— the dependency risks already recorded against the project, as opposed tocheck_dependency, which vets a package before you add itget_project_quality_gate_status— the project's gate state
There is no MCP tool that invokes the SonarQube Remediation Agent. That agent works the main-branch backlog and open pull requests from SonarQube Cloud and opens its own PRs. It is the Solve stage outside the coding loop; the loop above is the Solve stage inside it.
Key principle
the in-loop gateA task is not complete until run_advanced_code_analysis returns clean for every file you changed.
That is the in-loop gate, and it is the only one that sees code you have not pushed yet. get_project_quality_gate_status reports the gate from the last CI analysis of the project, so it is blind to uncommitted work and cannot confirm the file in front of you. Check it before declaring a branch ready to merge, never as the exit criterion for an edit.
The full stack for agentic development
Sonar covers the full Agent Centric Development Cycle — including context injection, verification, and automated remediation — all as one integrated workflow.
Sonar Vortex
GADelivers project-specific context and constraints before the agent writes. Architecture, coding standards, and quality rules retrieved via semantic navigation and injected through SonarQube CLI or MCP Server.
Product pageSonarSweep
Private betaContext files embedded in the repo that travel with the codebase. Every agent picks them up automatically.
Product pageSonarQube
GADeterministic-first analysis across 40+ languages. The quality gate for all code, human- or agent-written.
SonarQube Advanced Security
GADeep security analysis with taint tracking, secrets detection, SCA, and IaC scanning.
Sonar Vortex
GARuns Sonar’s full analysis engine inside the agent’s inner loop. Every output verified before a PR exists — same depth as a full CI scan, in seconds.
SonarQube Architecture
GAVisualize and manage architecture. Tracks current vs intended structure, exposed to agents via MCP.
Gitar
NewAI code review that lives in your pull requests. Reviews code, diagnoses CI failures, generates fixes, and commits only when the build passes.
SonarQube MCP Server
GAExposes SonarQube as native MCP tools for Claude Code, Cursor, and any MCP-compatible agent.
SonarQube for IDE
formerly SonarLintGAReal-time Sonar analysis in VS Code, IntelliJ, and other IDEs as the agent writes code.
SonarQube CLI
GAUnified CLI for SonarQube capabilities, designed for agentic and CI/CD workflows.
SonarQube Remediation Agent
BetaGenerates verified fix PRs automatically when the quality gate fails.
Product pageAI CodeFix
GAOne-click fix suggestions in the IDE and PR. Fully on-premises in SonarQube Server 2026.2.
Product pageAC/DC in depth
Technical posts on building the Agent Centric Development Cycle into your workflow.
Introducing the Agent Centric Development Cycle (AC/DC)
The framework behind how Sonar thinks about agentic development: Guide, Verify, Solve. Why the inner loop and outer loop need different approaches, and why deterministic analysis remains the non-negotiable foundation.
Read articleSonarQube CLI: built for agentic workflows
The unified CLI for the full AC/DC loop. One tool for analysis, status checks, and issue queries — designed to live inside agentic pipelines, not just CI scripts.
Read post MCP ServerSonarQube MCP Server: Sonar as a native agent tool
How the SonarQube MCP Server exposes architecture queries, quality gate checks, and issue lookups as native tool calls — inside Claude Code, Cursor, and any MCP-compatible agent.
Read post Sonar VortexIntroducing Sonar Vortex
Context Augmentation and Agentic Analysis unified into a single GA product. Sonar Vortex operates inside the agent’s coding loop — delivering project-specific context before code is written and verifying every output in real time.
Read postThe Agent Centric Development Cycle
This ebook introduces the Agent Centric Development Cycle (AC/DC), a framework designed to help engineering teams harness agentic AI without compromising code quality, security, or maintainability. It's backed by data from Sonar's 2026 State of Code Developer Survey and independent academic research.
Download eBook