# akashwagh07/iris architecture

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

- Interactive diagram: https://gitdiagram.com/akashwagh07/iris
- Repository: https://github.com/akashwagh07/iris

## Overview

IRIS is a spacecraft telemetry anomaly-detection and diagnosis system. Its primary workflow ingests real or simulated telemetry, profiles and routes windows to detectors, calibrates alarms, applies trust-gated consensus and fallback, then builds and diagnoses incidents for API delivery. The README also documents simulation, commissioning, and evaluation capabilities, so these appear as product branches. Some links reflect documented workflow rather than inspected call sites; those use README evidence. The source excerpts are partial, so unsampled implementation details are not inferred.

Main entry points: [`src/iris/orchestration/orchestrator.py`](https://github.com/akashwagh07/iris/blob/main/src/iris/orchestration/orchestrator.py) (Window orchestrator), [`src/iris/anomaly/incidents.py`](https://github.com/akashwagh07/iris/blob/main/src/iris/anomaly/incidents.py) (Incident builder), [`src/iris/routing/model_registry.py`](https://github.com/akashwagh07/iris/blob/main/src/iris/routing/model_registry.py) (Detector registry), [`src/iris/models/base_model.py`](https://github.com/akashwagh07/iris/blob/main/src/iris/models/base_model.py) (Detector interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Telemetry Inputs"]
  node_realdata[("NASA SMAP/MSL<br/>[smap_msl.py]")]
  node_simadapter["Simulation adapter<br/>[sim.py]"]
  node_schema["Telemetry contracts<br/>[schema.py]"]
end

subgraph group_detect["Detection Pipeline"]
  node_orchestrator["Window orchestrator<br/>[orchestrator.py]"]
  node_profiler["Telemetry profiler"]
  node_router["Capability router<br/>[model_router.py]"]
  node_registry["Detector registry<br/>[model_registry.py]"]
  node_detector_contract["Detector interface<br/>[base_model.py]"]
  node_fixed["Fixed limits D0<br/>[limits.py]"]
  node_zscore["Robust Z-score D1<br/>[zscore.py]"]
  node_gru["GRU forecaster D2<br/>[gru_forecaster.py]"]
  node_physics["Physics checks D3<br/>[physics_checks.py]"]
  node_budget["Alarm budgeting<br/>[alarm_budget.py]"]
  node_trust["Trust gate and fallback<br/>[trust_gate.py]"]
  node_events["Event bus<br/>[events.py]"]
end

subgraph group_diagnose["Incident Diagnosis"]
  node_incidents["Incident builder<br/>[incidents.py]"]
  node_severity["Severity rubric<br/>[severity.py]"]
  node_subsystem["Subsystem diagnosis"]
  node_fusion["Causal evidence fusion<br/>[evidence_fusion.py]"]
  node_explain["Explanation engine<br/>[explain.py]"]
end

subgraph group_serve["API Delivery"]
  node_api["FastAPI and WebSockets<br/>[main.py]"]
  node_runmanager["Streaming run manager<br/>[run_manager.py]"]
  node_modelserver["Model server<br/>[model_server.py]"]
end

subgraph group_assess["Simulation Evaluation"]
  node_simulator["LEO simulator<br/>[satellite_sim.py]"]
  node_faults["Fault scenarios<br/>[faults.py]"]
  node_evaluation["Evaluation harness<br/>[run_eval.py]"]
  node_metrics["Evaluation metrics<br/>[metrics.py]"]
  node_commissioning["Commissioning protocol<br/>[commissioning.py]"]
end

node_operators(("Satellite operators"))

node_operators -->|"request monitoring"| node_api
node_realdata -.->|"supply telemetry"| node_orchestrator
node_simulator -->|"inject faults"| node_faults
node_simadapter -->|"generate scenarios"| node_simulator
node_simadapter -->|"create datasets"| node_schema
node_orchestrator -->|"profile windows"| node_profiler
node_orchestrator -->|"route detectors"| node_router
node_router -->|"select candidates"| node_registry
node_registry -->|"instantiate"| node_fixed
node_registry -->|"instantiate"| node_zscore
node_registry -->|"instantiate"| node_gru
node_registry -->|"instantiate"| node_physics
node_fixed -->|"implements"| node_detector_contract
node_zscore -->|"implements"| node_detector_contract
node_gru -->|"implements"| node_detector_contract
node_physics -->|"implements"| node_detector_contract
node_orchestrator -->|"calibrate thresholds"| node_budget
node_orchestrator -->|"apply consensus"| node_trust
node_orchestrator -->|"publish lifecycle events"| node_events
node_orchestrator -->|"build incidents"| node_incidents
node_incidents -->|"score severity"| node_severity
node_incidents -->|"diagnose subsystem"| node_subsystem
node_incidents -->|"fuse evidence"| node_fusion
node_incidents -->|"create explanation"| node_explain
node_api -->|"manage streaming runs"| node_runmanager
node_api -->|"serve models"| node_modelserver
node_runmanager -->|"run telemetry pipeline"| node_orchestrator
node_runmanager -->|"process incidents"| node_incidents
node_evaluation -.->|"calculate metrics"| node_metrics
node_commissioning -->|"commission detectors"| node_orchestrator
node_evaluation -.->|"evaluate scenarios"| node_simadapter

click node_realdata "https://github.com/akashwagh07/iris/blob/main/src/iris/adapters/smap_msl.py"
click node_simulator "https://github.com/akashwagh07/iris/blob/main/src/iris/sim/satellite_sim.py"
click node_faults "https://github.com/akashwagh07/iris/blob/main/src/iris/sim/faults.py"
click node_simadapter "https://github.com/akashwagh07/iris/blob/main/src/iris/adapters/sim.py"
click node_schema "https://github.com/akashwagh07/iris/blob/main/src/iris/schema.py"
click node_orchestrator "https://github.com/akashwagh07/iris/blob/main/src/iris/orchestration/orchestrator.py"
click node_profiler "https://github.com/akashwagh07/iris/blob/main/src/iris/profiling/telemetry_profiler.py"
click node_router "https://github.com/akashwagh07/iris/blob/main/src/iris/routing/model_router.py"
click node_registry "https://github.com/akashwagh07/iris/blob/main/src/iris/routing/model_registry.py"
click node_detector_contract "https://github.com/akashwagh07/iris/blob/main/src/iris/models/base_model.py"
click node_fixed "https://github.com/akashwagh07/iris/blob/main/src/iris/models/limits.py"
click node_zscore "https://github.com/akashwagh07/iris/blob/main/src/iris/models/zscore.py"
click node_gru "https://github.com/akashwagh07/iris/blob/main/src/iris/models/gru_forecaster.py"
click node_physics "https://github.com/akashwagh07/iris/blob/main/src/iris/models/physics_checks.py"
click node_budget "https://github.com/akashwagh07/iris/blob/main/src/iris/calibration/alarm_budget.py"
click node_trust "https://github.com/akashwagh07/iris/blob/main/src/iris/orchestration/trust_gate.py"
click node_events "https://github.com/akashwagh07/iris/blob/main/src/iris/orchestration/events.py"
click node_incidents "https://github.com/akashwagh07/iris/blob/main/src/iris/anomaly/incidents.py"
click node_severity "https://github.com/akashwagh07/iris/blob/main/src/iris/anomaly/severity.py"
click node_subsystem "https://github.com/akashwagh07/iris/blob/main/src/iris/diagnostics/subsystem_diagnosis.py"
click node_fusion "https://github.com/akashwagh07/iris/blob/main/src/iris/diagnostics/evidence_fusion.py"
click node_explain "https://github.com/akashwagh07/iris/blob/main/src/iris/diagnostics/explain.py"
click node_api "https://github.com/akashwagh07/iris/blob/main/src/iris/api/main.py"
click node_runmanager "https://github.com/akashwagh07/iris/blob/main/src/iris/api/run_manager.py"
click node_modelserver "https://github.com/akashwagh07/iris/blob/main/src/iris/api/model_server.py"
click node_evaluation "https://github.com/akashwagh07/iris/blob/main/src/iris/eval/run_eval.py"
click node_metrics "https://github.com/akashwagh07/iris/blob/main/src/iris/eval/metrics.py"
click node_commissioning "https://github.com/akashwagh07/iris/blob/main/src/iris/orchestration/commissioning.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_realdata,node_simadapter,node_schema toneBlue
class node_orchestrator,node_profiler,node_router,node_registry,node_detector_contract,node_fixed,node_zscore,node_gru,node_physics,node_budget,node_trust,node_events toneAmber
class node_incidents,node_severity,node_subsystem,node_fusion,node_explain toneMint
class node_api,node_runmanager,node_modelserver toneRose
class node_simulator,node_faults,node_evaluation,node_metrics,node_commissioning,node_operators toneIndigo
```

## Components

### Telemetry Inputs

- [NASA SMAP/MSL](https://github.com/akashwagh07/iris/blob/main/src/iris/adapters/smap_msl.py): `src/iris/adapters/smap_msl.py`
- [Simulation adapter](https://github.com/akashwagh07/iris/blob/main/src/iris/adapters/sim.py): `src/iris/adapters/sim.py`
- [Telemetry contracts](https://github.com/akashwagh07/iris/blob/main/src/iris/schema.py): `src/iris/schema.py`

### Detection Pipeline

- [Window orchestrator](https://github.com/akashwagh07/iris/blob/main/src/iris/orchestration/orchestrator.py): `src/iris/orchestration/orchestrator.py`
- [Telemetry profiler](https://github.com/akashwagh07/iris/blob/main/src/iris/profiling/telemetry_profiler.py): `src/iris/profiling/telemetry_profiler.py`
- [Capability router](https://github.com/akashwagh07/iris/blob/main/src/iris/routing/model_router.py): `src/iris/routing/model_router.py`
- [Detector registry](https://github.com/akashwagh07/iris/blob/main/src/iris/routing/model_registry.py): `src/iris/routing/model_registry.py`
- [Detector interface](https://github.com/akashwagh07/iris/blob/main/src/iris/models/base_model.py): `src/iris/models/base_model.py`
- [Fixed limits D0](https://github.com/akashwagh07/iris/blob/main/src/iris/models/limits.py): `src/iris/models/limits.py`
- [Robust Z-score D1](https://github.com/akashwagh07/iris/blob/main/src/iris/models/zscore.py): `src/iris/models/zscore.py`
- [GRU forecaster D2](https://github.com/akashwagh07/iris/blob/main/src/iris/models/gru_forecaster.py): `src/iris/models/gru_forecaster.py`
- [Physics checks D3](https://github.com/akashwagh07/iris/blob/main/src/iris/models/physics_checks.py): `src/iris/models/physics_checks.py`
- [Alarm budgeting](https://github.com/akashwagh07/iris/blob/main/src/iris/calibration/alarm_budget.py): `src/iris/calibration/alarm_budget.py`
- [Trust gate and fallback](https://github.com/akashwagh07/iris/blob/main/src/iris/orchestration/trust_gate.py): `src/iris/orchestration/trust_gate.py`
- [Event bus](https://github.com/akashwagh07/iris/blob/main/src/iris/orchestration/events.py): `src/iris/orchestration/events.py`

### Incident Diagnosis

- [Incident builder](https://github.com/akashwagh07/iris/blob/main/src/iris/anomaly/incidents.py): `src/iris/anomaly/incidents.py`
- [Severity rubric](https://github.com/akashwagh07/iris/blob/main/src/iris/anomaly/severity.py): `src/iris/anomaly/severity.py`
- [Subsystem diagnosis](https://github.com/akashwagh07/iris/blob/main/src/iris/diagnostics/subsystem_diagnosis.py): `src/iris/diagnostics/subsystem_diagnosis.py`
- [Causal evidence fusion](https://github.com/akashwagh07/iris/blob/main/src/iris/diagnostics/evidence_fusion.py): `src/iris/diagnostics/evidence_fusion.py`
- [Explanation engine](https://github.com/akashwagh07/iris/blob/main/src/iris/diagnostics/explain.py): `src/iris/diagnostics/explain.py`

### API Delivery

- [FastAPI and WebSockets](https://github.com/akashwagh07/iris/blob/main/src/iris/api/main.py): `src/iris/api/main.py`
- [Streaming run manager](https://github.com/akashwagh07/iris/blob/main/src/iris/api/run_manager.py): `src/iris/api/run_manager.py`
- [Model server](https://github.com/akashwagh07/iris/blob/main/src/iris/api/model_server.py): `src/iris/api/model_server.py`

### Simulation Evaluation

- [LEO simulator](https://github.com/akashwagh07/iris/blob/main/src/iris/sim/satellite_sim.py): `src/iris/sim/satellite_sim.py`
- [Fault scenarios](https://github.com/akashwagh07/iris/blob/main/src/iris/sim/faults.py): `src/iris/sim/faults.py`
- [Evaluation harness](https://github.com/akashwagh07/iris/blob/main/src/iris/eval/run_eval.py): `src/iris/eval/run_eval.py`
- [Evaluation metrics](https://github.com/akashwagh07/iris/blob/main/src/iris/eval/metrics.py): `src/iris/eval/metrics.py`
- [Commissioning protocol](https://github.com/akashwagh07/iris/blob/main/src/iris/orchestration/commissioning.py): `src/iris/orchestration/commissioning.py`

### Other components

- **Satellite operators**

## Connections

- Satellite operators → FastAPI and WebSockets: request monitoring
- NASA SMAP/MSL → Window orchestrator: supply telemetry
- LEO simulator → Fault scenarios: inject faults (evidence: `src/iris/sim/satellite_sim.py`)
- Simulation adapter → LEO simulator: generate scenarios (evidence: `src/iris/adapters/sim.py`)
- Simulation adapter → Telemetry contracts: create datasets (evidence: `src/iris/adapters/sim.py`)
- Window orchestrator → Telemetry profiler: profile windows (evidence: `src/iris/orchestration/orchestrator.py`)
- Window orchestrator → Capability router: route detectors (evidence: `src/iris/orchestration/orchestrator.py`)
- Capability router → Detector registry: select candidates (evidence: `src/iris/routing/model_router.py`)
- Detector registry → Fixed limits D0: instantiate (evidence: `src/iris/routing/model_registry.py`)
- Detector registry → Robust Z-score D1: instantiate (evidence: `src/iris/routing/model_registry.py`)
- Detector registry → GRU forecaster D2: instantiate (evidence: `src/iris/routing/model_registry.py`)
- Detector registry → Physics checks D3: instantiate (evidence: `src/iris/routing/model_registry.py`)
- Fixed limits D0 → Detector interface: implements (evidence: `src/iris/models/limits.py`)
- Robust Z-score D1 → Detector interface: implements (evidence: `src/iris/models/zscore.py`)
- GRU forecaster D2 → Detector interface: implements (evidence: `src/iris/models/gru_forecaster.py`)
- Physics checks D3 → Detector interface: implements (evidence: `src/iris/models/physics_checks.py`)
- Window orchestrator → Alarm budgeting: calibrate thresholds (evidence: `src/iris/orchestration/orchestrator.py`)
- Window orchestrator → Trust gate and fallback: apply consensus (evidence: `src/iris/orchestration/orchestrator.py`)
- Window orchestrator → Event bus: publish lifecycle events (evidence: `src/iris/orchestration/orchestrator.py`)
- Window orchestrator → Incident builder: build incidents
- Incident builder → Severity rubric: score severity (evidence: `src/iris/anomaly/incidents.py`)
- Incident builder → Subsystem diagnosis: diagnose subsystem (evidence: `src/iris/anomaly/incidents.py`)
- Incident builder → Causal evidence fusion: fuse evidence (evidence: `src/iris/anomaly/incidents.py`)
- Incident builder → Explanation engine: create explanation (evidence: `src/iris/anomaly/incidents.py`)
- FastAPI and WebSockets → Streaming run manager: manage streaming runs (evidence: `src/iris/api/main.py`)
- FastAPI and WebSockets → Model server: serve models (evidence: `src/iris/api/main.py`)
- Streaming run manager → Window orchestrator: run telemetry pipeline (evidence: `src/iris/api/run_manager.py`)
- Streaming run manager → Incident builder: process incidents (evidence: `src/iris/api/run_manager.py`)
- Evaluation harness → Evaluation metrics: calculate metrics
- Commissioning protocol → Window orchestrator: commission detectors (evidence: `src/iris/orchestration/commissioning.py`)
- Evaluation harness → Simulation adapter: evaluate scenarios
