agentleFS
mphaxisemphaxise/gstack-port-for-codex/skills/gbrain-upgrade/SKILL.md

gbrain-upgrade

Skill4 starsChanged 4 months agoMITView on GitHub

Check and apply upstream gbrain upgrades safely, while keeping the Codex port's local substrate honest.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 9 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the user asks to update, upgrade, or verify upstream GBrain availability.

    line 8
  2. Distinctive:

    Check local state before mutation:

    line 19
  3. Distinctive:

    If the upstream CLI exists, use read-only upgrade checks first:

    line 27
  4. Distinctive:

    Use the configured release channel.

    line 36
  5. Very specific:

    Check the new executable version and run gbrain doctor --only runtime_build_skew,serve_build_drift --json.

    line 41
  6. Distinctive:

    If the upstream CLI is absent, continue with this repo's file-backed GBrain port and report the absence plainly.

    line 56
  7. Distinctive:

    Prefer current documented Codex capabilities over older Claude Code compatibility fallbacks.

    line 57
  8. Distinctive:

    Do not block unrelated work on an optional upstream CLI upgrade.

    line 61
  9. Very specific:

    Do not convert this repo's local brain/ corpus into another storage backend during an upgrade.

    line 62
  10. Distinctive:

    Do not claim full upstream parity after only updating the Codex skill port.

    line 63
  11. Distinctive:

    Do not rely on stale memory for Codex host behavior when the official manual can be refreshed.

    line 64

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

GBrain Upgrade

Use this skill when the user asks to update, upgrade, or verify upstream GBrain availability.

This port was reconciled against garrytan/gbrain at commit a64fb58b9d407f4ee412249dbf4660b158f55f31.

Workflow

  1. Determine which layer is being updated:
    • upstream gbrain CLI
    • this Codex port's GBrain skill files
    • this repo's local brain/ substrate
  2. Check local state before mutation:
    • git status --short
    • codex --version
    • command -v gbrain
    • python3 scripts/brain_doctor.py
  3. Refresh the current official Codex manual before judging whether a local fallback is still necessary:
    • node "${CODEX_HOME:-$HOME/.codex}/skills/.system/openai-docs/scripts/fetch-codex-manual.mjs"
    • review the relevant skills, MCP, plugins, memories, automations, sandboxing, and local environment sections
  4. If the upstream CLI exists, use read-only upgrade checks first:
    • gbrain self-upgrade --check-only --json when available
    • gbrain --version
    • gbrain doctor
  5. Apply upgrades only after the user approves, unless they explicitly requested the upgrade.
  6. Re-run local validation after any update.

Verify a live service upgrade

Use the configured release channel. On a host with active workers, record whether autopilot was already paused. Pause intake for the upgrade and let active jobs drain. Preview restarts with gbrain upgrade --restart-only --dry-run --json when the installed CLI supports it. A refused restart identifies a process that needs its owner. Check the new executable version and run gbrain doctor --only runtime_build_skew,serve_build_drift --json. Resume intake only if it was running before and verification passed.

Upstream also offers Codex MCP setup, optional hooks and a plugin. Inspect gbrain setup codex --dry-run when connection setup is in scope. Connecting hosted storage, importing a corpus and enabling capture are separate decisions.

Upstream operator workflow · Codex integration

Codex Adaptation

  • This skill never runs a command parsed out of an UPGRADE_AVAILABLE marker.
  • The only allowed upstream self-upgrade commands are hardcoded gbrain self-upgrade or gbrain upgrade.
  • If the upstream CLI is absent, continue with this repo's file-backed GBrain port and report the absence plainly.
  • Prefer current documented Codex capabilities over older Claude Code compatibility fallbacks; keep the file-backed brain and CLI/MCP fallbacks only where current host state requires them.

Guardrails

  • Do not block unrelated work on an optional upstream CLI upgrade.
  • Do not convert this repo's local brain/ corpus into another storage backend during an upgrade.
  • Do not claim full upstream parity after only updating the Codex skill port.
  • Do not rely on stale memory for Codex host behavior when the official manual can be refreshed.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.