@piotr-oles/pi-caveman
v0.1.0
Published
Pi Agent extension: respond in caveman mode — cut ~75% output tokens while keeping full technical accuracy
Downloads
313
Readme
pi-caveman
A pi coding agent extension that makes the agent respond in caveman mode — cutting ~75% of output tokens while keeping full technical accuracy.
Inspired by JuliusBrussee/caveman.
Install
pi install npm:@piotr-oles/pi-cavemanUsage
Control via the --pi-caveman CLI flag (takes precedence) or the PI_CAVEMAN environment variable:
pi --pi-caveman full # default: drop articles, fragments ok
pi --pi-caveman lite # drop filler, keep grammar (professional)
pi --pi-caveman ultra # maximum compression, telegraphic
pi --pi-caveman off # disable
PI_CAVEMAN=full pi # same, via env variableDefault level when flag is not set: full.
Levels
| Level | Behavior | Example |
|-------|----------|---------|
| lite | Keep grammar. Drop filler and pleasantries. | "Add the dependency." |
| full | Drop articles, filler, pleasantries. Fragments ok. | "New object ref each render. Wrap in useMemo." |
| ultra | Maximum compression. Symbols over words. | "Inline obj prop → new ref → re-render. useMemo." |
How it works
Injects the level's instruction file into the system prompt at session start. Instructions are imperative directives telling the agent exactly how to respond. Level is immutable for the entire session.
Code blocks, error messages, and technical terms are always written normally regardless of level.
This extension is very lite on context - adds only a few lines of text to the system prompt.
Development
pnpm install
pnpm test
pnpm typecheck
pnpm checkTo test changes manually, pass the source entry point directly to pi:
pi -e packages/pi-caveman/src/index.ts