Analysis
Build Order URL copied
The spine for this system is: Sensor Edge → Event Broker → State Machine → Alert Dispatcher.
The sensor edge must come first because every downstream component depends on a stream of real, timestamped events — synthetic events can be used for unit testing but not for verifying sensor placement, RFID read geometry, or fusion deduplication. The event broker must be live before the state machine can be tested against real event sequences, because the broker's deduplication and normalisation logic shapes the event stream the state machine sees. The state machine must be correct before the alert dispatcher is connected — firing false alerts during state machine development erodes trust in the system before it is operational. The alert dispatcher is last because it is the only component with external side effects (alarms, push messages, clip extraction); containing it until the upstream is validated is standard practice.
The CV redundancy layer is a bulge off the sensor edge — it needs a working camera feed and a bench to point it at, but not the state machine or alert dispatcher. It can be built and evaluated in parallel with the event broker. The clip store is a bulge off the event broker — it needs the video buffer to exist, but not the full violation pipeline. The optional compliance history is a bulge off the violation log (itself part of the alert dispatcher); it can be built once the log schema is stable. Shift reports are a bulge off compliance history.
flowchart LR
SE["Sensor Edge<br/>RFID readers, wristbands,<br/>soap sensor, cameras"]
EB["Event Broker<br/>normalise, deduplicate,<br/>video buffer"]
SM["State Machine<br/>per-technician protocol<br/>enforcement"]
AD["Alert Dispatcher<br/>alarm, push, clip,<br/>violation log"]
SE --> EB --> SM --> AD
CV["CV Redundancy<br/>instrument pickup<br/>confirmation model"]
CS["Clip Store<br/>evidence retrieval<br/>and retention"]
CH["Compliance History<br/>per-technician<br/>violation trends"]
SR["Shift Reports<br/>aggregate adherence<br/>summary"]
SE --> CV
EB --> CS
AD --> CH
CH --> SR
style SE fill:#E3F2FD,color:#0D47A1
style EB fill:#E3F2FD,color:#0D47A1
style SM fill:#E3F2FD,color:#0D47A1
style AD fill:#E3F2FD,color:#0D47A1
style CV fill:#E8F5E9,color:#1B5E20
style CS fill:#E8F5E9,color:#1B5E20
style CH fill:#E8F5E9,color:#1B5E20
style SR fill:#E8F5E9,color:#1B5E20
Spine nodes (delay here delays everything): Sensor Edge → Event Broker → State Machine → Alert Dispatcher
Bulge nodes (unblocked when parent spine node completes):
- CV Redundancy — unblocked by Sensor Edge (camera feed live)
- Clip Store — unblocked by Event Broker (video buffer live)
- Compliance History — unblocked by Alert Dispatcher (violation log stable)
- Shift Reports — unblocked by Compliance History
gantt
title lab-hygiene-sentinel — Spine + Bulge Build Plan
dateFormat YYYY-MM-DD
axisFormat W%W
section Spine
Sensor Edge (RFID + soap sensor + cameras) :p1, 2026-04-07, 3w
Event Broker (normalise + deduplicate + buffer) :p2, after p1, 2w
State Machine (protocol enforcement) :p3, after p2, 2w
Alert Dispatcher (alarm + push + clip + log) :p4, after p3, 2w
section Bulge (parallel)
CV Redundancy Layer :b1, after p1, 3w
Clip Store :b2, after p2, 1w
Compliance History :b3, after p4, 2w
Shift Reports :b4, after b3, 1w
Parallelism rules:
- CV Redundancy can run in parallel with the Event Broker and State Machine sprints — it only needs the camera feed from the Sensor Edge sprint.
- Clip Store can run in parallel with the State Machine sprint — it only needs the video buffer from the Event Broker.
- Compliance History and Shift Reports cannot start until the violation log schema is stable (end of Alert Dispatcher sprint) — their data model is entirely derived from the log.
- The State Machine sprint cannot be parallelised with the Event Broker sprint — the state machine's correctness depends on the normalised, deduplicated event stream, which the broker produces.