oh-my-customcode 1.1.93 → 1.1.95

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.
@@ -6,6 +6,13 @@
6
6
  # Time budget: <3s
7
7
 
8
8
  input=$(cat)
9
+
10
+ # Anchor cwd to the project root (#1770): hooks may be launched from a subdirectory.
11
+ # Fallback is the git toplevel (or pwd), NOT the script location: tests run these scripts
12
+ # from a tmp cwd with inherited env. (schema-validator.sh/skill-count-reminder.sh instead
13
+ # use a script-location fallback.) The guarded cd must not abort under set -e (e.g. mode-000 dir).
14
+ ROOT="${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"
15
+ { [ -d "$ROOT" ] && cd "$ROOT"; } 2>/dev/null || true
9
16
  FIXES_FILE="/tmp/.claude-session-fixes-${PPID}"
10
17
  LOG_DIR=".claude/outputs/session-fixes"
11
18
  ISSUES=()
@@ -9,6 +9,13 @@ set -euo pipefail
9
9
 
10
10
  input=$(cat)
11
11
 
12
+ # Anchor cwd to the project root (#1770): hooks may be launched from a subdirectory.
13
+ # Fallback is the git toplevel (or pwd), NOT the script location: tests run these scripts
14
+ # from a tmp cwd with inherited env. (schema-validator.sh/skill-count-reminder.sh instead
15
+ # use a script-location fallback.) The guarded cd must not abort under set -e (e.g. mode-000 dir).
16
+ ROOT="${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"
17
+ { [ -d "$ROOT" ] && cd "$ROOT"; } 2>/dev/null || true
18
+
12
19
  echo "" >&2
13
20
  echo "--- [Session Environment Check] ---" >&2
14
21
 
@@ -9,6 +9,13 @@ set -euo pipefail
9
9
 
10
10
  input=$(cat)
11
11
 
12
+ # Anchor cwd to the project root (#1770): hooks may be launched from a subdirectory.
13
+ # Fallback is the git toplevel (or pwd), NOT the script location: tests run these scripts
14
+ # from a tmp cwd with inherited env. (schema-validator.sh/skill-count-reminder.sh instead
15
+ # use a script-location fallback.) The guarded cd must not abort under set -e (e.g. mode-000 dir).
16
+ ROOT="${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"
17
+ { [ -d "$ROOT" ] && cd "$ROOT"; } 2>/dev/null || true
18
+
12
19
  TODO_FILES=("TODO.md" ".claude/TODO.md")
13
20
  NOW=$(date +%s)
14
21
  FOUND_ANY=false
@@ -51,11 +51,11 @@ Format: `─── [Spawn] {subagent_type}:{model} | {description} ───`
51
51
 
52
52
  Format: `{Cost} | {project} | {branch} | RL:{rate_limit}% {countdown} | WL:{weekly_limit}% {countdown} | CTX:{usage}%`
53
53
 
54
- Config in `.claude/settings.local.json`: `statusLine.type: "command"`, `statusLine.command: ".claude/statusline.sh"`. Requires CC v2.1.80+ for RL/WL segments. `refreshInterval` setting (v2.1.97+): Auto-refresh interval in seconds for the status line command. Set in `statusLine.refreshInterval` in settings.json.
54
+ Config in `.claude/settings.local.json`: `statusLine.type: "command"`, `statusLine.command: "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/statusline.sh\""` (anchored form written by the installer; the old bare `.claude/statusline.sh` default is migrated on update/init). Requires CC v2.1.80+ for RL/WL segments. `refreshInterval` setting (v2.1.97+): Auto-refresh interval in seconds for the status line command. Set in `statusLine.refreshInterval` in settings.json.
55
55
 
56
56
  <!-- DETAIL: Statusline configuration JSON and color coding
57
57
  ```json
58
- { "statusLine": { "type": "command", "command": ".claude/statusline.sh", "padding": 0 } }
58
+ { "statusLine": { "type": "command", "command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/statusline.sh\"", "padding": 0 } }
59
59
  ```
