gstack-gbrain

Diagnose and repair gstack and gbrain installations, fork patches, and sync failures.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/diazMelgarejo/orama-system --skill gstack-gbrain-diazmelgarejo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gstack-gbrain
Source: https://github.com/diazMelgarejo/orama-system/tree/main/bin/orama-system/gstack-gbrain
Command: npx skills add https://github.com/diazMelgarejo/orama-system --skill gstack-gbrain-diazmelgarejo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Forked gstack checkouts and gbrain installs break in ways upstream documentation does not cover: fast-forward upgrades fail on diverged branches, Supabase pooler connections drop prepared statements, autopilot daemons wedge, and Windows shims fail. This Skill captures those failure modes and their verified fixes so they are not re-derived every session. ## Core Features & Use Cases - Fork-patch upgrade workflow: Snapshot-then-merge upgrade procedure via gstack-safe-upgrade.sh that protects uncommitted working-tree diffs and unregistered local commits from silent loss. - gbrain failure-mode diagnostics: Numbered fixes for CONNECTION_CLOSED errors, stale sources, wedged autopilot daemons, launchd misconfiguration, and wrong-source query results. - Windows and Claude Desktop setup: gstack-brain-sync.cmd shim installation, LM Studio embedding configuration, and MCP server wrappers for minimal-PATH environments. - Use Case: After a gstack upgrade breaks with merge conflicts on a forked checkout, run the safe-upgrade snapshot and merge workflow, re-apply fork patches, and verify nothing was dropped. ## Quick Start Ask the agent to diagnose why gbrain sync is failing or to run a safe fork-patch upgrade of the local gstack checkout.

Frequently Asked Questions about gstack-gbrain

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upgrade a forked gstack checkout when git pull fails?

Use merge instead of fast-forward: stash working-tree changes, fetch and merge origin/main, resolve conflicts with --theirs when upstream is additive, rerun setup, then re-apply fork patches. The gstack-safe-upgrade.sh script automates this with snapshot and verify steps.

How do I fix gbrain prepared statement does not exist errors?

Set "prepare": false in ~/.gbrain/config.json, then restart any running gbrain processes such as autopilot or the MCP server. Supabase pooler reconnects drop server-side prepared statements, causing CONNECTION_CLOSED write failures.

Why does gbrain sync fail on Windows with gstack-brain-sync not recognized?

cmd.exe cannot execute bash shebang scripts, so the brain-sync stage fails on Windows. Run platform/windows/install.ps1 to install the gstack-brain-sync.cmd shim, which calls Git's bash.exe directly.

Why does gbrain list or get return empty results?

Without --source, gbrain targets the default source rather than the repo's pinned source. Slugs are also lowercased with .md stripped, so docs/MIGRATION.md becomes docs/migration. Always pass both --repo and --source.

How do I fix a wedged gbrain autopilot daemon?

Read the pid from ~/.gbrain/autopilot.lock, kill it, remove the lock file, and apply the prepare:false fix before restarting. If launchd keeps respawning it with cwd as /, unload the plist and fix its WorkingDirectory or rely on manual sync.