Skip to content

Commit 7c515c0

Browse files
committed
docs: README에 실제 실행 출력 기반 Demo 섹션 추가
1 parent 3e28441 commit 7c515c0

1 file changed

Lines changed: 76 additions & 0 deletions

File tree

README.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,82 @@ ccg eval --suite parser
6969
ccg eval --suite parser --update
7070
```
7171

72+
## Demo
73+
74+
CCG가 자기 자신의 코드베이스를 파싱한 실제 출력입니다.
75+
76+
### 1. 코드베이스 파싱
77+
78+
```
79+
$ ccg build .
80+
Build complete: 127 files, 1220 nodes, 12222 edges
81+
```
82+
83+
### 2. 그래프 통계
84+
85+
```
86+
$ ccg status
87+
Nodes: 1220
88+
Edges: 12222
89+
Files: 127
90+
91+
Node kinds:
92+
class: 124
93+
file: 127
94+
function: 405
95+
test: 543
96+
type: 21
97+
98+
Edge kinds:
99+
calls: 9245
100+
contains: 1097
101+
imports_from: 1128
102+
inherits: 1
103+
tested_by: 751
104+
```
105+
106+
### 3. 코드 검색
107+
108+
```
109+
$ ccg search "impact analysis"
110+
internal/analysis/impact/impact_test.go file internal/analysis/impact/impact_test.go:1
111+
internal/analysis/impact/impact.go file internal/analysis/impact/impact.go:1
112+
mcp.ImpactAnalyzer type internal/mcp/server.go:36
113+
impact.EdgeReader type internal/analysis/impact/impact.go:12
114+
impact.Analyzer.ImpactRadius function internal/analysis/impact/impact.go:42
115+
internal/mcp/handler_analysis.go file internal/mcp/handler_analysis.go:1
116+
117+
$ ccg search "dead code"
118+
deadcode.Options class internal/analysis/deadcode/service.go:14
119+
deadcode.Service.Find function internal/analysis/deadcode/service.go:38
120+
mcp.handlers.findDeadCode function internal/mcp/handler_analysis.go:273
121+
```
122+
123+
### 4. MCP를 통한 Claude 연동 예시
124+
125+
`.mcp.json` 설정 후 Claude Code에서 바로 질문할 수 있습니다:
126+
127+
> **"이 프로젝트의 webhook sync 흐름을 설명해줘"**
128+
129+
Claude가 CCG MCP 도구를 호출해 그래프에서 직접 답변:
130+
131+
```
132+
ccg_trace_flow("webhook.WebhookHandler.ServeHTTP")
133+
→ WebhookHandler.ServeHTTP
134+
→ SyncQueue.Enqueue
135+
→ safeHandle (retry loop: max 3회, exponential backoff 1s→30s)
136+
→ clone (git clone, 15분 timeout)
137+
→ build (ccg build, 동일 context)
138+
```
139+
140+
> **"인증 관련 코드가 어디 있어?"**
141+
142+
```
143+
ccg_search("authentication")
144+
→ internal/webhook/handler.go (HMAC signature validation)
145+
→ cmd/ccg/main.go (--webhook-secret flag)
146+
```
147+
72148
## MCP Server
73149

74150
Add `.mcp.json` to your project:

0 commit comments

Comments
 (0)