# abhinav16aero/purpleteam architecture

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

- Interactive diagram: https://gitdiagram.com/abhinav16aero/purpleteam
- Repository: https://github.com/abhinav16aero/purpleteam

## Overview

RedBlue AI coordinates Decepticon red-team engagements with Vigil blue-SOC detection, then scores and governs the response. Users initiate engagements through the coordinator API; the coordinator triggers attacks, collects detections, computes defensive posture, and produces a scorecard and evidence record. The README documents the engine and sensor flow; source excerpts confirm the coordinator’s continuous-mode and policy components. Other coordinator stages and integrations are represented at documented directory-level paths because their implementation was not sampled.

Main entry points: [`redblue-coordinator/redblue/scoring/coverage.py`](https://github.com/abhinav16aero/purpleteam/blob/main/redblue-coordinator/redblue/scoring/coverage.py) (Coverage scoring), [`Decepticon/packages/decepticon/decepticon/agents`](https://github.com/abhinav16aero/purpleteam/tree/main/Decepticon/packages/decepticon/decepticon/agents) (Red agents), [`vigil`](https://github.com/abhinav16aero/purpleteam/tree/main/vigil) (Vigil SOC), [`redblue-coordinator/redblue/api/app.py`](https://github.com/abhinav16aero/purpleteam/blob/main/redblue-coordinator/redblue/api/app.py) (Engagement API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_coord["Coordinator"]
  node_api["Engagement API<br/>[app.py]"]
  node_plan["Engagement planning"]
  node_trigger["Red trigger"]
  node_telemetry["Telemetry collection"]
  node_scoring["Coverage scoring<br/>[coverage.py]"]
  node_continuous["Continuous replay<br/>[controller.py]"]
end

subgraph group_red["Red team"]
  node_decepticon["Red agents"]
  node_vigilshield["Injection shield"]
end

subgraph group_blue["Blue team"]
  node_vigil["Vigil SOC"]
  node_blueshield["Injection shield"]
end

subgraph group_governance["Governance"]
  node_policy["Policy engine<br/>[policy_engine.py]"]
  node_response["Governed response"]
  node_scorecard["Engagement scorecard"]
  node_ledger[("Evidence ledger")]
end

node_operator(("Operator"))
node_target["Target range"]
node_sensors["Security sensors"]
node_ollama["Local Ollama"]

node_operator -->|"launches"| node_api
node_api -->|"starts"| node_plan
node_plan -->|"triggers"| node_trigger
node_trigger -->|"launches"| node_decepticon
node_decepticon -->|"attacks"| node_target
node_target -->|"observed by"| node_sensors
node_sensors -->|"sends telemetry"| node_vigil
node_vigil -->|"returns findings"| node_telemetry
node_telemetry -->|"provides detections"| node_scoring
node_scoring -->|"produces"| node_scorecard
node_scoring -.->|"informs decisions"| node_policy
node_policy -->|"governs"| node_response
node_response -->|"records decision"| node_ledger
node_continuous -->|"writes evidence"| node_ledger
node_decepticon -->|"uses shield"| node_vigilshield
node_vigil -->|"uses shield"| node_blueshield
node_vigilshield -->|"local inference"| node_ollama
node_blueshield -->|"local inference"| node_ollama

click node_api "https://github.com/abhinav16aero/purpleteam/blob/main/redblue-coordinator/redblue/api/app.py"
click node_plan "https://github.com/abhinav16aero/purpleteam/tree/main/redblue-coordinator/redblue"
click node_trigger "https://github.com/abhinav16aero/purpleteam/tree/main/redblue-coordinator/redblue"
click node_telemetry "https://github.com/abhinav16aero/purpleteam/tree/main/redblue-coordinator/redblue"
click node_scoring "https://github.com/abhinav16aero/purpleteam/blob/main/redblue-coordinator/redblue/scoring/coverage.py"
click node_continuous "https://github.com/abhinav16aero/purpleteam/blob/main/redblue-coordinator/redblue/continuous/controller.py"
click node_decepticon "https://github.com/abhinav16aero/purpleteam/tree/main/Decepticon/packages/decepticon/decepticon/agents"
click node_vigilshield "https://github.com/abhinav16aero/purpleteam/tree/main/vigil-llm/vigil/core"
click node_vigil "https://github.com/abhinav16aero/purpleteam/tree/main/vigil"
click node_blueshield "https://github.com/abhinav16aero/purpleteam/tree/main/vigil-llm/vigil/core"
click node_policy "https://github.com/abhinav16aero/purpleteam/blob/main/redblue-coordinator/redblue/governance/policy_engine.py"
click node_response "https://github.com/abhinav16aero/purpleteam/tree/main/redblue-coordinator/redblue"
click node_scorecard "https://github.com/abhinav16aero/purpleteam/tree/main/redblue-coordinator/redblue/scoring"
click node_ledger "https://github.com/abhinav16aero/purpleteam/tree/main/redblue-coordinator/redblue/evidence"

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_api,node_plan,node_trigger,node_telemetry,node_scoring,node_continuous toneBlue
class node_decepticon,node_vigilshield toneAmber
class node_vigil,node_blueshield toneMint
class node_policy,node_response,node_scorecard,node_ledger toneRose
class node_operator,node_target,node_sensors,node_ollama toneIndigo
```

## Components

### Coordinator

- [Engagement API](https://github.com/abhinav16aero/purpleteam/blob/main/redblue-coordinator/redblue/api/app.py): `redblue-coordinator/redblue/api/app.py`
- [Engagement planning](https://github.com/abhinav16aero/purpleteam/tree/main/redblue-coordinator/redblue): `redblue-coordinator/redblue`
- [Red trigger](https://github.com/abhinav16aero/purpleteam/tree/main/redblue-coordinator/redblue): `redblue-coordinator/redblue`
- [Telemetry collection](https://github.com/abhinav16aero/purpleteam/tree/main/redblue-coordinator/redblue): `redblue-coordinator/redblue`
- [Coverage scoring](https://github.com/abhinav16aero/purpleteam/blob/main/redblue-coordinator/redblue/scoring/coverage.py): `redblue-coordinator/redblue/scoring/coverage.py`
- [Continuous replay](https://github.com/abhinav16aero/purpleteam/blob/main/redblue-coordinator/redblue/continuous/controller.py): `redblue-coordinator/redblue/continuous/controller.py`

### Red team

- [Red agents](https://github.com/abhinav16aero/purpleteam/tree/main/Decepticon/packages/decepticon/decepticon/agents): `Decepticon/packages/decepticon/decepticon/agents`
- [Injection shield](https://github.com/abhinav16aero/purpleteam/tree/main/vigil-llm/vigil/core): `vigil-llm/vigil/core`

### Blue team

- [Vigil SOC](https://github.com/abhinav16aero/purpleteam/tree/main/vigil): `vigil`
- [Injection shield](https://github.com/abhinav16aero/purpleteam/tree/main/vigil-llm/vigil/core): `vigil-llm/vigil/core`

### Governance

- [Policy engine](https://github.com/abhinav16aero/purpleteam/blob/main/redblue-coordinator/redblue/governance/policy_engine.py): `redblue-coordinator/redblue/governance/policy_engine.py`
- [Governed response](https://github.com/abhinav16aero/purpleteam/tree/main/redblue-coordinator/redblue): `redblue-coordinator/redblue`
- [Engagement scorecard](https://github.com/abhinav16aero/purpleteam/tree/main/redblue-coordinator/redblue/scoring): `redblue-coordinator/redblue/scoring`
- [Evidence ledger](https://github.com/abhinav16aero/purpleteam/tree/main/redblue-coordinator/redblue/evidence): `redblue-coordinator/redblue/evidence`

### Other components

- **Operator**
- **Target range**
- **Security sensors**
- **Local Ollama**

## Connections

- Operator → Engagement API: launches (evidence: `README.md`)
- Engagement API → Engagement planning: starts (evidence: `README.md`)
- Engagement planning → Red trigger: triggers (evidence: `README.md`)
- Red trigger → Red agents: launches (evidence: `README.md`)
- Red agents → Target range: attacks (evidence: `README.md`)
- Target range → Security sensors: observed by (evidence: `README.md`)
- Security sensors → Vigil SOC: sends telemetry (evidence: `README.md`)
- Vigil SOC → Telemetry collection: returns findings (evidence: `README.md`)
- Telemetry collection → Coverage scoring: provides detections (evidence: `README.md`)
- Coverage scoring → Engagement scorecard: produces (evidence: `README.md`)
- Coverage scoring → Policy engine: informs decisions
- Policy engine → Governed response: governs (evidence: `README.md`)
- Governed response → Evidence ledger: records decision (evidence: `README.md`)
- Continuous replay → Evidence ledger: writes evidence (evidence: `redblue-coordinator/redblue/continuous/controller.py`)
- Red agents → Injection shield: uses shield (evidence: `README.md`)
- Vigil SOC → Injection shield: uses shield (evidence: `README.md`)
- Injection shield → Local Ollama: local inference (evidence: `README.md`)
- Injection shield → Local Ollama: local inference (evidence: `README.md`)
