From 9093238eef258f50738178c17f600360574e936b Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Thu, 19 Nov 2026 13:09:51 -0800 Subject: [PATCH] gstack tells you what it's adding before it installs a background job or extension (GST-3239) (#4538) gstack now tells you in one line what it's about to add, where you'll see it and how to remove it, before anything that keeps running or shows up goes onto your machine. This follows the standing rule that nothing gets added to Garry's devices without that line and a name he'd recognize. Nothing to do: behavior of the jobs themselves is unchanged. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1/specialist-batched#1 reader=testing --- CLAUDE.md | 10 +- bin/gstack-extension | 2 + ...ell-users-before-adding-background-jobs.md | 1 + sync-gbrain/SKILL.md | 10 +- sync-gbrain/SKILL.md.tmpl | 10 +- test/background-job-notice.test.ts | 133 ++++++++++++++++++ 6 files changed, 157 insertions(+), 9 deletions(-) create mode 100644 changelog.d/tell-users-before-adding-background-jobs.md create mode 100644 test/background-job-notice.test.ts diff --git a/CLAUDE.md b/CLAUDE.md index 0ad5a5d00..60bcc507b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -614,9 +614,13 @@ Prefer gbrain when: `gbrain search "" --source gstack-artifacts-` Grep is still right for known exact strings, regex, multiline patterns, and -file globs. Run `/sync-gbrain` after meaningful code changes; for ongoing -auto-sync across all worktrees, run `gbrain autopilot --install` once per -machine — gbrain's daemon handles incremental refresh on a schedule. +file globs. Run `/sync-gbrain` after meaningful code changes. For ongoing +auto-sync across all worktrees, gbrain can add a background job once per +machine. Before you add it, tell the user this one line: "Adding a background +job called com.gbrain.autopilot that keeps gbrain's index of your repos fresh +on a schedule. You'll see it under System Settings → General → Login Items on +a Mac, or as gbrain-autopilot.service in `systemctl --user` on Linux. Remove it +with: gbrain autopilot --uninstall". Then run `gbrain autopilot --install`. Safety: don't run `/sync-gbrain` while `gbrain autopilot` is active — the orchestrator refuses destructive source ops when it detects a running autopilot diff --git a/bin/gstack-extension b/bin/gstack-extension index 8d0a62af9..209ce102f 100755 --- a/bin/gstack-extension +++ b/bin/gstack-extension @@ -51,6 +51,8 @@ echo " No manual installation needed!" echo "" echo "Manual install (for your regular Chrome):" echo "" +echo " Adding a Chrome extension called gstack browse that adds the gstack side panel to your regular Chrome. You'll see it as the gstack browse icon in Chrome's toolbar and on chrome://extensions. Remove it with: chrome://extensions → gstack browse → Remove" +echo "" echo " 1. Opening chrome://extensions now..." # Open chrome://extensions diff --git a/changelog.d/tell-users-before-adding-background-jobs.md b/changelog.d/tell-users-before-adding-background-jobs.md new file mode 100644 index 000000000..35a51cc38 --- /dev/null +++ b/changelog.d/tell-users-before-adding-background-jobs.md @@ -0,0 +1 @@ +- **gstack now says what it's adding before it adds a background job or a browser extension.** Before /sync-gbrain's guidance has your agent run `gbrain autopilot --install`, the agent tells you in one line that it's adding `com.gbrain.autopilot`, what it does, where you'll see it and that `gbrain autopilot --uninstall` removes it. `gstack-extension` prints the same kind of line for the gstack browse Chrome extension before it opens chrome://extensions. A new test fails if a future install step in gstack lacks that line. diff --git a/sync-gbrain/SKILL.md b/sync-gbrain/SKILL.md index 455176629..337eeed29 100644 --- a/sync-gbrain/SKILL.md +++ b/sync-gbrain/SKILL.md @@ -580,9 +580,13 @@ Prefer gbrain when: `gbrain search "" --source gstack-artifacts-` Grep is still right for known exact strings, regex, multiline patterns, and -file globs. Run `/sync-gbrain` after meaningful code changes; for ongoing -auto-sync across all worktrees, run `gbrain autopilot --install` once per -machine — gbrain's daemon handles incremental refresh on a schedule. +file globs. Run `/sync-gbrain` after meaningful code changes. For ongoing +auto-sync across all worktrees, gbrain can add a background job once per +machine. Before you add it, tell the user this one line: "Adding a background +job called com.gbrain.autopilot that keeps gbrain's index of your repos fresh +on a schedule. You'll see it under System Settings → General → Login Items on +a Mac, or as gbrain-autopilot.service in `systemctl --user` on Linux. Remove it +with: gbrain autopilot --uninstall". Then run `gbrain autopilot --install`. Safety: don't run `/sync-gbrain` while `gbrain autopilot` is active — the orchestrator refuses destructive source ops when it detects a running autopilot diff --git a/sync-gbrain/SKILL.md.tmpl b/sync-gbrain/SKILL.md.tmpl index e757826fa..19de404a6 100644 --- a/sync-gbrain/SKILL.md.tmpl +++ b/sync-gbrain/SKILL.md.tmpl @@ -508,9 +508,13 @@ Prefer gbrain when: `gbrain search "" --source gstack-artifacts-` Grep is still right for known exact strings, regex, multiline patterns, and -file globs. Run `/sync-gbrain` after meaningful code changes; for ongoing -auto-sync across all worktrees, run `gbrain autopilot --install` once per -machine — gbrain's daemon handles incremental refresh on a schedule. +file globs. Run `/sync-gbrain` after meaningful code changes. For ongoing +auto-sync across all worktrees, gbrain can add a background job once per +machine. Before you add it, tell the user this one line: "Adding a background +job called com.gbrain.autopilot that keeps gbrain's index of your repos fresh +on a schedule. You'll see it under System Settings → General → Login Items on +a Mac, or as gbrain-autopilot.service in `systemctl --user` on Linux. Remove it +with: gbrain autopilot --uninstall". Then run `gbrain autopilot --install`. Safety: don't run `/sync-gbrain` while `gbrain autopilot` is active — the orchestrator refuses destructive source ops when it detects a running autopilot diff --git a/test/background-job-notice.test.ts b/test/background-job-notice.test.ts new file mode 100644 index 000000000..0c0176efc --- /dev/null +++ b/test/background-job-notice.test.ts @@ -0,0 +1,133 @@ +/** + * Background-job notice (R115): before gstack adds anything that keeps running + * or shows up on the user's machine (a launch agent, systemd unit, crontab + * line, login item or browser extension), it tells them in one line what it + * is called, what it does, where they'll see it and how to remove it: + * + * Adding a called