ZiChuanLan/pi-purge

pi extension: /purge swaps pi's built-in assistant persona for your own prompt file

What it solves

This tool allows users to experiment with and modify the system prompts used by the pi coding agent. It is designed for prompt engineering, regression testing, and studying how different instructions affect an AI's behavior, instruction-following, and robustness against prompt injection.

How it works

It acts as an extension that intercepts the system prompt before it is sent to the model. Users can toggle the extension on or off within a session and choose between three modes: append (adds your instructions to the existing prompt), replace (swaps out specific parts of the agent's identity while keeping tools), and strict (isolates your instructions by removing almost all default framing). It does not write to disk or alter the agent's core files, and it reverts to default behavior whenever a session is restarted.

Who it’s for

It is intended for researchers and developers who need a controlled environment to test how specific system instructions influence AI performance without permanently modifying their agent setup.

Highlights

  • Three distinct modes (append, replace, strict) to control how much of the original agent prompt is retained.
  • No persistent state; settings are session-scoped and do not modify files on your computer.
  • Supports custom prompt files via local file paths or a bundled example prompt.
  • Tools remain functional in all modes, including the most restrictive strict mode.
  • Simple command-line interface within the pi agent to check status, reload prompts, and toggle settings.

Related

  • Project
  • Project
  • Project
  • Project