# pcphael/f1-analysis-crew architecture

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

- Interactive diagram: https://gitdiagram.com/pcphael/f1-analysis-crew
- Repository: https://github.com/pcphael/f1-analysis-crew

## Overview

F1 Analysis Crew generates daily news, session-based technical analysis (with simulated fallback), weekend schedule/rules, and combined reports. Users start these workflows through the GUI or the main script; the crew factory supplies the agents, and report outputs are saved locally. FastF1 provides session and telemetry data, while the technical agent also renders speed charts. The data-exploration script is a separate direct FastF1 session-inspection workflow. Relationships are limited to calls visible in the excerpts; the README contains no capability documentation.

Main entry points: [`f1-analysis-crew/f1_gui.py`](https://github.com/pcphael/f1-analysis-crew/blob/main/f1-analysis-crew/f1_gui.py) (Analysis GUI), [`f1-analysis-crew/main.py`](https://github.com/pcphael/f1-analysis-crew/blob/main/f1-analysis-crew/main.py) (CLI script), [`f1-analysis-crew/f1_agents.py`](https://github.com/pcphael/f1-analysis-crew/blob/main/f1-analysis-crew/f1_agents.py) (Crew factory), [`f1-analysis-crew/explorar_dados.py`](https://github.com/pcphael/f1-analysis-crew/blob/main/f1-analysis-crew/explorar_dados.py) (Session explorer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entrypoints["User entrypoints"]
  node_gui["Analysis GUI<br/>[f1_gui.py]"]
  node_script["CLI script<br/>[main.py]"]
  node_explorer["Session explorer<br/>[explorar_dados.py]"]
end

subgraph group_agents["Analysis agents"]
  node_factory["Crew factory<br/>[f1_agents.py]"]
  node_reporter["News reporter<br/>[f1_agents.py]"]
  node_engineer["Technical analyst<br/>[f1_agents.py]"]
  node_regulator["Weekend guide<br/>[f1_agents.py]"]
  node_coordinator["Report coordinator<br/>[f1_agents.py]"]
end

subgraph group_outputs["Report outputs"]
  node_cache[("FastF1 cache")]
  node_chart["Speed chart"]
  node_reports["Saved reports"]
end

node_user(("Analyst"))
node_fastf1{{"FastF1 session data"}}

node_user -->|"uses"| node_gui
node_user -->|"runs"| node_script
node_user -->|"runs"| node_explorer
node_gui -->|"creates crew"| node_factory
node_script -->|"creates crew"| node_factory
node_factory -->|"instantiates"| node_reporter
node_factory -->|"instantiates"| node_engineer
node_factory -->|"instantiates"| node_regulator
node_factory -->|"instantiates"| node_coordinator
node_gui -->|"requests news"| node_reporter
node_gui -->|"requests analysis"| node_engineer
node_gui -->|"requests schedule"| node_regulator
node_gui -->|"combines reports"| node_coordinator
node_script -->|"requests news"| node_reporter
node_script -->|"requests analysis"| node_engineer
node_script -->|"requests schedule"| node_regulator
node_script -->|"combines reports"| node_coordinator
node_engineer -->|"loads session"| node_fastf1
node_explorer -->|"loads session"| node_fastf1
node_engineer -->|"configures cache"| node_cache
node_engineer -->|"writes chart"| node_chart
node_gui -->|"saves reports"| node_reports
node_script -->|"saves report"| node_reports

click node_gui "https://github.com/pcphael/f1-analysis-crew/blob/main/f1-analysis-crew/f1_gui.py"
click node_script "https://github.com/pcphael/f1-analysis-crew/blob/main/f1-analysis-crew/main.py"
click node_explorer "https://github.com/pcphael/f1-analysis-crew/blob/main/f1-analysis-crew/explorar_dados.py"
click node_factory "https://github.com/pcphael/f1-analysis-crew/blob/main/f1-analysis-crew/f1_agents.py"
click node_reporter "https://github.com/pcphael/f1-analysis-crew/blob/main/f1-analysis-crew/f1_agents.py"
click node_engineer "https://github.com/pcphael/f1-analysis-crew/blob/main/f1-analysis-crew/f1_agents.py"
click node_regulator "https://github.com/pcphael/f1-analysis-crew/blob/main/f1-analysis-crew/f1_agents.py"
click node_coordinator "https://github.com/pcphael/f1-analysis-crew/blob/main/f1-analysis-crew/f1_agents.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_gui,node_script,node_explorer toneBlue
class node_factory,node_reporter,node_engineer,node_regulator,node_coordinator toneAmber
class node_cache,node_chart,node_reports toneMint
class node_user,node_fastf1 toneIndigo
```

## Components

### User entrypoints

- [Analysis GUI](https://github.com/pcphael/f1-analysis-crew/blob/main/f1-analysis-crew/f1_gui.py): `f1-analysis-crew/f1_gui.py`
- [CLI script](https://github.com/pcphael/f1-analysis-crew/blob/main/f1-analysis-crew/main.py): `f1-analysis-crew/main.py`
- [Session explorer](https://github.com/pcphael/f1-analysis-crew/blob/main/f1-analysis-crew/explorar_dados.py): `f1-analysis-crew/explorar_dados.py`

### Analysis agents

- [Crew factory](https://github.com/pcphael/f1-analysis-crew/blob/main/f1-analysis-crew/f1_agents.py): `f1-analysis-crew/f1_agents.py`
- [News reporter](https://github.com/pcphael/f1-analysis-crew/blob/main/f1-analysis-crew/f1_agents.py): `f1-analysis-crew/f1_agents.py`
- [Technical analyst](https://github.com/pcphael/f1-analysis-crew/blob/main/f1-analysis-crew/f1_agents.py): `f1-analysis-crew/f1_agents.py`
- [Weekend guide](https://github.com/pcphael/f1-analysis-crew/blob/main/f1-analysis-crew/f1_agents.py): `f1-analysis-crew/f1_agents.py`
- [Report coordinator](https://github.com/pcphael/f1-analysis-crew/blob/main/f1-analysis-crew/f1_agents.py): `f1-analysis-crew/f1_agents.py`

### Report outputs

- **FastF1 cache**
- **Speed chart**
- **Saved reports**

### Other components

- **Analyst**
- **FastF1 session data**

## Connections

- Analyst → Analysis GUI: uses (evidence: `f1-analysis-crew/f1_gui.py`)
- Analyst → CLI script: runs (evidence: `f1-analysis-crew/main.py`)
- Analyst → Session explorer: runs (evidence: `f1-analysis-crew/explorar_dados.py`)
- Analysis GUI → Crew factory: creates crew (evidence: `f1-analysis-crew/f1_gui.py`)
- CLI script → Crew factory: creates crew (evidence: `f1-analysis-crew/main.py`)
- Crew factory → News reporter: instantiates (evidence: `f1-analysis-crew/f1_agents.py`)
- Crew factory → Technical analyst: instantiates (evidence: `f1-analysis-crew/f1_agents.py`)
- Crew factory → Weekend guide: instantiates (evidence: `f1-analysis-crew/f1_agents.py`)
- Crew factory → Report coordinator: instantiates (evidence: `f1-analysis-crew/f1_agents.py`)
- Analysis GUI → News reporter: requests news (evidence: `f1-analysis-crew/f1_gui.py`)
- Analysis GUI → Technical analyst: requests analysis (evidence: `f1-analysis-crew/f1_gui.py`)
- Analysis GUI → Weekend guide: requests schedule (evidence: `f1-analysis-crew/f1_gui.py`)
- Analysis GUI → Report coordinator: combines reports (evidence: `f1-analysis-crew/f1_gui.py`)
- CLI script → News reporter: requests news (evidence: `f1-analysis-crew/main.py`)
- CLI script → Technical analyst: requests analysis (evidence: `f1-analysis-crew/main.py`)
- CLI script → Weekend guide: requests schedule (evidence: `f1-analysis-crew/main.py`)
- CLI script → Report coordinator: combines reports (evidence: `f1-analysis-crew/main.py`)
- Technical analyst → FastF1 session data: loads session (evidence: `f1-analysis-crew/f1_agents.py`)
- Session explorer → FastF1 session data: loads session (evidence: `f1-analysis-crew/explorar_dados.py`)
- Technical analyst → FastF1 cache: configures cache (evidence: `f1-analysis-crew/f1_agents.py`)
- Technical analyst → Speed chart: writes chart (evidence: `f1-analysis-crew/f1_agents.py`)
- Analysis GUI → Saved reports: saves reports (evidence: `f1-analysis-crew/f1_gui.py`)
- CLI script → Saved reports: saves report (evidence: `f1-analysis-crew/main.py`)
