> ## Documentation Index
> Fetch the complete documentation index at: https://maestro.rasa.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Ordered block steps

> Step kinds, step fields, implicit next, conditional branching, and block routability.

An ordered block is a `steps:` list inside a `:::ordered_block id=<id>` fence in
`skill.md`. This page is the full step vocabulary. For when to reach for a block
at all, see [Ordered Blocks](/docs/maestro/build-guide/ordered-blocks).

## Step kinds

The kind is inferred from which key the step carries.

| Key             | Kind           | What happens                                                    |
| --------------- | -------------- | --------------------------------------------------------------- |
| `instructions:` | Conversational | The LLM converses within the step. Pair with `complete_when:`   |
| `collect:`      | Collect        | The framework collects one memory entry from the user           |
| `action:`       | Action         | Deliver a response (`utter_*`)                                  |
| `execute_tool:` | Execute        | The framework calls the tool directly, without the LLM          |
| `noop: true`    | Route          | Evaluate `next:` branches and jump, with no user-visible effect |
| `set_memory:`   | Set memory     | Write literal values to memory keys                             |
| `call:`         | Call           | Run another block or skill, then return to this step's `next`   |
| `link:`         | Link           | Hand off to another flow and continue there                     |
| `id: END`       | End            | Terminate the block                                             |

## Step fields

| Field                | Applies to                | Description                                       |
| -------------------- | ------------------------- | ------------------------------------------------- |
| `id`                 | all                       | Step identifier, unique within the block          |
| `next`               | all but `noop:` / `link:` | A step id, or a list of conditional branches      |
| `complete_when`      | `instructions:`           | Condition that ends the step                      |
| `optional`           | `instructions:`           | The step may be skipped                           |
| `utterance`          | `collect:`                | Response name used to ask for the value           |
| `description`        | `collect:`                | What the value means, shown to the LLM            |
| `ask_before_filling` | `collect:`                | Ask even when the value is already set            |
| `parameters`         | `execute_tool:`           | Arguments; `session.*` values resolve from memory |

<Note>
  A `collect:` step names its question with **`utterance:`**; an `action:` step
  names the response to deliver with **`action:`**.
</Note>

## Implicit `next`

A step with no `next` falls through to the step below it, and the last step
falls through to `END`. Add `next:` where you are branching or jumping
backwards.

## Conditional branching

A `next:` branch list routes on conditions, with `else:` as the fallback:

```yaml theme={null}
- id: gate_card_selected
  noop: true
  next:
    - if: "session.project.selected_card_id"
      then: check_card_eligible
    - else: card_not_found
```

Branches are evaluated in order and the first match wins, so put `else:` last.

Conditions use the standard expression grammar. See
[Conditions](/docs/maestro/reference/conditions).

## Routability

A block's reachability follows from the shape of the skill:

| Skill shape                    | Blocks are                                                     |
| ------------------------------ | -------------------------------------------------------------- |
| Prose + blocks (hybrid)        | Internal: reached from that skill via `@block.<id>` or `call:` |
| Blocks only (fully controlled) | Routable: the orchestrator may enter them directly             |

## See also

* [Ordered Blocks](/docs/maestro/build-guide/ordered-blocks): when to use one
* [`skill.md` reference](/docs/maestro/reference/skill-md): the fence and frontmatter
* [Conditions](/docs/maestro/reference/conditions): the expression grammar
