# kevin-sodhi/agentic-code-review-agent architecture

> Architecture diagram of the GitHub repository kevin-sodhi/agentic-code-review-agent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kevin-sodhi/agentic-code-review-agent
- Repository: https://github.com/kevin-sodhi/agentic-code-review-agent

## Overview

This repository is an under-construction multi-agent code-review and auto-fix product. The evidenced CLI workflow accepts a local repository or remote URL, prepares a workspace, maps and detects the project, then optionally installs dependencies and runs tests in Docker, returning structured results. The README also describes agent review, fixes, reports, diffs, and optional pull requests; these capabilities are represented as documented but unsampled subsystems. The sampled source does not show their runtime wiring, so those relationships are omitted. The graph reflects only the sampled CLI, ingestion, mapping, and sandbox implementation.

Main entry points: [`backend/codereview/ingest/pipeline.py`](https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/ingest/pipeline.py) (Ingest coordinator), [`backend/codereview/cli.py`](https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/cli.py) (CLI commands), [`backend/codereview/sandbox/docker_sandbox.py`](https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/sandbox/docker_sandbox.py) (Docker sandbox), [`backend/codereview`](https://github.com/kevin-sodhi/agentic-code-review-agent/tree/main/backend/codereview) (Automated fixes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry"]
  node_cli["CLI commands<br/>[cli.py]"]
  node_settings["Runtime settings<br/>[settings.py]"]
end

subgraph group_ingestion["Repository ingestion"]
  node_ingest["Ingest coordinator<br/>[pipeline.py]"]
  node_url["URL validation<br/>[repo_url.py]"]
  node_git["Checkout and copy<br/>[git.py]"]
  node_workspace["Workspace lifecycle<br/>[workspace.py]"]
  node_codemap["Repository map<br/>[builder.py]"]
  node_chunking["Source chunking<br/>[chunking.py]"]
  node_detect["Project detection<br/>[detect.py]"]
end

subgraph group_review["Review and fixes"]
  node_agents["Agent review"]
  node_autofix["Automated fixes"]
  node_report["Report and diff"]
  node_pullrequest["Pull request"]
end

subgraph group_verification["Sandbox verification"]
  node_docker["Docker sandbox<br/>[docker_sandbox.py]"]
  node_junit["JUnit results<br/>[junit.py]"]
  node_results["Test result models<br/>[models.py]"]
end

node_user(("Repository owner"))
node_docker_service["Docker daemon"]

node_user -->|"submits repository"| node_cli
node_cli -->|"loads settings"| node_settings
node_cli -->|"starts ingestion"| node_ingest
node_ingest -->|"validates remote URL"| node_url
node_ingest -->|"creates workspace"| node_workspace
node_ingest -->|"checks out source"| node_git
node_ingest -->|"builds map"| node_codemap
node_ingest -->|"detects project"| node_detect
node_cli -->|"runs tests"| node_docker
node_cli -->|"cleans workspace"| node_workspace
node_docker -->|"creates containers"| node_docker_service
node_docker -->|"parses test report"| node_junit
node_junit -->|"builds test cases"| node_results
node_docker -->|"returns run results"| node_results
node_agents -.->|"proposes fixes"| node_autofix
node_autofix -.->|"produces diff"| node_report
node_report -.->|"may open PR"| node_pullrequest

click node_cli "https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/cli.py"
click node_settings "https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/settings.py"
click node_ingest "https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/ingest/pipeline.py"
click node_url "https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/ingest/repo_url.py"
click node_git "https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/ingest/git.py"
click node_workspace "https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/ingest/workspace.py"
click node_codemap "https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/codemap/builder.py"
click node_chunking "https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/codemap/chunking.py"
click node_detect "https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/ingest/detect.py"
click node_agents "https://github.com/kevin-sodhi/agentic-code-review-agent/tree/main/backend/codereview"
click node_autofix "https://github.com/kevin-sodhi/agentic-code-review-agent/tree/main/backend/codereview"
click node_report "https://github.com/kevin-sodhi/agentic-code-review-agent/tree/main/backend/codereview"
click node_pullrequest "https://github.com/kevin-sodhi/agentic-code-review-agent/tree/main/backend/codereview"
click node_docker "https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/sandbox/docker_sandbox.py"
click node_junit "https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/sandbox/junit.py"
click node_results "https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/sandbox/models.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_settings toneBlue
class node_ingest,node_url,node_git,node_workspace,node_codemap,node_chunking,node_detect toneAmber
class node_agents,node_autofix,node_report,node_pullrequest toneMint
class node_docker,node_junit,node_results toneRose
class node_user,node_docker_service toneIndigo
```

## Components

### User entry

- [CLI commands](https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/cli.py): `backend/codereview/cli.py`
- [Runtime settings](https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/settings.py): `backend/codereview/settings.py`

### Repository ingestion

- [Ingest coordinator](https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/ingest/pipeline.py): `backend/codereview/ingest/pipeline.py`
- [URL validation](https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/ingest/repo_url.py): `backend/codereview/ingest/repo_url.py`
- [Checkout and copy](https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/ingest/git.py): `backend/codereview/ingest/git.py`
- [Workspace lifecycle](https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/ingest/workspace.py): `backend/codereview/ingest/workspace.py`
- [Repository map](https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/codemap/builder.py): `backend/codereview/codemap/builder.py`
- [Source chunking](https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/codemap/chunking.py): `backend/codereview/codemap/chunking.py`
- [Project detection](https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/ingest/detect.py): `backend/codereview/ingest/detect.py`

### Review and fixes

- [Agent review](https://github.com/kevin-sodhi/agentic-code-review-agent/tree/main/backend/codereview): `backend/codereview`
- [Automated fixes](https://github.com/kevin-sodhi/agentic-code-review-agent/tree/main/backend/codereview): `backend/codereview`
- [Report and diff](https://github.com/kevin-sodhi/agentic-code-review-agent/tree/main/backend/codereview): `backend/codereview`
- [Pull request](https://github.com/kevin-sodhi/agentic-code-review-agent/tree/main/backend/codereview): `backend/codereview`

### Sandbox verification

- [Docker sandbox](https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/sandbox/docker_sandbox.py): `backend/codereview/sandbox/docker_sandbox.py`
- [JUnit results](https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/sandbox/junit.py): `backend/codereview/sandbox/junit.py`
- [Test result models](https://github.com/kevin-sodhi/agentic-code-review-agent/blob/main/backend/codereview/sandbox/models.py): `backend/codereview/sandbox/models.py`

### Other components

- **Repository owner**
- **Docker daemon**

## Connections

- Repository owner → CLI commands: submits repository (evidence: `README.md`)
- CLI commands → Runtime settings: loads settings (evidence: `backend/codereview/cli.py`)
- CLI commands → Ingest coordinator: starts ingestion (evidence: `backend/codereview/cli.py`)
- Ingest coordinator → URL validation: validates remote URL (evidence: `backend/codereview/ingest/pipeline.py`)
- Ingest coordinator → Workspace lifecycle: creates workspace (evidence: `backend/codereview/ingest/pipeline.py`)
- Ingest coordinator → Checkout and copy: checks out source (evidence: `backend/codereview/ingest/pipeline.py`)
- Ingest coordinator → Repository map: builds map (evidence: `backend/codereview/ingest/pipeline.py`)
- Ingest coordinator → Project detection: detects project (evidence: `backend/codereview/ingest/pipeline.py`)
- CLI commands → Docker sandbox: runs tests (evidence: `backend/codereview/cli.py`)
- CLI commands → Workspace lifecycle: cleans workspace (evidence: `backend/codereview/cli.py`)
- Docker sandbox → Docker daemon: creates containers (evidence: `backend/codereview/sandbox/docker_sandbox.py`)
- Docker sandbox → JUnit results: parses test report (evidence: `backend/codereview/sandbox/docker_sandbox.py`)
- JUnit results → Test result models: builds test cases (evidence: `backend/codereview/sandbox/junit.py`)
- Docker sandbox → Test result models: returns run results (evidence: `backend/codereview/sandbox/docker_sandbox.py`)
- Agent review → Automated fixes: proposes fixes (evidence: `README.md`)
- Automated fixes → Report and diff: produces diff (evidence: `README.md`)
- Report and diff → Pull request: may open PR (evidence: `README.md`)
