# ravendevteam/talon architecture

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

- Interactive diagram: https://gitdiagram.com/ravendevteam/talon
- Repository: https://github.com/ravendevteam/talon

## Overview

#### Purpose and Runtime

Talon is a Windows debloating application intended to remove bundled AI/features, reduce background load, and apply privacy/system tweaks. It runs as a Python application packaged into a Windows executable, with Python 3.12.4 as the source-build runtime. The operational entry point is `talon.py`; `build.bat` creates distributable builds.

#### Application Entry and Startup Gates

`talon.py` coordinates startup. Before destructive work, the application uses Windows/environment checks and preflight validation, including administrator and likely connectivity requirements. These gates form the boundary between launching the UI and permitting system changes.

Grounding paths:
- `talon.py`
- `preinstall_components/pre_checks.py`
- `utilities/util_admin_check.py`
- `utilities/util_windows_check.py`

#### Configuration Wizard and UI Bridge

The primary user flow is a QML configuration wizard: select language, preset/browser options, advanced settings, then review the generated plan. Python exposes configuration state and actions to QML through a Qt bridge, separating presentation from execution orchestration.

Grounding paths:
- `ui/configuration/Main.qml`
- `ui/configuration/ReviewPlanPage.qml`
- `configuration_components/qt_bridge.py`
- `screens/screen_configuration.py`

#### Plan Construction and Presets

Configuration is translated into an install/debloat plan through a step catalog and plan builder. Preset JSON files provide named bundles of choices, enabling “standard” and lighter debloat profiles instead of forcing users to select each operation individually.

Grounding paths:
- `configuration_components/install_plan.py`
- `configuration_components/step_catalog.py`
- `configuration_components/preflight.py`
- `presets/standard.json`
- `presets/debloat-lite.json`

#### Localization Boundary

UI/configuration strings are localized through a Python localization layer and JSON locale catalog. The QML layer includes bindings and language selection, while locale files remain data-driven and independently extensible.

Grounding paths:
- `configuration_components/localization.py`
- `ui/configuration/I18nBinding.qml`
- `ui/configuration/LanguageSelector.qml`
- `locales/en.json`

#### Debloat Execution Pipeline

The approved plan dispatches modular system-changing stages. These include registry edits, Windows update policy changes, removal of Edge/Outlook/OneDrive, background-task adjustments, browser installation, and execution of external debloat sources. Work is likely run off the UI thread to preserve responsiveness; errors and progress must cross back to the UI boundary.

Grounding paths:
- `debloat_components/debloat_apply_background.py`
- `debloat_components/debloat_registry_tweaks.py`
- `debloat_components/debloat_configure_updates.py`
- `utilities/util_debloat_thread_handler.py`

#### Privileged OS and Script Integration

System mutation is Windows-specific and privileged: PowerShell execution and registry modification are centralized utility boundaries. Raven-owned PowerShell scripts support selected removals and update-policy operations. The project also integrates external debloat implementations, notably WinUtil and Win11Debloat, behind dedicated adapter components rather than embedding them in the configuration UI.

Grounding paths:
- `utilities/util_powershell_handler.py`
- `utilities/util_modify_registry.py`
- `debloat_raven_scripts/edge_vanisher.ps1`
- `debloat_components/debloat_execute_winutil.py`
- `debloat_components/debloat_execute_win11debloat.py`

#### External Distribution and Services

Users obtain Talon as a downloadable executable or invoke a remote PowerShell bootstrap (`https://debloat.win`). External execution dependencies include the WinUtil and Win11Debloat ecosystems; internet availability is therefore an architectural concern for flows that fetch or invoke remote assets.

Grounding paths:
- `utilities/util_internet_check.py`
- `debloat_components/debloat_execute_external_scripts.py`
- `debloat_components/debloat_execute_raven_scripts.py`

