Status: Done (2026-04-04)
Priority: Medium
Component: tools/wsl-manager/wsl-manager.ps1, lib/wsl/manager.ps1, bin/install.ps1
Depends on: SC-016a
Summary:
As a tool developer, I want each tool to declare its own dependencies and support installing them via -InstallDeps, so that dependency knowledge lives with the tool rather than in the central installer.
Description:
Currently, dependency knowledge is split: install.ps1 hardcodes Install-PowerShellModule for PwshSpectreConsole, while manager.ps1 throws if the module is missing. This coupling means adding a new tool with dependencies requires editing the central installer.
Phase 1 moves dependency declaration into the tool itself:
manager.ps1declares its dependencies as a data structurewsl-manager.ps1gains an-InstallDepsswitch that installs declared dependenciesinstall.ps1delegates towsl-manager.ps1 -InstallDepsinstead of callingInstall-PowerShellModuledirectlymanager.ps1replaces the hardthrowwith an interactive prompt offering to install missing dependencies (auto-detect mode)
-
manager.ps1declares dependencies in a$script:Dependenciesdata structure -
wsl-manager.ps1accepts-InstallDepsswitch and installs declared dependencies -
install.ps1installs PwshSpectreConsole viaInstall-PwshSpectreDependency(direct delegation not possible — install.ps1 runs under PS 5.1) - Interactive auto-detect: missing dependencies prompt user to install (with
Get-UserConfirmation) - CI/test environments skip auto-detect (existing guard preserved)
- All existing tests pass; new behavior has Pester tests