# mindaandreea/repo_health_toolkit architecture

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

- Interactive diagram: https://gitdiagram.com/mindaandreea/repo_health_toolkit
- Repository: https://github.com/mindaandreea/repo_health_toolkit

## Overview

This small Python CLI checks Alembic migration-chain structure without connecting to a database or invoking Alembic. The workflow is: a user supplies a versions directory, the auditor reads and parses migration headers, checks the resulting revision graph, and prints findings with a success or failure exit status. The runtime is implemented in one source file; the edges below reflect its shown calls and file reads.

Main entry points: [`alembic_chain_lint/chain_lint.py`](https://github.com/mindaandreea/repo_health_toolkit/blob/main/alembic_chain_lint/chain_lint.py) (CLI entry point)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User or CI"))
node_cli["CLI entry point<br/>[chain_lint.py]"]
node_auditor["Chain auditor<br/>[chain_lint.py]"]
node_parser["Header parser<br/>[chain_lint.py]"]
node_migrations["Migration files"]
node_report["Findings and status"]

node_user -->|"runs with path"| node_cli
node_cli -->|"calls audit"| node_auditor
node_auditor -->|"reads headers"| node_migrations
node_auditor -->|"parses IDs"| node_parser
node_cli -->|"prints and exits"| node_report

click node_cli "https://github.com/mindaandreea/repo_health_toolkit/blob/main/alembic_chain_lint/chain_lint.py"
click node_auditor "https://github.com/mindaandreea/repo_health_toolkit/blob/main/alembic_chain_lint/chain_lint.py"
click node_parser "https://github.com/mindaandreea/repo_health_toolkit/blob/main/alembic_chain_lint/chain_lint.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_user toneBlue
class node_cli,node_auditor,node_parser toneTeal
class node_migrations,node_report toneIndigo
```

## Components

### Other components

- **User or CI**
- [CLI entry point](https://github.com/mindaandreea/repo_health_toolkit/blob/main/alembic_chain_lint/chain_lint.py): `alembic_chain_lint/chain_lint.py`
- [Chain auditor](https://github.com/mindaandreea/repo_health_toolkit/blob/main/alembic_chain_lint/chain_lint.py): `alembic_chain_lint/chain_lint.py`
- [Header parser](https://github.com/mindaandreea/repo_health_toolkit/blob/main/alembic_chain_lint/chain_lint.py): `alembic_chain_lint/chain_lint.py`
- **Migration files**
- **Findings and status**

## Connections

- User or CI → CLI entry point: runs with path (evidence: `alembic_chain_lint/chain_lint.py`)
- CLI entry point → Chain auditor: calls audit (evidence: `alembic_chain_lint/chain_lint.py`)
- Chain auditor → Migration files: reads headers (evidence: `alembic_chain_lint/chain_lint.py`)
- Chain auditor → Header parser: parses IDs (evidence: `alembic_chain_lint/chain_lint.py`)
- CLI entry point → Findings and status: prints and exits (evidence: `alembic_chain_lint/chain_lint.py`)
