# vishnugovindu23-cmd/llm-alert-summarizer architecture

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

- Interactive diagram: https://gitdiagram.com/vishnugovindu23-cmd/llm-alert-summarizer
- Repository: https://github.com/vishnugovindu23-cmd/llm-alert-summarizer

## Overview

This CLI turns an incident bundle into a triage or root-cause report. Its main workflow reads the bundle, applies privacy and injection guardrails, builds a mode-specific prompt, generates structured output with Claude or an offline provider, then validates and grounds the result before rendering the report and audit. The graph includes the documented report capabilities through the report schema and rendering stages. Relationships are based on the sampled source and README; unsampled modules are not assumed to have additional connections.

Main entry points: [`pipeline.py`](https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/pipeline.py) (Summarization pipeline), [`cli.py`](https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/cli.py) (CLI), [`providers.py`](https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/providers.py) (Provider selection), [`render.py`](https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/render.py) (Markdown renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI workflow"]
  node_cli["CLI<br/>[cli.py]"]
  node_pipeline["Summarization pipeline<br/>[pipeline.py]"]
end

subgraph group_prep["Evidence safeguards"]
  node_redactor["Redaction<br/>[guardrails.py]"]
  node_injection["Injection scan<br/>[guardrails.py]"]
  node_prompt["Prompt construction<br/>[prompts.py]"]
end

subgraph group_generation["Report generation"]
  node_provider["Provider selection<br/>[providers.py]"]
  node_claude["Claude provider<br/>[providers.py]"]
  node_offline["Offline provider<br/>[providers.py]"]
end

subgraph group_output["Validation and output"]
  node_schema["Report schema<br/>[schema.py]"]
  node_grounding["IOC grounding<br/>[guardrails.py]"]
  node_restore["Placeholder restoration<br/>[pipeline.py]"]
  node_renderer["Markdown renderer<br/>[render.py]"]
end

node_analyst(("Analyst"))
node_bundle["Incident bundle"]
node_claude_api{{"Anthropic API"}}
node_report["Incident report and audit"]

node_analyst -->|"runs"| node_cli
node_analyst -->|"provides"| node_bundle
node_cli -->|"reads"| node_bundle
node_cli -->|"calls"| node_pipeline
node_cli -->|"selects"| node_provider
node_pipeline -->|"redacts"| node_redactor
node_pipeline -->|"scans"| node_injection
node_pipeline -->|"builds prompt"| node_prompt
node_pipeline -->|"requests report"| node_provider
node_provider -->|"selects"| node_claude
node_provider -->|"selects"| node_offline
node_claude -->|"sends request"| node_claude_api
node_claude -->|"configures output"| node_schema
node_pipeline -->|"validates"| node_schema
node_pipeline -->|"grounds IOCs"| node_grounding
node_pipeline -->|"restores placeholders"| node_restore
node_cli -->|"renders result"| node_renderer
node_renderer -->|"formats report"| node_report
node_cli -->|"writes report"| node_report
node_report -->|"presents findings"| node_analyst

click node_cli "https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/cli.py"
click node_pipeline "https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/pipeline.py"
click node_redactor "https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/guardrails.py"
click node_injection "https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/guardrails.py"
click node_prompt "https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/prompts.py"
click node_provider "https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/providers.py"
click node_claude "https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/providers.py"
click node_offline "https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/providers.py"
click node_schema "https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/schema.py"
click node_grounding "https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/guardrails.py"
click node_restore "https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/pipeline.py"
click node_renderer "https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/render.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_pipeline toneBlue
class node_redactor,node_injection,node_prompt toneAmber
class node_provider,node_claude,node_offline,node_claude_api toneMint
class node_schema,node_grounding,node_restore,node_renderer toneRose
class node_analyst,node_bundle,node_report toneIndigo
```

## Components

### CLI workflow

- [CLI](https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/cli.py): `cli.py`
- [Summarization pipeline](https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/pipeline.py): `pipeline.py`

### Evidence safeguards

- [Redaction](https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/guardrails.py): `guardrails.py`
- [Injection scan](https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/guardrails.py): `guardrails.py`
- [Prompt construction](https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/prompts.py): `prompts.py`

### Report generation

- [Provider selection](https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/providers.py): `providers.py`
- [Claude provider](https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/providers.py): `providers.py`
- [Offline provider](https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/providers.py): `providers.py`

### Validation and output

- [Report schema](https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/schema.py): `schema.py`
- [IOC grounding](https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/guardrails.py): `guardrails.py`
- [Placeholder restoration](https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/pipeline.py): `pipeline.py`
- [Markdown renderer](https://github.com/vishnugovindu23-cmd/llm-alert-summarizer/blob/main/render.py): `render.py`

### Other components

- **Analyst**
- **Incident bundle**
- **Anthropic API**
- **Incident report and audit**

## Connections

- Analyst → CLI: runs (evidence: `README.md`)
- Analyst → Incident bundle: provides (evidence: `README.md`)
- CLI → Incident bundle: reads (evidence: `cli.py`)
- CLI → Summarization pipeline: calls (evidence: `cli.py`)
- CLI → Provider selection: selects (evidence: `cli.py`)
- Summarization pipeline → Redaction: redacts (evidence: `pipeline.py`)
- Summarization pipeline → Injection scan: scans (evidence: `pipeline.py`)
- Summarization pipeline → Prompt construction: builds prompt (evidence: `pipeline.py`)
- Summarization pipeline → Provider selection: requests report (evidence: `pipeline.py`)
- Provider selection → Claude provider: selects (evidence: `cli.py`)
- Provider selection → Offline provider: selects (evidence: `cli.py`)
- Claude provider → Anthropic API: sends request (evidence: `providers.py`)
- Claude provider → Report schema: configures output (evidence: `providers.py`)
- Summarization pipeline → Report schema: validates (evidence: `pipeline.py`)
- Summarization pipeline → IOC grounding: grounds IOCs (evidence: `pipeline.py`)
- Summarization pipeline → Placeholder restoration: restores placeholders (evidence: `pipeline.py`)
- CLI → Markdown renderer: renders result (evidence: `cli.py`)
- Markdown renderer → Incident report and audit: formats report (evidence: `render.py`)
- CLI → Incident report and audit: writes report (evidence: `cli.py`)
- Incident report and audit → Analyst: presents findings (evidence: `README.md`)
