Problem
PwrCortex currently has zero Write-Progress calls (grep confirms). Every long-running operation silently blocks or prints ad-hoc Write-Host banners. This:
- Breaks automation transcripts (progress UI is invisible to non-interactive hosts,
Write-Host is not).
- Gives no indication of liveness during multi-minute swarm runs.
- Cannot be suppressed via
$ProgressPreference.
Per PwrClaude/CLAUDE.md:
Write-Progress — use for any long-running status (X of Y, percentages, migration steps, spinners). It renders in the host's progress UI and is invisible when not interactive, so it never clutters transcripts or breaks automation.
Candidate sites
Invoke-LLMSwarm — planning, fan-out, per-task completion, synthesis. Natural X of Y with -PercentComplete as tasks finish.
Invoke-LLMAgent — turn loop (Turn 3 of $MaxTurns), tool-call execution, token usage so far.
Invoke-LLM pipeline mode — prompt N of M.
Push-LLMInput — when piping a large collection, show how many items have been buffered.
Get-LLMModuleDirectives — module scan across $env:PSModulePath can take seconds on large profiles.
- API call wait (
Private/Api.ps1) — indeterminate spinner with elapsed seconds while Invoke-RestMethod is blocked.
Conventions for this issue
- Use a distinct
-Id per nested progress (swarm outer, per-task inner).
- Use
-Activity = cmdlet name, -Status = current step, -CurrentOperation = live detail.
- Always complete with
-Completed in the outermost finally so progress clears on error/cancel.
- Do not replace
Write-Verbose — progress is for users, verbose is for diagnosis. Both can coexist.
Acceptance
Invoke-LLMSwarm -Verbose in an interactive host shows a progress bar that advances per task.
- The same command redirected to a file or run in CI produces no progress noise.
$ProgressPreference = "SilentlyContinue" silences everything.
Related
- Sibling issue: Replace Write-Host console UI with .format.ps1xml views (some of the removed
Write-Host status lines should become progress).
Problem
PwrCortex currently has zero
Write-Progresscalls (grep confirms). Every long-running operation silently blocks or prints ad-hocWrite-Hostbanners. This:Write-Hostis not).$ProgressPreference.Per
PwrClaude/CLAUDE.md:Candidate sites
Invoke-LLMSwarm— planning, fan-out, per-task completion, synthesis. NaturalX of Ywith-PercentCompleteas tasks finish.Invoke-LLMAgent— turn loop (Turn 3 of $MaxTurns), tool-call execution, token usage so far.Invoke-LLMpipeline mode — prompt N of M.Push-LLMInput— when piping a large collection, show how many items have been buffered.Get-LLMModuleDirectives— module scan across$env:PSModulePathcan take seconds on large profiles.Private/Api.ps1) — indeterminate spinner with elapsed seconds whileInvoke-RestMethodis blocked.Conventions for this issue
-Idper nested progress (swarm outer, per-task inner).-Activity= cmdlet name,-Status= current step,-CurrentOperation= live detail.-Completedin the outermostfinallyso progress clears on error/cancel.Write-Verbose— progress is for users, verbose is for diagnosis. Both can coexist.Acceptance
Invoke-LLMSwarm -Verbosein an interactive host shows a progress bar that advances per task.$ProgressPreference = "SilentlyContinue"silences everything.Related
Write-Hoststatus lines should become progress).