Skip to content

feat: team-friendly gstack install mode (v0.15.7.0)#809

Open
garrytan wants to merge 12 commits intomainfrom
garrytan/team-install-mode
Open

feat: team-friendly gstack install mode (v0.15.7.0)#809
garrytan wants to merge 12 commits intomainfrom
garrytan/team-install-mode

Conversation

@garrytan
Copy link
Copy Markdown
Owner

@garrytan garrytan commented Apr 5, 2026

Summary

Teams can now keep every developer on the same gstack version automatically. No more vendoring 342 files into your repo. No more version drift across 10 concurrent monorepo checkouts. No more "who upgraded gstack last?" Slack threads.

Hat tip to Jared Friedman for the design.

Team mode

  • ./setup --team registers a SessionStart hook that auto-updates gstack at session start. Background fork (zero latency), throttled to once/hour, network-failure-safe.
  • ./setup --no-team reverses it. ./setup -q for silent operation.
  • gstack-team-init optional|required generates repo-level bootstrap files: CLAUDE.md section + enforcement hook (required mode blocks work without gstack).

Infrastructure

  • bin/gstack-settings-hook DRY helper for atomic JSON manipulation of ~/.claude/settings.json
  • bin/gstack-session-update SessionStart hook target with PID-based lockfile, stale recovery, GIT_TERMINAL_PROMPT=0, debug log
  • Preamble vendoring deprecation detects vendored copies, offers one-time migration

Docs & cleanup

  • README: vendoring section replaced with team mode instructions
  • CLAUDE.md/CONTRIBUTING.md: vendoring language updated
  • gstack-uninstall cleans up SessionStart hooks
  • --local prints deprecation warning

Test Coverage

20 integration tests covering: settings-hook (add, remove, dedup, preserve existing, atomic write), session-update (guards, throttle, non-fatal), team-init (optional, required, enforcement hook, idempotent), setup flags (-q, --local deprecation).

Pre-Landing Review

CEO review (SELECTIVE EXPANSION) + Eng review completed in this session. Outside voice (Claude subagent) caught 4 issues, all resolved.

Test plan

  • All team-mode tests pass (20 tests, 0 failures)
  • All existing tests pass (bun test)
  • Merge conflicts with main resolved (VERSION + CHANGELOG)

🤖 Generated with Claude Code

garrytan and others added 11 commits April 4, 2026 21:00
DRY helper for adding/removing SessionStart hooks in ~/.claude/settings.json.
Handles missing files, deduplication, malformed JSON, and atomic writes
(.tmp + rename) to prevent corruption on crash or disk-full.

Part of team-install-mode feature (credit: Jared Friedman).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SessionStart hook target that auto-updates gstack at session start.
Background fork (zero latency), throttled to once/hour, with lockfile
(mkdir + PID), stale lock recovery, GIT_TERMINAL_PROMPT=0, and debug
logging to ~/.gstack/analytics/session-update.log.

Part of team-install-mode feature (credit: Jared Friedman).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
--team enables auto_upgrade and registers SessionStart hook via
gstack-settings-hook. --no-team reverses it. -q/--quiet suppresses
all informational output (for hook-triggered setup runs). --local
now prints a deprecation warning.

Replaces ~20 echo calls with log() helper for quiet mode support.

Part of team-install-mode feature (credit: Jared Friedman).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two modes: 'optional' (gentle CLAUDE.md suggestion) and 'required'
(CLAUDE.md enforcement + .claude/hooks/check-gstack.sh PreToolUse hook
that blocks work without gstack installed). Atomic JSON writes,
idempotent, prints git add instructions.

Part of team-install-mode feature (credit: Jared Friedman).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- README: replace "Step 2: Add to your repo" vendoring instructions
  with team mode (./setup --team + gstack-team-init)
- CLAUDE.md: rename "Vendored symlink awareness" to "Dev symlink
  awareness", add deprecation note
- CONTRIBUTING.md: remove vendoring language from prefix section
- bin/gstack-uninstall: clean up SessionStart hook on uninstall

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Detects vendored gstack in CWD (.claude/skills/gstack/ that's not a
symlink and has VERSION or .git). Outputs VENDORED_GSTACK: yes/no.
Adds generateVendoringDeprecation() section that offers one-time
migration to team mode via AskUserQuestion.

Part of team-install-mode feature (credit: Jared Friedman).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Covers gstack-settings-hook (add, remove, dedup, preserve existing,
atomic write), gstack-session-update (guards, throttle, non-fatal),
gstack-team-init (optional, required, enforcement hook, idempotent),
and setup flags (-q, --local deprecation).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 5, 2026

E2E Evals: ✅ PASS

61/61 tests passed | $6.73 total cost | 12 parallel runners

Suite Result Status Cost
e2e-browse 6/6 $0.18
e2e-deploy 6/6 $1.04
e2e-design 3/3 $0.45
e2e-plan 7/7 $1.2
e2e-qa-workflow 3/3 $0.99
e2e-review 6/6 $1.04
e2e-workflow 3/3 $0.36
llm-judge 24/24 $0.48
e2e-qa-workflow 3/3 $0.99

12x ubicloud-standard-2 (Docker: pre-baked toolchain + deps) | wall clock ≈ slowest suite

Bump to v0.15.9.0 (above main's 0.15.8.0). Keep team mode entry on top,
main's Smarter Reviews and Security Wave 1 entries below.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant