Skip to content

fast-jev-compaction-pi

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

PluginbetaMIT

Overview

fast-jev-compaction-pi is a Jev-guided context compaction extension for the Pi coding agent, documented in Chinese. Before Pi compacts old session history, it asks Jev two noul questions for each completed tool call: whether knowing the call and its arguments is still needed, and whether the full verbatim result is still needed. Local deterministic rules then keep, truncate or drop each item, prioritising error results within a summary budget.

Unlike an ordinary summary, the tool evidence Jev keeps is not rewritten by the summary model but written verbatim into a Verbatim Tool Evidence section of Pi's compaction summary, which suits test failures, key command output, configuration and exact errors. The state sent to Jev excludes tool output bodies and is fitted through seven degradation stages; calls that fall out of the state are kept verbatim rather than judged blindly. It covers manual /compact, threshold auto-compaction and overflow retries, with unit and protocol tests and a benchmark script.

What the decision model decides

TypeQuestionAnswers
Yes / nokeepCall: is it still necessary to know this tool was called with these arguments?yes · no
Yes / nokeepResult: is the full verbatim tool result still needed?yes · no

How it works

  1. On session_before_compact, pair calls and results
  2. Build a fitted state without output bodies
  3. Ask Jev keepCall and keepResult per window
  4. Apply threshold rules; write kept evidence verbatim into the summary

Strengths

  • Exact tool evidence survives compaction
  • Unscored items kept rather than guessed
  • Covers all Pi compaction entry points

Caveats

  • Chinese documentation
  • Pi-specific

Getting started

git clone https://github.com/joslynSmall/fast-jev-compaction-pi.git, npm install, set TYPESAFE_API_KEY and load the extension in Pi.

At a glance

Type
Plugin
Status
beta
Language
TypeScript
Runtime
Pi extension
Has code
yes
Has tests
yes
License
MIT

Use cases and integrations

How curated lists describe it

  • This Pi extension asks Jev whether each completed tool call and its full result should be kept, then locally retains, truncates, or drops verbatim tool evidence in the compaction summary.

    logicrw/awesome-jev-projects

Frequently asked questions

What does Jev decide?

Whether each tool call and its full result are still needed.

Is kept evidence rewritten?

No, it is written verbatim into the compaction summary.

Does it change Pi's triggers?

No, timing still follows Pi's compaction settings.

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
  • Pi observational memory where Jev answers keep/kind questions on history chunks, building a verbatim ledger and topic files.

    ProjectbetaTypeScript
  • OMP extension keeping one endless chat as a summary tree, with five Jev judge gates for rules, prefetch, compression, tools and recall.

    PluginprototypeTypeScript
  • Claude Code plugin and npm library that replaces the compaction summary with Jev keep, truncate or drop scores for every tool call.

    PluginbetaTypeScript
  • Cursor CLI plugin that asks Jev keep-or-drop nouls for each tool call and result, then re-injects kept facts after compaction.

    CLIbetaTypeScript
  • DeepSeek Harness plugin that asks Jev which tool results can be pruned early, delaying or avoiding lossy compaction.

    ProjectbetaTypeScript