# dikashma-shree-selvakumaran-abbpa/quack architecture

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

- Interactive diagram: https://gitdiagram.com/dikashma-shree-selvakumaran-abbpa/quack
- Repository: https://github.com/dikashma-shree-selvakumaran-abbpa/quack

## Overview

QUACK is a local-first Git quality tool: deterministic checks run at commit time, while background and pre-push AI reviews provide advisory feedback. The graph follows the documented check, watch, agent, server, and editor surfaces and includes test guidance, metrics, caching, and optional SonarQube analysis. Relationships are limited to README statements, source-index references, and shown calls; some server and CLI internals were not sampled, so uncertain links are omitted.

Main entry points: [`src/quack/cli.py`](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/cli.py) (CLI commands), [`src/quack/server.py`](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/server.py) (HTTP server), [`src/quack/watch.py`](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/watch.py) (Background review), [`src/quack/agent.py`](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/agent.py) (Agent investigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry points"]
  node_cli["CLI commands<br/>[cli.py]"]
  node_http["HTTP server<br/>[server.py]"]
  node_extension["Editor extension<br/>[extension.ts]"]
end

subgraph group_checks["Change analysis"]
  node_delta["Change delta<br/>[delta.py]"]
  node_gitio["Git adapter<br/>[gitio.py]"]
  node_tier1["Deterministic checks<br/>[tier1.py]"]
  node_gitleaks["Secret scanning<br/>[gitleaks.py]"]
  node_testmap["Test guidance<br/>[testmap.py]"]
  node_instructions["Project instructions<br/>[instructions.py]"]
end

subgraph group_reviews["AI review"]
  node_watch["Background review<br/>[watch.py]"]
  node_tier2["Tier 2 review<br/>[tier2.py]"]
  node_agent["Agent investigation<br/>[agent.py]"]
  node_llmio["Provider dispatcher<br/>[llmio.py]"]
end

subgraph group_integrations["Integrations"]
  node_copilot["Copilot SDK<br/>[copilot_sdk.py]"]
  node_sonar["SonarQube analysis<br/>[sonar.py]"]
  node_sonarcli["Sonar CLI<br/>[sonar_cli.py]"]
  node_sonardebug["Sonar diagnostics<br/>[sonar_debug.py]"]
end

subgraph group_state["Local state"]
  node_cache[("Review cache<br/>[reviewcache.py]")]
  node_metrics["Metrics<br/>[metrics.py]"]
  node_render["Terminal output<br/>[render.py]"]
  node_runio["Process runner<br/>[runio.py]"]
  node_jsonparse["JSON parsing<br/>[jsonparse.py]"]
  node_sonarstate["Sonar state<br/>[sonar_state.py]"]
end

node_developer(("Developer"))
node_vscode["VS Code"]
node_git[("Git repository")]

node_developer -->|"runs commands"| node_cli
node_developer -->|"uses editor"| node_vscode
node_vscode -->|"hosts extension"| node_extension
node_extension -->|"calls server"| node_http
node_developer -->|"requests checks"| node_http
node_cli -->|"gets changes"| node_gitio
node_gitio -.->|"reads diffs"| node_git
node_gitio -->|"builds delta"| node_delta
node_cli -->|"runs checks"| node_tier1
node_cli -->|"runs scanning"| node_gitleaks
node_cli -->|"builds guidance"| node_testmap
node_tier1 -->|"scans changes"| node_delta
node_tier2 -->|"redacts findings"| node_tier1
node_tier2 -->|"uses test plan"| node_testmap
node_tier2 -->|"reviews changes"| node_delta
node_cli -->|"loads guidance"| node_instructions
node_watch -->|"gets changes"| node_gitio
node_watch -->|"runs checks"| node_tier1
node_watch -->|"requests review"| node_tier2
node_watch -->|"loads guidance"| node_instructions
node_watch -.->|"stores verdict"| node_cache
node_cli -->|"reads cached review"| node_cache
node_cli -->|"starts review"| node_watch
node_cli -->|"starts investigation"| node_agent
node_agent -->|"requests model"| node_llmio
node_tier2 -->|"requests completion"| node_llmio
node_llmio -->|"dispatches calls"| node_copilot
node_agent -->|"runs tests"| node_runio
node_agent -->|"parses verdict"| node_jsonparse
node_cli -->|"renders results"| node_render
node_agent -->|"renders progress"| node_render
node_cli -->|"summarizes runs"| node_metrics
node_http -->|"requests review"| node_watch
node_http -->|"starts job"| node_agent
node_http -->|"gets changes"| node_gitio
node_http -->|"runs checks"| node_tier1
node_http -->|"builds guidance"| node_testmap
node_http -->|"reports metrics"| node_metrics
node_watch -->|"runs analysis"| node_sonar
node_sonar -->|"exports index"| node_gitio
node_sonar -->|"runs scanner"| node_runio
node_sonar -.->|"uses API checks"| node_sonarcli
node_sonar -->|"emits diagnostics"| node_sonardebug
node_cli -->|"uses state"| node_sonarstate

click node_cli "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/cli.py"
click node_http "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/server.py"
click node_extension "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/clients/vscode/src/extension.ts"
click node_delta "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/delta.py"
click node_gitio "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/gitio.py"
click node_tier1 "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/tier1.py"
click node_gitleaks "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/gitleaks.py"
click node_testmap "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/testmap.py"
click node_instructions "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/instructions.py"
click node_watch "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/watch.py"
click node_tier2 "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/tier2.py"
click node_agent "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/agent.py"
click node_llmio "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/llmio.py"
click node_copilot "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/providers/copilot_sdk.py"
click node_sonar "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/sonar.py"
click node_sonarcli "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/sonar_cli.py"
click node_sonardebug "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/sonar_debug.py"
click node_cache "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/reviewcache.py"
click node_metrics "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/metrics.py"
click node_render "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/render.py"
click node_runio "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/runio.py"
click node_jsonparse "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/jsonparse.py"
click node_sonarstate "https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/sonar_state.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_http,node_extension toneBlue
class node_delta,node_gitio,node_tier1,node_gitleaks,node_testmap,node_instructions,node_git toneAmber
class node_watch,node_tier2,node_agent,node_llmio toneMint
class node_copilot,node_sonar,node_sonarcli,node_sonardebug toneRose
class node_cache,node_metrics,node_render,node_runio,node_jsonparse,node_sonarstate,node_developer,node_vscode toneIndigo
```

## Components

### Entry points

- [CLI commands](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/cli.py): `src/quack/cli.py`
- [HTTP server](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/server.py): `src/quack/server.py`
- [Editor extension](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/clients/vscode/src/extension.ts): `clients/vscode/src/extension.ts`

### Change analysis

- [Change delta](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/delta.py): `src/quack/delta.py`
- [Git adapter](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/gitio.py): `src/quack/gitio.py`
- [Deterministic checks](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/tier1.py): `src/quack/tier1.py`
- [Secret scanning](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/gitleaks.py): `src/quack/gitleaks.py`
- [Test guidance](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/testmap.py): `src/quack/testmap.py`
- [Project instructions](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/instructions.py): `src/quack/instructions.py`

### AI review

- [Background review](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/watch.py): `src/quack/watch.py`
- [Tier 2 review](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/tier2.py): `src/quack/tier2.py`
- [Agent investigation](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/agent.py): `src/quack/agent.py`
- [Provider dispatcher](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/llmio.py): `src/quack/llmio.py`

### Integrations

- [Copilot SDK](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/providers/copilot_sdk.py): `src/quack/providers/copilot_sdk.py`
- [SonarQube analysis](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/sonar.py): `src/quack/sonar.py`
- [Sonar CLI](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/sonar_cli.py): `src/quack/sonar_cli.py`
- [Sonar diagnostics](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/sonar_debug.py): `src/quack/sonar_debug.py`

### Local state

- [Review cache](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/reviewcache.py): `src/quack/reviewcache.py`
- [Metrics](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/metrics.py): `src/quack/metrics.py`
- [Terminal output](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/render.py): `src/quack/render.py`
- [Process runner](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/runio.py): `src/quack/runio.py`
- [JSON parsing](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/jsonparse.py): `src/quack/jsonparse.py`
- [Sonar state](https://github.com/dikashma-shree-selvakumaran-abbpa/quack/blob/main/src/quack/sonar_state.py): `src/quack/sonar_state.py`

### Other components

- **Developer**
- **VS Code**
- **Git repository**

## Connections

- Developer → CLI commands: runs commands (evidence: `README.md`)
- Developer → VS Code: uses editor (evidence: `README.md`)
- VS Code → Editor extension: hosts extension (evidence: `README.md`)
- Editor extension → HTTP server: calls server (evidence: `README.md`)
- Developer → HTTP server: requests checks (evidence: `README.md`)
- CLI commands → Git adapter: gets changes (evidence: `src/quack/cli.py`)
- Git adapter → Git repository: reads diffs
- Git adapter → Change delta: builds delta (evidence: `src/quack/gitio.py`)
- CLI commands → Deterministic checks: runs checks (evidence: `src/quack/cli.py`)
- CLI commands → Secret scanning: runs scanning (evidence: `src/quack/cli.py`)
- CLI commands → Test guidance: builds guidance (evidence: `src/quack/cli.py`)
- Deterministic checks → Change delta: scans changes (evidence: `src/quack/tier1.py`)
- Tier 2 review → Deterministic checks: redacts findings (evidence: `src/quack/tier2.py`)
- Tier 2 review → Test guidance: uses test plan (evidence: `src/quack/tier2.py`)
- Tier 2 review → Change delta: reviews changes (evidence: `src/quack/tier2.py`)
- CLI commands → Project instructions: loads guidance (evidence: `src/quack/cli.py`)
- Background review → Git adapter: gets changes (evidence: `src/quack/watch.py`)
- Background review → Deterministic checks: runs checks (evidence: `src/quack/watch.py`)
- Background review → Tier 2 review: requests review (evidence: `src/quack/watch.py`)
- Background review → Project instructions: loads guidance (evidence: `src/quack/watch.py`)
- Background review → Review cache: stores verdict (evidence: `src/quack/watch.py`)
- CLI commands → Review cache: reads cached review (evidence: `src/quack/cli.py`)
- CLI commands → Background review: starts review (evidence: `src/quack/cli.py`)
- CLI commands → Agent investigation: starts investigation (evidence: `src/quack/cli.py`)
- Agent investigation → Provider dispatcher: requests model (evidence: `src/quack/agent.py`)
- Tier 2 review → Provider dispatcher: requests completion (evidence: `src/quack/tier2.py`)
- Provider dispatcher → Copilot SDK: dispatches calls (evidence: `src/quack/llmio.py`)
- Agent investigation → Process runner: runs tests (evidence: `src/quack/agent.py`)
- Agent investigation → JSON parsing: parses verdict (evidence: `src/quack/agent.py`)
- CLI commands → Terminal output: renders results (evidence: `src/quack/cli.py`)
- Agent investigation → Terminal output: renders progress (evidence: `src/quack/agent.py`)
- CLI commands → Metrics: summarizes runs (evidence: `src/quack/cli.py`)
- HTTP server → Background review: requests review (evidence: `src/quack/server.py`)
- HTTP server → Agent investigation: starts job (evidence: `src/quack/server.py`)
- HTTP server → Git adapter: gets changes (evidence: `src/quack/server.py`)
- HTTP server → Deterministic checks: runs checks (evidence: `src/quack/server.py`)
- HTTP server → Test guidance: builds guidance (evidence: `src/quack/server.py`)
- HTTP server → Metrics: reports metrics (evidence: `src/quack/server.py`)
- Background review → SonarQube analysis: runs analysis (evidence: `src/quack/watch.py`)
- SonarQube analysis → Git adapter: exports index (evidence: `src/quack/sonar.py`)
- SonarQube analysis → Process runner: runs scanner (evidence: `src/quack/sonar.py`)
- SonarQube analysis → Sonar CLI: uses API checks (evidence: `src/quack/sonar_cli.py`)
- SonarQube analysis → Sonar diagnostics: emits diagnostics (evidence: `src/quack/sonar.py`)
- CLI commands → Sonar state: uses state (evidence: `src/quack/cli.py`)
