feat: add remote slug helper and auto-gitignore for .gstack/

- getRemoteSlug() in config.ts: parses git remote origin → owner-repo format
- browse/bin/remote-slug: shell helper for SKILL.md use (BSD sed compatible)
- ensureStateDir() now appends .gstack/ to project .gitignore if not present
- setup creates ~/.gstack/projects/ global state directory
- 7 new tests: 4 gitignore behavior + 3 remote slug parsing
This commit is contained in:
Garry Tan
2026-03-14 00:10:00 -05:00
parent 02f0ca6938
commit ff5cbbbfef
4 changed files with 129 additions and 2 deletions
+4 -1
View File
@@ -57,7 +57,10 @@ if ! ensure_playwright_browser; then
exit 1
fi
# 3. Only create skill symlinks if we're inside a .claude/skills directory
# 3. Ensure ~/.gstack global state directory exists
mkdir -p "$HOME/.gstack/projects"
# 4. Only create skill symlinks if we're inside a .claude/skills directory
SKILLS_BASENAME="$(basename "$SKILLS_DIR")"
if [ "$SKILLS_BASENAME" = "skills" ]; then
linked=()