@amolith/pi-personas
v0.1.0
Published
Switchable agent personas for Pi
Readme
@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-personasWrite 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.mdThe file name without .md is the persona name. That's what /persona and the
persona setting use.
Switch personas
Open an interactive picker:
/personaSwitch directly:
/persona patient-tutorClear the active persona:
/persona noneunset 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.
