How shreyas-1403/code-review-agent works
Code Review Agent reviews a GitHub pull request against the repository’s numbered conventions, then posts grounded findings as inline comments and a summary. The main workflow parses the PR URL, retrieves metadata, conventions, and diff, converts the diff into structured lines, asks the LLM for validated issues, and publishes the results. The README documents additional safeguards such as retry, anchor validation, dry-run, and idempotency; these are represented within the orchestration and review components. Edges reflect the shown calls and documented relationships; unsampled details are not expanded.
Main entry points: main.py Review runner · reviewer.py LLM reviewer · github_client.py PR access · diff_parser.py Diff parser
Components 12
Review orchestration
- Review runner
main.py
Review inputs
- Team conventions
- PR diff
- Diff parser
diff_parser.py
Review engine
- Review data contracts
models.py - LLM reviewer
reviewer.py
GitHub integration
- PR access
github_client.py - Inline comments
github_client.py - Summary comment
github_client.py
Other components
- Reviewer
- Groq LLM
- GitHub API
Connections 15
- Reviewer → Review runner: submits PR URL
README.md - Review runner → PR access: loads PR
main.py - PR access → GitHub API: requests PR data
github_client.py - Review runner → PR diff: fetches diff
main.py - Review runner → Team conventions: loads conventions
main.py - PR access → GitHub API: fetches conventions
github_client.py - Review runner → Diff parser: parses diff
main.py - Diff parser → Review data contracts: creates diff records
diff_parser.py - Review runner → LLM reviewer: requests review
main.py - LLM reviewer → Review data contracts: consumes diff records
reviewer.py - LLM reviewer → Groq LLM: sends prompt
reviewer.py - Review runner → Inline comments: posts findings
main.py - Inline comments → GitHub API: creates review
github_client.py - Review runner → Summary comment: posts summary
main.py - Summary comment → GitHub API: creates issue comment
github_client.py