mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-28 07:32:14 +02:00
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.
This commit is contained in:
+10
-4
@@ -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)
|
## Step 1.7: Code-intelligence provider choice (Step 0 of indexing)
|
||||||
|
|
||||||
gbrain is one of THREE code-intelligence providers gstack can use; the offer
|
You are INSIDE /setup-gbrain: the user asked for gbrain by name, so the
|
||||||
gate decides whether this repo is even worth indexing:
|
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
|
```bash
|
||||||
[ -f ~/.claude/skills/gstack/bin/gstack-code-intelligence ] \
|
[ -f ~/.claude/skills/gstack/bin/gstack-code-intelligence ] \
|
||||||
&& bun ~/.claude/skills/gstack/bin/gstack-code-intelligence suggest --json \
|
&& bun ~/.claude/skills/gstack/bin/gstack-code-intelligence select gbrain 2>/dev/null \
|
||||||
|| echo '{"offer": false, "reason": "bin-absent"}'
|
|| 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
|
- `"offer": false` with reason `bin-absent` → the installed gstack predates
|
||||||
the code-intelligence CLI. Skip this step entirely and continue with the
|
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
|
skill — the user asked for gbrain, so set up gbrain. Never block setup on
|
||||||
|
|||||||
@@ -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)
|
## Step 1.7: Code-intelligence provider choice (Step 0 of indexing)
|
||||||
|
|
||||||
gbrain is one of THREE code-intelligence providers gstack can use; the offer
|
You are INSIDE /setup-gbrain: the user asked for gbrain by name, so the
|
||||||
gate decides whether this repo is even worth indexing:
|
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
|
```bash
|
||||||
[ -f ~/.claude/skills/gstack/bin/gstack-code-intelligence ] \
|
[ -f ~/.claude/skills/gstack/bin/gstack-code-intelligence ] \
|
||||||
&& bun ~/.claude/skills/gstack/bin/gstack-code-intelligence suggest --json \
|
&& bun ~/.claude/skills/gstack/bin/gstack-code-intelligence select gbrain 2>/dev/null \
|
||||||
|| echo '{"offer": false, "reason": "bin-absent"}'
|
|| 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
|
- `"offer": false` with reason `bin-absent` → the installed gstack predates
|
||||||
the code-intelligence CLI. Skip this step entirely and continue with the
|
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
|
skill — the user asked for gbrain, so set up gbrain. Never block setup on
|
||||||
|
|||||||
Reference in New Issue
Block a user