omp packages

pi-custom-preamble0.1.3

Pi extension that replaces only the system-prompt preamble, keeping the generated tools/rules/docs/context sections.

skovsende Published 21 hours ago MIT ~0 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-custom-preamble

A Pi extension that replaces only the system-prompt preamble — the leading paragraph —

You are a coding assistant running inside pi, a coding agent harness.
Help users inspect files, run commands, and modify code.

— while leaving the auto-generated <tools>, <rules>, <docs>, <project_context>, <skills> and <cwd> sections untouched.

Why not SYSTEM.md?

Pi's built-in SYSTEM.md / --system-prompt sets the preamble section, but because the default <tools>, <rules> and <docs> sections are only generated in the built-in branch, using it drops those sections. This extension instead does a surgical string replacement of the default preamble in the fully assembled prompt, so everything else survives.

Install

pi install npm:pi-custom-preamble

Verify with pi list. Update later with pi update npm:pi-custom-preamble (or pi update --extensions for every package).

Configure the preamble

The first non-empty file wins:

  1. --preamble-file <path> CLI flag
  2. <cwd>/.pi/PREAMBLE.md — project (only when the project is trusted)
  3. <agent-dir>/PREAMBLE.md — user, defaults to ~/.pi/agent/PREAMBLE.md

Example:

mkdir -p ~/.pi/agent
cat > ~/.pi/agent/PREAMBLE.md <<'EOF'
You are Ada, a senior TypeScript engineer embedded in this repository.
Prefer small, focused diffs and call out risky changes before making them.
EOF

See PREAMBLE.example.md for a longer template.

Commands

Command Description
/preamble Show the active source and a preview
/preamble path Print the resolved file path
/preamble reload Confirm the file will be re-read (files are read fresh every run)
/preamble edit Open the active file in the editor and save it

Notes

  • If the built-in preamble is not present — because SYSTEM.md, --system-prompt, or another extension already replaced the prompt — the extension leaves the prompt unchanged and warns once per session.
  • The preamble file is read from disk on every turn, so edits apply on the next prompt without a reload.