# janlucakaestle/adas-validation-agent architecture

> Architecture diagram of the GitHub repository janlucakaestle/adas-validation-agent, 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/janlucakaestle/adas-validation-agent
- Repository: https://github.com/janlucakaestle/adas-validation-agent

## Overview

AVVAL is a SOTIF-inspired validation demonstrator for a learned adaptive-cruise-control system with driver hand-back. The user runs campaigns through the CLI: simulations produce stored run records; exposure-weighted estimation feeds acceptance evaluation and release reporting. Separately, an agent and numerical search strategies discover candidate triggering conditions, which are checked through an evidence protocol and retested on a fresh hold-out. Benchmarking, sensitivity analysis, diagnostics, and provenance support those decisions. The graph follows documented workflow and source-index references; unsampled implementation details and uncertain links are omitted.

Main entry points: [`avval/cli.py`](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/cli.py) (Command interface), [`avval/store.py`](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/store.py) (Run data store), [`avval/campaign.py`](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/campaign.py) (Campaign runner), [`avval/agent.py`](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/agent.py) (LLM search agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_simulation["ACC simulation"]
  node_policy["Learned ACC policy<br/>[policy.py]"]
  node_sim["Scenario simulator<br/>[sim.py]"]
  node_driver["Driver response<br/>[driver.py]"]
  node_reference["Reference behavior<br/>[reference.py]"]
  node_replay["Scenario replay<br/>[replay.py]"]
end

subgraph group_discovery["Failure discovery"]
  node_search["Search interface<br/>[search.py]"]
  node_agent["LLM search agent<br/>[agent.py]"]
  node_baselines["Search baselines<br/>[baselines.py]"]
  node_evidence["Evidence protocol<br/>[evidence.py]"]
  node_frozen["Frozen predicates<br/>[frozen.py]"]
  node_holdout["Fresh hold-out<br/>[holdout.py]"]
  node_benchmark["Strategy benchmark<br/>[benchmark.py]"]
end

subgraph group_validation["Validation evidence"]
  node_exposure["ODD exposure model<br/>[exposure.py]"]
  node_estimation["Estimation campaigns<br/>[estimation.py]"]
  node_evaluation["Acceptance evaluation<br/>[evaluation.py]"]
  node_report["Validation reports<br/>[report.py]"]
  node_sensitivity["Sensitivity analysis<br/>[sensitivity.py]"]
  node_diagnostics["Run diagnostics<br/>[diagnostics.py]"]
  node_clusters["Failure clusters<br/>[clusters.py]"]
  node_findings["Findings summary<br/>[findings.py]"]
end

subgraph group_operations["Campaign operations"]
  node_cli["Command interface<br/>[cli.py]"]
  node_config["Release configuration<br/>[config.py]"]
  node_provenance["Release provenance<br/>[provenance.py]"]
  node_campaign["Campaign runner<br/>[campaign.py]"]
  node_store[("Run data store<br/>[store.py]")]
end

node_user(("Engineer"))
node_llm(("LLM service"))

node_user -->|"invokes"| node_cli
node_cli -->|"runs campaigns"| node_campaign
node_cli -->|"starts estimation"| node_estimation
node_cli -->|"starts discovery"| node_agent
node_cli -->|"starts searches"| node_baselines
node_cli -->|"runs hold-out"| node_holdout
node_cli -->|"runs variants"| node_sensitivity
node_cli -->|"runs diagnostics"| node_diagnostics
node_cli -->|"generates reports"| node_report
node_campaign -->|"loads release"| node_config
node_campaign -->|"records identity"| node_provenance
node_campaign -->|"simulates cases"| node_sim
node_campaign -->|"writes runs"| node_store
node_sim -->|"uses policy"| node_policy
node_sim -->|"models response"| node_driver
node_reference -->|"simulates reference"| node_sim
node_replay -->|"replays cases"| node_sim
node_estimation -->|"runs sample"| node_campaign
node_estimation -->|"samples ODD"| node_exposure
node_estimation -->|"checks records"| node_store
node_evaluation -->|"queries runs"| node_store
node_report -->|"renders results"| node_evaluation
node_report -->|"reads records"| node_store
node_agent -->|"uses tools"| node_search
node_agent -->|"validates claims"| node_evidence
node_agent -->|"queries model"| node_llm
node_search -->|"runs cases"| node_campaign
node_baselines -->|"shares interface"| node_search
node_evidence -->|"freezes predicates"| node_frozen
node_holdout -->|"checks conditions"| node_evidence
node_holdout -->|"records runs"| node_store
node_benchmark -->|"compares strategies"| node_baselines
node_benchmark -->|"benchmarks agent"| node_agent
node_sensitivity -->|"measures variants"| node_evaluation
node_sensitivity -->|"imports campaigns"| node_store
node_diagnostics -->|"replays runs"| node_replay
node_diagnostics -->|"reads campaigns"| node_store
node_clusters -->|"replays cases"| node_replay
node_clusters -->|"queries runs"| node_store
node_findings -->|"checks estimates"| node_estimation

click node_cli "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/cli.py"
click node_config "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/config.py"
click node_provenance "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/provenance.py"
click node_policy "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/policy.py"
click node_sim "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/sim.py"
click node_driver "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/driver.py"
click node_reference "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/reference.py"
click node_replay "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/replay.py"
click node_campaign "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/campaign.py"
click node_store "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/store.py"
click node_exposure "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/exposure.py"
click node_estimation "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/estimation.py"
click node_evaluation "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/evaluation.py"
click node_report "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/report.py"
click node_search "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/search.py"
click node_agent "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/agent.py"
click node_baselines "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/baselines.py"
click node_evidence "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/evidence.py"
click node_frozen "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/frozen.py"
click node_holdout "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/holdout.py"
click node_benchmark "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/benchmark.py"
click node_sensitivity "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/sensitivity.py"
click node_diagnostics "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/diagnostics.py"
click node_clusters "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/clusters.py"
click node_findings "https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/findings.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_policy,node_sim,node_driver,node_reference,node_replay toneBlue
class node_search,node_agent,node_baselines,node_evidence,node_frozen,node_holdout,node_benchmark toneAmber
class node_exposure,node_estimation,node_evaluation,node_report,node_sensitivity,node_diagnostics,node_clusters,node_findings toneMint
class node_cli,node_config,node_provenance,node_campaign,node_store toneRose
class node_user,node_llm toneIndigo
```

## Components

### ACC simulation

- [Learned ACC policy](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/policy.py): `avval/policy.py`
- [Scenario simulator](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/sim.py): `avval/sim.py`
- [Driver response](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/driver.py): `avval/driver.py`
- [Reference behavior](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/reference.py): `avval/reference.py`
- [Scenario replay](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/replay.py): `avval/replay.py`

### Failure discovery

- [Search interface](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/search.py): `avval/search.py`
- [LLM search agent](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/agent.py): `avval/agent.py`
- [Search baselines](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/baselines.py): `avval/baselines.py`
- [Evidence protocol](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/evidence.py): `avval/evidence.py`
- [Frozen predicates](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/frozen.py): `avval/frozen.py`
- [Fresh hold-out](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/holdout.py): `avval/holdout.py`
- [Strategy benchmark](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/benchmark.py): `avval/benchmark.py`

### Validation evidence

- [ODD exposure model](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/exposure.py): `avval/exposure.py`
- [Estimation campaigns](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/estimation.py): `avval/estimation.py`
- [Acceptance evaluation](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/evaluation.py): `avval/evaluation.py`
- [Validation reports](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/report.py): `avval/report.py`
- [Sensitivity analysis](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/sensitivity.py): `avval/sensitivity.py`
- [Run diagnostics](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/diagnostics.py): `avval/diagnostics.py`
- [Failure clusters](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/clusters.py): `avval/clusters.py`
- [Findings summary](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/findings.py): `avval/findings.py`

### Campaign operations

- [Command interface](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/cli.py): `avval/cli.py`
- [Release configuration](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/config.py): `avval/config.py`
- [Release provenance](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/provenance.py): `avval/provenance.py`
- [Campaign runner](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/campaign.py): `avval/campaign.py`
- [Run data store](https://github.com/janlucakaestle/adas-validation-agent/blob/main/avval/store.py): `avval/store.py`

### Other components

- **Engineer**
- **LLM service**

## Connections

- Engineer → Command interface: invokes (evidence: `README.md`)
- Command interface → Campaign runner: runs campaigns (evidence: `avval/cli.py`)
- Command interface → Estimation campaigns: starts estimation (evidence: `avval/cli.py`)
- Command interface → LLM search agent: starts discovery (evidence: `avval/cli.py`)
- Command interface → Search baselines: starts searches (evidence: `avval/cli.py`)
- Command interface → Fresh hold-out: runs hold-out (evidence: `avval/cli.py`)
- Command interface → Sensitivity analysis: runs variants (evidence: `avval/cli.py`)
- Command interface → Run diagnostics: runs diagnostics (evidence: `avval/cli.py`)
- Command interface → Validation reports: generates reports (evidence: `avval/cli.py`)
- Campaign runner → Release configuration: loads release (evidence: `avval/campaign.py`)
- Campaign runner → Release provenance: records identity (evidence: `avval/campaign.py`)
- Campaign runner → Scenario simulator: simulates cases (evidence: `avval/campaign.py`)
- Campaign runner → Run data store: writes runs (evidence: `avval/campaign.py`)
- Scenario simulator → Learned ACC policy: uses policy (evidence: `avval/sim.py`)
- Scenario simulator → Driver response: models response (evidence: `avval/sim.py`)
- Reference behavior → Scenario simulator: simulates reference (evidence: `avval/reference.py`)
- Scenario replay → Scenario simulator: replays cases (evidence: `avval/replay.py`)
- Estimation campaigns → Campaign runner: runs sample (evidence: `avval/estimation.py`)
- Estimation campaigns → ODD exposure model: samples ODD (evidence: `README.md`)
- Estimation campaigns → Run data store: checks records (evidence: `avval/estimation.py`)
- Acceptance evaluation → Run data store: queries runs (evidence: `avval/evaluation.py`)
- Validation reports → Acceptance evaluation: renders results (evidence: `avval/report.py`)
- Validation reports → Run data store: reads records (evidence: `avval/report.py`)
- LLM search agent → Search interface: uses tools (evidence: `avval/agent.py`)
- LLM search agent → Evidence protocol: validates claims (evidence: `avval/agent.py`)
- LLM search agent → LLM service: queries model (evidence: `avval/agent.py`)
- Search interface → Campaign runner: runs cases
- Search baselines → Search interface: shares interface (evidence: `avval/baselines.py`)
- Evidence protocol → Frozen predicates: freezes predicates (evidence: `avval/evidence.py`)
- Fresh hold-out → Evidence protocol: checks conditions (evidence: `avval/holdout.py`)
- Fresh hold-out → Run data store: records runs (evidence: `avval/holdout.py`)
- Strategy benchmark → Search baselines: compares strategies (evidence: `README.md`)
- Strategy benchmark → LLM search agent: benchmarks agent (evidence: `README.md`)
- Sensitivity analysis → Acceptance evaluation: measures variants (evidence: `avval/sensitivity.py`)
- Sensitivity analysis → Run data store: imports campaigns (evidence: `avval/sensitivity.py`)
- Run diagnostics → Scenario replay: replays runs (evidence: `avval/diagnostics.py`)
- Run diagnostics → Run data store: reads campaigns (evidence: `avval/diagnostics.py`)
- Failure clusters → Scenario replay: replays cases (evidence: `avval/clusters.py`)
- Failure clusters → Run data store: queries runs (evidence: `avval/clusters.py`)
- Findings summary → Estimation campaigns: checks estimates (evidence: `avval/findings.py`)
