fix(setup-gbrain): the code-intelligence offer gate skips when the bin is absent

The new Step 1.7 told the agent to run gstack-code-intelligence before
the path pick — on installs predating the CLI (and hermetic E2E
children) the bin doesn't exist and setup derailed before doing any
setup. The gate now probes for the bin and reports offer:false
reason:bin-absent, with explicit instructions to proceed: the user asked
for gbrain, so set up gbrain. Never block setup on an optional gate.
This commit is contained in:
Garry Tan 2026-08-14 21:22:37 -07:00
parent 00220256a2
commit 11b3e517d7
No known key found for this signature in database
GPG Key ID: C1F69E85C74EFE1D
2 changed files with 16 additions and 2 deletions

View File

@ -925,9 +925,16 @@ gbrain is one of THREE code-intelligence providers gstack can use; the offer
gate decides whether this repo is even worth indexing: gate decides whether this repo is even worth indexing:
```bash ```bash
bun ~/.claude/skills/gstack/bin/gstack-code-intelligence suggest --json [ -f ~/.claude/skills/gstack/bin/gstack-code-intelligence ] \
&& bun ~/.claude/skills/gstack/bin/gstack-code-intelligence suggest --json \
|| echo '{"offer": false, "reason": "bin-absent"}'
``` ```
- `"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
a missing optional gate.
- `"offer": false` with reason `small-repo` → grep is already fast here; say - `"offer": false` with reason `small-repo` → grep is already fast here; say
so in one line and continue with this skill only if the user asked for so in one line and continue with this skill only if the user asked for
gbrain by name. gbrain by name.

View File

@ -167,9 +167,16 @@ gbrain is one of THREE code-intelligence providers gstack can use; the offer
gate decides whether this repo is even worth indexing: gate decides whether this repo is even worth indexing:
```bash ```bash
bun ~/.claude/skills/gstack/bin/gstack-code-intelligence suggest --json [ -f ~/.claude/skills/gstack/bin/gstack-code-intelligence ] \
&& bun ~/.claude/skills/gstack/bin/gstack-code-intelligence suggest --json \
|| echo '{"offer": false, "reason": "bin-absent"}'
``` ```
- `"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
a missing optional gate.
- `"offer": false` with reason `small-repo` → grep is already fast here; say - `"offer": false` with reason `small-repo` → grep is already fast here; say
so in one line and continue with this skill only if the user asked for so in one line and continue with this skill only if the user asked for
gbrain by name. gbrain by name.