Understand — Phân tích codebase
Tạo knowledge graph từ codebase để hiểu architecture, components, và dependencies. Hỗ trợ onboarding, code review, và impact analysis.Sử dụng GitLab Knowledge Graph (GKG) engine bên dưới. Hỗ trợ go-to-definition, find-usages, impact analysis.
Cú pháp
Bảng tham chiếu nhanh
Luồng hoạt động
1
Bước 1: Scan codebase
Đọc toàn bộ source files, parse imports, exports, function calls.
2
Bước 2: Build knowledge graph
Tạo graph với nodes (files, functions, classes) và edges (imports, calls, dependencies).
3
Bước 3: Analyze patterns
Phát hiện architectural patterns, circular dependencies, coupling metrics.
4
Bước 4: Interactive query
Cho phép query graph: “file nào depend vào UserService?”, “component nào bị ảnh hưởng nếu đổi schema?”
Ví dụ thực tế
- /understand-explain
- /understand-diff
- /understand-onboard
GKG — GitLab Knowledge Graph
/gkg là engine bên dưới, cung cấp semantic code intelligence: