99 Commits
Author SHA1 Message Date
Julius Brussee bce42f7294 docs(readme): fix install behavior claims v1.4.0 2026-04-11 12:27:39 +02:00
Julius Brussee 8783f63296 Require statusLine and fix PS5.1 parsing
Make the installer require a configured statusLine before treating hooks as already installed and ensure PowerShell 5.1 compatibility. hooks/install.ps1: stop using -AsHashtable, adjust hooks access, track presence of settings.statusLine and only skip installation when SessionStart, UserPromptSubmit and statusLine are present. hooks/install.sh: add HAS_STATUSLINE check and update the Node-based settings validation to require settings.statusLine. tests/test_hooks.py: add test_install_reconfigures_missing_statusline to verify installer adds a missing statusLine. tests/verify_repo.py: add a manifest path to the verification list and assert that -AsHashtable is not used in install.ps1 to preserve compatibility with Windows PowerShell 5.1.
2026-04-11 12:22:07 +02:00
Julius Brussee 7e2c94c541 Add Windows statusline & robust hook install
Add a PowerShell statusline script (hooks/caveman-statusline.ps1) and update activation/installer logic to support Windows and avoid clobbering custom statuslines. install.sh and install.ps1 now check for a full set of hook files and wired hook entries before short-circuiting, wire a managed statusline path, and prefer not to overwrite user statusLine settings. Uninstall scripts now remove the managed statusline only when it was installed. caveman-activate.js updated to detect existing statusLine entries and emit a platform-appropriate snippet. Add tests (tests/test_hooks.py) and a local verification runner (tests/verify_repo.py) to validate install/uninstall/activation flows and caveman-compress fixtures. Also update README and caveman-compress docs and stats (token savings ~45%→~46%) and clarify auto-activation and statusline behavior.
2026-04-11 12:14:46 +02:00
Julius Brussee 8fb2f013a9 Improve hooks safety, validation, and docs
Make several robustness and clarity fixes across scripts and docs:

- README: Clarify agent-specific behavior (Codex, Cursor/Windsurf) and note Codex uses $caveman and lacks some bundled plugins.
- caveman-compress: Avoid division-by-zero when computing token savings; skip unclosed markdown fences when extracting code blocks to prevent false positives.
- hooks (install/uninstall, PowerShell and shell): Pass settings and hooks paths via environment variables to avoid injection issues with special characters, quote generated command paths, use safer here-strings in PowerShell, and ensure settings.json is written via the resolved path. Also remove installer backup files during uninstall and add explanatory comments.

These changes improve security, correctness, and developer-facing documentation.
2026-04-11 11:59:05 +02:00
Julius Brussee e8015c384c Add CLAUDE.md (caveman README) and backup
Add a new caveman-styled README (CLAUDE.md) documenting project overview, file ownership, CI sync workflow, hook system, skill system, agent distribution, evals, and benchmarks. Also add CLAUDE.original.md as the original, more formal copy for reference/backup.
2026-04-11 11:56:02 +02:00
Julius Brussee b6a7a3f584 Add auto-activation rules and sync workflow
Enable automatic caveman mode activation across agents and keep skill copies in sync. Adds activation rule files (.clinerules, .codex/hooks.json, .cursor/rules/caveman.mdc, .windsurf/rules/caveman.md, .github/copilot-instructions.md, rules/caveman-activate.md), new command prompts (commands/caveman{,-commit,-review}.toml), and updates SKILL.md copies (skills/, caveman/, plugins/, .cursor/, .windsurf/) to add persistent behavior and tweak auto-clarity wording. Updates README with agent-specific auto-activation docs and expands compatibility table. Updates GitHub Actions workflow to sync SKILL.md, copy activation rules, rebuild caveman.skill, and commit any changes. Includes updated caveman.skill binary.
2026-04-11 11:48:34 +02:00
Julius Brussee 79fa46a4a0 Add windsurf skill, hooks, and install docs
Add .windsurf/skills/caveman SKILL.md and update the sync workflow to copy and commit the new file. Expand README install docs with agent-specific install instructions and standalone hook usage; update AGENTS.md and GEMINI.md to use the new caveman-compress path. Add Windows PowerShell installers (hooks/install.ps1 and hooks/uninstall.ps1) and enhance shell installers (hooks/install.sh, hooks/uninstall.sh) to support --force, plugin detection, clearer statusline wiring messages, and idempotent JSON merging/removal of hook entries. Provides uninstall guidance for other agents and improves overall install/uninstall robustness.
2026-04-11 11:30:34 +02:00
Julius Brussee cfd76590bd Add statusline badge, hooks, and compress fixes
Add statusline support and installer/uninstaller hooks, improve compression tooling and docs. Key changes:

