# shreekamesh/black_veil architecture

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

- Interactive diagram: https://gitdiagram.com/shreekamesh/black_veil
- Repository: https://github.com/shreekamesh/black_veil

## Overview

BLACK VEIL is an autonomous cognitive cyber-defense framework. Its documented prediction workflow accepts a model and feature vector through the inference API and returns a prediction; the broader defense workflow evaluates threats and trust, reasons about response, and can deploy deception or recovery. The repository contains overlapping API and engine generations, so the graph emphasizes README-described capabilities and source-index-supported links. Several subsystem connections are documented rather than visible in the sampled implementation excerpts.

Main entry points: [`src/core/orchestrator/acdo.py`](https://github.com/shreekamesh/black_veil/blob/main/src/core/orchestrator/acdo.py) (Defense Orchestrator), [`ai_core/model_loader.py`](https://github.com/shreekamesh/black_veil/blob/main/ai_core/model_loader.py) (Model Loader), [`inference_api.py`](https://github.com/shreekamesh/black_veil/blob/main/inference_api.py) (Inference API), [`src/core/cognitive`](https://github.com/shreekamesh/black_veil/tree/main/src/core/cognitive) (Cognitive Reasoning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Product Interfaces"]
  node_inference_api["Inference API<br/>[inference_api.py]"]
  node_web_dashboard["Web Dashboard<br/>[App.tsx]"]
  node_api_app["API Application<br/>[app.py]"]
  node_reports["Security Reports<br/>[engine.py]"]
end

subgraph group_detection["Threat Intelligence"]
  node_domain_models["Domain Detection Models"]
  node_knowledge["Threat Knowledge<br/>[engine.py]"]
  node_forensics["Forensic Analysis<br/>[engine.py]"]
  node_attack_memory[("Attack Memory Graph<br/>[engine.py]")]
end

subgraph group_reasoning["Cognitive Defense"]
  node_acdo["Defense Orchestrator<br/>[acdo.py]"]
  node_cognitive["Cognitive Reasoning"]
  node_decision_brain["Decision Consensus<br/>[engine.py]"]
  node_ethics["Ethics Layer<br/>[engine.py]"]
  node_trust["Trust Evaluation<br/>[engine.py]"]
end

subgraph group_response["Adaptive Response"]
  node_trust_recovery["Trust Recovery<br/>[engine.py]"]
  node_deception["Deception Engine<br/>[engine.py]"]
  node_deception_evolution["Deception Evolution<br/>[engine.py]"]
  node_security_actions["Security Actions"]
  node_self_healing["Self-Healing<br/>[engine.py]"]
end

subgraph group_foundation["Model and State"]
  node_model_loader["Model Loader<br/>[model_loader.py]"]
  node_model_registry[("Model Registry<br/>[model_registry.py]")]
end

node_operator(("Operator"))

node_operator -->|"submits features"| node_inference_api
node_inference_api -.->|"loads models"| node_model_loader
node_inference_api -->|"returns prediction"| node_operator
node_operator -.->|"uses dashboard"| node_web_dashboard
node_operator -.->|"accesses API"| node_api_app
node_api_app -->|"imports loader"| node_model_loader
node_model_loader -->|"serves models"| node_domain_models
node_acdo -->|"coordinates defense"| node_cognitive
node_acdo -->|"coordinates trust"| node_trust
node_acdo -->|"coordinates deception"| node_deception
node_acdo -->|"coordinates memory"| node_attack_memory
node_acdo -->|"coordinates actions"| node_security_actions
node_cognitive -.->|"supports decisions"| node_decision_brain
node_cognitive -.->|"checks decisions"| node_ethics
node_trust -->|"uses recovery"| node_trust_recovery
node_deception_evolution -.->|"evolves strategy"| node_deception
node_forensics -.->|"records findings"| node_attack_memory
node_knowledge -.->|"informs defense"| node_acdo
node_acdo -.->|"coordinates recovery"| node_self_healing
node_acdo -.->|"requests summaries"| node_reports
node_model_registry -.->|"registers models"| node_model_loader

click node_inference_api "https://github.com/shreekamesh/black_veil/blob/main/inference_api.py"
click node_web_dashboard "https://github.com/shreekamesh/black_veil/blob/main/frontend/src/App.tsx"
click node_api_app "https://github.com/shreekamesh/black_veil/blob/main/api/app.py"
click node_model_loader "https://github.com/shreekamesh/black_veil/blob/main/ai_core/model_loader.py"
click node_domain_models "https://github.com/shreekamesh/black_veil/tree/main/ai_core"
click node_knowledge "https://github.com/shreekamesh/black_veil/blob/main/knowledge_engine/engine.py"
click node_forensics "https://github.com/shreekamesh/black_veil/blob/main/forensic_engine/engine.py"
click node_attack_memory "https://github.com/shreekamesh/black_veil/blob/main/attack_memory_graph/engine.py"
click node_acdo "https://github.com/shreekamesh/black_veil/blob/main/src/core/orchestrator/acdo.py"
click node_cognitive "https://github.com/shreekamesh/black_veil/tree/main/src/core/cognitive"
click node_decision_brain "https://github.com/shreekamesh/black_veil/blob/main/ai_decision_brain/engine.py"
click node_ethics "https://github.com/shreekamesh/black_veil/blob/main/ai_ethics_layer/engine.py"
click node_trust "https://github.com/shreekamesh/black_veil/blob/main/trust_engine/engine.py"
click node_trust_recovery "https://github.com/shreekamesh/black_veil/blob/main/temporal_recovery_engine/engine.py"
click node_deception "https://github.com/shreekamesh/black_veil/blob/main/deception_engine/engine.py"
click node_deception_evolution "https://github.com/shreekamesh/black_veil/blob/main/deception_evolution_engine/engine.py"
click node_security_actions "https://github.com/shreekamesh/black_veil/tree/main/src/core/security"
click node_self_healing "https://github.com/shreekamesh/black_veil/blob/main/self_healing_engine/engine.py"
click node_reports "https://github.com/shreekamesh/black_veil/blob/main/report_engine/engine.py"
click node_model_registry "https://github.com/shreekamesh/black_veil/blob/main/src/ai_foundation/core/model_registry.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_inference_api,node_web_dashboard,node_api_app,node_reports toneBlue
class node_domain_models,node_knowledge,node_forensics,node_attack_memory toneAmber
class node_acdo,node_cognitive,node_decision_brain,node_ethics,node_trust toneMint
class node_trust_recovery,node_deception,node_deception_evolution,node_security_actions,node_self_healing toneRose
class node_model_loader,node_model_registry,node_operator toneIndigo
```

## Components

### Product Interfaces

- [Inference API](https://github.com/shreekamesh/black_veil/blob/main/inference_api.py): `inference_api.py`
- [Web Dashboard](https://github.com/shreekamesh/black_veil/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [API Application](https://github.com/shreekamesh/black_veil/blob/main/api/app.py): `api/app.py`
- [Security Reports](https://github.com/shreekamesh/black_veil/blob/main/report_engine/engine.py): `report_engine/engine.py`

### Threat Intelligence

- [Domain Detection Models](https://github.com/shreekamesh/black_veil/tree/main/ai_core): `ai_core`
- [Threat Knowledge](https://github.com/shreekamesh/black_veil/blob/main/knowledge_engine/engine.py): `knowledge_engine/engine.py`
- [Forensic Analysis](https://github.com/shreekamesh/black_veil/blob/main/forensic_engine/engine.py): `forensic_engine/engine.py`
- [Attack Memory Graph](https://github.com/shreekamesh/black_veil/blob/main/attack_memory_graph/engine.py): `attack_memory_graph/engine.py`

### Cognitive Defense

- [Defense Orchestrator](https://github.com/shreekamesh/black_veil/blob/main/src/core/orchestrator/acdo.py): `src/core/orchestrator/acdo.py`
- [Cognitive Reasoning](https://github.com/shreekamesh/black_veil/tree/main/src/core/cognitive): `src/core/cognitive`
- [Decision Consensus](https://github.com/shreekamesh/black_veil/blob/main/ai_decision_brain/engine.py): `ai_decision_brain/engine.py`
- [Ethics Layer](https://github.com/shreekamesh/black_veil/blob/main/ai_ethics_layer/engine.py): `ai_ethics_layer/engine.py`
- [Trust Evaluation](https://github.com/shreekamesh/black_veil/blob/main/trust_engine/engine.py): `trust_engine/engine.py`

### Adaptive Response

- [Trust Recovery](https://github.com/shreekamesh/black_veil/blob/main/temporal_recovery_engine/engine.py): `temporal_recovery_engine/engine.py`
- [Deception Engine](https://github.com/shreekamesh/black_veil/blob/main/deception_engine/engine.py): `deception_engine/engine.py`
- [Deception Evolution](https://github.com/shreekamesh/black_veil/blob/main/deception_evolution_engine/engine.py): `deception_evolution_engine/engine.py`
- [Security Actions](https://github.com/shreekamesh/black_veil/tree/main/src/core/security): `src/core/security`
- [Self-Healing](https://github.com/shreekamesh/black_veil/blob/main/self_healing_engine/engine.py): `self_healing_engine/engine.py`

### Model and State

- [Model Loader](https://github.com/shreekamesh/black_veil/blob/main/ai_core/model_loader.py): `ai_core/model_loader.py`
- [Model Registry](https://github.com/shreekamesh/black_veil/blob/main/src/ai_foundation/core/model_registry.py): `src/ai_foundation/core/model_registry.py`

### Other components

- **Operator**

## Connections

- Operator → Inference API: submits features (evidence: `README.md`)
- Inference API → Model Loader: loads models
- Inference API → Operator: returns prediction (evidence: `README.md`)
- Operator → Web Dashboard: uses dashboard
- Operator → API Application: accesses API
- API Application → Model Loader: imports loader (evidence: `api/app.py`)
- Model Loader → Domain Detection Models: serves models (evidence: `ai_core/cicids_engine/engine.py`)
- Defense Orchestrator → Cognitive Reasoning: coordinates defense (evidence: `README.md`)
- Defense Orchestrator → Trust Evaluation: coordinates trust (evidence: `README.md`)
- Defense Orchestrator → Deception Engine: coordinates deception (evidence: `README.md`)
- Defense Orchestrator → Attack Memory Graph: coordinates memory (evidence: `README.md`)
- Defense Orchestrator → Security Actions: coordinates actions (evidence: `README.md`)
- Cognitive Reasoning → Decision Consensus: supports decisions
- Cognitive Reasoning → Ethics Layer: checks decisions
- Trust Evaluation → Trust Recovery: uses recovery (evidence: `trust_engine/engine.py`)
- Deception Evolution → Deception Engine: evolves strategy
- Forensic Analysis → Attack Memory Graph: records findings
- Threat Knowledge → Defense Orchestrator: informs defense
- Defense Orchestrator → Self-Healing: coordinates recovery
- Defense Orchestrator → Security Reports: requests summaries
- Model Registry → Model Loader: registers models
