> For the complete documentation index, see [llms.txt](https://docs.raidrobotics.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.raidrobotics.org/commands-v3-state-machine/how-to/start-a-season.md).

# Start a season from the template

When the new game is released, this is how the template becomes this year's robot code.

{% stepper %}
{% step %}

## Copy and rename

Make a new repository from the template (or copy the folder), and give it this year's name. Check the team number in `.wpilib/wpilib_preferences.json`.
{% endstep %}

{% step %}

## Regenerate the drivetrain

Generate `generated/TunerConstants.java` with Tuner X for the new drivetrain, and replace the file. Don't hand-edit it. See [Drivetrain](https://docs.raidrobotics.org/commands-v3-state-machine/guide/drivetrain.md#tunerconstants).
{% endstep %}

{% step %}

## Work through the TODOs

Search the project for `TODO`. Every placeholder (IDs, ratios, gains, positions, field size, poses) is marked. `TODO (season)` marks things that depend on the game.
{% endstep %}

{% step %}

## Build the real mechanisms

For each real mechanism, copy `Mechanism1.java` or `Mechanism2.java`, rename it, and add it to the superstructure and the simulator. See [Add a mechanism](https://docs.raidrobotics.org/commands-v3-state-machine/how-to/add-a-mechanism.md). Delete the placeholders once nothing uses them.
{% endstep %}

{% step %}

## Shape the state machine to the game

Add states and requests as the game needs them. See [Add a state](https://docs.raidrobotics.org/commands-v3-state-machine/how-to/add-a-state.md) and [Add a button](https://docs.raidrobotics.org/commands-v3-state-machine/how-to/add-a-button.md).
{% endstep %}

{% step %}

## Write the autos

Copy `ExampleAuto.java` for each auto. See [Write an auto](https://docs.raidrobotics.org/commands-v3-state-machine/how-to/write-an-auto.md).
{% endstep %}

{% step %}

## Get ready for the real robot

Go through [Before the real robot](https://docs.raidrobotics.org/commands-v3-state-machine/how-to/before-the-real-robot.md) before you enable anything.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
`SimpleSuperstructure-v3` is a worked example of where this leads: four mechanisms, seven states, a Fused CANcoder arm on torque control, and safety limits between mechanisms. Look there when you need a pattern the template doesn't show.
{% endhint %}

## Things that depend on the game

| What                                           | Where                      |
| ---------------------------------------------- | -------------------------- |
| Field size                                     | `Constants.Field`          |
| How the field mirrors between alliances        | `AutoDrive.forAlliance`    |
| Which AprilTags to trust                       | `Constants.Vision.TAG_IDS` |
| Field-specific vision rules (like 2026's bump) | `Vision.reasonToReject`    |
| Robot-wide values worth logging                | `RobotLog.periodic`        |


---

# 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.raidrobotics.org/commands-v3-state-machine/how-to/start-a-season.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.
