# the-open-engine/zeroshot architecture

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

- Interactive diagram: https://gitdiagram.com/the-open-engine/zeroshot
- Repository: https://github.com/the-open-engine/zeroshot

## Overview

zeroshot runs bounded, graph-defined QA workflows around coding agents: a worker implements a task, independent reviewers assess it, rejected work loops through repair and review, and optional Git delivery follows acceptance. Users configure workflows through the UI or CLI, then inspect run history and logs. The core is a native-v2 admission, supervision, execution, and durable-ledger stack, with local and cloud controllers and external agent/provider integrations. Edges are limited to README-documented behavior and relationships visible in the supplied source excerpts or SOURCE INDEX; unsampled subsystem internals are not inferred.

Main entry points: [`zeroshot/src/native_v2_supervisor.rs`](https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/native_v2_supervisor.rs) (Run supervisor), [`zeroshot/src/native_v2_admission.rs`](https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/native_v2_admission.rs) (Run admission), [`zeroshot/src/native_v2_portable_controller/engine.rs`](https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/native_v2_portable_controller/engine.rs) (Run engine), [`zeroshot/src/main.rs`](https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/main.rs) (CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Workflow authoring"]
  node_cli["CLI<br/>[main.rs]"]
  node_ui["Workflow UI<br/>[App.tsx]"]
  node_graph["Workflow graph"]
end

subgraph group_runtime["Run execution"]
  node_admission["Run admission"]
  node_engine["Run engine<br/>[engine.rs]"]
  node_supervisor["Run supervisor"]
  node_reducer["Workflow reducer<br/>[full_v1_reducer.rs]"]
  node_runner["Node runner"]
end

subgraph group_delivery["Targets and delivery"]
  node_cloud["Cloud controller<br/>[native_v2_cloud.rs]"]
  node_portable["Local controller<br/>[controller.rs]"]
  node_delivery["Git delivery"]
end

subgraph group_observation["Run observation"]
  node_ledger[("Run ledger<br/>[v2_run_ledger.rs]")]
  node_sqlite[("SQLite storage<br/>[sqlite.rs]")]
  node_observability["Run observability"]
  node_runhistory["Run history UI<br/>[RunHistoryView.tsx]"]
end

node_developer(("Engineer"))
node_agents{{"Agent providers"}}

node_developer -->|"starts runs"| node_cli
node_developer -->|"authors workflows"| node_ui
node_ui -->|"edits graph"| node_graph
node_cli -.->|"validates run"| node_admission
node_admission -->|"admits run"| node_cloud
node_admission -.->|"admits run"| node_portable
node_portable -->|"starts engine"| node_engine
node_engine -->|"drives run"| node_supervisor
node_supervisor -->|"reduces history"| node_reducer
node_supervisor -->|"dispatches nodes"| node_runner
node_runner -.->|"runs agent"| node_agents
node_supervisor -->|"reads and appends"| node_ledger
node_ledger -.->|"persists events"| node_sqlite
node_supervisor -->|"supports delivery"| node_delivery
node_developer -->|"inspects runs"| node_runhistory
node_runhistory -.->|"reads run data"| node_observability
node_engine -->|"publishes output"| node_observability

click node_cli "https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/main.rs"
click node_ui "https://github.com/the-open-engine/zeroshot/blob/main/ui/src/App.tsx"
click node_graph "https://github.com/the-open-engine/zeroshot/blob/main/ui/src/workflow-authoring.ts"
click node_admission "https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/native_v2_admission.rs"
click node_cloud "https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/native_v2_cloud.rs"
click node_portable "https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/native_v2_portable_controller/controller.rs"
click node_engine "https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/native_v2_portable_controller/engine.rs"
click node_supervisor "https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/native_v2_supervisor.rs"
click node_reducer "https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/full_v1_reducer.rs"
click node_runner "https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/native_v2_runner.rs"
click node_delivery "https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/native_v2_delivery.rs"
click node_ledger "https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/v2_run_ledger.rs"
click node_sqlite "https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/v2_run_ledger/sqlite.rs"
click node_observability "https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/native_v2_observability.rs"
click node_runhistory "https://github.com/the-open-engine/zeroshot/blob/main/ui/src/RunHistoryView.tsx"

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_cli,node_ui,node_graph toneBlue
class node_admission,node_engine,node_supervisor,node_reducer,node_runner toneAmber
class node_cloud,node_portable,node_delivery toneMint
class node_ledger,node_sqlite,node_observability,node_runhistory toneRose
class node_developer,node_agents toneIndigo
```

## Components

### Workflow authoring

- [CLI](https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/main.rs): `zeroshot/src/main.rs`
- [Workflow UI](https://github.com/the-open-engine/zeroshot/blob/main/ui/src/App.tsx): `ui/src/App.tsx`
- [Workflow graph](https://github.com/the-open-engine/zeroshot/blob/main/ui/src/workflow-authoring.ts): `ui/src/workflow-authoring.ts`

### Run execution

- [Run admission](https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/native_v2_admission.rs): `zeroshot/src/native_v2_admission.rs`
- [Run engine](https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/native_v2_portable_controller/engine.rs): `zeroshot/src/native_v2_portable_controller/engine.rs`
- [Run supervisor](https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/native_v2_supervisor.rs): `zeroshot/src/native_v2_supervisor.rs`
- [Workflow reducer](https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/full_v1_reducer.rs): `zeroshot/src/full_v1_reducer.rs`
- [Node runner](https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/native_v2_runner.rs): `zeroshot/src/native_v2_runner.rs`

### Targets and delivery

- [Cloud controller](https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/native_v2_cloud.rs): `zeroshot/src/native_v2_cloud.rs`
- [Local controller](https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/native_v2_portable_controller/controller.rs): `zeroshot/src/native_v2_portable_controller/controller.rs`
- [Git delivery](https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/native_v2_delivery.rs): `zeroshot/src/native_v2_delivery.rs`

### Run observation

- [Run ledger](https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/v2_run_ledger.rs): `zeroshot/src/v2_run_ledger.rs`
- [SQLite storage](https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/v2_run_ledger/sqlite.rs): `zeroshot/src/v2_run_ledger/sqlite.rs`
- [Run observability](https://github.com/the-open-engine/zeroshot/blob/main/zeroshot/src/native_v2_observability.rs): `zeroshot/src/native_v2_observability.rs`
- [Run history UI](https://github.com/the-open-engine/zeroshot/blob/main/ui/src/RunHistoryView.tsx): `ui/src/RunHistoryView.tsx`

### Other components

- **Engineer**
- **Agent providers**

## Connections

- Engineer → CLI: starts runs (evidence: `README.md`)
- Engineer → Workflow UI: authors workflows (evidence: `README.md`)
- Workflow UI → Workflow graph: edits graph (evidence: `ui/src/App.tsx`)
- CLI → Run admission: validates run
- Run admission → Cloud controller: admits run (evidence: `zeroshot/src/native_v2_cloud.rs`)
- Run admission → Local controller: admits run (evidence: `zeroshot/src/native_v2_portable_controller/controller.rs`)
- Local controller → Run engine: starts engine (evidence: `zeroshot/src/native_v2_portable_controller/controller.rs`)
- Run engine → Run supervisor: drives run (evidence: `zeroshot/src/native_v2_portable_controller/engine.rs`)
- Run supervisor → Workflow reducer: reduces history (evidence: `zeroshot/src/native_v2_supervisor.rs`)
- Run supervisor → Node runner: dispatches nodes (evidence: `zeroshot/src/native_v2_supervisor.rs`)
- Node runner → Agent providers: runs agent
- Run supervisor → Run ledger: reads and appends (evidence: `zeroshot/src/native_v2_supervisor.rs`)
- Run ledger → SQLite storage: persists events (evidence: `zeroshot/src/v2_run_ledger.rs`)
- Run supervisor → Git delivery: supports delivery (evidence: `zeroshot/src/native_v2_supervisor.rs`)
- Engineer → Run history UI: inspects runs (evidence: `README.md`)
- Run history UI → Run observability: reads run data
- Run engine → Run observability: publishes output (evidence: `zeroshot/src/native_v2_portable_controller/engine.rs`)
