gstack upgrade

Other Community v1.1.0

Skill notes

When to invoke this skill

Detects global vs vendored install, runs the upgrade, and shows what's new. Use when asked to "upgrade gstack", "update gstack", or "get latest version". Voice triggers (speech-to-text aliases): "upgrade the tools", "update the tools", "gee stack upgrade", "g stack upgrade". /gstack-upgrade

Inline upgrade flow

This section is referenced by all skill preambles when they detect UPGRADE_AVAILABLE.

Step 1: Ask the user (or auto-upgrade)

First, check if auto-upgrade is enabled: If AUTO_UPGRADE=true or AUTO_UPGRADE=1: Skip AskUserQuestion. Log "Auto-upgrading gstack v{old} → v{new}..." and proceed directly to Step 2. If ./setup fails during auto-upgrade, restore from backup (.bak directory) and warn the user: "Auto-upgrade failed — restored previous version. Run /gstack-upgrade manually to retry." Otherwise, use AskUserQuestion:

Step 2: Detect install type

The install type and directory path printed above will be used in all subsequent steps.

Step 3: Save old version

Use the install directory from Step 2's output below:

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
Other
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
92 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@garrytan · v1.1.0 · no license declared
Token usage
Lean
Setup complexity
Guided setup
External API key
Not required
Operating systems
macOS · Linux · Windows
Runtime requirements
Bun
Detected file/system behavior
  • Read-only
  • Write / modify
  • Shell exec
Network behavior
External requests
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

01
Step 1: Ask the user (or auto-upgrade)

First, check if auto-upgrade is enabled: If `AUTO_UPGRADE=true` or `AUTO_UPGRADE=1`: Skip AskUserQuestion. Log "Auto-upgrading gstack v{old} → v{new}..." and proceed directly to Step 2. If `./setup` fails during auto-upgrade, restore from backup (`.bak` directory) and warn the user: "Auto-upgrade failed — restored previous version. Run `/gstack-upgrade` manually to retry." Otherwise, use AskUserQuestion:

02
Step 2: Detect install type

The install type and directory path printed above will be used in all subsequent steps.

03
Step 3: Save old version

Use the install directory from Step 2's output below:

04
Step 4: Upgrade

Use the install type and directory detected in Step 2: For git installs (global-git, local-git): Fast-forward first (#2517) — the same policy the session-update auto-upgrade uses. `--autostash` carries local edits over the pull; render-footprint dirt is discarded first because it is regenerable and poisons stashes (#2569):

05
Step 4.5: Handle local vendored copy

Use the install directory from Step 2. Check if there's also a local vendored copy, and whether team mode is active: If `LOCAL_GSTACK` is non-empty AND `TEAM_MODE` is `true`: Remove the vendored copy. Team mode uses the global install as the single source of truth. Tell user: "Removed vendored copy at `$LOCAL_GSTACK` (team mode active — global install is the source of truth). Commit the `.gitignore` change when ready."

06
Step 4.75: Run version migrations

After `./setup` completes, run any migration scripts for versions between the old and new version. Migrations handle state fixes that `./setup` alone can't cover (stale config, orphaned files, directory structure changes). Migrations are idempotent bash scripts in `gstack-upgrade/migrations/`. Each is named `v{VERSION}.sh` and runs only when upgrading from an older version. See CONTRIBUTING.md

07
Step 4.8: Stop any stale daemon (unconditional)

A browse daemon started before the upgrade keeps serving the OLD binary's code until it is stopped — it survives `git reset --hard` and `./setup` because the running process holds the old executable (#2551). Always run this step, using the install directory detected in Step 2. Replace `<install dir from Step 2>` with the actual install directory before

08
Step 5: Write marker + clear cache

Step 5: Write marker + clear cache

09
Step 6: Show What's New

Read `$INSTALL_DIR/CHANGELOG.md`. Find all version entries between the old version and the new version. Summarize as 5-7 bullets grouped by theme. Don't overwhelm — focus on user-facing changes. Skip internal refactors unless they're significant. Format:

10
Step 7: Continue

After showing What's New, continue with whatever skill the user originally invoked. The upgrade is done — no further action needed.

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.