oh-my-customcode 0.138.0 → 0.139.0

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
@@ -13,7 +13,7 @@
13
13
 
14
14
  **[한국어 문서 (Korean)](./README_ko.md)**
15
15
 
16
- 49 agents. 117 skills. 22 rules. One command.
16
+ 49 agents. 118 skills. 23 rules. One command.
17
17
 
18
18
  ```bash
19
19
  npm install -g oh-my-customcode && cd your-project && omcustom init
@@ -132,7 +132,7 @@ Each agent declares its tools, model, memory scope, and limitations in YAML fron
132
132
 
133
133
  ---
134
134
 
135
- ### Skills (117)
135
+ ### Skills (118)
136
136
 
137
137
  | Category | Count | Includes |
138
138
  |----------|-------|----------|
@@ -210,7 +210,7 @@ All commands are invoked inside the Claude Code conversation.
210
210
 
211
211
  ---
212
212
 
213
- ### Rules (22)
213
+ ### Rules (23)
214
214
 
215
215
  | Priority | Count | Purpose |
216
216
  |----------|-------|---------|
@@ -222,7 +222,7 @@ Key rules: R010 (orchestrator never writes files), R009 (parallel execution mand
222
222
 
223
223
  ---
224
224
 
225
- ### Guides (50)
225
+ ### Guides (53)
226
226
 
227
227
  Reference documentation covering best practices, architecture decisions, and integration patterns. Located in `guides/` at project root, covering topics from agent design to CI/CD to observability.
228
228
 
@@ -272,7 +272,7 @@ your-project/
272
272
  ├── CLAUDE.md # Entry point
273
273
  ├── .claude/
274
274
  │ ├── agents/ # 49 agent definitions
275
- │ ├── skills/ # 117 skill modules
275
+ │ ├── skills/ # 118 skill modules
276
276
  │ ├── rules/ # 22 governance rules (R000-R021)
277
277
  │ ├── hooks/ # 15 lifecycle hook scripts
278
278
  │ ├── schemas/ # Tool input validation schemas
package/dist/cli/index.js CHANGED
@@ -2334,7 +2334,7 @@ var init_package = __esm(() => {
2334
2334
  workspaces: [
2335
2335
  "packages/*"
2336
2336
  ],
2337
- version: "0.138.0",
2337
+ version: "0.139.0",
2338
2338
  description: "Batteries-included agent harness for Claude Code",
2339
2339
  type: "module",
2340
2340
  bin: {
package/dist/index.js CHANGED
@@ -2014,7 +2014,7 @@ var package_default = {
2014
2014
  workspaces: [
2015
2015
  "packages/*"
2016
2016
  ],
2017
- version: "0.138.0",
2017
+ version: "0.139.0",
2018
2018
  description: "Batteries-included agent harness for Claude Code",
2019
2019
  type: "module",
2020
2020
  bin: {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "workspaces": [
4
4
  "packages/*"
5
5
  ],
6
- "version": "0.138.0",
6
+ "version": "0.139.0",
7
7
  "description": "Batteries-included agent harness for Claude Code",
8
8
  "type": "module",
9
9
  "bin": {
@@ -31,6 +31,13 @@ You are a QA execution specialist that runs tests, identifies defects, and valid
31
31
 
32
32
  Jest, Vitest, pytest, go test, JUnit, Playwright, Cypress
33
33
 
34
+ ## Verification Discipline
35
+
36
+ - Before writing a QA report, grep/read the target code and quote selectors, identifiers, filenames, and commands verbatim from the implementation.
37
+ - Do not invent `data-testid`, DOM selectors, function names, mapping names, or CLI flags from memory.
38
+ - If a browser/MCP/tool call is denied, do not retry the exact same call; switch to an allowed fallback and record the denial.
39
+ - When the same critical launch/runtime error appears twice, stop repeating launches and re-check flag semantics, existing processes, and environment assumptions.
40
+
34
41
  ## Collaboration
35
42
 
36
43
  Receives from: qa-writer (test cases), qa-planner (priorities). Outputs to: dev-lead (defects), qa-writer (results).
@@ -90,7 +90,17 @@
90
90
  "command": "bash .claude/hooks/scripts/rtk-intercept.sh"
91
91
  }
92
92
  ],
93
- "description": "RTK auto-intercept \u2014 transparently rewrites CLI commands through RTK proxy when available (R015 advisory)"
93
+ "description": "RTK auto-intercept transparently rewrites CLI commands through RTK proxy when available (R015 advisory)"
94
+ },
95
+ {
96
+ "matcher": "tool == \"Bash\" && tool_input.command matches \"git (reset|clean|checkout|restore|switch|rebase|merge)\"",
97
+ "hooks": [
98
+ {
99
+ "type": "command",
100
+ "command": "bash .claude/hooks/scripts/destructive-git-guard.sh"
101
+ }
102
+ ],
103
+ "description": "Warn before destructive git commands — advisory recovery guidance (R001/R021)"
94
104
  },
95
105
  {
96
106
  "matcher": "tool == \"Bash\" && tool_input.command matches \"(rm|git rm|mv|unlink|claude/rules)\"",
@@ -0,0 +1,60 @@
1
+ #!/bin/bash
2
+ # R001/R021 destructive git guard hook
3
+ # Warns before commands that can discard working tree, untracked files, or branches.
4
+ # Advisory tier only: emits stderr guidance, records PPID-scoped warnings, exits 0.
5
+ #
6
+ # PPID Scoping Convention:
7
+ # Session-scoped temp files MUST use $PPID (Claude Code parent PID), not $$.
8
+ # Pattern: /tmp/.claude-{purpose}-${PPID}
9
+
10
+ input=$(cat)
11
+ if command -v jq >/dev/null 2>&1; then
12
+ command_text=$(echo "$input" | jq -r '.tool_input.command // ""' 2>/dev/null)
13
+ elif command -v python3 >/dev/null 2>&1; then
14
+ command_text=$(INPUT_JSON="$input" python3 - <<'PY' 2>/dev/null
15
+ import json, os
16
+ try:
17
+ data = json.loads(os.environ.get('INPUT_JSON', ''))
18
+ print(data.get('tool_input', {}).get('command', ''))
19
+ except Exception:
20
+ print('')
21
+ PY
22
+ )
23
+ else
24
+ command_text=""
25
+ fi
26
+
27
+ VIOLATION_FILE="/tmp/.claude-destructive-git-guard-${PPID}"
28
+ matched=""
29
+
30
+ if printf '%s\n' "$command_text" | grep -Eq '(^|[;&|[:space:]])git[[:space:]]+reset[[:space:]]+--hard([[:space:]]|$)'; then
31
+ matched="git reset --hard"
32
+ elif printf '%s\n' "$command_text" | grep -Eq '(^|[;&|[:space:]])git[[:space:]]+clean[[:space:]]+([^;&|]*[[:space:]])?-f(dx|xd|d|x)?([[:space:]]|$)'; then
33
+ matched="git clean"
34
+ elif printf '%s\n' "$command_text" | grep -Eq '(^|[;&|[:space:]])git[[:space:]]+restore([[:space:]]+--[^;&|[:space:]]+)*([[:space:]]+(\.|\*|/|--worktree|--staged))*([[:space:]]|$)'; then
35
+ matched="git restore"
36
+ elif printf '%s\n' "$command_text" | grep -Eq '(^|[;&|[:space:]])git[[:space:]]+checkout[[:space:]]+--[[:space:]]+(\.|\*|/)([[:space:]]|$)'; then
37
+ matched="git checkout -- ."
38
+ elif printf '%s\n' "$command_text" | grep -Eq '(^|[;&|[:space:]])git[[:space:]]+branch[[:space:]]+-D([[:space:]]|$)'; then
39
+ matched="git branch -D"
40
+ fi
41
+
42
+ if [ -n "$matched" ]; then
43
+ echo "[Hook] DESTRUCTIVE GIT WARNING: detected '$matched' in Bash command" >&2
44
+ echo "[Hook] Advisory only (R021): command is not blocked, but it may discard local work." >&2
45
+ echo "[Hook] Before proceeding, verify git status and preserve work with git stash or a WIP commit." >&2
46
+ echo "[Hook] Recovery: use 'git reflog' to find prior HEADs; for deleted branches, check 'git reflog --all'." >&2
47
+
48
+ if printf '%s\n' "$command_text" | grep -Eq '(^|[;&|[:space:]])git[[:space:]]+branch[[:space:]]+-D([[:space:]]|$)'; then
49
+ echo "[Hook] Branch deletion note: prefer 'git branch -d' first so Git checks for unmerged commits." >&2
50
+ fi
51
+
52
+ printf '%s %s\n' "$(date -u +%Y-%m-%dT%H:%M:%SZ)" "$matched" >> "$VIOLATION_FILE"
53
+ violation_count=$(wc -l < "$VIOLATION_FILE" 2>/dev/null | tr -d ' ')
54
+ if [ "${violation_count:-0}" -ge 3 ]; then
55
+ echo "[Hook] Destructive git warnings: ${violation_count} this session — R021 promotion threshold reached" >&2
56
+ fi
57
+ fi
58
+
59
+ # Always pass through - this hook is advisory only.
60
+ echo "$input"
@@ -0,0 +1,77 @@
1
+ # [SHOULD] Verification Ladder Rules
2
+
3
+ > **Priority**: SHOULD | **ID**: R023
4
+
5
+ ## Core Rule
6
+
7
+ 검증은 비용/속도 ladder로 구성한다: **결정론적 검사 → cheap LLM → expensive LLM → human**. 가장 저렴한 tier가 먼저 통과해야 다음 tier로 진행한다. 더 낮은 tier에서 잡을 수 있는 문제를 더 비싼 tier에 보내지 않는다.
8
+
9
+ ## Ladder Tiers
10
+
11
+ | Tier | 도구 | 비용 | 속도 | 적용 시점 |
12
+ |------|------|------|------|-----------|
13
+ | **1: Deterministic** | hooks, linters, type-check, JSON schema | $0 | <1s | Pre-write, write-time |
14
+ | **2: Cheap LLM** | haiku-based skills (`dev-review`, `action-validator`) | $ | <30s | Per-file review |
15
+ | **3: Expensive LLM** | sonnet/opus skills (`deep-verify`, `adversarial-review`, `multi-model-verification`, `evaluator-optimizer`) | $$$ | 1-5분 | Pre-commit, PR review |
16
+ | **4: Human** | maintainer review | time | hours-days | Final gate, contested decisions |
17
+
18
+ ## Shift-left 원칙
19
+
20
+ 결정론적 단계가 잡을 수 있는 문제는 LLM에 보내지 않는다. LLM 검증은 ambiguous/semantic 문제에 집중한다.
21
+
22
+ - **좋은 예**: JSON schema 오류 → Tier 1 hook이 차단 → LLM에 미전달
23
+ - **나쁜 예**: 탭/스페이스 혼용 오류 → sonnet으로 전달 → 불필요한 비용 발생
24
+
25
+ R013 (SHOULD-ecomode)의 "저렴한 검증 우선" 원칙과 정합: ecomode는 출력 토큰을 절약하고, R023은 검증 비용을 절약한다.
26
+
27
+ ## 기존 자산 매핑
28
+
29
+ | Tier | 자산 | 역할 |
30
+ |------|------|------|
31
+ | **Tier 1** | `.claude/hooks/` (PreToolUse hooks) | 도구 호출 전 결정론적 차단 |
32
+ | **Tier 1** | `mgr-sauron` (R017 구조 검증) | 에이전트/스킬/가이드 frontmatter 검증 |
33
+ | **Tier 1** | pre-commit configs, linters | 코드 품질 정적 검사 |
34
+ | **Tier 2** | `dev-review` | 파일 단위 haiku 코드 리뷰 |
35
+ | **Tier 2** | `action-validator` | CI/CD 액션 구문 검증 |
36
+ | **Tier 2** | `pre-generation-arch-check` | 생성 전 아키텍처 lite 점검 |
37
+ | **Tier 3** | `deep-verify` | 다단계 품질 검증 (sonnet) |
38
+ | **Tier 3** | `adversarial-review` | 공격자 시각 보안 리뷰 (opus) |
39
+ | **Tier 3** | `multi-model-verification` | 복수 모델 교차 검증 |
40
+ | **Tier 3** | `evaluator-optimizer` | 평가-개선 반복 루프 |
41
+ | **Tier 3** | `worker-reviewer-pipeline` | 구현-리뷰 파이프라인 |
42
+ | **Tier 4** | maintainer manual review | PR approval, final gate |
43
+
44
+ ## R021과의 관계
45
+
46
+ R021 (MUST-enforcement-policy)과 R023은 **직교**한다. 두 규칙은 서로 다른 차원을 다룬다:
47
+
48
+ | 규칙 | 질문 | 차원 |
49
+ |------|------|------|
50
+ | **R021** | "어떻게 강제할 것인가?" | Hard block / Soft block / Advisory |
51
+ | **R023** | "어떤 비용으로 검증할 것인가?" | Deterministic / Cheap LLM / Expensive LLM |
52
+
53
+ 같은 도구가 두 규칙에 동시에 속할 수 있다:
54
+
55
+ - `mgr-sauron`: R021 관점에서 Advisory (PostToolUse hook), R023 관점에서 Tier 1 (구조 검증)
56
+ - `deep-verify`: R021 관점에서 Prompt-based (blocking 없음), R023 관점에서 Tier 3 (expensive LLM)
57
+ - `.claude/hooks/` stage-blocker: R021 관점에서 Hard Block, R023 관점에서 Tier 1
58
+
59
+ R021은 위반 시 어떻게 멈출지를, R023은 어떤 순서로 검증할지를 정의한다.
60
+
61
+ ## Self-Check
62
+
63
+ 새 검증 도구 추가 시:
64
+
65
+ - [ ] 어느 tier에 속하는지 명확한가?
66
+ - [ ] 같은 tier 내 중복 도구는 없는가?
67
+ - [ ] Tier 1에서 잡을 수 있는 문제를 다루는가? (상위 tier 대신 시프트 권고)
68
+ - [ ] Ladder 순서를 문서화했는가? (어떤 검사를 먼저 실행하는지)
69
+
70
+ ## Integration
71
+
72
+ | 규칙 | 상호작용 |
73
+ |------|---------|
74
+ | R009 (Parallel Execution) | Tier 1-2 검사는 독립 파일에 대해 병렬 실행 가능 |
75
+ | R013 (Ecomode) | 컨텍스트 압박 시 Tier 3를 Tier 2로 다운그레이드 고려 |
76
+ | R017 (Sync Verification) | Phase 1-3 검증 단계는 R023 Tier 1-3에 대응 |
77
+ | R021 (Enforcement Policy) | 직교: R021은 blocking 방식, R023은 검증 비용 순서 |
@@ -0,0 +1,163 @@
1
+ ---
2
+ name: crg-integration
3
+ description: code-review-graph (CRG) MCP wrapper — token-efficient context retrieval via AST knowledge graph. Exposes 4 core tools from CRG.
4
+ scope: core
5
+ version: 0.1.0
6
+ user-invocable: true
7
+ effort: low
8
+ ---
9
+
10
+ # CRG Integration Skill
11
+
12
+ code-review-graph (CRG) MCP 서버의 핵심 4개 도구를 노출하는 wrapper 스킬.
13
+ 전체 28개 도구 중 oh-my-customcode 워크플로우에서 가장 빈번하게 사용되는 도구만 선별해 사용자 학습 곡선을 축소한다.
14
+
15
+ ## 목적
16
+
17
+ - **8.2× 토큰 절감** (CRG 공식 벤치마크): AST 기반 지식 그래프로 전체 파일 대신 관련 노드만 추출
18
+ - **Recall-우선 설계**: precision 0.38 / MRR 0.35 — 누락 없음이 우선, 잡음은 감수
19
+ - **R013 ecomode 보완**: context 사용량 ≥ 60% 시점에 CRG 호출로 추가 컨텍스트 주입 비용 절감
20
+
21
+ > **⚠️ Recall이 정답이 아니다** — 아래 주의 섹션을 먼저 읽어라.
22
+
23
+ ## 노출 도구 4종
24
+
25
+ CRG 전체 28개 도구 중 핵심 4개만 노출한다.
26
+
27
+ | Tool | 용도 | 출력 형식 |
28
+ |------|------|----------|
29
+ | `get_minimal_context` | 변경 코드의 최소 컨텍스트 (인접 함수, import 그래프) | code excerpt + AST node list |
30
+ | `get_impact_radius` | 변경 시 영향 받는 함수/모듈 (recall-우선) | dependency tree |
31
+ | `query_graph` | AST 노드 그래프 쿼리 (예: "find all callers of X") | node graph |
32
+ | `detect_changes` | 두 시점 간 의미적 차이 감지 | semantic diff |
33
+
34
+ ## 설치 가이드
35
+
36
+ > R001 정책: auto-install 스크립트 금지. 아래 명령어는 **사용자가 직접** 실행한다.
37
+
38
+ ### 1단계: 패키지 설치
39
+
40
+ ```bash
41
+ # 방법 A: pip
42
+ pip install code-review-graph
43
+
44
+ # 방법 B: pipx (격리 환경 권장)
45
+ pipx install code-review-graph
46
+
47
+ # 방법 C: uvx (uv 사용 시)
48
+ uvx code-review-graph
49
+ ```
50
+
51
+ ### 2단계: .mcp.json 수동 설정
52
+
53
+ 프로젝트 루트 또는 `~/.claude/` 아래 `.mcp.json`을 **직접 편집**한다:
54
+
55
+ ```json
56
+ {
57
+ "mcpServers": {
58
+ "code-review-graph": {
59
+ "command": "code-review-graph",
60
+ "args": []
61
+ }
62
+ }
63
+ }
64
+ ```
65
+
66
+ auto-install hook 또는 스크립트로 `.mcp.json`을 자동 수정하는 방식은 R001 위반이다.
67
+
68
+ ### 3단계: 초기 인덱싱
69
+
70
+ ```bash
71
+ # 명시적 인덱싱 (선택 — 첫 MCP 호출 시 lazy 인덱싱도 가능)
72
+ code-review-graph index
73
+ ```
74
+
75
+ 자세한 설치/설정 절차는 `guides/token-efficiency/crg.md` 참조.
76
+
77
+ ## 사용 패턴
78
+
79
+ ### PR 리뷰 전: 변경 폭 파악
80
+
81
+ ```
82
+ get_impact_radius(changed_files=[...])
83
+ → dependency tree 확인 → 리뷰 범위 결정
84
+ ```
85
+
86
+ ### 코드 검색: token-efficient lookup
87
+
88
+ ```
89
+ query_graph(query="find all callers of process_event")
90
+ → AST node graph → 전체 파일 읽지 않고 호출 지점만 추출
91
+ ```
92
+
93
+ ### 디버깅: 관련 함수만 추출
94
+
95
+ ```
96
+ get_minimal_context(file="src/handler.py", line=142)
97
+ → code excerpt + AST nodes → 필요한 컨텍스트만 주입
98
+ ```
99
+
100
+ ### 리팩토링: 의미적 변경 확인
101
+
102
+ ```
103
+ detect_changes(before_ref="HEAD~1", after_ref="HEAD")
104
+ → semantic diff → 이름 변경/이동 등 구조 변경 감지
105
+ ```
106
+
107
+ ## ⚠️ 주의 — Recall이 정답이 아니다
108
+
109
+ CRG는 recall 최적화 도구다. 다음 사항을 반드시 숙지한다:
110
+
111
+ | 오해 | 실제 |
112
+ |------|------|
113
+ | "결과에 없으면 없는 것" | recall-tuned — 일부 관련 코드가 누락될 수 있다 |
114
+ | "precision 0.38 = 결과 62% 오답" | recall-우선 튜닝의 precision trade-off. 잡음은 정상 |
115
+ | "CRG 하나로 충분" | 누락 발생 시 grep, semantic search 병행 필수 |
116
+ | "모든 작업에 8.2× 절감" | AST 검색이 적합한 작업에 한정. UI 리뷰, 자연어 검색은 효과 미미 |
117
+
118
+ **결론**: CRG는 보조 도구다. 결과를 맹신하지 말고 누락 가능성을 항상 고려한다.
119
+
120
+ ## 다른 자산과의 관계
121
+
122
+ ### 보완 관계 (함께 사용)
123
+
124
+ | 자산 | 조합 방식 |
125
+ |------|----------|
126
+ | `dev-review` | CRG로 영향 범위 파악 → dev-review로 상세 리뷰 |
127
+ | `adversarial-review` | CRG `get_minimal_context` → adversarial-review 입력 최적화 |
128
+ | `claude-mem:smart-explore` | CRG `query_graph`로 대체 가능 (Phase β 시퀀싱 — #1169 참조) |
129
+ | `claude-mem:pathfinder` | CRG `get_impact_radius`로 대체 가능 (Phase β 시퀀싱 — #1169 참조) |
130
+
131
+ ### 마이그레이션 예정 (Phase β)
132
+
133
+ - `claude-mem:smart-explore` → CRG `query_graph` (#1169)
134
+ - `claude-mem:pathfinder` → CRG `get_impact_radius` (#1169)
135
+
136
+ Phase β 완료 전까지는 두 자산을 병행 사용한다.
137
+
138
+ ## R013 Ecomode와의 관계
139
+
140
+ R013 ecomode가 자동 활성화되는 시점 (context 사용량 ≥ 60%)에서 CRG를 적극 활용한다:
141
+
142
+ | Ecomode 상황 | CRG 활용법 |
143
+ |-------------|-----------|
144
+ | 파일 전체 읽기 대신 | `get_minimal_context` → 필요한 노드만 추출 |
145
+ | 광범위 grep 대신 | `query_graph` → AST 수준 정밀 검색 |
146
+ | 변경 범위 파악 대신 | `get_impact_radius` → dependency tree만 수신 |
147
+
148
+ ## 트러블슈팅
149
+
150
+ | 증상 | 원인 | 해결 |
151
+ |------|------|------|
152
+ | MCP 도구가 보이지 않음 | `.mcp.json` 미설정 또는 경로 오류 | `.mcp.json` 확인, Claude Code 재시작 |
153
+ | `command not found: code-review-graph` | 패키지 미설치 또는 PATH 누락 | `pip install code-review-graph` 재실행, `which code-review-graph` 확인 |
154
+ | 인덱싱 오류 | 초기 인덱싱 미완료 | `code-review-graph index` 실행 후 재시도 |
155
+ | 결과 누락 (예상 함수 없음) | recall-tuned 동작 — 정상 | grep 또는 semantic search 병행 |
156
+ | 서버 연결 실패 | CRG 서버 미실행 | MCP 서버 로그 확인, Claude Code 재시작 |
157
+
158
+ ## 참고
159
+
160
+ - 상세 설치/설정: `guides/token-efficiency/crg.md`
161
+ - 관련 이슈: #1171 (scout:integrate CRG)
162
+ - Phase β 시퀀싱: #1169 (AgentMemory 전환 계획)
163
+ - 기술 출처: [tirth8205/code-review-graph](https://github.com/tirth8205/code-review-graph)
@@ -86,6 +86,7 @@ oh-my-customcode로 구동됩니다.
86
86
  | R013 | Ecomode | 배치 작업 토큰 효율성 |
87
87
  | R019 | Ontology-RAG 라우팅 | 라우팅 스킬의 ontology-RAG enrichment |
88
88
  | R022 | Wiki 동기화 | 에이전트/스킬/룰/가이드 변경 시 위키 자동 동기화 |
89
+ | R023 | Verification Ladder | 검증 비용 ladder: Tier 1(결정론적) → Tier 4(human) shift-left |
89
90
 
90
91
  ### MAY (선택)
91
92
  | ID | 규칙 | 설명 |
@@ -48,8 +48,8 @@ templates/
48
48
  ├── manifest.json # 배포 컴포넌트 카운트 및 메타데이터
49
49
  ├── .claude/
50
50
  │ ├── agents/ # 에이전트 정의 파일 (*.md, 49개)
51
- │ ├── skills/ # 스킬 모듈 (각 디렉토리에 SKILL.md, 117개)
52
- │ ├── rules/ # 전역 규칙 (R000–R022, 22개)
51
+ │ ├── skills/ # 스킬 모듈 (각 디렉토리에 SKILL.md, 118개)
52
+ │ ├── rules/ # 전역 규칙 (R000–R023, 23개)
53
53
  │ ├── hooks/
54
54
  │ │ ├── hooks.json # 훅 이벤트 설정 (PreToolUse/PostToolUse 등)
55
55
  │ │ └── scripts/ # 훅 셸 스크립트 (34개)
@@ -86,7 +86,7 @@ CI의 `verify-template-sync.sh`가 소스와 templates/ 간 일치를 검증합
86
86
  | Manager | 6 |
87
87
  | System | 4 |
88
88
 
89
- ### Skills (117)
89
+ ### Skills (118)
90
90
 
91
91
  `.claude/skills/*/SKILL.md` — 재사용 가능한 스킬 모듈.
92
92
 
@@ -97,9 +97,9 @@ CI의 `verify-template-sync.sh`가 소스와 templates/ 간 일치를 검증합
97
97
  - `harness` — 에이전트/스킬/룰 유지보수 도구 (init 시 배포됨)
98
98
  - `package` — 패키지 특화 도구 (선택 배포)
99
99
 
100
- ### Rules (22)
100
+ ### Rules (23)
101
101
 
102
- `.claude/rules/*.md` — 에이전트 행동 규칙 (R000–R022, R014 없음).
102
+ `.claude/rules/*.md` — 에이전트 행동 규칙 (R000–R023, R014 없음).
103
103
 
104
104
  파일명 형식: `{PRIORITY}-{name}.md` (예: `MUST-agent-identification.md`)
105
105
 
@@ -109,13 +109,13 @@ CI의 `verify-template-sync.sh`가 소스와 templates/ 간 일치를 검증합
109
109
  | `SHOULD` | 강력 권장 | R003 상호작용, R013 Ecomode |
110
110
  | `MAY` | 선택 | R005 최적화 |
111
111
 
112
- ### Guides (50)
112
+ ### Guides (51)
113
113
 
114
114
  `guides/*/` — 레퍼런스 문서 디렉토리.
115
115
 
116
116
  각 디렉토리는 단일 토픽에 대한 best practices, 튜토리얼, 또는 설계 가이드를 담습니다. 에이전트가 작업 중 참조합니다 (R006 관심사 분리).
117
117
 
118
- ### Hooks (34)
118
+ ### Hooks (35)
119
119
 
120
120
  `.claude/hooks/scripts/*.sh` — 라이프사이클 훅 스크립트.
121
121
 
@@ -0,0 +1,35 @@
1
+ # Autonomous Challenge Lessons
2
+
3
+ Lessons from the 2026-05 Minecraft Cobblemon autonomous run post-mortem (#1149). Use these as guardrails for long-running challenge, QA, and tool-heavy sessions.
4
+
5
+ ## First-five-minutes ground-truth check
6
+
7
+ Before producing solution artifacts, ask whether the environment already contains a reference, answer jar, fixture, golden output, or expected patch.
8
+
9
+ - Inspect supplied artifacts before inventing a mechanism.
10
+ - If a jar/binary/package is provided as the expected fix, disassemble or inspect it early.
11
+ - Verify framework version and mapping namespace before writing code. For Minecraft/Fabric-style work, decide Mojang official vs Yarn mappings from the actual target environment, not from memory.
12
+
13
+ ## Tool denial and repeated failure policy
14
+
15
+ - If a tool call is denied by permissions, do not retry the exact same call. Switch to a permitted route and record the denial.
16
+ - If the same critical error appears twice, stop relaunching and re-check flag semantics, existing singleton processes, and environment state.
17
+ - For launcher-style tools, clear known singleton processes before a fresh launch when safe and appropriate.
18
+ - Treat ambiguous CLI flags as suspect until confirmed by docs or help output. Example: an `--offline` flag may force missing-library failures rather than simply avoid network calls.
19
+
20
+ ## QA evidence discipline
21
+
22
+ QA reports must quote implementation identifiers verbatim:
23
+
24
+ - grep/read the target code before naming `data-testid`, selectors, function names, or config keys;
25
+ - include the exact file path and line when possible;
26
+ - do not infer selectors or identifiers from screenshots, memory, or prior drafts.
27
+
28
+ ## Long autonomous run checkpoint
29
+
30
+ At each major phase boundary:
31
+
32
+ 1. Re-check the ground-truth artifact or expected output.
33
+ 2. Re-check version/mapping assumptions.
34
+ 3. Review repeated-denial or repeated-error patterns.
35
+ 4. Confirm QA evidence came from code or executed commands, not assumptions.
@@ -266,6 +266,77 @@ retire/wake 사이클 후에도 `--dangerously-skip-permissions` 플래그가
266
266
 
267
267
  **Action items**: Fast Mode를 사용하는 경우 Opus 4.7 전환 영향을 확인하고, 필요 시 `CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE=1`로 고정. `MCP_TOOL_TIMEOUT` 설정이 필요한 환경에서는 선택적으로 적용.
268
268
 
269
+ ## v2.1.143 (2026-05-15) — 호환성 점검
270
+
271
+ > Issue: #1166 — CC v2.1.143 compatibility documentation
272
+
273
+ ### Plugin dependency enforcement
274
+
275
+ `claude plugin disable` now refuses to disable a plugin when another enabled plugin depends on it, and prints a copy-pasteable disable-chain hint. `claude plugin enable` force-enables transitive dependencies.
276
+
277
+ **oh-my-customcode 연관**: 필수/권장 플러그인(superpowers, context7, elements-of-style 등)을 함께 운영할 때 의존성 순서 실수가 줄어듭니다. 플러그인 비활성화 자동화는 실패 메시지의 disable-chain 힌트를 그대로 따르도록 해야 합니다. 직접 harness 변경 불필요.
278
+
279
+ ### `/plugin` marketplace projected context cost
280
+
281
+ Marketplace browse pane now shows projected context cost estimates per turn and per invocation.
282
+
283
+ **oh-my-customcode 연관**: R013 ecomode 및 토큰 효율 감사에서 플러그인 선택 근거가 개선됩니다. `/plugin details`와 함께 플러그인 도입 전 비용 점검에 활용합니다.
284
+
285
+ ### `worktree.bgIsolation: "none"`
286
+
287
+ New setting lets background sessions edit the working copy directly without `EnterWorktree` for repositories where worktrees are impractical.
288
+
289
+ ```json
290
+ {
291
+ "worktree": {
292
+ "bgIsolation": "none"
293
+ }
294
+ }
295
+ ```
296
+
297
+ **oh-my-customcode 연관**: R009/R018 병렬 작업에서 worktree가 불가능한 저장소의 fallback 옵션입니다. 같은 working copy를 공유하므로 충돌 위험이 있습니다. 사용 전 `git status --short --branch`를 확인하고, 병렬 파일 소유권을 명확히 나누는 경우에만 opt-in 하세요.
298
+
299
+ ### PowerShell execution policy bypass
300
+
301
+ PowerShell tool now passes `-ExecutionPolicy Bypass`. Opt out with:
302
+
303
+ ```bash
304
+ export CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY=1
305
+ ```
306
+
307
+ **oh-my-customcode 연관**: Windows 환경에서 hook/script 실행 호환성이 좋아집니다. 보수적 enterprise policy 환경에서는 위 opt-out을 문서화하세요.
308
+
309
+ ### Background sessions preserve model and effort
310
+
311
+ Background sessions now preserve the model and effort level set after waking from idle. Shift+Tab in attached agent sessions now includes auto mode in the cycle.
312
+
313
+ **oh-my-customcode 연관**: R006 agent frontmatter의 `model`/`effort`와 장시간 R018 세션 운영이 더 안정적입니다. 별도 변경 없음.
314
+
315
+ ### Fixes relevant to agent harnesses
316
+
317
+ - Corrupt `.credentials.json` with non-array `scopes` no longer hangs startup or silently aborts OAuth token refresh.
318
+ - Stop hooks that block repeatedly now end the turn with a warning after 8 consecutive blocks. Override with `CLAUDE_CODE_STOP_HOOK_BLOCK_CAP`.
319
+ - Esc/Ctrl+C cancels pending `/loop` wakeup while idle.
320
+ - `/goal` evaluator no longer fires while background shells or delegated subagents are still running.
321
+ - `NO_COLOR`/`FORCE_COLOR` in settings env now apply to subprocesses only, preserving Claude Code UI colors.
322
+ - Agent view avoids repeated PowerShell processes on Windows.
323
+ - `/bg` without a prompt now waits for input instead of sending `continue`.
324
+ - `--agent <name>` can find plugin-contributed agents without the `plugin:` prefix.
325
+
326
+ ### oh-my-customcode 연관 평가
327
+
328
+ | 변경 | 영향 | Action |
329
+ |------|------|--------|
330
+ | Plugin dependency enforcement | 플러그인 disable/enable 순서 안전 | None |
331
+ | Marketplace context cost | R013 비용 점검 개선 | Use in token audits |
332
+ | `worktree.bgIsolation: "none"` | worktree 불가 repo fallback | Opt-in only with file ownership discipline |
333
+ | PowerShell policy bypass | Windows script 호환성 | Enterprise opt-out 문서화 |
334
+ | BG model/effort persistence | 장시간 에이전트 안정성 | None |
335
+ | Stop hook block cap | hook 무한루프 안전 | Hook 테스트 시 8회 cap 인지 |
336
+ | `/goal`, `/loop`, `/bg`, plugin agent fixes | autonomous workflow 안정성 | None |
337
+
338
+ **Action items**: 직접 변경 불필요. `worktree.bgIsolation: "none"`은 충돌 위험이 있으므로 기본값으로 권장하지 않고, R009 병렬 작업에서는 기존 worktree 격리를 우선합니다.
339
+
269
340
  ## v2.1.141 (2026-05-13) — 호환성 점검
270
341
 
271
342
  > Issue: #1137 — CC v2.1.141 compatibility documentation
@@ -0,0 +1,197 @@
1
+ # Compound AI Workflow
2
+
3
+ > 모든 완료된 artifact가 다음 세션의 context로 누적된다.
4
+
5
+ Eugene Yan의 ["How to Work and Compound with AI"](https://eugeneyan.com/writing/working-with-ai/)에서 추출한 5원칙을 oh-my-customcode 인벤토리에 내재화한 레퍼런스 가이드. 이 가이드는 시스템을 처음 접하는 기여자와 기존 사용자 모두를 위한 entry point 역할을 한다.
6
+
7
+ ---
8
+
9
+ ## 1. 개요
10
+
11
+ **compound effect**란 AI와의 모든 상호작용이 단순히 소비되지 않고, 다음 작업의 질과 속도를 높이는 재료로 누적되는 현상이다. 각 세션에서 생성된 skill, memory, guide, rule이 쌓일수록 시스템은 점점 더 빠르고 정확하게 작동한다.
12
+
13
+ oh-my-customcode는 이 원리를 아키텍처 전반에 내재화한다:
14
+
15
+ - **Skills**: 재사용 가능한 워크플로우 지식
16
+ - **Agents**: 스킬을 조합한 실행 가능한 전문가
17
+ - **Rules**: 시스템 전체에 걸친 행동 제약
18
+ - **Memory**: 세션 간 누적되는 패턴과 피드백
19
+
20
+ ---
21
+
22
+ ## 2. Eugene Yan 5원칙
23
+
24
+ ### 원칙 1: Context Infrastructure
25
+
26
+ 구조화된 디렉토리와 annotated indices가 AI에게 풍부한 컨텍스트를 제공한다. 파일이 어디에 있는지, 무슨 역할인지를 AI가 스스로 파악할 수 있도록 레이아웃과 색인이 설계되어야 한다. 임시 파일과 unstructured dump는 AI의 추론 품질을 떨어뜨린다. 잘 정비된 디렉토리 구조는 AI가 "기억 없이도" 프로젝트를 이해하게 만드는 구조적 기억이다.
27
+
28
+ ### 원칙 2: Taste as Configuration
29
+
30
+ AI의 출력 품질은 사용자의 취향(taste)을 얼마나 잘 설정했느냐에 달려 있다. CLAUDE.md와 규칙 파일은 이 취향을 코드화한 것이다. 스타일, 언어 정책, 금지된 패턴, 선호하는 위임 방식을 선언적으로 정의하면 AI는 매 세션마다 동일한 기준으로 작동한다. 취향은 대화로 가르치는 것이 아니라 설정으로 배포하는 것이다.
31
+
32
+ ### 원칙 3: Verification Ladders
33
+
34
+ 검증은 비용 순서대로 쌓인 사다리여야 한다. 가장 저렴한 결정론적 검사가 먼저 통과되어야 비싼 LLM 검토로 이어진다. hooks, linters, type-checker가 잡을 수 있는 오류를 sonnet/opus에 보내는 것은 낭비다. shift-left 원칙: 문제를 발견하는 시점을 최대한 앞으로 당긴다. 자세한 내용은 R023 (SHOULD-verification-ladder)를 참조.
35
+
36
+ ### 원칙 4: Scaled Delegation
37
+
38
+ 위임의 깊이는 작업의 크기와 위험도에 비례해야 한다. 간단한 파일 편집은 pair-programming 스타일로 직접 호출하고, 복잡한 다단계 작업은 `/pipeline auto-dev`로 완전 위임한다. 위임 스펙트럼을 이해하고 올바른 깊이를 선택하는 것이 AI 협업 효율의 핵심이다.
39
+
40
+ ### 원칙 5: Loop Closure
41
+
42
+ AI와의 대화 기록(transcript)은 단순 로그가 아니라 패턴 마이닝의 원천이다. 반복적으로 수정하게 되는 패턴, AI가 자주 오해하는 패턴, 성공적인 위임 패턴을 추출해 skill로 승격시키는 것이 loop closure다. 이 루프가 닫혀야 compound effect가 발생한다.
43
+
44
+ ---
45
+
46
+ ## 3. oh-my-customcode 매핑표
47
+
48
+ | Yan 원칙 | 대응 자산 | 비고 |
49
+ |---------|----------|------|
50
+ | **Context Infrastructure** | `.claude/agent-memory/`, MEMORY.md, R011 (`SHOULD-memory-integration`), `wiki/` | 에이전트별 project-scoped 메모리 + wiki 색인 |
51
+ | **Taste as Configuration** | `CLAUDE.md`, `.claude/rules/` (R000-R023), `.claude/output-styles/` | 규칙 cascade: global → project → agent frontmatter |
52
+ | **Verification Ladders** | R023 `SHOULD-verification-ladder`, `deep-verify`, `multi-model-verification`, `adversarial-review`, `mgr-sauron` | Tier 1-4 shift-left ladder |
53
+ | **Scaled Delegation** | `structured-dev-cycle`, `dev-lead-routing`, `/pipeline auto-dev` | pair → stage-gated → full delegation 스펙트럼 |
54
+ | **Loop Closure** | `skill-extractor` (`--mode failure`), R016 (`MUST-continuous-improvement`), `omcustom-loop` | 패턴 채굴 → skill 승격 자동화 |
55
+
56
+ ---
57
+
58
+ ## 4. Compound Effect: 시스템 사고 프레이밍
59
+
60
+ oh-my-customcode는 소프트웨어 컴파일과 동일한 구조를 따른다:
61
+
62
+ | 컴파일 개념 | oh-my-customcode 매핑 | compound 효과 |
63
+ |-----------|---------------------|--------------|
64
+ | Source code | `.claude/skills/` | 재사용 가능한 지식 누적 |
65
+ | Build artifacts | `.claude/agents/` | 스킬 조합으로 전문가 생성 |
66
+ | Compiler | `mgr-sauron` (R017) | 구조 정합성 보장 |
67
+ | Spec | `.claude/rules/` | 빌드 규칙의 지속적 진화 |
68
+ | Linker | Routing skills | 에이전트-작업 연결 최적화 |
69
+ | Standard library | `guides/` | 공유 레퍼런스 지식 누적 |
70
+
71
+ 이 메타포에서 compound effect가 발생하는 지점:
72
+
73
+ 1. **세션 1**: 새 패턴 발견 → skill 초안 작성
74
+ 2. **세션 2**: skill 재사용 → 작업 시간 단축
75
+ 3. **세션 3**: skill 실패 패턴 채굴 → skill 개선 (R016 + skill-extractor)
76
+ 4. **세션 N**: 누적된 skill/rule/memory가 신규 작업의 context로 자동 주입
77
+
78
+ 각 artifact(skill, agent, guide, memory)는 독립적 가치가 아니라 **시스템 전체의 지식 밀도**를 높이는 방식으로 기여한다. 하나의 잘 작성된 skill이 10개 세션에서 반복 재사용될 때 compound effect가 실현된다.
79
+
80
+ ---
81
+
82
+ ## 5. Scaled Delegation 스펙트럼
83
+
84
+ 위임 깊이는 작업의 복잡도, 위험도, 반복성에 따라 결정된다.
85
+
86
+ ### 스펙트럼 개요
87
+
88
+ | 위임 깊이 | 패턴 | 대표 자산 | 적합한 작업 |
89
+ |---------|------|----------|-----------|
90
+ | **Pair-programming** | 직접 에이전트 호출 | 특정 에이전트 직접 지시 | 단일 파일 수정, ad-hoc 질문, 빠른 확인 |
91
+ | **Stage-gated** | structured-dev-cycle | `structured-dev-cycle` (6-stage) | 기능 구현, 리팩토링, 복잡한 버그 수정 |
92
+ | **Full delegation** | 파이프라인 자동화 | `/pipeline auto-dev` | 이슈 기반 완전 자동 개발 사이클 |
93
+
94
+ ### 위임 깊이 선택 가이드
95
+
96
+ ```
97
+ 작업 크기 / 위험도에 따른 선택:
98
+
99
+ Low risk + 단일 파일 + 명확한 요구사항
100
+ → Pair-programming: "이 함수의 에러 핸들링을 개선해줘"
101
+
102
+ Medium risk + 다중 파일 + 테스트 필요
103
+ → Stage-gated: structured-dev-cycle
104
+ [Stage 1] 분석 (Read only)
105
+ [Stage 2] 설계 검토
106
+ [Stage 3] 구현 (Write 허용)
107
+ [Stage 4] 검증 (Test 실행)
108
+ [Stage 5] 문서화
109
+ [Stage 6] 완료 검증 (R020)
110
+
111
+ High volume + 이슈 목록 + CI 검증 가능
112
+ → Full delegation: /pipeline auto-dev
113
+ 이슈 선택 → 자동 분석 → 구현 → PR 생성
114
+ ```
115
+
116
+ ### Stage-gated 상세: structured-dev-cycle
117
+
118
+ 6-stage 워크플로우로 각 단계에서 도구 제한을 적용:
119
+
120
+ | 단계 | 허용 도구 | 목표 |
121
+ |------|---------|------|
122
+ | 1. Analysis | Read, Glob, Grep | 현재 상태 파악, 요구사항 명확화 |
123
+ | 2. Design | Read, EnterPlanMode | 변경 범위 결정, 아키텍처 검토 |
124
+ | 3. Implementation | Read, Write, Edit | 코드 작성, 파일 수정 |
125
+ | 4. Verification | Bash (test), Read | 테스트 실행, 정적 분석 |
126
+ | 5. Documentation | Write, Edit | 문서 업데이트, changelog |
127
+ | 6. Completion | Read | R020 완료 검증, 최종 확인 |
128
+
129
+ ### Full Delegation: /pipeline auto-dev
130
+
131
+ 완전 자동화 사이클. 인간 개입 없이 이슈에서 PR까지:
132
+
133
+ ```
134
+ 이슈 선택
135
+
136
+ mgr-sauron: 구조 검증
137
+
138
+ dev-lead-routing: 전문 에이전트 배정
139
+
140
+ 구현 (전문 에이전트)
141
+
142
+ qa-planner: 검증 계획
143
+
144
+ mgr-gitnerd: PR 생성
145
+
146
+ wiki-curator: 문서 동기화 (R022)
147
+ ```
148
+
149
+ **적합한 조건**: 명확한 이슈 스펙, 기존 테스트 커버리지, CI가 통과/실패를 판단 가능한 경우.
150
+
151
+ ---
152
+
153
+ ## 6. 신규 기여자 Entry Point
154
+
155
+ ### 학습 경로
156
+
157
+ ```
158
+ 1. CLAUDE.md → 시스템 전체 철학, 강제 규칙 요약
159
+ 2. 본 가이드 → compound effect 이해, 5원칙 매핑
160
+ 3. .claude/rules/ → 개별 규칙 상세 (R000-R023)
161
+ 4. .claude/skills/ → 재사용 가능한 워크플로우 목록
162
+ 5. .claude/agents/ → 전문 에이전트 역할과 도구 목록
163
+ 6. guides/ → 도메인별 레퍼런스 문서
164
+ ```
165
+
166
+ ### 자주 묻는 질문
167
+
168
+ **"어떤 에이전트를 사용해야 하나?"**
169
+ `/omcustom:lists`로 전체 목록 확인. 없으면 `mgr-creator`가 자동 생성.
170
+
171
+ **"새 skill을 추가하고 싶다"**
172
+ `mgr-creator`에게 위임. R006 (MUST-agent-design) 준수 필수.
173
+
174
+ **"AI가 같은 실수를 반복한다"**
175
+ R016 (MUST-continuous-improvement): 룰 업데이트 → commit. `skill-extractor --mode failure`로 패턴 채굴.
176
+
177
+ **"작업이 너무 오래 걸린다"**
178
+ R009 (MUST-parallel-execution): 독립 작업 2개 이상은 병렬 실행 필수.
179
+
180
+ **"컨텍스트가 너무 길어졌다"**
181
+ R013 (SHOULD-ecomode): 80% 이상에서 자동 활성화. `/compact` 또는 ecomode on.
182
+
183
+ ---
184
+
185
+ ## 7. 참고
186
+
187
+ | 항목 | 링크 |
188
+ |------|------|
189
+ | Eugene Yan 원글 | https://eugeneyan.com/writing/working-with-ai/ |
190
+ | 관련 이슈 | #1172 (scout:internalize compound-ai-workflow) |
191
+ | R023 Verification Ladder | `.claude/rules/SHOULD-verification-ladder.md` |
192
+ | R016 Continuous Improvement | `.claude/rules/MUST-continuous-improvement.md` |
193
+ | R011 Memory Integration | `.claude/rules/SHOULD-memory-integration.md` |
194
+ | R013 Ecomode | `.claude/rules/SHOULD-ecomode.md` |
195
+ | skill-extractor | `.claude/skills/skill-extractor/SKILL.md` |
196
+ | structured-dev-cycle | `.claude/skills/structured-dev-cycle/SKILL.md` |
197
+ | 관련 메모리 | [[project-sequencing-alpha-beta-gamma]] |
@@ -0,0 +1,218 @@
1
+ # CRG (code-review-graph) 통합 가이드
2
+
3
+ > **출처**: [tirth8205/code-review-graph](https://github.com/tirth8205/code-review-graph)
4
+ > **관련 이슈**: #1171 (scout:integrate), #1169 (Phase β AgentMemory 전환)
5
+ > **wrapper 스킬**: `.claude/skills/crg-integration/SKILL.md`
6
+
7
+ ## CRG 개요
8
+
9
+ code-review-graph(CRG)는 Python 기반 MCP(Model Context Protocol) 서버로, 코드베이스를 AST(Abstract Syntax Tree) 기반 지식 그래프로 변환하여 token-efficient한 컨텍스트 검색을 제공한다.
10
+
11
+ ### 핵심 특성
12
+
13
+ | 항목 | 값 |
14
+ |------|-----|
15
+ | 구현 | Python MCP server |
16
+ | 전체 도구 수 | ~28개 |
17
+ | oh-my-customcode 노출 | 4개 (crg-integration 스킬) |
18
+ | 토큰 절감 벤치마크 | **8.2×** (AST 검색이 적합한 작업 기준) |
19
+ | Precision | 0.38 (recall-우선 튜닝 결과) |
20
+ | MRR | 0.35 |
21
+
22
+ ### R013 Ecomode 정합성
23
+
24
+ CRG의 8.2× 토큰 절감은 R013 ecomode의 목표와 직접 정합한다. ecomode가 context 사용량 ≥ 60%에서 자동 활성화될 때, CRG 호출로 추가 파일 읽기 비용을 대폭 줄일 수 있다.
25
+
26
+ ## ⚠️ Recall vs Precision — 핵심 경고
27
+
28
+ > **CRG는 recall이 정답이다. 일부 결과가 누락되면 보조 도구(grep, semantic search)를 병행하라.**
29
+
30
+ CRG는 누락(false negative)보다 잡음(false positive)을 선호하도록 튜닝되어 있다:
31
+
32
+ - precision 0.38은 "결과의 38%만 정확"이라는 의미가 **아니다**
33
+ - recall-우선 튜닝의 trade-off — 관련 없는 노드가 포함될 수 있다
34
+ - 결과에 없다고 해서 코드베이스에 없다는 뜻이 아니다
35
+ - **항상** grep 또는 semantic search로 교차 검증을 권장한다
36
+
37
+ ## 설치
38
+
39
+ > **R001 정책**: auto-install 스크립트 또는 hook 작성 금지. 아래 명령어는 개발자가 직접 실행한다.
40
+
41
+ ### 패키지 설치
42
+
43
+ ```bash
44
+ # 방법 A: pip (기본)
45
+ pip install code-review-graph
46
+
47
+ # 방법 B: pipx (격리 환경 권장)
48
+ pipx install code-review-graph
49
+
50
+ # 방법 C: uvx (uv 기반 프로젝트)
51
+ uvx code-review-graph
52
+ ```
53
+
54
+ ### .mcp.json 수동 설정
55
+
56
+ 프로젝트 루트 `.mcp.json` 또는 `~/.claude/.mcp.json`을 직접 편집한다:
57
+
58
+ ```json
59
+ {
60
+ "mcpServers": {
61
+ "code-review-graph": {
62
+ "command": "code-review-graph",
63
+ "args": []
64
+ }
65
+ }
66
+ }
67
+ ```
68
+
69
+ **주의**: `.mcp.json`을 자동으로 수정하는 스크립트나 hook은 R001 위반이다. 반드시 수동 편집한다.
70
+
71
+ 설정 후 Claude Code를 재시작하면 MCP 도구가 활성화된다.
72
+
73
+ ### 설치 확인
74
+
75
+ ```bash
76
+ # 바이너리 확인
77
+ which code-review-graph
78
+
79
+ # 버전 확인
80
+ code-review-graph --version
81
+ ```
82
+
83
+ ## 초기 인덱싱
84
+
85
+ CRG는 첫 MCP 호출 시 lazy 인덱싱을 수행하지만, 대용량 코드베이스의 경우 명시적 인덱싱을 권장한다:
86
+
87
+ ```bash
88
+ # 프로젝트 루트에서 실행
89
+ code-review-graph index
90
+
91
+ # 특정 경로만 인덱싱
92
+ code-review-graph index --path src/
93
+ ```
94
+
95
+ 인덱싱은 `.code-review-graph/` 캐시 디렉토리에 저장된다. `.gitignore`에 추가를 권장한다:
96
+
97
+ ```
98
+ .code-review-graph/
99
+ ```
100
+
101
+ ## 노출 도구 4종 상세
102
+
103
+ ### `get_minimal_context`
104
+
105
+ 변경 코드의 최소 컨텍스트를 반환한다. 인접 함수, import 그래프만 추출하여 전체 파일 읽기를 대체한다.
106
+
107
+ ```
108
+ 입력: file path + line number (또는 function name)
109
+ 출력: code excerpt + AST node list
110
+ 용도: 디버깅, 특정 함수 컨텍스트 파악
111
+ ```
112
+
113
+ ### `get_impact_radius`
114
+
115
+ 변경 시 영향 받는 함수/모듈을 recall-우선으로 반환한다.
116
+
117
+ ```
118
+ 입력: changed_files list (또는 diff)
119
+ 출력: dependency tree
120
+ 용도: PR 리뷰 전 변경 폭 파악, 리팩토링 위험도 평가
121
+ ```
122
+
123
+ ### `query_graph`
124
+
125
+ AST 노드 그래프에 자연어 쿼리를 실행한다.
126
+
127
+ ```
128
+ 입력: 자연어 쿼리 (예: "find all callers of process_event")
129
+ 출력: node graph (함수/모듈 관계)
130
+ 용도: 코드 검색, 의존성 파악
131
+ ```
132
+
133
+ ### `detect_changes`
134
+
135
+ 두 Git 시점 간 의미적 차이를 감지한다. 단순 텍스트 diff가 아닌 AST 수준 변경을 추적한다.
136
+
137
+ ```
138
+ 입력: before_ref, after_ref (Git refs 또는 파일 경로)
139
+ 출력: semantic diff (이름 변경, 이동, 시그니처 변경 등)
140
+ 용도: 리팩토링 검증, 의도치 않은 변경 감지
141
+ ```
142
+
143
+ ## 워크플로우 통합
144
+
145
+ ### /dev-review와 조합
146
+
147
+ ```
148
+ 1. get_impact_radius(changed_files) → 영향 범위 확인
149
+ 2. get_minimal_context(hot_spots) → 핵심 컨텍스트 추출
150
+ 3. /dev-review {focused_files} → 범위를 좁힌 상세 리뷰
151
+ ```
152
+
153
+ 전체 디렉토리 리뷰 대신 CRG로 영향 범위를 먼저 파악하면 dev-review의 토큰 비용을 줄일 수 있다.
154
+
155
+ ### /adversarial-review와 조합
156
+
157
+ ```
158
+ 1. get_minimal_context(target_function) → 최소 컨텍스트
159
+ 2. /adversarial-review {minimal_context} → 보안/논리 취약점 검토
160
+ ```
161
+
162
+ <!-- TODO: 향후 cross-ref 추가 — adversarial-review 스킬 업데이트 시 -->
163
+
164
+ ### R013 Ecomode 활성 시
165
+
166
+ context ≥ 60%에서 파일 직접 읽기 대신 CRG를 우선 사용한다:
167
+
168
+ | 기존 방식 | CRG 대체 |
169
+ |----------|---------|
170
+ | `Read(entire_file)` | `get_minimal_context(file, line)` |
171
+ | `Grep(pattern, recursive)` | `query_graph("find all X")` |
172
+ | `Read(affected_files[])` | `get_impact_radius(changed)` |
173
+
174
+ ## 벤치마크 사용 시 주의
175
+
176
+ **8.2× 토큰 절감은 조건부다.**
177
+
178
+ | 작업 유형 | 절감 효과 |
179
+ |----------|----------|
180
+ | 함수 호출 그래프 탐색 | **높음** (AST 최적화 대상) |
181
+ | 의존성 영향 분석 | **높음** |
182
+ | 특정 패턴 코드 검색 | **중간** |
183
+ | UI 컴포넌트 리뷰 | **낮음** (자연어 설명 기반) |
184
+ | 자연어 검색 ("이 기능 어디에 있나") | **낮음** (semantic search 선호) |
185
+ | 설정 파일, YAML, JSON 분석 | **낮음** (AST 비적합) |
186
+
187
+ ## 기존 자산 마이그레이션 매핑
188
+
189
+ Phase β에서 claude-mem 일부 기능을 CRG로 전환할 예정이다 (#1169).
190
+
191
+ | 기존 자산 | CRG 대체 도구 | 전환 시점 |
192
+ |----------|--------------|---------|
193
+ | `claude-mem:smart-explore` | `query_graph` | Phase β |
194
+ | `claude-mem:pathfinder` | `get_impact_radius` | Phase β |
195
+
196
+ **Phase β 완료 전까지**: 두 자산을 병행 사용. CRG를 우선 시도하고, 결과가 불충분하면 기존 자산 사용.
197
+
198
+ ## 트러블슈팅
199
+
200
+ | 증상 | 원인 | 해결 방법 |
201
+ |------|------|---------|
202
+ | MCP 도구가 Claude Code에 보이지 않음 | `.mcp.json` 미설정 또는 경로 오류 | `.mcp.json` 위치 및 JSON 문법 확인 후 Claude Code 재시작 |
203
+ | `command not found: code-review-graph` | 패키지 미설치 또는 PATH 누락 | `pip install code-review-graph`, `which code-review-graph` 확인 |
204
+ | 첫 호출이 느림 | lazy 인덱싱 진행 중 | 정상 동작. `code-review-graph index`로 사전 인덱싱 권장 |
205
+ | 결과에 예상 함수가 없음 | recall-tuned — false negative 가능 | grep 또는 semantic search로 교차 검증 |
206
+ | 인덱싱 오류 (`index not found`) | 인덱싱 미완료 또는 캐시 손상 | `code-review-graph index --force` 실행 |
207
+ | MCP 연결 실패 | CRG 서버 미실행 | MCP 서버 로그 확인, `code-review-graph --version` 으로 바이너리 확인 |
208
+
209
+ ## 참고 자료
210
+
211
+ - **GitHub**: [tirth8205/code-review-graph](https://github.com/tirth8205/code-review-graph)
212
+ - **wrapper 스킬**: `.claude/skills/crg-integration/SKILL.md`
213
+ - **관련 이슈**:
214
+ - #1171: scout:integrate CRG (이 가이드의 origin)
215
+ - #1169: Phase β AgentMemory 전환 시퀀싱
216
+ - **관련 규칙**:
217
+ - R001 (MUST-safety.md): auto-install 금지 정책
218
+ - R013 (SHOULD-ecomode.md): context budget 관리, ecomode 통합
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.138.0",
3
- "lastUpdated": "2026-05-14T00:00:00.000Z",
2
+ "version": "0.139.0",
3
+ "lastUpdated": "2026-05-18T00:00:00.000Z",
4
4
  "omcustomMinClaudeCode": "2.1.121",
5
5
  "omcustomMinClaudeCodeReason": "Sensitive-path direct Write/Edit on .claude/** under bypassPermissions (R010 deprecation, #1101)",
6
6
  "components": [
@@ -8,7 +8,7 @@
8
8
  "name": "rules",
9
9
  "path": ".claude/rules",
10
10
  "description": "Agent behavior rules and guidelines",
11
- "files": 22
11
+ "files": 23
12
12
  },
13
13
  {
14
14
  "name": "agents",
@@ -20,13 +20,13 @@
20
20
  "name": "skills",
21
21
  "path": ".claude/skills",
22
22
  "description": "Reusable skill modules (includes slash commands)",
23
- "files": 117
23
+ "files": 118
24
24
  },
25
25
  {
26
26
  "name": "guides",
27
27
  "path": "guides",
28
28
  "description": "Reference documentation",
29
- "files": 50
29
+ "files": 53
30
30
  },
31
31
  {
32
32
  "name": "hooks",