diff --git a/install-plugins.sh b/install-plugins.sh index 0b3fe58..0f8636f 100644 --- a/install-plugins.sh +++ b/install-plugins.sh @@ -256,11 +256,18 @@ if [ -d "$GSTACK_DIR" ]; then else warn "GStack ./setup not found or not executable — skipping" fi - # Symlinks are handled by link.sh — verify it was run - if [ -L "$HOME/.claude/skills/gstack" ]; then - ok "GStack ready (submodule initialized, symlink OK)" + + # Default policy: gstack is installed but DISABLED — enable on demand + # via `bash lib/toggle-external.sh enable gstack`. Rationale: gstack + # ships ~40 skills that all load into context; keep them off until + # the user signals a project where they matter (browser QA, deploy). + if [ -x "$REPO/lib/toggle-external.sh" ] \ + && [ "$(bash "$REPO/lib/toggle-external.sh" status gstack 2>/dev/null)" = "enabled" ]; then + info "Disabling gstack by default (no context cost until enabled)..." + bash "$REPO/lib/toggle-external.sh" disable gstack >/dev/null + ok "gstack installed, disabled — enable with: bash lib/toggle-external.sh enable gstack" else - warn "GStack submodule ready but not symlinked — run: bash link.sh" + ok "GStack ready (submodule initialized, symlinks staged)" fi else warn "GStack submodule directory not found after init — check .gitmodules" @@ -556,7 +563,7 @@ echo " ✅ rtk — token compression hook (0 tokens)" echo " ✅ superpowers — brainstorm/plan/implement/debug workflow" echo "" echo " TOGGLE (installed but start OFF — /plugin-check recommends when needed):" -echo " 🔄 gstack — ~/.claude/skills/gstack/ (→ submodule)" +echo " 🔄 gstack — disabled by default (toggle: lib/toggle-external.sh enable gstack)" echo " 🔄 gsd v2 — standalone CLI 'gsd' (gsd-pi, not a Claude Code plugin)" echo " 🔄 plugin-dev — create plugins/skills (~100 tokens) [claude-code-plugins]" echo " 🔄 pr-review-toolkit — /pr-review-toolkit:review-pr (~300 tokens) [claude-code-plugins]" diff --git a/update-all.sh b/update-all.sh index 4c14b5d..de50870 100644 --- a/update-all.sh +++ b/update-all.sh @@ -60,6 +60,14 @@ echo "" printf " Proceed with GStack update? [y/N] " read -r _gstack_confirm if [[ "$_gstack_confirm" =~ ^[Yy]$ ]]; then + # Capture gstack state before the update so we can restore it after + # ./setup runs (setup re-creates every symlink; without this, an + # update would silently re-enable a tool the user had disabled). + _gstack_state="unknown" + if [ -x "$REPO/lib/toggle-external.sh" ]; then + _gstack_state=$(bash "$REPO/lib/toggle-external.sh" status gstack 2>/dev/null || echo "unknown") + fi + if git submodule update --remote skills-external/gstack 2>/dev/null; then if [ -d "skills-external/gstack" ]; then if [ -x "skills-external/gstack/setup" ]; then @@ -76,6 +84,12 @@ if [[ "$_gstack_confirm" =~ ^[Yy]$ ]]; then else warn "GStack submodule update failed — run: git submodule update --init" fi + + # Restore prior enabled/disabled state + if [ "$_gstack_state" = "disabled" ] && [ -x "$REPO/lib/toggle-external.sh" ]; then + bash "$REPO/lib/toggle-external.sh" disable gstack >/dev/null + info "gstack was disabled before update — restored to disabled" + fi else info "GStack update skipped" fi