You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per plan D4, D10, D11, D12. Wires the skill prose to the new
split-engine flow + classifier introduced in earlier commits.
setup-gbrain/SKILL.md.tmpl:
- Step 1: detect output description now includes the v1.34.0.0
gbrain_local_status field (5 values).
- Step 1.5 (NEW): broken-db / broken-config remediation. AskUserQuestion
with 4 options — Retry / Switch to PGLite / Switch brain mode / Quit
(plan D4). Retry is recommended first since broken-db often = transient
Postgres outage. PGLite is explicitly one-way + destructive (moves
existing config to ~/.gbrain/config.json.gstack-bak-<ts>); rollback on
init failure restores the .bak (plan D7).
- Step 4d → Step 4.5 (NEW): in Path 4, after the verify step, offer
local PGLite for code search. AskUserQuestion Yes/No (plan D10/D11).
Yes path runs gstack-gbrain-install + `gbrain init --pglite --json`
with the same rollback-safe sequence. No path skips Steps 3/4/5/7.5.
- Step 10 verdict (Path 4): adds "Code search" row reflecting Step 4.5
choice. Updates "Transcripts" row to describe the new D11 routing
(artifacts repo → remote brain).
sync-gbrain/SKILL.md.tmpl:
- Step 1 split-engine prose: corrects the prior misleading claim that
"memory routes through whatever setup-gbrain configured, including
remote-MCP" (codex finding #3). Memory stage shells out to local
`gbrain import` in local-stdio mode; in remote-http mode it persists
to ~/.gstack/transcripts/ for the artifacts pipeline.
- Step 1.5 (NEW): local-engine pre-flight. STOP on no-cli, broken-config,
broken-db. Soft skip (continue with code+memory SKIP) on
missing-config + remote-http per plan D12. Surfaces actionable user
remediation message instead of the orchestrator crashing two stages
with ERR.
Regenerated SKILL.md for all hosts (claude, kiro, opencode, slate,
cursor, openclaw, hermes, gbrain). All 712 skill-validation + gen-skill-docs
tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
if [ -n"${BACKUP:-}" ] && [ -f"$BACKUP" ];then mv "$BACKUP""$HOME/.gbrain/config.json";fi
1142
+
echo"gbrain init failed. Existing config (if any) was restored. PGLite at ~/.gbrain/pglite/ may be in a partial state — \`rm -rf ~/.gbrain/pglite\` to reset.">&2
1143
+
echo"Continuing setup without local code search; you can re-run /setup-gbrain to retry.">&2
1144
+
fi
1145
+
```
1146
+
1147
+
Then continue to Step 5a. The remote-http MCP registration in 5a runs as
1148
+
today; the local PGLite is independent of MCP registration (Claude Code talks
1149
+
to the remote brain via MCP for queries; `gbrain` CLI talks to local PGLite
1150
+
for code-def/refs/callers).
1151
+
1152
+
**If B (No)**: skip the install + init. The local engine stays absent.
1153
+
`gbrain_local_status` will be `missing-config` (or `no-cli` if gbrain isn't
1154
+
installed). `/sync-gbrain` will SKIP the code stage cleanly per plan D12.
1155
+
1156
+
**4e. Skip Steps 3, 4 (other paths) and 5 (local doctor) when B was picked.**
1157
+
When A was picked, Step 3 already ran (via gstack-gbrain-install) and Step 4
1158
+
already ran (via `gbrain init --pglite`); jump straight to Step 5a. When B
1159
+
was picked, Steps 3/4/5 are no-ops; also skip Step 7.5 (transcript ingest)
1160
+
since memory-stage routes through the artifacts pipeline in remote-http mode
1161
+
per plan D11.
1042
1162
1043
1163
The bearer token (`GBRAIN_MCP_TOKEN`) stays in process env until Step 5a's
1044
1164
`claude mcp add --header` consumes it; then `unset GBRAIN_MCP_TOKEN`
@@ -1475,14 +1595,25 @@ gbrain status: GREEN (mode: remote-http)
1475
1595
Repo policy ..... OK {read-write|read-only|deny}
1476
1596
Artifacts repo .. OK {gstack_artifacts_remote URL}
1477
1597
Artifacts sync .. OK {artifacts_sync_mode}
1478
-
Transcripts ..... N/A remote mode (ingest happens on brain host)
1598
+
Transcripts ..... OK route to artifacts repo → remote brain (plan D11)
if [ -n "${BACKUP:-}" ] && [ -f "$BACKUP" ]; then mv "$BACKUP" "$HOME/.gbrain/config.json"; fi
420
+
echo "gbrain init failed. Existing config (if any) was restored. PGLite at ~/.gbrain/pglite/ may be in a partial state — \`rm -rf ~/.gbrain/pglite\` to reset." >&2
421
+
echo "Continuing setup without local code search; you can re-run /setup-gbrain to retry." >&2
422
+
fi
423
+
```
424
+
425
+
Then continue to Step 5a. The remote-http MCP registration in 5a runs as
426
+
today; the local PGLite is independent of MCP registration (Claude Code talks
427
+
to the remote brain via MCP for queries; `gbrain` CLI talks to local PGLite
428
+
for code-def/refs/callers).
429
+
430
+
**If B (No)**: skip the install + init. The local engine stays absent.
431
+
`gbrain_local_status` will be `missing-config` (or`no-cli`if gbrain isn't
432
+
installed).`/sync-gbrain` will SKIP the code stage cleanly per plan D12.
433
+
434
+
**4e. Skip Steps 3, 4 (other paths) and 5 (local doctor) when B was picked.**
435
+
When A was picked, Step 3 already ran (via gstack-gbrain-install) and Step 4
436
+
already ran (via `gbrain init --pglite`); jump straight to Step 5a. When B
437
+
was picked, Steps 3/4/5 are no-ops; also skip Step 7.5 (transcript ingest)
438
+
since memory-stage routes through the artifacts pipeline in remote-http mode
439
+
per plan D11.
320
440
321
441
The bearer token (`GBRAIN_MCP_TOKEN`) stays in process env until Step 5a's
322
442
`claude mcp add --header` consumes it; then `unset GBRAIN_MCP_TOKEN`
@@ -753,14 +873,25 @@ gbrain status: GREEN (mode: remote-http)
753
873
Repo policy ..... OK {read-write|read-only|deny}
754
874
Artifacts repo .. OK {gstack_artifacts_remote URL}
755
875
Artifacts sync .. OK {artifacts_sync_mode}
756
-
Transcripts ..... N/A remote mode (ingest happens on brain host)
876
+
Transcripts ..... OK route to artifacts repo → remote brain (plan D11)
0 commit comments