File identification and envelope
2.1 Byte-level identification
A conforming file MUST begin at byte zero with the exact ASCII bytes:
PERSONAFILE/1.0
Immediately after this sequence MUST be LF (0A) or CRLF
(0D 0A). No UTF-8 byte-order mark, whitespace, or comments
may precede the signature. The document MUST be UTF-8. The file MAY have
any extension or none. The filename alone MUST NOT establish that a file
is a Personafile.
2.2 Header layout
The second line MUST consist of exactly three hyphens:
---. Each subsequent metadata line MUST use
Key: Value syntax. A line consisting of exactly
--- terminates metadata and begins the body on the
following line.
PERSONAFILE/1.0
---
Persona-ID: chef-emma
Name: Chef Emma
Version: 1.2.0
---
I am Chef Emma, a cooking assistant.
The body may be empty. It is free-form text; a
.md file may contain Markdown but Markdown processing is
not required by PFS.
2.3 Metadata grammar
- Metadata keys are ASCII letters followed by zero or more ASCII
letters, digits, or hyphens:
[A-Za-z][A-Za-z0-9-]*. - Metadata key matching is ASCII case-insensitive. Canonical display spelling is recommended.
- A key/value separator is the first colon on the line; later colons belong to the value.
- Values are single-line UTF-8 text; spaces and tabs immediately after the colon and at the end are ignored.
- Duplicate keys (under case-insensitive comparison) are invalid.
- Unknown valid keys MUST be preserved by editors and MAY be ignored by readers; they have no executable effect.
- Empty lines, multiline/folded values, and comments inside metadata are not supported in this version.
- The header MUST be no larger than 64 KiB in UTF-8 bytes, including the signature and delimiter lines.
2.4 Core fields
| Field | Requirement | Meaning |
|---|---|---|
Persona-ID |
MUST | Stable identifier within its containing resource scope,
e.g. chef-emma; not proof of global identity |
Name |
MUST | Display name, nonempty |
Description |
MAY | Human-readable summary |
Version |
MAY | Revision of the persona, independent of
PERSONAFILE/1.0 |
Language |
MAY | Preferred language tag, e.g. en or fr |
Body-Type |
MAY | Advisory body presentation type; defaults to
text/plain; text/markdown may be used |
Publisher |
MAY | Claimed publisher URI; not verified identity |
License |
MAY | Stated reuse terms |
The Persona-ID MUST be nonempty and SHOULD use
[A-Za-z0-9][A-Za-z0-9._-]*. In version 1.0 it is scoped to
its file or container, not globally resolvable on its own. Neither
Endpoint nor network access is required.
2.5 Minimal valid document
PERSONAFILE/1.0
---
Persona-ID: hello
Name: Hello
---
You are a friendly assistant.