From cd554c3bed5f3978026bcccdb2529d70d009ec1a Mon Sep 17 00:00:00 2001 From: Darren Cheng Date: Tue, 27 Oct 2026 22:48:51 -0700 Subject: [PATCH 1/2] Update pi.dev during dots update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dots install pi only installs when pi is missing, so the binary never refreshed. Add updatePi to the update sequence (skips when pi is absent), with the OpenSpec change archived into the config-update spec. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- cli/commands/update/root.go | 10 +++++ .../2026-09-25-add-pi-self-update/proposal.md | 22 ++++++++++ .../specs/config-update/spec.md | 42 +++++++++++++++++++ .../2026-09-25-add-pi-self-update/tasks.md | 6 +++ openspec/specs/config-update/spec.md | 24 +++++++---- 5 files changed, 97 insertions(+), 7 deletions(-) create mode 100644 openspec/changes/archive/2026-09-25-add-pi-self-update/proposal.md create mode 100644 openspec/changes/archive/2026-09-25-add-pi-self-update/specs/config-update/spec.md create mode 100644 openspec/changes/archive/2026-09-25-add-pi-self-update/tasks.md diff --git a/cli/commands/update/root.go b/cli/commands/update/root.go index e609abf8..de2e53df 100644 --- a/cli/commands/update/root.go +++ b/cli/commands/update/root.go @@ -24,6 +24,7 @@ func Run() { updateBrew() updateClaude() updateDevbox() + updatePi() updateSolargraph() reshimAsdf() install.Call("vim") @@ -92,6 +93,15 @@ func updateDevbox() { run.Verbose("devbox version update") } +func updatePi() { + if err := run.Silent("which pi"); err != nil { + log.Info("pi.dev not installed, skipping") + return + } + log.Info("Updating pi.dev") + run.Verbose("pi update") +} + func updateSolargraph() { log.Info("Updating solargraph gem") run.Verbose("gem update solargraph") diff --git a/openspec/changes/archive/2026-09-25-add-pi-self-update/proposal.md b/openspec/changes/archive/2026-09-25-add-pi-self-update/proposal.md new file mode 100644 index 00000000..e5da29e3 --- /dev/null +++ b/openspec/changes/archive/2026-09-25-add-pi-self-update/proposal.md @@ -0,0 +1,22 @@ +# Change: Update pi.dev during `dots update` + +## Why + +`dots install pi` only installs `pi` when it's missing (`which pi` short-circuits the +installer) and is never called by `dots update`. Once installed, pi.dev's own binary never +gets refreshed by dots — the user has to remember to run `pi update` by hand. Every other +managed tool (Claude Code, Devbox, Homebrew, solargraph, asdf shims) is kept current by +`dots update`; pi.dev should be too. + +## What Changes + +- Add `updatePi()` to `cli/commands/update/root.go`, following the same + skip-if-not-installed pattern as `updateClaude`/`updateDevbox`: log and skip when `pi` is + not resolvable on `PATH`, otherwise run `pi update` (self-update only, matching the + existing narrow scope of each per-tool update step). +- Call `updatePi()` from `Run()`'s update sequence. + +## Impact + +- Affected specs: `config-update` +- Affected code: `cli/commands/update/root.go` diff --git a/openspec/changes/archive/2026-09-25-add-pi-self-update/specs/config-update/spec.md b/openspec/changes/archive/2026-09-25-add-pi-self-update/specs/config-update/spec.md new file mode 100644 index 00000000..54818103 --- /dev/null +++ b/openspec/changes/archive/2026-09-25-add-pi-self-update/specs/config-update/spec.md @@ -0,0 +1,42 @@ +## MODIFIED Requirements + +### Requirement: Update Orchestration + +`dots update` SHALL update the environment in sequence: pull and reinstall the +dots repository (`git fetch`, `git reset --hard origin/master`, `go install +./...`), update ZSH plugins via zinit (pruning broken completion symlinks), +update tmux plugins, update Homebrew and outdated packages, update Claude Code, +Devbox, pi.dev, and the solargraph gem, reshim asdf, and reinstall the `vim` +component. It SHALL set the tmux window title to `update` while running and +restore it afterward. + +#### Scenario: Dots repo pulled and rebuilt + +- **WHEN** `dots update` runs +- **THEN** it fetches and hard-resets the dots repo to `origin/master` and runs `go install ./...` + +#### Scenario: Vim component reinstalled + +- **WHEN** `dots update` runs +- **THEN** it invokes the `vim` installer as part of the update sequence + +#### Scenario: pi.dev updated + +- **WHEN** `dots update` runs and `pi` is on `PATH` +- **THEN** it runs `pi update` to self-update the pi.dev binary + +### Requirement: Conditional Tool Updates + +`dots update` SHALL skip updating Claude Code, Devbox, and pi.dev when their +commands are not resolvable on `PATH`, logging that they are not installed +rather than failing. + +#### Scenario: Missing tool skipped + +- **WHEN** `dots update` runs and `devbox` is not on `PATH` +- **THEN** the Devbox update is skipped with an informational log and the update continues + +#### Scenario: Missing pi.dev skipped + +- **WHEN** `dots update` runs and `pi` is not on `PATH` +- **THEN** the pi.dev update is skipped with an informational log and the update continues diff --git a/openspec/changes/archive/2026-09-25-add-pi-self-update/tasks.md b/openspec/changes/archive/2026-09-25-add-pi-self-update/tasks.md new file mode 100644 index 00000000..1d29e813 --- /dev/null +++ b/openspec/changes/archive/2026-09-25-add-pi-self-update/tasks.md @@ -0,0 +1,6 @@ +## 1. Implementation + +- [x] 1.1 Add `updatePi()` to `cli/commands/update/root.go`: skip with an informational log when `which pi` fails, otherwise run `pi update` via `run.Verbose` +- [x] 1.2 Call `updatePi()` from `Run()`'s update sequence, alongside `updateClaude()`/`updateDevbox()` +- [x] 1.3 Update `README.md`'s `pi` component description if it documents install-only behavior (not needed — `dots update`'s per-tool steps aren't enumerated in README) +- [x] 1.4 Run `go install ./...`, `revive -set_exit_status ./...`, `go test ./...`, `bash .github/skill-tests/run_all.sh`, `bash .github/lint-skills.sh`, `qlty check --all --no-fix --level=high`, `qlty smells --all --no-snippets` diff --git a/openspec/specs/config-update/spec.md b/openspec/specs/config-update/spec.md index 979b8fcd..1ebf6cc9 100644 --- a/openspec/specs/config-update/spec.md +++ b/openspec/specs/config-update/spec.md @@ -8,18 +8,16 @@ managers, packages, runtimes, and tools) and pruning stale package and editor artifacts. This spec documents the behavior that ships today. - ## Requirements - ### Requirement: Update Orchestration `dots update` SHALL update the environment in sequence: pull and reinstall the dots repository (`git fetch`, `git reset --hard origin/master`, `go install ./...`), update ZSH plugins via zinit (pruning broken completion symlinks), update tmux plugins, update Homebrew and outdated packages, update Claude Code, -Devbox, and the solargraph gem, reshim asdf, and reinstall the `vim` component. -It SHALL set the tmux window title to `update` while running and restore it -afterward. +Devbox, pi.dev, and the solargraph gem, reshim asdf, and reinstall the `vim` +component. It SHALL set the tmux window title to `update` while running and +restore it afterward. #### Scenario: Dots repo pulled and rebuilt @@ -31,6 +29,11 @@ afterward. - **WHEN** `dots update` runs - **THEN** it invokes the `vim` installer as part of the update sequence +#### Scenario: pi.dev updated + +- **WHEN** `dots update` runs and `pi` is on `PATH` +- **THEN** it runs `pi update` to self-update the pi.dev binary + ### Requirement: Weekly Auto-Clean `dots update` SHALL run the cleanup routine before updating only when the @@ -49,14 +52,20 @@ Within a week of the last clean, the cleanup step SHALL be skipped. ### Requirement: Conditional Tool Updates -`dots update` SHALL skip updating Claude Code and Devbox when their commands are -not resolvable on `PATH`, logging that they are not installed rather than failing. +`dots update` SHALL skip updating Claude Code, Devbox, and pi.dev when their +commands are not resolvable on `PATH`, logging that they are not installed +rather than failing. #### Scenario: Missing tool skipped - **WHEN** `dots update` runs and `devbox` is not on `PATH` - **THEN** the Devbox update is skipped with an informational log and the update continues +#### Scenario: Missing pi.dev skipped + +- **WHEN** `dots update` runs and `pi` is not on `PATH` +- **THEN** the pi.dev update is skipped with an informational log and the update continues + ### Requirement: Cleanup Command `dots clean` SHALL clean legacy artifacts: `brew cleanup -s` for Homebrew and @@ -67,3 +76,4 @@ while running and restore it afterward. - **WHEN** `dots clean` runs - **THEN** it runs `brew cleanup -s` and removes uninstalled Neovim plugins + From aae9fd260785e93c676f843769db8c9335cbe3f1 Mon Sep 17 00:00:00 2001 From: Darren Cheng Date: Tue, 27 Oct 2026 22:49:13 -0700 Subject: [PATCH 2/2] Restore config-update spec blank-line spacing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- openspec/specs/config-update/spec.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openspec/specs/config-update/spec.md b/openspec/specs/config-update/spec.md index 1ebf6cc9..a0b5e3e2 100644 --- a/openspec/specs/config-update/spec.md +++ b/openspec/specs/config-update/spec.md @@ -8,7 +8,9 @@ managers, packages, runtimes, and tools) and pruning stale package and editor artifacts. This spec documents the behavior that ships today. + ## Requirements + ### Requirement: Update Orchestration `dots update` SHALL update the environment in sequence: pull and reinstall the @@ -76,4 +78,3 @@ while running and restore it afterward. - **WHEN** `dots clean` runs - **THEN** it runs `brew cleanup -s` and removes uninstalled Neovim plugins -