From 29c60c0b5437e603d7ae734c7accbd548e55dbb7 Mon Sep 17 00:00:00 2001 From: sangwook yoo Date: Tue, 12 May 2026 18:36:20 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=BD=94=EB=93=9C=EB=A6=AC=EB=B7=B0=20?= =?UTF-8?q?=EB=B3=B4=EA=B0=95=20=E2=80=94=20.gitignore=20=ED=99=94?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8=EB=A6=AC=EC=8A=A4=ED=8A=B8=20+=20=ED=9B=85?= =?UTF-8?q?=20case=20=EC=A0=95=EB=B0=80=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - .gitignore: .claude/** 차단 + settings.json·md negation 화이트리스트로 전환. settings.local.json/projects·history·todos·cache 등 머신 전용 파일 누수 차단. - .claude/settings.json: PreToolUse 훅 case 패턴을 첫 토큰 정확 매칭으로 교체. *grep* 과매칭(egrep·git grep·grepl) 및 rg 단독 미매칭 문제 해소. Co-Authored-By: Claude Opus 4.7 (1M context) --- .claude/settings.json | 2 +- .gitignore | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.claude/settings.json b/.claude/settings.json index eb18c34c..32375a3f 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -6,7 +6,7 @@ "hooks": [ { "type": "command", - "command": "CMD=$(python3 -c \"import json,sys; d=json.load(sys.stdin); print(d.get('tool_input',d).get('command',''))\" 2>/dev/null || true); case \"$CMD\" in *grep*|*rg\\ *|*ripgrep*|*find\\ *|*fd\\ *|*ack\\ *|*ag\\ *) [ -f graphify-out/graph.json ] && echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"additionalContext\":\"graphify: Knowledge graph exists. Read graphify-out/GRAPH_REPORT.md for god nodes and community structure before searching raw files.\"}}' || true ;; esac" + "command": "CMD=$(python3 -c \"import json,sys; d=json.load(sys.stdin); print(d.get('tool_input',d).get('command',''))\" 2>/dev/null || true); set -- $CMD; case \"$1\" in grep|egrep|fgrep|rg|ripgrep|find|fd|ack|ag) [ -f graphify-out/graph.json ] && echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"additionalContext\":\"graphify: Knowledge graph exists. Read graphify-out/GRAPH_REPORT.md for god nodes and community structure before searching raw files.\"}}' || true ;; esac" } ] } diff --git a/.gitignore b/.gitignore index f919efce..7f720b6a 100644 --- a/.gitignore +++ b/.gitignore @@ -65,5 +65,11 @@ graphify-out/ !.agents/**/*.md !.claude/**/*.md -# [local-only 2026-05-12] .claude/worktrees 는 git worktree 메타라 추적 제외 +# [local-only 2026-05-12] .claude 는 화이트리스트 방식 — settings.json + md 만 추적 +# 머신 전용(settings.local.json, projects/, history.jsonl, todos/, cache/ …) 은 모두 차단 +.claude/** +!.claude/**/ +!.claude/settings.json +!.claude/**/*.md +.claude/settings.local.json .claude/worktrees/