Main entry points: [`preinstall_components/pre_checks.py`](https://github.com/ravendevteam/talon/blob/main/preinstall_components/pre_checks.py) (Preflight checks), [`debloat_components/debloat_apply_background.py`](https://github.com/ravendevteam/talon/blob/main/debloat_components/debloat_apply_background.py) (Background plan executor), [`configuration_components/install_plan.py`](https://github.com/ravendevteam/talon/blob/main/configuration_components/install_plan.py) (Install plan builder), [`utilities/util_powershell_handler.py`](https://github.com/ravendevteam/talon/blob/main/utilities/util_powershell_handler.py) (PowerShell handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Startup & safety"]
  node_entry{{"Talon entry point<br/>application coordinator<br/>[talon.py]"}}
  node_prechecks["Preflight checks<br/>startup validation<br/>[pre_checks.py]"]
  node_admin_check["Administrator check<br/>privilege gate"]
  node_windows_check["Windows check<br/>platform gate"]
  node_internet_check["Internet check<br/>connectivity gate"]
end

subgraph group_configuration["Configuration"]
  node_configuration_screen["Configuration screen<br/>Qt screen controller"]
  node_qml_wizard["QML configuration wizard<br/>presentation<br/>[Main.qml]"]
  node_review_plan["Plan review page<br/>QML page<br/>[ReviewPlanPage.qml]"]
  node_qt_bridge["Qt configuration bridge<br/>QML bridge<br/>[qt_bridge.py]"]
  node_localization["Localization layer<br/>i18n service<br/>[localization.py]"]
  node_locale_catalog["English locale catalog<br/>locale data<br/>[en.json]"]
  node_plan_builder["Install plan builder<br/>plan construction<br/>[install_plan.py]"]
  node_step_catalog["Step catalog<br/>operation catalog<br/>[step_catalog.py]"]
  node_presets["Debloat presets<br/>preset data<br/>[standard.json]"]
end

subgraph group_execution["Debloat execution"]
  node_background_executor{{"Background plan executor<br/>execution pipeline"}}
  node_thread_handler["Worker thread handler<br/>UI progress bridge"]
  node_system_operations["System change stages<br/>debloat modules"]
  node_external_adapters["External debloat adapters<br/>WinUtil / Win11Debloat"]
  node_raven_scripts["Raven PowerShell scripts<br/>owned script operations<br/>[edge_vanisher.ps1]"]
end

subgraph group_windows["Windows integration"]
  node_powershell["PowerShell handler<br/>command boundary"]
  node_registry["Registry utility<br/>registry boundary"]
  node_windows_os[("Windows system<br/>privileged target")]
end

node_distribution["Distribution channels<br/>release / bootstrap"]
node_build["Windows build<br/>packaging<br/>[build.bat]"]

node_build -->|"packages"| node_distribution
node_distribution -->|"launches"| node_entry
node_entry -->|"validates"| node_prechecks
node_prechecks -->|"checks"| node_admin_check
node_prechecks -->|"checks"| node_windows_check
node_prechecks -.->|"checks when needed"| node_internet_check
node_prechecks -->|"permits"| node_configuration_screen
node_configuration_screen -->|"hosts"| node_qml_wizard
node_qml_wizard -->|"uses"| node_qt_bridge
node_qml_wizard -->|"localizes through"| node_localization
node_localization -->|"loads"| node_locale_catalog
node_qt_bridge -->|"builds plan"| node_plan_builder
node_plan_builder -->|"selects steps"| node_step_catalog
node_presets -->|"supplies choices"| node_plan_builder
node_plan_builder -->|"renders for approval"| node_review_plan
node_review_plan -->|"approves and dispatches"| node_background_executor
node_background_executor -->|"reports through"| node_thread_handler
node_thread_handler -->|"returns progress and errors"| node_qt_bridge
node_background_executor -->|"runs"| node_system_operations
node_background_executor -->|"runs selected"| node_external_adapters
node_background_executor -->|"runs selected"| node_raven_scripts
node_system_operations -->|"edits through"| node_registry
node_system_operations -->|"executes through"| node_powershell
node_raven_scripts -->|"executed by"| node_powershell
node_external_adapters -->|"invokes via"| node_powershell
node_powershell -->|"mutates"| node_windows_os
node_registry -->|"modifies"| node_windows_os
node_internet_check -.->|"enables remote dependencies"| node_external_adapters

click node_build "https://github.com/ravendevteam/talon/blob/main/build.bat"
click node_entry "https://github.com/ravendevteam/talon/blob/main/talon.py"
click node_prechecks "https://github.com/ravendevteam/talon/blob/main/preinstall_components/pre_checks.py"
click node_admin_check "https://github.com/ravendevteam/talon/blob/main/utilities/util_admin_check.py"
click node_windows_check "https://github.com/ravendevteam/talon/blob/main/utilities/util_windows_check.py"
click node_internet_check "https://github.com/ravendevteam/talon/blob/main/utilities/util_internet_check.py"
click node_configuration_screen "https://github.com/ravendevteam/talon/blob/main/screens/screen_configuration.py"
click node_qml_wizard "https://github.com/ravendevteam/talon/blob/main/ui/configuration/Main.qml"
click node_review_plan "https://github.com/ravendevteam/talon/blob/main/ui/configuration/ReviewPlanPage.qml"
click node_qt_bridge "https://github.com/ravendevteam/talon/blob/main/configuration_components/qt_bridge.py"
click node_localization "https://github.com/ravendevteam/talon/blob/main/configuration_components/localization.py"
click node_locale_catalog "https://github.com/ravendevteam/talon/blob/main/locales/en.json"
click node_plan_builder "https://github.com/ravendevteam/talon/blob/main/configuration_components/install_plan.py"
click node_step_catalog "https://github.com/ravendevteam/talon/blob/main/configuration_components/step_catalog.py"
click node_presets "https://github.com/ravendevteam/talon/blob/main/presets/standard.json"
click node_background_executor "https://github.com/ravendevteam/talon/blob/main/debloat_components/debloat_apply_background.py"
click node_thread_handler "https://github.com/ravendevteam/talon/blob/main/utilities/util_debloat_thread_handler.py"
click node_system_operations "https://github.com/ravendevteam/talon/blob/main/debloat_components/debloat_registry_tweaks.py"
click node_external_adapters "https://github.com/ravendevteam/talon/blob/main/debloat_components/debloat_execute_winutil.py"
click node_raven_scripts "https://github.com/ravendevteam/talon/blob/main/debloat_raven_scripts/edge_vanisher.ps1"
click node_powershell "https://github.com/ravendevteam/talon/blob/main/utilities/util_powershell_handler.py"
click node_registry "https://github.com/ravendevteam/talon/blob/main/utilities/util_modify_registry.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_entry,node_prechecks,node_admin_check,node_windows_check,node_internet_check toneBlue
class node_configuration_screen,node_qml_wizard,node_review_plan,node_qt_bridge,node_localization,node_locale_catalog,node_plan_builder,node_step_catalog,node_presets toneAmber
class node_background_executor,node_thread_handler,node_system_operations,node_external_adapters,node_raven_scripts toneMint
class node_powershell,node_registry,node_windows_os toneRose
class node_distribution,node_build toneNeutral
```

## Components

### Startup & safety

- [Talon entry point](https://github.com/ravendevteam/talon/blob/main/talon.py): application coordinator · `talon.py`
- [Preflight checks](https://github.com/ravendevteam/talon/blob/main/preinstall_components/pre_checks.py): startup validation · Validates conditions before system changes are allowed. · `preinstall_components/pre_checks.py`
- [Administrator check](https://github.com/ravendevteam/talon/blob/main/utilities/util_admin_check.py): privilege gate · `utilities/util_admin_check.py`
- [Windows check](https://github.com/ravendevteam/talon/blob/main/utilities/util_windows_check.py): platform gate · `utilities/util_windows_check.py`
- [Internet check](https://github.com/ravendevteam/talon/blob/main/utilities/util_internet_check.py): connectivity gate · Required for remote or external debloat flows. · `utilities/util_internet_check.py`

### Configuration

- [Configuration screen](https://github.com/ravendevteam/talon/blob/main/screens/screen_configuration.py): Qt screen controller · `screens/screen_configuration.py`
- [QML configuration wizard](https://github.com/ravendevteam/talon/blob/main/ui/configuration/Main.qml): presentation · Collects choices and presents the generated plan. · `ui/configuration/Main.qml`
- [Plan review page](https://github.com/ravendevteam/talon/blob/main/ui/configuration/ReviewPlanPage.qml): QML page · `ui/configuration/ReviewPlanPage.qml`
- [Qt configuration bridge](https://github.com/ravendevteam/talon/blob/main/configuration_components/qt_bridge.py): QML bridge · Exposes configuration state and actions to QML. · `configuration_components/qt_bridge.py`
- [Localization layer](https://github.com/ravendevteam/talon/blob/main/configuration_components/localization.py): i18n service · Loads data-driven UI strings for QML bindings. · `configuration_components/localization.py`
- [English locale catalog](https://github.com/ravendevteam/talon/blob/main/locales/en.json): locale data · `locales/en.json`
- [Install plan builder](https://github.com/ravendevteam/talon/blob/main/configuration_components/install_plan.py): plan construction · `configuration_components/install_plan.py`
- [Step catalog](https://github.com/ravendevteam/talon/blob/main/configuration_components/step_catalog.py): operation catalog · `configuration_components/step_catalog.py`
- [Debloat presets](https://github.com/ravendevteam/talon/blob/main/presets/standard.json): preset data · Standard and lighter named bundles of configuration choices. · `presets/standard.json`

### Debloat execution

- [Background plan executor](https://github.com/ravendevteam/talon/blob/main/debloat_components/debloat_apply_background.py): execution pipeline · Runs approved system changes outside the UI thread. · `debloat_components/debloat_apply_background.py`
- [Worker thread handler](https://github.com/ravendevteam/talon/blob/main/utilities/util_debloat_thread_handler.py): UI progress bridge · Returns progress and errors to the UI boundary. · `utilities/util_debloat_thread_handler.py`
- [System change stages](https://github.com/ravendevteam/talon/blob/main/debloat_components/debloat_registry_tweaks.py): debloat modules · Applies registry, update-policy, app-removal, task, and browser operations. · `debloat_components/debloat_registry_tweaks.py`
- [External debloat adapters](https://github.com/ravendevteam/talon/blob/main/debloat_components/debloat_execute_winutil.py): WinUtil / Win11Debloat · Invokes third-party debloat implementations behind dedicated adapters. · `debloat_components/debloat_execute_winutil.py`
- [Raven PowerShell scripts](https://github.com/ravendevteam/talon/blob/main/debloat_raven_scripts/edge_vanisher.ps1): owned script operations · Supports selected removals and policy operations. · `debloat_raven_scripts/edge_vanisher.ps1`

### Windows integration

- [PowerShell handler](https://github.com/ravendevteam/talon/blob/main/utilities/util_powershell_handler.py): command boundary · `utilities/util_powershell_handler.py`
- [Registry utility](https://github.com/ravendevteam/talon/blob/main/utilities/util_modify_registry.py): registry boundary · `utilities/util_modify_registry.py`
- **Windows system**: privileged target

### Other components

- **Distribution channels**: release / bootstrap · Executable downloads and the remote PowerShell bootstrap.
- [Windows build](https://github.com/ravendevteam/talon/blob/main/build.bat): packaging · Builds the Python application into a distributable executable. · `build.bat`

## Connections

- Windows build → Distribution channels: packages
- Distribution channels → Talon entry point: launches
- Talon entry point → Preflight checks: validates
- Preflight checks → Administrator check: checks
- Preflight checks → Windows check: checks
- Preflight checks → Internet check: checks when needed
- Preflight checks → Configuration screen: permits
- Configuration screen → QML configuration wizard: hosts
- QML configuration wizard → Qt configuration bridge: uses
- QML configuration wizard → Localization layer: localizes through
- Localization layer → English locale catalog: loads
- Qt configuration bridge → Install plan builder: builds plan
- Install plan builder → Step catalog: selects steps
- Debloat presets → Install plan builder: supplies choices
- Install plan builder → Plan review page: renders for approval
- Plan review page → Background plan executor: approves and dispatches
- Background plan executor → Worker thread handler: reports through
- Worker thread handler → Qt configuration bridge: returns progress and errors
- Background plan executor → System change stages: runs
- Background plan executor → External debloat adapters: runs selected
- Background plan executor → Raven PowerShell scripts: runs selected
- System change stages → Registry utility: edits through
- System change stages → PowerShell handler: executes through
- Raven PowerShell scripts → PowerShell handler: executed by
- External debloat adapters → PowerShell handler: invokes via
- PowerShell handler → Windows system: mutates
- Registry utility → Windows system: modifies
- Internet check → External debloat adapters: enables remote dependencies
