Architecture of alibaba/open-code-review
alibaba/open-code-review is 1,095 source files holding 9,214 symbols across 10 modules, written mainly in Go, TypeScript, Kotlin. The largest module is internal, with 331 files, and 8 files are entry points into the dependency graph.
How open-code-review fits together
The ocr command starts from bin/ocr.js, a launcher that runs the packaged Go binary and passes it the arguments you typed. The Go entry point cmd/opencodereview/main.go then hands work to the review and scan commands. The internal directory holds the engine behind those commands, which decides which changed files get reviewed, asks the model about them and keeps the findings. internal/agent/agent.go is a hotspot file in that engine and drives the agent that reads files and calls tools during a review. internal/llm/client.go is a central file for talking to the configured model. The extensions directory brings the same review into VS Code and IntelliJ.
Largest modules
- internal: 331 files and 75,447 lines of code
- extensions: 119 files and 12,521 lines of code
- cmd: 114 files and 31,497 lines of code
- acp: 110 files and 12,768 lines of code
- pages: 64 files and 6,901 lines of code
- scripts: 22 files and 13,753 lines of code
- examples: 8 files and 4,456 lines of code
- bin: 2 files and 320 lines of code
Languages
By file count: Go 549 files, TypeScript 122 files, Kotlin 53 files, JavaScript 32 files, Python 9 files, Shell 7 files.
Documentation
Repowise documents open-code-review in 554 pages generated from the source, 46 of them written explanations of the repository and its modules. Module guides include:
- acp/internal: ACP
More on open-code-review: summary and FAQ, codebase overview, code health.
Related guide: Best dependency graph tools for monorepos