oh-my-customcode 1.1.51 → 1.1.53

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.
@@ -0,0 +1,650 @@
1
+ {
2
+ "permissions": {
3
+ "defaultMode": "default"
4
+ },
5
+ "hooks": {
6
+ "PreToolUse": [
7
+ {
8
+ "hooks": [
9
+ {
10
+ "type": "command",
11
+ "command": "bash .claude/hooks/scripts/stage-blocker.sh"
12
+ }
13
+ ],
14
+ "matcher": "Write|Edit",
15
+ "description": "Block Write/Edit tools during plan/verify/compound stages — only allow in implement stage"
16
+ },
17
+ {
18
+ "hooks": [
19
+ {
20
+ "type": "command",
21
+ "command": "input=$(cat)\nif printf '%s' \"$input\" | jq -e '((.tool_input.command // \"\") | test(\"(npm run dev|pnpm( run)? dev|yarn dev|bun run dev)\"))' >/dev/null 2>&1; then\n printf '%s' \"$input\" | (\n#!/bin/bash\ninput=$(cat)\ncmd=$(echo \"$input\" | jq -r '.tool_input.command // \"\"')\n\n# Block dev servers that aren't run in tmux\necho '[Hook] BLOCKED: Dev server must run in tmux for log access' >&2\necho '[Hook] Use this command instead:' >&2\necho \"[Hook] tmux new-session -d -s dev 'npm run dev'\" >&2\necho '[Hook] Then: tmux attach -t dev' >&2\nexit 1\n )\nelse\n printf '%s' \"$input\"\nfi"
22
+ }
23
+ ],
24
+ "matcher": "Bash",
25
+ "description": "Block dev servers outside tmux - ensures you can access logs"
26
+ },
27
+ {
28
+ "hooks": [
29
+ {
30
+ "type": "command",
31
+ "command": "input=$(cat)\nif printf '%s' \"$input\" | jq -e '((.tool_input.command // \"\") | test(\"(npm (install|test)|pnpm (install|test)|yarn (install|test)|bun (install|test)|cargo build|make|docker|pytest|vitest|playwright)\"))' >/dev/null 2>&1; then\n printf '%s' \"$input\" | (\n#!/bin/bash\ninput=$(cat)\nif [ -z \"$TMUX\" ]; then\n echo '[Hook] Consider running in tmux for session persistence' >&2\n echo '[Hook] tmux new -s dev | tmux attach -t dev' >&2\nfi\necho \"$input\"\n )\nelse\n printf '%s' \"$input\"\nfi"
32
+ }
33
+ ],
34
+ "matcher": "Bash",
35
+ "description": "Reminder to use tmux for long-running commands"
36
+ },
37
+ {
38
+ "hooks": [
39
+ {
40
+ "type": "command",
41
+ "command": "input=$(cat)\nif printf '%s' \"$input\" | jq -e '((.tool_input.command // \"\") | test(\"git push\"))' >/dev/null 2>&1; then\n printf '%s' \"$input\" | (\n#!/bin/bash\necho '[Hook] Review changes before push...' >&2\nif [ -t 0 ]; then echo '[Hook] Press Enter to continue or Ctrl+C to abort...' >&2; read -r; else echo '[Hook] Non-interactive mode, proceeding...' >&2; fi\n )\nelse\n printf '%s' \"$input\"\nfi"
42
+ }
43
+ ],
44
+ "matcher": "Bash",
45
+ "description": "Pause before git push to review changes"
46
+ },
47
+ {
48
+ "hooks": [
49
+ {
50
+ "type": "command",
51
+ "command": "#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [[ \"$file_path\" =~ \\.(md|txt)$ ]] && [[ ! \"$file_path\" =~ (README|CLAUDE|AGENT|SKILL)\\.md$ ]]; then\n echo \"[Hook] BLOCKED: Unnecessary documentation file creation\" >&2\n echo \"[Hook] File: $file_path\" >&2\n echo \"[Hook] Use README.md or AGENT.md for documentation instead\" >&2\n exit 1\nfi\n\necho \"$input\""
52
+ }
53
+ ],
54
+ "matcher": "Write",
55
+ "description": "Block creation of random .md files - keeps docs consolidated"
56
+ },
57
+ {
58
+ "hooks": [
59
+ {
60
+ "type": "command",
61
+ "command": "#!/bin/bash\nCOUNTER_FILE=\"/tmp/claude-tool-count-$PPID\"\nTHRESHOLD=${COMPACT_THRESHOLD:-50}\nif [ -f \"$COUNTER_FILE\" ]; then COUNT=$(cat \"$COUNTER_FILE\"); COUNT=$((COUNT + 1)); else COUNT=1; fi\necho \"$COUNT\" > \"$COUNTER_FILE\"\nif [ \"$COUNT\" -eq \"$THRESHOLD\" ]; then echo '[StrategicCompact] Reached '$THRESHOLD' tool calls' >&2; echo '[StrategicCompact] Consider /compact if at a logical breakpoint' >&2; fi\nif [ \"$COUNT\" -gt \"$THRESHOLD\" ] && [ $(((COUNT - THRESHOLD) % 25)) -eq 0 ]; then echo \"[StrategicCompact] $COUNT tool calls - /compact reminder\" >&2; fi\ncat"
62
+ }
63
+ ],
64
+ "matcher": "Edit|Write",
65
+ "description": "Suggest manual compaction at logical intervals"
66
+ },
67
+ {
68
+ "hooks": [
69
+ {
70
+ "type": "command",
71
+ "command": "bash .claude/hooks/scripts/content-hash-validator.sh"
72
+ }
73
+ ],
74
+ "matcher": "Edit",
75
+ "description": "Validate file content hash before Edit — advisory staleness warning"
76
+ },
77
+ {
78
+ "hooks": [
79
+ {
80
+ "type": "command",
81
+ "command": "bash .claude/hooks/scripts/schema-validator.sh"
82
+ }
83
+ ],
84
+ "matcher": "Write|Edit|Bash",
85
+ "description": "Schema-based tool input validation — Phase 1 advisory only"
86
+ },
87
+ {
88
+ "hooks": [
89
+ {
90
+ "type": "command",
91
+ "command": "bash .claude/hooks/scripts/rtk-intercept.sh"
92
+ }
93
+ ],
94
+ "matcher": "Bash",
95
+ "description": "RTK auto-intercept — transparently rewrites CLI commands through RTK proxy when available (R013 advisory)"
96
+ },
97
+ {
98
+ "hooks": [
99
+ {
100
+ "type": "command",
101
+ "command": "bash .claude/hooks/scripts/destructive-git-guard.sh"
102
+ }
103
+ ],
104
+ "matcher": "Bash",
105
+ "description": "Warn before destructive git commands — advisory recovery guidance (R001/R021)"
106
+ },
107
+ {
108
+ "hooks": [
109
+ {
110
+ "type": "command",
111
+ "command": "bash .claude/hooks/scripts/rule-deletion-guard.sh"
112
+ }
113
+ ],
114
+ "matcher": "Bash",
115
+ "description": "Block rule file deletion — requires individual user confirmation per rule (R001 safety)"
116
+ },
117
+ {
118
+ "hooks": [
119
+ {
120
+ "type": "command",
121
+ "command": "#!/bin/bash\ninput=$(cat)\nagent_type=$(echo \"$input\" | jq -r '.tool_input.subagent_type // \"unknown\"')\nmodel=$(echo \"$input\" | jq -r '.tool_input.model // \"inherit\"')\ndesc=$(echo \"$input\" | jq -r '.tool_input.description // \"\"' | head -c 40)\nresume=$(echo \"$input\" | jq -r '.tool_input.resume // empty')\nif [ -n \"$resume\" ]; then\n echo \"─── [Resume] ${agent_type}:${model} | ${desc} ───\" >&2\nelse\n echo \"─── [Spawn] ${agent_type}:${model} | ${desc} ───\" >&2\nfi\necho \"$input\""
122
+ },
123
+ {
124
+ "type": "command",
125
+ "command": "bash .claude/hooks/scripts/git-delegation-guard.sh"
126
+ },
127
+ {
128
+ "type": "command",
129
+ "command": "bash .claude/hooks/scripts/agent-teams-advisor.sh"
130
+ },
131
+ {
132
+ "type": "command",
133
+ "command": "bash .claude/hooks/scripts/model-escalation-advisor.sh"
134
+ }
135
+ ],
136
+ "matcher": "Task|Agent",
137
+ "description": "HUD statusline + R010 git delegation guard + R018 Agent Teams advisor on Agent/Task spawn"
138
+ }
139
+ ],
140
+ "SessionStart": [
141
+ {
142
+ "hooks": [
143
+ {
144
+ "type": "command",
145
+ "command": ".claude/hooks/scripts/omcustom-auto-update.sh"
146
+ }
147
+ ],
148
+ "matcher": "*",
149
+ "description": "Interactive oh-my-customcode update check at session start (#752)"
150
+ },
151
+ {
152
+ "hooks": [
153
+ {
154
+ "type": "command",
155
+ "command": "bash .claude/hooks/scripts/session-env-check.sh"
156
+ }
157
+ ],
158
+ "matcher": "*",
159
+ "description": "Check codex CLI and Agent Teams availability at session start"
160
+ },
161
+ {
162
+ "hooks": [
163
+ {
164
+ "type": "command",
165
+ "command": "bash .claude/hooks/scripts/stale-todo-scanner.sh"
166
+ }
167
+ ],
168
+ "matcher": "*",
169
+ "description": "Scan TODO.md files for stale items at session start"
170
+ },
171
+ {
172
+ "hooks": [
173
+ {
174
+ "type": "command",
175
+ "command": "bash .claude/hooks/scripts/adaptive-harness-scan.sh"
176
+ }
177
+ ],
178
+ "matcher": "*",
179
+ "description": "Lightweight project profile staleness check for adaptive harness (#831)"
180
+ },
181
+ {
182
+ "hooks": [
183
+ {
184
+ "type": "command",
185
+ "command": "bash .claude/hooks/scripts/session-autofix.sh"
186
+ }
187
+ ],
188
+ "matcher": "*",
189
+ "description": "Auto-detect and fix previous session issues at start (#838)"
190
+ },
191
+ {
192
+ "hooks": [
193
+ {
194
+ "type": "command",
195
+ "command": "bash .claude/hooks/scripts/plugin-cache-check.sh"
196
+ }
197
+ ],
198
+ "matcher": "*",
199
+ "description": "Advisory check for plugin cache directories missing node_modules (#1207)"
200
+ },
201
+ {
202
+ "hooks": [
203
+ {
204
+ "type": "command",
205
+ "command": "bash .claude/hooks/scripts/claude-md-reinject.sh"
206
+ }
207
+ ],
208
+ "matcher": "*",
209
+ "description": "Re-inject project CLAUDE.md into model context on session start/resume/clear and compact re-entry — matcher \"*\" covers all SessionStart sources including \"compact\" (#1617)"
210
+ }
211
+ ],
212
+ "UserPromptSubmit": [
213
+ {
214
+ "hooks": [
215
+ {
216
+ "type": "command",
217
+ "command": "bash .claude/hooks/scripts/user-prompt-preprocessor.sh"
218
+ }
219
+ ],
220
+ "matcher": "*",
221
+ "description": "Advisory pre-processing of user input — skill matching hints and intent analysis"
222
+ },
223
+ {
224
+ "hooks": [
225
+ {
226
+ "type": "command",
227
+ "command": "bash .claude/hooks/scripts/r007-r008-drift-advisor.sh"
228
+ }
229
+ ],
230
+ "matcher": "*",
231
+ "description": "Proactive R007/R008 drift advisory — checks last assistant turn for identification omission (#1229)"
232
+ },
233
+ {
234
+ "hooks": [
235
+ {
236
+ "type": "command",
237
+ "command": "bash .claude/hooks/scripts/session-autofix-prompt.sh"
238
+ }
239
+ ],
240
+ "matcher": "*",
241
+ "description": "Inject session auto-fix findings into first user prompt (#838)"
242
+ },
243
+ {
244
+ "hooks": [
245
+ {
246
+ "type": "command",
247
+ "command": "bash .claude/hooks/scripts/fail-axis-cause-advisor.sh"
248
+ }
249
+ ],
250
+ "matcher": "*",
251
+ "description": "Advisory on cause-free progress nudges when this session has logged tool failures — delivers via hookSpecificOutput.additionalContext (#1561)"
252
+ }
253
+ ],
254
+ "SubagentStart": [
255
+ {
256
+ "hooks": [
257
+ {
258
+ "type": "command",
259
+ "command": "#!/bin/bash\ninput=$(cat)\nagent_type=$(echo \"$input\" | jq -r '.agent_type // \"unknown\"')\nmodel=$(echo \"$input\" | jq -r '.model // \"inherit\"')\ndesc=$(echo \"$input\" | jq -r '.description // \"\"' | head -c 40)\necho \"─── [SubagentStart] ${agent_type}:${model} | ${desc} ───\" >&2\necho \"$input\""
260
+ },
261
+ {
262
+ "type": "command",
263
+ "command": "bash .claude/hooks/scripts/agent-start-recorder.sh"
264
+ }
265
+ ],
266
+ "matcher": "*",
267
+ "description": "HUD display + agent start time recording for stall detection (R009)"
268
+ }
269
+ ],
270
+ "SubagentStop": [
271
+ {
272
+ "hooks": [
273
+ {
274
+ "type": "command",
275
+ "command": "bash .claude/hooks/scripts/task-outcome-recorder.sh"
276
+ },
277
+ {
278
+ "type": "command",
279
+ "command": "bash .claude/hooks/scripts/stall-detection-advisor.sh"
280
+ },
281
+ {
282
+ "type": "command",
283
+ "command": "bash .claude/hooks/scripts/auto-continue-guard.sh"
284
+ },
285
+ {
286
+ "type": "command",
287
+ "command": "bash .claude/hooks/scripts/r007-r008-drift-advisor.sh"
288
+ },
289
+ {
290
+ "type": "prompt",
291
+ "prompt": "A background subagent just completed. If it FAILED, do NOT auto-continue — report the failure and wait for user input."
292
+ }
293
+ ],
294
+ "matcher": "*",
295
+ "description": "Record agent outcomes + auto-continue workflow + R007/R008 drift advisory on subagent completion (autonomous-loop re-entry, #1545)"
296
+ }
297
+ ],
298
+ "CwdChanged": [
299
+ {
300
+ "hooks": [
301
+ {
302
+ "type": "command",
303
+ "command": "bash .claude/hooks/scripts/cwd-change-detector.sh"
304
+ }
305
+ ],
306
+ "matcher": "*",
307
+ "description": "Auto-detect project type on working directory change (v2.1.83+)"
308
+ }
309
+ ],
310
+ "FileChanged": [
311
+ {
312
+ "hooks": [
313
+ {
314
+ "type": "command",
315
+ "command": "bash .claude/hooks/scripts/file-change-validator.sh"
316
+ }
317
+ ],
318
+ "matcher": "*",
319
+ "description": "Validate externally modified files — advisory staleness warning (v2.1.83+)"
320
+ }
321
+ ],
322
+ "Notification": [
323
+ {
324
+ "hooks": [
325
+ {
326
+ "type": "command",
327
+ "command": "#!/bin/bash\ninput=$(cat)\nmsg=$(echo \"$input\" | jq -r '.message // \"\"' 2>/dev/null)\nif [ -n \"$msg\" ]; then\n echo \"[Hook] Notification: $msg\" >&2\nfi\necho \"$input\""
328
+ }
329
+ ],
330
+ "matcher": "*",
331
+ "description": "Display notifications for long-running operation completions"
332
+ }
333
+ ],
334
+ "TeammateIdle": [
335
+ {
336
+ "hooks": [
337
+ {
338
+ "type": "command",
339
+ "command": "#!/bin/bash\ninput=$(cat)\nteammate=$(echo \"$input\" | jq -r '.teammate_id // \"unknown\"' 2>/dev/null)\necho \"[Hook] TeammateIdle: $teammate — available for reassignment\" >&2\necho \"$input\""
340
+ }
341
+ ],
342
+ "matcher": "*",
343
+ "description": "Track idle Agent Teams members for work reassignment"
344
+ }
345
+ ],
346
+ "TaskCreated": [
347
+ {
348
+ "hooks": [
349
+ {
350
+ "type": "command",
351
+ "command": "#!/bin/bash\ninput=$(cat)\ntask_id=$(echo \"$input\" | jq -r '.task_id // \"\"' 2>/dev/null)\ndesc=$(echo \"$input\" | jq -r '.description // \"\"' 2>/dev/null | head -c 60)\necho \"[Hook] TaskCreated: $task_id — $desc\" >&2\necho \"$input\""
352
+ }
353
+ ],
354
+ "matcher": "*",
355
+ "description": "Log task creation events for Agent Teams coordination"
356
+ }
357
+ ],
358
+ "TaskCompleted": [
359
+ {
360
+ "hooks": [
361
+ {
362
+ "type": "command",
363
+ "command": "#!/bin/bash\ninput=$(cat)\ntask_id=$(echo \"$input\" | jq -r '.task_id // \"\"' 2>/dev/null)\nresult=$(echo \"$input\" | jq -r '.result // \"\"' 2>/dev/null | head -c 60)\necho \"[Hook] TaskCompleted: $task_id — $result\" >&2\necho \"$input\""
364
+ }
365
+ ],
366
+ "matcher": "*",
367
+ "description": "Log task completion events for Agent Teams coordination"
368
+ }
369
+ ],
370
+ "PreCompact": [
371
+ {
372
+ "hooks": [
373
+ {
374
+ "type": "command",
375
+ "command": "bash .claude/hooks/scripts/task-state-precompact.sh"
376
+ }
377
+ ],
378
+ "matcher": "*",
379
+ "description": "Serialize active task state before compaction — pairs with PostCompact restore (#922)"
380
+ }
381
+ ],
382
+ "PostCompact": [
383
+ {
384
+ "hooks": [
385
+ {
386
+ "type": "prompt",
387
+ "prompt": "Context compacted. RULES ACTIVE.\n\nR007: next response MUST start with ┌─ Agent: claude (default) / └─ Task: {task}\nR008: before EVERY tool call → [claude][model] → Tool: Name / Target: path\nR010: write→delegate to subagent; orchestrator read-only (Read/Glob/Grep); git→mgr-gitnerd\nR009: 2+ independent tasks → parallel agents, same message\nR018: 3+ agents OR review cycle → Agent Teams\nR000: user communication in Korean (한국어); code/files in English — NON-NEGOTIABLE\nR001: prohibited actions (no secrets, no system files, no rm -rf); stop on violation → preserve state → report → wait\nR002: tool tiers (Read/Grep=free, Write/Edit=notify, Bash=approval); no writes outside project; no .env/.git/config\n\nAutonomous mode: if /tmp/.claude-autonomous-$PPID exists → simple git (add/commit/push) may run directly; Write/Edit still delegates.\nbypassPermissions does NOT persist across compaction — re-enable if tasks seem blocked.\n\nTask state restore: if /tmp/.claude-task-state-$PPID.json exists, read it to recover active pipeline, dev stage, and autonomous mode state. This was saved by PreCompact hook.\n\nRe-read CLAUDE.md NOW."
388
+ }
389
+ ],
390
+ "matcher": "*",
391
+ "description": "Reinforce enforced rules after context compaction — prevents rule amnesia (v2.1.76+)"
392
+ }
393
+ ],
394
+ "PostToolUse": [
395
+ {
396
+ "hooks": [
397
+ {
398
+ "type": "command",
399
+ "command": "#!/bin/bash\ninput=$(cat)\ncmd=$(echo \"$input\" | jq -r '.tool_input.command')\n\nif echo \"$cmd\" | grep -qE 'gh pr create'; then\n output=$(echo \"$input\" | jq -r '.tool_output.output // \"\"')\n pr_url=$(echo \"$output\" | grep -oE 'https://github.com/[^/]+/[^/]+/pull/[0-9]+')\n \n if [ -n \"$pr_url\" ]; then\n echo \"[Hook] PR created: $pr_url\" >&2\n echo \"[Hook] Checking GitHub Actions status...\" >&2\n repo=$(echo \"$pr_url\" | sed -E 's|https://github.com/([^/]+/[^/]+)/pull/[0-9]+|\\1|')\n pr_num=$(echo \"$pr_url\" | sed -E 's|.*/pull/([0-9]+)|\\1|')\n echo \"[Hook] To review PR: gh pr review $pr_num --repo $repo\" >&2\n fi\nfi\n\necho \"$input\""
400
+ }
401
+ ],
402
+ "matcher": "Bash",
403
+ "description": "Log PR URL and provide review command after PR creation"
404
+ },
405
+ {
406
+ "hooks": [
407
+ {
408
+ "type": "command",
409
+ "command": "input=$(cat)\nif printf '%s' \"$input\" | jq -e '((.tool_input.file_path // \"\") | test(\"\\\\.(ts|tsx|js|jsx)$\"))' >/dev/null 2>&1; then\n printf '%s' \"$input\" | (\n#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n if command -v prettier >/dev/null 2>&1; then\n prettier --write \"$file_path\" 2>&1 | head -5 >&2\n fi\nfi\n\necho \"$input\"\n )\nelse\n printf '%s' \"$input\"\nfi"
410
+ }
411
+ ],
412
+ "matcher": "Edit",
413
+ "description": "Auto-format JS/TS files with Prettier after edits"
414
+ },
415
+ {
416
+ "hooks": [
417
+ {
418
+ "type": "command",
419
+ "command": "input=$(cat)\nif printf '%s' \"$input\" | jq -e '((.tool_input.file_path // \"\") | test(\"\\\\.(ts|tsx)$\"))' >/dev/null 2>&1; then\n printf '%s' \"$input\" | (\n#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n dir=$(dirname \"$file_path\")\n project_root=\"$dir\"\n while [ \"$project_root\" != \"/\" ] && [ ! -f \"$project_root/package.json\" ]; do\n project_root=$(dirname \"$project_root\")\n done\n \n if [ -f \"$project_root/tsconfig.json\" ]; then\n cd \"$project_root\" && npx tsc --noEmit --pretty false 2>&1 | grep \"$file_path\" | head -10 >&2 || true\n fi\nfi\n\necho \"$input\"\n )\nelse\n printf '%s' \"$input\"\nfi",
420
+ "continueOnBlock": true
421
+ }
422
+ ],
423
+ "matcher": "Edit",
424
+ "description": "TypeScript check after editing .ts/.tsx files"
425
+ },
426
+ {
427
+ "hooks": [
428
+ {
429
+ "type": "command",
430
+ "command": "input=$(cat)\nif printf '%s' \"$input\" | jq -e '((.tool_input.file_path // \"\") | test(\"\\\\.(ts|tsx|js|jsx)$\"))' >/dev/null 2>&1; then\n printf '%s' \"$input\" | (\n#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n console_logs=$(grep -n \"console\\\\.log\" \"$file_path\" 2>/dev/null || true)\n \n if [ -n \"$console_logs\" ]; then\n echo \"[Hook] WARNING: console.log found in $file_path\" >&2\n echo \"$console_logs\" | head -5 >&2\n echo \"[Hook] Remove console.log before committing\" >&2\n fi\nfi\n\necho \"$input\"\n )\nelse\n printf '%s' \"$input\"\nfi",
431
+ "continueOnBlock": true
432
+ }
433
+ ],
434
+ "matcher": "Edit",
435
+ "description": "Warn about console.log statements after edits"
436
+ },
437
+ {
438
+ "hooks": [
439
+ {
440
+ "type": "command",
441
+ "command": "input=$(cat)\nif printf '%s' \"$input\" | jq -e '((.tool_input.file_path // \"\") | test(\"\\\\.(go)$\"))' >/dev/null 2>&1; then\n printf '%s' \"$input\" | (\n#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n if command -v gofmt >/dev/null 2>&1; then\n gofmt -w \"$file_path\" 2>&1 >&2\n fi\nfi\n\necho \"$input\"\n )\nelse\n printf '%s' \"$input\"\nfi"
442
+ }
443
+ ],
444
+ "matcher": "Edit",
445
+ "description": "Auto-format Go files with gofmt after edits"
446
+ },
447
+ {
448
+ "hooks": [
449
+ {
450
+ "type": "command",
451
+ "command": "input=$(cat)\nif printf '%s' \"$input\" | jq -e '((.tool_input.file_path // \"\") | test(\"\\\\.(py)$\"))' >/dev/null 2>&1; then\n printf '%s' \"$input\" | (\n#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n # Format with ruff\n if command -v ruff >/dev/null 2>&1; then\n ruff format --quiet \"$file_path\" 2>&1 >&2\n ruff check --fix --quiet \"$file_path\" 2>&1 >&2 || true\n echo \"[Hook] Python formatted with ruff\" >&2\n fi\nfi\n\necho \"$input\"\n )\nelse\n printf '%s' \"$input\"\nfi",
452
+ "continueOnBlock": true
453
+ }
454
+ ],
455
+ "matcher": "Edit",
456
+ "description": "Auto-format and lint Python files with ruff after edits"
457
+ },
458
+ {
459
+ "hooks": [
460
+ {
461
+ "type": "command",
462
+ "command": "input=$(cat)\nif printf '%s' \"$input\" | jq -e '((.tool_input.file_path // \"\") | test(\"\\\\.(py)$\"))' >/dev/null 2>&1; then\n printf '%s' \"$input\" | (\n#!/bin/bash\ninput=$(cat)\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path // \"\"')\n\nif [ -n \"$file_path\" ] && [ -f \"$file_path\" ]; then\n # Type check with ty\n if command -v ty >/dev/null 2>&1; then\n dir=$(dirname \"$file_path\")\n project_root=\"$dir\"\n while [ \"$project_root\" != \"/\" ] && [ ! -f \"$project_root/pyproject.toml\" ]; do\n project_root=$(dirname \"$project_root\")\n done\n \n if [ -f \"$project_root/pyproject.toml\" ]; then\n cd \"$project_root\" && ty check \"$file_path\" 2>&1 | head -10 >&2 || true\n else\n ty check \"$file_path\" 2>&1 | head -10 >&2 || true\n fi\n fi\nfi\n\necho \"$input\"\n )\nelse\n printf '%s' \"$input\"\nfi",
463
+ "continueOnBlock": true
464
+ }
465
+ ],
466
+ "matcher": "Edit",
467
+ "description": "Type check Python files with ty after edits"
468
+ },
469
+ {
470
+ "hooks": [
471
+ {
472
+ "type": "command",
473
+ "command": "bash .claude/hooks/scripts/context-budget-advisor.sh",
474
+ "continueOnBlock": true
475
+ }
476
+ ],
477
+ "matcher": "Edit|Write|Bash|Task|Agent|Read|Glob|Grep",
478
+ "description": "Context budget advisor — track tool usage patterns and advise ecomode activation"
479
+ },
480
+ {
481
+ "hooks": [
482
+ {
483
+ "type": "command",
484
+ "command": "bash .claude/hooks/scripts/r007-r008-drift-advisor.sh",
485
+ "continueOnBlock": true
486
+ }
487
+ ],
488
+ "matcher": "Edit|Write|Bash|Task|Agent|Read|Glob|Grep",
489
+ "description": "Proactive R007/R008 drift advisory on tool use — covers the orchestrator-only stretch before the first subagent spawn, where neither UserPromptSubmit nor SubagentStop fires (#1553). Turn-deduplicated; exit 0 advisory only."
490
+ },
491
+ {
492
+ "hooks": [
493
+ {
494
+ "type": "command",
495
+ "command": "bash .claude/hooks/scripts/stuck-detector.sh",
496
+ "continueOnBlock": true
497
+ }
498
+ ],
499
+ "matcher": "Edit|Write|Bash|Task|Agent",
500
+ "description": "Detect repetitive failure loops and advise recovery strategies"
501
+ },
502
+ {
503
+ "hooks": [
504
+ {
505
+ "type": "command",
506
+ "command": "bash .claude/hooks/scripts/cost-cap-advisor.sh",
507
+ "continueOnBlock": true
508
+ }
509
+ ],
510
+ "matcher": "Edit|Write|Bash|Task|Agent",
511
+ "description": "Advisory cost cap monitoring — warn when session cost approaches configurable limit"
512
+ },
513
+ {
514
+ "hooks": [
515
+ {
516
+ "type": "command",
517
+ "command": "bash .claude/hooks/scripts/content-hash-validator.sh"
518
+ }
519
+ ],
520
+ "matcher": "Read",
521
+ "description": "Store content hashes for Read operations — enables Edit staleness detection"
522
+ },
523
+ {
524
+ "hooks": [
525
+ {
526
+ "type": "command",
527
+ "command": "bash .claude/hooks/scripts/secret-filter.sh"
528
+ }
529
+ ],
530
+ "matcher": "Bash|Read|Grep",
531
+ "description": "Detect potential secrets in Bash/Read/Grep output — advisory warning only"
532
+ },
533
+ {
534
+ "hooks": [
535
+ {
536
+ "type": "command",
537
+ "command": "bash .claude/hooks/scripts/audit-log.sh"
538
+ }
539
+ ],
540
+ "matcher": "Edit|Write|Bash|Agent",
541
+ "description": "Append-only audit log for state-changing tool operations"
542
+ },
543
+ {
544
+ "hooks": [
545
+ {
546
+ "type": "command",
547
+ "command": "bash .claude/hooks/skill-count-reminder.sh",
548
+ "continueOnBlock": true
549
+ }
550
+ ],
551
+ "matcher": "Write|Edit",
552
+ "description": "Advisory reminder to sync skill counts in 6 locations when a SKILL.md is created/modified (R021)"
553
+ },
554
+ {
555
+ "hooks": [
556
+ {
557
+ "type": "command",
558
+ "command": "bash .claude/hooks/scripts/playwright-compress.sh"
559
+ }
560
+ ],
561
+ "matcher": "mcp__playwright__.*|mcp__claude-in-chrome__.*",
562
+ "description": "Layer 4: Compress Playwright/Chrome MCP output via Haiku summarization"
563
+ },
564
+ {
565
+ "hooks": [
566
+ {
567
+ "type": "command",
568
+ "command": "bash .claude/hooks/scripts/auto-dev-token-tracker.sh"
569
+ }
570
+ ],
571
+ "matcher": "Task|Agent",
572
+ "description": "auto-dev token spend tracker — records per-phase token estimates during /pipeline auto-dev (Issue #1057, advisory)"
573
+ }
574
+ ],
575
+ "Stop": [
576
+ {
577
+ "hooks": [
578
+ {
579
+ "type": "command",
580
+ "command": "bash .claude/hooks/scripts/stop-console-audit.sh"
581
+ }
582
+ ],
583
+ "matcher": "*",
584
+ "description": "Final console.log audit and session diagnostics before session ends"
585
+ },
586
+ {
587
+ "hooks": [
588
+ {
589
+ "type": "command",
590
+ "command": "bash .claude/hooks/scripts/eval-core-batch-save.sh"
591
+ }
592
+ ],
593
+ "matcher": "*",
594
+ "description": "Batch-save agent outcomes to eval-core DB on session end (advisory, exit 0)"
595
+ },
596
+ {
597
+ "hooks": [
598
+ {
599
+ "type": "command",
600
+ "command": "bash .claude/hooks/scripts/feedback-collector.sh"
601
+ }
602
+ ],
603
+ "matcher": "*",
604
+ "description": "Auto-extract failure patterns from session outcomes (advisory, exit 0)"
605
+ },
606
+ {
607
+ "hooks": [
608
+ {
609
+ "type": "command",
610
+ "command": "bash .claude/hooks/scripts/session-reflection.sh"
611
+ }
612
+ ],
613
+ "matcher": "*",
614
+ "description": "Transcript-based self-reflection: detect R007/R008 violations and log to .claude/outputs/reflections/ (Phase 1 MVP, advisory, exit 0)"
615
+ },
616
+ {
617
+ "hooks": [
618
+ {
619
+ "type": "command",
620
+ "command": "bash .claude/hooks/scripts/skill-extractor-analyzer.sh"
621
+ }
622
+ ],
623
+ "matcher": "*",
624
+ "description": "Detect reusable skill candidates from session task outcomes (advisory, exit 0)"
625
+ },
626
+ {
627
+ "hooks": [
628
+ {
629
+ "type": "command",
630
+ "command": "bash .claude/hooks/scripts/auto-dev-token-summary.sh"
631
+ }
632
+ ],
633
+ "matcher": "*",
634
+ "description": "Print auto-dev token spend summary on session end (Issue #1057, advisory)"
635
+ }
636
+ ],
637
+ "PostToolUseFailure": [
638
+ {
639
+ "hooks": [
640
+ {
641
+ "type": "command",
642
+ "command": "bash .claude/hooks/scripts/failure-ledger.sh"
643
+ }
644
+ ],
645
+ "matcher": "*",
646
+ "description": "FAIL-axis instrumentation — append tool failures to the error ledger (JSONL). Never blocks; feeds fail-axis-cause-advisor.sh (#1561)"
647
+ }
648
+ ]
649
+ }
650
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.51",
2
+ "version": "1.1.53",
3
3
  "lastUpdated": "2026-07-14T00:00:00.000Z",
4
4
  "omcustomMinClaudeCode": "2.1.121",
5
5
  "omcustomMinClaudeCodeReason": "Sensitive-path direct Write/Edit on .claude/** under bypassPermissions (R010 deprecation, #1101)",