Risk Library¶
The risk library is the master list of risks that the system seeds into campaigns and missions. When a campaign or mission is created, relevant entries from the library are copied in as risk rows.
Viewing the library¶
Admin → Risk Library lists all entries. Each entry shows:
- Name — the hazard label (shown in the risk panel)
- Stage — the lifecycle stage at which the risk becomes actionable
- Standard — whether it is seeded into every campaign/mission (standard) or only when a trigger condition is met
- System controlled — whether the system auto-populates the control text
- Gates mission creation — whether this risk blocks the "Add Mission" button if unresolved
Adding a library entry¶
Click Add Entry:
| Field | Notes |
|---|---|
| Name | Short hazard label (e.g. "Controlled Airspace Incursion") |
| Is standard | Tick to seed into every campaign/mission; untick for trigger-only risks |
| Context triggers | Conditions that cause this risk to appear (e.g. near_aerodrome, over_water, protected_area) |
| Resolution stage | The earliest lifecycle stage at which the Done button is shown (see table below) |
| People at risk | Who is affected — shown in the risk panel for reference |
| Control text | Default guidance text for the risk. Shown in the info popover |
| System control key | If set, the system auto-populates control text from live data (e.g. weather, airspace, caa_category) |
| Gates mission creation | If ticked, this risk must be Done before "Add Mission" is enabled on the campaign |
Resolution stages¶
| Stage | Meaning |
|---|---|
campaign |
Actionable as soon as the campaign is created |
location_set |
Actionable after the campaign location is set |
mission_created |
Actionable after the mission is created |
pilot_confirmed |
Actionable after a pilot is assigned |
pre_28_days |
Actionable 28 days before the flight date |
pre_7_days |
Actionable 7 days before the flight date |
pre_24_hours |
Actionable 24 hours before the flight date |
day_of_flight |
Actionable on the day of the flight |
post_flight |
Actionable after the flight |
System-controlled risks¶
Some risks have a system_control_key that tells the system to auto-populate the control text from live data:
| Key | What it generates |
|---|---|
caa_category |
Calculated CAA category, minimum qualification, Operator ID reference |
weather |
Current weather rating and summary for the flight location |
airspace |
Airspace classification and nearby controlled zones |
pilot_cert |
Pilot's current certification status vs. required category |
compliance_oa |
Active OA reference number and expiry date (or "no OA on record") |
insurance_tpl |
Active TPL policy details (or "no policy on record") |
insurance_equipment |
Active equipment policy details (or "no policy on record") |
System-controlled risks are auto-resolved when the system text is populated — the user does not need to click Done.
Context triggers¶
Trigger conditions determine when a non-standard risk is seeded:
| Trigger key | When it fires |
|---|---|
near_aerodrome |
An aerodrome is detected within 5 km of the site |
near_air_club |
An air user club is detected nearby |
over_water |
The mission has the "flying over water" flag set |
protected_area |
A SSSI or National Park is detected at the site |
urban |
The site is classified as urban |
rural |
The site is classified as rural |
bvlos |
The mission has BVLOS set to True |
Risk state diagram¶
The diagram below shows how an individual risk row moves through states from creation to resolution:
stateDiagram-v2
[*] --> Seeded : Risk row created\n(standard or triggered)
Seeded --> Unavailable : current stage < resolution_stage
Seeded --> Open : current stage ≥ resolution_stage
Unavailable --> Open : Lifecycle advances past\nresolution_stage
Open --> SystemResolved : system_control_key resolves\n& system_controlled = True
Open --> Mitigated : User clicks Done\nOR all linked checklist\nitems completed
Open --> Dismissed : User dismisses
Mitigated --> Open : User un-ticks Done
SystemResolved --> [*] : No user action needed\n(auto-resolved, audit logged)
Mitigated --> [*] : Risk managed ✓
Dismissed --> [*] : Excluded from register
note right of Unavailable
Done button hidden
Stage indicator badge shown
e.g. "Available: Pilot Confirmed"
end note
note right of Open
Done button shown
Checklist badges shown
(green / amber / grey)
end note
note right of SystemResolved
System Verified badge shown
No Done button
Control text auto-populated
end note