feat: make default caveman mode configurable#86
Closed
mcalhoun wants to merge 1 commit intoJuliusBrussee:mainfrom
Closed
feat: make default caveman mode configurable#86mcalhoun wants to merge 1 commit intoJuliusBrussee:mainfrom
mcalhoun wants to merge 1 commit intoJuliusBrussee:mainfrom
Conversation
Add caveman-config.js with XDG-compliant config resolution. Default mode resolves via: CAVEMAN_DEFAULT_MODE env var > $XDG_CONFIG_HOME/caveman/config.json > 'full'.
hansenc
added a commit
to hansenc/caveman
that referenced
this pull request
Apr 11, 2026
Extends JuliusBrussee#86 with a single new defaultMode value. When resolved to 'off' via env var or config file, the SessionStart hook early-exits without emitting the rules block and cleans up any stale ~/.claude/.caveman-active flag file (symlink-safe via lstat/isFile). Slash commands stay available. The mode tracker never persists 'off' to the flag file; '/caveman full' (or bare '/caveman') during an off session enables full mode as a mid-session override. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
10 tasks
|
@JuliusBrussee please take a look, its painful to build workarounds locally for this |
Author
|
@JuliusBrussee Thanks for merging this feature. One small note: I noticed the change was cherry-picked onto another branch without attribution to my original contribution. I’ve been contributing to open source for more than 30 years, so I’m not raising this because I need personal credit. But attribution matters, and when it gets dropped, it can discourage people from contributing. I’m sure there was no bad intent here, but I’d appreciate it if attribution were preserved going forward. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hooks/caveman-config.js— shared config resolver with XDG-compliant path resolution across all platforms'full'default fromcaveman-activate.jsandcaveman-mode-tracker.js, replaced withgetDefaultMode()callinstall.shto include the new config moduleConfig resolution order
CAVEMAN_DEFAULT_MODEenvironment variable (highest priority)defaultModefield at:$XDG_CONFIG_HOME/caveman/config.json(any platform, ifXDG_CONFIG_HOMEis set)~/.config/caveman/config.json(macOS / Linux fallback)%APPDATA%\caveman\config.json(Windows fallback)'full'(unchanged default)Example config
{ "defaultMode": "ultra" }Or per-harness via environment variable:
Test plan
Manual smoke tests — all passing:
Test 1: No config (default behavior)
Test 2: Environment variable override
Test 3: XDG config file override
Validation
full(backward compatible)CAVEMAN_DEFAULT_MODEenv var respecteddefaultModerespected