oh-my-customcode 1.1.90 → 1.1.92
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 +1 -1
- package/dist/cli/index.js +118 -2
- package/dist/index.js +118 -2
- package/package.json +3 -2
- package/templates/.claude/hooks/hooks.json +46 -46
- package/templates/.claude/hooks/scripts/rule-deletion-guard.sh +1 -1
- package/templates/.claude/hooks/scripts/schema-validator.sh +5 -1
- package/templates/.claude/hooks/skill-count-reminder.sh +5 -1
- package/templates/.claude/rules/MAY-optimization.md +2 -0
- package/templates/.claude/rules/MUST-enforcement-policy.md +1 -1
- package/templates/.claude/rules/MUST-sync-verification.md +2 -0
- package/templates/.claude/settings.json +46 -46
- package/templates/.claude/skills/pipeline/workflows/auto-dev.yaml +11 -4
- package/templates/guides/hook-data-flow/README.md +4 -2
- package/templates/manifest.json +1 -1
- package/templates/workflows/auto-dev.yaml +11 -4
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"hooks": [
|
|
8
8
|
{
|
|
9
9
|
"type": "command",
|
|
10
|
-
"command": "bash
|
|
10
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/stage-blocker.sh\""
|
|
11
11
|
}
|
|
12
12
|
],
|
|
13
13
|
"description": "Block Write/Edit tools during plan/verify/compound stages — only allow in implement stage"
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"hooks": [
|
|
68
68
|
{
|
|
69
69
|
"type": "command",
|
|
70
|
-
"command": "bash
|
|
70
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/content-hash-validator.sh\""
|
|
71
71
|
}
|
|
72
72
|
],
|
|
73
73
|
"description": "Validate file content hash before Edit — advisory staleness warning"
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"hooks": [
|
|
78
78
|
{
|
|
79
79
|
"type": "command",
|
|
80
|
-
"command": "bash
|
|
80
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/schema-validator.sh\""
|
|
81
81
|
}
|
|
82
82
|
],
|
|
83
83
|
"description": "Schema-based tool input validation — Phase 1 advisory only"
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"hooks": [
|
|
88
88
|
{
|
|
89
89
|
"type": "command",
|
|
90
|
-
"command": "bash
|
|
90
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/rtk-intercept.sh\""
|
|
91
91
|
}
|
|
92
92
|
],
|
|
93
93
|
"description": "RTK auto-intercept — transparently rewrites CLI commands through RTK proxy when available (R013 advisory)"
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"hooks": [
|
|
98
98
|
{
|
|
99
99
|
"type": "command",
|
|
100
|
-
"command": "bash
|
|
100
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/destructive-git-guard.sh\""
|
|
101
101
|
}
|
|
102
102
|
],
|
|
103
103
|
"description": "Warn before destructive git commands — advisory recovery guidance (R001/R021)"
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"hooks": [
|
|
108
108
|
{
|
|
109
109
|
"type": "command",
|
|
110
|
-
"command": "bash
|
|
110
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/rule-deletion-guard.sh\""
|
|
111
111
|
}
|
|
112
112
|
],
|
|
113
113
|
"description": "Block rule file deletion — requires individual user confirmation per rule (R001 safety)"
|
|
@@ -121,15 +121,15 @@
|
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
123
|
"type": "command",
|
|
124
|
-
"command": "bash
|
|
124
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/git-delegation-guard.sh\""
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
127
|
"type": "command",
|
|
128
|
-
"command": "bash
|
|
128
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/agent-teams-advisor.sh\""
|
|
129
129
|
},
|
|
130
130
|
{
|
|
131
131
|
"type": "command",
|
|
132
|
-
"command": "bash
|
|
132
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/model-escalation-advisor.sh\""
|
|
133
133
|
}
|
|
134
134
|
],
|
|
135
135
|
"description": "HUD statusline + R010 git delegation guard + R018 Agent Teams advisor on Agent/Task spawn"
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"hooks": [
|
|
142
142
|
{
|
|
143
143
|
"type": "command",
|
|
144
|
-
"command": "
|
|
144
|
+
"command": "\"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/omcustom-auto-update.sh\""
|
|
145
145
|
}
|
|
146
146
|
],
|
|
147
147
|
"description": "Interactive oh-my-customcode update check at session start (#752)"
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"hooks": [
|
|
152
152
|
{
|
|
153
153
|
"type": "command",
|
|
154
|
-
"command": "bash
|
|
154
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/session-env-check.sh\""
|
|
155
155
|
}
|
|
156
156
|
],
|
|
157
157
|
"description": "Check codex CLI and Agent Teams availability at session start"
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
"hooks": [
|
|
162
162
|
{
|
|
163
163
|
"type": "command",
|
|
164
|
-
"command": "bash
|
|
164
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/stale-todo-scanner.sh\""
|
|
165
165
|
}
|
|
166
166
|
],
|
|
167
167
|
"description": "Scan TODO.md files for stale items at session start"
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
"hooks": [
|
|
172
172
|
{
|
|
173
173
|
"type": "command",
|
|
174
|
-
"command": "bash
|
|
174
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/adaptive-harness-scan.sh\""
|
|
175
175
|
}
|
|
176
176
|
],
|
|
177
177
|
"description": "Lightweight project profile staleness check for adaptive harness (#831)"
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
"hooks": [
|
|
182
182
|
{
|
|
183
183
|
"type": "command",
|
|
184
|
-
"command": "bash
|
|
184
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/session-autofix.sh\""
|
|
185
185
|
}
|
|
186
186
|
],
|
|
187
187
|
"description": "Auto-detect and fix previous session issues at start (#838)"
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
"hooks": [
|
|
192
192
|
{
|
|
193
193
|
"type": "command",
|
|
194
|
-
"command": "bash
|
|
194
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/plugin-cache-check.sh\""
|
|
195
195
|
}
|
|
196
196
|
],
|
|
197
197
|
"description": "Advisory check for plugin cache directories missing node_modules (#1207)"
|
|
@@ -201,7 +201,7 @@
|
|
|
201
201
|
"hooks": [
|
|
202
202
|
{
|
|
203
203
|
"type": "command",
|
|
204
|
-
"command": "bash
|
|
204
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/claude-md-reinject.sh\""
|
|
205
205
|
}
|
|
206
206
|
],
|
|
207
207
|
"description": "Re-inject project CLAUDE.md into model context on compact re-entry only — CC already natively auto-loads CLAUDE.md on startup/resume/clear, so re-injecting there is pure duplication (~13.8KB/session); matcher narrowed to \"compact\" to keep the original #1617 purpose (post-compact amnesia defense) without the startup double-injection (#1626)"
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
"hooks": [
|
|
214
214
|
{
|
|
215
215
|
"type": "command",
|
|
216
|
-
"command": "bash
|
|
216
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/user-prompt-preprocessor.sh\""
|
|
217
217
|
}
|
|
218
218
|
],
|
|
219
219
|
"description": "Advisory pre-processing of user input — skill matching hints and intent analysis"
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
"hooks": [
|
|
224
224
|
{
|
|
225
225
|
"type": "command",
|
|
226
|
-
"command": "bash
|
|
226
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/r007-r008-drift-advisor.sh\""
|
|
227
227
|
}
|
|
228
228
|
],
|
|
229
229
|
"description": "Proactive R007/R008 drift advisory — checks last assistant turn for identification omission (#1229)"
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
"hooks": [
|
|
234
234
|
{
|
|
235
235
|
"type": "command",
|
|
236
|
-
"command": "bash
|
|
236
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/session-autofix-prompt.sh\""
|
|
237
237
|
}
|
|
238
238
|
],
|
|
239
239
|
"description": "Inject session auto-fix findings into first user prompt (#838)"
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
"hooks": [
|
|
244
244
|
{
|
|
245
245
|
"type": "command",
|
|
246
|
-
"command": "bash
|
|
246
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/fail-axis-cause-advisor.sh\""
|
|
247
247
|
}
|
|
248
248
|
],
|
|
249
249
|
"description": "Advisory on cause-free progress nudges when this session has logged tool failures — delivers via hookSpecificOutput.additionalContext (#1561)"
|
|
@@ -259,7 +259,7 @@
|
|
|
259
259
|
},
|
|
260
260
|
{
|
|
261
261
|
"type": "command",
|
|
262
|
-
"command": "bash
|
|
262
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/agent-start-recorder.sh\""
|
|
263
263
|
}
|
|
264
264
|
],
|
|
265
265
|
"description": "HUD display + agent start time recording for stall detection (R009)"
|
|
@@ -271,23 +271,23 @@
|
|
|
271
271
|
"hooks": [
|
|
272
272
|
{
|
|
273
273
|
"type": "command",
|
|
274
|
-
"command": "bash
|
|
274
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/task-outcome-recorder.sh\""
|
|
275
275
|
},
|
|
276
276
|
{
|
|
277
277
|
"type": "command",
|
|
278
|
-
"command": "bash
|
|
278
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/stall-detection-advisor.sh\""
|
|
279
279
|
},
|
|
280
280
|
{
|
|
281
281
|
"type": "command",
|
|
282
|
-
"command": "bash
|
|
282
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/auto-continue-guard.sh\""
|
|
283
283
|
},
|
|
284
284
|
{
|
|
285
285
|
"type": "command",
|
|
286
|
-
"command": "bash
|
|
286
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/r007-r008-drift-advisor.sh\""
|
|
287
287
|
},
|
|
288
288
|
{
|
|
289
289
|
"type": "command",
|
|
290
|
-
"command": "bash
|
|
290
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/subagent-failure-advisor.sh\""
|
|
291
291
|
}
|
|
292
292
|
],
|
|
293
293
|
"description": "Record agent outcomes + auto-continue workflow + R007/R008 drift advisory + failure advisory on subagent completion (autonomous-loop re-entry, #1545; #1631 replaced the self-referential prompt-type judge hook with an advisory-only command hook)"
|
|
@@ -299,7 +299,7 @@
|
|
|
299
299
|
"hooks": [
|
|
300
300
|
{
|
|
301
301
|
"type": "command",
|
|
302
|
-
"command": "bash
|
|
302
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/cwd-change-detector.sh\""
|
|
303
303
|
}
|
|
304
304
|
],
|
|
305
305
|
"description": "Auto-detect project type on working directory change (v2.1.83+)"
|
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
"hooks": [
|
|
312
312
|
{
|
|
313
313
|
"type": "command",
|
|
314
|
-
"command": "bash
|
|
314
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/file-change-validator.sh\""
|
|
315
315
|
}
|
|
316
316
|
],
|
|
317
317
|
"description": "Validate externally modified files — advisory staleness warning (v2.1.83+)"
|
|
@@ -371,7 +371,7 @@
|
|
|
371
371
|
"hooks": [
|
|
372
372
|
{
|
|
373
373
|
"type": "command",
|
|
374
|
-
"command": "bash
|
|
374
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/task-state-precompact.sh\""
|
|
375
375
|
}
|
|
376
376
|
],
|
|
377
377
|
"description": "Serialize active task state before compaction — pairs with PostCompact restore (#922)"
|
|
@@ -469,7 +469,7 @@
|
|
|
469
469
|
"hooks": [
|
|
470
470
|
{
|
|
471
471
|
"type": "command",
|
|
472
|
-
"command": "bash
|
|
472
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/context-budget-advisor.sh\"",
|
|
473
473
|
"continueOnBlock": true
|
|
474
474
|
}
|
|
475
475
|
],
|
|
@@ -480,7 +480,7 @@
|
|
|
480
480
|
"hooks": [
|
|
481
481
|
{
|
|
482
482
|
"type": "command",
|
|
483
|
-
"command": "bash
|
|
483
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/r007-r008-drift-advisor.sh\"",
|
|
484
484
|
"continueOnBlock": true
|
|
485
485
|
}
|
|
486
486
|
],
|
|
@@ -491,7 +491,7 @@
|
|
|
491
491
|
"hooks": [
|
|
492
492
|
{
|
|
493
493
|
"type": "command",
|
|
494
|
-
"command": "bash
|
|
494
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/stuck-detector.sh\"",
|
|
495
495
|
"continueOnBlock": true
|
|
496
496
|
}
|
|
497
497
|
],
|
|
@@ -502,7 +502,7 @@
|
|
|
502
502
|
"hooks": [
|
|
503
503
|
{
|
|
504
504
|
"type": "command",
|
|
505
|
-
"command": "bash
|
|
505
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/cost-cap-advisor.sh\"",
|
|
506
506
|
"continueOnBlock": true
|
|
507
507
|
}
|
|
508
508
|
],
|
|
@@ -513,7 +513,7 @@
|
|
|
513
513
|
"hooks": [
|
|
514
514
|
{
|
|
515
515
|
"type": "command",
|
|
516
|
-
"command": "bash
|
|
516
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/content-hash-validator.sh\""
|
|
517
517
|
}
|
|
518
518
|
],
|
|
519
519
|
"description": "Store content hashes for Read operations — enables Edit staleness detection"
|
|
@@ -523,7 +523,7 @@
|
|
|
523
523
|
"hooks": [
|
|
524
524
|
{
|
|
525
525
|
"type": "command",
|
|
526
|
-
"command": "bash
|
|
526
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/secret-filter.sh\""
|
|
527
527
|
}
|
|
528
528
|
],
|
|
529
529
|
"description": "Detect potential secrets in Bash/Read/Grep output — advisory warning only"
|
|
@@ -533,7 +533,7 @@
|
|
|
533
533
|
"hooks": [
|
|
534
534
|
{
|
|
535
535
|
"type": "command",
|
|
536
|
-
"command": "bash
|
|
536
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/audit-log.sh\""
|
|
537
537
|
}
|
|
538
538
|
],
|
|
539
539
|
"description": "Append-only audit log for state-changing tool operations"
|
|
@@ -543,7 +543,7 @@
|
|
|
543
543
|
"hooks": [
|
|
544
544
|
{
|
|
545
545
|
"type": "command",
|
|
546
|
-
"command": "bash
|
|
546
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/skill-count-reminder.sh\"",
|
|
547
547
|
"continueOnBlock": true
|
|
548
548
|
}
|
|
549
549
|
],
|
|
@@ -554,7 +554,7 @@
|
|
|
554
554
|
"hooks": [
|
|
555
555
|
{
|
|
556
556
|
"type": "command",
|
|
557
|
-
"command": "bash
|
|
557
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/playwright-compress.sh\""
|
|
558
558
|
}
|
|
559
559
|
],
|
|
560
560
|
"description": "Layer 4: Compress Playwright/Chrome MCP output via Haiku summarization"
|
|
@@ -564,7 +564,7 @@
|
|
|
564
564
|
"hooks": [
|
|
565
565
|
{
|
|
566
566
|
"type": "command",
|
|
567
|
-
"command": "bash
|
|
567
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/auto-dev-token-tracker.sh\""
|
|
568
568
|
}
|
|
569
569
|
],
|
|
570
570
|
"description": "auto-dev token spend tracker — records per-phase token estimates during /pipeline auto-dev (Issue #1057, advisory)"
|
|
@@ -576,7 +576,7 @@
|
|
|
576
576
|
"hooks": [
|
|
577
577
|
{
|
|
578
578
|
"type": "command",
|
|
579
|
-
"command": "bash
|
|
579
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/stop-console-audit.sh\""
|
|
580
580
|
}
|
|
581
581
|
],
|
|
582
582
|
"description": "Final console.log audit and session diagnostics before session ends"
|
|
@@ -586,7 +586,7 @@
|
|
|
586
586
|
"hooks": [
|
|
587
587
|
{
|
|
588
588
|
"type": "command",
|
|
589
|
-
"command": "bash
|
|
589
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/eval-core-batch-save.sh\""
|
|
590
590
|
}
|
|
591
591
|
],
|
|
592
592
|
"description": "Batch-save agent outcomes to eval-core DB on session end (advisory, exit 0)"
|
|
@@ -596,7 +596,7 @@
|
|
|
596
596
|
"hooks": [
|
|
597
597
|
{
|
|
598
598
|
"type": "command",
|
|
599
|
-
"command": "bash
|
|
599
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/feedback-collector.sh\""
|
|
600
600
|
}
|
|
601
601
|
],
|
|
602
602
|
"description": "Auto-extract failure patterns from session outcomes (advisory, exit 0)"
|
|
@@ -606,7 +606,7 @@
|
|
|
606
606
|
"hooks": [
|
|
607
607
|
{
|
|
608
608
|
"type": "command",
|
|
609
|
-
"command": "bash
|
|
609
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/session-reflection.sh\""
|
|
610
610
|
}
|
|
611
611
|
],
|
|
612
612
|
"description": "Transcript-based self-reflection: detect R007/R008 violations and log to .claude/outputs/reflections/ (Phase 1 MVP, advisory, exit 0)"
|
|
@@ -616,7 +616,7 @@
|
|
|
616
616
|
"hooks": [
|
|
617
617
|
{
|
|
618
618
|
"type": "command",
|
|
619
|
-
"command": "bash
|
|
619
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/skill-extractor-analyzer.sh\""
|
|
620
620
|
}
|
|
621
621
|
],
|
|
622
622
|
"description": "Detect reusable skill candidates from session task outcomes (advisory, exit 0)"
|
|
@@ -626,7 +626,7 @@
|
|
|
626
626
|
"hooks": [
|
|
627
627
|
{
|
|
628
628
|
"type": "command",
|
|
629
|
-
"command": "bash
|
|
629
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/auto-dev-token-summary.sh\""
|
|
630
630
|
}
|
|
631
631
|
],
|
|
632
632
|
"description": "Print auto-dev token spend summary on session end (Issue #1057, advisory)"
|
|
@@ -638,7 +638,7 @@
|
|
|
638
638
|
"hooks": [
|
|
639
639
|
{
|
|
640
640
|
"type": "command",
|
|
641
|
-
"command": "bash
|
|
641
|
+
"command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/failure-ledger.sh\""
|
|
642
642
|
}
|
|
643
643
|
],
|
|
644
644
|
"description": "FAIL-axis instrumentation — append tool failures to the error ledger (JSONL). Never blocks; feeds fail-axis-cause-advisor.sh (#1561)"
|
|
@@ -13,7 +13,7 @@ if ! command -v jq &>/dev/null; then
|
|
|
13
13
|
fi
|
|
14
14
|
|
|
15
15
|
# Parse tool input
|
|
16
|
-
tool=$(printf '%s\n' "$input" | jq -r '.tool // ""' 2>/dev/null) || { printf '%s\n' "$input"; exit 0; }
|
|
16
|
+
tool=$(printf '%s\n' "$input" | jq -r '.tool_name // .tool // ""' 2>/dev/null) || { printf '%s\n' "$input"; exit 0; }
|
|
17
17
|
cmd=$(printf '%s\n' "$input" | jq -r '.tool_input.command // ""' 2>/dev/null) || { printf '%s\n' "$input"; exit 0; }
|
|
18
18
|
|
|
19
19
|
# Only check Bash tool
|
|
@@ -21,7 +21,11 @@ tool_name=$(printf '%s\n' "$input" | jq -r '.tool_name? // "unknown"')
|
|
|
21
21
|
tool_input=$(printf '%s\n' "$input" | jq -c 'if (.tool_input? | type) == "object" then .tool_input else {} end' 2>/dev/null) || tool_input='{}'
|
|
22
22
|
[ -n "$tool_input" ] || tool_input='{}'
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
# Locate the repo root ourselves (#1767): hooks run in the session cwd, which may be
|
|
25
|
+
# a subdirectory. Prefer CLAUDE_PROJECT_DIR; fall back to this script's own location
|
|
26
|
+
# (<root>/.claude/hooks/scripts/ -> three levels up).
|
|
27
|
+
ROOT="${CLAUDE_PROJECT_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)}"
|
|
28
|
+
SCHEMA_FILE="$ROOT/.claude/schemas/tool-inputs.json"
|
|
25
29
|
|
|
26
30
|
# Skip if schema file doesn't exist
|
|
27
31
|
if [ ! -f "$SCHEMA_FILE" ]; then
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
set -euo pipefail
|
|
7
7
|
|
|
8
|
+
# Locate the repo root ourselves: hooks run in the session cwd, which may be a subdirectory
|
|
9
|
+
ROOT="${CLAUDE_PROJECT_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}"
|
|
10
|
+
|
|
8
11
|
# Read tool input from stdin
|
|
9
12
|
INPUT=$(cat)
|
|
10
13
|
|
|
@@ -14,7 +17,8 @@ FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // .tool_input.path //
|
|
|
14
17
|
# Only trigger for .claude/skills/ paths with SKILL.md
|
|
15
18
|
if [[ "$FILE_PATH" == *".claude/skills/"*"SKILL.md"* ]]; then
|
|
16
19
|
SKILL_NAME=$(echo "$FILE_PATH" | sed 's|.*\.claude/skills/||' | sed 's|/SKILL.md||')
|
|
17
|
-
|
|
20
|
+
# '|| true' keeps the advisory contract (exit 0) even if the skills directory is missing under pipefail
|
|
21
|
+
ACTUAL_COUNT=$( { find "$ROOT/.claude/skills" -name 'SKILL.md' 2>/dev/null || true; } | wc -l | tr -d ' ')
|
|
18
22
|
|
|
19
23
|
cat >&2 << EOF
|
|
20
24
|
─── [Skill Sync Reminder] New/modified skill: ${SKILL_NAME} ───
|
|
@@ -78,6 +78,8 @@ zsh는 미인용 `$var`를 단어분할하지 않습니다(#1683 #5) — 분할
|
|
|
78
78
|
|
|
79
79
|
계수/매칭 방법 확인(#1521): 카운트 대조 전 비교 대상의 계수 방법(glob vs `find`, 부분매칭, 확장자 필터, 머지커밋 diff 생략 등)을 먼저 확인합니다.
|
|
80
80
|
|
|
81
|
+
`git grep -E`(POSIX ERE)는 `\b`·`\d`·`\s`를 지원하지 않으며 오류 없이 0건을 반환할 수 있습니다(#1760, 플랫폼 의존 — macOS git 2.52.0에서 확인, GNU/glibc ERE는 확장으로 지원) — 이식 가능한 PCRE가 필요하면 `git grep -P` 또는 python을 사용합니다.
|
|
82
|
+
|
|
81
83
|
<!-- DETAIL: counting method check
|
|
82
84
|
> **계수/매칭 방법 확인 (#1521)**: 카운트를 대조하기 전에 **비교 대상이 무엇을 어떻게 세는지** 먼저 확인한다 — 같은 지표라도 계수 방법이 다르면 값이 달라진다. 대표 함정 4종: (a) glob(`ls *.md`, 최상위만) vs 재귀 `find`(하위 디렉토리 포함), (b) 부분 문자열 grep(`grep "sdd"`가 `sdd-dev`까지 매칭), (c) 확장자 필터(`--include='*.md'`가 `CLAUDE.md.en`을 미매칭), (d) **머지 커밋 diff 기본 생략** — `git show --name-only <머지커밋>`은 diff를 기본적으로 출력하지 않아 변경 파일 0개로 오독된다. 머지 커밋의 변경 파일을 세려면 `--first-parent`(1차 부모 대비) 또는 `-m`(각 부모별 diff)을 명시한다. 검증 스크립트와 대조할 때는 **스크립트의 실제 계수 로직을 읽고** 같은 방법으로 센다. 위 `ls | tail` 시계열 오판(#1417)과 동류로, 도구의 기본 동작을 확인하지 않은 채 결과를 해석해 오탐에 이르는 패턴이다. Origin: #1521 (2026-07-20 세션에서 3회 반복; 두 서브에이전트가 독립적으로 동일 오탐에 도달); (d)는 #1553 찐빠 #4 (2026-07-30 세션에서 머지 커밋 `--name-only` 0파일을 "변경 없음"으로 오독).
|
|
83
85
|
-->
|
|
@@ -33,7 +33,7 @@ oh-my-customcode uses an **advisory-first enforcement model**. Most rules are en
|
|
|
33
33
|
|
|
34
34
|
| Anti-pattern | Required |
|
|
35
35
|
|--------------|----------|
|
|
36
|
-
| `hooks.json`만 편집하고 커밋 → settings.json `hooks` 블록 미재생성 | 편집 후 `hooks
|
|
36
|
+
| `hooks.json`만 편집하고 커밋 → settings.json `hooks` 블록 미재생성 | 편집 후 `bun run sync:hooks`(또는 `bun run build`) 실행 → settings.json(+local+templates) 재생성 확인 후 커밋 |
|
|
37
37
|
|
|
38
38
|
교훈: **배선 확인 ≠ 전달 확인 ≠ 발화 확인 ≠ 로드 확인** — R020 "actual outcome ≠ attempt"의 훅 도메인 재현 사례. 상세는 Read 도구로 열람.
|
|
39
39
|
|
|
@@ -503,6 +503,8 @@ Origin: #1584 #1 (v1.1.46 세션) — 이슈 생성(8/11~14)과 작업(8/15) 사
|
|
|
503
503
|
|
|
504
504
|
R017 게이트 통과 후 스코프가 확장되면(추가 파일 편집), 커밋 전 게이트를 **최종 상태에서 재실행**한다.
|
|
505
505
|
|
|
506
|
+
**경계 (#1760)**: 이 경계는 위 재실행 규칙을 취소하지 않고 같은 파일 내 리뷰 정정에 한해 좁힙니다. "리뷰 정정"은 이 게이트의 리뷰 위임(mgr-sauron R017, 적대적 리뷰)의 지적에 따라 게이트 대상 변경 집합에 이미 있는 파일만 바꾼 정정입니다. 그런 정정 후 결정론 검사(`bun run lint`, `bun run typecheck`, `bash .github/scripts/verify-template-sync.sh`, `bun .github/scripts/validate-docs.ts --programmatic-only`, 전체 `bun test`)를 최종 상태에서 재통과했다면 구조 재검증(mgr-sauron 재실행)을 생략할 수 있으며 생략 사실을 기록합니다. 이 생략은 게이트 판정이 PASS였던 경우에만 적용되며, FAIL 판정 후의 정정은 PASS가 나올 때까지 항상 게이트를 재실행합니다. #1688이 요구하는 리뷰 후 위키 재동기화가 만든 위키 페이지·매니페스트는 `verify-wiki-sync.sh`가 다루므로 그것만으로는 재실행 사유가 아닙니다. 그 외 새 파일이나 새 구조 표면이 생기면 게이트를 재실행합니다.
|
|
507
|
+
|
|
506
508
|
<!-- DETAIL: Post-Gate Scope-Expansion Re-Run intro, original wording
|
|
507
509
|
R017 게이트(mgr-sauron) 통과 선언 후 신규 결함 발견 등으로 스코프가 확장되면(추가 파일 편집), 커밋 전 게이트를 **최종 상태에서 재실행**한다. 게이트 통과 시점 이후의 변경은 형식적으로 미검증이므로, 확장분 미검증 커밋은 R017이 최종 산출물을 커버하지 못하게 만든다.
|
|
508
510
|
-->
|