> For the complete documentation index, see [llms.txt](https://cardstock-studio.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cardstock-studio.gitbook.io/docs/test/define-rules.md).

# Define Rules

In this section, you'll set up rules and a game brief that will be used in the next steps, and can also be used in the [Unity](/docs/ship/unity.md) export. This flow can also help discover missing information or confusion portions of your rules, which may improve the human playtesting flow in the future.

## Rules

You will need to either paste in or upload plain text containing your game rules, or link rules from the [Books](/docs/design/books.md) you have created.

<figure><picture><source srcset="/files/lk1cI7Vicu0PWk5nlDkT" media="(prefers-color-scheme: dark)"><img src="https://2449056524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK6BdQXak9wiY4BdSf9Rq%2Fuploads%2FiLP0DgL34ojkYVt48Ouz%2FScreenshot%202026-07-19%20at%202.20.25%E2%80%AFPM.png?alt=media&amp;token=d3d17970-934e-477a-b8b1-2300dee0af70" alt="" width="563"></picture><figcaption></figcaption></figure>

Once this is set, the next section becomes available.

## Components

This is where you list out the various components in the game, including components that are not represented in **Cardstock Studio**, such as dice, or resource cubes, etc.

<figure><picture><source srcset="/files/8TFau7wVezQaup7tbJpd" media="(prefers-color-scheme: dark)"><img src="https://2449056524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK6BdQXak9wiY4BdSf9Rq%2Fuploads%2F3kLqG2BnPMiOJxTS1myJ%2FScreenshot%202026-07-19%20at%202.30.56%E2%80%AFPM.png?alt=media&amp;token=63d2b6c6-6dd1-48d8-baad-7b8b31cac974" alt="" width="563"></picture><figcaption></figcaption></figure>

Your [Decks](/docs/design/decks.md) will be listed — include them by clicking the "Add as Component" button for each.

Click <picture><source srcset="/files/FVahpK0KRZRBIjpuYIk5" media="(prefers-color-scheme: dark)"><img src="https://2449056524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK6BdQXak9wiY4BdSf9Rq%2Fuploads%2FR86NDr9pbYQ72nNKBnXm%2FScreenshot%202026-07-19%20at%202.33.02%E2%80%AFPM.png?alt=media&amp;token=1718eb8f-fdc5-4618-bf68-e775346e4ef9" alt="" data-size="line"></picture> to define additional components that aren't represented by decks, such as dice or resource cubes.&#x20;

<figure><picture><source srcset="/files/vW8D97ycqVDtrvoSN8cg" media="(prefers-color-scheme: dark)"><img src="https://2449056524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK6BdQXak9wiY4BdSf9Rq%2Fuploads%2FoowxBvIMWxh1E2c4KApf%2FScreenshot%202026-07-19%20at%202.32.39%E2%80%AFPM.png?alt=media&amp;token=71947c25-b9b8-4f76-8962-da3b58f8cf77" alt="" width="563"></picture><figcaption></figcaption></figure>

## Card Data

The [Decks](/docs/design/decks.md) you added will be listed here, along with the *Description* values you set for each *Card*.

You can update these values here, if you'd like, but we suggest you use the *Deck* view to handle the Description values, and simply confirm that they are correct on this page.

### Text Style Preset & Global Value Descriptions

The [Text Style Presets](/docs/design/text-style-presets.md) and [Global Values](/docs/design/global-values.md) both contain similar description fields, which is used in the same way the card *Description* is.

{% hint style="info" %}
The *Description* for each card, *Text Style Preset* and *Global Variable* are used to help ensure an accurate game defintion and simulation.&#x20;

Using clear, specific language is very useful, as **AIs are not humans**. For example, if your card has icons which indicate it can be used on a players turn to gain two gold, it may simply say "+2 \[goldIcon]".&#x20;

A description may make this clear: "A player may play this card from their hand on their turn to gain 2 gold from the bank, into their supply."

Simiarly, a Global Value which you've called "Any Gem", you can clarify: "Means any color gem (not wild)." to ensure the AI doesn't assume the phrase "Any" includes Wild.
{% endhint %}

## Refinement

This is the first step where you will need to utilize an AI system, such as Claude or ChatGPT.

Start by clicking the "*Export AI Instructions*" button. This will export a file which you can upload directly to your AI chat.

{% hint style="info" %}
Which AI model you use is up to you. We strongly suggest that you use the most proficient flagship model for the "Brief" stage, and lesser models for less technical requests. However, we have found the the most proficient models are generally better at all stages, if you are able to utilize them.
{% endhint %}

The file includes all content the AI will need to provide you with a solid response. At this stage, the AI may ask you questions about your rules before providing a final output. While some of these questions may seem silly, the AI is not a human, and may not understand many things that human game players natively do understand.&#x20;

It is normal for the AI to have multiple rounds of questions.

This is a great opportunity to improve the quality of your rules, however.

When the AI has provided you a final result, copy and paste it into the text box and click "*Import*".

<figure><picture><source srcset="/files/2xFIgHGQ2OsxQQH10m4E" media="(prefers-color-scheme: dark)"><img src="https://2449056524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK6BdQXak9wiY4BdSf9Rq%2Fuploads%2F1De1wDDmSqCs2KVrANbk%2FScreenshot%202026-07-19%20at%203.10.29%E2%80%AFPM.png?alt=media&amp;token=8a54b58c-897b-4980-96bb-e752b414aa38" alt="" width="563"></picture><figcaption></figcaption></figure>

*Note the "Import AI response" can be used at any time to re-import a response.*

Once complete, rules will be displayed, and you can continue to the next step.

## Brief

Click "*Export AI Instructions*" and import the file into your AI once more. When complete, paste the response and "*Import*" it.

Once the Brief is created, you can modify values if needed. When ready, click the toggle at the bottom to confirm you've reviewed the brief.

{% hint style="warning" %}
We have found that in most cases the brief is very very accurate and does not need modification. However, the entire simulation is rooted in these details, so it is important to confirm they are correct.
{% endhint %}

When confirmed, you can continue on to [Measurements](/docs/test/measurements.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 dynamically by asking a question.

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

```
GET https://cardstock-studio.gitbook.io/docs/test/define-rules.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
