Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .copilot/skills/git-workflow/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,6 @@ cd ../main-project && npm link lib-sdk
# Go
# Use replace directive in go.mod:
# replace github.com/org/lib-sdk => ../lib-sdk

# Python
cd ../lib-sdk && uv pip install -e .
```

**Important:** Remove local links before committing. `npm link` and `go replace` are dev-only -- CI must use published packages or PR-specific refs.
Expand Down
10 changes: 0 additions & 10 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ bash setup.sh
`setup.sh` is the repo's Unix entry point. It detects the OS (Linux, macOS, or WSL) and routes to the appropriate setup script. Inside a Dev Container or Codespace the environment is Linux (Ubuntu), so it will run `scripts/linux/setup.sh`, which:

- Installs **zsh** and sets it as the default shell
- Installs **uv** (Python package manager)
- Installs **nvm** and the latest LTS Node.js
- Installs **gh** (GitHub CLI)
- Installs **GitHub Copilot CLI** extension for gh
Expand Down Expand Up @@ -124,12 +123,3 @@ Set these in GitHub -> Settings -> Codespaces -> Secrets:
| `GIT_AUTHOR_EMAIL` | Your email for git commits | `45021016+primetimetank21@users.noreply.github.com` |

These are applied automatically on `postCreateCommand` when the devcontainer starts.

---

## Python Package Management

Use `uv` instead of `pip` for all Python tooling:
- CLI tools: `uv tool install <package>`
- Libraries: `uv pip install <package>`
- Never use `pip install` directly.
37 changes: 0 additions & 37 deletions .github/workflows/e2e-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ jobs:

echo "--- Python toolchain ---"
export PATH="$HOME/.local/bin:$PATH"
uv --version
python --version || python3 --version

echo "--- GitHub CLI ---"
Expand All @@ -72,9 +71,6 @@ jobs:
echo "--- Editors ---"
vim --version | head -1

echo "--- Multiplexer ---"
tmux -V

echo "--- Dotfiles ---"
test -f "$HOME/.zshrc" && echo ".zshrc exists"
test -f "$HOME/.bashrc" && echo ".bashrc exists"
Expand All @@ -89,11 +85,6 @@ jobs:
exit 1
fi

echo "--- squad-cli ---"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
squad --version | head -1

echo "All Linux assertions passed"
'

Expand All @@ -120,10 +111,7 @@ jobs:
export PATH="$HOME/.local/bin:$PATH"

echo "--- Post-idempotency assertions ---"
tmux -V

node --version
uv --version
gh --version | head -1
echo "Post-idempotency assertions passed (Linux)"
'
Expand Down Expand Up @@ -209,7 +197,6 @@ jobs:

echo "--- Python toolchain ---"
export PATH="$HOME/.local/bin:$PATH"
uv --version
python --version || python3 --version

echo "--- GitHub CLI ---"
Expand All @@ -218,11 +205,6 @@ jobs:
echo "--- Editors ---"
vim --version | head -1

echo "--- Multiplexer ---"
tmux -V



echo "--- Dotfiles ---"
test -f "$HOME/.zshrc" && echo ".zshrc exists"
test -f "$HOME/.bashrc" && echo ".bashrc exists"
Expand All @@ -237,11 +219,6 @@ jobs:
exit 1
fi

echo "--- squad-cli ---"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
squad --version | head -1

echo "All macOS assertions passed"
'

Expand All @@ -268,10 +245,7 @@ jobs:
export PATH="$HOME/.local/bin:$PATH"

echo "--- Post-idempotency assertions ---"
tmux -V

node --version
uv --version
gh --version | head -1
echo "Post-idempotency assertions passed (macOS)"
'
Expand Down Expand Up @@ -369,18 +343,12 @@ jobs:
Assert-Command 'node' '--version'
Assert-Command 'npm' '--version'

Write-Host "--- Python toolchain ---"
Assert-Command 'uv' '--version'

Write-Host "--- GitHub CLI ---"
Assert-Command 'gh' '--version'

Write-Host "--- Editors ---"
Assert-Command 'vim' '--version'

Write-Host "--- Multiplexer ---"
Assert-Command 'psmux' '--version'

Write-Host "--- Git hooks ---"
$hooksPath = & git config core.hooksPath 2>$null
if ($hooksPath -eq 'hooks') {
Expand All @@ -399,9 +367,6 @@ jobs:
$failures += 'profile'
}

Write-Host "--- squad-cli ---"
Assert-Command 'squad' '--version'

if ($failures.Count -gt 0) {
Write-Host "`nFailed assertions: $($failures -join ', ')"
exit 1
Expand Down Expand Up @@ -447,9 +412,7 @@ jobs:
}

