> 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`.

# Prompt Templating

Processing prompts on **Settings → Prompts** support placeholders expanded at runtime with entry and session context.

## Placeholder syntax

Double-brace tokens inject values at run time:

```
{{raw.company_name}}
{{raw.description}}
{{output.summary}}
```

Paths mirror tool field notation: `raw.*` for ingested columns, output keys without prefix when defined on the entry.

## System vs user templates

| Field | Role |
| --- | --- |
| **System message** | Persona, constraints, output format rules |
| **Prompt** (user template) | Task steps, entry-specific instructions |

## Page locations

| `page_location` | Where button appears |
| --- | --- |
| `main` | Horizon → Data Ingestion |
| `review` | Horizon → Data Review |
| `management` | Horizon → Data Management |
| `project_chat_catalog` | Assignable workflow buttons in projects |

Project agent uses `category: project` (not a page location).

## Ingestion group scope

Link prompts to ingestion groups so processing runs against the correct entries. Tools on the prompt should reference the same groups' fields.

## Response format

Define output keys when the prompt writes canonical fields back to entries (e.g. generated summary). Keys must align with Data Management columns and downstream tool return fields.

## Best practices

- Keep system messages stable; put variable content in the user template.
- Trim tool allowlists to what the task needs.
- Test on one entry from Data Review before batch processing.
- Avoid trailing spaces in prompt ids — delete/normalize uses exact id strings.
