# giordano10/vcsp architecture

> Architecture diagram of the GitHub repository giordano10/vcsp, 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/giordano10/vcsp
- Repository: https://github.com/giordano10/vcsp

## Overview

VCSP Guard is a local security and quality toolkit for AI-assisted development. Its two main workflows are initializing project guardrails (a Git pre-commit hook and optional AI configuration) and scanning an existing project, with results saved for later trend charts. The scan advertises secret detection, code and dependency audits, IaC/CWE checks, linting, and unused-dependency analysis. Scanner implementation details are partly omitted, so the scan stages and integrations below rely on the README’s capability descriptions; charting and hook setup are supported by the shown source.

Main entry points: [`src/vcsp_guard/scan_project.py`](https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/scan_project.py) (Project scanner), [`src/vcsp_guard/install_hooks.py`](https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/install_hooks.py) (Initialize guard), [`src/vcsp_guard/generate_stats.py`](https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/generate_stats.py) (Trend charts), [`src/vcsp_guard/.vibe`](https://github.com/giordano10/vcsp/tree/master/src/vcsp_guard/.vibe) (AI configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Project setup"]
  node_init["Initialize guard<br/>[install_hooks.py]"]
  node_precommit["Pre-commit hook<br/>[install_hooks.py]"]
  node_ai_config["AI configuration<br/>[.vibe]"]
end

subgraph group_scan["Security scanning"]
  node_scanner["Project scanner<br/>[scan_project.py]"]
  node_secret_scan["Secret checks<br/>[scan_project.py]"]
  node_code_scan["Code security<br/>[scan_project.py]"]
  node_dependency_audit["Dependency audit<br/>[scan_project.py]"]
  node_quality_lint["Quality lint<br/>[scan_project.py]"]
  node_iac_scan["IaC analysis<br/>[scan_project.py]"]
  node_cwe_scan["CWE Top 25<br/>[scan_project.py]"]
  node_unused_deps["Unused dependencies<br/>[scan_project.py]"]
end

subgraph group_history["Scan history"]
  node_scan_logs["Scan logs<br/>[scan_project.py]"]
  node_stats["Trend charts<br/>[generate_stats.py]"]
  node_chart_file["Trend image"]
end

node_developer(("Developer"))
node_commit["Git commit"]
node_audit_tools["Audit tools"]

node_developer -->|"runs init"| node_init
node_init -->|"installs hook"| node_precommit
node_init -->|"copies selections"| node_ai_config
node_commit -->|"intercepts commit"| node_precommit
node_developer -->|"runs scan"| node_scanner
node_scanner -->|"checks secrets"| node_secret_scan
node_scanner -->|"checks code"| node_code_scan
node_scanner -->|"audits dependencies"| node_dependency_audit
node_scanner -->|"checks quality"| node_quality_lint
node_scanner -->|"scans IaC"| node_iac_scan
node_scanner -->|"checks CWE"| node_cwe_scan
node_scanner -->|"checks usage"| node_unused_deps
node_scanner -->|"uses scanners"| node_audit_tools
node_scanner -->|"writes reports"| node_scan_logs
node_developer -->|"runs stats"| node_stats
node_stats -->|"reads history"| node_scan_logs
node_stats -->|"generates chart"| node_chart_file

click node_init "https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/install_hooks.py"
click node_precommit "https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/install_hooks.py"
click node_ai_config "https://github.com/giordano10/vcsp/tree/master/src/vcsp_guard/.vibe"
click node_scanner "https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/scan_project.py"
click node_secret_scan "https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/scan_project.py"
click node_code_scan "https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/scan_project.py"
click node_dependency_audit "https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/scan_project.py"
click node_quality_lint "https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/scan_project.py"
click node_iac_scan "https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/scan_project.py"
click node_cwe_scan "https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/scan_project.py"
click node_unused_deps "https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/scan_project.py"
click node_scan_logs "https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/scan_project.py"
click node_stats "https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/generate_stats.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_init,node_precommit,node_ai_config toneBlue
class node_scanner,node_secret_scan,node_code_scan,node_dependency_audit,node_quality_lint,node_iac_scan,node_cwe_scan,node_unused_deps toneAmber
class node_scan_logs,node_stats,node_chart_file toneMint
class node_developer,node_commit,node_audit_tools toneIndigo
```

## Components

### Project setup

- [Initialize guard](https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/install_hooks.py): `src/vcsp_guard/install_hooks.py`
- [Pre-commit hook](https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/install_hooks.py): `src/vcsp_guard/install_hooks.py`
- [AI configuration](https://github.com/giordano10/vcsp/tree/master/src/vcsp_guard/.vibe): `src/vcsp_guard/.vibe`

### Security scanning

- [Project scanner](https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/scan_project.py): `src/vcsp_guard/scan_project.py`
- [Secret checks](https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/scan_project.py): `src/vcsp_guard/scan_project.py`
- [Code security](https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/scan_project.py): `src/vcsp_guard/scan_project.py`
- [Dependency audit](https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/scan_project.py): `src/vcsp_guard/scan_project.py`
- [Quality lint](https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/scan_project.py): `src/vcsp_guard/scan_project.py`
- [IaC analysis](https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/scan_project.py): `src/vcsp_guard/scan_project.py`
- [CWE Top 25](https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/scan_project.py): `src/vcsp_guard/scan_project.py`
- [Unused dependencies](https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/scan_project.py): `src/vcsp_guard/scan_project.py`

### Scan history

- [Scan logs](https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/scan_project.py): `src/vcsp_guard/scan_project.py`
- [Trend charts](https://github.com/giordano10/vcsp/blob/master/src/vcsp_guard/generate_stats.py): `src/vcsp_guard/generate_stats.py`
- **Trend image**

### Other components

- **Developer**
- **Git commit**
- **Audit tools**

## Connections

- Developer → Initialize guard: runs init (evidence: `README.md`)
- Initialize guard → Pre-commit hook: installs hook (evidence: `src/vcsp_guard/install_hooks.py`)
- Initialize guard → AI configuration: copies selections (evidence: `src/vcsp_guard/install_hooks.py`)
- Git commit → Pre-commit hook: intercepts commit (evidence: `README.md`)
- Developer → Project scanner: runs scan (evidence: `README.md`)
- Project scanner → Secret checks: checks secrets (evidence: `README.md`)
- Project scanner → Code security: checks code (evidence: `README.md`)
- Project scanner → Dependency audit: audits dependencies (evidence: `README.md`)
- Project scanner → Quality lint: checks quality (evidence: `README.md`)
- Project scanner → IaC analysis: scans IaC (evidence: `README.md`)
- Project scanner → CWE Top 25: checks CWE (evidence: `README.md`)
- Project scanner → Unused dependencies: checks usage (evidence: `README.md`)
- Project scanner → Audit tools: uses scanners (evidence: `README.md`)
- Project scanner → Scan logs: writes reports (evidence: `README.md`)
- Developer → Trend charts: runs stats (evidence: `README.md`)
- Trend charts → Scan logs: reads history (evidence: `src/vcsp_guard/generate_stats.py`)
- Trend charts → Trend image: generates chart (evidence: `src/vcsp_guard/generate_stats.py`)
