mirror of
https://github.com/JuliusBrussee/caveman.git
synced 2026-08-11 13:21:09 +02:00
Merge PR #148: fix codex hook config shape
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
[features]
|
||||
codex_hooks = true
|
||||
+9
-2
@@ -2,8 +2,15 @@
|
||||
"hooks": {
|
||||
"SessionStart": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "echo 'CAVEMAN MODE ACTIVE. Rules: Drop articles/filler/pleasantries/hedging. Fragments OK. Short synonyms. Pattern: [thing] [action] [reason]. [next step]. Not: Sure! I would be happy to help you with that. Yes: Bug in auth middleware. Fix: Code/commits/security: write normal. User says stop caveman or normal mode to deactivate.'"
|
||||
"matcher": "startup|resume",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "echo 'CAVEMAN MODE ACTIVE. Rules: Drop articles/filler/pleasantries/hedging. Fragments OK. Short synonyms. Pattern: [thing] [action] [reason]. [next step]. Not: Sure! I would be happy to help you with that. Yes: Bug in auth middleware. Fix: Code/commits/security: write normal. User says stop caveman or normal mode to deactivate.'",
|
||||
"timeout": 5,
|
||||
"statusMessage": "Loading caveman mode"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ How caveman reaches each agent type:
|
||||
| Agent | Mechanism | Auto-activates? |
|
||||
|-------|-----------|----------------|
|
||||
| Claude Code | Plugin (hooks + skills) or standalone hooks | Yes — SessionStart hook injects rules |
|
||||
| Codex | Plugin in `plugins/caveman/` with `hooks.json` | Yes — SessionStart hook |
|
||||
| Codex | Plugin in `plugins/caveman/` plus repo `.codex/hooks.json` and `.codex/config.toml` | Yes on macOS/Linux — SessionStart hook |
|
||||
| Gemini CLI | Extension with `GEMINI.md` context file | Yes — context file loads every session |
|
||||
| Cursor | `.cursor/rules/caveman.mdc` with `alwaysApply: true` | Yes — always-on rule |
|
||||
| Windsurf | `.windsurf/rules/caveman.md` with `trigger: always_on` | Yes — always-on rule |
|
||||
@@ -196,4 +196,4 @@ To reproduce: `uv run python benchmarks/run.py` (needs `ANTHROPIC_API_KEY` in `.
|
||||
- README most important file for user-facing impact. Optimize for non-technical readers. Preserve caveman voice.
|
||||
- Benchmark and eval numbers must be real. Never fabricate or estimate.
|
||||
- CI workflow commits back to main after merge. Account for when checking branch state.
|
||||
- Hook files must silent-fail on all filesystem errors. Never let hook crash block session start.
|
||||
- Hook files must silent-fail on all filesystem errors. Never let hook crash block session start.
|
||||
|
||||
@@ -197,12 +197,19 @@ Uninstall: `bash hooks/uninstall.sh` or `powershell -File hooks\uninstall.ps1`
|
||||
|
||||
**macOS / Linux:**
|
||||
1. Clone repo → Open Codex in the repo directory → `/plugins` → Search "Caveman" → Install
|
||||
2. Repo-local auto-start is already wired by `.codex/hooks.json` + `.codex/config.toml`
|
||||
|
||||
**Windows:**
|
||||
1. Enable symlinks first: `git config --global core.symlinks true` (requires Developer Mode or admin)
|
||||
2. Clone repo → Open VS Code → Codex Settings → Plugins → find "Caveman" under local marketplace → Install → Reload Window
|
||||
3. Codex hooks are currently disabled on Windows, so use `$caveman` to start manually
|
||||
|
||||
This repo also ships `.codex/hooks.json`, so caveman auto-activates while you run Codex inside this repo. The installed plugin gives you `$caveman`; if you want always-on behavior in other repos too, add the same SessionStart hook there.
|
||||
This repo also ships `.codex/hooks.json` and enables hooks in `.codex/config.toml`, so caveman auto-activates while you run Codex inside this repo on macOS/Linux. The installed plugin gives you `$caveman`; if you want always-on behavior in other repos too, copy the same `SessionStart` hook there and enable:
|
||||
|
||||
```toml
|
||||
[features]
|
||||
codex_hooks = true
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user