@piotr-oles/pi-caveman

Pi Agent extension: respond in caveman mode — cut ~75% output tokens while keeping full technical accuracy

Packages

Package details

extension

Install @piotr-oles/pi-caveman from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@piotr-oles/pi-caveman
Package
@piotr-oles/pi-caveman
Version
0.1.0
Published
Jun 2, 2026
Downloads
not available
Author
piotr-oles
License
unknown
Types
extension
Size
8.2 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

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-caveman

Usage

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 variable

Default 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 check

To test changes manually, pass the source entry point directly to pi:

pi -e packages/pi-caveman/src/index.ts