From 7494f155412d28e837158e6f8799608378e3179a Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sat, 15 Aug 2026 00:09:51 -0700 Subject: [PATCH] fix(setup-gbrain): never ask the provider question inside /setup-gbrain Invoking /setup-gbrain IS the provider choice. Step 1.7 now records 'select gbrain' best-effort and proceeds straight to setup; the offer ceremony is reserved for entry points where no provider was named. On machines where the code-intelligence CLI exists, the offer:true path was hijacking setup into the provider ceremony and the E2E child never reached MCP registration. --- setup-gbrain/SKILL.md | 14 ++++++++++---- setup-gbrain/SKILL.md.tmpl | 14 ++++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/setup-gbrain/SKILL.md b/setup-gbrain/SKILL.md index a019d912a..e59a1160d 100644 --- a/setup-gbrain/SKILL.md +++ b/setup-gbrain/SKILL.md @@ -921,15 +921,21 @@ Step 1.5 — fall through to Step 2 (where `no-cli` triggers Step 3 install and ## Step 1.7: Code-intelligence provider choice (Step 0 of indexing) -gbrain is one of THREE code-intelligence providers gstack can use; the offer -gate decides whether this repo is even worth indexing: +You are INSIDE /setup-gbrain: the user asked for gbrain by name, so the +provider question is already answered. NEVER ask it here, and never let this +step delay or derail the actual setup. Record the choice best-effort, then +continue immediately with Step 2: ```bash [ -f ~/.claude/skills/gstack/bin/gstack-code-intelligence ] \ - && bun ~/.claude/skills/gstack/bin/gstack-code-intelligence suggest --json \ - || echo '{"offer": false, "reason": "bin-absent"}' + && bun ~/.claude/skills/gstack/bin/gstack-code-intelligence select gbrain 2>/dev/null \ + || true ``` +The offer ceremony below applies ONLY when this skill is reached from another +entry point where no provider was named (a routing skill exploring indexing +options). Even then: + - `"offer": false` with reason `bin-absent` → the installed gstack predates the code-intelligence CLI. Skip this step entirely and continue with the skill — the user asked for gbrain, so set up gbrain. Never block setup on diff --git a/setup-gbrain/SKILL.md.tmpl b/setup-gbrain/SKILL.md.tmpl index dc7f53183..2eff76403 100644 --- a/setup-gbrain/SKILL.md.tmpl +++ b/setup-gbrain/SKILL.md.tmpl @@ -163,15 +163,21 @@ Step 1.5 — fall through to Step 2 (where `no-cli` triggers Step 3 install and ## Step 1.7: Code-intelligence provider choice (Step 0 of indexing) -gbrain is one of THREE code-intelligence providers gstack can use; the offer -gate decides whether this repo is even worth indexing: +You are INSIDE /setup-gbrain: the user asked for gbrain by name, so the +provider question is already answered. NEVER ask it here, and never let this +step delay or derail the actual setup. Record the choice best-effort, then +continue immediately with Step 2: ```bash [ -f ~/.claude/skills/gstack/bin/gstack-code-intelligence ] \ - && bun ~/.claude/skills/gstack/bin/gstack-code-intelligence suggest --json \ - || echo '{"offer": false, "reason": "bin-absent"}' + && bun ~/.claude/skills/gstack/bin/gstack-code-intelligence select gbrain 2>/dev/null \ + || true ``` +The offer ceremony below applies ONLY when this skill is reached from another +entry point where no provider was named (a routing skill exploring indexing +options). Even then: + - `"offer": false` with reason `bin-absent` → the installed gstack predates the code-intelligence CLI. Skip this step entirely and continue with the skill — the user asked for gbrain, so set up gbrain. Never block setup on