@amolith/pi-personas
Code with a grumpy senior today and work with a patient tutor tomorrow. Switch
between them with /persona. The active one persists across sessions until
changed. Setting a persona prior to startup appends it to the system prompt.
Changing it mid-session sends the persona content as a steering message.
Personas are loaded from persona-name.md files in
$PI_CODING_AGENT_DIR/personas/. /persona is interactive and /persona grug
sets it directly.
Install
pi install npm:@amolith/pi-personas
Write personas
Create one markdown file per persona in $PI_CODING_AGENT_DIR/personas/:
$PI_CODING_AGENT_DIR/personas/grumpy-senior.md
$PI_CODING_AGENT_DIR/personas/patient-tutor.md
The file name without .md is the persona name. That's what /persona and the
persona setting use.
Switch personas
Open an interactive picker:
/persona
Switch directly:
/persona patient-tutor
Clear the active persona:
/persona none
unset and clear also clear the active persona.
Remember the active persona
The active persona persists as the persona key in
$PI_CODING_AGENT_DIR/settings.json:
{
"persona": "patient-tutor"
}
The extension only accepts persona names that match markdown files under
$PI_CODING_AGENT_DIR/personas/.
What happens when it changes
If a persona is set before startup, the extension reads it at session start and appends it to the system prompt for the lifetime of the session.
When you set or clear a persona mid-session, the extension updates the setting immediately and sends a one-shot hidden reminder message. It does not rewrite the session's system prompt mid-stream.