> Public product help. This page has no customer entries, projects, chat transcripts, API keys, or horizon contents.
> Reading that data requires `Authorization: Bearer` (a signed-in app session JWT, or a Headless access token).
> Do not call Supabase `/rest/v1` with a Headless JWT. Data reads go through `/casc/v1/headless/v1/rest`.

# YUML — Your Useful Markup Language

YUML lets you define HTML output templates with tables, text blocks, row/column layouts, code/JSON panels, and custom CSS. Attach templates to **prompts**, **tools**, or **projects** to emit formatted output after processing or chat replies.

## Where to manage YUML

Open **Settings → YUML** to create templates, upload CSS, download a CSS stub with field placeholders, and preview with sample JSON.

## Syntax (v1)

| Directive / syntax | Purpose |
| --- | --- |
| `@theme striped\|solid\|plain` | Default table styling |
| `@css inline` | Use template CSS text |
| `#` / `##` / `###` | Headings |
| Plain paragraphs | Wrapped in `<p>` |
| `@table striped\|solid\|plain\|hidden-header` + pipe rows | Data tables |
| `@row` … `@col` … `@end` | Side-by-side layout |
| `@code json\|text` … `@end` | Monospace code block |
| `{{output.key}}` / `{{raw.field}}` | Bind prompt output or raw entry fields |

## Sample: revenue report

```
@theme striped
@css inline

# {{output.title}}

@table striped
| Company | Revenue |
| {{output.company}} | {{output.revenue}} |

@row
@col
## Summary
{{output.summary}}
@col
@code json
{{output.metrics}}
@end
```

## Sample: data-only table (hidden header)

```
@table hidden-header
| Status | {{output.status}} |
| Owner | {{output.owner}} |
```

## Attaching YUML

- **Prompts** — Settings → Prompts → enable YUML emission, pick template and summary keys from output fields. Runs after batch prompt processing.
- **Tools** — Settings → Tools → enable YUML on a vector/analytics tool. Emits after tool results in chat.
- **Projects** — Project Settings → Default YUML output. Emits after agent replies (workflow prompt YUML overrides when set).

## CSS workflow

1. Write YUML with placeholders.
2. Click **Download CSS stub** to get commented selectors for each bound field.
3. Fill in styles and **Upload CSS** or paste into the CSS editor.

## Viewing emissions

Chat shows a short summary plus a link to the full HTML document. Data Management entries processed with YUML show a **View YUML formatted output** link when available.

## Coming soon

Flowcharts and schematics (`@diagram` / Mermaid-style blocks) are planned for a future release.
