diff --git a/install-plugins.sh b/install-plugins.sh index c09275b..5471e4b 100644 --- a/install-plugins.sh +++ b/install-plugins.sh @@ -348,28 +348,23 @@ if [ -d "$GSTACK_DIR" ]; then info "Running GStack setup..." _gstack_setup_ok=0 if [ -x "$GSTACK_DIR/setup" ]; then - if (cd "$GSTACK_DIR" && ./setup); then - _gstack_setup_ok=1 + if [ -d "$HOME/.claude/skills/gstack" ] && [ ! -L "$HOME/.claude/skills/gstack" ]; then + if (cd "$GSTACK_DIR" && ./setup); then + _gstack_setup_ok=1 + else + warn "GStack ./setup failed — check output above" + fi else - warn "GStack ./setup failed — check output above" + warn "gstack: ~/.claude/skills/gstack is not the helper tree yet — run 'make link' first, then 'make plugin' (setup would write skill dirs into skills/)" fi else warn "GStack ./setup not found or not executable — skipping" fi - # 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 - fi # Success message gated on the real setup outcome — an unconditional ok # after a `|| warn` reads as success even when setup failed (LRN-071 class). if [ "$_gstack_setup_ok" -eq 1 ]; then - ok "GStack ready (disabled by default — enable: bash lib/toggle-external.sh enable gstack)" + ok "GStack ready (packs pack-gstack-dev / -browser / -design; profile.sh set )" else warn "GStack NOT ready — ./setup did not complete (see warnings above)" fi @@ -801,11 +796,12 @@ echo "" # 61 deterministic detector rules (`impeccable detect`, exit 0/2), the # /impeccable skill (23 verbs) and 4 `impeccable-*` subagents. # -# GLOBAL scope, no staging: the installer writes ~/.claude/skills/impeccable/ -# (skill + its self-contained engine binary) and ~/.claude/agents/ +# GLOBAL scope, no staging: the installer writes skills/impeccable/ through +# the ~/.claude/skills symlink (skill + its self-contained engine binary) and ~/.claude/agents/ # impeccable-*.md, and both of those are symlinks into this repo — so the # global install IS the repo install. Machine-owned and gitignored on both -# sides. `--scope=project` was wrong twice over: it writes /.claude/, +# sides. The skill is then moved to skills-external/impeccable (pack-design +# links it). `--scope=project` was wrong twice over: it writes /.claude/, # which serves only the directory it ran in, and the staged `mv` that # followed it moved the skill alone, silently dropping the subagents. # @@ -816,8 +812,8 @@ echo "" # @latest and says, loudly, that the lock needs bumping. echo "── Step 8d: Impeccable — design detector, skill + agents ──" echo "" -IMP_SKILL_DIR="$HOME/.claude/skills/impeccable" -IMP_PARKED="$REPO/skills-disabled/impeccable" +IMP_SKILL_DIR="$REPO/skills/impeccable" +IMP_HOME="$REPO/skills-external/impeccable" IMP_VER=$(pinned_version "impeccable") NODE_MAJOR=$(node -v 2>/dev/null | sed 's/^v//' | cut -d. -f1) @@ -856,17 +852,12 @@ if [ "$IMP_READY" != true ]; then warn "impeccable: ~/.claude/skills and ~/.claude/agents are not this repo's symlinks yet" warn " → run 'make link' first, then re-run 'make plugin'" elif [ -z "${NODE_MAJOR:-}" ] || [ "$NODE_MAJOR" -lt 24 ]; then - if [ -f "$IMP_SKILL_DIR/SKILL.md" ] || [ -f "$IMP_PARKED/SKILL.md" ]; then + if [ -f "$IMP_HOME/SKILL.md" ]; then ok "impeccable already present (update skipped — needs Node >= 24, found ${NODE_MAJOR:-none})" else warn "impeccable: needs Node >= 24 (found ${NODE_MAJOR:-none}) — skipped. Bump Node, then: make plugin" fi else - # A profile may hold impeccable parked in skills-disabled/. Install writes - # to the live slot, so remember the state and put the fresh copy back where - # it was — otherwise `make plugin` silently re-enables a disabled skill. - IMP_WAS_PARKED=false - [ -d "$IMP_PARKED" ] && IMP_WAS_PARKED=true IMP_USED="" if [ "$IMP_VER" != "latest" ]; then info "Installing impeccable ${IMP_VER} (pinned in plugins.lock.json, global scope)..." @@ -893,14 +884,12 @@ else if [ "$IMP_AGENTS" -eq 0 ]; then warn "no impeccable-* agent landed in agents/ — the skill's finish/document verbs dispatch to them" fi - if [ "$IMP_WAS_PARKED" = true ]; then - rm -rf "${IMP_PARKED:?}" - mv "$IMP_SKILL_DIR" "$IMP_PARKED" - info "impeccable was parked by a profile — refreshed copy returned to skills-disabled/" - fi + # The CLI writes into skills/impeccable (through the ~/.claude/skills + # symlink); the copy lives in skills-external/, linked by pack-design. + cd "$REPO" && rm -rf skills-external/impeccable && mv "$IMP_SKILL_DIR" skills-external/impeccable info "Per-project step, in the agent chat of each frontend project: /impeccable init" info " (writes PRODUCT.md — the design context every impeccable verb reads)" - elif [ -f "$IMP_SKILL_DIR/SKILL.md" ] || [ -f "$IMP_PARKED/SKILL.md" ]; then + elif [ -f "$IMP_HOME/SKILL.md" ]; then ok "impeccable already present (install failed: ${IMP_FAIL:-no SKILL.md written} — existing copy kept)" else warn "impeccable install failed (${IMP_FAIL:-no SKILL.md written}) — run manually: npx impeccable skills install -y --providers=claude --scope=global --no-hooks" @@ -998,7 +987,7 @@ echo "" # lib/higgsfield-skills.sh into skills-external/higgsfield-* (gitignored). # # Nothing is linked here. The pack is OFF by default and belongs to no -# profile: `lib/toggle-external.sh enable higgsfield` turns the media skills +# profile: `bash lib/profile.sh enable higgsfield` turns the media skills # on, `enable higgsfield-websites` the landing-page aid. Keeping it out of # link.sh and of every profile is what stops a re-run from re-enabling it # (BDR-093). @@ -1054,7 +1043,7 @@ if higgsfield_cli_ok; then else info "Not signed in. Generation needs: higgsfield auth login" fi - info "Pack is off by default — enable: bash lib/toggle-external.sh enable higgsfield" + info "Pack is off by default — enable: bash lib/profile.sh enable higgsfield, then /reload-plugins" fi echo "" @@ -1071,13 +1060,8 @@ echo "" # /.claude/skills// and REFUSES to follow a symlink anywhere on # that path — and ~/.claude/skills IS a symlink to this repo's skills/. So # install under a staged HOME, then move each skill into skills-external/ -# (gitignored), where toggle-external.sh / profile.sh symlink it in. +# (gitignored); skills/pack-design and skills/pack-extras link it. # -# The pack's state is governed by profiles, not by this step: Step 11 -# applies the default profile (`full`), which links the five design skills -# in; the two publishing skills (21st-registry, 21st-design-sync) stay on -# demand — no profile lists them, so they are never auto-linked. A re-run -# must never re-park what the selected profile or the user already enabled. echo "── Step 8.7: 21st.dev CLI + skill pack ─────────────────────" echo "" if command -v 21st &>/dev/null; then @@ -1150,9 +1134,6 @@ if command -v 21st &>/dev/null; then fi fi -# The pack's state is governed by profiles (Step 11), not parked here: a -# re-run must never re-park what the selected profile or the user enabled. -# See the Step 11 banner for how the default profile applies. echo "" # ============================================================ @@ -1257,40 +1238,6 @@ else fi echo "" -# ============================================================ -# STEP 11 — DEFAULT PROFILE -# ============================================================ -# The profile decides which skills / externals / plugins are on. No -# selection yet (.active-profile absent, empty or legacy "none" — same -# rule as lib/profile.sh active_profile()) → apply the default via -# `profile.sh reset`. An existing selection is re-applied (`set`). Plugin legs -# are install-immutable (the EXIT guard restores settings.json, BDR-028; -# the committed enabledPlugins already match the default profile), so -# only the skill / external legs matter here. -echo "── Step 11: Default profile ────────────────────────────────" -echo "" -if [ -f "$REPO/lib/profile.sh" ]; then - SEL="$(head -n1 "$REPO/.active-profile" 2>/dev/null | tr -d '[:space:]' || true)" - case "$SEL" in - ""|none) - info "No profile selected — applying the default profile (bash lib/profile.sh reset)..." - bash "$REPO/lib/profile.sh" reset \ - || warn "default profile not applied — run: bash lib/profile.sh reset" - ;; - *) - # Steps 2 (gstack parked) and 10 (link.sh re-links the design - # externals) rewrite skill state on every run: re-apply the - # selection so its state comes back, label unchanged. - info "Profile kept: $SEL — re-applying it (bash lib/profile.sh set $SEL)..." - bash "$REPO/lib/profile.sh" set "$SEL" \ - || warn "profile $SEL not re-applied — run: bash lib/profile.sh set $SEL" - ;; - esac -else - warn "lib/profile.sh not found — skipping the default profile" -fi -echo "" - # ============================================================ # SUMMARY # ============================================================ @@ -1305,7 +1252,7 @@ echo " ✅ rtk — token compression hook (0 tokens)" echo " ✅ superpowers skills — 7 vendored (brainstorming, writing-plans, subagent-driven-development, test-driven-development, requesting-code-review, using-git-worktrees, writing-skills), pinned v6.4.1, curl → symlink, no plugin, no session injection" echo "" echo " TOGGLE (plugin state = settings.json enabledPlugins; skills/CLIs = profiles):" -echo " 🔄 gstack — disabled by default (toggle: lib/toggle-external.sh enable gstack)" +echo " 🔄 gstack — packs pack-gstack-dev / -browser / -design (bash lib/profile.sh set | enable , then /reload-plugins)" echo " 🔄 gsd v2 — standalone CLI 'gsd' (gsd-pi, not a Claude Code plugin)" echo " 🔄 pr-review-toolkit — /review-pr + 6 PR agents (~2.2k tokens when enabled) [claude-code-plugins]" echo " 🔄 ui-ux-pro-max — user scope (~780 tokens when enabled)" @@ -1318,14 +1265,14 @@ echo " 🔄 design-motion-principles — motion/animation design, 3-designer echo " 🔄 agent-skills trio — observability-and-instrumentation, deprecation-and-migration, ci-cd-and-automation (curl → symlink, pinned commit)" echo " 🔄 mengto scroll skills — scroll-world-storytelling, build-threejs-scroll-worlds, scroll-scrubbed-visual-sequence, scroll-scrubbed-word-reveal, scroll-progress-timeline (curl → symlink, pinned commit)" echo " 🔄 darwin-skill — autonomous skill optimizer (npx skills, ~/.agents/skills/)" -echo " 🔄 21st skill pack — 21st.dev CLI skills; design ones follow the profile (full by default), publishing ones on demand (toggle: lib/toggle-external.sh enable 21st)" -echo " 🔄 higgsfield pack — Higgsfield CLI media skills (image, video, audio, brand), OFF by default (toggle: lib/toggle-external.sh enable higgsfield; landing-page aid: enable higgsfield-websites)" +echo " 🔄 21st skill pack — 21st.dev CLI skills; linked by skills/pack-design and skills/pack-extras (bash lib/profile.sh set | enable , then /reload-plugins)" +echo " 🔄 higgsfield pack — Higgsfield CLI media skills (image, video, audio, brand), OFF by default (bash lib/profile.sh enable higgsfield, then /reload-plugins; landing-page aid: enable higgsfield-websites)" echo "" echo " All plugins installed at: user scope (~/.claude/plugins/)" echo " GStack skills symlinked individually into ~/.claude/skills/ (→ submodule)" echo " Emil Design Eng at: ~/.claude/skills/pack-design/skills/emil-design-eng/ (symlink → skills-external)" echo " Frontend Design at: ~/.claude/skills/pack-design/skills/frontend-design/ (symlink → skills-external)" -echo " Design Motion Principles at: ~/.claude/skills/design-motion-principles/ (symlink → skills-external)" +echo " Design Motion Principles at: skills/pack-design/skills/design-motion-principles/ (symlink → skills-external)" echo " Agent Skills trio at: ~/.claude/skills/{observability-and-instrumentation,deprecation-and-migration,ci-cd-and-automation}/ (symlink → skills-external)" echo " Mengto scroll skills at: ~/.claude/skills/{scroll-world-storytelling,build-threejs-scroll-worlds,scroll-scrubbed-visual-sequence,scroll-scrubbed-word-reveal,scroll-progress-timeline}/ (symlink → skills-external)" echo " Superpowers skills at: ~/.claude/skills/{brainstorming,writing-plans,subagent-driven-development,test-driven-development,requesting-code-review,using-git-worktrees,writing-skills}/ (symlink → skills-external)" diff --git a/plugins.lock.json b/plugins.lock.json index ee19139..330b4d2 100644 --- a/plugins.lock.json +++ b/plugins.lock.json @@ -28,7 +28,7 @@ "higgsfield": { "source": "npm:@higgsfield/cli", "version": "latest", - "note": "Higgsfield CLI (bins `higgsfield`, `higgs`) — image, video, audio and brand media generation, metered credits; auth is `higgsfield auth login` (browser). Install: npm install -g @higgsfield/cli. The package vendors its binary in a postinstall script; if npm holds it back, add --allow-scripts=@higgsfield/cli. The upstream skills are git-cloned from https://github.com/higgsfield-ai/skills (tracks main, no pin) into skills-external/higgsfield-* by lib/higgsfield-skills.sh (install-plugins.sh Step 8.6, refreshed by update-all.sh); a skill upstream removes keeps its last local copy. OFF by default and in no profile: `lib/toggle-external.sh enable higgsfield` links the 7 allowlisted media skills (HIGGSFIELD_MEDIA_SKILLS), `enable higgsfield-websites` the landing-page aid." + "note": "Higgsfield CLI (bins `higgsfield`, `higgs`) — image, video, audio and brand media generation, metered credits; auth is `higgsfield auth login` (browser). Install: npm install -g @higgsfield/cli. The package vendors its binary in a postinstall script; if npm holds it back, add --allow-scripts=@higgsfield/cli. The upstream skills are git-cloned from https://github.com/higgsfield-ai/skills (tracks main, no pin) into skills-external/higgsfield-* by lib/higgsfield-skills.sh (install-plugins.sh Step 8.6, refreshed by update-all.sh); a skill upstream removes keeps its last local copy. OFF by default and in no profile: `bash lib/profile.sh enable higgsfield` links the 7 allowlisted media skills (HIGGSFIELD_MEDIA_SKILLS), `enable higgsfield-websites` the landing-page aid." }, "graphifyy": { "source": "pypi:graphifyy", @@ -89,6 +89,6 @@ "impeccable": { "source": "npm:impeccable", "version": "4.1.0", - "note": "Design anti-pattern detector (61 deterministic rules, CLI 'impeccable detect', exit 0/2) + /impeccable skill (23 verbs) + 4 impeccable-* subagents, by pbakaus. Pin = CLI version ONLY: the skill dist and the engine binary have their own release tracks, fetched by 'skills install' at install time, so this pin does not freeze audit output the way a semgrep pin does. It still gates the CLI deliberately (LRN-077 class). BEWARE: the pin rots — the CLI downloads its skill dist at install time and an older release's artifact disappears upstream (3.2.0 -> 'Download failed: invalid zip data', 2026-09-22, which left 'make plugin' printing a run-it-yourself warning). install-plugins.sh Step 8d and update-all.sh therefore fall back to @latest on a pin failure and warn to bump this version. Requires Node >= 24. Installed at --scope=global: lands in ~/.claude/skills/impeccable + ~/.claude/agents/impeccable-*.md, both symlinks into this repo, both gitignored." + "note": "Design anti-pattern detector (61 deterministic rules, CLI 'impeccable detect', exit 0/2) + /impeccable skill (23 verbs) + 4 impeccable-* subagents, by pbakaus. Pin = CLI version ONLY: the skill dist and the engine binary have their own release tracks, fetched by 'skills install' at install time, so this pin does not freeze audit output the way a semgrep pin does. It still gates the CLI deliberately (LRN-077 class). BEWARE: the pin rots — the CLI downloads its skill dist at install time and an older release's artifact disappears upstream (3.2.0 -> 'Download failed: invalid zip data', 2026-09-22, which left 'make plugin' printing a run-it-yourself warning). install-plugins.sh Step 8d and update-all.sh therefore fall back to @latest on a pin failure and warn to bump this version. Requires Node >= 24. Installed at --scope=global: lands in skills/impeccable, then moves to skills-external/impeccable (linked by pack-design), plus ~/.claude/agents/impeccable-*.md, a symlink into this repo; both gitignored." } } diff --git a/update-all.sh b/update-all.sh index 85cd913..c070913 100644 --- a/update-all.sh +++ b/update-all.sh @@ -80,21 +80,17 @@ else _gstack_confirm="n" fi 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 gstack_submodule_update_with_bump "$REPO"; then if [ -d "skills-external/gstack" ]; then if [ -x "skills-external/gstack/setup" ]; then - if (cd skills-external/gstack && ./setup) 2>/dev/null; then - ok "GStack updated" + if [ -d "$HOME/.claude/skills/gstack" ] && [ ! -L "$HOME/.claude/skills/gstack" ]; then + if (cd skills-external/gstack && ./setup) 2>/dev/null; then + ok "GStack updated" + else + warn "GStack ./setup failed — submodule updated but setup did not complete" + fi else - warn "GStack ./setup failed — submodule updated but setup did not complete" + warn "gstack: ~/.claude/skills/gstack is not the helper tree yet — run 'make link' first, then 'make plugin' (setup would write skill dirs into skills/)" fi else warn "GStack ./setup not found or not executable — skipping" @@ -112,12 +108,6 @@ if [[ "$_gstack_confirm" =~ ^[Yy]$ ]]; then if [ -d "$GSTACK_DIR" ]; then link_gstack_helpers "$GSTACK_DIR" "$GSTACK_DST" >/dev/null 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 @@ -418,9 +408,9 @@ imp_install() { } echo "" echo "── Updating impeccable..." -IMP_SKILL_DIR="$HOME/.claude/skills/impeccable" -IMP_PARKED="$REPO/skills-disabled/impeccable" -if [ ! -f "$IMP_SKILL_DIR/SKILL.md" ] && [ ! -f "$IMP_PARKED/SKILL.md" ]; then +IMP_SKILL_DIR="$REPO/skills/impeccable" +IMP_HOME="$REPO/skills-external/impeccable" +if [ ! -f "$IMP_HOME/SKILL.md" ]; then info "impeccable not installed — skipping (run: make plugin)" else IMP_VER="" @@ -436,8 +426,6 @@ print(d.get('impeccable',{}).get('version','latest')) if [ -z "${IMP_NODE:-}" ] || [ "$IMP_NODE" -lt 24 ]; then info "impeccable update skipped — needs Node >= 24 (found ${IMP_NODE:-none}); existing copy kept" else - IMP_WAS_PARKED=false - [ -d "$IMP_PARKED" ] && IMP_WAS_PARKED=true # Pin honored (LRN-077 class: a silent rules update changes audit output # on unchanged code) — bump the pin deliberately, then update. IMP_PIN="${IMP_VER:-latest}" @@ -454,11 +442,7 @@ print(d.get('impeccable',{}).get('version','latest')) if [ "$IMP_OK" = true ] && [ -f "$IMP_SKILL_DIR/SKILL.md" ]; then IMP_SKILL_VER=$(sed -n 's/^version:[[:space:]]*//p' "$IMP_SKILL_DIR/SKILL.md" | head -1) ok "impeccable refreshed (CLI ${IMP_VER:-latest}, skill ${IMP_SKILL_VER:-?})" - if [ "$IMP_WAS_PARKED" = true ]; then - rm -rf "${IMP_PARKED:?}" - mv "$IMP_SKILL_DIR" "$IMP_PARKED" - info "impeccable was parked by a profile — refreshed copy returned to skills-disabled/" - fi + cd "$REPO" && rm -rf skills-external/impeccable && mv "$IMP_SKILL_DIR" skills-external/impeccable else warn "impeccable refresh failed (${IMP_FAIL:-no SKILL.md written}) — existing copy kept" fi @@ -467,8 +451,7 @@ fi # ── 7.3b. Update the Higgsfield CLI + skill pack ── # CLI: global npm bin. Skills: re-cloned by lib/higgsfield-skills.sh, which -# replaces the SOURCE under skills-external/ only: a pack parked in -# skills-disabled/ (symlinks to those sources) stays parked. +# replaces the SOURCE under skills-external/ only; the packs link it. echo "" echo "── Updating Higgsfield CLI + skill pack..." if ! command -v higgsfield &>/dev/null; then @@ -544,8 +527,7 @@ print(d.get('21st',{}).get('version','latest')) for _tfd in "$TFD_STAGE"/.claude/skills/*/; do [ -f "${_tfd}SKILL.md" ] || continue _tfd_name=$(basename "$_tfd") - # Refresh the SOURCE only. A parked copy in skills-disabled/ is left - # alone: re-enabling restores it, and the next update refreshes it. + # Refresh the SOURCE only; linked by pack-design / pack-extras. rm -rf "${REPO:?}/skills-external/${_tfd_name:?}" mv "$_tfd" "$REPO/skills-external/$_tfd_name" TFD_N=$((TFD_N + 1))