# shivansh19200/github-repository-reviewer architecture

> Architecture diagram of the GitHub repository shivansh19200/github-repository-reviewer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shivansh19200/github-repository-reviewer
- Repository: https://github.com/shivansh19200/github-repository-reviewer

## Overview

This is a GitHub repository review tool. Its visible review workflow runs an architecture review and then a code-quality review over repository files held in shared graph state; each agent asks an LLM to review file chunks and writes a report back to that state. Separate modules parse GitHub URLs and fetch and preprocess repository contents, but the sampled code does not connect those modules to the review graph or show an application entry point. The README is empty, so broader capabilities cannot be confirmed.

Main entry points: [`agents/architecture.py`](https://github.com/shivansh19200/github-repository-reviewer/blob/main/agents/architecture.py) (Architecture agent), [`agents/code_quality_agent.py`](https://github.com/shivansh19200/github-repository-reviewer/blob/main/agents/code_quality_agent.py) (Code quality agent), [`graph.py`](https://github.com/shivansh19200/github-repository-reviewer/blob/main/graph.py) (Review graph), [`preprocessor.py`](https://github.com/shivansh19200/github-repository-reviewer/blob/main/preprocessor.py) (Preprocessor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_review["Review workflow"]
  node_graph["Review graph<br/>[graph.py]"]
end

subgraph group_ingestion["Repository ingestion"]
  node_parser["URL parser<br/>[url_parser.py]"]
  node_preprocessor["Preprocessor<br/>[preprocessor.py]"]
  node_indexer["Repository indexer<br/>[indexer.py]"]
end

subgraph group_analysis["AI analysis"]
  node_architecture["Architecture agent<br/>[architecture.py]"]
  node_quality["Code quality agent"]
end

node_user(("Reviewer"))
node_github["GitHub API"]
node_llm["OpenAI model"]

node_graph -->|"dispatches"| node_architecture
node_graph -->|"dispatches"| node_quality
node_architecture -->|"then dispatches"| node_quality
node_architecture -->|"requests reviews"| node_llm
node_quality -->|"requests reviews"| node_llm
node_parser -->|"looks up branch"| node_github
node_preprocessor -->|"gets file paths"| node_indexer
node_preprocessor -->|"fetches contents"| node_github
node_indexer -->|"fetches tree"| node_github

click node_graph "https://github.com/shivansh19200/github-repository-reviewer/blob/main/graph.py"
click node_architecture "https://github.com/shivansh19200/github-repository-reviewer/blob/main/agents/architecture.py"
click node_quality "https://github.com/shivansh19200/github-repository-reviewer/blob/main/agents/code_quality_agent.py"
click node_parser "https://github.com/shivansh19200/github-repository-reviewer/blob/main/url_parser.py"
click node_preprocessor "https://github.com/shivansh19200/github-repository-reviewer/blob/main/preprocessor.py"
click node_indexer "https://github.com/shivansh19200/github-repository-reviewer/blob/main/indexer.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_graph,node_user toneBlue
class node_parser,node_preprocessor,node_indexer toneAmber
class node_architecture,node_quality,node_github toneMint
class node_llm toneIndigo
```

## Components

### Review workflow

- [Review graph](https://github.com/shivansh19200/github-repository-reviewer/blob/main/graph.py): `graph.py`

### Repository ingestion

- [URL parser](https://github.com/shivansh19200/github-repository-reviewer/blob/main/url_parser.py): `url_parser.py`
- [Preprocessor](https://github.com/shivansh19200/github-repository-reviewer/blob/main/preprocessor.py): `preprocessor.py`
- [Repository indexer](https://github.com/shivansh19200/github-repository-reviewer/blob/main/indexer.py): `indexer.py`

### AI analysis

- [Architecture agent](https://github.com/shivansh19200/github-repository-reviewer/blob/main/agents/architecture.py): `agents/architecture.py`
- [Code quality agent](https://github.com/shivansh19200/github-repository-reviewer/blob/main/agents/code_quality_agent.py): `agents/code_quality_agent.py`

### Other components

- **Reviewer**
- **GitHub API**
- **OpenAI model**

## Connections

- Review graph → Architecture agent: dispatches
- Review graph → Code quality agent: dispatches
- Architecture agent → Code quality agent: then dispatches
- Architecture agent → OpenAI model: requests reviews
- Code quality agent → OpenAI model: requests reviews
- URL parser → GitHub API: looks up branch
- Preprocessor → Repository indexer: gets file paths
- Preprocessor → GitHub API: fetches contents
- Repository indexer → GitHub API: fetches tree
