feat(grok-build): first-class Grok packaging + multi-CLI bridges#2248
Open
AgileInnov8tor wants to merge 8 commits into
Open
feat(grok-build): first-class Grok packaging + multi-CLI bridges#2248AgileInnov8tor wants to merge 8 commits into
AgileInnov8tor wants to merge 8 commits into
Conversation
Make Grok Build a first-class gstack host with complete thin runtime root assets, fixed SETUP path resolution, host-bleed cleanup, and honest multi-CLI bridge packaging. Phase A (packaging): - Expand grok-build runtimeRoot + create_grok_runtime_root (specialists, browse/src, design/dist, make-pdf/dist, extension, scripts) with monorepo realpath healthchecks and fail-closed required links - Fix $HOME$GSTACK_* double-home in browse/design/make-pdf SETUP resolvers - Link connect-chrome → open-gstack-browser on Grok install; export GSTACK_MAKE_PDF in preamble; suppress Claude MODEL_OVERLAY for grok-build - Label /claude as MULTI_CLI_BRIDGE with Step 0 detect Phase B (bridges): - /spec --execute spawns grok --prompt-file (researched flags) on Grok host - GrokAdapter for gstack-model-benchmark --models grok - setup/sync-gbrain Grok success without Claude MCP hard-require - pair-agent remote ngrok install + security + teardown checklist U9: bin/gstack-grok-compat-audit is the DoD gate (packaging + bridge honesty).
--host grok-build no longer regenerates .agents/ Codex skill docs or prompts to install Claude Code plan-tune hooks into ~/.claude/settings.json. Codex .agents/ gen runs only when INSTALL_CODEX=1; plan-tune hooks only when INSTALL_CLAUDE=1 (or explicit --plan-tune-hooks).
Fail closed on ARCHIVE_PATH allowlist when SPAWN_PATH is missing, require non-empty monorepo root before runtime links, drop default --always-approve, prefer --prompt-file for large Grok benchmark prompts, and make compat-audit refuse theater-green when required bridge skills are absent.
Grok ship and other carved skills no longer inline full section bodies into SKILL.md. Like Claude, they emit STOP-Read pointers to package-local sections/ files under ~/.grok/skills/gstack-*/sections/. Drops gstack-ship always-loaded size from ~45k tokens / 179KB to ~20k / 80KB (under the 160KB soft ceiling). Codex and other hosts keep monolith inline.
Records remaining upstream PR, U4 behavioral smoke, multi-host section pointers, optional gstack-codex, gbrain MCP stretch, audit productization, and review name-collision note after feat/grok-build-host.
Stage create_grok_runtime_root into a sibling .next tree and swap only after preflight so a failed install cannot wipe the live thin root. Re-apply the ARCHIVE_PATH allowlist on the optional --execute-claude spawn path.
Add free tests for remaining code-review debt: runtimeRoot vs setup parity, generateSpecSpawn fail-closed allowlist, GrokAdapter auth/HOME/prompt-file, compat-audit fixture exit codes, and preflight-no-wipe setup smoke. Prefer HOME for auth discovery so hermetic tests work under Bun; pipe stderr so token-shaped CLI errors never inherit onto the parent console.
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
Pin Grok unit rates to official xAI pricing (docs.x.ai), parse headless JSON usage when present (zero tokens when omitted — never invent), and reject empty/invalid auth.json or whitespace-only API keys in available().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First-class Grok Build host support for gstack: complete thin runtime packaging, SETUP path fixes, host-bleed cleanup, multi-CLI bridges (honest DEPENDENT labels), DoD audit harness, and on-demand section pointers so
/shipstays under the soft token ceiling.Phase A — packaging
browse/src, specialists,design/dist,extension,scripts, …) with monorepo realpath checks, preflight, and atomic staging (no wipe-before-success)$HOME$GSTACK_*double-home in browse/design/make-pdf SETUP resolversMODEL_OVERLAYon grok-build;/claudelabeled MULTI_CLI_BRIDGEconnect-chrome→ open-gstack-browser; host-scoped setup (no always-on Codex.agents/regen / Claude plan-tune prompt on--host grok-build)Phase B — bridges
/spec --execute→grok --prompt-file(no default--always-approve; archive allowlist fail-closed)GrokAdapterforgstack-model-benchmark --models grokToken ceiling (Option A)
~/.grok/skills/gstack-*/sections/)/shipalways-loaded size: ~45k → ~20k tokens (under 160KB soft ceiling)DoD
bin/gstack-grok-compat-auditpackaging + bridge honesty gateInstall
Follow-ups (tracked in TODOS.md)
Test plan
bun test test/host-config.test.tsbun test test/grok-section-pointers.test.tsbun test test/grok-packaging-behavior.test.ts./setup --host grok-build(non-interactive) + runtime root assets presentbin/gstack-grok-compat-audit --phase aexit 0Plan
docs/plans/2026-07-13-001-feat-gstack-grok-full-compat-plan.md