# Rulebooks

<figure><img src="/files/CEFKxnXyPN8uNj2O8yrr" alt=""><figcaption></figcaption></figure>

Rulebooks are how you teach Stakpak to follow your way of doing things. Think of them as smart, markdown based SOPs (standard operating procedures), whether it’s how to deploy to production, upgrade infrastructure, or tag resources correctly. \
\
Stakpak uses Rule Books to make decisions that align with your team’s standards, not just generic best practices.

There are two types of rule books:

* **Official Rule Books**\
  They are created by the Stakpak team, and they cover common workflows like Dockerization, infrastructure software upgrades, and cloud deployments. They follow industry best practices and are ready to use out of the box.
  * [Dockerization](/docs/how-it-works/rulebooks/dockerization.md)
  * [Infrastructure Cost Estimation](/docs/how-it-works/rulebooks/infrastructure-cost-estimation.md)
  * [Infrastructure Software Upgrades](/docs/how-it-works/rulebooks/infrastructure-software-upgrades.md)
  * [Simple Deployment On VM](/docs/how-it-works/rulebooks/simple-deployment-on-vm.md)
  * [Migrating Bitnami to Bitnami Legacy](/docs/how-it-works/rulebooks/migrating-bitnami-to-bitnami-legacy.md)
  * [Next.js AWS Deployment Options Comparison](/docs/how-it-works/rulebooks/next.js-aws-deployment-options-comparison.md)

and more ...

* **Your Rule Books**\
  Your custom Rule Books define how *your* team works. From deployment procedures to incident response, Stakpak will follow them step-by-step, just like a teammate would
  * [How to Write a Rulebook?](/docs/how-it-works/rulebooks/how-to-write-a-rulebook.md)

{% hint style="info" %}
**Note:**

* You can view and create your rule books at [stakpak.dev](https://stakpak.dev/)
* You can disable the official rule books by opening your terminal and writing stakpak `--disable-official-rulebooks`&#x20;
  {% endhint %}

### How to Enable/Disable Rule Books?

#### Enable/Disable Rule Books for a Single Session

<figure><img src="/files/Ciki5se6w1Nw7AzmlMeW" alt=""><figcaption></figcaption></figure>

1. Open stakpak
2. Press `CTRL+K`\ <br>
3. Use the `ARROWS` to move
4. &#x20;Press `SPACE` to select/unselect rule books&#x20;
5. Press `ENTER` to confirm

#### Enabling/Disabling Rule Books Across Your Entire Account

1. Open your terminal and type `stakpak config sample`<br>
   1. [Configure Stakpak](/docs/get-started/configure-stakpak.md)
2. Here you can view everything you can edit

<figure><img src="/files/kutrOdzIXrt0LcQkOYDO" alt=""><figcaption></figcaption></figure>

3. Then use your favorite editor to edit `~/.stakpak/config.toml`
4. Then include/exclude the rule books you want


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://stakpak.gitbook.io/docs/how-it-works/rulebooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
