Skip to content

Application Implementation Results

CommandInput VO CompositionCore FlowResult
RegisterModelCommandApplyT(Name, Version, Purpose)VO composition -> risk classification -> model creationModelId
ClassifyModelRiskCommandRiskTier.CreateModel lookup -> reclassification -> update—
CreateDeploymentCommandApplyT(Url, Env, Drift)VO composition -> model confirmation -> deployment creationDeploymentId
SubmitDeploymentForReviewCommand—Deployment/model lookup -> eligibility verification -> submit—
ActivateDeploymentCommand—Deployment/assessment lookup -> guard passage -> activate—
QuarantineDeploymentCommand—Deployment lookup -> quarantine—
InitiateAssessmentCommand—Model/deployment lookup -> assessment creationAssessmentId
ReportIncidentCommandApplyT(Severity, Description)VO composition -> deployment lookup -> incident creationIncidentId
QueryPortFilter/Options
GetModelByIdQueryIModelDetailQueryIncludes deployment/assessment/incident aggregation
SearchModelsQueryIAIModelQueryRisk tier filter, pagination
GetDeploymentByIdQueryIDeploymentDetailQuery—
SearchDeploymentsQueryIDeploymentQueryStatus/environment filter, pagination
GetAssessmentByIdQueryIAssessmentRepositoryIncludes assessment criteria
GetIncidentByIdQueryIIncidentRepository—
SearchIncidentsQueryIIncidentQuerySeverity/status filter, pagination
Event HandlerTrigger EventConditionAction
QuarantineDeploymentOnCriticalIncidentHandlerModelIncident.ReportedEventSeverity.RequiresQuarantineAuto-quarantine deployment
InitiateAssessmentOnRiskUpgradeHandlerAIModel.RiskClassifiedEventNewRiskTier.RequiresComplianceAssessmentCreate assessments for active deployments
PortBase CRUDCustom Methods
IAIModelRepositoryGetById, Create, Update, DeleteExists(spec), GetByIdIncludingDeleted(id)
IDeploymentRepositoryGetById, Create, Update, DeleteExists(spec), Find(spec)
IAssessmentRepositoryGetById, Create, Update, DeleteExists(spec), Find(spec)
IIncidentRepositoryGetById, Create, Update, DeleteExists(spec), Find(spec)
PortRole
IAIModelQueryModel list search
IModelDetailQueryModel detail (including aggregated data)
IDeploymentQueryDeployment list search
IDeploymentDetailQueryDeployment detail
IIncidentQueryIncident list search
PortReturn TypeIO Pattern
IModelHealthCheckServiceFinT<IO, HealthCheckResult>Timeout + Catch
IModelMonitoringServiceFinT<IO, DriftReport>Retry + Schedule
IParallelComplianceCheckServiceFinT<IO, ComplianceCheckReport>Fork + awaitAll
IModelRegistryServiceFinT<IO, ModelRegistryEntry>Bracket
AiGovernance.Application/
├── Using.cs
├── AssemblyReference.cs
└── Usecases/
├── Models/
│ ├── IAIModelQuery.cs
│ ├── IModelDetailQuery.cs
│ ├── Commands/
│ │ ├── RegisterModelCommand.cs
│ │ └── ClassifyModelRiskCommand.cs
│ └── Queries/
│ ├── GetModelByIdQuery.cs
│ └── SearchModelsQuery.cs
├── Deployments/
│ ├── IDeploymentQuery.cs
│ ├── IDeploymentDetailQuery.cs
│ ├── IModelHealthCheckService.cs
│ ├── IModelMonitoringService.cs
│ ├── Commands/
│ │ ├── CreateDeploymentCommand.cs
│ │ ├── SubmitDeploymentForReviewCommand.cs
│ │ ├── ActivateDeploymentCommand.cs
│ │ └── QuarantineDeploymentCommand.cs
│ └── Queries/
│ ├── GetDeploymentByIdQuery.cs
│ └── SearchDeploymentsQuery.cs
├── Assessments/
│ ├── Commands/
│ │ └── InitiateAssessmentCommand.cs
│ ├── Queries/
│ │ └── GetAssessmentByIdQuery.cs
│ └── EventHandlers/
│ └── InitiateAssessmentOnRiskUpgradeHandler.cs
└── Incidents/
├── IIncidentQuery.cs
├── Commands/
│ └── ReportIncidentCommand.cs
├── Queries/
│ ├── GetIncidentByIdQuery.cs
│ └── SearchIncidentsQuery.cs
└── EventHandlers/
└── QuarantineDeploymentOnCriticalIncidentHandler.cs
PatternApplication CountExample
ApplyT (VO parallel composition)4RegisterModel, CreateDeployment, ReportIncident
FinT LINQ (from…in)8All Command Handlers
guard (conditional failure)1ActivateDeploymentCommand
MustSatisfyValidation8+All Validators
IDomainEventHandler2QuarantineDeployment, InitiateAssessment
Nested Class15All Commands/Queries

268 tests run across 2 assemblies for the entire solution. Application layer code is validated together in unit tests (Architecture rules) and integration tests (Endpoint E2E).

In the next step, we define the Adapter layer implementing these ports in Adapter Technical Requirements.