feat(iace): add data-driven Architektur & Datenfluss explainer tab
Adds an auditor-facing view of the IACE engine: a clickable 10-stage pipeline flow (Grenzen-Formular → ParseNarrative → Pattern-Gates → Relevanz → Caps → Gefährdungen → Maßnahmen → Risiko → Normen → Matrix), plus live library counts, the data-source/license register (incl. the DIN/Beuth + DGUV exclusions), and the norm-matching logic that reconciles DIN/ISO/OSHA machine-type vocabulary via canonicalMachineType folding. Backend: BuildArchitecture() with LIVE counts so the diagram can never drift; GET /iace/architecture; collectAllNorms() extracted from SuggestNorms as the single source of truth for the norm-library count. Frontend: useArchitecture hook + page + new IACE nav tab. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -23,7 +23,9 @@ type NormSuggestionResult struct {
|
||||
// identified hazard categories, and component/energy tags.
|
||||
// A-norms are always included (they apply universally). B/C norms are matched
|
||||
// by machine type (confidence 0.9), hazard category (0.8), or tag (0.7).
|
||||
func SuggestNorms(machineType string, hazardCategories []string, tags []string) *NormSuggestionResult {
|
||||
// collectAllNorms aggregates every A/B/C norm source into one slice. Single
|
||||
// source of truth used by SuggestNorms and the architecture self-description.
|
||||
func collectAllNorms() []NormReference {
|
||||
allNorms := GetNormsLibrary()
|
||||
allNorms = append(allNorms, GetExtendedB2Norms()...)
|
||||
allNorms = append(allNorms, GetCNormsLibrary()...)
|
||||
@@ -48,6 +50,11 @@ func SuggestNorms(machineType string, hazardCategories []string, tags []string)
|
||||
allNorms = append(allNorms, GetWave3dExtCNorms()...)
|
||||
allNorms = append(allNorms, GetWave3dHvacCNorms()...)
|
||||
allNorms = append(allNorms, GetFinalCNorms()...)
|
||||
return allNorms
|
||||
}
|
||||
|
||||
func SuggestNorms(machineType string, hazardCategories []string, tags []string) *NormSuggestionResult {
|
||||
allNorms := collectAllNorms()
|
||||
|
||||
// Build lookup sets for efficient matching
|
||||
hazardSet := toSet(hazardCategories)
|
||||
|
||||
Reference in New Issue
Block a user