#Requires -Version 7.2 <# Module loader. Dot-sources every function file under src/. Load order is layer-by-layer so a file may rely on functions from a layer loaded before it. Note for tests: offline suites (rule engine, normalization, configuration) deliberately dot-source individual layer folders rather than importing this module, because importing the manifest pulls in Microsoft.Graph.Authentication. Keeping the pure layers loadable without that module is the practical proof of constitution Principle IV. #> $ErrorActionPreference = 'Stop' $layerOrder = @( 'Normalization' 'Configuration' 'RuleEngine' 'Authentication' 'DataProviders' 'Persistence' 'Presentation' 'Engine' 'Audit' ) foreach ($layer in $layerOrder) { $layerPath = Join-Path $PSScriptRoot "src/$layer" if (-not (Test-Path $layerPath)) { continue } foreach ($file in Get-ChildItem -Path $layerPath -Filter '*.ps1' -File | Sort-Object Name) { . $file.FullName } }