Skip to content

Add Windows agent surface install script#2

Open
DanielZ818 wants to merge 2 commits into
Kevin-Mok:masterfrom
DanielZ818:feat/windows-agent-surface-script
Open

Add Windows agent surface install script#2
DanielZ818 wants to merge 2 commits into
Kevin-Mok:masterfrom
DanielZ818:feat/windows-agent-surface-script

Conversation

@DanielZ818

Copy link
Copy Markdown

Summary / Why This Matters

This branch fixes a Windows-hostile tracked filename and then adds a Windows-first script for globally applying this repo's agent surface through chezmoi.

Without the filename cleanup, Windows Git operations against the repo can fail on the newline-containing spotifyvis backup path. With that fixed, the new PowerShell wrapper gives Windows users a documented way to install/apply the repo-managed agent surface, bootstrap chezmoi if needed, and dry-run or elevate the apply flow when symlink-managed targets require it.

What Changed

  • Rename the tracked spotifyvis backup file to remove the accidental newline suffix while keeping the empty file content unchanged.
  • Add scripts/executable_install-agent-surface.ps1 as a Windows PowerShell wrapper that:
    • treats this repo as the chezmoi source directory
    • installs chezmoi on demand with -InstallChezmoi
    • bootstraps a missing chezmoi config from the tracked template
    • supports -DryRun via chezmoi -S <repo> apply -n -v
    • relaunches with UAC elevation for real apply runs when needed on Windows
    • surfaces clearer guidance when Windows symlink privileges still block the apply
  • Update docs/smoke-tests.md with a reusable Windows smoke check for the new install/apply flow.
  • Add plans/windows install agent surface script plan.md to document the final process and script contract.

How To Smoke Test

  1. In a Windows checkout of this repo, run:
    powershell -NoProfile -File .\scripts\executable_install-agent-surface.ps1 -DryRun
  2. Confirm the script treats the checked-out repo as the chezmoi source and runs the equivalent of:
    chezmoi -S <repo> apply -n -v
  3. If chezmoi is missing, rerun with:
    powershell -NoProfile -File .\scripts\executable_install-agent-surface.ps1 -InstallChezmoi
  4. Run the real apply path and accept the UAC prompt on Windows when it appears.
  5. If the apply still fails on the managed superpowers symlink target, enable Windows Developer Mode or otherwise grant symlink privileges, then rerun.

Tests Written / Verification Run

Automated tests written or updated:

  • No automated tests were added.

Commands run:

  • git status --short
  • git branch --show-current
  • git remote -v
  • git merge-base HEAD origin/master
  • git log --oneline origin/master..HEAD
  • git diff --stat origin/master...HEAD
  • git diff --name-only origin/master...HEAD
  • git diff origin/master...HEAD -- docs/smoke-tests.md scripts/executable_install-agent-surface.ps1 "plans/windows install agent surface script plan.md"
  • git diff origin/master...HEAD -- dot_config/fish/spotifyvis.bak
  • Windows-side validation of the PowerShell wrapper, including help output, dry-run behavior, chezmoi install/bootstrap behavior, and Windows symlink/UAC edge cases during development

Commands not run:

  • No end-to-end successful real apply was captured on Windows after the final branch rebuild in this WSL clone.

Known failing suites or unrelated failures:

  • Not applicable.

Follow-Up / Next Steps

  • Consider capturing a final successful elevated Windows apply after enabling any required symlink privileges or Developer Mode.
  • If desired, add a short README mention later for the Windows install/apply path once the workflow is settled.

Reviewer Focus / What To Look For

  • Confirm the filename cleanup is the right long-term fix for Windows Git compatibility.
  • Review the PowerShell wrapper behavior for Windows install/apply ergonomics, especially chezmoi bootstrap, UAC relaunch, and symlink-permission messaging.
  • Check that the smoke-test and plan docs match the actual script contract.

Risks, Caveats, Known Failures, And Rollback

  • The script is Windows-specific and assumes PowerShell plus chezmoi usage from a repo checkout.
  • Real applies on Windows can still depend on symlink privileges for the managed superpowers target.
  • Rollback is straightforward: revert the two commits in this branch to remove the filename cleanup and the Windows agent-surface script/docs.

UI Screenshots / Live Links

  • Not applicable.

- rename the tracked spotifyvis backup file to remove the accidental newline suffix
- keep the empty backup file content unchanged while making the path safe for Windows Git operations
- add a PowerShell wrapper that applies this repo globally with chezmoi
- bootstrap chezmoi installation and config when needed on Windows
- add dry-run, UAC elevation flow, and Windows-specific symlink guidance
- document the workflow in the agent surface plan and smoke tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant