mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-10 23:19:09 +02:00
fix(relink): skill_prefix patches the gbrain render too — the file the host actually serves (#2738)
gstack-relink linked SKILL.md from RENDER_DIR when a gbrain render was active but ran gstack-patch-names only on INSTALL_DIR, so the served frontmatter kept the unprefixed name and skill_prefix=true silently no-oped for every brain-aware skill. The render tree (user-owned, untracked) is now patched too; gstack-patch-names is idempotent so repeat relinks never double-prefix. The gen-skill-docs note that pointed users at relink now describes what relink actually covers. Receipt: the new test fails on a v1.77.0.0 scratch worktree (served render keeps 'name: qa'). Fixes #2738 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
f7e378cebe
commit
e2d6cb570f
+7
-1
@@ -110,8 +110,14 @@ for skill_dir in "$INSTALL_DIR"/*/; do
|
||||
SKILL_COUNT=$((SKILL_COUNT + 1))
|
||||
done
|
||||
|
||||
# Patch SKILL.md name: fields to match prefix setting
|
||||
# Patch SKILL.md name: fields to match prefix setting. When a gbrain render
|
||||
# is active the loop above links SKILL.md from RENDER_DIR — the file the host
|
||||
# actually serves — so patch THAT tree too or skill_prefix=true is a no-op
|
||||
# for every brain-aware skill (#2738). gstack-patch-names takes an arbitrary
|
||||
# root, skips already-prefixed names (idempotent), and the render dir is
|
||||
# user-owned and untracked, so patching it never dirties a checkout.
|
||||
"$INSTALL_DIR/bin/gstack-patch-names" "$INSTALL_DIR" "$PREFIX"
|
||||
[ -d "$RENDER_DIR" ] && "$INSTALL_DIR/bin/gstack-patch-names" "$RENDER_DIR" "$PREFIX"
|
||||
|
||||
if [ "$PREFIX" = "true" ]; then
|
||||
echo "Relinked $SKILL_COUNT skills as gstack-*"
|
||||
|
||||
Reference in New Issue
Block a user