On this page
1. Purpose2. Envelope Header: Avatar3. Body Elements: <pf:welcome> and <pf:starter>4. PFDOM Node Model & Deterministic Serialization5. Renderer & Client Projections6. Security & Backward CompatibilityPersonafile Welcome, Starters, and Avatar Specification
- Version: Draft 0.1
- Status: Working Draft
- Applies to:
PERSONAFILE/1.0envelope metadata (Avatar) and document body (<pf:welcome>,<pf:starter>)
1. Purpose
When a user opens a PERSONAFILE/1.0 persona in a mobile
app, web browser, or chat client, the client needs an instant,
deterministic, zero-token first view before invoking an
LLM:
- Who is this persona? (
Name,Avatar,Identity-*) - How does it greet a human visitor?
(
<pf:welcome>) - What are the best first questions or actions?
(
<pf:starter>)
This specification defines a strictly optional, backward-compatible extension for publisher-defined avatars, welcome introductions, and clickable starter prompts. Clients remain free to render these natively (e.g., empty-chat welcome panels, hero cards, quick-reply chips) while the Personafile remains the single canonical source of truth.
2. Envelope Header:
Avatar
An optional Avatar header inside the
PERSONAFILE/1.0 envelope (--- block) declares
the persona's primary visual avatar URI:
Avatar: <URI-Reference>
- Envelope placement: Keeping
Avatarin the envelope allows directories, search results, and minimalist preview cards to display the persona's avatar without parsing the full body. - URI resolution: Relative references MUST be resolved against the document's canonical base URI per RFC 3986.
- Security: Clients and renderers
MUST restrict
Avatartohttps://, relative references,http://(only when explicitly permitted viaallowInsecureHttp), or raster-only base64 data URIs matchingdata:image/(png|jpeg|jpg|webp|gif);base64,<payload>for self-contained single-file Personafiles. Unsafe schemes (javascript:,file:,data:image/svg+xml,data:text/html) MUST be rejected.
3. Body Elements:
<pf:welcome> and <pf:starter>
3.1 <pf:welcome>
Declares the human-facing welcome block for empty conversations or persona landing views.
<pf:welcome>
Welcome to Bistro Lumière! Ask about today's menu, allergens, or book a table.
<pf:starter label="Today's specials">What are today's specials?</pf:starter>
<pf:starter label="Book a table">I'd like to book a table for 2 tonight</pf:starter>
</pf:welcome>- Cardinality: A document SHOULD
contain at most one top-level
<pf:welcome>element. If multiple appear, conformant parsers SHOULD select the first top-level occurrence and emit a non-fatal diagnostic warning. - Content: Inner text outside
<pf:starter>children is treated as human-facing Markdown/text introduction. - Embedded documents:
<pf:welcome>elements inside<pf:embed>MUST be ignored by the host document's welcome projection (a composed sub-document must not hijack the parent persona's greeting).
3.2 <pf:starter>
Declares a publisher-authored starter prompt pill / quick-reply
action inside <pf:welcome>.
<pf:starter label="Check availability">Is Dune available to borrow today?</pf:starter>| Attribute | Required | Description |
|---|---|---|
label |
MUST | Short human-readable button/chip label. |
id |
Optional | Stable identifier for analytics or client state. |
| Inner text | Optional | Exact message sent to the persona when the user taps the starter. If
empty or omitted, clients MUST default the prompt text
to label. |
<pf:starter>elements SHOULD appear inside<pf:welcome>. Top-level<pf:starter>elements outside<pf:welcome>MAY be collected by clients as fallback starter prompts.
4. PFDOM Node Model & Deterministic Serialization
Conformant PFDOM parsers (pfdom-js,
pfdom-kt) implementing this extension MUST
expose:
WelcomeNode(kind: "welcome"):message: trimmed Markdown/text string (from non-starter children)starters: ordered list ofStarterNode
StarterNode(kind: "starter"):id: nullable stringlabel: non-empty stringprompt: non-empty string (defaults tolabelwhen inner text is blank)
- Document convenience API:
doc.getAvatar(): String?— resolved, sanitizedAvatarURI ornulldoc.getWelcome(): WelcomeNode?— primary top-level<pf:welcome>node ornull
5. Renderer & Client Projections
| Consumer | Recommended Projection |
|---|---|
| Chat / Mobile Client | Render WelcomeNode.message (Markdown) and
WelcomeNode.starters as clickable starter pills in the
empty-session welcome panel with zero LLM latency. Tapping a starter
sends starter.prompt as the user's first message. |
Fallback (no <pf:welcome>) |
Clients MAY derive a fallback welcome view from
human-facing Markdown (MarkdownRenderer with
includePromptFraming = false) and auto-generated starter
actions from <pf:form> tools or top
# Section headings. |
PFRenderer (LLM) |
SHOULD omit <pf:welcome> /
<pf:starter> from system instructions (or render
lightly as non-binding context) so human UI greetings do not distort
model behavior. |
MarkdownRenderer /
HTMLRenderer |
Render <pf:welcome> as a highlighted intro block
and <pf:starter> items as chips/buttons or a bulleted
list. |
6. Security & Backward Compatibility
- Untrusted provenance: Text inside
<pf:welcome>and<pf:starter>inherits the document'suntrustedprovenance and MUST be sanitized before HTML/Markdown rendering. - No auto-execution: Selecting a
<pf:starter>MUST require explicit user interaction; clients MUST NOT automatically send starter prompts or invoke tools without user action. - Graceful degradation: Minimal
PERSONAFILE/1.0parsers that do not implement this extension safely ignore unknown<pf:welcome>and<pf:starter>tags without failing envelope or body parsing.