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