- Add caveman statusline badge script (hooks/caveman-statusline.sh) and wire it into install/uninstall (hooks/install.sh, hooks/uninstall.sh); installer now requires node, backs up settings.json, and makes the statusline executable.
- Enhance SessionStart hook (hooks/caveman-activate.js) to detect missing statusline config and emit a setup nudge; update hooks README with statusline usage and setup instructions.
- Add gemini-extension.json, AGENTS.md, and GEMINI.md to register skills and support Gemini CLI installation.
- Update README to mention statusline badge, Gemini CLI install, and agent list.
- Improve caveman-compress: rename skill (caveman-compress), clarify CLI path/usage in SKILL.md, return on validation failure without overwriting, bump benchmark encoding, and make compressor robust to LLM outer fences by stripping wrapping fences and expanding max_tokens; add explicit rule to avoid wrapping entire output in fences.
- Strengthen code-block extraction in validate.py to handle variable-length fences (```/~~~), nested fences, and CommonMark rules.
- Minor SKILL.md tweak: resume caveman mode when user asks to clarify or repeats question.

These changes integrate a visible status badge for Claude Code users, improve install/uninstall reliability, extend Gemini support, and make the compressor/validator more robust when interacting with LLM outputs.
2026-04-11 11:15:03 +02:00
Julius Brussee 92f892f2b9 Update README.md v1.3.5 2026-04-09 21:25:34 +02:00
Julius Brussee bc351bb7c5 Merge branch 'main' of https://github.com/JuliusBrussee/caveman 2026-04-09 21:23:57 +02:00
Julius Brussee 558576cdcd Update README.md 2026-04-09 21:23:55 +02:00
Julius Brussee 1be0340955 Add plugin hooks and update docs
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).
2026-04-09 21:22:10 +02:00
Julius BrusseeandGitHub 782d17c24a Replace Blueprint with Cavekit in README
Updated project reference from Blueprint to Cavekit.
2026-04-09 21:16:06 +02:00
github-actions[bot] 18427c26ab chore: sync SKILL.md copies and caveman.skill [skip ci] 2026-04-09 19:14:52 +00:00
Julius Brussee 602d1639c6 Use UserPromptSubmit for caveman mode tracking
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.
2026-04-09 21:14:43 +02:00
Julius Brussee a9e62b48c3 Add mode-tracker hook and update install/docs
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.
2026-04-09 21:09:56 +02:00
Julius Brussee 4e919547fb Add Claude SessionStart hook installer and docs
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.
2026-04-09 20:53:28 +02:00
Jimmy CrakCrn a62d6602c3 feat: optional SessionStart hook + visible statusline badge pattern
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.
2026-04-09 07:37:18 -05:00
github-actions[bot] 26c25e39b3 chore: sync SKILL.md copies and caveman.skill [skip ci] v1.3.0 2026-04-08 23:23:26 +00:00
Julius Brussee 79ef2933ac Update README.md 2026-04-09 01:23:17 +02:00
Julius Brussee fecea29b1f Update README: restructure and add compress
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.
2026-04-09 01:22:31 +02:00
Julius Brussee 6f6772ab1b README: add Wenyan mode, skills, and evals
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.
2026-04-09 01:18:09 +02:00
Julius BrusseeandClaude Opus 4.6 e6df0d6055 Remove language-specific skills (caveman-cn, caveman-es, caveman-pt)
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>
2026-04-09 01:10:22 +02:00
Julius Brussee 42b3030c69 Merge PR #47: Add eval harness with three-arm methodology 2026-04-09 01:08:14 +02:00
Julius Brussee bd671cc907 Merge PR #41: Add caveman-pt skill (Portuguese) 2026-04-09 01:07:57 +02:00
Julius Brussee 4591fb5396 Merge PR #45: Add caveman-review skill 2026-04-09 01:07:52 +02:00
Julius Brussee e0c7501619 Merge PR #44: Add caveman-commit skill 2026-04-09 01:07:51 +02:00
Julius Brussee a5b624ca4f Merge PR #36: Add 文言文 (Classical Chinese) wenyan mode 2026-04-09 01:07:44 +02:00
Julius Brussee 3e8b60e570 Merge PR #30: Codex plugin Windows install and assets 2026-04-09 01:07:39 +02:00
Julius Brussee 7d6aa3ac65 Merge PR #38: Security patch, SDK support, and file size limit 2026-04-09 01:07:16 +02:00
Julius Brussee e1e5e8b13a Merge PR #39: Fix path regex and prevent backup file overwriting 2026-04-09 01:06:43 +02:00
Julius BrusseeandClaude Opus 4.6 8195e1a4a0 fix: PATH_REGEX must require path separator to avoid false positives
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>
2026-04-09 01:05:31 +02:00
Julius BrusseeandClaude Opus 4.6 a97af68741 fix: correct inverted sign in fmt_pct eval output
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>
2026-04-09 01:05:25 +02:00
Julius BrusseeandClaude Opus 4.6 f6ca007f49 Remove generated eval snapshot files from git tracking
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>
2026-04-09 01:00:06 +02:00
Julius BrusseeandClaude Opus 4.6 bf828cd0fa Remove duplicate caveman-pt/SKILL.md from root level
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>
2026-04-09 00:59:52 +02:00
sebastianbreguel 64c4e2113f Switch eval plot to real boxplot with per-prompt distribution 2026-04-08 18:44:27 -04:00
sebastianbreguel 6588ad1e26 Flip eval plot to vertical orientation 2026-04-08 18:36:03 -04:00
sebastianbreguel 784df686b4 Switch eval plot to dot+whiskers (median, IQR, min/max) 2026-04-08 18:32:06 -04:00
sebastianbreguel 7de87db9e6 Reframe eval plot as 'tokens saved' stacked bars 2026-04-08 18:28:58 -04:00
sebastianbreguel 1254e714e6 Switch eval plot to plotly, more intuitive horizontal layout 2026-04-08 18:26:08 -04:00
sebastianbreguel 6391a702b7 Add bar chart of skill compression with median/mean/range 2026-04-08 18:24:28 -04:00
sebastianbreguel 2b10489888 Add token-compression eval harness with three-arm methodology
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.
2026-04-08 18:20:09 -04:00
sebastianbreguel 001075b420 feat: add caveman-review skill for terse PR review comments 2026-04-08 16:19:31 -04:00
sebastianbreguel 03f3dcd723 feat: add caveman-commit skill for terse commit messages 2026-04-08 16:14:54 -04:00
Leonardo Colman LopesandClaude Opus 4.6 f3c710377c Add caveman-pt skill (Portuguese)
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>
2026-04-08 14:35:50 -03:00
Julius BrusseeandGitHub 9ee0e352c6 Merge pull request #37 from leoz32/feat/caveman-cn-skill
Add Chinese caveman skill (caveman-cn)
2026-04-08 11:36:39 +02:00
Julius BrusseeandGitHub d6fbf67db3 Merge pull request #35 from akshayjpatil/feature/bundle-compress-skill
Bundle caveman-compress as /caveman:compress sub-skill
2026-04-08 11:36:26 +02:00
Julius BrusseeandGitHub 1b15fc7170 Merge pull request #27 from mvanhorn/osc/8-spanish-caveman
Add Spanish caveman mode (caveman-es)
2026-04-08 11:36:21 +02:00
Julius BrusseeandGitHub dfcdbc0eee Merge pull request #26 from JoaoVasques/add-cursor-support
Add Cursor skill support with CI sync
2026-04-08 11:36:13 +02:00
Julius BrusseeandGitHub 7e8b5f36cf Merge pull request #24 from FezanMuhammadAli/patch-1
Correct copilot → github-copilot in install command
2026-04-08 11:36:09 +02:00