feat(gap): Regulatory Gap Analysis Engine — Phase A Backend

Product Profile → Regulatory Classification → MC Gap Assessment → Priority List.

- 12 regulations supported (CRA, AI Act, NIS2, DSGVO, Data Act, MiCA, PSD2, AML, MDR, Machinery, TDDDG, LkSG)
- Scope signal extraction from product profile
- Priority scoring: Severity × Deadline × Dependency
- 5 industry templates (IoT, Exchange, Cobot, SaaS, Medical)
- 8 API endpoints under /sdk/v1/gap/
- DB migration for gap_projects table
- Full build passes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-05-10 23:11:30 +02:00
parent 58f370f4ff
commit dabc2358ab
9 changed files with 1396 additions and 1 deletions
+17
View File
@@ -26,6 +26,7 @@ func registerRoutes(
trainingHandlers *handlers.TrainingHandlers,
whistleblowerHandlers *handlers.WhistleblowerHandlers,
iaceHandler *handlers.IACEHandler,
gapHandler *handlers.GapHandler,
maximizerHandlers *handlers.MaximizerHandlers,
regulatoryNewsHandlers *handlers.RegulatoryNewsHandlers,
) {
@@ -48,6 +49,7 @@ func registerRoutes(
registerTrainingRoutes(v1, trainingHandlers)
registerWhistleblowerRoutes(v1, whistleblowerHandlers)
registerIACERoutes(v1, iaceHandler)
registerGapRoutes(v1, gapHandler)
registerMaximizerRoutes(v1, maximizerHandlers)
v1.GET("/regulatory-news", regulatoryNewsHandlers.GetNews)
}
@@ -362,6 +364,7 @@ func registerIACERoutes(v1 *gin.RouterGroup, h *handlers.IACEHandler) {
iaceRoutes.GET("/evidence-types", h.ListEvidenceTypes)
iaceRoutes.GET("/protective-measures-library", h.ListProtectiveMeasures)
iaceRoutes.GET("/failure-modes", h.ListFailureModes)
iaceRoutes.GET("/operational-states", h.ListOperationalStates)
iaceRoutes.GET("/component-library", h.ListComponentLibrary)
iaceRoutes.GET("/energy-sources", h.ListEnergySources)
iaceRoutes.GET("/tags", h.ListTags)
@@ -457,3 +460,17 @@ func registerMaximizerRoutes(v1 *gin.RouterGroup, h *handlers.MaximizerHandlers)
m.GET("/dimensions", h.GetDimensionSchema)
}
}
func registerGapRoutes(v1 *gin.RouterGroup, h *handlers.GapHandler) {
g := v1.Group("/gap")
{
g.POST("/projects", h.CreateProject)
g.GET("/projects", h.ListProjects)
g.GET("/projects/:id", h.GetProject)
g.POST("/projects/:id/analyze", h.AnalyzeProject)
g.POST("/analyze", h.QuickAnalyze)
g.GET("/templates", h.GetTemplates)
g.GET("/templates/:key", h.GetTemplate)
g.GET("/regulations", h.GetRegulations)
}
}