# Legends Chat

**Legends Chat** is a conversational front end over the same legacy
documentation this portal publishes. Instead of browsing to a document, you ask
a question in natural language and get an answer grounded in the generated
documentation, with citations back to the source pages.

<https://app-int.saif.com/legendschat>

## What it is for

This portal and Legends Chat are two ways into one corpus. Use whichever fits
the question:

| Use the portal when | Use the chat app when |
| --- | --- |
| You know roughly where the answer lives and want to read it in context | You have a question but not a starting page |
| You need to read a document end to end | You want a synthesised answer drawn from several documents |
| You are reviewing generated documentation | You are exploring unfamiliar code |

The chat app answers **only** from documentation that has already been generated
and published. If a repository has not been through doc gen, the chat app knows
nothing about it — which makes
[Publishing to the portal](publishing-to-portal.md) a prerequisite for a
repository's code showing up in answers.

!!! warning "Answers are grounded, not authoritative"
    Answers are generated from documentation that was itself generated. Treat a
    chat answer the way you would treat the underlying document: useful, and
    worth verifying against source code before you act on it. Follow the
    citations.

## Chat screen

The chat screen is a session sidebar on the left and the conversation on the
right.

### Starting a chat

A new chat opens with a greeting — *What can I help you find?* — and the
**persona selector**. Pick a persona, then type your question.

### Asking questions

- `Enter` sends; `Shift+Enter` inserts a newline.
- A character counter appears as you approach the message length limit, and the
  send control disables past it.
- While an answer is generating the composer is disabled and a thinking
  indicator shows. On a slow answer the indicator adds a "still working" hint —
  that is a slow response, not a hang.

### Reading answers

Answers render as markdown: code blocks get a copy button, and wide tables
scroll within the message.

**Citations** appear as chips beneath an answer. A citation that maps to a
published page is a link. A citation without one is a non-clickable chip whose
popover shows the source path and offers to copy it — this happens when the
answer is grounded in something not addressable in this portal. When there are
many citations the list caps with a "+N more" expander.

A few responses are not plain successes, and the UI distinguishes them:

| What you see | What it means |
| --- | --- |
| A note that the response was cut short | The answer hit the model's length limit. It is a real answer, just truncated — ask a narrower question for the rest. |
| A failed turn with **Retry** | The turn did not complete. Retry replays it. |
| A blocked answer with no retry | Content filtering rejected the exchange. Retrying reproduces the rejection; rephrase instead. |
| A wait before retrying | You or the service hit a rate limit. The message tells you how long to wait. |

## Session management

Every conversation is a **session**, listed in the sidebar with its
auto-generated title, when it was last used, and the persona it was started
with. Sessions are private — you only ever see your own.

**Titles** are generated automatically after the first exchange. Renaming a
session yourself makes the title stick; auto-titling never overwrites a manual
title.

**Pinning** is the important one, because of retention:

!!! danger "Unpinned chats are deleted automatically"
    Only the most recent unpinned sessions are kept. Once you pass the retention
    limit, older unpinned chats are trimmed automatically as you keep chatting.
    **Pin any conversation you want to keep.** Pinned sessions are never counted
    against the limit and never auto-deleted.

The sidebar warns you as you approach these boundaries — when unpinned sessions
reach the retention limit, and when you approach the cap on pinned sessions.
Unpinning a session makes it eligible for trimming again.

**Deleting** a session removes it and its messages permanently, so the UI always
confirms first. There is no undo and no recycle bin.

The sidebar can be resized, collapsed, and set to a compact density. Those
choices — along with your theme — persist across devices, because they are saved
to your profile rather than to the browser.

## Persona selection

A **persona** determines how answers are written: the depth, the vocabulary, and
what the answer emphasises. The same question asked of two personas gets two
genuinely different answers. The shipped personas are **Developer**,
**Architect**, **Business Analyst**, and **General**.

Pick the persona that matches how you intend to use the answer:

| Persona | Suited to |
| --- | --- |
| Developer | Implementation detail, code paths, behaviour of a specific routine |
| Architect | Structure, dependencies, integration points, cross-cutting concerns |
| Business Analyst | Business rules and process, expressed without implementation detail |
| General | Orientation, or when none of the above clearly fits |

!!! important "The persona locks after the first message"
    A session's persona is fixed once the conversation starts. After the first
    turn it renders as a label rather than a control. To ask the same question
    from a different perspective, **start a new chat** and pick the other
    persona.

The persona you choose is remembered as your preference and pre-selected on your
next new chat. You can change it on any new chat, or clear the preference to be
asked each time.

An administrator can **disable** a persona. A disabled persona disappears from
the selector for new chats, but existing sessions that already use it keep
working.

## Access

Legends Chat is corporate-only and you sign in with your normal SAIF account.
Access is granted through **business roles** — request these the same way you
request any other business role:

| Business role | Grants |
| --- | --- |
| `legends-chat-user` | Use the chat app: personas, sessions, and asking questions |
| `legends-chat-persona-admin` | Everything above, plus persona management |

`legends-chat-persona-admin` deliberately includes ordinary chat access as well,
because anyone editing a persona needs to be able to open a chat and try it.

If you sign in without either role, you get a page naming the role to request
and a link to the access-request process, rather than an error. If you have
`legends-chat-user` only, you will not see the Persona Admin navigation at all —
that is expected, not a fault.

`legends-chat-user` also grants the [Holocron MCP](holocron-mcp.md) tools, which
bring the same corpus into GitHub Copilot agents. There is nothing extra to
request.

## Persona management

*Requires `legends-chat-persona-admin`.*

Persona administration is reached from the **Personas** item in the top
navigation, which is only visible to administrators.

A persona is a title, a description, a **system prompt**, and an enabled flag.
The title and description are what chat users see in the selector. The system
prompt is the instruction set that shapes every answer given through that
persona — it is never shown to ordinary chat users.

!!! note "System prompts are curated content"
    The system prompt is the entire behaviour of a persona. Editing one changes
    the answers every user gets from that persona, immediately and for everyone.
    Treat an edit the way you would treat a change to shared configuration:
    make it deliberately, and open a chat afterwards to confirm the persona
    still behaves the way you intended.

The editor shows who created and last modified a persona and when, so a
surprising change can be traced.

### Working alongside other administrators

The form detects a conflicting save. If someone else saved while you were
editing, you get a dialog explaining that and offering to reload their version —
your edit is never silently merged or silently discarded. Navigating away from
an unsaved form prompts first.

### Disabling versus deleting

Prefer **disabling**. A disabled persona vanishes from the selector for new
chats while existing conversations that reference it keep working.

Deletion is refused outright for a persona that any session still references;
the app will tell you to disable it instead. In practice, any persona that has
seen real use can only be retired by disabling it.

### Sort order

Personas are ordered by an explicit sort order and then alphabetically, so the
persona most people should pick can be placed first rather than left to
alphabetical accident.

## Related

- [Publishing to the portal](publishing-to-portal.md) — a repository's
  documentation has to be published before the chat app can answer from it.
- [Reviewing documentation](reviewing-documentation.md) — answer quality is
  bounded by the quality of the documentation underneath it.
- [Holocron MCP](holocron-mcp.md) — the same corpus, as tools for GitHub
  Copilot agents.
