jevbooks

← All projects

pi-jev-compaction

nourhelmi/pi-jev-compaction

Automatic Jev context clearing for Pi, with original tool output retrieval.

What it is

A Pi extension that keeps the conversation but prunes stale tool output. It asks Jev which older tool results are no longer needed, replaces their model-facing bodies with markers, and exposes a jev_read tool to recover originals without rerunning commands.

How it uses Jev

At live model/tool boundaries, once usage reaches 45% of the context window, Jev scores up to 16 large older tool outputs using bounded conversation, argument, and result excerpts. Outputs with estimated keep probability below 0.25 are cleared; recent 12k tokens and protected categories are left alone.

Primitives:score

Technique worth stealing

Result-only projection: clear stale tool output from the model-facing context while retaining original session evidence and exposing bounded retrieval.

Try it

pi install git:github.com/nourhelmi/pi-jev-compaction, export TYPESAFE_API_KEY, then run pi.

View on GitHub

judged by Jevjev-1.13.0

Evidence

Each line is one question put to Jev about the README. ≥ 0.60 reads as yes, ≤ 0.40 as no; in between Jev is not making a call.

  • Jev-centricyes0.86
  • Shows a System One patternno0.33
  • Handles uncertaintyunclear0.41
  • Measuredno0.04
  • Runnableyes0.98
  • Worth recommendingno0.36
  • Model replicano0.03
  • Problem scopescore on a 0–2 scale1.07
  • About Jevyes0.98

Signals by Jev jev-1.13.0, card written by DeepSeek V4.1 Flash from the README on 22 Sept 2026.