From ef8e7e599f35ccbb415dabc9197bd428554929c8 Mon Sep 17 00:00:00 2001 From: Benjamin Admin Date: Tue, 5 May 2026 18:22:57 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20IACE=20+40=20DGUV-extended=20patterns?= =?UTF-8?q?=20(HP094-HP133)=20=E2=80=94=20133=20total?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mechanical extended (HP094-HP103): Cutting, impact, friction, high-pressure jet, ejection of fragments, tripping, gear/chain entanglement, clothing winding, pendulating loads, tool kickback Electrical extended (HP104-HP109): Arc flash, capacitor residual charge, static discharge, grounding fault, induced voltage, overcurrent fire Hazardous substances (HP110-HP117): Dust explosion, solvent vapors, cutting fluid irritation, welding fumes, chemical burns, suffocation in confined spaces, biological contamination, asbestos release Radiation (HP118-HP123): Laser eye injury, UV from welding, infrared heat, EMF induction, ionizing radiation, glare Fire/Explosion (HP124-HP130): Electrical overheating, gas/vapor explosion, hydraulic oil fire, metal dust fire, pressure vessel burst, oxygen enrichment, spontaneous combustion Ergonomic extended (HP131-HP133): RSI, whole-body vibration, hand-arm vibration Total pattern library: 133 patterns (44 builtin + 14 press + 7 cobot + 28 operational + 40 DGUV) + ~58 extended rule library Co-Authored-By: Claude Opus 4.6 (1M context) --- .../iace/hazard_patterns_extended_dguv.go | 374 ++++++++++++++++++ .../internal/iace/pattern_engine.go | 1 + 2 files changed, 375 insertions(+) create mode 100644 ai-compliance-sdk/internal/iace/hazard_patterns_extended_dguv.go diff --git a/ai-compliance-sdk/internal/iace/hazard_patterns_extended_dguv.go b/ai-compliance-sdk/internal/iace/hazard_patterns_extended_dguv.go new file mode 100644 index 0000000..7bda306 --- /dev/null +++ b/ai-compliance-sdk/internal/iace/hazard_patterns_extended_dguv.go @@ -0,0 +1,374 @@ +package iace + +// GetDGUVExtendedPatterns returns additional hazard patterns covering +// the remaining DGUV Gefährdungskatalog themes not yet addressed: +// - Mechanical (extended): cutting, impact, friction, high-pressure jet +// - Electrical (extended): arc flash, capacitor discharge, static +// - Hazardous substances: dusts, vapors, aerosols, solvents +// - Radiation: laser, UV, infrared, electromagnetic +// - Fire/Explosion: dust explosion, flammable atmospheres +// - Biological: contamination in fluid systems +// +// Total: 40 additional patterns (HP094-HP133) +func GetDGUVExtendedPatterns() []HazardPattern { + return []HazardPattern{ + // ================================================================ + // Mechanisch erweitert (HP094-HP103) + // ================================================================ + { + ID: "HP094", NameDE: "Schneiden/Abschneiden durch scharfe Kanten", NameEN: "Cutting by sharp edges", + RequiredComponentTags: []string{"cutting_part"}, + RequiredEnergyTags: []string{}, + GeneratedHazardCats: []string{"mechanical_hazard"}, + SuggestedMeasureIDs: []string{"M001", "M141"}, + Priority: 75, + }, + { + ID: "HP095", NameDE: "Stossgefahr durch bewegte Maschinenteile", NameEN: "Impact by moving machine parts", + RequiredComponentTags: []string{"moving_part", "high_speed"}, + RequiredEnergyTags: []string{"kinetic"}, + GeneratedHazardCats: []string{"mechanical_hazard"}, + SuggestedMeasureIDs: []string{"M001", "M005"}, + Priority: 88, + }, + { + ID: "HP096", NameDE: "Reibung/Abrieb durch rotierende Oberflaechen", NameEN: "Friction/abrasion by rotating surfaces", + RequiredComponentTags: []string{"rotating_part"}, + RequiredEnergyTags: []string{}, + GeneratedHazardCats: []string{"mechanical_hazard"}, + SuggestedMeasureIDs: []string{"M001"}, + Priority: 60, + }, + { + ID: "HP097", NameDE: "Hochdruckstrahl (Wasser/Oel) verletzt Haut", NameEN: "High-pressure jet injures skin", + RequiredComponentTags: []string{"high_pressure"}, + RequiredEnergyTags: []string{}, + GeneratedHazardCats: []string{"pneumatic_hydraulic"}, + SuggestedMeasureIDs: []string{"M054", "M141"}, + Priority: 85, + ExpertHintDE: "Hochdruckinjektionsverletzung — sofortige chirurgische Behandlung erforderlich.", + }, + { + ID: "HP098", NameDE: "Wegschleudern von Teilen/Splittern", NameEN: "Ejection of parts/fragments", + RequiredComponentTags: []string{"high_speed", "rotating_part"}, + RequiredEnergyTags: []string{"kinetic"}, + GeneratedHazardCats: []string{"mechanical_hazard"}, + SuggestedMeasureIDs: []string{"M001", "M005"}, + Priority: 90, + }, + { + ID: "HP099", NameDE: "Stolpern/Stuerzen durch Bodenunebenheiten", NameEN: "Tripping/falling due to floor irregularities", + RequiredComponentTags: []string{"structural_part"}, + RequiredEnergyTags: []string{}, + GeneratedHazardCats: []string{"mechanical_hazard"}, + SuggestedMeasureIDs: []string{"M141"}, + Priority: 50, + }, + { + ID: "HP100", NameDE: "Erfassen durch offene Zahnraeder/Ketten", NameEN: "Entanglement by open gears/chains", + RequiredComponentTags: []string{"rotating_part", "entanglement_risk"}, + RequiredEnergyTags: []string{"rotational"}, + GeneratedHazardCats: []string{"mechanical_hazard"}, + SuggestedMeasureIDs: []string{"M001", "M005"}, + Priority: 92, + }, + { + ID: "HP101", NameDE: "Aufwickeln von Kleidung/Haaren", NameEN: "Winding up of clothing/hair", + RequiredComponentTags: []string{"rotating_part"}, + RequiredEnergyTags: []string{"rotational"}, + GeneratedHazardCats: []string{"mechanical_hazard"}, + SuggestedMeasureIDs: []string{"M001", "M141"}, + Priority: 85, + }, + { + ID: "HP102", NameDE: "Pendelnde/schwingende Lasten", NameEN: "Swinging/pendulating loads", + RequiredComponentTags: []string{"gravity_risk", "moving_part"}, + RequiredEnergyTags: []string{}, + GeneratedHazardCats: []string{"mechanical_hazard"}, + SuggestedMeasureIDs: []string{"M051"}, + Priority: 80, + }, + { + ID: "HP103", NameDE: "Rueckschlag von Werkzeugen", NameEN: "Kickback of tools", + RequiredComponentTags: []string{"cutting_part", "high_speed"}, + RequiredEnergyTags: []string{}, + GeneratedHazardCats: []string{"mechanical_hazard"}, + SuggestedMeasureIDs: []string{"M001", "M141"}, + Priority: 82, + }, + + // ================================================================ + // Elektrisch erweitert (HP104-HP109) + // ================================================================ + { + ID: "HP104", NameDE: "Lichtbogen bei Kurzschluss", NameEN: "Arc flash from short circuit", + RequiredComponentTags: []string{"high_voltage", "electrical_part"}, + RequiredEnergyTags: []string{"electrical_energy"}, + GeneratedHazardCats: []string{"electrical_hazard", "thermal_hazard"}, + SuggestedMeasureIDs: []string{"M054"}, + Priority: 95, + ExpertHintDE: "Lichtbogenschutz (Arc Flash) — PSA Kategorie und Schutzabstand berechnen.", + }, + { + ID: "HP105", NameDE: "Kondensator-Restladung nach Abschaltung", NameEN: "Capacitor residual charge after shutdown", + RequiredComponentTags: []string{"electrical_part", "stored_energy"}, + RequiredEnergyTags: []string{"stored_energy"}, + GeneratedHazardCats: []string{"electrical_hazard"}, + SuggestedMeasureIDs: []string{"M054"}, + Priority: 88, + ExpertHintDE: "Entladezeit abwarten oder Entladewiderstand vorsehen. Spannungsfreiheit messen.", + }, + { + ID: "HP106", NameDE: "Statische Aufladung (ESD) zuendet Atmosphaere", NameEN: "Static charge (ESD) ignites atmosphere", + RequiredComponentTags: []string{"electrical_part"}, + RequiredEnergyTags: []string{}, + GeneratedHazardCats: []string{"electrical_hazard"}, + SuggestedMeasureIDs: []string{"M054"}, + Priority: 72, + }, + { + ID: "HP107", NameDE: "Erdungsfehler fuehrt zu Koerperdurchstroemung", NameEN: "Grounding fault causes body current", + RequiredComponentTags: []string{"high_voltage"}, + RequiredEnergyTags: []string{"electrical_energy"}, + GeneratedHazardCats: []string{"electrical_hazard"}, + SuggestedMeasureIDs: []string{"M054"}, + Priority: 92, + }, + { + ID: "HP108", NameDE: "Induktionsspannung in abgeschalteten Leitungen", NameEN: "Induced voltage in disconnected lines", + RequiredComponentTags: []string{"electrical_part"}, + RequiredEnergyTags: []string{"electromagnetic"}, + GeneratedHazardCats: []string{"electrical_hazard"}, + SuggestedMeasureIDs: []string{"M054"}, + Priority: 70, + }, + { + ID: "HP109", NameDE: "Ueberstrom/Ueberlast fuehrt zu Brand", NameEN: "Overcurrent/overload causes fire", + RequiredComponentTags: []string{"electrical_part"}, + RequiredEnergyTags: []string{"electrical_energy"}, + GeneratedHazardCats: []string{"electrical_hazard", "thermal_hazard"}, + SuggestedMeasureIDs: []string{"M054"}, + Priority: 85, + }, + + // ================================================================ + // Gefahrstoffe (HP110-HP117) + // ================================================================ + { + ID: "HP110", NameDE: "Staubexplosion in geschlossenen Raeumen", NameEN: "Dust explosion in enclosed spaces", + RequiredComponentTags: []string{"chemical_risk"}, + RequiredEnergyTags: []string{}, + GeneratedHazardCats: []string{"material_environmental"}, + SuggestedMeasureIDs: []string{"M054", "M124"}, + Priority: 95, + RequiresExpertCalculation: true, + ExpertHintDE: "Explosionsschutz-Dokument erforderlich. Zoneneinteilung und Zuendquellenanalyse.", + }, + { + ID: "HP111", NameDE: "Einatmen von Loesemitteldaempfen", NameEN: "Inhalation of solvent vapors", + RequiredComponentTags: []string{"chemical_risk"}, + RequiredEnergyTags: []string{}, + GeneratedHazardCats: []string{"material_environmental"}, + SuggestedMeasureIDs: []string{"M124", "M141"}, + Priority: 78, + }, + { + ID: "HP112", NameDE: "Hautreizung durch Kuehlschmierstoffe", NameEN: "Skin irritation from cutting fluids", + RequiredComponentTags: []string{"chemical_risk"}, + RequiredEnergyTags: []string{}, + GeneratedHazardCats: []string{"material_environmental"}, + SuggestedMeasureIDs: []string{"M141"}, + Priority: 65, + }, + { + ID: "HP113", NameDE: "Schweissrauch-Exposition", NameEN: "Welding fume exposure", + RequiredComponentTags: []string{"high_temperature", "chemical_risk"}, + RequiredEnergyTags: []string{}, + GeneratedHazardCats: []string{"material_environmental"}, + SuggestedMeasureIDs: []string{"M124", "M141"}, + Priority: 80, + }, + { + ID: "HP114", NameDE: "Veraetzung durch Saeure/Lauge", NameEN: "Chemical burns from acid/alkali", + RequiredComponentTags: []string{"chemical_risk"}, + RequiredEnergyTags: []string{}, + GeneratedHazardCats: []string{"material_environmental"}, + SuggestedMeasureIDs: []string{"M141"}, + Priority: 85, + }, + { + ID: "HP115", NameDE: "Erstickungsgefahr in Behaeltern/Schaechten", NameEN: "Suffocation in tanks/shafts", + RequiredComponentTags: []string{"structural_part", "chemical_risk"}, + RequiredEnergyTags: []string{}, + GeneratedHazardCats: []string{"material_environmental"}, + SuggestedMeasureIDs: []string{"M054", "M141"}, + Priority: 95, + RequiresExpertCalculation: true, + ExpertHintDE: "Befahrerlaubnis und Gasfreimessung vor Betreten enger Raeume.", + }, + { + ID: "HP116", NameDE: "Biologische Kontamination in Fluidsystemen", NameEN: "Biological contamination in fluid systems", + RequiredComponentTags: []string{"hydraulic_part"}, + RequiredEnergyTags: []string{}, + GeneratedHazardCats: []string{"material_environmental"}, + SuggestedMeasureIDs: []string{"M141"}, + Priority: 55, + }, + { + ID: "HP117", NameDE: "Asbest-/Mineralfaserfreisetzung bei Demontage", NameEN: "Asbestos/mineral fiber release during dismantling", + RequiredComponentTags: []string{"chemical_risk"}, + RequiredLifecycles: []string{"decommissioning", "disposal"}, + GeneratedHazardCats: []string{"material_environmental"}, + SuggestedMeasureIDs: []string{"M141"}, + Priority: 90, + }, + + // ================================================================ + // Strahlung (HP118-HP123) + // ================================================================ + { + ID: "HP118", NameDE: "Laserstrahlung Augenverletzung", NameEN: "Laser radiation eye injury", + RequiredComponentTags: []string{"sensor_part"}, + RequiredEnergyTags: []string{"radiation"}, + GeneratedHazardCats: []string{"material_environmental"}, + SuggestedMeasureIDs: []string{"M001", "M141"}, + Priority: 90, + ExpertHintDE: "Laserklasse bestimmen. Ab Klasse 3B: Laserschutzbeauftragter erforderlich.", + }, + { + ID: "HP119", NameDE: "UV-Strahlung bei Schweiss-/Haerteprozessen", NameEN: "UV radiation from welding/curing", + RequiredComponentTags: []string{"high_temperature"}, + RequiredEnergyTags: []string{"radiation"}, + GeneratedHazardCats: []string{"material_environmental"}, + SuggestedMeasureIDs: []string{"M001", "M141"}, + Priority: 78, + }, + { + ID: "HP120", NameDE: "Infrarot-Waermestrahlung", NameEN: "Infrared heat radiation", + RequiredComponentTags: []string{"high_temperature"}, + RequiredEnergyTags: []string{"thermal"}, + GeneratedHazardCats: []string{"thermal_hazard"}, + SuggestedMeasureIDs: []string{"M054", "M141"}, + Priority: 65, + }, + { + ID: "HP121", NameDE: "Elektromagnetische Felder (Induktionserwaermung)", NameEN: "EMF from induction heating", + RequiredComponentTags: []string{"electrical_part"}, + RequiredEnergyTags: []string{"electromagnetic"}, + GeneratedHazardCats: []string{"material_environmental"}, + SuggestedMeasureIDs: []string{"M054"}, + Priority: 70, + }, + { + ID: "HP122", NameDE: "Ionisierende Strahlung (Roentgen/Gamma)", NameEN: "Ionizing radiation (X-ray/gamma)", + RequiredComponentTags: []string{"sensor_part"}, + RequiredEnergyTags: []string{"radiation"}, + GeneratedHazardCats: []string{"material_environmental"}, + SuggestedMeasureIDs: []string{"M001", "M054"}, + Priority: 95, + RequiresExpertCalculation: true, + ExpertHintDE: "Strahlenschutzbeauftragter und Genehmigung erforderlich.", + }, + { + ID: "HP123", NameDE: "Blendung durch starke Lichtquellen", NameEN: "Glare from intense light sources", + RequiredComponentTags: []string{"sensor_part"}, + RequiredEnergyTags: []string{"radiation"}, + GeneratedHazardCats: []string{"material_environmental"}, + SuggestedMeasureIDs: []string{"M141"}, + Priority: 55, + }, + + // ================================================================ + // Brand / Explosion (HP124-HP130) + // ================================================================ + { + ID: "HP124", NameDE: "Brand durch Ueberhitzung elektrischer Bauteile", NameEN: "Fire from overheating electrical components", + RequiredComponentTags: []string{"electrical_part", "high_temperature"}, + RequiredEnergyTags: []string{}, + GeneratedHazardCats: []string{"thermal_hazard"}, + SuggestedMeasureIDs: []string{"M054"}, + Priority: 88, + }, + { + ID: "HP125", NameDE: "Explosion entzuendlicher Gase/Daempfe", NameEN: "Explosion of flammable gases/vapors", + RequiredComponentTags: []string{"chemical_risk"}, + RequiredEnergyTags: []string{}, + GeneratedHazardCats: []string{"material_environmental"}, + SuggestedMeasureIDs: []string{"M054", "M124"}, + Priority: 96, + RequiresExpertCalculation: true, + ExpertHintDE: "Explosionsschutz-Dokument. ATEX-Zoneneinteilung erforderlich.", + }, + { + ID: "HP126", NameDE: "Hydraulikoelbrand bei Leckage auf heisse Flaeche", NameEN: "Hydraulic oil fire from leakage on hot surface", + RequiredComponentTags: []string{"hydraulic_part", "high_temperature"}, + RequiredEnergyTags: []string{}, + GeneratedHazardCats: []string{"thermal_hazard", "material_environmental"}, + SuggestedMeasureIDs: []string{"M054", "M131"}, + Priority: 88, + }, + { + ID: "HP127", NameDE: "Metallbrand (Aluminium-/Magnesiumstaub)", NameEN: "Metal fire (aluminum/magnesium dust)", + RequiredComponentTags: []string{"chemical_risk", "cutting_part"}, + RequiredEnergyTags: []string{}, + GeneratedHazardCats: []string{"material_environmental"}, + SuggestedMeasureIDs: []string{"M054", "M124"}, + Priority: 92, + ExpertHintDE: "Metallbraende nur mit Spezialloeschmittel (Klasse D). Kein Wasser!", + }, + { + ID: "HP128", NameDE: "Druckbehaelter-Bersten", NameEN: "Pressure vessel burst", + RequiredComponentTags: []string{"high_pressure"}, + RequiredEnergyTags: []string{"stored_energy"}, + GeneratedHazardCats: []string{"pneumatic_hydraulic"}, + SuggestedMeasureIDs: []string{"M131", "M054"}, + Priority: 96, + RequiresExpertCalculation: true, + ExpertHintDE: "Druckbehaelter-Pruefung nach BetrSichV. Wiederkehrende Prueffristen beachten.", + }, + { + ID: "HP129", NameDE: "Sauerstoffanreicherung erhoehte Brandgefahr", NameEN: "Oxygen enrichment increased fire risk", + RequiredComponentTags: []string{"chemical_risk"}, + RequiredEnergyTags: []string{}, + GeneratedHazardCats: []string{"material_environmental"}, + SuggestedMeasureIDs: []string{"M054"}, + Priority: 80, + }, + { + ID: "HP130", NameDE: "Selbstentzuendung oelgetraenkter Lappen/Filter", NameEN: "Spontaneous combustion of oil-soaked rags", + RequiredComponentTags: []string{"chemical_risk", "oil_mist_risk"}, + RequiredEnergyTags: []string{}, + GeneratedHazardCats: []string{"thermal_hazard", "material_environmental"}, + SuggestedMeasureIDs: []string{"M141"}, + Priority: 70, + }, + + // ================================================================ + // Ergonomie erweitert (HP131-HP133) + // ================================================================ + { + ID: "HP131", NameDE: "Repetitive Belastung (RSI) bei Serienfertigung", NameEN: "Repetitive strain (RSI) in series production", + RequiredComponentTags: []string{"moving_part"}, + RequiredEnergyTags: []string{}, + GeneratedHazardCats: []string{"ergonomic"}, + SuggestedMeasureIDs: []string{"M141"}, + Priority: 55, + }, + { + ID: "HP132", NameDE: "Ganzkoepervibrration bei Fahrzeugen/Maschinen", NameEN: "Whole-body vibration from vehicles/machines", + RequiredComponentTags: []string{"vibration_source"}, + RequiredEnergyTags: []string{"vibration"}, + GeneratedHazardCats: []string{"noise_vibration"}, + SuggestedMeasureIDs: []string{"M054"}, + Priority: 65, + }, + { + ID: "HP133", NameDE: "Hand-Arm-Vibration bei handgefuehrten Werkzeugen", NameEN: "Hand-arm vibration from handheld tools", + RequiredComponentTags: []string{"vibration_source"}, + RequiredEnergyTags: []string{"vibration"}, + GeneratedHazardCats: []string{"noise_vibration"}, + SuggestedMeasureIDs: []string{"M054", "M141"}, + Priority: 70, + }, + } +} diff --git a/ai-compliance-sdk/internal/iace/pattern_engine.go b/ai-compliance-sdk/internal/iace/pattern_engine.go index d2a93fb..45a7e09 100644 --- a/ai-compliance-sdk/internal/iace/pattern_engine.go +++ b/ai-compliance-sdk/internal/iace/pattern_engine.go @@ -60,6 +60,7 @@ func NewPatternEngine() *PatternEngine { patterns = append(patterns, GetPressHazardPatterns()...) // HP045-HP058 press-specific patterns = append(patterns, GetCobotHazardPatterns()...) // HP059-HP065 cobot-specific patterns = append(patterns, GetOperationalHazardPatterns()...) // HP066-HP093 operational states + patterns = append(patterns, GetDGUVExtendedPatterns()...) // HP094-HP133 DGUV themes return &PatternEngine{ resolver: NewTagResolver(), patterns: patterns,