> For the complete documentation index, see [llms.txt](https://help.sleuth.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sleuth.io/sleuth-dora/modeling-your-deployments/code-deployments.md).

# Code deployments

Sleuth uses your code repositories as its main sources of change. Setting up a code deployment in Sleuth allows us to track and alert on what goes into every code deploy. A code deploy surfaces all the **pull requests, linked issues, commits and authors** included in every deploy. This information allows Sleuth to:

* Track your deployment's Accelerate DevOps metrics
  * Deploy frequency, change lead time, change failure rate, MTTR and deploy size
* [Lock deployments](https://help.sleuth.io/sleuth-dora/modeling-your-deployments/code-deployments/deployment-locking.md) so you can pump the brakes on deploying when needed
* Slice and dice past deploys with [powerful search](https://help.sleuth.io/sleuth-dora/modeling-your-deployments/code-deployments/search.md)
* Highlight [drift between your different deployment environments](https://help.sleuth.io/sleuth-dora/modeling-your-deployments/code-deployments/environment-drift.md)
* Sleuth [automatically tag deploys](https://help.sleuth.io/sleuth-dora/modeling-your-deployments/code-deployments/tags.md) based on the code that's changed
* and much more...

<figure><img src="https://2832637360-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1bR_-Od0islbiOl4G0%2Fuploads%2FmilzX6kkXxLr1hfaXiP2%2Fimage.png?alt=media&amp;token=543bce73-441e-4d39-90b7-5148d3251cd3" alt=""><figcaption></figcaption></figure>


---

# 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://help.sleuth.io/sleuth-dora/modeling-your-deployments/code-deployments.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.
