feat: Domain-Fragen fuer 10 weitere Domains (24 von 39 total, 62%)
10 neue Context-Structs + Field-Resolver + 22 YAML-Regeln + Frontend: - Agriculture: Pestizid-KI, Tierwohl, Umweltdaten - Social Services: Schutzbeduerftiger, Leistungszuteilung, Fallmanagement - Hospitality: Gaeste-Profiling, dynamische Preise, Bewertungsmanipulation=BLOCK - Insurance: Praemien, Schadensautomation, Betrugserkennung - Investment: Algo-Trading, Robo Advisor (MiFID II) - Defense: Dual-Use, Exportkontrolle, Verschlusssachen - Supply Chain: Lieferantenueberwachung, Menschenrechte (LkSG) - Facility: Zutrittskontrolle, Belegung, Energie - Sports: Athleten-Tracking, Fan-Profiling Domains mit Fragen: 24 von 39 (62%) YAML-Regeln total: ~66 Neue BLOCKs: Bewertungsmanipulation (UWG/DSA) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -532,6 +532,33 @@ func (e *PolicyEngine) getFieldValue(field string, intake *UseCaseIntake) interf
|
||||
return nil
|
||||
}
|
||||
return e.getManufacturingContextValue(parts[1], intake)
|
||||
case "agriculture_context":
|
||||
if len(parts) < 2 || intake.AgricultureContext == nil { return nil }
|
||||
return e.getAgricultureContextValue(parts[1], intake)
|
||||
case "social_services_context":
|
||||
if len(parts) < 2 || intake.SocialServicesCtx == nil { return nil }
|
||||
return e.getSocialServicesContextValue(parts[1], intake)
|
||||
case "hospitality_context":
|
||||
if len(parts) < 2 || intake.HospitalityContext == nil { return nil }
|
||||
return e.getHospitalityContextValue(parts[1], intake)
|
||||
case "insurance_context":
|
||||
if len(parts) < 2 || intake.InsuranceContext == nil { return nil }
|
||||
return e.getInsuranceContextValue(parts[1], intake)
|
||||
case "investment_context":
|
||||
if len(parts) < 2 || intake.InvestmentContext == nil { return nil }
|
||||
return e.getInvestmentContextValue(parts[1], intake)
|
||||
case "defense_context":
|
||||
if len(parts) < 2 || intake.DefenseContext == nil { return nil }
|
||||
return e.getDefenseContextValue(parts[1], intake)
|
||||
case "supply_chain_context":
|
||||
if len(parts) < 2 || intake.SupplyChainContext == nil { return nil }
|
||||
return e.getSupplyChainContextValue(parts[1], intake)
|
||||
case "facility_context":
|
||||
if len(parts) < 2 || intake.FacilityContext == nil { return nil }
|
||||
return e.getFacilityContextValue(parts[1], intake)
|
||||
case "sports_context":
|
||||
if len(parts) < 2 || intake.SportsContext == nil { return nil }
|
||||
return e.getSportsContextValue(parts[1], intake)
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -719,6 +746,97 @@ func (e *PolicyEngine) getManufacturingContextValue(field string, intake *UseCas
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *PolicyEngine) getAgricultureContextValue(field string, intake *UseCaseIntake) interface{} {
|
||||
if intake.AgricultureContext == nil { return nil }
|
||||
switch field {
|
||||
case "pesticide_ai": return intake.AgricultureContext.PesticideAI
|
||||
case "animal_welfare": return intake.AgricultureContext.AnimalWelfare
|
||||
case "environmental_data": return intake.AgricultureContext.EnvironmentalData
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *PolicyEngine) getSocialServicesContextValue(field string, intake *UseCaseIntake) interface{} {
|
||||
if intake.SocialServicesCtx == nil { return nil }
|
||||
switch field {
|
||||
case "vulnerable_groups": return intake.SocialServicesCtx.VulnerableGroups
|
||||
case "benefit_decision": return intake.SocialServicesCtx.BenefitDecision
|
||||
case "case_management": return intake.SocialServicesCtx.CaseManagement
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *PolicyEngine) getHospitalityContextValue(field string, intake *UseCaseIntake) interface{} {
|
||||
if intake.HospitalityContext == nil { return nil }
|
||||
switch field {
|
||||
case "guest_profiling": return intake.HospitalityContext.GuestProfiling
|
||||
case "dynamic_pricing": return intake.HospitalityContext.DynamicPricing
|
||||
case "review_manipulation": return intake.HospitalityContext.ReviewManipulation
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *PolicyEngine) getInsuranceContextValue(field string, intake *UseCaseIntake) interface{} {
|
||||
if intake.InsuranceContext == nil { return nil }
|
||||
switch field {
|
||||
case "risk_classification": return intake.InsuranceContext.RiskClassification
|
||||
case "claims_automation": return intake.InsuranceContext.ClaimsAutomation
|
||||
case "premium_calculation": return intake.InsuranceContext.PremiumCalculation
|
||||
case "fraud_detection": return intake.InsuranceContext.FraudDetection
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *PolicyEngine) getInvestmentContextValue(field string, intake *UseCaseIntake) interface{} {
|
||||
if intake.InvestmentContext == nil { return nil }
|
||||
switch field {
|
||||
case "algo_trading": return intake.InvestmentContext.AlgoTrading
|
||||
case "investment_advice": return intake.InvestmentContext.InvestmentAdvice
|
||||
case "robo_advisor": return intake.InvestmentContext.RoboAdvisor
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *PolicyEngine) getDefenseContextValue(field string, intake *UseCaseIntake) interface{} {
|
||||
if intake.DefenseContext == nil { return nil }
|
||||
switch field {
|
||||
case "dual_use": return intake.DefenseContext.DualUse
|
||||
case "export_controlled": return intake.DefenseContext.ExportControlled
|
||||
case "classified_data": return intake.DefenseContext.ClassifiedData
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *PolicyEngine) getSupplyChainContextValue(field string, intake *UseCaseIntake) interface{} {
|
||||
if intake.SupplyChainContext == nil { return nil }
|
||||
switch field {
|
||||
case "supplier_monitoring": return intake.SupplyChainContext.SupplierMonitoring
|
||||
case "human_rights_check": return intake.SupplyChainContext.HumanRightsCheck
|
||||
case "environmental_impact": return intake.SupplyChainContext.EnvironmentalImpact
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *PolicyEngine) getFacilityContextValue(field string, intake *UseCaseIntake) interface{} {
|
||||
if intake.FacilityContext == nil { return nil }
|
||||
switch field {
|
||||
case "access_control_ai": return intake.FacilityContext.AccessControlAI
|
||||
case "occupancy_tracking": return intake.FacilityContext.OccupancyTracking
|
||||
case "energy_optimization": return intake.FacilityContext.EnergyOptimization
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *PolicyEngine) getSportsContextValue(field string, intake *UseCaseIntake) interface{} {
|
||||
if intake.SportsContext == nil { return nil }
|
||||
switch field {
|
||||
case "athlete_tracking": return intake.SportsContext.AthleteTracking
|
||||
case "fan_profiling": return intake.SportsContext.FanProfiling
|
||||
case "doping_detection": return intake.SportsContext.DopingDetection
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *PolicyEngine) getDataTypeValue(field string, intake *UseCaseIntake) interface{} {
|
||||
switch field {
|
||||
case "personal_data":
|
||||
|
||||
Reference in New Issue
Block a user