60
60
  Color coding: Cost (<$1 green, $1-4.99 yellow, >=5 red), RL/WL (<50% green, 50-79% yellow, >=80% red), CTX (<60% green, 60-79% yellow, >=80% red).
61
61
  Countdown format: >=1d → "{d}d{h}h", >=1h → "{h}h{m}m", <1h → "{m}m", unavailable → omitted.
@@ -182,13 +182,13 @@ Semver comparison: major → minor → patch (all numeric). Pre-release suffixes
182
182
 
183
183
  ### Automatic (SessionStart Hook)
184
184
 
185
- Can be integrated into the SessionStart hook to check for new releases at session start:
185
+ Can be integrated into the SessionStart hook to check for new releases at session start (illustrative example — `claude-native-check.sh` is a hypothetical script you would write yourself; it is not shipped or registered in `hooks.json`):
186
186
 
187
187
  ```json
188
188
  {
189
189
  "SessionStart": [
190
190
  {
191
- "command": "bash .claude/hooks/scripts/claude-native-check.sh"
191
+ "command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/claude-native-check.sh\""
192
192
  }
193
193
  ]
194
194
  }
@@ -145,6 +145,8 @@ Assemble a feedback issue in Korean using the #1266 format:
145
145
 
146
146
  If `--severity` filter is active, include only findings at or above the threshold. Note the filter in the issue body.
147
147
 
148
+ When a 하네스 제안 item contains a runnable command, run it once at draft time (positive and negative fixture where applicable) and record the observed exit code/output next to that proposal; a command that only reports failure must be caught here, not in review (e.g. `bunx biome check` exits 0 inside biome's `files.includes` scope but 1 outside it, so a norm requiring it for all TS/JS reports failure for out-of-scope files regardless of formatting). (#1781 찐빠 #1)
149
+
148
150
  If no findings are discovered, output:
149
151
  ```
150
152
  [homework] 이번 세션에서 찐빠를 발견하지 못했습니다. (세션 정상 종료)
@@ -413,7 +413,7 @@ steps:
413
413
 
414
414
  - name: deep-plan
415
415
  skill: deep-plan
416
- description: "Research-validated implementation plan (research → plan → verify) — skipped if docs-only, integrated-analysis allowed if lite; independent of tier, MAY run in lightweight mode when compression-mode-eval's 'Cross-tier — Lightweight Skill-Mode Substitution' conditions are met. MULTI-PHASE: 스킬을 그대로 spawn하지 말고 R020 「위임 경계를 Phase 개수로 설계」에 따라 단일 목표 위임으로 분할해 순차 발주한다 (#1595 #4). 리서치·계측 위임의 완료 조건에는 결론 수치를 산출물 표에서 jq/awk로 재계산해 병기하도록 명시한다(#1707 #4). 테스트 격리·모듈 모킹 수정을 다루는 리서치·계획 위임에도 대상 src 파일과 All files의 수정 전후 커버리지를 동일 하네스로 비교하도록 완료 조건에 명시합니다(#1778 찐빠 #5, implement 스텝 Rules와 동일 요구)."
416
+ description: "Research-validated implementation plan (research → plan → verify) — skipped if docs-only, integrated-analysis allowed if lite; independent of tier, MAY run in lightweight mode when compression-mode-eval's 'Cross-tier — Lightweight Skill-Mode Substitution' conditions are met. MULTI-PHASE: 스킬을 그대로 spawn하지 말고 R020 「위임 경계를 Phase 개수로 설계」에 따라 단일 목표 위임으로 분할해 순차 발주한다 (#1595 #4). 리서치·계측 위임의 완료 조건에는 결론 수치를 산출물 표에서 jq/awk로 재계산해 병기하도록 명시한다(#1707 #4). 테스트 격리·모듈 모킹 수정을 다루는 리서치·계획 위임에도 대상 src 파일과 All files의 수정 전후 커버리지를 동일 하네스로 비교하도록 완료 조건에 명시합니다(#1778 찐빠 #5, implement 스텝 Rules와 동일 요구). 적용 경계 표에는 각 행마다 이 위치를 읽는 위임 유형/단계 열을 두고 결함이 발생한 단계와 일치하는지 표에서 대조합니다(#1781 찐빠 #2). 기본값·출력 리터럴을 바꾸는 계획은 그 리터럴을 단언하는 기존 테스트를 git grep으로 전수 열거해 웨이브 표의 파일 소유권에 포함합니다(git grep은 untracked 파일을 보지 못하므로 git status --porcelain도 확인합니다, #1786 찐빠 #5)."
417
417
  depends_on: plan
