Luigit
repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by admin

extensions/pfui/README.md

Raw
Rendered preview

pfui

Pain-Free User Interface gives Pi a small fallback identity and exports installed Pi context for tools and skills.

Install / load

PFUI is loaded through the root pi-ext package. extensions/pfui/index.ts must be the first explicit extension entry in the root package manifest because PFUI establishes process context and the fallback prompt for later extensions. The shared footer is the second explicit entry, before the extension glob, so footer producers discover it before publishing their initial state.

Commands / tools / settings

PFUI adds no commands, tools, or settings. It exports PI_CONTEXT_* environment variables for Pi's package, agent directory, documentation, examples, changelog, package metadata, version, and config directory name.

Behavior

A configured custom system prompt passes through unchanged. Without one, PFUI composes SYSTEM.md, active tool snippets and guidelines, appended prompt text, project context, available skills, and the current working directory. General behavior renders under <general_guidelines>, while active tool behavior remains associated with tool names under <tool_guidelines>. Empty sections are omitted, and guideline or tool changes from later extensions remain visible. The bundled pi-knowledge skill discovers installed Pi documentation through the exported context variables. Warnings are aggregated into one Pi UI notification and never written to the terminal streams.

Debugging

Opt-in metadata-only tracing follows debug contract. Safe events: session.start, session.shutdown, prompt.apply (custom_prompt | fallback_missing | applied outcome).

# pfui

Pain-Free User Interface gives Pi a small fallback identity and exports installed Pi context for tools and skills.

## Install / load

PFUI is loaded through the root [pi-ext package](../../README.md).
`extensions/pfui/index.ts` must be the first explicit extension entry in the root package manifest because PFUI establishes process context and the fallback prompt for later extensions.
The shared footer is the second explicit entry, before the extension glob, so footer producers discover it before publishing their initial state.

## Commands / tools / settings

PFUI adds no commands, tools, or settings.
It exports `PI_CONTEXT_*` environment variables for Pi's package, agent directory, documentation, examples, changelog, package metadata, version, and config directory name.

## Behavior

A configured custom system prompt passes through unchanged.
Without one, PFUI composes [SYSTEM.md](SYSTEM.md), active tool snippets and guidelines, appended prompt text, project context, available skills, and the current working directory.
General behavior renders under `<general_guidelines>`, while active tool behavior remains associated with tool names under `<tool_guidelines>`.
Empty sections are omitted, and guideline or tool changes from later extensions remain visible.
The bundled `pi-knowledge` skill discovers installed Pi documentation through the exported context variables.
Warnings are aggregated into one Pi UI notification and never written to the terminal streams.

## Debugging

Opt-in metadata-only tracing follows [debug contract](../DEBUG.md).
Safe events: `session.start`, `session.shutdown`, `prompt.apply` (`custom_prompt` | `fallback_missing` | `applied` outcome).