oh-my-customcode 1.1.92 → 1.1.94

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -249,7 +249,7 @@ oh-my-customcode ships 42 lifecycle hook scripts covering security, drift detect
249
249
 
250
250
  Most hooks are advisory (exit 0) — they warn but never block. A small number of hard-block hooks (e.g. `stage-blocker`, `rule-deletion-guard`) reject the tool call outright (exit 2). oh-my-customcode's own governance rules (`.claude/rules/`) follow an **advisory-first enforcement model**: prompt-based guidance is the default, and a rule is only promoted to a blocking hook after repeated, observed violations. Rules also retire — clauses tied to since-fixed platform bugs or that go unused for two minor releases are wrapped in HTML comments (still readable via the source file, invisible to the agent's context) rather than left to accumulate indefinitely.
251
251
 
252
- The hook source of truth is `.claude/hooks/hooks.json`; `omcustom init` compiles it into the `hooks` block of `.claude/settings.json` (via `src/core/hooks-settings.ts`), which is the file Claude Code actually loads. Hook commands are anchored as `bash "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/<path>"`, so hooks keep working when the session's working directory moves to a subdirectory. Contributors: do not hand-edit the `hooks` blocks in settings; edit `hooks.json` and run `bun run sync:hooks` (also run at the end of `bun run build`) to regenerate them. Existing installs need no manual step: `omcustom update` (full or hooks component) and `omcustom init --backup` automatically migrate old relative hook commands in `.claude/settings.local.json`, and custom hooks are left untouched.
252
+ The hook source of truth is `.claude/hooks/hooks.json`; `omcustom init` merges it into the `hooks` block of `.claude/settings.local.json` (via `src/core/hooks-settings.ts`), one of the settings files Claude Code actually loads. This repository's own tracked `.claude/settings.json` (and its `templates/` mirror) is produced separately by the `sync:hooks` generator. Hook commands are anchored as `bash "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/<path>"`, so hooks keep working when the session's working directory moves to a subdirectory. Contributors: do not hand-edit the `hooks` blocks in settings; edit `hooks.json` and run `bun run sync:hooks` (also run at the end of `bun run build`) to regenerate them. Existing installs need no manual step: `omcustom update` (full or hooks component) and `omcustom init --backup` automatically migrate old relative hook commands in `.claude/settings.local.json`, and custom hooks are left untouched. Re-running `omcustom init` against an existing `.claude/settings.local.json` merges the hooks instead of replacing them: omcustom-owned hook groups are refreshed, while your own hook groups, user-only hook events, and all other settings keys are preserved (a leading BOM is kept; `init` always rewrites the file with 2-space indentation, LF line endings and a trailing newline, while the `--backup` restore path keeps the user file's own trailing-newline convention). If the existing file cannot be parsed as a JSON object, it is left byte-identical and `init` prints a warning that the hooks were not installed.
253
253
 
254
254
  ---
255
255