Split 4 oversized files (503-679 LOC each) into focused units all under 500 LOC: - tech_file_generator.go → +_prompts, +_prompt_builder, +_fallback - hazard_patterns_extended.go → +_extended2.go (HP074-HP102 extracted) - models.go → +_entities.go, +_api.go (enums / DB entities / API types) - completeness.go → +_gates.go (gate definitions extracted) All files remain in package iace. Zero behavior changes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
328 lines
14 KiB
Go
328 lines
14 KiB
Go
package iace
|
|
|
|
// getExtendedHazardPatternsB returns patterns HP074-HP102.
|
|
// Called by GetExtendedHazardPatterns in hazard_patterns_extended.go.
|
|
func getExtendedHazardPatternsB() []HazardPattern {
|
|
return []HazardPattern{
|
|
{
|
|
ID: "HP074", NameDE: "Industrie-Switch — elektrisch", NameEN: "Industrial Switch — electrical",
|
|
RequiredComponentTags: []string{"networked", "security_device"},
|
|
RequiredEnergyTags: []string{"electrical_energy"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"communication_failure"},
|
|
SuggestedMeasureIDs: []string{"M116"},
|
|
SuggestedEvidenceIDs: []string{"E08"},
|
|
Priority: 70,
|
|
// Source: R075, R329, R585, R1085
|
|
},
|
|
{
|
|
ID: "HP075", NameDE: "Laserscanner — elektrisch", NameEN: "Laser Scanner — electrical",
|
|
RequiredComponentTags: []string{"sensor_part"},
|
|
RequiredEnergyTags: []string{"electrical_energy"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"sensor_fault"},
|
|
SuggestedMeasureIDs: []string{"M106"},
|
|
SuggestedEvidenceIDs: []string{"E08", "E09"},
|
|
Priority: 70,
|
|
// Source: R583, R1083
|
|
},
|
|
{
|
|
ID: "HP076", NameDE: "Hubwerk — mechanisch", NameEN: "Lifting Device — mechanical",
|
|
RequiredComponentTags: []string{"gravity_risk", "high_force", "moving_part"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"operation", "transport"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M004", "M005"},
|
|
SuggestedEvidenceIDs: []string{"E08", "E20"},
|
|
Priority: 80,
|
|
// Source: R307, R308
|
|
},
|
|
{
|
|
ID: "HP077", NameDE: "Hubtisch — hydraulisch", NameEN: "Lifting Table — hydraulic",
|
|
RequiredComponentTags: []string{"gravity_risk", "moving_part"},
|
|
RequiredEnergyTags: []string{"hydraulic_pressure"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M021"},
|
|
SuggestedEvidenceIDs: []string{"E11"},
|
|
Priority: 80,
|
|
// Source: R560, R1060
|
|
},
|
|
{
|
|
ID: "HP078", NameDE: "Linearachse — mechanisch", NameEN: "Linear Axis — mechanical",
|
|
RequiredComponentTags: []string{"crush_point", "moving_part"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"automatic_operation", "maintenance", "setup"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M003", "M051", "M054", "M106", "M121", "M131"},
|
|
SuggestedEvidenceIDs: []string{"E08", "E09", "E20", "E21"},
|
|
Priority: 80,
|
|
// Source: R051, R052, R301, R302
|
|
},
|
|
{
|
|
ID: "HP079", NameDE: "Maschinenrahmen — mechanisch", NameEN: "Machine Frame — mechanical",
|
|
RequiredComponentTags: []string{"structural_part"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M005"},
|
|
SuggestedEvidenceIDs: []string{"E07"},
|
|
Priority: 80,
|
|
// Source: R335, R593, R1093
|
|
},
|
|
{
|
|
ID: "HP080", NameDE: "ML-Modell — Software", NameEN: "Ml Model — software",
|
|
RequiredComponentTags: []string{"has_ai", "has_software"},
|
|
RequiredEnergyTags: []string{},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"model_drift"},
|
|
SuggestedMeasureIDs: []string{"M103"},
|
|
SuggestedEvidenceIDs: []string{"E15"},
|
|
Priority: 75,
|
|
// Source: R078, R332, R589, R1089
|
|
},
|
|
{
|
|
ID: "HP081", NameDE: "Ueberwachungssystem — elektrisch", NameEN: "Monitoring System — electrical",
|
|
RequiredComponentTags: []string{"has_software", "safety_device"},
|
|
RequiredEnergyTags: []string{"electrical_energy"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"sensor_fault"},
|
|
SuggestedMeasureIDs: []string{"M106"},
|
|
SuggestedEvidenceIDs: []string{"E14"},
|
|
Priority: 70,
|
|
// Source: R337, R595, R1095
|
|
},
|
|
{
|
|
ID: "HP082", NameDE: "Palettierer — mechanisch", NameEN: "Palletizer — mechanical",
|
|
RequiredComponentTags: []string{"high_force", "moving_part"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"automatic_operation"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M004"},
|
|
SuggestedEvidenceIDs: []string{"E14"},
|
|
Priority: 80,
|
|
// Source: R559, R1059
|
|
},
|
|
{
|
|
ID: "HP083", NameDE: "Plattform — mechanisch", NameEN: "Platform — mechanical",
|
|
RequiredComponentTags: []string{"gravity_risk", "structural_part"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M052"},
|
|
SuggestedEvidenceIDs: []string{"E20"},
|
|
Priority: 80,
|
|
// Source: R336, R594, R1094
|
|
},
|
|
{
|
|
ID: "HP084", NameDE: "Pneumatikzylinder — pneumatisch", NameEN: "Pneumatic Cylinder — pneumatic",
|
|
RequiredComponentTags: []string{"moving_part", "pneumatic_part", "stored_energy"},
|
|
RequiredEnergyTags: []string{"pneumatic_pressure"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M022"},
|
|
SuggestedEvidenceIDs: []string{"E08"},
|
|
Priority: 80,
|
|
// Source: R069, R323, R576, R1076
|
|
},
|
|
{
|
|
ID: "HP085", NameDE: "Pneumatikleitung — pneumatisch", NameEN: "Pneumatic Line — pneumatic",
|
|
RequiredComponentTags: []string{"pneumatic_part"},
|
|
RequiredEnergyTags: []string{"pneumatic_pressure"},
|
|
RequiredLifecycles: []string{"maintenance"},
|
|
GeneratedHazardCats: []string{"pneumatic_hydraulic"},
|
|
SuggestedMeasureIDs: []string{"M021"},
|
|
SuggestedEvidenceIDs: []string{"E20"},
|
|
Priority: 70,
|
|
// Source: R324, R577, R1077
|
|
},
|
|
{
|
|
ID: "HP086", NameDE: "Stromversorgung — elektrisch", NameEN: "Power Supply — electrical",
|
|
RequiredComponentTags: []string{"electrical_part", "high_voltage"},
|
|
RequiredEnergyTags: []string{"electrical_energy"},
|
|
RequiredLifecycles: []string{"maintenance", "operation"},
|
|
GeneratedHazardCats: []string{"electrical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M061", "M121"},
|
|
SuggestedEvidenceIDs: []string{"E14", "E20"},
|
|
Priority: 80,
|
|
// Source: R063, R311, R312, R568, R1068
|
|
},
|
|
{
|
|
ID: "HP087", NameDE: "Naeherungssensor — elektrisch", NameEN: "Proximity Sensor — electrical",
|
|
RequiredComponentTags: []string{"sensor_part"},
|
|
RequiredEnergyTags: []string{"electrical_energy"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"sensor_fault"},
|
|
SuggestedMeasureIDs: []string{"M082"},
|
|
SuggestedEvidenceIDs: []string{"E08"},
|
|
Priority: 70,
|
|
// Source: R073, R327, R582, R1082
|
|
},
|
|
{
|
|
ID: "HP088", NameDE: "Roboterarm — mechanisch", NameEN: "Robot Arm — mechanical",
|
|
RequiredComponentTags: []string{"high_force", "moving_part", "rotating_part"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"automatic_operation", "maintenance", "teach"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M051", "M082", "M106", "M121", "M131"},
|
|
SuggestedEvidenceIDs: []string{"E08", "E09", "E21"},
|
|
Priority: 80,
|
|
// Source: R303, R304, R551, R552, R1051, R1052
|
|
},
|
|
{
|
|
ID: "HP089", NameDE: "Robotersteuerung — elektrisch", NameEN: "Robot Controller — electrical",
|
|
RequiredComponentTags: []string{"has_software", "programmable"},
|
|
RequiredEnergyTags: []string{"electrical_energy"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"software_fault"},
|
|
SuggestedMeasureIDs: []string{"M103"},
|
|
SuggestedEvidenceIDs: []string{"E14"},
|
|
Priority: 70,
|
|
// Source: R553, R1053
|
|
},
|
|
{
|
|
ID: "HP090", NameDE: "Greifer — mechanisch", NameEN: "Robot Gripper — mechanical",
|
|
RequiredComponentTags: []string{"clamping_part", "moving_part", "pinch_point"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"automatic_operation", "operation", "setup"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M003", "M004", "M106"},
|
|
SuggestedEvidenceIDs: []string{"E08"},
|
|
Priority: 80,
|
|
// Source: R057, R058, R554
|
|
},
|
|
{
|
|
ID: "HP091", NameDE: "Greifer — pneumatisch", NameEN: "Robot Gripper — pneumatic",
|
|
RequiredComponentTags: []string{"clamping_part", "moving_part", "pinch_point"},
|
|
RequiredEnergyTags: []string{"pneumatic_pressure"},
|
|
RequiredLifecycles: []string{"maintenance", "operation"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard", "pneumatic_hydraulic"},
|
|
SuggestedMeasureIDs: []string{"M004", "M021"},
|
|
SuggestedEvidenceIDs: []string{"E08", "E20"},
|
|
Priority: 80,
|
|
// Source: R555, R1054, R1055
|
|
},
|
|
{
|
|
ID: "HP092", NameDE: "Rollenfoerderer — mechanisch", NameEN: "Roller Conveyor — mechanical",
|
|
RequiredComponentTags: []string{"entanglement_risk", "moving_part", "rotating_part"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M051"},
|
|
SuggestedEvidenceIDs: []string{"E20"},
|
|
Priority: 80,
|
|
// Source: R558, R1058
|
|
},
|
|
{
|
|
ID: "HP093", NameDE: "Drehtisch — mechanisch", NameEN: "Rotary Table — mechanical",
|
|
RequiredComponentTags: []string{"high_force", "rotating_part"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"automatic_operation", "maintenance"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M051", "M054", "M121", "M131"},
|
|
SuggestedEvidenceIDs: []string{"E14", "E21"},
|
|
Priority: 80,
|
|
// Source: R309, R310
|
|
},
|
|
{
|
|
ID: "HP094", NameDE: "Drehscheibe — mechanisch", NameEN: "Rotating Disc — mechanical",
|
|
RequiredComponentTags: []string{"high_speed", "rotating_part"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M051"},
|
|
SuggestedEvidenceIDs: []string{"E20"},
|
|
Priority: 80,
|
|
// Source: R565, R1065
|
|
},
|
|
{
|
|
ID: "HP095", NameDE: "Spindel — mechanisch", NameEN: "Rotating Spindle — mechanical",
|
|
RequiredComponentTags: []string{"cutting_part", "high_speed", "rotating_part"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"maintenance", "operation"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M051", "M121", "M131"},
|
|
SuggestedEvidenceIDs: []string{"E20", "E21"},
|
|
Priority: 80,
|
|
// Source: R561, R562, R1061, R1062
|
|
},
|
|
{
|
|
ID: "HP096", NameDE: "Router — elektrisch", NameEN: "Router — electrical",
|
|
RequiredComponentTags: []string{"networked", "security_device"},
|
|
RequiredEnergyTags: []string{"electrical_energy"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"unauthorized_access"},
|
|
SuggestedMeasureIDs: []string{"M101", "M113"},
|
|
SuggestedEvidenceIDs: []string{"E16", "E17"},
|
|
Priority: 85,
|
|
// Source: R076, R330, R586, R1086
|
|
},
|
|
{
|
|
ID: "HP097", NameDE: "Gesamtsystem — gemischt", NameEN: "System — mixed",
|
|
RequiredComponentTags: []string{"has_software"},
|
|
RequiredEnergyTags: []string{},
|
|
RequiredLifecycles: []string{"operation", "safety_validation"},
|
|
GeneratedHazardCats: []string{"software_fault"},
|
|
SuggestedMeasureIDs: []string{"M082", "M106"},
|
|
SuggestedEvidenceIDs: []string{"E14", "E15"},
|
|
Priority: 70,
|
|
// Source: R599, R600, R1099, R1100
|
|
},
|
|
{
|
|
ID: "HP098", NameDE: "Werkzeugwechsler — mechanisch", NameEN: "Tool Changer — mechanical",
|
|
RequiredComponentTags: []string{"moving_part", "pinch_point"},
|
|
RequiredEnergyTags: []string{"kinetic"},
|
|
RequiredLifecycles: []string{"maintenance", "operation"},
|
|
GeneratedHazardCats: []string{"mechanical_hazard"},
|
|
SuggestedMeasureIDs: []string{"M051"},
|
|
SuggestedEvidenceIDs: []string{"E14", "E20"},
|
|
Priority: 80,
|
|
// Source: R059, R060
|
|
},
|
|
{
|
|
ID: "HP099", NameDE: "Touch-Bedienfeld — Software", NameEN: "Touch Interface — software",
|
|
RequiredComponentTags: []string{"has_software", "user_interface"},
|
|
RequiredEnergyTags: []string{},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"hmi_error"},
|
|
SuggestedMeasureIDs: []string{"M101", "M113"},
|
|
SuggestedEvidenceIDs: []string{"E14"},
|
|
Priority: 70,
|
|
// Source: R592, R1092
|
|
},
|
|
{
|
|
ID: "HP100", NameDE: "Transformator — elektrisch", NameEN: "Transformer — electrical",
|
|
RequiredComponentTags: []string{"electrical_part", "high_voltage"},
|
|
RequiredEnergyTags: []string{"electrical_energy"},
|
|
RequiredLifecycles: []string{"inspection", "operation"},
|
|
GeneratedHazardCats: []string{"electrical_hazard", "thermal_hazard"},
|
|
SuggestedMeasureIDs: []string{"M014", "M062"},
|
|
SuggestedEvidenceIDs: []string{"E10"},
|
|
Priority: 80,
|
|
// Source: R064, R313, R314, R569, R1069
|
|
},
|
|
{
|
|
ID: "HP101", NameDE: "KI-Bilderkennung — Software", NameEN: "Vision Ai — software",
|
|
RequiredComponentTags: []string{"has_ai", "sensor_part"},
|
|
RequiredEnergyTags: []string{},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"sensor_fault"},
|
|
SuggestedMeasureIDs: []string{"M103"},
|
|
SuggestedEvidenceIDs: []string{"E15"},
|
|
Priority: 70,
|
|
// Source: R077, R331, R588, R1088
|
|
},
|
|
{
|
|
ID: "HP102", NameDE: "Vision-Kamera — elektrisch", NameEN: "Vision Camera — electrical",
|
|
RequiredComponentTags: []string{"sensor_part"},
|
|
RequiredEnergyTags: []string{"electrical_energy"},
|
|
RequiredLifecycles: []string{"operation"},
|
|
GeneratedHazardCats: []string{"ai_misclassification"},
|
|
SuggestedMeasureIDs: []string{"M082"},
|
|
SuggestedEvidenceIDs: []string{"E20"},
|
|
Priority: 75,
|
|
// Source: R584, R1084
|
|
},
|
|
}
|
|
}
|