How dhanashreernerkar/code-review-agent works
code-review-agent reviews local or CI diffs through a LangGraph workflow: ingest and classify changed files, fan out skill-specific LLM reviews, aggregate findings, then publish through configured reporters. The README documents language and optional CI/infra skills, provider selection, and multiple output targets. Sampled source confirms graph routing, ingest, skill loading, prompting, provider construction, and reporter dispatch; unsampled detection, aggregation, and report-node internals are represented only where supported by documented workflow and paths.
Main entry points: agent.py LangGraph agent · registry.py Reporter dispatch · node_review.py Review execution · cli.py CLI
Components 23
Invocation
- CLI
src/code_review_agent/cli.py
Review workflow
- LangGraph agent
src/code_review_agent/agent.py - Diff ingestion
src/code_review_agent/utils/node_ingest.py - Diff parsing
src/code_review_agent/utils/diffing.py - File detection
src/code_review_agent/utils/node_detect.py - Review state
src/code_review_agent/utils/state.py - Review execution
src/code_review_agent/utils/node_review.py - Prompt assembly
src/code_review_agent/utils/prompts.py - LLM factory
src/code_review_agent/llm.py - Finding aggregation
src/code_review_agent/utils/node_aggregate.py
Review knowledge
- Skill registry
src/code_review_agent/skills/loader.py - Skill packs
skills
Reporting
- Report preparation
src/code_review_agent/utils/node_report.py - Reporter dispatch
src/code_review_agent/reporters/registry.py - Terminal output
src/code_review_agent/reporters/terminal.py - File reports
src/code_review_agent/reporters/file.py - GitHub reporter
src/code_review_agent/reporters/github.py - GitLab reporter
src/code_review_agent/reporters/gitlab.py
Other components
- Engineer or CI
- Diff source
- LLM providers
- GitHub API
- GitLab API
Connections 24
- Engineer or CI → CLI: invokes
- Engineer or CI → Diff source: supplies
- CLI → Diff source: reads diff
- CLI → LangGraph agent: invokes
- LangGraph agent → Diff ingestion: dispatches
- Diff ingestion → Diff parsing: parses diff
- Diff ingestion → Review state: produces files
- LangGraph agent → File detection: dispatches
- File detection → Skill registry: resolves skill
- Skill registry → Skill packs: reads
- LangGraph agent → Review execution: fans out
- Review execution → Prompt assembly: builds prompts
- Review execution → Skill registry: loads skill body
- Review execution → LLM factory: requests model
- LLM factory → LLM providers: constructs client
- LangGraph agent → Finding aggregation: dispatches
- LangGraph agent → Report preparation: dispatches
- Report preparation → Reporter dispatch: selects reporters
- Reporter dispatch → Terminal output: dispatches
- Reporter dispatch → File reports: dispatches
- Reporter dispatch → GitHub reporter: dispatches
- Reporter dispatch → GitLab reporter: dispatches
- GitHub reporter → GitHub API: publishes comment
- GitLab reporter → GitLab API: publishes note