- Keep core logic in
PowerForge(C#) so it can be reused by:- PowerShell cmdlets (
PSPublishModule) - CLI (
PowerForge.Cli) - GitHub Actions / future VSCode extension
- PowerShell cmdlets (
- Keep cmdlets thin: parameter binding +
ShouldProcess+ call core service + typed output. - Prefer typed models/enums; keep
Hashtable/OrderedDictionaryonly for legacy adapters. - Avoid unsafe code:
AllowUnsafeBlocksis intentionally not enabled; if you must addunsafe, document why and where in the PR and code.
dotnet build .\\PSPublishModule.sln -c Release
- C# unit tests:
dotnet test .\\PSPublishModule.sln -c Release - Pester tests:
Invoke-Pester -Path .\\Module\\Tests -CI
- Create/extend a typed service in
PowerForge(spec/result models inPowerForge/Models). - Create/update a thin cmdlet in
PSPublishModule/Cmdletsthat calls the service. - Remove legacy PowerShell functions once replaced (avoid duplicate implementations).
- Add unit tests (xUnit) and/or Pester coverage for the public behavior.