# siriacid/right-to-intervene architecture

> Architecture diagram of the GitHub repository siriacid/right-to-intervene, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/siriacid/right-to-intervene
- Repository: https://github.com/siriacid/right-to-intervene

## Overview

Right to Intervene is a synthetic Python research benchmark for comparing production-control policies when equipment health is uncertain and human reviews are delayed. Researchers run paired trials across policies and disruption scenarios; the simulator models job flow, health observations, permission decisions, reviews, and a hard quality interlock, then the runner summarizes outcomes and paired effects. A separate sensitivity runner varies review budgets and delays. The older v0.1 prototype is retained as a historical benchmark. The sampled code shows the current runners’ calls and output generation; detailed simulator internals are only partially excerpted.

Main entry points: [`experiments/authority_v2/experiment.py`](https://github.com/siriacid/right-to-intervene/blob/main/experiments/authority_v2/experiment.py) (Paired Experiment Runner), [`experiments/authority_v2/sensitivity.py`](https://github.com/siriacid/right-to-intervene/blob/main/experiments/authority_v2/sensitivity.py) (Review Sensitivity Runner), [`experiments/factory_v0_1/experiment.py`](https://github.com/siriacid/right-to-intervene/blob/main/experiments/factory_v0_1/experiment.py) (Factory v0.1 Benchmark), [`experiments/authority_v2/simulator.py`](https://github.com/siriacid/right-to-intervene/blob/main/experiments/authority_v2/simulator.py) (Trial Simulator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_simulation["Current Simulation"]
  node_simulator["Trial Simulator<br/>[simulator.py]"]
end

subgraph group_evaluation["Experiment Evaluation"]
  node_main_runner["Paired Experiment Runner<br/>[experiment.py]"]
  node_sensitivity_runner["Review Sensitivity Runner<br/>[sensitivity.py]"]
  node_main_outputs["Trial and Summary Outputs<br/>[summary.csv]"]
  node_sensitivity_output["Sensitivity Results"]
end

subgraph group_historical["Historical Prototype"]
  node_legacy_benchmark["Factory v0.1 Benchmark<br/>[experiment.py]"]
  node_legacy_results["Legacy Summary<br/>[summary.csv]"]
end

node_researcher(("Researcher"))

node_researcher -->|"runs trials"| node_main_runner
node_main_runner -->|"runs each trial"| node_simulator
node_main_runner -->|"writes results"| node_main_outputs
node_researcher -->|"varies review settings"| node_sensitivity_runner
node_sensitivity_runner -->|"runs trials"| node_simulator
node_sensitivity_runner -->|"writes results"| node_sensitivity_output
node_researcher -->|"runs historical benchmark"| node_legacy_benchmark
node_legacy_benchmark -->|"writes summary"| node_legacy_results

click node_main_runner "https://github.com/siriacid/right-to-intervene/blob/main/experiments/authority_v2/experiment.py"
click node_simulator "https://github.com/siriacid/right-to-intervene/blob/main/experiments/authority_v2/simulator.py"
click node_sensitivity_runner "https://github.com/siriacid/right-to-intervene/blob/main/experiments/authority_v2/sensitivity.py"
click node_main_outputs "https://github.com/siriacid/right-to-intervene/blob/main/experiments/authority_v2/results/summary.csv"
click node_sensitivity_output "https://github.com/siriacid/right-to-intervene/blob/main/experiments/authority_v2/results/review_sensitivity.csv"
click node_legacy_benchmark "https://github.com/siriacid/right-to-intervene/blob/main/experiments/factory_v0_1/experiment.py"
click node_legacy_results "https://github.com/siriacid/right-to-intervene/blob/main/experiments/factory_v0_1/results/summary.csv"

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_simulator toneBlue
class node_main_runner,node_sensitivity_runner,node_main_outputs,node_sensitivity_output toneAmber
class node_legacy_benchmark,node_legacy_results toneMint
class node_researcher toneIndigo
```

## Components

### Current Simulation

- [Trial Simulator](https://github.com/siriacid/right-to-intervene/blob/main/experiments/authority_v2/simulator.py): `experiments/authority_v2/simulator.py`

### Experiment Evaluation

- [Paired Experiment Runner](https://github.com/siriacid/right-to-intervene/blob/main/experiments/authority_v2/experiment.py): `experiments/authority_v2/experiment.py`
- [Review Sensitivity Runner](https://github.com/siriacid/right-to-intervene/blob/main/experiments/authority_v2/sensitivity.py): `experiments/authority_v2/sensitivity.py`
- [Trial and Summary Outputs](https://github.com/siriacid/right-to-intervene/blob/main/experiments/authority_v2/results/summary.csv): `experiments/authority_v2/results/summary.csv`
- [Sensitivity Results](https://github.com/siriacid/right-to-intervene/blob/main/experiments/authority_v2/results/review_sensitivity.csv): `experiments/authority_v2/results/review_sensitivity.csv`

### Historical Prototype

- [Factory v0.1 Benchmark](https://github.com/siriacid/right-to-intervene/blob/main/experiments/factory_v0_1/experiment.py): `experiments/factory_v0_1/experiment.py`
- [Legacy Summary](https://github.com/siriacid/right-to-intervene/blob/main/experiments/factory_v0_1/results/summary.csv): `experiments/factory_v0_1/results/summary.csv`

### Other components

- **Researcher**

## Connections

- Researcher → Paired Experiment Runner: runs trials (evidence: `README.md`)
- Paired Experiment Runner → Trial Simulator: runs each trial (evidence: `experiments/authority_v2/experiment.py`)
- Paired Experiment Runner → Trial and Summary Outputs: writes results (evidence: `experiments/authority_v2/experiment.py`)
- Researcher → Review Sensitivity Runner: varies review settings (evidence: `README.md`)
- Review Sensitivity Runner → Trial Simulator: runs trials (evidence: `experiments/authority_v2/sensitivity.py`)
- Review Sensitivity Runner → Sensitivity Results: writes results (evidence: `experiments/authority_v2/sensitivity.py`)
- Researcher → Factory v0.1 Benchmark: runs historical benchmark (evidence: `README.md`)
- Factory v0.1 Benchmark → Legacy Summary: writes summary (evidence: `experiments/factory_v0_1/experiment.py`)
