# anubhabmondal496-coder/repopilot architecture

> Architecture diagram of the GitHub repository anubhabmondal496-coder/repopilot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/anubhabmondal496-coder/repopilot
- Repository: https://github.com/anubhabmondal496-coder/repopilot

## Overview

RepoPilot is currently a VS Code extension for workspace health checks and semantic Git commit drafting. Its implemented workflow activates background Python dependency and frontend-to-backend route diagnostics, while a separate command analyzes Git changes and drafts a commit message into the SCM view. The README describes broader agent, documentation, submission, and judging workflows, but the sampled runtime does not implement them; Turbo Mode and Sprint Logistics are placeholders. Health-monitor internals share one source file, so their separation here is conceptual.

Main entry points: [`src/watchers/healthMonitor.ts`](https://github.com/anubhabmondal496-coder/repopilot/blob/main/src/watchers/healthMonitor.ts) (Health Monitor), [`src/extension.ts`](https://github.com/anubhabmondal496-coder/repopilot/blob/main/src/extension.ts) (Activation & Commands), [`src/git/commitDrafter.ts`](https://github.com/anubhabmondal496-coder/repopilot/blob/main/src/git/commitDrafter.ts) (Commit Drafter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Extension Runtime"]
  node_activation["Activation &amp; Commands<br/>[extension.ts]"]
end

subgraph group_health["Workspace Health"]
  node_health_monitor["Health Monitor<br/>[healthMonitor.ts]"]
  node_dependency_scan["Dependency Tracker<br/>[healthMonitor.ts]"]
  node_route_index["Backend Route Index<br/>[healthMonitor.ts]"]
  node_api_audit["Frontend API Audit<br/>[healthMonitor.ts]"]
  node_diagnostics["Diagnostics<br/>[healthMonitor.ts]"]
end

subgraph group_git["Git Workflow"]
  node_commit_drafter["Commit Drafter<br/>[commitDrafter.ts]"]
end

node_developer(("Developer"))
node_workspace["Workspace Files"]
node_vscode["VS Code Host"]
node_git_extension["VS Code Git"]
node_scm_view["SCM Commit Input"]

node_developer -->|"invokes commands"| node_activation
node_vscode -->|"activates extension"| node_activation
node_activation -->|"starts monitoring"| node_health_monitor
node_activation -->|"registers command"| node_commit_drafter
node_workspace -->|"sends file events"| node_health_monitor
node_health_monitor -->|"checks Python imports"| node_dependency_scan
node_health_monitor -->|"indexes backend routes"| node_route_index
node_health_monitor -->|"checks frontend calls"| node_api_audit
node_api_audit -->|"matches indexed routes"| node_route_index
node_dependency_scan -->|"reports missing packages"| node_diagnostics
node_api_audit -->|"reports route mismatches"| node_diagnostics
node_commit_drafter -->|"reads status and diffs"| node_git_extension
node_commit_drafter -->|"sets drafted message"| node_scm_view
node_health_monitor -->|"publishes diagnostics"| node_vscode

click node_activation "https://github.com/anubhabmondal496-coder/repopilot/blob/main/src/extension.ts"
click node_health_monitor "https://github.com/anubhabmondal496-coder/repopilot/blob/main/src/watchers/healthMonitor.ts"
click node_dependency_scan "https://github.com/anubhabmondal496-coder/repopilot/blob/main/src/watchers/healthMonitor.ts"
click node_route_index "https://github.com/anubhabmondal496-coder/repopilot/blob/main/src/watchers/healthMonitor.ts"
click node_api_audit "https://github.com/anubhabmondal496-coder/repopilot/blob/main/src/watchers/healthMonitor.ts"
click node_diagnostics "https://github.com/anubhabmondal496-coder/repopilot/blob/main/src/watchers/healthMonitor.ts"
click node_commit_drafter "https://github.com/anubhabmondal496-coder/repopilot/blob/main/src/git/commitDrafter.ts"

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_activation toneBlue
class node_health_monitor,node_dependency_scan,node_route_index,node_api_audit,node_diagnostics toneAmber
class node_commit_drafter toneMint
class node_developer,node_workspace,node_vscode,node_git_extension,node_scm_view toneIndigo
```

## Components

### Extension Runtime

- [Activation & Commands](https://github.com/anubhabmondal496-coder/repopilot/blob/main/src/extension.ts): `src/extension.ts`

### Workspace Health

- [Health Monitor](https://github.com/anubhabmondal496-coder/repopilot/blob/main/src/watchers/healthMonitor.ts): `src/watchers/healthMonitor.ts`
- [Dependency Tracker](https://github.com/anubhabmondal496-coder/repopilot/blob/main/src/watchers/healthMonitor.ts): `src/watchers/healthMonitor.ts`
- [Backend Route Index](https://github.com/anubhabmondal496-coder/repopilot/blob/main/src/watchers/healthMonitor.ts): `src/watchers/healthMonitor.ts`
- [Frontend API Audit](https://github.com/anubhabmondal496-coder/repopilot/blob/main/src/watchers/healthMonitor.ts): `src/watchers/healthMonitor.ts`
- [Diagnostics](https://github.com/anubhabmondal496-coder/repopilot/blob/main/src/watchers/healthMonitor.ts): `src/watchers/healthMonitor.ts`

### Git Workflow

- [Commit Drafter](https://github.com/anubhabmondal496-coder/repopilot/blob/main/src/git/commitDrafter.ts): `src/git/commitDrafter.ts`

### Other components

- **Developer**
- **Workspace Files**
- **VS Code Host**
- **VS Code Git**
- **SCM Commit Input**

## Connections

- Developer → Activation & Commands: invokes commands (evidence: `src/extension.ts`)
- VS Code Host → Activation & Commands: activates extension (evidence: `src/extension.ts`)
- Activation & Commands → Health Monitor: starts monitoring (evidence: `src/extension.ts`)
- Activation & Commands → Commit Drafter: registers command (evidence: `src/extension.ts`)
- Workspace Files → Health Monitor: sends file events (evidence: `src/watchers/healthMonitor.ts`)
- Health Monitor → Dependency Tracker: checks Python imports (evidence: `src/watchers/healthMonitor.ts`)
- Health Monitor → Backend Route Index: indexes backend routes (evidence: `src/watchers/healthMonitor.ts`)
- Health Monitor → Frontend API Audit: checks frontend calls (evidence: `src/watchers/healthMonitor.ts`)
- Frontend API Audit → Backend Route Index: matches indexed routes (evidence: `src/watchers/healthMonitor.ts`)
- Dependency Tracker → Diagnostics: reports missing packages (evidence: `src/watchers/healthMonitor.ts`)
- Frontend API Audit → Diagnostics: reports route mismatches (evidence: `src/watchers/healthMonitor.ts`)
- Commit Drafter → VS Code Git: reads status and diffs (evidence: `src/git/commitDrafter.ts`)
- Commit Drafter → SCM Commit Input: sets drafted message (evidence: `src/git/commitDrafter.ts`)
- Health Monitor → VS Code Host: publishes diagnostics (evidence: `src/watchers/healthMonitor.ts`)
