> For the complete documentation index, see [llms.txt](https://docs.spicychat.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.spicychat.ai/product-guides/rulebooks.md).

# Rulebooks

A Rulebook turns a chat into a small game. It keeps score of things that matter in the story, like how much a character trusts you, how much gold you have or how many HP you have left. The score changes based on how you interact with the character.

## An example

You chat with a shy barista who uses the Rulebook "Slow burn". It has one meter, **Trust**, which starts low.

* You're kind to her, so Trust goes up. You lie to her, so Trust goes down.
* While Trust is low, she gives short answers and keeps her distance. When Trust is high, she opens up and talks about her past.
* The meter at the top of the chat shows Trust, and a short line under it, such as *"Walls up"*, tells you how things are going.

You don't type any commands. The Rulebook reads the chat and moves the meters for you.

<figure><img src="https://3060264960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZHNBN3T5KDxoXWSU7L3d%2Fuploads%2FZCa4GmF1ARW18I9hBajY%2Frulebooks-hud-change-v470.webp?alt=media" alt="A reply arrives: Affection and Trust go up, and the status line changes." width="390"><figcaption><p>A reply arrives: Affection and Trust go up, and the status line changes.</p></figcaption></figure>

## What you can build with it

* A relationship that warms up or cools down.
* A story clock with a date and time that move forward, so a shop can be closed at night or rent is due every Monday.
* A small economy: coins you earn and spend, or items you collect.
* Risk: HP, lives, or a dice roll when something happens.
* A place or phase that changes, like the room you're in or a chapter of the story.

## How to start

**To play with a Rulebook:** open **Rulebooks** in the main menu, pick one, and attach it to a character, a persona or one chat. See [Using a Rulebook in chat](/product-guides/rulebooks/using-a-rulebook-in-chat.md).

**To make your own:** open **Rulebooks** in the main menu and tap **Create Rulebook**. You get four ways to begin:

* **Start from a template.** Pick one of the [Starters](/product-guides/rulebooks/examples-to-clone.md), a small Rulebook that already works, and change it. The easiest way to begin.
* **Start from scratch.** A blank Rulebook that you build in the Editor.
* **Create with AI.** Let ChatGPT, Claude or Gemini write the Rulebook for you, then import it. See [Create a Rulebook with AI](/product-guides/rulebooks/import-export-and-ai.md#create-a-rulebook-with-ai).
* **Import.** Bring a .json file you exported before or got from another creator.

You can also clone any Public Rulebook from **Rulebooks** that shows **Rules visible**.

<figure><img src="https://3060264960-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZHNBN3T5KDxoXWSU7L3d%2Fuploads%2F5n8IXRNSZO2ufR7NwUWB%2Frulebooks-create-choices-v470.png?alt=media" alt="The Create Rulebook screen" width="390"><figcaption><p>The Create Rulebook screen</p></figcaption></figure>

### Pick your path

| You want to                     | Go to                                                                                                                 |
| ------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| Just play with one              | [Using a Rulebook in chat](/product-guides/rulebooks/using-a-rulebook-in-chat.md)                                     |
| A working Rulebook in 2 minutes | **Create Rulebook > Start from a template**, then [Examples to clone](/product-guides/rulebooks/examples-to-clone.md) |
| Build your own, step by step    | [Your first Rulebook in 10 minutes](/product-guides/rulebooks/your-first-rulebook-in-10-minutes.md)                   |
| Let an AI write it              | [Create a Rulebook with AI](/product-guides/rulebooks/import-export-and-ai.md#create-a-rulebook-with-ai)              |

### Common first Rulebooks

| Your idea                                            | Starter to begin with |
| ---------------------------------------------------- | --------------------- |
| The character warms up to you                        | Affection             |
| The character's mood changes with how you treat them | Mood                  |
| Day and night in the story                           | Day and night         |
| Money that comes and goes                            | Wallet                |
| A secret the character keeps until they trust you    | Trust and secrets     |
| Dice and hit points                                  | Game: Health and dice |

## How a Rulebook works

A Rulebook has three parts:

| Part                | What it does                                       | Example                                                                            |
| ------------------- | -------------------------------------------------- | ---------------------------------------------------------------------------------- |
| **Meters**          | Keep score of something in the story               | Trust, from 0 to 100, starts at 20                                                 |
| **What moves them** | Changes a meter when something happens in the chat | +5 Trust when you keep a promise, or -1 Trust after a few quiet messages           |
| **Influence rules** | Tell the character how to act at each score        | Trust below 30: "Keep your answers short and guarded." The status line says "Wary" |

## Pages in this guide

* [Your first Rulebook in 10 minutes](/product-guides/rulebooks/your-first-rulebook-in-10-minutes.md): start from a Starter, test it and attach it.
* [Using a Rulebook in chat](/product-guides/rulebooks/using-a-rulebook-in-chat.md): attach, remove, and what players see.
* [Meters](/product-guides/rulebooks/meters.md): the meter types and their settings.
* [Making meters move](/product-guides/rulebooks/making-meters-move.md): AI rules, keywords, decay, triggers and dice.
* [Influence rules](/product-guides/rulebooks/influence-rules.md): levels, status lines and combined rules.
* [Playtest and checks](/product-guides/rulebooks/playtest-and-checks.md): try your Rulebook before you use it.
* [Visibility, review and versions](/product-guides/rulebooks/visibility-review-and-versions.md): Private, Unlisted and Public, tags, statuses and versions.
* [Import, export and AI](/product-guides/rulebooks/import-export-and-ai.md): move a Rulebook as a file, or let an AI write it.
* [Examples to clone](/product-guides/rulebooks/examples-to-clone.md): the 7 Starters, what each one teaches, and what to change first.
* [Common recipes](/product-guides/rulebooks/common-recipes.md): six small patterns that come up in most Rulebooks.
* [Troubleshooting, FAQ and limits](/product-guides/rulebooks/troubleshooting-faq-and-limits.md): common problems, words used in this guide, and limits.

**Up next:** Build a working Rulebook in 10 minutes, step by step.

{% content-ref url="/pages/gTdK7JR3u8OWohpVd4Nb" %}
[Your first Rulebook in 10 minutes](/product-guides/rulebooks/your-first-rulebook-in-10-minutes.md)
{% endcontent-ref %}


---

# 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.spicychat.ai/product-guides/rulebooks.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.
