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-caveman
Usage
Control via the --pi-caveman CLI flag (takes precedence) or the PI_CAVEMAN environment variable:
pi --pi-caveman full
pi --pi-caveman lite
pi --pi-caveman ultra
pi --pi-caveman off
PI_CAVEMAN=full pi
Default level when flag is not set: full.
Levels
| 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 check
To test changes manually, pass the source entry point directly to pi:
pi -e packages/pi-caveman/src/index.ts