Write-Host "--- Post-idempotency assertions ---"
Assert-Command 'psmux' '--version'
Assert-Command 'node' '--version'
Assert-Command 'uv' '--version'
Assert-Command 'gh' '--version'

if ($failures.Count -gt 0) {
Expand Down
57 changes: 29 additions & 28 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,49 +65,40 @@ jobs:
- name: Validate zsh installed
run: |
if ! command -v zsh &>/dev/null; then
echo "❌ FAIL: zsh not found on PATH"
exit 1
fi
echo "✅ zsh: $(zsh --version)"

- name: Validate uv installed
run: |
export PATH="$HOME/.local/bin:$PATH"
if ! command -v uv &>/dev/null; then
echo "❌ FAIL: uv not found on PATH"
echo "FAIL: zsh not found on PATH"
exit 1
fi
echo "✅ uv: $(uv --version)"
echo "OK: zsh: $(zsh --version)"

- name: Validate nvm and Node.js installed
run: |
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
if ! command -v nvm &>/dev/null; then
echo "❌ FAIL: nvm not available"
echo "FAIL: nvm not available"
exit 1
fi
if ! command -v node &>/dev/null; then
echo "❌ FAIL: node not found on PATH"
echo "FAIL: node not found on PATH"
exit 1
fi
echo "✅ nvm: $(nvm --version)"
echo "✅ node: $(node --version)"
echo "✅ npm: $(npm --version)"
echo "OK: nvm: $(nvm --version)"
echo "OK: node: $(node --version)"
echo "OK: npm: $(npm --version)"

- name: Validate gh CLI installed
run: |
if ! command -v gh &>/dev/null; then
echo "❌ FAIL: gh not found on PATH"
echo "FAIL: gh not found on PATH"
exit 1
fi
echo "✅ gh: $(gh --version | head -1)"
echo "OK: gh: $(gh --version | head -1)"

- name: Test idempotency (run setup a second time)
run: |
echo "--- Running setup script a second time to test idempotency ---"
bash setup.sh
echo "✅ Second run completed without errors"
echo "OK: Second run completed without errors"

- name: Run alias unit tests
run: |
Expand All @@ -119,6 +110,9 @@ jobs:
chmod +x tests/test_alias_parity.sh
bash tests/test_alias_parity.sh

- name: Run isolated tool retirement regressions
run: bash tests/test_tool_retirement.sh

- name: Check shutdown helper syntax (Bash and Zsh)
run: |
bash --noprofile --norc -n config/dotfiles/.aliases
Expand Down Expand Up @@ -192,15 +186,6 @@ jobs:
fi
echo "zsh: $(zsh --version)"

- name: Validate uv installed
run: |
export PATH="$HOME/.local/bin:$PATH"
if ! command -v uv &>/dev/null; then
echo "FAIL: uv not found on PATH"
exit 1
fi
echo "uv: $(uv --version)"

- name: Validate nvm and Node.js installed
run: |
export NVM_DIR="$HOME/.nvm"
Expand Down Expand Up @@ -231,6 +216,12 @@ jobs:
bash setup.sh
echo "Second run completed without errors"

- name: Run isolated alias and retirement regressions (system Bash 3.2)
run: |
/bin/bash tests/test_aliases.sh
/bin/bash tests/test_alias_parity.sh
/bin/bash tests/test_tool_retirement.sh

- name: Check shutdown helper syntax (system Bash 3.2 and Zsh)
run: |
/bin/bash --version
Expand Down Expand Up @@ -297,6 +288,9 @@ jobs:
- name: Lint isolated shutdown helper harness
run: shellcheck tests/test_shutdown_helpers.sh

- name: Lint isolated alias and retirement regressions
run: shellcheck tests/test_aliases.sh tests/test_tool_retirement.sh

- name: Run Bash flag compatibility gates
run: bash tests/test_setup_flags.sh

Expand Down Expand Up @@ -352,6 +346,9 @@ jobs:
- name: Run TUI and resolver tests (pwsh)
run: pwsh tests/test_tui_pwsh.ps1

- name: Run isolated tool retirement regressions (pwsh)
run: pwsh -NoProfile -File tests/test_tool_retirement.ps1

validate-ps51:
name: Validate PowerShell 5.1 Compatibility
runs-on: windows-latest
Expand Down Expand Up @@ -442,6 +439,10 @@ jobs:
run: |
powershell -ExecutionPolicy Bypass -File tests\test_windows_setup.ps1

- name: Run isolated tool retirement regressions (PS 5.1)
shell: powershell
run: powershell -NoProfile -ExecutionPolicy Bypass -File tests\test_tool_retirement.ps1

- name: Run PS 5.1 flag compatibility gates
shell: powershell
run: |
Expand Down
2 changes: 0 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
nodejs 22.23.2
nvm 0.39.7
nvm-windows 1.2.2
uv 0.4.18
copilot-cli 1.0.69
squad-cli 0.10.0
gh 2.92.0
delta 0.19.2
lazygit 0.63.0
Expand Down
34 changes: 14 additions & 20 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Run `bash setup.sh` (Unix) or `powershell -File setup.ps1` (Windows) and walk aw
dev-setup/
|---- setup.sh # Entry point -- Unix (Linux / macOS / WSL); thin router
|---- setup.ps1 # Entry point -- Windows (PowerShell); thin router
|---- .tool-versions # asdf-style pinned versions (node, nvm, uv, gh, copilot-cli, pi, herdr)
|---- .tool-versions # asdf-style pinned versions (node, nvm, gh, copilot-cli, pi, herdr)
|---- .gitattributes # eol=lf for *.sh / *.md / *.yml; eol=crlf for *.ps1 / *.psm1 / *.psd1
|---- ARCHITECTURE.md # This file
|---- CHANGELOG.md # Keep-a-Changelog format
Expand All @@ -47,7 +47,6 @@ dev-setup/
| | |---- herdr.sh # Install Herdr (pin from .tool-versions)
| | |---- nvm.sh # Install nvm + Node (pin from .tool-versions)
| | |---- pi.sh # Install pi CLI (pin from .tool-versions)
| | |---- uv.sh # Install uv Python package manager (pin from .tool-versions)
| | `---- zsh.sh # Install zsh + set as default shell
| |
| `---- windows/
Expand All @@ -67,8 +66,6 @@ dev-setup/
| |---- nvm.ps1 # nvm-windows + Node (pin from .tool-versions)
| |---- pi.ps1 # pi CLI (pin from .tool-versions)
| |---- profile.ps1 # PowerShell profile injection (PS 5.1 + PS 7+ paths)
| |---- psmux.ps1 # psmux terminal multiplexer (Windows tmux alias)
| |---- uv.ps1 # uv Python package manager (pin from .tool-versions)
| `---- vim.ps1 # Vim editor
|
|---- config/
Expand Down Expand Up @@ -289,7 +286,7 @@ Reference implementations: `scripts/linux/tools/nvm.sh` and `scripts/windows/too
| Idempotency | `Get-Command <tool> -ErrorAction SilentlyContinue` before installing |
| Logging | Dot-source `scripts/windows/lib/logging.ps1`; call `Write-Info`, `Write-Ok`, `Write-Warn`, `Write-Err` |
| Exit-code discipline | After any external install, call `Assert-LastExit -ToolName <name>` (use `-AllowedExitCodes` for cases like winget `ALREADY_INSTALLED`) |
| PATH refresh | After an install mutates PATH, dot-source `scripts/windows/lib/path.ps1` and call `Refresh-SessionPath` so `node`, `uv`, `gh`, etc. become callable in the same session |
| PATH refresh | After an install mutates PATH, dot-source `scripts/windows/lib/path.ps1` and call `Refresh-SessionPath` so `node`, `gh`, etc. become callable in the same session |
| Version pinning | Read from `.tool-versions` via `Get-ToolVersion` (dot-source `scripts/lib/Read-ToolVersion.ps1`); never hard-code versions |
| Install method | Prefer `winget`; fall back to `scoop` or direct download (see `nvm.ps1` for the portable-zip pattern) |
| Sourcing | `setup.ps1` dot-sources each `tools/*.ps1`; tool functions live in the parent scope and are invoked by name. Tool scripts re-dot-source their own `lib/` files so they remain runnable standalone. |
Expand Down Expand Up @@ -343,7 +340,7 @@ The default Linux/macOS/WSL tools run in this order (defined by `DEFAULT_TOOLS`
`scripts/linux/setup.sh`):

```
prereqs -> zsh -> uv -> nvm -> gh -> auth -> copilot-cli -> squad-cli -> dotfiles -> git-hook
prereqs -> zsh -> nvm -> gh -> auth -> copilot-cli -> dotfiles -> git-hook
```

`copilot-cli` depends on `gh` being installed and (ideally) authenticated. The `auth` script handles interactive GitHub CLI authentication.
Expand All @@ -359,7 +356,7 @@ does **not** drive dependencies. `$DefaultTools` is the authoritative default or
The default chain is:

```
winget-check -> git -> uv -> nvm -> gh -> auth -> vim -> psmux -> copilot -> squad-cli -> dotfiles -> profile -> git-hook
winget-check -> git -> nvm -> gh -> auth -> vim -> copilot -> dotfiles -> profile -> git-hook
```

Mapped to registry functions and the `tools/*.ps1` module that defines each:
Expand All @@ -368,17 +365,14 @@ Mapped to registry functions and the `tools/*.ps1` module that defines each:
|---|-------------------|---------------|--------------------|
| 1 | `Invoke-WingetGate` | `tools/winget-check.ps1` | `tools/prereqs.sh` |
| 2 | `Install-Git` | `tools/git.ps1` | (package prerequisite) |
| 3 | `Install-Uv` | `tools/uv.ps1` | `tools/uv.sh` |
| 4 | `Install-Nvm` | `tools/nvm.ps1` | `tools/nvm.sh` |
| 5 | `Install-GhCli` | `tools/gh.ps1` | `tools/gh.sh` |
| 6 | `Invoke-GhAuth` | `tools/auth.ps1` | `tools/auth.sh` |
| 7 | `Install-Vim` | `tools/vim.ps1` | (platform addition) |
| 8 | `Install-Psmux` | `tools/psmux.ps1` | (tmux equivalent) |
| 9 | `Install-CopilotCli` | `tools/copilot.ps1` | `tools/copilot-cli.sh` |
| 10 | `Install-SquadCli` | `tools/squad-cli.ps1` | `tools/squad-cli.sh` |
| 11 | `Install-Dotfiles` | `tools/dotfiles.ps1` | `tools/dotfiles.sh` |
| 12 | `Write-PowerShellProfile` | `tools/profile.ps1` | (PowerShell profile finalizer) |
| 13 | `Install-GitHook` | `tools/git-hook.ps1` | `tools/git-hook.sh` |
| 3 | `Install-Nvm` | `tools/nvm.ps1` | `tools/nvm.sh` |
| 4 | `Install-GhCli` | `tools/gh.ps1` | `tools/gh.sh` |
| 5 | `Invoke-GhAuth` | `tools/auth.ps1` | `tools/auth.sh` |
| 6 | `Install-Vim` | `tools/vim.ps1` | (platform addition) |
| 7 | `Install-CopilotCli` | `tools/copilot.ps1` | `tools/copilot-cli.sh` |
| 8 | `Install-Dotfiles` | `tools/dotfiles.ps1` | `tools/dotfiles.sh` |
| 9 | `Write-PowerShellProfile` | `tools/profile.ps1` | (PowerShell profile finalizer) |
| 10 | `Install-GitHook` | `tools/git-hook.ps1` | `tools/git-hook.sh` |

Cross-platform invariants preserved from the Linux chain above:

Expand All @@ -388,7 +382,7 @@ Cross-platform invariants preserved from the Linux chain above:
Windows-specific ordering notes:

- `winget-check` runs first, then `git` -- downstream steps rely on the package manager or git.
- `vim` and `psmux` are explicit `winget` installs because Windows has no equivalent pre-installed editor/multiplexer.
- `vim` is an explicit `winget` install because Windows has no equivalent pre-installed editor.
- `dotfiles` + `profile` are Windows-specific finalizers: the Linux side rolls equivalent shell-rc work into `tools/zsh.sh` plus `config/dotfiles/install.sh`, but Windows needs a discrete PowerShell profile injection step (PS 5.1 + PS 7+ profile paths) after the dotfile templates are applied.
- `git-hook` runs last so `core.hooksPath=hooks` is set only after the working tree is in its final state.
- Registry entries absent from `$DefaultTools` are opt-in and are appended alphabetically when selected.
Expand Down Expand Up @@ -418,7 +412,7 @@ Tool versions are pinned in the repo-root [`.tool-versions`](./.tool-versions) f
- `scripts/lib/Read-ToolVersion.ps1` -- exposes `Get-ToolVersion -Name <toolname>` (PowerShell)
- `scripts/lib/read-tool-version.sh` -- same contract for POSIX shells (prints to stdout)

Currently pinned: `nodejs`, `nvm`, `nvm-windows`, `uv`, `copilot-cli`, `gh`, `pi`, `herdr`. Tool installers (e.g. `scripts/windows/tools/nvm.ps1`, `scripts/linux/tools/uv.sh`) call the library at install time so version bumps are a single-file edit.
Currently pinned: `nodejs`, `nvm`, `nvm-windows`, `copilot-cli`, `gh`, `pi`, `herdr`. Tool installers (e.g. `scripts/windows/tools/nvm.ps1`, `scripts/linux/tools/nvm.sh`) call the library at install time so version bumps are a single-file edit.

---

Expand Down
Loading
Loading