02 — System Diagram

🔍 Open the Interactive Diagram Viewer — pan, zoom, per-area tabs, the full ERD and a focus mode.

Regenerate the viewer after any DSL, menu_config.yaml or diagram_config.yaml change: python scripts/build_diagram_viewer.py workforce.

flowchart TD
  T[Trade]
  E[Employee]

  T --> E
  E -- supervisor --> E

The employer (a supplier) and the site are named by network id (supplier_cid, site_cid); they belong to Supplier and the Asset Register.

Where it sits in the network

sequenceDiagram
  participant F as Workforce
  participant O as Orchestrator
  participant W as Work Management
  Note over F: an employee is registered or changed (screen or command)
  F->>O: workforce.employee_registered / employee_changed / employee_left
  O->>W: deliver — Work upserts its Person copy (same id) and, for a contractor's person, the Organisation with the supplier number
  W->>F: workforce.search_trades (direct, read-only: the trade picker on assignments and time entries)
  Note over W: the trade is stamped on each time entry