> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-cloud/standards/managing-quality-gates/introduction.md).

# Introduction

Your introduction to understanding how to use quality gates in SonarQube Cloud.

A quality gate consists of a set of conditions against which the code is measured during analysis. A condition is defined on either new code or overall code. Depending on the result, the code will pass or fail the quality gate, giving developers indications on whether to fix issues or merge the code.

Each project has a single quality gate definition activated at any given time. This definition is used for all the quality gates that appear in the project, whether on the main branch, other branches, or pull requests.

Two built-in quality gates are provided: The *Sonar way* quality gate is initially set as your default quality gate, and the *Sonar way for agentic AI* quality gate is recommended for agent centric development.

With the Administer Quality Gates permission in your organization, you can create your own quality gates, called custom quality gates.

When first imported, a project is assigned the default quality gate definition set for its organization. However, a different one can be chosen by a project administrator from among those available within the organization. The quality gate definitions available in your organization are defined and managed at the organization level by an organization administrator.

**In this section:**

* [Understanding quality gates](/sonarqube-cloud/standards/managing-quality-gates/introduction-to-quality-gates.md)
* [Viewing a quality gate](/sonarqube-cloud/standards/managing-quality-gates/viewing-quality-gate.md)
* [Managing custom quality gates](/sonarqube-cloud/standards/managing-quality-gates/managing-custom-quality-gates.md)
* [Changing default quality gate](/sonarqube-cloud/standards/managing-quality-gates/changing-default-quality-gate.md)
* [Associating a quality gate with projects](/sonarqube-cloud/standards/managing-quality-gates/associating-projects-with-quality-gate.md)
* [Quality gate for agentic AI](/sonarqube-cloud/standards/ai-code-assurance/quality-gate-for-agentic-ai.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sonarsource.com/sonarqube-cloud/standards/managing-quality-gates/introduction.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
