> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fs.soquincy.qzz.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Persona Editor: Shape Your Bot's Voice and Style

> Use Freesona's structured persona editor to define personality, background, beliefs, and style — changes apply live without restarting the bot.

The persona system gives you precise control over how Freesona presents itself in every conversation. Instead of a single free-form text field, your persona is split into five structured fields that the bot assembles into a system instruction on every generation call. Edit one field at a time, ship a full persona overhaul, or switch between saved presets for different server contexts — all without touching a config file or restarting the bot.

## The Five Persona Fields

Freesona stores the persona as a structured JSON object with five independent fields. Each one maps to a named XML-tagged block that gets injected into the model's system instruction:

| Field                              | What to put here                                                    |
| ---------------------------------- | ------------------------------------------------------------------- |
| **Core Personality & Traits**      | The bot's identity, personality type, and defining character traits |
| **Background & History**           | Origin story, backstory, and any history that shapes how it thinks  |
| **Beliefs, Likes & Dislikes**      | Values, opinions, preferences, and strong dislikes                  |
| **Language & Communication Style** | Tone, formality level, slang, pacing, and language quirks           |
| **System Instructions**            | Hard rules, behavioral constraints, and override directives         |

Each field accepts up to 1,024 characters. Fields left blank are simply omitted from the assembled prompt — you don't need to fill all five.

## Opening the Persona Editor

Run `/setpersona` to open the persona panel. The panel is a button-based interface with the following actions:

* **Edit Persona** — opens a modal pre-filled with your current values. Edit any or all five fields and submit to save.
* **Preview Prompt** — shows the fully assembled persona string exactly as the model will receive it.
* **Debug** — displays the lock state, legacy mode flag, how many fields are filled, and the current prompt length.
* **Lock / Unlock** — toggles the persona lock without leaving the panel.

Changes take effect immediately. The bot saves the updated values and starts using the new persona on the next generation call — no restart required.

<Note>
  `/setpersona` is a slash-only command because it uses Discord's modal UI. It cannot be run as a prefix command.
</Note>

## Persona Presets

Save any persona configuration as a named preset and reload it at any time. Presets persist across restarts.

| Command                 | What it does                                 |
| ----------------------- | -------------------------------------------- |
| `/personasave <name>`   | Save the current persona as a named preset   |
| `/personaload <name>`   | Load a saved preset and apply it immediately |
| `/personalist`          | List all saved preset names                  |
| `/personadelete <name>` | Delete a saved preset permanently            |

Preset names are stored in lowercase. `/personaload` respects the persona lock — if the persona is locked, loading a preset will fail until you unlock it first.

<Tip>
  Use presets to maintain distinct personas for different server contexts. For example, save a formal assistant persona for a work server and a casual persona for a community server, then switch between them with a single command.
</Tip>

## Persona Lock

Lock the persona to prevent accidental overwrites during active use.

| Command          | What it does                                               |
| ---------------- | ---------------------------------------------------------- |
| `/personalock`   | Locks the persona — all edit and load attempts are blocked |
| `/personaunlock` | Unlocks the persona and re-enables editing                 |

When locked, any attempt to save changes through `/setpersona` or load a preset with `/personaload` returns an error. Use lock when you have a stable persona you're happy with and don't want to risk changing by mistake.

## Debugging the Active Persona

Run `/debugpersona` to inspect the full state of the persona system in a single embed:

* **Assembled Persona** — the complete system instruction string being sent to the model (first 900 characters)
* **Last Prompt** — the last user prompt sent in the current channel
* **Provider** — the active AI provider
* **Model** — the active model name
* **Locked** — whether the persona lock is engaged
* **Autonomy** — whether autonomy mode is on and at which frequency threshold

<Tip>
  Use `/debugpersona` to confirm your edits landed correctly and to verify which provider and model are actually receiving the persona.
</Tip>

## Legacy Support

If `persona.json` does not exist but a `persona.txt` file does, Freesona falls back to the plain text file automatically. The `/debugpersona` output will show **Legacy Mode: Yes** when this is the case. To migrate, open `/setpersona`, copy your existing text into the appropriate fields, and save — the bot will write `persona.json` and stop using the legacy file.

## Permissions

All persona commands are restricted to the Bot Owner.

| Command                                                             | Who can use it |
| ------------------------------------------------------------------- | -------------- |
| `/setpersona`                                                       | Bot Owner      |
| `/personalock` / `/personaunlock`                                   | Bot Owner      |
| `/personasave` / `/personaload` / `/personalist` / `/personadelete` | Bot Owner      |
| `/debugpersona`                                                     | Bot Owner      |
