> For the complete documentation index, see [llms.txt](https://docs.openmind.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openmind.com/build/modes_lifecycle/transition_rules.md).

# Transition Rules

Introduction to transition rules

Transition rules define how and when the robot switches between operational modes. Each rule specifies a source mode, a target mode, a trigger mechanism, and an execution priority. The system continuously evaluates these rules and executes the most appropriate transition based on current inputs, elapsed time, and contextual conditions.

Transition rules are defined as an array of rule objects under the transition\_rules configuration.

### Rule Schema

Each transition rule is represented as an object with required and optional fields.

#### Required Fields

| Field                | Type            | Required | Description                                                                                                                                                              |
| -------------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `from_mode`          | `string`        | Yes      | The operational mode in which this transition rule is evaluated                                                                                                          |
| `to_mode`            | `string`        | Yes      | The target mode to transition into when the rule is triggered                                                                                                            |
| `transition_type`    | `string`        | Yes      | Defines how the transition is triggered. Supported values: `input_triggered`, `time_based`, `context_aware`                                                              |
| `priority`           | `integer`       | Yes      | Determines rule precedence when multiple transition rules are eligible (higher value takes precedence)                                                                   |
| `trigger_keywords`   | `array<string>` | No       | List of keywords or phrases that can trigger the transition via user input; applies to `input_triggered` transitions only (ignored for `time_based` and `context_aware`) |
| `cooldown_seconds`   | `number`        | No       | Minimum time in seconds before the same transition rule can be triggered again, preventing rapid or repeated transitions                                                 |
| `context_conditions` | `object`        | No       | Contextual conditions that must be satisfied for a `context_aware` transition to be eligible                                                                             |

Supported Operators in `context_conditions`

| Operator   | Value Type          | Description                                                               |
| ---------- | ------------------- | ------------------------------------------------------------------------- |
| `min`      | `number`            | Minimum allowed numeric value                                             |
| `max`      | `number`            | Maximum allowed numeric value                                             |
| `contains` | `string` or `array` | Checks whether a string contains a substring or an array contains a value |
| `one_of`   | `array`             | Evaluates to true if the context value matches any value in the array     |
| `not`      | `any`               | Negates the specified condition                                           |

#### Priority Resolution

When multiple transition rules are eligible:

* Rules are sorted by priority (higher values take precedence)
* The highest-priority rule is selected


---

# 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.openmind.com/build/modes_lifecycle/transition_rules.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.