418
418
 
419
419
  - name: implement
@@ -486,6 +486,9 @@ steps:
486
486
  its lightweight tier substitute, applying to lite and standard tiers, and
487
487
  implement-stage delegation prompts MUST carry the relevant boundary row for each edit
488
488
  (회고 제안 묶음 릴리즈의 통합 분석에 적용 경계 표 필수, #1735 찐빠 #4).
489
+ The table MUST include a column naming which delegation type/step reads each target
490
+ location and be checked against the step where the defect occurred; a mismatch means
491
+ the clause must also be placed at the location that step reads (#1781 찐빠 #2).
489
492
  - Before dispatching any delegation prompt in an iteration that created or reinforced a rule
490
493
  clause, the orchestrator MUST compare that clause's Anti-pattern table rows 1:1 against the
491
494
  delegation prompt's sentences and rewrite any match (cause: the R016 「신설 조항의 동일
@@ -502,7 +505,7 @@ steps:
502
505
  block: (a) Korean 합쇼체 for new sentences, do not imitate adjacent 반말 — completion
503
506
  criteria MUST include THREE deterministic checks, scoped to edited text files (md/yaml)
504
507
  and restricted to added lines only (`git diff -U0 -- <edited md/yaml files> | grep
505
- '^+'`): family check `grep -cE '(한다|된다|않는다|따른다|했다|있다|없다|넣는다|이다)[.。 "]'`
508
+ '^+'`): family check `grep -cE '(한다|된다|않는다|따른다|했다|있다|없다|넣는다|이다)[.。 "(]'`
506
509
  = 0, line-final auxiliary check `grep -E '다[.。"]?$' | grep -vcE '니다[.。"]?$'` = 0
507
510
  (the family list alone misses endings such as 따른다/했다/있다 and unpunctuated
508
511
  line-final endings; the line-final check excludes 합쇼체 `-니다` endings so it does not
@@ -521,7 +524,7 @@ steps:
521
524
  python3 `re` equivalent of all THREE checks above, reading from the SAME piped stdin as
522
525
  (a) (`git diff -U0 -- <edited md/yaml files> | grep '^+' | python3 -c "import re,sys;
523
526
  text=sys.stdin.read();
524
- fam=len(re.findall(r'(한다|된다|않는다|따른다|했다|있다|없다|넣는다|이다)[.。 \"]', text));
527
+ fam=len(re.findall(r'(한다|된다|않는다|따른다|했다|있다|없다|넣는다|이다)[.。 \"(]', text));
525
528
  lf=len(re.findall(r'다[.。\"]?$', text, re.M)) - len(re.findall(r'니다[.。\"]?$', text, re.M));
526
529
  noun=len(re.findall(r'(함|됨|필요)[.。\"]?$', text, re.M));
527
530
  print(fam, lf, noun)"`, NOT a file-argument read — the input is the piped diff, never a
@@ -550,7 +553,11 @@ steps:
550
553
  delegation creates MUST live under a per-agent-unique path (`$TMPDIR` or the session
551
554
  scratchpad), never a fixed shared path (#1722 찐빠 #7). This governs the agent's own
552
555
  ad-hoc temp files; temp paths created at runtime by test code are governed by the
553
- separate test-code temp-path bullet below (#1778 찐빠 #4).
556
+ separate test-code temp-path bullet below (#1778 찐빠 #4); (i) when the edit writes a runnable
557
+ command or code snippet into rule/skill/guide/workflow text, the agent MUST copy that command OUT of the
558
+ edited file and run it on a positive and a negative fixture, putting both raw outputs in the
559
+ completion report (the #1752 fixture bullet below, carried here so it reaches the prompt;
560
+ #1781 찐빠 #1).
554
561
  - Any implement-stage delegation that writes an executable command or code snippet into
555
562
  rule/skill/guide/workflow TEXT (not a prose-only edit) MUST require, as a completion-report
556
563
  item, that the agent copy the command OUT of the edited file and run it once on a positive
@@ -706,6 +713,13 @@ steps:
706
713
  measurement; (c) no working around a discovered product or measurement defect to force
707
714
  a pass — halt and report instead (R023 「Conditional-Output Verification」 양성/음성 짝
708
715
  원칙 확장, #1721 찐빠 #1, #1727 찐빠 #2, #1728 찐빠 #2).
716
+ - A delegation that adds an item to an existing list or loop (e.g. a sync-file list) MUST
717
+ require, as a completion item, citing with file:line how that list handles preserveFiles,
718
+ protection and backup contracts, and judging whether the new item is consistent with the
719
+ other components in the same run (#1786 찐빠 #1).
720
+ - A delegation that writes migration/upgrade tests MUST require, as a completion item, that
721
+ every "old state" fixture be derived from that version's generator output (or real tagged
722
+ artifacts; cite the call used), never hand-written from source expressions (#1786 찐빠 #2).
709
723
  - Delegations (research or implementation) that design or fix test isolation or module
710
724
  mocking MUST include in their completion criteria a before/after coverage comparison
711
725
  of the target src file(s) AND the All-files total, measured with the SAME harness
@@ -50,14 +50,14 @@ MCP tool response (37K+ chars)
50
50
 
51
51
  ## Hook Configuration
52
52
 
53
- Configured in `.claude/hooks/hooks.json` PostToolUse section:
53
+ Configured in `.claude/hooks/hooks.json` PostToolUse section (the entry whose command runs `playwright-compress.sh`):
54
54
 
55
55
  ```json
56
56
  {
57
57
  "matcher": "mcp_tool_name matches \"mcp__playwright__.*\" || mcp_tool_name matches \"mcp__claude-in-chrome__.*\"",
58
58
  "hooks": [{
59
59
  "type": "command",
60
- "command": "bash .claude/hooks/scripts/playwright-compress.sh"
60
+ "command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/playwright-compress.sh\""
61
61
  }],
62
62
  "description": "Layer 4: Compress Playwright/Chrome MCP output via Haiku summarization"
63
63
  }
@@ -348,13 +348,13 @@ fi
348
348
  exit 0
349
349
  ```
350
350
 
351
- hooks.json 등록:
351
+ hooks.json 등록 (illustrative — `your-middleware.sh` is a placeholder, not a shipped script):
352
352
  ```json
353
353
  {
354
354
  "PreToolUse": [
355
355
  {
356
356
  "matcher": "Bash",
357
- "command": ".claude/hooks/your-middleware.sh",
357
+ "command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/scripts/your-middleware.sh\"",
358
358
  "description": "lifecycle: wrap_tool_call — 위험 패턴 감지"
359
359
  }
360
360
  ]
@@ -394,7 +394,7 @@ limitations:
394
394
  훅 스크립트의 단위 테스트:
395
395
  ```bash
396
396
  # PreToolUse hook 직접 테스트
397
- CLAUDE_TOOL_NAME="Bash" CLAUDE_TOOL_INPUT="rm -rf /" .claude/hooks/your-middleware.sh
397
+ CLAUDE_TOOL_NAME="Bash" CLAUDE_TOOL_INPUT="rm -rf /" .claude/hooks/scripts/your-middleware.sh
398
398
  echo "Exit: $?" # 0 또는 2 확인
399
399
  ```
400
400
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.93",
2
+ "version": "1.1.95",
3
3
  "lastUpdated": "2026-09-03",
4
4
  "omcustomMinClaudeCode": "2.1.121",
5
5
  "omcustomMinClaudeCodeReason": "Sensitive-path direct Write/Edit on .claude/** under bypassPermissions (R010 deprecation, #1101)",
@@ -413,7 +413,7 @@ steps:
413
413
 
414
414
  - name: deep-plan
415
415
  skill: deep-plan
416
- description: "Research-validated implementation plan (research → plan → verify) — skipped if docs-only, integrated-analysis allowed if lite; independent of tier, MAY run in lightweight mode when compression-mode-eval's 'Cross-tier — Lightweight Skill-Mode Substitution' conditions are met. MULTI-PHASE: 스킬을 그대로 spawn하지 말고 R020 「위임 경계를 Phase 개수로 설계」에 따라 단일 목표 위임으로 분할해 순차 발주한다 (#1595 #4). 리서치·계측 위임의 완료 조건에는 결론 수치를 산출물 표에서 jq/awk로 재계산해 병기하도록 명시한다(#1707 #4). 테스트 격리·모듈 모킹 수정을 다루는 리서치·계획 위임에도 대상 src 파일과 All files의 수정 전후 커버리지를 동일 하네스로 비교하도록 완료 조건에 명시합니다(#1778 찐빠 #5, implement 스텝 Rules와 동일 요구)."
416
+ description: "Research-validated implementation plan (research → plan → verify) — skipped if docs-only, integrated-analysis allowed if lite; independent of tier, MAY run in lightweight mode when compression-mode-eval's 'Cross-tier — Lightweight Skill-Mode Substitution' conditions are met. MULTI-PHASE: 스킬을 그대로 spawn하지 말고 R020 「위임 경계를 Phase 개수로 설계」에 따라 단일 목표 위임으로 분할해 순차 발주한다 (#1595 #4). 리서치·계측 위임의 완료 조건에는 결론 수치를 산출물 표에서 jq/awk로 재계산해 병기하도록 명시한다(#1707 #4). 테스트 격리·모듈 모킹 수정을 다루는 리서치·계획 위임에도 대상 src 파일과 All files의 수정 전후 커버리지를 동일 하네스로 비교하도록 완료 조건에 명시합니다(#1778 찐빠 #5, implement 스텝 Rules와 동일 요구). 적용 경계 표에는 각 행마다 이 위치를 읽는 위임 유형/단계 열을 두고 결함이 발생한 단계와 일치하는지 표에서 대조합니다(#1781 찐빠 #2). 기본값·출력 리터럴을 바꾸는 계획은 그 리터럴을 단언하는 기존 테스트를 git grep으로 전수 열거해 웨이브 표의 파일 소유권에 포함합니다(git grep은 untracked 파일을 보지 못하므로 git status --porcelain도 확인합니다, #1786 찐빠 #5)."
417
417
  depends_on: plan
418
418
 
419
419
  - name: implement
@@ -486,6 +486,9 @@ steps:
486
486
  its lightweight tier substitute, applying to lite and standard tiers, and
487
487
  implement-stage delegation prompts MUST carry the relevant boundary row for each edit
488
488
  (회고 제안 묶음 릴리즈의 통합 분석에 적용 경계 표 필수, #1735 찐빠 #4).
489
+ The table MUST include a column naming which delegation type/step reads each target
490
+ location and be checked against the step where the defect occurred; a mismatch means
491
+ the clause must also be placed at the location that step reads (#1781 찐빠 #2).
489
492
  - Before dispatching any delegation prompt in an iteration that created or reinforced a rule
490
493
  clause, the orchestrator MUST compare that clause's Anti-pattern table rows 1:1 against the
491
494
  delegation prompt's sentences and rewrite any match (cause: the R016 「신설 조항의 동일
@@ -502,7 +505,7 @@ steps:
502
505
  block: (a) Korean 합쇼체 for new sentences, do not imitate adjacent 반말 — completion
503
506
  criteria MUST include THREE deterministic checks, scoped to edited text files (md/yaml)
504
507
  and restricted to added lines only (`git diff -U0 -- <edited md/yaml files> | grep
505
- '^+'`): family check `grep -cE '(한다|된다|않는다|따른다|했다|있다|없다|넣는다|이다)[.。 "]'`
508
+ '^+'`): family check `grep -cE '(한다|된다|않는다|따른다|했다|있다|없다|넣는다|이다)[.。 "(]'`
506
509
  = 0, line-final auxiliary check `grep -E '다[.。"]?$' | grep -vcE '니다[.。"]?$'` = 0
507
510
  (the family list alone misses endings such as 따른다/했다/있다 and unpunctuated
508
511
  line-final endings; the line-final check excludes 합쇼체 `-니다` endings so it does not
@@ -521,7 +524,7 @@ steps:
521
524
  python3 `re` equivalent of all THREE checks above, reading from the SAME piped stdin as
522
525
  (a) (`git diff -U0 -- <edited md/yaml files> | grep '^+' | python3 -c "import re,sys;
523
526
  text=sys.stdin.read();
524
- fam=len(re.findall(r'(한다|된다|않는다|따른다|했다|있다|없다|넣는다|이다)[.。 \"]', text));
527
+ fam=len(re.findall(r'(한다|된다|않는다|따른다|했다|있다|없다|넣는다|이다)[.。 \"(]', text));
525
528
  lf=len(re.findall(r'다[.。\"]?$', text, re.M)) - len(re.findall(r'니다[.。\"]?$', text, re.M));
526
529
  noun=len(re.findall(r'(함|됨|필요)[.。\"]?$', text, re.M));
527
530
  print(fam, lf, noun)"`, NOT a file-argument read — the input is the piped diff, never a
@@ -550,7 +553,11 @@ steps:
550
553
  delegation creates MUST live under a per-agent-unique path (`$TMPDIR` or the session
551
554
  scratchpad), never a fixed shared path (#1722 찐빠 #7). This governs the agent's own
552
555
  ad-hoc temp files; temp paths created at runtime by test code are governed by the
553
- separate test-code temp-path bullet below (#1778 찐빠 #4).
556
+ separate test-code temp-path bullet below (#1778 찐빠 #4); (i) when the edit writes a runnable
557
+ command or code snippet into rule/skill/guide/workflow text, the agent MUST copy that command OUT of the
558
+ edited file and run it on a positive and a negative fixture, putting both raw outputs in the
559
+ completion report (the #1752 fixture bullet below, carried here so it reaches the prompt;
560
+ #1781 찐빠 #1).
554
561
  - Any implement-stage delegation that writes an executable command or code snippet into
555
562
  rule/skill/guide/workflow TEXT (not a prose-only edit) MUST require, as a completion-report
556
563
  item, that the agent copy the command OUT of the edited file and run it once on a positive
@@ -706,6 +713,13 @@ steps:
706
713
  measurement; (c) no working around a discovered product or measurement defect to force
707
714
  a pass — halt and report instead (R023 「Conditional-Output Verification」 양성/음성 짝
708
715
  원칙 확장, #1721 찐빠 #1, #1727 찐빠 #2, #1728 찐빠 #2).
716
+ - A delegation that adds an item to an existing list or loop (e.g. a sync-file list) MUST
717
+ require, as a completion item, citing with file:line how that list handles preserveFiles,
718
+ protection and backup contracts, and judging whether the new item is consistent with the
719
+ other components in the same run (#1786 찐빠 #1).
720
+ - A delegation that writes migration/upgrade tests MUST require, as a completion item, that
721
+ every "old state" fixture be derived from that version's generator output (or real tagged
722
+ artifacts; cite the call used), never hand-written from source expressions (#1786 찐빠 #2).
709
723
  - Delegations (research or implementation) that design or fix test isolation or module
710
724
  mocking MUST include in their completion criteria a before/after coverage comparison
711
725
  of the target src file(s) AND the All-files total, measured with the SAME harness