Skip to content

pi-jev-context-curator

Pi extension that judges each new message unit once with Jev, omitting unneeded units from context and logging removal reasons.

Projectbeta

Overview

pi-jev-context-curator curates the context Pi sends before every LLM call. It groups messages into atomic units (an assistant tool call plus its results), checks a fingerprint checkpoint so each unit is judged only once, and sends only new units to Jev. One primary noul question decides keep or remove, alongside two choice questions classifying the best keep reason and removal reason; the noul is authoritative.

Rejected units are omitted from the current context and the decision is reapplied on later calls, since Pi only lets extensions transform per-call payloads. Each removal is also written as a durable, collapsed [jev removed] session entry that can be expanded, with a /removed popup showing reasons, and these records are not sent back to the model. It fails open on missing keys and API errors, always keeps system messages and the latest unit, protects summaries, and only runs above a token floor. Because units are judged once, per-turn cost stays small.

What the decision model decides

TypeQuestionAnswers
Yes / noShould this context unit be kept?keep · remove
ChoiceBest reason to keep—
ChoiceBest reason to remove—

How it works

  1. Group messages into tool-call units and fingerprint them.
  2. Send only new units to Jev with one noul and two choice questions.
  3. Omit removed units and reapply on later calls.
  4. Record removals as inspectable session entries.

Strengths

  • Each unit judged once, keeping cost low.
  • Inspectable removal records with reasons.
  • Fails open and protects system messages and summaries.

Caveats

  • Removed context is hidden from the model unless restored.
  • Requires a TypeSafe key.

Getting started

Install the extension into Pi and set your TypeSafe key.

At a glance

Type
Project
Status
beta
Language
TypeScript
Runtime
Pi extension
Has code
yes

Use cases and integrations

How curated lists describe it

Frequently asked questions

How often is a unit judged?

Once; decisions are reused by content fingerprint.

Can I see what was removed?

Yes, as collapsed [jev removed] entries and via /removed.

What if Jev fails?

Context passes through unchanged and new units are retried later.

Related projects

  • Codex plugin that builds handoff packets by asking Jev whether each old read-only tool record should stay, keeping retained text verbatim.

    ProjectbetaJavaScript
  • Agent plugin that asks Jev whether the session is at a safe boundary to /compact and can trigger it on Pi and Claude Code.

    PluginbetaTypeScript
  • Pi extension where Jev judges each completed tool call and result before compaction, keeping key evidence verbatim in the summary.

    PluginbetaTypeScript
  • Oh My Pi extension that truncates tool calls and results Jev scores as no longer needed, while keeping all user and assistant text verbatim.

    PluginbetaTypeScript
  • Pi extension that prunes stale tool calls with two Jev yes/no questions each, keeping text verbatim and leaving summaries to Pi.

    PluginbetaTypeScript
  • Pi port of fast-jev-compaction using Pi's context hook, with a savings gate against low-value pruning and retained status notes.

    PluginbetaTypeScript