pi-extensions
A collection of Pi extensions. They're
all quite rough currently, having just been imported to this repo from ad-hoc,
vibed individual scripts created by saying "go change
~/.config/pi/extensions/foo.ts so it bars".
Packages
@amolith/pi-handoff
Get to the end of the thing you're doing, then use a lightweight subagent to
extract particular bits from the current session and create a new one from those
bits with /handoff thorough goal description. You can also tell Pi to hand
something off (it has a tool).
pi install npm:@amolith/pi-handoff
Based on handoff.ts and session-query.ts by Petr Baudis, licensed MIT accordingly. Reworked so the subagent calls a tool instead of expecting it to produce well-formed JSON, added an auto-submit countdown, and make the extraction model configurable via
PI_HANDOFF_MODEL.
@amolith/pi-answer
See that Pi spit a bunch of Markdown at you with some embedded questions, use
/answer to have a lightweight subagent extract those questions so you can
answer them in a nice form instead of mentally parsing all that LLM-speak. For
best results, give a good description of /answer what you want to turned into questions for answering.
pi install npm:@amolith/pi-answer
Based on answer.ts by Armin Ronacher, licensed Apache-2.0 accordingly. Reworked so the subagent calls a tool instead of expecting it to produce well-formed JSON, rewrote the system prompt with few-shot examples, added a notes editor (Alt+N) and fallback extraction with the current model when the preferred model is unavailable.
@amolith/pi-questionnaire
Have Pi construct on-the-fly questionnaires to ask you stuff before it goes off and does the wrong thing.
pi install npm:@amolith/pi-questionnaire
Based on questionnaire.ts by Mario Zechner, licensed MIT accordingly. Added a free-text notes editor, word wrapping for long prompts, and custom answers are sent as a steering user message so the user can go back and edit them later.
@amolith/pi-personas
Drop markdown files in $PI_CODING_AGENT_DIR/personas/ and switch between them
with /persona. Lets your agent be a grumpy senior today and a patient tutor
tomorrow. The active persona gets injected into the system prompt and persists
across sessions until you change it.
pi install npm:@amolith/pi-personas
All mine :)
Development
Prerequisites: mise (installs bun automatically).
# Install dependencies
bun install
# Format, lint, and type-check everything
mise run check