Skip to content

viartemev/caveman-pi-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Caveman for pi

License: MIT pi package Version

Ultra-compressed communication mode for pi: fewer tokens, same technical substance.

pi-caveman packages the original JuliusBrussee/caveman prompt/skills as a native pi package with persistent modes, slash commands, and bundled helper skills.

Why

Coding agents often spend tokens on polite filler. Caveman mode removes filler while preserving exact technical meaning.

Before: Sure! I'd be happy to help. The issue is likely caused by...
After: Bug in auth middleware. Token expiry check use `<` not `<=`. Fix:

Features

  • Persistent caveman response mode across turns
  • Intensity levels: lite, full, ultra
  • Slash commands for quick mode switching
  • Rock-themed help/status output (🪨), no persistent footer badge
  • Natural-language enable/disable phrases, including Russian terse triggers
  • Bundled skills:
    • terse commit messages
    • terse code review comments
    • markdown memory compression
  • Static /caveman-help command without model call
  • Default mode via env/config
  • Upstream sync script for original caveman assets

Install

From GitHub

pi install git:github.com/viartemev/caveman-pi-extension

Project-local install:

pi install -l git:github.com/viartemev/caveman-pi-extension

From local clone

git clone git@github.com:viartemev/caveman-pi-extension.git
pi install ./caveman-pi-extension

Try without installing:

pi -e ./caveman-pi-extension

Commands

Command Action
/caveman Enable default full mode
/caveman lite Tight but normal grammar
/caveman full Classic caveman: fragments, no filler
/caveman ultra Maximum terse technical shorthand
/caveman off Disable caveman mode
/caveman toggle Toggle between off and default/full
/caveman status Show rock-themed caveman status
/caveman-default <mode> Save default mode to ~/.config/caveman/config.json
/caveman-help Show rock-themed quick reference without model call
/caveman-commit [context] Generate terse Conventional Commit message
/caveman-review [context] Generate one-line actionable review comments
/caveman-compress <filepath> Compress markdown/memory file

Natural-language control also works:

stop caveman
normal mode
caveman off
caveman mode
use caveman
be brief
будь краток
без воды
короче

Config

Default mode resolution:

  1. CAVEMAN_DEFAULT_MODE
  2. ~/.config/caveman/config.json
  3. full

Example:

export CAVEMAN_DEFAULT_MODE=ultra
{ "defaultMode": "lite" }

Use off to keep commands installed but disable auto-activation.

Package layout

extensions/caveman.ts       # pi extension adapter + compact mode prompts
skills/caveman-commit       # terse commit skill
skills/caveman-review       # terse review skill
caveman-compress/SKILL.md   # memory compression skill
caveman-compress/scripts/   # compression helper scripts
scripts/sync-upstream.sh    # syncs upstream caveman assets
vendor/caveman              # upstream git submodule
package.json                # pi package manifest

How it works

The pi extension hooks into:

  • session_start — restores mode without footer status noise
  • input — handles enable/disable phrases
  • before_agent_start — injects compact active-mode rules every turn
  • registerCommand — registers slash commands

Skills are exposed by package.json manifest, not by extension runtime discovery.

Updating from upstream caveman

This repo tracks upstream as a git submodule:

vendor/caveman -> https://github.com/JuliusBrussee/caveman

Update bundled skills/scripts:

git submodule update --init --recursive
npm run update:upstream

This syncs pi-needed assets only:

  • skills/caveman*
  • caveman-compress/SKILL.md
  • caveman-compress/scripts/*

Only caveman-commit, caveman-review, and caveman-compress are loaded as pi skills by default. Base caveman/help prompts remain in repo for upstream sync/reference; extension handles them directly.

The pi adapter stays in extensions/caveman.ts.

License

MIT. See LICENSE.

Attribution

Caveman rules and skills originate from JuliusBrussee/caveman, MIT licensed.

About

Caveman mode for pi: ultra-compressed agent responses, terse commits, reviews, and memory compression.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors