# bhuvansh855/pyrift-example-plugin architecture

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

- Interactive diagram: https://gitdiagram.com/bhuvansh855/pyrift-example-plugin
- Repository: https://github.com/bhuvansh855/pyrift-example-plugin

## Overview

This is a minimal PyRift plugin template. A developer runs PyRift on source; the host discovers the plugin’s rule provider and manifest through the declared entry points, then the rule checks Python ASTs for calls to the removed `apply()` API and produces findings. The manifest supplies plugin metadata. The excerpts show rule construction and finding creation, but not the host’s scan-time dispatch, so that link is marked unverified. Tests and delivery tooling are excluded.

Main entry points: [`src/pyrift_example/rules.py`](https://github.com/bhuvansh855/pyrift-example-plugin/blob/main/src/pyrift_example/rules.py) (Rule provider), [`pyproject.toml`](https://github.com/bhuvansh855/pyrift-example-plugin/blob/main/pyproject.toml) (Plugin entry points), [`src/pyrift_example/manifest.py`](https://github.com/bhuvansh855/pyrift-example-plugin/blob/main/src/pyrift_example/manifest.py) (Plugin manifest)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_developer(("Developer"))
node_source["Scanned source"]
node_host["PyRift host"]
node_entrypoints["Plugin entry points<br/>[pyproject.toml]"]
node_provider["Rule provider<br/>[rules.py]"]
node_rule["EXP001 checker<br/>[rules.py]"]
node_manifest["Plugin manifest<br/>[manifest.py]"]
node_findings["Rule findings"]

node_developer -->|"runs scan"| node_host
node_source -->|"scans"| node_host
node_entrypoints -->|"registers"| node_provider
node_entrypoints -->|"registers"| node_manifest
node_host -->|"loads"| node_provider
node_provider -->|"returns rule"| node_rule
node_host -->|"loads"| node_manifest
node_host -.->|"dispatches checks"| node_rule
node_rule -->|"creates"| node_findings

click node_entrypoints "https://github.com/bhuvansh855/pyrift-example-plugin/blob/main/pyproject.toml"
click node_provider "https://github.com/bhuvansh855/pyrift-example-plugin/blob/main/src/pyrift_example/rules.py"
click node_rule "https://github.com/bhuvansh855/pyrift-example-plugin/blob/main/src/pyrift_example/rules.py"
click node_manifest "https://github.com/bhuvansh855/pyrift-example-plugin/blob/main/src/pyrift_example/manifest.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_developer,node_source,node_host,node_provider,node_findings toneIndigo
class node_entrypoints,node_rule,node_manifest toneTeal
```

## Components

### Other components

- **Developer**
- **Scanned source**
- **PyRift host**
- [Plugin entry points](https://github.com/bhuvansh855/pyrift-example-plugin/blob/main/pyproject.toml): `pyproject.toml`
- [Rule provider](https://github.com/bhuvansh855/pyrift-example-plugin/blob/main/src/pyrift_example/rules.py): `src/pyrift_example/rules.py`
- [EXP001 checker](https://github.com/bhuvansh855/pyrift-example-plugin/blob/main/src/pyrift_example/rules.py): `src/pyrift_example/rules.py`
- [Plugin manifest](https://github.com/bhuvansh855/pyrift-example-plugin/blob/main/src/pyrift_example/manifest.py): `src/pyrift_example/manifest.py`
- **Rule findings**

## Connections

- Developer → PyRift host: runs scan (evidence: `README.md`)
- Scanned source → PyRift host: scans (evidence: `README.md`)
- Plugin entry points → Rule provider: registers (evidence: `pyproject.toml`)
- Plugin entry points → Plugin manifest: registers (evidence: `pyproject.toml`)
- PyRift host → Rule provider: loads (evidence: `README.md`)
- Rule provider → EXP001 checker: returns rule (evidence: `src/pyrift_example/rules.py`)
- PyRift host → Plugin manifest: loads (evidence: `README.md`)
- PyRift host → EXP001 checker: dispatches checks
- EXP001 checker → Rule findings: creates (evidence: `src/pyrift_example/rules.py`)
