Problem
OpenCodeReview currently has text-oriented context tools such as code_search, file_read, and file_read_diff. These work well for literal lookup, but they do not expose structural relationships such as symbol definitions, callers, callees, or impact radius.
That makes it harder for the review agent to reason about changes like:
- public function or method signature changes
- interface / type / data model changes
- shared utility behavior changes
- route handler, auth, security, concurrency, or lifecycle logic changes
- cross-file impact where the risk depends on callers or callees
Proposal
Add an optional CodeGraph-backed context tool that is only exposed when CodeGraph is actually available for the checked-out repository.
Important constraints:
- The tool must be hidden when
.codegraph/codegraph.db is missing.
- The tool must be hidden when the
codegraph executable is not installed in the CI/job environment.
- The tool must be hidden for incompatible CodeGraph versions.
- In range/commit review modes, the CodeGraph index must correspond to the same checkout as
--to / --commit; otherwise structural context may describe a different revision than the diff being reviewed.
CI/CD note
The current GitHub Actions and GitLab CI examples install OpenCodeReview, but they do not install CodeGraph or build a .codegraph index. In those default CI/CD setups, the CodeGraph tool should therefore remain unavailable and should not affect existing review behavior.
Teams that want this in CI can opt in by using a runner image that includes CodeGraph and by building/syncing the index after checkout, before running ocr review.
Problem
OpenCodeReview currently has text-oriented context tools such as
code_search,file_read, andfile_read_diff. These work well for literal lookup, but they do not expose structural relationships such as symbol definitions, callers, callees, or impact radius.That makes it harder for the review agent to reason about changes like:
Proposal
Add an optional CodeGraph-backed context tool that is only exposed when CodeGraph is actually available for the checked-out repository.
Important constraints:
.codegraph/codegraph.dbis missing.codegraphexecutable is not installed in the CI/job environment.--to/--commit; otherwise structural context may describe a different revision than the diff being reviewed.CI/CD note
The current GitHub Actions and GitLab CI examples install OpenCodeReview, but they do not install CodeGraph or build a
.codegraphindex. In those default CI/CD setups, the CodeGraph tool should therefore remain unavailable and should not affect existing review behavior.Teams that want this in CI can opt in by using a runner image that includes CodeGraph and by building/syncing the index after checkout, before running
ocr review.