Register SessionStart and UserPromptSubmit hooks in .claude-plugin/plugin.json to auto-load caveman rules and track active mode (writes to ~/.claude/.caveman-active). Update README and hooks/README.md to reflect automatic activation when installed as a plugin, remove the one-line install snippet, clarify the optional statusline badge, and adjust uninstall instructions (replace PostToolUse with UserPromptSubmit and note disabling the plugin deactivates hooks).
Switch caveman mode tracking from PostToolUse to UserPromptSubmit: update README to document the new hook, adjust caveman-mode-tracker.js to read the incoming `prompt` field (removing `user_prompt`), and modify install.sh to register the UserPromptSubmit hook with timeouts and status messages (and add a timeout/status for the activate hook). This ensures mode detection runs on every user prompt and prevents hook stalls by setting command timeouts and status text. Files changed: hooks/README.md, hooks/caveman-mode-tracker.js, hooks/install.sh.
Add a new caveman-mode-tracker.js hook to track active /caveman modes and write them to ~/.claude/.caveman-active (supports full/lite/ultra/wenyan/commit/review/compress and detects deactivation). Update caveman-activate.js to write 'full' to the flag file on SessionStart. Enhance hooks/install.sh to install both hooks and idempotently wire SessionStart and UserPromptSubmit hooks into ~/.claude/settings.json. Revise hooks/README.md and top-level README.md to document the two hooks, improved statusline badge snippet (shows [CAVEMAN] or [CAVEMAN:MODE]), and how the flag file bridges hooks and the statusline. Minor SKILL.md whitespace/newline cleanups.
Replace the long README hook section with a concise "Auto-Load Hook (Claude Code only)" install hint and link to new docs. Add hooks/README.md documenting the optional SessionStart hook, statusline badge, and quick install. Add hooks/install.sh: a one-command installer that copies or downloads caveman-activate.js into ~/.claude/hooks, idempotently wires a SessionStart entry into ~/.claude/settings.json (using node), and prints usage/uninstall notes. Restart Claude Code to activate the hook.
Adds hooks/caveman-activate.js — an optional Claude Code SessionStart
hook users can wire up via ~/.claude/settings.json to auto-load the
caveman ruleset at session start. The hook also writes a flag file
at ~/.claude/.caveman-active that a statusline script can read to
render a persistent [CAVEMAN] badge.
Why: SessionStart hook stdout is injected as hidden system-reminder
context — useful for Claude, invisible to users in the terminal. This
means users have no way to confirm the hook fired. The flag file is
a minimal bridge between 'the hook ran' and 'the statusline can
prove it', giving users persistent visual confirmation that caveman
mode is loaded.
This is a pure addition:
- New file: hooks/caveman-activate.js (~30 lines, no dependencies
beyond Node.js stdlib)
- README section 'Optional: SessionStart Hook + Visible Mode Badge'
documents both the hook install and the statusline snippet
- Marked Claude Code-only since it relies on Claude Code's hooks
and statusline mechanisms — Cursor/Codex/other users can ignore
- No existing files changed except README
If you don't wire up the hook, nothing changes. Skill install works
exactly as before.
Rework README layout and copy: reorder navbar links, rename sections (Levels, 文言文), simplify intensity triggers, and tighten many examples/phrasing. Add caveman-compress docs and compression benchmarks (file-savings table), move/reinsert API benchmark table, and replace long "Why/How" prose with concise benefits and visuals. Misc fixes: Wenyan wording, CLAUDE.md compress examples, and various formatting cleanup for clarity and token-efficiency.
Expand README with new features and docs: add TOC links for Skills and Evals, update intro to mention Wenyan mode/terse commits/reviews and compression tool, and consolidate Windows Codex install/symlink notes into a short note. Add a new Wenyan (文言文) section with levels and example, introduce Caveman Skills (caveman-commit and caveman-review) with usage examples and severity prefixes, and add an Evals section describing the eval harness and commands. Minor wording/ordering tweaks to installation text.
Separate language translations are unnecessary — Claude already responds
in the user's language. These added maintenance surface without real value.
Wenyan mode is kept as it's a genuinely different compression technique
built into the core skill.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Making the prefix optional matched every English word as a path.
Now requires either a path prefix (./ ../ / drive:) or contains / or \.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Positive savings (skill reduces tokens) should display as "+" not "−".
The sign logic was backwards, making all eval results misleading.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
These are build artifacts (HTML report and PNG plot) that should not be
version-controlled. Added evals/snapshots/*.html and *.png patterns to
.gitignore.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Portuguese caveman skill was duplicated at both caveman-pt/SKILL.md (root)
and skills/caveman-pt/SKILL.md. Remove the root-level copy since skills belong
under the skills/ directory.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Closes#18 by replacing the unverified "~75% savings" claim with a real,
auditable measurement.
Methodology:
- Three arms per prompt: baseline (no system prompt), terse control
("Answer concisely."), and terse+SKILL.md. The honest delta is
skill vs terse — this isolates the skill's contribution from the
generic "be terse" effect.
- Real LLM in the loop via `claude -p --system-prompt`. No hand-written
baselines, no circularity.
- Snapshot of LLM outputs committed to git as the source of truth.
measure.py runs in CI with no network and no auth.
- Reports median, mean, min, max, stdev across prompts so noise is visible.
- Metadata pinned in the snapshot: model, CLI version, generation timestamp.
Initial run on claude-opus-4-6 (n=10 prompts) shows the real numbers
sit in the −22% to −49% mean range, not the previously claimed ~75%.
The README's headline number should be updated to match.
Add Portuguese localization of the caveman skill, following the same
structure as caveman-es and caveman-cn.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix PATH_REGEX in validate.py: The regex was incorrectly matching
relative paths like 'src/file.js' as 'rc/' instead of the full path.
Changed to use non-capturing group with optional prefix.
- Add safety check in compress.py: Prevent silent overwriting of
existing .original.md backup files. Now aborts with a warning
instead of overwriting potentially important backup content.
- Add proper module initialization in __init__.py: Previously empty,
now includes __all__ exports and __version__ for proper imports.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Update caveman-compress/SKILL.md name to 'compress' and trigger to '/caveman:compress'
- Create symlinks from compress/ (Claude Code) and plugins/caveman/skills/compress/ (Codex/npx) to caveman-compress/
- Single source of truth: caveman-compress/ holds all scripts and SKILL.md
- Update README to reflect compress as built-in skill
Fixes#33