> For the index of every page in Orbital's docs, read https://docs.runorbital.dev/llms.txt.

# Template variables

> The variables a prompt template can read, from inputs to the current work

Look up every name a prompt can read. Put a variable in double braces, and Orbital fills it in before each visit.

```toml title="review.toml"
[steps.review]
prompt = "Review the change against this goal: {{ inputs.goal }}"
```

Prompts use Nunjucks. Templates cannot read files, so `include` and `extends` are unavailable, and they do not run shell commands. [Write prompts](/workflows/write-prompts/) teaches the syntax, with conditionals, loops, filters and worked examples.

| Variable | Reads |
| --- | --- |
| `{{ inputs.goal }}` | The run's goal. |
| `{{ inputs.<name> }}` | An original declared input, unchanged by the run. |
| `{{ inputs.<name>.<field> }}` | A field of a `ticket` or `epic` input, as Orbital looked it up when the run was created: `url`, `key`, `number`, `tracker`, `title`, `body` or `state`, such as `{{ inputs.ticket.title }}`. The input on its own renders the reference the run was given. |
| `{{ context.<path> }}` | Any context value, including inputs a later step has changed. |
| `{{ context.response.<id> }}` | A named agent step's final prose without its trailing output object. Empty if that step has not completed. Cannot name a step of another kind. A grouped or imported step's id is dotted, such as `context.response.reviews.clarity`. |
| `{{ context.failure_reason }}` | Why the previous step failed. Empty on success. |
| `{{ context.parallel.results['0'].context.<name> }}` | A branch result after the join. The index is quoted. |
| `{{ current_work }}` | The saved work scope from a `work` output. |
| `{{ maintained.current }}` | The current version of the artifact the step [maintains](/reference/workflow-file/#maintains), empty before its first. `{{ maintained.path }}` is the file it sits in. Only a maintaining step reads them. |
| `{{ run.folders.<name>.path }}` | The current working path of that folder. |
| `{{ project.folders.<name>.path }}` | That folder's original project path. |
| `{{ input }}` | The run's primary input. |
| `{{ unmet }}` | Each [postcondition](/reference/workflow-file/#postconditions) the step's last visit left unmet, one line each with its reason. Empty once they all hold. |
| `{{ diff }}` | The run's change against its base, cut to the decision model's context with a `[… diff truncated …]` marker. Only the `state` of a [decide step or deciding fan-out](/workflows/decide-with-a-model/) reads it. |

Folder names must match the project's folders. [Input kinds](/reference/workflow-file/#input-kinds) lists the fields each ticket-like input offers.

## Prompt files

`prompt_file = "prompts/review.md"` keeps a full prompt in its own prompt file, relative to the workflow file that names it. A step takes either `prompt` or `prompt_file`, never both. Orbital rereads a prompt file before each later visit. If your edit is invalid, it reports the problem and uses the prompt it last checked.

An inline prompt that spans several lines uses TOML's triple quotes:

```toml
[steps.review]
prompt = """
Review the change against this goal: {{ inputs.goal }}

List each problem with its file.
"""
```

## Related

- [Write prompts](/workflows/write-prompts/): the template syntax and common patterns, with examples.
- [Context](/reference/context/): what each value contains and when it is available.
- [Pass context between steps](/workflows/pass-context/): how a step defines the values later prompts read.
- [History and threads](/reference/history-and-threads/): what each prompt already carries from earlier steps.
- [Workflow file](/reference/workflow-file/#complete-example): a complete workflow that validates.
