> 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/modes-and-lifecycle/transition_rules.md).

# 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; applicable to `input_triggered` and `time_based` transitions |
| `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 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://docs.openmind.com/modes-and-lifecycle/transition_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.
