Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 1.82 KB

File metadata and controls

31 lines (23 loc) · 1.82 KB

<- Back to Backlog

[SC-033] ✅ DONE - Tool-level dependency declaration and installation

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.ps1 declares its dependencies as a data structure
  • wsl-manager.ps1 gains an -InstallDeps switch that installs declared dependencies
  • install.ps1 delegates to wsl-manager.ps1 -InstallDeps instead of calling Install-PowerShellModule directly
  • manager.ps1 replaces the hard throw with an interactive prompt offering to install missing dependencies (auto-detect mode)

Acceptance Criteria

  • manager.ps1 declares dependencies in a $script:Dependencies data structure
  • wsl-manager.ps1 accepts -InstallDeps switch and installs declared dependencies
  • install.ps1 installs PwshSpectreConsole via Install-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

<- Back to Backlog