gstack/bin
Garry Tan 9562ad4e70
v1.53.1.0 fix: non-interactive-safe plan-tune hook install (flags + smart defaults) (#1805)
* feat(config): add plan_tune_hooks setting (prompt|yes|no)

Registers a new gstack-config key controlling whether ./setup installs the
plan-tune Claude Code hooks. Default "prompt". Documented in the config
header and surfaced in `gstack-config defaults` / `list`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(setup): make plan-tune hook install non-interactive-safe

The plan-tune consent prompt used a blocking `read -r` with no timeout. Under
a forwarded/automated TTY (conductor workspace setup, CI with a pty) it hung
setup forever.

Move the decision into flags + env + saved config with a smart default:
  --plan-tune-hooks / --no-plan-tune-hooks / --plan-tune-hooks=yes|no|prompt
  > GSTACK_PLAN_TUNE_HOOKS env > plan_tune_hooks config > prompt-on-real-TTY.

Explicit yes/no act non-interactively. The remaining interactive branch is
gated on a real (non-quiet) TTY and uses a time-bounded `read -t 10 </dev/tty`
that defaults to skip, so it can never hang. A timeout no longer persists a
decline marker, so a later hands-on run can still offer the install.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(dev-setup): run setup non-interactively in dev/workspace mode

Conductor runs bin/dev-setup under a forwarded pty, so any setup prompt
(skill-prefix, plan-tune consent) would hang the workspace. Detach stdin
(`setup </dev/null`) so every prompt takes its smart non-interactive default:
flat skill names, skip the global plan-tune hook install without writing a
decline marker. Saved prefix/config preferences are still honored, and a dev
workspace no longer silently mutates ~/.claude/settings.json.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(setup): guard plan-tune hooks stay non-interactive

Static + binary-level regression test (free, <1s): asserts the flags are
wired, the plan-tune read is time-bounded (no bare blocking read), explicit
yes/no decisions short-circuit before the prompt, and gstack-config knows the
plan_tune_hooks key.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(setup,config): harden plan-tune decision against bad input

Review follow-ups to the non-interactive plan-tune work:
- setup now lowercases + whitespace-strips the resolved decision before the
  case match, so an explicit opt-in via flag/env ("YES", "Yes", " yes") is
  honored instead of silently falling through to "prompt"/skip. Also accepts
  on/off and 1/0.
- gstack-config rejects out-of-domain plan_tune_hooks values (anything but
  prompt|yes|no) with a warning + fallback to prompt, matching the existing
  value-whitelist pattern for explain_level / artifacts_sync_mode.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(dev-setup): never mutate global hooks during workspace setup

Closing stdin alone only suppresses the prompt branch; a saved
`plan_tune_hooks: yes` or exported GSTACK_PLAN_TUNE_HOOKS=yes would still
resolve to "install" and rewrite the user's global ~/.claude/settings.json to
point at THIS ephemeral worktree — which breaks once the workspace is deleted.

Pass --plan-tune-hooks=prompt (highest precedence) so dev-setup pins resolution
to prompt-mode; with stdin closed that is a guaranteed no-op skip (no install,
no decline marker). To install the hooks, run ./setup --plan-tune-hooks directly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(setup): isolate config tests from host + cover new guards

- Point gstack-config tests at a temp GSTACK_HOME so `get plan_tune_hooks`
  reads the built-in default, not whatever the host machine has in
  ~/.gstack/config.yaml (the prior test was non-deterministic).
- Add behavioral coverage: yes/no/prompt round-trip, out-of-domain rejection.
- Add a normalization guard (decision input is lowercased/trimmed) and a
  dev-setup guard (runs setup with --plan-tune-hooks=prompt + stdin detached).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test: rebaseline parity-suite v1.44.1 -> v1.53.0.0

The frozen v1.44.1 anchor went stale: five planning skills (plan-ceo-review,
plan-eng-review, plan-design-review, investigate, office-hours) crept past the
1.05x ceiling via legitimate v1.49-v1.53 growth (brain-aware planning + the
v1.53 redaction guard), so `bun test` was red on a clean checkout of main.

Capture a fresh baseline at HEAD (bun run scripts/capture-baseline.ts --tag
v1.53.0.0) and re-point the test at it. The per-skill 1.05 ratio is kept, so
future bloat is still caught; only the anchor moved. Mirrors the earlier
skill-size-budget rebase (v1.44.1 -> v1.47.0.0). Historical v1.44.1 / v1.46.0.0
/ v1.47.0.0 baselines are retained for the v1->v2 audit trail. The captured
skill bytes equal origin/main exactly (this branch left every SKILL.md
untouched). Clears the pre-existing failures noted in the v1.53.0.0 CHANGELOG.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(plan-tune): de-flake "derive pushes scope_appetite up"

The test was ~25-50% flaky (worse on main). gstack-question-log fires a
fire-and-forget background `--derive` after every write; the 5 rapid log writes
spawned 5 racing background derives that collided with the test's explicit
--derive — a late one that only saw 3 entries could clobber
developer-profile.json after the explicit one wrote sample_size=5.

Set GSTACK_QUESTION_LOG_NO_DERIVE=1 (the flag the binary documents for exactly
this case) so the writes don't spawn background derives. The explicit --derive
still runs, so real derive behavior is still asserted. 20/20 green after.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: bump version and changelog (v1.53.1.0)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: document non-interactive dev-setup + plan-tune hook flags (v1.53.1.0)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 11:42:13 -07:00
..
chrome-cdp fix: security audit round 2 (v0.13.4.0) (#640) 2026-03-29 22:46:33 -06:00
dev-setup v1.53.1.0 fix: non-interactive-safe plan-tune hook install (flags + smart defaults) (#1805) 2026-05-30 11:42:13 -07:00
dev-teardown feat: multi-agent support — gstack works on Codex, Gemini CLI, and Cursor (v0.9.0) (#226) 2026-03-19 18:20:50 -07:00
gstack-analytics feat: opt-in usage telemetry + community intelligence platform (v0.8.6) (#210) 2026-03-19 17:21:05 -07:00
gstack-artifacts-init v1.40.0.0 fix wave: gbrain sync hardening (8 community PRs + migration) (#1547) 2026-05-17 08:26:36 -07:00
gstack-artifacts-url v1.43.2.0 fix wave: post-Daegu paper-cut — 18 fixes, 28 bisect commits (#1642) 2026-05-21 21:21:07 -07:00
gstack-brain-cache v1.52.1.0 feat: brain-aware planning — 5 skills read structured gbrain context before asking (#1742) 2026-05-29 08:35:00 -07:00
gstack-brain-consumer v1.17.0.0: setup-gbrain wireup ships the gbrain federation surface (#1234) 2026-04-28 01:17:54 -07:00
gstack-brain-context-load.ts v1.42.0.0 Daegu wave: 23 community-filed bugs + PTY classifier enforcement (24 bisect commits) (#1594) 2026-05-20 07:35:01 -07:00
gstack-brain-enqueue v1.27.0.0 feat: /setup-gbrain Path 4 (remote MCP) + brain → artifacts rename (#1351) 2026-05-06 19:37:53 -07:00
gstack-brain-reader feat(v1.9.0.0): gbrain-sync — cross-machine gstack memory (#1151) 2026-04-23 17:54:54 -07:00
gstack-brain-restore v1.27.0.0 feat: /setup-gbrain Path 4 (remote MCP) + brain → artifacts rename (#1351) 2026-05-06 19:37:53 -07:00
gstack-brain-sync v1.44.1.0 fix wave: post-windhoek paper-cut — 9 community PRs in one bundle (#1682) 2026-05-25 10:57:15 -07:00
gstack-brain-uninstall v1.27.0.0 feat: /setup-gbrain Path 4 (remote MCP) + brain → artifacts rename (#1351) 2026-05-06 19:37:53 -07:00
gstack-builder-profile feat: gstack v1 — simpler prompts + real LOC receipts (v1.0.0.0) (#1039) 2026-04-18 15:05:42 +08:00
gstack-codex-probe codex + Apple Silicon hardening wave (v0.18.4.0) (#1056) 2026-04-18 12:30:54 +08:00
gstack-codex-session-import v1.52.0.0 feat(plan-tune): explicit consent + first-run setup wizard for contributors (#1741) 2026-05-28 18:21:09 -07:00
gstack-community-dashboard fix: Supabase telemetry security lockdown (v0.11.16.0) (#460) 2026-03-24 15:01:31 -07:00
gstack-config v1.53.1.0 fix: non-interactive-safe plan-tune hook install (flags + smart defaults) (#1805) 2026-05-30 11:42:13 -07:00
gstack-developer-profile v1.52.0.0 feat(plan-tune): explicit consent + first-run setup wizard for contributors (#1741) 2026-05-28 18:21:09 -07:00
gstack-diff-scope v1.44.1.0 fix wave: post-windhoek paper-cut — 9 community PRs in one bundle (#1682) 2026-05-25 10:57:15 -07:00
gstack-distill-apply v1.52.0.0 feat(plan-tune): explicit consent + first-run setup wizard for contributors (#1741) 2026-05-28 18:21:09 -07:00
gstack-distill-free-text v1.52.0.0 feat(plan-tune): explicit consent + first-run setup wizard for contributors (#1741) 2026-05-28 18:21:09 -07:00
gstack-extension feat: headed mode + sidebar agent + Chrome extension (v0.12.0) (#517) 2026-03-26 11:15:24 -06:00
gstack-gbrain-detect v1.43.2.0 fix wave: post-Daegu paper-cut — 18 fixes, 28 bisect commits (#1642) 2026-05-21 21:21:07 -07:00
gstack-gbrain-install v1.43.1.0 feat: default PGLite to voyage-code-3 for code search + e2e tests (#1639) 2026-05-21 18:55:55 -07:00
gstack-gbrain-lib.sh v1.43.2.0 fix wave: post-Daegu paper-cut — 18 fixes, 28 bisect commits (#1642) 2026-05-21 21:21:07 -07:00
gstack-gbrain-mcp-verify v1.27.0.0 feat: /setup-gbrain Path 4 (remote MCP) + brain → artifacts rename (#1351) 2026-05-06 19:37:53 -07:00
gstack-gbrain-repo-policy v1.12.0.0 feat: /setup-gbrain — coding-agent onboarding for gbrain (#1183) 2026-04-24 01:38:21 -07:00
gstack-gbrain-source-wireup v1.27.0.0 feat: /setup-gbrain Path 4 (remote MCP) + brain → artifacts rename (#1351) 2026-05-06 19:37:53 -07:00
gstack-gbrain-supabase-provision v1.43.2.0 fix wave: post-Daegu paper-cut — 18 fixes, 28 bisect commits (#1642) 2026-05-21 21:21:07 -07:00
gstack-gbrain-supabase-verify v1.12.0.0 feat: /setup-gbrain — coding-agent onboarding for gbrain (#1183) 2026-04-24 01:38:21 -07:00
gstack-gbrain-sync.ts v1.43.2.0 fix wave: post-Daegu paper-cut — 18 fixes, 28 bisect commits (#1642) 2026-05-21 21:21:07 -07:00
gstack-global-discover.ts v1.41.1.0 fix wave: 7 HIGH bugs from external audit + regression tests (PR #1169 follow-up) (#1592) 2026-05-20 06:56:41 -07:00
gstack-ios-qa-daemon v1.43.0.0 feat: iOS device-farm (5 skills, Mac daemon, Tailscale) (#1574) 2026-05-21 16:09:26 -07:00
gstack-ios-qa-mint v1.43.0.0 feat: iOS device-farm (5 skills, Mac daemon, Tailscale) (#1574) 2026-05-21 16:09:26 -07:00
gstack-jsonl-merge v1.27.0.0 feat: /setup-gbrain Path 4 (remote MCP) + brain → artifacts rename (#1351) 2026-05-06 19:37:53 -07:00
gstack-learnings-log v1.34.2.0 fix wave: /codex review on CLI 0.130+, /investigate learnings, /sync-gbrain on Supabase (3 community-reported bugs) (#1478) 2026-05-14 11:11:52 -04:00
gstack-learnings-search v1.43.2.0 fix wave: post-Daegu paper-cut — 18 fixes, 28 bisect commits (#1642) 2026-05-21 21:21:07 -07:00
gstack-memory-ingest.ts v1.43.2.0 fix wave: post-Daegu paper-cut — 18 fixes, 28 bisect commits (#1642) 2026-05-21 21:21:07 -07:00
gstack-model-benchmark v1.43.2.0 fix wave: post-Daegu paper-cut — 18 fixes, 28 bisect commits (#1642) 2026-05-21 21:21:07 -07:00
gstack-next-version v1.44.1.0 fix wave: post-windhoek paper-cut — 9 community PRs in one bundle (#1682) 2026-05-25 10:57:15 -07:00
gstack-open-url feat: community wave — 7 fixes, relink, sidebar Write, discoverability (v0.13.5.0) (#641) 2026-03-29 21:43:36 -06:00
gstack-patch-names fix: ship idempotency + skill prefix name patching (v0.14.3.0) (#693) 2026-03-30 22:25:46 -06:00
gstack-paths v1.42.0.0 Daegu wave: 23 community-filed bugs + PTY classifier enforcement (24 bisect commits) (#1594) 2026-05-20 07:35:01 -07:00
gstack-platform-detect feat: declarative multi-host platform + OpenCode, Slate, Cursor, OpenClaw (v0.15.5.0) (#793) 2026-04-04 15:32:20 -07:00
gstack-pr-title-rewrite.sh v1.23.0.0 feat: always prefix PR titles with v<VERSION> (#1284) 2026-05-01 07:06:37 -07:00
gstack-question-log v1.52.0.0 feat(plan-tune): explicit consent + first-run setup wizard for contributors (#1741) 2026-05-28 18:21:09 -07:00
gstack-question-preference v1.52.0.0 feat(plan-tune): explicit consent + first-run setup wizard for contributors (#1741) 2026-05-28 18:21:09 -07:00
gstack-redact v1.53.0.0 feat: smarter redaction — PII/secrets/legal guard across /spec, /ship, /cso, /document-* (#1797) 2026-05-30 08:54:46 -07:00
gstack-redact-prepush v1.53.0.0 feat: smarter redaction — PII/secrets/legal guard across /spec, /ship, /cso, /document-* (#1797) 2026-05-30 08:54:46 -07:00
gstack-relink v1.43.2.0 fix wave: post-Daegu paper-cut — 18 fixes, 28 bisect commits (#1642) 2026-05-21 21:21:07 -07:00
gstack-repo-mode feat: test coverage catalog — shared audit across plan/ship/review (v0.10.1.0) (#259) 2026-03-22 11:28:16 -07:00
gstack-review-log feat(v1.9.0.0): gbrain-sync — cross-machine gstack memory (#1151) 2026-04-23 17:54:54 -07:00
gstack-review-read fix: gstack-slug bash compatibility — source to eval (#354) 2026-03-22 21:02:01 -07:00
gstack-security-dashboard feat(security): ML prompt injection defense for sidebar (v1.4.0.0) (#1089) 2026-04-20 22:18:37 +08:00
gstack-session-update feat: team-friendly gstack install mode (v0.15.7.0) (#809) 2026-04-05 23:49:03 -07:00
gstack-settings-hook v1.52.0.0 feat(plan-tune): explicit consent + first-run setup wizard for contributors (#1741) 2026-05-28 18:21:09 -07:00
gstack-slug fix: gstack-slug produces deterministic slugs across sessions (#897) 2026-04-07 15:42:13 -10:00
gstack-specialist-stats feat: adaptive gating + cross-review dedup for review army (v0.15.2.0) (#760) 2026-04-04 22:46:21 -07:00
gstack-taste-update feat(v1.3.0.0): open agents learnings + cross-model benchmark skill (#1040) 2026-04-19 17:50:31 +08:00
gstack-team-init fix: security wave 3 — 12 fixes, 7 contributors (v0.16.4.0) (#988) 2026-04-13 07:49:37 -10:00
gstack-telemetry-log feat(security): ML prompt injection defense for sidebar (v1.4.0.0) (#1089) 2026-04-20 22:18:37 +08:00
gstack-telemetry-sync v1.41.1.0 fix wave: 7 HIGH bugs from external audit + regression tests (PR #1169 follow-up) (#1592) 2026-05-20 06:56:41 -07:00
gstack-timeline-log v1.27.0.0 feat: /setup-gbrain Path 4 (remote MCP) + brain → artifacts rename (#1351) 2026-05-06 19:37:53 -07:00
gstack-timeline-read v1.44.1.0 fix wave: post-windhoek paper-cut — 9 community PRs in one bundle (#1682) 2026-05-25 10:57:15 -07:00
gstack-uninstall v1.52.0.0 feat(plan-tune): explicit consent + first-run setup wizard for contributors (#1741) 2026-05-28 18:21:09 -07:00
gstack-update-check v1.34.1.0 fix: gstack-update-check resists stale GitHub raw CDN + adds semver-order guard (#1475) 2026-05-13 13:37:31 -04:00