From 43c078f19a101fb48f42acd4a637b1eb51588a30 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Fri, 27 Mar 2026 09:08:15 -0600 Subject: [PATCH] feat: skill prefix is now a persistent user choice (v0.12.11.0) (#571) * feat: make skill prefix a persistent, interactive user setting - Add --prefix flag alongside --no-prefix - Read/write skill_prefix from ~/.gstack/config.yaml (true/false) - Interactive prompt on first setup when no preference saved - Non-TTY environments default to flat names (no prefix) - Add cleanup_prefixed_claude_symlinks() for reverse direction - Fix gstack-config sed portability (mktemp+mv instead of BSD sed -i '') - Add SKILL_PREFIX to preamble output with namespace-aware instruction * test: add prefix config tests + README switching instructions 8 structural tests for persistent prefix setting: config reading, --prefix flag, config persistence, interactive prompt, TTY fallback, reverse cleanup, cleanup ordering, welcome. * chore: regenerate SKILL.md files with SKILL_PREFIX preamble * chore: bump version and changelog (v0.12.11.0) Co-Authored-By: Claude Opus 4.6 * docs: reframe changelog as feature, not mea culpa * docs: update CONTRIBUTING + CLAUDE.md for prefix-aware vendoring - CONTRIBUTING: vendoring now includes ./setup step for per-skill symlinks - CONTRIBUTING: prefix choice documented in contributor workflow + dev diagram - CONTRIBUTING: switching prefix mode section added - CLAUDE.md: vendored symlink awareness section covers prefix setting Co-Authored-By: Claude Opus 4.6 --------- Co-authored-by: Claude Opus 4.6 --- .agents/skills/gstack-connect-chrome/SKILL.md | 7 ++ CHANGELOG.md | 20 +++++ CLAUDE.md | 6 ++ CONTRIBUTING.md | 62 +++++++++++--- README.md | 4 + SKILL.md | 7 ++ VERSION | 2 +- autoplan/SKILL.md | 7 ++ benchmark/SKILL.md | 7 ++ bin/gstack-config | 4 +- browse/SKILL.md | 7 ++ canary/SKILL.md | 7 ++ codex/SKILL.md | 7 ++ connect-chrome/SKILL.md | 7 ++ cso/SKILL.md | 7 ++ design-consultation/SKILL.md | 7 ++ design-review/SKILL.md | 7 ++ document-release/SKILL.md | 7 ++ investigate/SKILL.md | 7 ++ land-and-deploy/SKILL.md | 7 ++ office-hours/SKILL.md | 7 ++ package.json | 2 +- plan-ceo-review/SKILL.md | 7 ++ plan-design-review/SKILL.md | 7 ++ plan-eng-review/SKILL.md | 7 ++ qa-only/SKILL.md | 7 ++ qa/SKILL.md | 7 ++ retro/SKILL.md | 7 ++ review/SKILL.md | 7 ++ scripts/resolvers/preamble.ts | 7 ++ setup | 82 ++++++++++++++++++- setup-browser-cookies/SKILL.md | 7 ++ setup-deploy/SKILL.md | 7 ++ ship/SKILL.md | 7 ++ test/gen-skill-docs.test.ts | 50 +++++++++++ 35 files changed, 394 insertions(+), 20 deletions(-) diff --git a/.agents/skills/gstack-connect-chrome/SKILL.md b/.agents/skills/gstack-connect-chrome/SKILL.md index f1998923166a1c33aec2817b0d4ebe072aa287d2..972477b65ca55ae592acf91c114b9fd09dac0fd5 100644 --- a/.agents/skills/gstack-connect-chrome/SKILL.md +++ b/.agents/skills/gstack-connect-chrome/SKILL.md @@ -29,8 +29,10 @@ _PROACTIVE=$($GSTACK_BIN/gstack-config get proactive 2>/dev/null || echo "true") _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$($GSTACK_BIN/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <($GSTACK_BIN/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -54,6 +56,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`$GSTACK_ROOT/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `$GSTACK_ROOT/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/CHANGELOG.md b/CHANGELOG.md index 141f0513adef3adb17f50ff7468ef8b883f20cd5..a76d7825bd0d04435a646bc82e5083b601f57c60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [0.12.11.0] - 2026-03-27 — Skill Prefix is Now Your Choice + +You can now choose how gstack skills appear: short names (`/qa`, `/ship`, `/review`) or namespaced (`/gstack-qa`, `/gstack-ship`). Setup asks on first run, remembers your preference, and switching is one command. + +### Added + +- **Interactive prefix choice on first setup.** New installs get a prompt: short names (`/qa`, `/ship`) or namespaced (`/gstack-qa`, `/gstack-ship`). Short names are recommended. Your choice is saved to `~/.gstack/config.yaml` and remembered across upgrades. +- **`--prefix` flag.** Complement to `--no-prefix`. Both flags persist your choice so you only decide once. +- **Reverse symlink cleanup.** Switching from namespaced to flat (or vice versa) now cleans up the old symlinks. No more duplicate commands showing up in Claude Code. +- **Namespace-aware skill suggestions.** All 28 skill templates now check your prefix setting. When one skill suggests another (like `/ship` suggesting `/qa`), it uses the right name for your install. + +### Fixed + +- **`gstack-config` works on Linux.** Replaced BSD-only `sed -i ''` with portable `mktemp`+`mv`. Config writes now work on GNU/Linux and WSL. +- **Dead welcome message.** The "Welcome!" message on first install was never shown because `~/.gstack/` was created earlier in setup. Fixed with a `.welcome-seen` sentinel file. + +### For contributors + +- 8 new structural tests for the prefix config system (223 total in gen-skill-docs). + ## [0.12.10.0] - 2026-03-27 — Codex Filesystem Boundary Codex was wandering into `~/.claude/skills/` and following gstack's own instructions instead of reviewing your code. Now every codex prompt includes a boundary instruction that keeps it focused on the repository. Covers all 11 callsites across /codex, /autoplan, /review, /ship, /plan-eng-review, /plan-ceo-review, and /office-hours. diff --git a/CLAUDE.md b/CLAUDE.md index b7771f1e77c66ceea6472435ba78523c4ff06666..e1ae6c65819e079233910d7d7866e2470b03778c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -171,6 +171,12 @@ symlink or a real copy. If it's a symlink to your working directory, be aware th - During large refactors, remove the symlink (`rm .claude/skills/gstack`) so the global install at `~/.claude/skills/gstack/` is used instead +**Prefix setting:** Skill symlinks use either short names (`qa -> gstack/qa`) or +namespaced (`gstack-qa -> gstack/qa`), controlled by `skill_prefix` in +`~/.gstack/config.yaml`. When vendoring into a project, run `./setup` after +symlinking to create the per-skill symlinks with your preferred naming. Pass +`--no-prefix` or `--prefix` to skip the interactive prompt. + **For plan reviews:** When reviewing plans that modify skill templates or the gen-skill-docs pipeline, consider whether the changes should be tested in isolation before going live (especially if the user is actively using gstack in other windows). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c4c31571692a07c89e1ccbb5347f4e8de6a8f0b8..b6dba47cdc10d3af555604fabc8fec4adc2d9d54 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,8 +45,10 @@ the issue, fix it, and open a PR. ```bash # In your core project (the one where gstack annoyed you) ln -sfn /path/to/your/gstack-fork .claude/skills/gstack - cd .claude/skills/gstack && bun install && bun run build + cd .claude/skills/gstack && bun install && bun run build && ./setup ``` + Setup creates the per-skill symlinks (`qa -> gstack/qa`, etc.) and asks your + prefix preference. Pass `--no-prefix` to skip the prompt and use short names. 5. **Fix the issue** — your changes are live immediately in this project 6. **Test by actually using gstack** — do the thing that annoyed you, verify it's fixed 7. **Open a PR from your fork** @@ -69,8 +71,8 @@ your local edits instead of the global install. gstack/ <- your working tree ├── .claude/skills/ <- created by dev-setup (gitignored) │ ├── gstack -> ../../ <- symlink back to repo root -│ ├── review -> gstack/review -│ ├── ship -> gstack/ship +│ ├── review -> gstack/review <- short names (default) +│ ├── ship -> gstack/ship <- or gstack-review, gstack-ship if --prefix │ └── ... <- one symlink per skill ├── review/ │ └── SKILL.md <- edit this, test with /review @@ -82,6 +84,10 @@ gstack/ <- your working tree └── ... ``` +Skill symlink names depend on your prefix setting (`~/.gstack/config.yaml`). +Short names (`/review`, `/ship`) are the default. Run `./setup --prefix` if you +prefer namespaced names (`/gstack-review`, `/gstack-ship`). + ## Day-to-day workflow ```bash @@ -309,25 +315,55 @@ When Conductor creates a new workspace, `bin/dev-setup` runs automatically. It d **This is the recommended way to develop gstack.** Symlink your gstack checkout into the project where you actually use it, so your changes are live while you -do real work: +do real work. + +### Step 1: Symlink your checkout ```bash -# In your core project +# In your core project (not the gstack repo) ln -sfn /path/to/your/gstack-checkout .claude/skills/gstack -cd .claude/skills/gstack && bun install && bun run build ``` -Now every gstack skill invocation in this project uses your working tree. Edit a -template, run `bun run gen:skill-docs`, and the next `/review` or `/qa` call picks -it up immediately. +### Step 2: Run setup to create per-skill symlinks + +The `gstack` symlink alone isn't enough. Claude Code discovers skills through +individual symlinks (`qa -> gstack/qa`, `ship -> gstack/ship`, etc.), not through +the `gstack/` directory itself. Run `./setup` to create them: + +```bash +cd .claude/skills/gstack && bun install && bun run build && ./setup +``` + +Setup will ask whether you want short names (`/qa`) or namespaced (`/gstack-qa`). +Your choice is saved to `~/.gstack/config.yaml` and remembered for future runs. +To skip the prompt, pass `--no-prefix` (short names) or `--prefix` (namespaced). + +### Step 3: Develop -**To go back to the stable global install**, just remove the symlink: +Edit a template, run `bun run gen:skill-docs`, and the next `/review` or `/qa` +call picks it up immediately. No restart needed. + +### Going back to the stable global install + +Remove the project-local symlink. Claude Code falls back to `~/.claude/skills/gstack/`: ```bash rm .claude/skills/gstack ``` -Claude Code falls back to `~/.claude/skills/gstack/` automatically. +The per-skill symlinks (`qa`, `ship`, etc.) still point to `gstack/...`, so they'll +resolve to the global install automatically. + +### Switching prefix mode + +If you vendored gstack with one prefix setting and want to switch: + +```bash +cd .claude/skills/gstack && ./setup --no-prefix # switch to /qa, /ship +cd .claude/skills/gstack && ./setup --prefix # switch to /gstack-qa, /gstack-ship +``` + +Setup cleans up the old symlinks automatically. No manual cleanup needed. ### Alternative: point your global install at a branch @@ -337,10 +373,10 @@ If you don't want per-project symlinks, you can switch the global install: cd ~/.claude/skills/gstack git fetch origin git checkout origin/ -bun install && bun run build +bun install && bun run build && ./setup ``` -This affects all projects. To revert: `git checkout main && git pull && bun run build`. +This affects all projects. To revert: `git checkout main && git pull && bun run build && ./setup`. ## Community PR triage (wave process) diff --git a/README.md b/README.md index 7ad49c2018b14b7b02f472203aa0d77fa0cdcb1b..fa61e86dc50a88e7f6a8ea6e83004d6d9a747742 100644 --- a/README.md +++ b/README.md @@ -259,6 +259,10 @@ Data is stored in [Supabase](https://supabase.com) (open source Firebase alterna **Stale install?** Run `/gstack-upgrade` — or set `auto_upgrade: true` in `~/.gstack/config.yaml` +**Want shorter commands?** `cd ~/.claude/skills/gstack && ./setup --no-prefix` — switches from `/gstack-qa` to `/qa`. Your choice is remembered for future upgrades. + +**Want namespaced commands?** `cd ~/.claude/skills/gstack && ./setup --prefix` — switches from `/qa` to `/gstack-qa`. Useful if you run other skill packs alongside gstack. + **Codex says "Skipped loading skill(s) due to invalid SKILL.md"?** Your Codex skill descriptions are stale. Fix: `cd ~/.codex/skills/gstack && git pull && ./setup --host codex` — or for repo-local installs: `cd "$(readlink -f .agents/skills/gstack)" && git pull && ./setup --host codex` **Windows users:** gstack works on Windows 11 via Git Bash or WSL. Node.js is required in addition to Bun — Bun has a known bug with Playwright's pipe transport on Windows ([bun#4253](https://github.com/oven-sh/bun/issues/4253)). The browse server automatically falls back to Node.js. Make sure both `bun` and `node` are on your PATH. diff --git a/SKILL.md b/SKILL.md index a98ce915d06ffc406d3212a331311b547d5f9853..aa0d42c580c7cdef951569dcf25d3ec16240ffa3 100644 --- a/SKILL.md +++ b/SKILL.md @@ -30,8 +30,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -55,6 +57,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/VERSION b/VERSION index 279d8af5e26e9854ccb06e3cc0e779f3a855dc0c..5db6e3f47a7b3879f811d35c80a5618f51b80f0a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.12.10.0 +0.12.11.0 diff --git a/autoplan/SKILL.md b/autoplan/SKILL.md index c77255d066724dbbc43f7ae9fc4f798e1e135018..662ef0409309f28dbbac58dd4d8114351fb9c37f 100644 --- a/autoplan/SKILL.md +++ b/autoplan/SKILL.md @@ -39,8 +39,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -64,6 +66,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/benchmark/SKILL.md b/benchmark/SKILL.md index 4752068367341203a73738d9e4aded93f13541d1..c709caadbf14399f82d6f4a115b7af6616bb0165 100644 --- a/benchmark/SKILL.md +++ b/benchmark/SKILL.md @@ -32,8 +32,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -57,6 +59,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/bin/gstack-config b/bin/gstack-config index e99a940b1e00daa5c059cfe5fcd9c9a08723199f..1147adddb94e1029f8756f69a5ec78786011b15b 100755 --- a/bin/gstack-config +++ b/bin/gstack-config @@ -23,7 +23,9 @@ case "${1:-}" in VALUE="${3:?Usage: gstack-config set }" mkdir -p "$STATE_DIR" if grep -qE "^${KEY}:" "$CONFIG_FILE" 2>/dev/null; then - sed -i '' "s/^${KEY}:.*/${KEY}: ${VALUE}/" "$CONFIG_FILE" + # Portable in-place edit (BSD sed uses -i '', GNU sed uses -i without arg) + _tmpfile="$(mktemp "${CONFIG_FILE}.XXXXXX")" + sed "s/^${KEY}:.*/${KEY}: ${VALUE}/" "$CONFIG_FILE" > "$_tmpfile" && mv "$_tmpfile" "$CONFIG_FILE" else echo "${KEY}: ${VALUE}" >> "$CONFIG_FILE" fi diff --git a/browse/SKILL.md b/browse/SKILL.md index 9a51c14252c6487b4c3c25085f246f0414d6f785..0aff8ea1881353af2439747f124e65fc187e1ae8 100644 --- a/browse/SKILL.md +++ b/browse/SKILL.md @@ -32,8 +32,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -57,6 +59,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/canary/SKILL.md b/canary/SKILL.md index e578e6898551e2b51ef454aa70f8e89c7235f207..753c370746e4d8531e7a2d59b2c9c9f4ceaaef35 100644 --- a/canary/SKILL.md +++ b/canary/SKILL.md @@ -32,8 +32,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -57,6 +59,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/codex/SKILL.md b/codex/SKILL.md index 28759158b46b892641b64d7d14f6b0f87ecdfd2d..1e974b0ffd82d9fc3f81ea8b9d1a0a9672f1a8d8 100644 --- a/codex/SKILL.md +++ b/codex/SKILL.md @@ -33,8 +33,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -58,6 +60,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/connect-chrome/SKILL.md b/connect-chrome/SKILL.md index fc323dec81980cfe048bf0a01864c983cb34e6e8..f6f48e506f1e99c9e15a5364d0490e0d1a52c01a 100644 --- a/connect-chrome/SKILL.md +++ b/connect-chrome/SKILL.md @@ -30,8 +30,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -55,6 +57,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/cso/SKILL.md b/cso/SKILL.md index 07026ad653e8a547aef81b45c174b17be52604b7..13fe35c614c431d923bd47f4b0feaddd0492da26 100644 --- a/cso/SKILL.md +++ b/cso/SKILL.md @@ -36,8 +36,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -61,6 +63,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/design-consultation/SKILL.md b/design-consultation/SKILL.md index 32394b37d98dddd4812a01d9b2559f1fd0f7b0e1..190b84e032092578aa1d61303a7be8f2f142018c 100644 --- a/design-consultation/SKILL.md +++ b/design-consultation/SKILL.md @@ -37,8 +37,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -62,6 +64,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/design-review/SKILL.md b/design-review/SKILL.md index 55674c3b37ed560a8e2586f9f178018da3cccf07..34c9e3319ce472a1185adb82e101ed8b4eefc343 100644 --- a/design-review/SKILL.md +++ b/design-review/SKILL.md @@ -37,8 +37,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -62,6 +64,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/document-release/SKILL.md b/document-release/SKILL.md index 7da2307bc3826bdd350ef25aa5cb044da14f9b6b..a44dbf7ddb8bf85bf6b7218ef2ac6d77f5831b10 100644 --- a/document-release/SKILL.md +++ b/document-release/SKILL.md @@ -34,8 +34,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -59,6 +61,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/investigate/SKILL.md b/investigate/SKILL.md index 3cf47b5d6b8e13a6387dd376d2b8550707553801..3f3d1c8416fdd3a3e6c6ca19cf90ab4cf3b8f890 100644 --- a/investigate/SKILL.md +++ b/investigate/SKILL.md @@ -48,8 +48,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -73,6 +75,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/land-and-deploy/SKILL.md b/land-and-deploy/SKILL.md index becc6b1ccd025588ea306390eedb4a100c44164a..b3e5c34edff2c71cebc08c1afbc00728cdb90368 100644 --- a/land-and-deploy/SKILL.md +++ b/land-and-deploy/SKILL.md @@ -31,8 +31,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -56,6 +58,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/office-hours/SKILL.md b/office-hours/SKILL.md index a51af616a5954b9afbd6691952f3f18f86d00b90..6568f5cba64da9a38d31a08465d41df71b64a7ff 100644 --- a/office-hours/SKILL.md +++ b/office-hours/SKILL.md @@ -39,8 +39,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -64,6 +66,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/package.json b/package.json index dc18d921ef7ae210ae08e8953097f16d8e43b96a..80f41b41bcd50c40d8e075cc499b6758e2a5b847 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gstack", - "version": "0.12.10.0", + "version": "0.12.11.0", "description": "Garry's Stack — Claude Code skills + fast headless browser. One repo, one install, entire AI engineering workflow.", "license": "MIT", "type": "module", diff --git a/plan-ceo-review/SKILL.md b/plan-ceo-review/SKILL.md index d8eba87640c07e72cc961f57eefd44150d518775..4e8b13c0d5d226082203a644225844fec34ad59a 100644 --- a/plan-ceo-review/SKILL.md +++ b/plan-ceo-review/SKILL.md @@ -37,8 +37,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -62,6 +64,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/plan-design-review/SKILL.md b/plan-design-review/SKILL.md index 31389bbc49d7d4f4fd19ded8ec7b33353017d7a5..1328222e3df5dab381a78b13f9a566ab42f78e62 100644 --- a/plan-design-review/SKILL.md +++ b/plan-design-review/SKILL.md @@ -35,8 +35,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -60,6 +62,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/plan-eng-review/SKILL.md b/plan-eng-review/SKILL.md index 9720f1b497acccfd9049eb2824c9f840bbbce556..caceb7e2c5659b4a3cc5aaa2d467674ff12aea1b 100644 --- a/plan-eng-review/SKILL.md +++ b/plan-eng-review/SKILL.md @@ -36,8 +36,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -61,6 +63,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/qa-only/SKILL.md b/qa-only/SKILL.md index d12d4284faf3cbdfa65df07ffa98a14368c01e37..8fafc61e3f354365eb090e9ddac01f49dd0ea98b 100644 --- a/qa-only/SKILL.md +++ b/qa-only/SKILL.md @@ -32,8 +32,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -57,6 +59,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/qa/SKILL.md b/qa/SKILL.md index ab517052d9fc1208ddbc4260404ee068fafedba2..7173e9310f99a092773300797f852a3242332cf3 100644 --- a/qa/SKILL.md +++ b/qa/SKILL.md @@ -38,8 +38,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -63,6 +65,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/retro/SKILL.md b/retro/SKILL.md index e048a38a289904504b0f556dfe5eccdedb283963..0b004fe66edf2913d300b7819518df7bd72bde55 100644 --- a/retro/SKILL.md +++ b/retro/SKILL.md @@ -32,8 +32,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -57,6 +59,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/review/SKILL.md b/review/SKILL.md index 1511b4c981e1476ca3f4856fc18be662ca29c91e..e5d856c8a51065cfd3db45e3d7d2013e8dc2fef9 100644 --- a/review/SKILL.md +++ b/review/SKILL.md @@ -35,8 +35,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -60,6 +62,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/scripts/resolvers/preamble.ts b/scripts/resolvers/preamble.ts index fe0ba77e82ac482fa310a3030b3b47cda2b62034..4e5092f8ace6ca299e01d96bf3961756a12e5170 100644 --- a/scripts/resolvers/preamble.ts +++ b/scripts/resolvers/preamble.ts @@ -24,8 +24,10 @@ _PROACTIVE=$(${ctx.paths.binDir}/gstack-config get proactive 2>/dev/null || echo _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(${ctx.paths.binDir}/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(${ctx.paths.binDir}/gstack-repo-mode 2>/dev/null) || true REPO_MODE=\${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -51,6 +53,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If \`SKILL_PREFIX\` is \`"true"\`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the \`/gstack-\` prefix (e.g., \`/gstack-qa\` instead +of \`/qa\`, \`/gstack-ship\` instead of \`/ship\`). Disk paths are unaffected — always use +\`${ctx.paths.skillRoot}/[skill-name]/SKILL.md\` for reading skill files. + If output shows \`UPGRADE_AVAILABLE \`: read \`${ctx.paths.skillRoot}/gstack-upgrade/SKILL.md\` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If \`JUST_UPGRADED \`: tell user "Running gstack v{to} (just updated!)" and continue.`; } diff --git a/setup b/setup index 71306839a58d123e8025344cc5b523a43ae22129..995833ae7479d48a9a20dd8058f87d021d95d135 100755 --- a/setup +++ b/setup @@ -24,12 +24,14 @@ esac HOST="claude" LOCAL_INSTALL=0 SKILL_PREFIX=1 +SKILL_PREFIX_FLAG=0 while [ $# -gt 0 ]; do case "$1" in --host) [ -z "$2" ] && echo "Missing value for --host (expected claude, codex, kiro, or auto)" >&2 && exit 1; HOST="$2"; shift 2 ;; --host=*) HOST="${1#--host=}"; shift ;; --local) LOCAL_INSTALL=1; shift ;; - --no-prefix) SKILL_PREFIX=0; shift ;; + --prefix) SKILL_PREFIX=1; SKILL_PREFIX_FLAG=1; shift ;; + --no-prefix) SKILL_PREFIX=0; SKILL_PREFIX_FLAG=1; shift ;; *) shift ;; esac done @@ -39,6 +41,44 @@ case "$HOST" in *) echo "Unknown --host value: $HOST (expected claude, codex, kiro, or auto)" >&2; exit 1 ;; esac +# ─── Resolve skill prefix preference ───────────────────────── +# Priority: CLI flag > saved config > interactive prompt (or flat default for non-TTY) +GSTACK_CONFIG="$SOURCE_GSTACK_DIR/bin/gstack-config" +if [ "$SKILL_PREFIX_FLAG" -eq 0 ]; then + _saved_prefix="$("$GSTACK_CONFIG" get skill_prefix 2>/dev/null || true)" + if [ "$_saved_prefix" = "true" ]; then + SKILL_PREFIX=1 + elif [ "$_saved_prefix" = "false" ]; then + SKILL_PREFIX=0 + else + # No saved preference — prompt interactively (or default flat for non-TTY) + if [ -t 0 ]; then + echo "" + echo "Skill naming: how should gstack skills appear?" + echo "" + echo " 1) Short names: /qa, /ship, /review" + echo " Recommended. Clean and fast to type." + echo "" + echo " 2) Namespaced: /gstack-qa, /gstack-ship, /gstack-review" + echo " Use this if you run other skill packs alongside gstack to avoid conflicts." + echo "" + printf "Choice [1/2] (default: 1): " + read -r _prefix_choice /dev/null || _prefix_choice="" + case "$_prefix_choice" in + 2) SKILL_PREFIX=1 ;; + *) SKILL_PREFIX=0 ;; + esac + else + SKILL_PREFIX=0 + fi + # Save the choice for future runs + "$GSTACK_CONFIG" set skill_prefix "$([ "$SKILL_PREFIX" -eq 1 ] && echo true || echo false)" 2>/dev/null || true + fi +else + # Flag was passed explicitly — persist the choice + "$GSTACK_CONFIG" set skill_prefix "$([ "$SKILL_PREFIX" -eq 1 ] && echo true || echo false)" 2>/dev/null || true +fi + # --local: install to .claude/skills/ in the current working directory if [ "$LOCAL_INSTALL" -eq 1 ]; then if [ "$HOST" = "codex" ]; then @@ -266,6 +306,38 @@ cleanup_old_claude_symlinks() { fi } +# ─── Helper: remove old prefixed Claude skill symlinks ──────────────────────── +# Reverse migration: when switching from gstack- prefixed names to flat names, +# clean up stale gstack-* symlinks that point into the gstack directory. +cleanup_prefixed_claude_symlinks() { + local gstack_dir="$1" + local skills_dir="$2" + local removed=() + for skill_dir in "$gstack_dir"/*/; do + if [ -f "$skill_dir/SKILL.md" ]; then + skill_name="$(basename "$skill_dir")" + [ "$skill_name" = "node_modules" ] && continue + # Only clean up prefixed symlinks for dirs that AREN'T already prefixed + # (e.g., remove gstack-qa but NOT gstack-upgrade which is the real dir name) + case "$skill_name" in gstack-*) continue ;; esac + prefixed_target="$skills_dir/gstack-$skill_name" + # Only remove if it's a symlink pointing into gstack/ + if [ -L "$prefixed_target" ]; then + link_dest="$(readlink "$prefixed_target" 2>/dev/null || true)" + case "$link_dest" in + gstack/*|*/gstack/*) + rm -f "$prefixed_target" + removed+=("gstack-$skill_name") + ;; + esac + fi + fi + done + if [ ${#removed[@]} -gt 0 ]; then + echo " cleaned up prefixed symlinks: ${removed[*]}" + fi +} + # ─── Helper: link generated Codex skills into a skills parent directory ── # Installs from .agents/skills/gstack-* (the generated Codex-format skills) # instead of source dirs (which have Claude paths). @@ -393,9 +465,11 @@ fi if [ "$INSTALL_CLAUDE" -eq 1 ]; then if [ "$SKILLS_BASENAME" = "skills" ]; then - # Clean up old unprefixed symlinks from previous installs + # Clean up stale symlinks from the opposite prefix mode if [ "$SKILL_PREFIX" -eq 1 ]; then cleanup_old_claude_symlinks "$SOURCE_GSTACK_DIR" "$INSTALL_SKILLS_DIR" + else + cleanup_prefixed_claude_symlinks "$SOURCE_GSTACK_DIR" "$INSTALL_SKILLS_DIR" fi link_claude_skill_dirs "$SOURCE_GSTACK_DIR" "$INSTALL_SKILLS_DIR" if [ "$LOCAL_INSTALL" -eq 1 ]; then @@ -497,8 +571,8 @@ if [ "$INSTALL_CODEX" -eq 1 ]; then fi # 8. First-time welcome + legacy cleanup -if [ ! -d "$HOME/.gstack" ]; then - mkdir -p "$HOME/.gstack" +if [ ! -f "$HOME/.gstack/.welcome-seen" ]; then echo " Welcome! Run /gstack-upgrade anytime to stay current." + touch "$HOME/.gstack/.welcome-seen" fi rm -f /tmp/gstack-latest-version diff --git a/setup-browser-cookies/SKILL.md b/setup-browser-cookies/SKILL.md index 95df0acb69e521d9a3b7ac3e69004ffff820452b..c20de97f36cb61cefee98386624c792377ae9daf 100644 --- a/setup-browser-cookies/SKILL.md +++ b/setup-browser-cookies/SKILL.md @@ -29,8 +29,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -54,6 +56,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/setup-deploy/SKILL.md b/setup-deploy/SKILL.md index 9d5eb3a96994765e9623e5d56c9d77fbdee2bde4..fed3f07e951a81f653d2f3a61c263614f43773e0 100644 --- a/setup-deploy/SKILL.md +++ b/setup-deploy/SKILL.md @@ -35,8 +35,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -60,6 +62,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/ship/SKILL.md b/ship/SKILL.md index 7929a9fb57e0d1919d2c6fb93a4ae4de6d38202c..c634aa5ceec76346076a5befc4e341f7f628be6d 100644 --- a/ship/SKILL.md +++ b/ship/SKILL.md @@ -33,8 +33,10 @@ _PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null _PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no") _BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") echo "BRANCH: $_BRANCH" +_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false") echo "PROACTIVE: $_PROACTIVE" echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED" +echo "SKILL_PREFIX: $_SKILL_PREFIX" source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true REPO_MODE=${REPO_MODE:-unknown} echo "REPO_MODE: $REPO_MODE" @@ -58,6 +60,11 @@ types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefl "I think /skillname might help here — want me to run it?" and wait for confirmation. The user opted out of proactive behavior. +If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting +or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead +of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use +`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files. + If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. diff --git a/test/gen-skill-docs.test.ts b/test/gen-skill-docs.test.ts index 2451b65e687a3a0c535721acffd0a544222c9d7d..e0159dd8585c87381e60b0cf850a1f84e0e2f5ce 100644 --- a/test/gen-skill-docs.test.ts +++ b/test/gen-skill-docs.test.ts @@ -1746,6 +1746,56 @@ describe('setup script validation', () => { ); expect(claudeInstallSection).toContain('cleanup_old_claude_symlinks'); }); + + // --- Persistent config + interactive prompt tests --- + + test('setup reads skill_prefix from config', () => { + expect(setupContent).toContain('get skill_prefix'); + expect(setupContent).toContain('GSTACK_CONFIG'); + }); + + test('setup supports --prefix flag', () => { + expect(setupContent).toContain('--prefix)'); + expect(setupContent).toContain('SKILL_PREFIX=1; SKILL_PREFIX_FLAG=1'); + }); + + test('--prefix and --no-prefix persist to config', () => { + expect(setupContent).toContain('set skill_prefix'); + }); + + test('interactive prompt shows when no config', () => { + expect(setupContent).toContain('Short names'); + expect(setupContent).toContain('Namespaced'); + expect(setupContent).toContain('Choice [1/2]'); + }); + + test('non-TTY defaults to flat names', () => { + // Should check if stdin is a TTY before prompting + expect(setupContent).toContain('-t 0'); + }); + + test('cleanup_prefixed_claude_symlinks exists and uses readlink', () => { + expect(setupContent).toContain('cleanup_prefixed_claude_symlinks'); + const fnStart = setupContent.indexOf('cleanup_prefixed_claude_symlinks()'); + const fnEnd = setupContent.indexOf('}', setupContent.indexOf('removed[@]}', fnStart)); + const fnBody = setupContent.slice(fnStart, fnEnd); + expect(fnBody).toContain('readlink'); + expect(fnBody).toContain('gstack-$skill_name'); + }); + + test('reverse cleanup runs before link when prefix is disabled', () => { + const claudeInstallSection = setupContent.slice( + setupContent.indexOf('INSTALL_CLAUDE'), + setupContent.lastIndexOf('link_claude_skill_dirs') + ); + expect(claudeInstallSection).toContain('cleanup_prefixed_claude_symlinks'); + }); + + test('welcome message references SKILL_PREFIX', () => { + // gstack-upgrade is always called gstack-upgrade (it's the actual dir name) + // but the welcome section should exist near the prefix logic + expect(setupContent).toContain('Run /gstack-upgrade anytime'); + }); }); describe('discover-skills hidden directory filtering', () => {