Skill Tracer
Skills › gstack › gstack-upgrade › v1.78.0.0.sh

v1.78.0.0.sh

30 lines · gstack-upgrade/migrations/v1.78.0.0.sh at 3f79d81

1#!/usr/bin/env bash
2# Migration: v1.78.0.0 — carry feature-discovery acknowledgements to GSTACK_HOME
3# (#2728 absorption follow-through).
4#
5# Why a migration: pre-v1.78, `gstack-skill-start` gated the one-time feature
6# prompts (.feature-prompted-continuous-checkpoint, .feature-prompted-model-
7# overlay) on marker files BESIDE THE INSTALL — which, for project-local
8# symlink installs, resolved into the project repo and left machine-state
9# droppings in checkouts (#2728). v1.78 reads them from GSTACK_HOME. Without
10# this copy, every existing install that already answered those prompts gets
11# re-prompted once per feature.
13# Idempotent: existing destination markers are left untouched. Non-fatal
14# throughout — a failed copy just means one benign re-prompt.
15set -u
17INSTALL_DIR="${GSTACK_INSTALL_DIR:-$HOME/.claude/skills/gstack}"
18_gstack_migration_dir="${BASH_SOURCE[0]//\\//}"; _gstack_migration_dir="${_gstack_migration_dir%/*}"
19. "${_gstack_migration_dir}/../../bin/gstack-state-root.sh" 2>/dev/null || { echo "$0: cannot resolve the gstack state root: ${_gstack_migration_dir}/../../bin/gstack-state-root.sh is missing. fix: reinstall with ./setup or /gstack-upgrade (docs/state-root.md)" >&2; exit 1; }
20gstack_state_root_select; GH="$_gstack_sr_root"
22mkdir -p "$GH" 2>/dev/null || exit 0
24for m in .feature-prompted-continuous-checkpoint .feature-prompted-model-overlay; do
25 if [ -f "$INSTALL_DIR/$m" ] && [ ! -f "$GH/$m" ]; then
26 touch "$GH/$m" 2>/dev/null && echo "migrated: $m → $GH"
27 fi
28done
30exit 0