> ## Documentation Index
> Fetch the complete documentation index at: https://docs.substrate.42.pe/llms.txt
> Use this file to discover all available pages before exploring further.

# substrate explain — Generate an HTML Workflow Map

> substrate explain writes a self-contained HTML file with board diagrams, field schema, and policies. No database required — works in a fresh clone.

Run `substrate explain` to generate a self-contained HTML file that maps your entire workflow. The output requires no assets, no build step, and no running Substrate installation — open it straight in a browser. Use it to show someone your workflow, check it into the repo, attach it to a PR that changes a gate, or hand it to a teammate who doesn't run Substrate locally.

## Usage

```shell theme={null}
substrate explain
substrate explain --out docs/workflow.html
```

## Options

<ParamField path="--out" type="string">
  Where to write the file. Defaults to `./substrate-explain.html`.
</ParamField>

## What the Map Shows

For each board, the file includes:

* An inline-SVG flow diagram of the groups in position order, with guards drawn on the transitions they gate
* A table of the `field_schema` with conditions rendered readably
* A table of policies with their conditions rendered readably

## No Database Required

`explain` reads substrate-as-code only. It never opens `data.sqlite` — it works with no database at all, including in a fresh clone. It never contains task data.

<Tip>
  Check `substrate-explain.html` into your repo or attach it to any PR that modifies a gate. Reviewers get an accurate picture of the workflow without needing to install or run Substrate.
</Tip>
