mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-31 14:06:50 +01:00
+7







![capy-ai[bot]](/assets/img/avatar_default.png)
3e8b34d892
* docs(designs): add fix wave 2026-10-15 plan (revision 3, approved) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(cso): invoke docker as argv0 docker so OrbStack's multicall binary dispatches executable() returns the canonical path, and OrbStack installs docker as a symlink to docker-tools, which dispatches on argv[0] and exits 127 with 'unsupported argv0 "docker-tools"'. Every Docker call failed, so doctor reported local-docker-isolation and every scanner missing and setup could not preload the qualified images. runProcess takes an argv0 option; docker.ts routes every Docker call through runDocker, which passes 'docker'. The native watchdog's execve calls pass "docker" as argv[0] too, so its container cleanup works on the same installs. The executed file is still the verified canonical path. Fixes #3187 * test(cso): cover Docker and watchdog invocation through a multicall binary A compiled fake that refuses any argv[0] but docker stands in for OrbStack's docker-tools. Both behavior tests fail on the previous code. Refs #3187 * fix(cso): bound the argv0 test's socket helper and probe images through OrbStack's multicall docker (#3187) Follow-up to #3188 by Bryan Stone (@aegixx): - the python3 spawnSync that binds the fake daemon socket gets a 30 s timeout; without it test/spawnsync-timeout-tripwire.test.ts fails. - reviewer test: dockerExactImagePresent, a production probe, admits an image when the endpoint's canonical executable is a multicall binary that refuses any argv0 other than "docker". It fails on47d639a(returns false) and passes with #3188. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(autoplan): own the conversation after a Claude Code 2.1.300 compaction Claude Code 2.1.300 keeps a compaction's last records in place and lists them in compactMetadata.preservedMessages. The segment's tail, which is also the boundary's logicalParentUuid, is written after the boundary under the compact summary, so the parent links form a cycle that the owned causal order never reaches. Every record after the compaction was dropped, and the publication guard denied each later phase entry with close_incomplete. Such a boundary now continues from the last preserved record that is a node of the file and not its own descendant. Boundaries without that metadata, with a foreign preserved uuid, or with nothing kept in place still supply no ownership. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(autoplan): report a compaction-explained unreachable component as unrecognized_shape (#3194) Follow-up to #3196 by vilano93. After the ownership walk, an owned node the walk never reached was silently dropped, and the phase guard answered the next phase entry with close_incomplete, which the user cannot satisfy. When the unreachable node's ancestry ends in a cycle through a compact boundary's logical parent, ownedCausalOrder now returns unrecognized_shape:compaction_unreachable, the guard's existing unverified disposition (allow with a visible warning and a guard-log row). Orphans whose ancestor is missing (not flushed yet) and other roots keep today's behaviour, so the fail-open surface does not widen beyond compaction. Each node is walked once. Gate-integrity edit: a close_incomplete denial becomes an unverified allow for that shape only. Negative controls kept: the existing guard, hook, guard-reasons and captured-fixture tests still deny (356 pass), and a new case with the boundary not yet flushed still denies close_incomplete. Intentional pin changes in #3196's own test file: the three "fails closed" cases (tail-only segment, missing preserved metadata, foreign preserved uuid) and the "without compactMetadata" case now expect unrecognized_shape:compaction_unreachable instead of close_incomplete or a silently cut transcript. Reviewer tests: three compactions in one session stay owned and pass the next phase entry; a 50k-record history with three compactions is decided in ~300 ms (budget 1000 ms), so descends needs no memo. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * feat(lib): one echo sanitizer for external strings, with a Bash twin lib/sanitize-echo.ts and bin/gstack-sanitize-echo.sh flatten CR/LF/TAB to spaces, remove every other ASCII control byte (ESC included) and DEL, collapse runs of spaces, and cap the result at 200 bytes of valid UTF-8 with no leading or trailing space. Every external string gstack echoes into a message, a log line or a key=value state file goes through it (fix wave 2026-10-15, plan rev 3 DX F8). test/sanitize-echo.test.ts runs both twins on one table under bash, bash --posix and zsh, including a "\nstages=" injection, ESC sequences and UTF-8 characters cut by the cap. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(bun-version): judge the Bun floor under zsh and hold on an unreadable version (#3195) Reported by mochafreddo. _gstack_bun_below word-split $_gb_core, which zsh does not do: `[ -ne ]` errored and every error path read as "not below", so /gstack-upgrade Step 4 accepted Bun 1.3.2 in a zsh tool shell. - _gstack_bun_below copies the release's parsed fields into quoted positional parameters and compares with $((10#...)); no new _gb_* globals. It returns 2 when either side cannot be parsed. - gstack_bun_status prints malformed for an unparseable version or floor (never ok); gstack_bun_incoming_hold holds on it with bun-version-unreadable: ... (BUN_VERSION_UNREADABLE), the bun path and its output passed through gstack_sanitize_echo. setup's own malformed warning is unchanged. - /gstack-upgrade Step 4 runs the check through `bash -c` and stops on BUN_VERSION_UNREADABLE with a reinstall fix (never "bun upgrade"). - New result code BUN_VERSION_UNREADABLE with its troubleshooting entry; bin/gstack-doctor-components.sh regenerated from the table. test/bun-version-shells.test.ts: one version table (1.3.2, 1.3.3-canary.1, 1.3.3, 1.3.14, 1.4.2, 1.10.0, 01.04.02, 2.0.0, garbage) drives bash, bash --posix, zsh and the TypeScript twin's below(); `zsh -c '. bin/gstack-bun-version.sh; gstack_bun_status 1.3.2'` printed ok on47d639aand prints too-old now. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * style(cso): format #3188's runDocker call so format:cso:check passes (#3187) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(cso): keep scanner JSON reports parseable after redaction (#3185) Reported in #3185. The scanner path splices redactions into raw JSON, and redactFindingSpans replaced a bare 10+ digit number ("max_memory_bytes":1145427776, an epoch) with an unquoted marker, so JSON.parse failed and every non-trivial Semgrep run was INVALID_OUTPUT. - lib/redact-engine.ts: redactJsonFindingSpans, a string- and escape-aware lexical tokenizer over one or more top-level values (NDJSON included). A span inside a number replaces that whole token (-, fraction, exponent) with the quoted marker, number by number; a span inside a string keeps the in-string marker, widened to whole escapes; a span touching several tokens, whitespace, a literal or a structural character returns null (withhold). Non-JSON text gets the plain splice. redactFindingSpans is unchanged for every other caller. - The scan operation's declared format rides the real capture path: scanner-executor (scan stdout, or the report file read for outputPath plans) -> DockerGroup.execCapture -> runProcess -> spliceRedaction, which redacts the concatenated stdout once and maps each interleaved run onto it. Version probes and stderr stay plain; marker-only withholding and the cross-stream views check are kept, and the output is a fixpoint of that check. Behavior change: a redacted number in a scanner report is now the string "<REDACTED-...>" instead of an unquoted marker; non-JSON streams keep the unquoted form (test/cso-eval.test.ts unchanged). Intentional pin change: test/cso-scanner-release.test.ts pinned the report read as capture(['/bin/cat', plan.outputPath]); it now pins capture(['/bin/cat', plan.outputPath], plan.format), so the read also carries the declared JSON format (stricter, not weaker). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(browse): recover when the last tab is closed outside the CLI Closing the last tab outside browse (for example, closing the headed Chromium window) left the daemon wedged: the page 'close' handler removed the tab and set activeTabId to 0, and executeCommand called getActiveSession() first, so every later command (goto, status, even stop) failed with "No active page" until the daemon PID was killed by hand. closeTab() already opens a blank tab when the last tab closes; the external close path never did. Add BrowserManager.ensureActiveTab(), which reselects a remaining tab or opens one blank tab (concurrent callers share one recovery), and call it before resolving the active session in executeCommand. Fixes #3167 * fix(browse): status and stop answer after an external close; recovery says what it did (#3167) Follow-up to #3179 by aftabkh4n, which reopens a tab on demand. - BrowserManager.ensureCommandTab runs before every command: status, stop and restart never open a tab, so a daemon whose browser or context is gone can still report and be stopped; any other command gets an active tab. A failed recovery is BROWSE_TAB_UNRECOVERABLE carrying the restart command (cause passed through sanitizeEcho), and a command that ran on a newly opened tab prints a one-line warning first. - server.ts reads the session inside the read and write branches instead of before dispatch (2223 lines, cap 2224) and exposes browserManager and handleCommandInternal on __testInternals__ for the dispatch test. - meta-commands.ts: handleMetaCommand no longer reads the active session before its switch (only snapshot and resume used it), and status prints getCurrentUrl() so it works with zero tabs. This file is outside the lane's listed ownership; no other lane or #3190 touches browse/. - New result code BROWSE_TAB_UNRECOVERABLE and troubleshooting entries for it and for the old "No active page" wedge. Reviewer test browse/test/tab-external-close-dispatch.test.ts drives the real dispatch in a child process: status, text, goto and stop after an external close, and the closed-context case. On47d639a(with only the test seam added) all five fail with "No active page". Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(troubleshooting): /cso INVALID_OUTPUT on Semgrep reports and OrbStack's argv0 refusal (#3185, #3187) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(session-update): name the reinstall fix when an unreadable Bun holds the auto-update (#3195) Item 11 makes every caller of gstack_bun_incoming_hold treat a Bun version it cannot read as a hold (bun-version-unreadable, BUN_VERSION_UNREADABLE). The session-start banner only knew bun-too-old, so the new reason fell through to "git pull did not finish ... gstack is not updating" with a pull-and-setup fix that does not help. - bin/gstack-session-update: a bun-version-unreadable banner case with the reinstall fix and the troubleshooting anchor; the comment that said a malformed version passes is corrected. Intentional pin change: test/session-update-stages.test.ts "supported or unparseable Bun (bun-dev (local build)) proceeds: setup decides" is split. 1.3.14 still proceeds; bun-dev (local build) now holds with BUN_VERSION_UNREADABLE, leaves the checkout and setup untouched, and the banner names the reinstall fix. The fixture installs bin/gstack-sanitize-echo.sh beside the floor helper, as a real install of this release does. The new case fails on47d639a. Ownership exception granted by the coordinator for Lane A (bin/gstack-session-update is Lane B's file; PR 1b stacks on 1a). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(session-update): recover a conflicting autostash by its unmerged files The auto-updater fast-forwards with `merge --ff-only --autostash`. When the carried-over local edits conflict with the incoming revision, git 2.56 still exits 0 from that merge, pops the edits with conflict markers into the live checkout, and keeps the stash entry. The recovery only ran on a non-zero exit with "autostash" in stderr, so on git 2.56 it never ran: the updater logged UPDATED and ran setup over a half-merged tree, in the directory Claude Code runs hooks from. When it did run, it had two more problems: - `git checkout -- .` refuses unmerged paths ("error: path 'f' is unmerged", exit 1), so it left the markers in place anyway. - `git stash drop` dropped stash@{0}, whatever that was. refs/stash is shared with every worktree of the repository, and when refs/stash.lock is held git cannot store the autostash at all, so the top entry can be someone else's. Now the merge is judged by `git ls-files -u`, whatever its exit code. On unmerged files after the fast-forward, autostash_recover finds the autostash commit by the id git prints ("cannot store <id>" first, then "Created autostash: <id>", with the merge run under LC_ALL=C and core.abbrev=40). A moved refs/stash is only the fallback. When that id is not a stash entry, it is anchored under refs/gstack-autostash/<UTC>. The tree is reset to the fast-forwarded revision, which the hook check already passed, and the stash is kept. The log line is AUTOSTASH_CONFLICT_RECOVERED tree_reset=1 kept_stash=<id> kept_ref=<ref>. The update then continues, so the regenerable patches are re-rendered and setup runs as for any other move. If the commit cannot be found, nothing is reset: the markers stay for a person, the run logs PULL_FAILED, and setup does not run. Files that are already unmerged before the update, from someone's own merge, rebase or stash pop, now hold the update with PULL_FAILED "unmerged files ...". Without that check, the recovery would take them for its own and reset them away. core.abbrev=40, not "no": "no" is accepted from git 2.31.0 (its release notes), and `merge --autostash` exists from 2.27.0, so "no" would fail every update on git 2.27-2.30. Files: - bin/gstack-session-update: autostash_recover, the unmerged-files check before the merge, the C-locale merge with its stdout kept for the id, and removal of the old grep-and-drop block. - test/session-update-autostash.test.ts: 7 cases in a new describe block. A conflicting pop leaves no markers, keeps the edits and still runs setup. A user's own stash entry survives. A held refs/stash.lock gets the edits anchored. With a git whose merge prints nothing, a moved refs/stash still finds the edits; with the lock held as well, nothing is reset. Pre-existing unmerged files hold the checkout. A non-conflicting edit rides over the update (control). Tests, on upstream15ebd85cd: - 5 of the 7 new cases fail against the previous session-update; the unmerged-files guard and the control pass on both. - Two mutants are each caught by one new case: dropping the refs/stash fallback, and resetting when the edits cannot be found. - session-update-autostash, session-update-stages, session-update-hook-hold and team-mode pass 63/0 with `--timeout 60000`. At bun's 5 s default under heavy load (one reading: load average 169), the three shared files timed out 8 tests on this branch and 17 with the previous script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(session-update): trust only git's autostash id; owe setup on a stop An independent review of the autostash recovery (Codex gpt-6-astra, high effort, verdict BLOCK high=1 med=2) found three defects on its rare paths. All three are fixed here, each with a case that failed first. - [high] The refs/stash fallback could erase local edits. When git's messages were unavailable, recovery took any change to refs/stash as its own autostash. refs/stash is shared with every worktree: if a sibling pushed a stash while refs/stash.lock kept git from storing this one, recovery took the sibling's entry and reset the checkout, erasing edits nothing held. Now only git's own printed id counts. A missing id resets nothing: the markers stay, the run logs PULL_FAILED. Recovery needs git's messages, so when the temp file for them cannot be created the update is held before the merge (HELD temp-file-unavailable), not merged blind. - [med] A stop after the checkout moved lost the setup it owed. The failure recorded only the pull reason. Once the person resolved the conflict, the next check saw an unchanged HEAD and no pending stage, logged UP_TO_DATE, and never set up the new revision. Now a failure after HEAD moved records `setup` as a pending stage, retried at once. The unmerged-files check holds it until the conflict is resolved, and the pull reason is the stage's reason, so the session-start line says what to resolve. - [med] An unreadable index read as "no conflicts". Both `git ls-files -u` checks discarded the exit status, so a failed read after a conflicting pop (which git exits 0 for) let setup run over the markers. Now a failed read stops the update with PULL_FAILED "cannot read the index", before the merge or after it. Files: - bin/gstack-session-update: autostash_recover drops the refs/stash fallback (and STASH_BEFORE). The temp-file hold. The ls-files exit status checked at both points. The pending setup stage on a failure after HEAD moved. - test/session-update-autostash.test.ts: a shim(fx, name, tool, body) helper; the fallback case now expects a refusal; the refusal case runs on through resolution to setup; three new cases (unreadable index before and after the merge, no temp file for git's messages). Tests, on upstream15ebd85cd: - The 5 changed or new cases failed on the previous commit, each on its defect: refs/stash trusted and recovered; UP_TO_DATE with no setup after resolution; UPDATED over an unreadable index, before and after the merge; a blind merge with no temp file. - Against upstream's own session-update, 8 of the block's 10 cases fail. - session-update-autostash, session-update-stages, session-update-hook-hold and team-mode pass 66/0 with `--timeout 90000`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(session-update): reap heartbeat and its sleeper on exit The lock heartbeat subshell left its sleep 300 child orphaned when the updater exited, so heartbeats accumulated across sessions. Track and reap the heartbeat job (with a job-table fallback for signals between fork and $!), give the subshell its own exit trap that kills and waits its sleeper, and map HUP/INT/TERM to exits so the EXIT trap always runs. Adds a fixture-driven regression test. * test(session-update): repin the lock trap and heartbeat to #3191's cleanup shape Intentional pin change: test/session-update-autostash.test.ts 'reclaim is TOCTOU-safe' and 'EXIT trap is ownership-checked' pinned the one-line EXIT trap and the 'while :; do sleep 300; ...' loop that #3191 (Jess Sullivan) replaces with cleanup_session_update and a 'sleep 300 & wait' heartbeat. The pins still assert the ownership-checked rm -rf, the EXIT trap, MYPID, and that the heartbeat is killed. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(session-update): move installs only through gstack-ff-update; extract hooks without tar (#3184) Item 2 (#3189, #3191 adopted in the previous commits) and item 3 of the fix-wave plan. bin/gstack-ff-update <dir> <rev> is now the only code that moves an install's tree. Inside an install-scoped lock (absolute git common dir, the updater's TTL and mv-aside reap, a heartbeat reaped on exit) it captures the working tree and the staged state through private indexes, carries edits that merge cleanly (as an autostash pop would), lets the regenerable SKILL.md/sections footprint take the target when it conflicts, and shelves any other conflicting edit, staged change or unmerged file into refs/gstack/rescue/<oid> (first parent the pre-update HEAD, second the staged state; compare-and-create; gstack rescue identity). The move is a two-way read-tree on the private index, so a late edit or an untracked file in the way refuses with autostash-unrecoverable and changes nothing. It sources nothing so the held-install recovery can fetch it from the new revision. gstack-session-update calls it instead of merge --autostash, holds a checkout with unmerged files (unmerged-files:), and names shelved edits at session start at most once a day with inspect, export-the-delta and delete commands. The incoming revision is extracted for the hook check through a private index and checkout-index with core.symlinks=false, never tar (MSYS tar cannot create connect-chrome before its target), and the held reason carries the failing command's flattened, control-free stderr. Held lines print before the stage line, one case per reason with its anchor, every path shell-quoted, no setup fix while unmerged files exist. docs/troubleshooting.md gains the held-install recovery forms (Git Bash, PowerShell 5.1, trial and go-back) and entries for each new line. design: kept_ref is refs/gstack/rescue/<oid>, refs/stash is never touched, the quiet-merge cases become a pre-existing-ref refusal and its recovery, pre-existing unmerged files are a HELD unmerged-files, and the git shim pins the real binary through git --exec-path. Intentional pin changes in existing tests: - test/session-update-stages.test.ts: printed paths are shell-quoted; the bun-too-old fix runs gstack-ff-update instead of git pull. - test/session-update-hook-hold.test.ts: the order pin looks for 'bash "$FF_UPDATE"' instead of 'merge --ff-only'; the hook-check-unavailable fix no longer recommends git pull --autostash; installedUpdater copies gstack-ff-update beside the updater. Reported by wengweiling (#3184). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(gstack-upgrade): Step 4 fast-forwards through gstack-ff-update (#3189) Item 2 of the fix-wave plan, kept in its own commit so PR 1b can be rebased onto PR 1a (which edits only Step 4's Bun floor-check line). Step 4's `git pull --ff-only --autostash` had the same hole the auto-updater had: a conflicting autostash exits 0 and leaves conflict markers in the install, and the skill printed FF_OK. It now runs bin/gstack-ff-update . origin/main after the fetch and the floor check: exit 0 runs setup (a rescued line is relayed with its inspect, export and delete commands), exit 4 (not a fast-forward) is the only way into the gated reset fallback, and any other refusal stops with nothing changed. The footprint discard moves to the reset fallback, ahead of its stash, where the warning text already promised it. Intentional pin changes: - test/upgrade-template-pins.test.ts: the ff-before-reset pin looks for 'bash bin/gstack-ff-update . origin/main'. - test/gstack-upgrade-fresh-shell.test.ts: the C9 fence marker is 'bash bin/gstack-ff-update'; the gstack-like fixture ships the bin. - test/upgrade-setup-recovery.test.ts: the git-path fixtures ship gstack-ff-update (a stub where git itself is a stub). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(setup.ps1): run under Windows PowerShell 5.1's legacy argument passing (#3130) Item 4 of the fix-wave plan. Windows PowerShell 5.1 strips the double quotes inside native arguments, so the bash -c script setup.ps1 handed Git Bash arrived broken ("unexpected EOF while looking for matching"). The script now holds no double quote: `set -f; IFS=; mapfile -d '' -t argv < $1; rm -f -- $1; exec ./setup ${argv[@]}` (empty IFS and no globbing keep $1 and each argv entry whole). That form drops an empty argument, so setup.ps1 refuses one before anything runs (SETUP_PS1_EMPTY_ARGUMENT, with its troubleshooting entry). test/setup-ps1.test.ts runs the adversarial arguments under legacy passing (pwsh with $PSNativeCommandArgumentPassing = 'Legacy', and powershell.exe itself on Windows) with a space in TMPDIR, plus the empty-argument refusal. Intentional pin change: the pinned bash -c line in "passes arguments NUL-separated through a private file to a constant bash script" now names the quote-free script and asserts it holds no double quote. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(setup): register hooks at the $HOME path when CLAUDE_CONFIG_DIR links back to it A per-session CLAUDE_CONFIG_DIR whose skills symlink to ~/.claude/skills passed the split-brain guard, so its temporary path was written into the global settings.json and the hooks broke once the session directory was removed. Fall back to $HOME/.claude/skills/gstack whenever both spellings resolve to the same tree. Fixes #3180 * fix(setup): one sourced helper picks the hook root for setup and gstack-memorable (#3180) bin/gstack-memorable carried a verbatim copy of setup's old canonical-root block, so `gstack-memorable enable` under a per-session CLAUDE_CONFIG_DIR still baked the session path into settings.json after #3181 fixed setup. The choice now lives in bin/gstack-claude-root.sh (gstack_canonical_claude_root), sourced by both. Intentional test changes: - test/setup-hook-canonical-paths.test.ts: #3181's source-slicing block test is rewritten to source the helper (with a spawnSync timeout, which the sliced version lacked and the tripwire flags); the "honors CLAUDE_CONFIG_DIR" pin moves from setup to the helper, and a new pin requires both callers to source it. Adds a no-$HOME-install case. - test/setup-hook-syntax-gate.test.ts: the hook-section slice starts at the new assignment and the harness sources the helper. - test/setup-claude-code-migration.test.ts, test/team-mode.test.ts: the partial-checkout fixtures copy the new helper setup sources. Reviewer test: gstack-memorable enable under a per-session config dir that links back to ~/.claude registers the $HOME path (fails on main). Builds on #3181 by NetrioGit. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(setup): remove 1.31-era unprefixed Cursor skill folders (#3133) A 1.31 setup run from a checkout under ~/.cursor/skills linked unprefixed <skill>/ folders there, each holding a SKILL.md symlink into the checkout. Current setup links gstack-<skill>/ folders, and the retired-skill prune only looks at gstack-* names, so the old folders stayed: Cursor loaded autoplan, review and the rest twice, or kept dangling links once the checkout moved. Run the Claude flat-name cleanup on ~/.cursor/skills as well. Cursor installs only gstack-* names, so no prefix gate is needed, and the helper removes only entries proven to link into gstack (#2119), so user-owned folders stay. It runs after linking, so a run that fails before the new links exist keeps the old folders. Reported by @andrewkjankowski in #3084. Fixes #3133 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(setup): name the skills dir in the flat-name cleanup line (#3133) `./setup --host cursor` now runs the flat-name cleanup on ~/.cursor/skills as well as ~/.claude/skills, so the "cleaned up old entries" line says which directory the folders were removed from. Reviewer test for #3152 (szsunyuan): a real dir whose SKILL.md links into gstack loses only that link and keeps the user's file; SKILL.md links into a sibling repo named gstack-fork, a relative link, and a dangling link outside any gstack checkout are all kept; the printed line names the removed folders and the Cursor skills dir. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(setup): install Chromium with `bun x`, and name exit 127 for what it is (#3131) A Bun installed with winget ships no `bunx`, so setup's `bunx playwright install chromium` exited 127 and was reported as "offline, proxy, or blocked download?". setup now runs `bun_cmd x playwright install chromium` through its existing bun resolver ($BUN_CMD), and bin/gstack-browser-ensure runs the bun it found on PATH with `x`. Exit 127 gets its own text naming the resolved bun, Bun from bun.sh, and the skip commands for Git Bash and PowerShell; other codes keep the network hint. New troubleshooting entry: #chromium-install-exit-127. Intentional test changes: - test/setup-playwright-best-effort.test.ts: the installer stub is now a `bun_cmd()` stub (was `bunx()`), its mark renamed bun-x-called and now records the args; the block under test calls bun_cmd. New winget-shaped cases (bun on PATH, no bunx anywhere) run setup's real bun_cmd. - test/gstack-browser-ensure.test.ts: the fixture is winget-shaped (the `bun` stub handles `x`, no `bunx` on PATH); the exit-7 pin now reads `<stub>/bun x playwright install chromium exited 7 (...)`. --help in gstack-browser-ensure prints the comment header only (3,24p). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ci(windows): prove setup.ps1 on PowerShell 5.1 and the held-install recovery natively (#3130, #3184) windows-setup job: - setup.ps1 joins the path filter (with bin/gstack-ff-update, bin/gstack-claude-root.sh, bin/gstack-browser-ensure, docs/troubleshooting.md and test/setup-ps1.test.ts). - powershell.exe must be Windows PowerShell 5; test/setup-ps1.test.ts runs with a space in TEMP and must report exactly 4 pass, 0 fail, 1 skip (the Linux-only missing-prerequisite case). - A copy of the built checkout under a path with a space installs through `powershell.exe -File setup.ps1 --host codex`. held-install-journey job (new, parallel): - origin's main is this PR's tree on top of the v1.91.101.0 tree (47d639abf); fix-branch adds one file. - A prefix-mode v1.91.101.0 install at the runner's ~/.claude path in three states (clean, dirty-conflicting, already-unmerged), with auto_upgrade=true and the throttle cleared: the old updater must log `HELD hook-check-unavailable`; the PowerShell recovery form, read verbatim from docs/troubleshooting.md and run under powershell.exe, must reach main with every local edit (only those) in one rescue ref. The dirty state runs it with its .\setup.ps1; the others replace that step with a marker. - The trial and go-back forms move the install to fix-branch (detached) and back to main. - Only then a later release whose symlink sorts before its target is pushed, and the new updater must log UPDATED and reach it. - Both jobs assert the exact list of cases that ran. The journey steps ran locally on Linux with pwsh in Legacy argument mode as powershell.exe, a git exec-path whose ../../../bin/bash.exe is bash, and a failing tar standing in for MSYS tar (all 9 cases passed); the windows-latest run itself happens on the PR. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(ff-update): a killed step-4 run fails the status check instead of the type check Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ci(windows): the held-install job runs without the bun cache step The cache key line is a secret-scanner false positive on added lines (env.kv); the fixture's own setup installs its packages either way. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(fixtures): register #3191's heartbeat fixture as free test/free-fixtures.test.ts failed on the frozen-branch Ubicloud run: test/fixtures/session-update-heartbeat.sh (adopted with #3191) was in no paid touchfile and not in FREE_FIXTURES. Its only consumer is test/session-update-heartbeat.test.ts. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(session-update): leave the bun-version-unreadable banner case to item 11 (PR 1a) PR 1a owns the bun-version-unreadable hold (BUN_VERSION_UNREADABLE), its banner case and its troubleshooting entry; this branch is rebased onto 1a. Drops the case, the docs entry and the banner test this branch had added. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(setup.ps1): resolve Git Bash in the shared order, with GSTACK_BASH as an alias and a BASH_UNAVAILABLE refusal Follows lib/script-invocation.ts (Lane C, PR 2): GSTACK_GIT_BASH is the override and GSTACK_BASH its deprecated alias at the same precedence; when both are set and differ GSTACK_GIT_BASH wins and one warning prints. An override that does not exist is refused, never skipped. Without one: the install git --exec-path belongs to (behind a scoop shim, or a portable Git), the folders around git.exe, %LOCALAPPDATA%\Programs\Git, %ProgramFiles%\Git, and last a bash on PATH whose uname -s reports MSYS; WSL's bash (System32, WindowsApps) is rejected. A miss lists every candidate with its rejection, then the PowerShell user-variable and ~/.claude/settings.json env recipes (BASH_UNAVAILABLE, #bash-unavailable). test/setup-ps1.test.ts gains a 14-row pwsh-on-Linux table with every location injected (override, alias, both set, missing override and alias, scoop shim, per-user, portable and machine-wide Git, MSYS PATH bash, WSL and non-MSYS rejections, missing); 11 rows fail on main. The rows mirror Lane C's table in test/script-invocation.test.ts; they are not wired to it, since that branch is not available here. The Windows job's expected skip count for this file moves from 1 to 15 (the table is Linux-only). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(setup.ps1): give the empty-argument refusal its result code (SETUP_PS1_EMPTY_ARGUMENT) Adds the row to lib/result-codes.ts (anchor #setup-ps1-empty-argument, which setup.ps1 already prints). bin/gstack-doctor-components.sh is regenerated from the table (generated; resolved by regeneration at merge). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ci(windows): silence SC2016 on the PowerShell version probe (the $ is PowerShell's, not bash's) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ci(windows-setup): give tar a POSIX path for the spaced checkout MSYS tar reads `D:\a\_temp/...` as host:path (rsh syntax) and fails with 'Cannot open: No such file or directory' before setup.ps1 runs. The copy target now goes through cygpath -u; setup.ps1 still gets the Windows form. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ci(windows-setup): dereference symlinks when copying the spaced checkout MSYS tar cannot extract connect-chrome, a symlink that precedes its target (the #3184 failure mode), so the copy died before setup.ps1 ran. tar -h stores the target instead. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(windows): one Git Bash resolver for gstack's shebang bins (#3197) Windows has no shebangs, and gstack had three conflicting bash lookups: the hooks fell back to a bare PATH `bash` (often WSL's launcher), the gbrain sync checked three fixed paths, and setup.ps1 walked up from git.exe. lib/script-invocation.ts is now the only TypeScript resolver: GSTACK_GIT_BASH (GSTACK_BASH as a deprecated alias, same precedence, warning when they differ, a missing value refused), bash next to `git --exec-path` (scoop, per-user, portable Git), the known install paths, then a PATH bash only when `uname -s` reports MSYS/MINGW. WSL launchers are rejected unprobed. A miss is BASH_UNAVAILABLE, listing every candidate with its rejection reason. Bun-shebang bins run under Bun (process.execPath, or the PATH bun inside a compiled binary). Hooks' runBin resolves through a state-root cache keyed by git.exe path and mtime, written by temp file plus rename, so the hot path spawns nothing extra; the override is never cached. wtreeFingerprint({cwd, timeoutMs}) returns {tree} | {error, kind} with GIT_OPTIONAL_LOCKS=0 and 40-64 hex ids; the consumers move next. Intentional pin change: test/gbrain-spawn-windows-shell.test.ts expects forward-slashed bash paths (WIN_BASH and the GSTACK_BASH override), the form the shared resolver returns because Bun's spawnSync on Windows returns ENOENT for a backslash exe path containing spaces. The copied-tree adapters in test/timeline-stop-hook-slug.test.ts and test/plan-tune-cathedral.test.ts list the two modules spawn-bin.ts now imports; the new fixture is registered in test/helpers/free-fixtures-data.ts. bin/gstack-doctor-components.sh is regenerated for the new result-code row. Reported by @exGeni. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(windows): fingerprint and gstack bins through the shared invocation (#3197) bin/gstack-wtree was spawned by path in lib/regen.ts, lib/gate-diff/git.ts, lib/restamp.ts and bin/gstack-evidence; gstack-slug in restamp, gate-diff and evidence; gstack-redact in the pregate secrets check; and a bare `bash -c` in regen, the lane selection manifest and gstack-evidence run. On Windows each one failed to launch. All now go through lib/script-invocation.ts, and each fingerprint consumer keeps its fail direction while saying why: - gstack-regen check: incomplete, `cannot fingerprint the working tree (gstack-wtree exited 1: <helper's own repair>)` instead of `(gstack-wtree failed)`; write keeps the registry label as its run id. - gstack-gate-diff: `+nowtree` candidate, with the cause. - gstack-restamp: RESTAMP_CONFLICT carrying the launch or exit detail (Windows printed `()` before). - gstack-evidence: records without wtree (grades STALE) and warns once; SHA-256 repositories now get a 64-hex fingerprint. lib/regen.ts keeps a string-returning wtreeFingerprint(repoRoot) wrapper for lib/pregate/context.ts and lib/pregate/index.ts (files #3190 changes); item 10b migrates them. test/script-invocation-tripwire.test.ts fails on a new by-path or bare-bash spawn under lib/, hosts/ or a Bun bin; five sites outside this change are listed with their owners and may only shrink. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(pregate): keep framework route paths from a selection manifest (#3176) laneFileSet parsed manifest output with `[\w.-]+` path segments, so `app/(shop)/[id]/page.test.ts` came back as `page.test.ts`. The selected test then matched no platform lane, its remote receipt obligation vanished and it fell back to a local run. manifestTestPaths keeps route segments whole (`(group)`, `[id]`, `[...slug]`, `[[lang]]`, `@slot`, `$param`, `+page`), reads every path-shaped token on a line (JSON arrays, quoted, `path:line`, parenthesized), and decides what is a test file with the import graph's own isTestFile, so a test-file rule change there (bats, #3177) reaches manifests without a second regex. A manifest that cannot start is "unknown" (widens), like a non-zero exit. This is the manifest-parser half of #3176 by @vocodestudios; the import-graph half (tsconfig aliases, Next.js route mapping) ships in a separate PR. test/pregate-manifest-paths.test.ts drives the CLI with a bracketed route test in the fixture's Windows-only lane and asserts its requires-remote obligation; it failed on main (requires_remote was []). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ci(windows): windows-pregate-e2e drives the #3197 paths natively A windows-latest job (Bun 1.4.2) builds a fixture repository and runs gstack-restamp --dry-run, gstack-regen check and write, gstack-evidence run and gstack-gate-diff from their TypeScript entry points, asserting a real tree fingerprint each time; times a question-log hook cold and warm and checks it cached its Git Bash resolution; and checks that a missing GSTACK_GIT_BASH refuses with BASH_UNAVAILABLE and lists the candidate. The journey runs twice: under the runner's Git for Windows and under a pinned PortableGit 2.56.0.2 (SHA-256 verified), found only through `git --exec-path`. gstack-pregate run joins it with item 10b. The workflow is registered in scripts/test-pr-profile.ts FREE_ONLY_PR_FILES (no paid case reads it), recorded as a non-behavioral HARNESS_VERSION decision in scripts/harness-version.json. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(setup.ps1): resolve Git Bash by the shared fixture table (#3197) test/setup-ps1.test.ts now drives setup.ps1 through every row of test/fixtures/windows-bash-resolution.json, the table that pins lib/script-invocation.ts, instead of a hand-mirrored copy. Two rows failed and are fixed here: - an override and alias that differ only in slash direction no longer print the differ warning; - the root git --exec-path names is also searched for usr\bin\bash.exe (Git for Windows on arm64). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(windows): isolate the no-bash case and launch pregate as the product does (#3197, #3176) windows-free-tests run 38813751242 failed two tests this layer added. Both were fixture defects on a real Windows host, not product defects: - gbrain-spawn-windows-shell "returns null when Windows has no bash" stubbed only `exists`. The resolver's PATH step asks the real Bun.which and found the runner's MSYS bash, which is correct. The case now also stubs `which` and `gitExecPath`, so it really means "no bash anywhere". - pregate-manifest-paths spawned the extensionless bin/gstack-pregate directly. CreateProcess cannot exec a shebang, so nothing ran and stdout was "". It now launches through lib/script-invocation's runScriptSync, gstack's own Windows invocation, so the case runs the manifest lane end to end on Windows instead of being excluded. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ci(windows): the missing-bash step survives the refusal it expects (#3197) GitHub runs `shell: bash` as `bash -eo pipefail`, and the step's own `set -uo pipefail` does not turn -e off. So when gstack-restamp refused, as the step expects, `OUT=$(...)` aborted the script before `CODE=$?` and before any output was printed: exit 1 after 0.5 s with nothing in the log (PR #3209, job 116729693492). The capture is now `OUT=$(...) && CODE=0 || CODE=$?`. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(pregate): the manifest-lane case expects the host's own remote lanes (#3176) Once 8b2f297cc made the case run on Windows, windows-free-tests run 38824886195 (shard 4) showed the expectation itself was Linux-only. pregate owes a lane remotely when its runner platform is not the host's (lib/pregate/workflows.ts). On a Windows host the fixture's Windows lane runs locally, and the Ubuntu `free-tests.yml/unit` lane is the remote obligation; that is the record Windows produced. The case now derives the owed lanes from the host the same way. On Windows it also requires `ran: node --test 'app/(shop)/[id]/page.test.js'`: there the route reaches the local run only through the manifest's whole path. With a cut manifest path (page.test.js) the local set is empty, checked through buildContext({ platform: 'win32' }) + selectLanes. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ci(windows-setup): expect 31 skipped setup.ps1 cases now that the shared table drives it Layer 2 drives setup.ps1 through the 16 shared rows of test/fixtures/windows-bash-resolution.json; like the 14 existing resolution rows they run under pwsh on Linux and skip on Windows. The case list is still asserted exactly (4 pass, 0 fail, 31 skip). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(ship-measure): give the CLI tests a private HOME (#3162) Every bun run test left ~/.gstack/projects/ship-measure-cli-*/evals and sweep-cli-fake-*/evals in the developer's real home, and the free-suite runner flagged them ("real home changed ... Give the writer a private HOME/GSTACK_HOME"). ship-measure's diagnostic-dir check calls getProjectEvalDir(), which builds the eval dir from os.homedir(), and these two CLI tests passed the real HOME while overriding only the state root. Both now set HOME and USERPROFILE to the test's own state dir. The sweep test also runs on the Windows lane, where os.homedir() reads USERPROFILE. test/ship-measure.test.ts:79 already gives its config test a private HOME the same way. getProjectEvalDir() itself is unchanged: whether eval history should follow GSTACK_HOME is left open in #3162. Fixes #3162 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(ship-measure): prove the sweep CLI never writes under the parent HOME (#3162) Reviewer test for #3163 (adopted from y$un_, forrest.sun527): points the parent HOME at a sentinel with a stub global gstack-slug and asserts no .gstack dir appears there. Fails on47d639a(the sentinel gets .gstack/projects/leaked-slug/evals); passes with #3163. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(redact): isolate fixture git from inherited hooks Fixture git was spawned with the parent environment, so a developer's core.hooksPath ran on the local push and rejected it (#2967). The helper blanks the global and system files and drops GIT_CONFIG_COUNT and GIT_CONFIG_PARAMETERS. A hooksPath set in the fixture repo still runs. * test(redact): blank GIT_CONFIG_GLOBAL with /dev/null on every platform (#2967) Follow-up to #3156 (adopted from Lockyer228): Git for Windows rejects GIT_CONFIG_GLOBAL=NUL (the repo convention is EMPTY_GLOBAL_GIT_CONFIG = '/dev/null' in lib/cso/process.ts), so both fixture helpers use /dev/null everywhere. Reviewer test: a hooksPath in the default global files under HOME/.gitconfig and XDG_CONFIG_HOME/git/config cannot reject the fixture push; it fails with the inherited environment (the47d639abehavior) and passes with the isolated env. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: gstack-config compares whole root paths and prints a runnable recovery command - report_root_disagreement compared word-split values, so two variables naming the same directory with a space were reported as disagreeing. Compare each complete value instead. - The privacy-key recovery hint single-quoted the root and left the script path bare; an apostrophe or space made it unrunnable. Quote with printf %q. - On Bash 3.2 (macOS /bin/bash) a failed `.` under set -e exits before the `||` fallback, so a missing gstack-state-root.sh exited 1 silently and test/state-root-resolver-failure.test.ts failed there. Check readability first. - The merge fixture now lives under a path with a space and an apostrophe, executes the printed command, and asserts same-directory variables agree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(config): pin the %q-quoted recovery command and run it from a spaced install path Follow-up to #3186 (adopted from davidfragnoli-lang). Intentional pin change: the fix line's GSTACK_STATE_ROOT='<legacy>' pin becomes the exact bash printf %q form of the legacy root (the PR loosened it to a prefix check; this restores an exact pin) and the original test name is kept. Reviewer test: copy bin/ to a path containing a space and an apostrophe; the printed fix: command runs cleanly and flips the merged value. Fails on47d639a(unquoted $_SELF), passes with #3186. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(gstack-gbrain-sync): fail when a star gitignore already ignores the pin ensureGbrainSourceGitignored appends .gbrain-source even when git check-ignore already excludes that path. The extra line dirties a tracked ignore-everything gitignore. * fix(gstack-gbrain-sync): skip the pin line when git already ignores it ensureGbrainSourceGitignored asked only for a literal .gbrain-source line. An ignore-everything star already excludes the pin, and the extra line left the tracked gitignore dirty. * fix(gbrain-sync): only a tracked .gitignore can stand in for the pin line Follow-up to #3178 (adopted from KuroChen). The skip now requires `git -c core.excludesFile= check-ignore -v` to name a tracked .gitignore (not global excludes, not .git/info/exclude, not a negation), so a pin ignored only on this machine still gets the shared line teammates need (#1384). Tests: the two git init spawns get timeouts (they failed the spawnSync tripwire), fixtures isolate HOME/XDG_CONFIG_HOME, and the PR's star-gitignore fixture stages its .gitignore (intentional fixture change: the contract is a tracked file). Reviewer tests: global excludes only, info/exclude only, an untracked star .gitignore, and a re-include each still append; all three fail on the PR head. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(skill-end): log the completion event before the final drain (#3198) gstack-skill-end drained and pushed before it appended its own completed timeline event, and gstack-timeline-log backgrounded its enqueue, so a full-tier end boundary returned with its latest event unpushed. The completion log now runs before the drain and the logger waits for its enqueue (one config read and a spool write; it exits early when sync is off or the session is unattended). Every consent, secret-scan and queue-lock gate is unchanged; the stale "local-only, never sent anywhere" comment is replaced. Patch and regression test from Kkkkkuro (#3198): 2 pass / 5 fail on47d639a, 8/8 with the fix. Reviewer test: with artifacts_sync_mode off the completion is written locally with no queue entry and no push. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(pregate): map Next.js route paths and tsconfig path aliases to their tests QUOTED excluded ( ) [ ] +, so a test naming app/(app)/page.tsx in a string never matched. resolveRef never read tsconfig compilerOptions.paths, so an import through @/ resolved to nothing. Both were PREGATE_NO_LANE false negatives in a Next.js App Router repo whose tests did name the files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(pregate): TypeScript alias precedence, relative extends and a no-lane explanation Follow-up to #3176 (adopted from vocodestudios). Path aliases now follow TypeScript's choice: an exact pattern, else the wildcard with the longest prefix, targets tried in order. When the chosen pattern resolves nothing, every plausible reading (other matching patterns, baseUrl, the repo root) gains the edge, so uncertainty selects more tests, never fewer. Relative extends chains are followed up to MAX_TSCONFIG_EXTENDS (4) hops, with baseUrl and paths resolved against the config that declares them. Trailing commas are dropped by the JSONC tokenizer (never inside a string) instead of a whole-text regex. A touched file with no lane now gets explain lines naming the import specifiers in test files that resolved to no repo file, any extends hop that was not followed (with the limit), and the hint to declare the file under dependencies or report the resolver gap. The lines ride testsFor's provenance, which lanes already pushes to --explain. Reviewer tests: overlapping aliases in both key orders, exact vs wildcard, target fallback, the union case, a two-hop extends chain, a string containing ',]', and the depth-limit explanation. Five fail on the PR head; all 12 pass. The manifest-parser half of #3176's follow-up (lane-selection.ts) ships in PR 2. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(browse): reap PTY children on agent shutdown * fix(browse): reap a terminal-agent PTY's whole process group at shutdown (#3147) Follow-up to #3148 (adopted from Y4NN777). The PTY child leads its own session and process group; its identity (pgid, sid, leader start time) is recorded at spawn and stays checkable after the leader exits. Disposal schedules a group reap after PTY_SHUTDOWN_GRACE_MS that, unlike the direct-child SIGKILL fallback, is not cancelled when the leader exits, and shutdown reaps every pending group before exiting, so descendants that ignore SIGHUP no longer outlive the agent. Only proven members are signalled: same pgid and sid, started no earlier than the leader, and nothing at all when the leader's PID is held by a process with another start time. Linux only (/proc); other platforms keep the direct-child behavior. During the shutdown grace the server answers 503 and no new PTY is spawned. Test changes to the PR's own test (intentional): the agent is spawned with process.execPath and the PTY child traps INT TERM HUP, so the case proves the SIGKILL fallback instead of passing on the kernel hangup. Reviewer tests: a HUP-immune grandchild is dead within the grace plus 1 s; an early-exiting leader's surviving descendant is reaped; a session that completed before shutdown still has its group reaped; unit cases for a foreign group and a reused leader PID. All four integration cases fail on 47d639a; three fail on the PR head. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * build(deps): bump the github-actions group with 5 updates Bumps the github-actions group with 5 updates: | Package | From | To | | --- | --- | --- | | [actions/upload-artifact](https://github.com/actions/upload-artifact) | `7.0.1` | `7.0.2` | | [actions/download-artifact](https://github.com/actions/download-artifact) | `8.0.1` | `8.0.2` | | [actions/setup-node](https://github.com/actions/setup-node) | `7.0.0` | `7.1.0` | | [ossf/scorecard-action](https://github.com/ossf/scorecard-action) | `2.4.4` | `2.5.0` | | [github/codeql-action/upload-sarif](https://github.com/github/codeql-action) | `4.38.2` | `4.38.3` | Updates `actions/upload-artifact` from 7.0.1 to 7.0.2 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/043fb46d1a93c77aae656e7c1c64a875d1fc6a0a...cf430e030ddbb5b0abf93d22962f4752f3646cd9) Updates `actions/download-artifact` from 8.0.1 to 8.0.2 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c...9000827ccba6bdab643e8b6fd33ac0654aef8333) Updates `actions/setup-node` from 7.0.0 to 7.1.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/820762786026740c76f36085b0efc47a31fe5020...949feb2413d6458794dcd2491c4babbbce0c15c1) Updates `ossf/scorecard-action` from 2.4.4 to 2.5.0 - [Release notes](https://github.com/ossf/scorecard-action/releases) - [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md) - [Commits](https://github.com/ossf/scorecard-action/compare/2d1146689b8cda280b9bc96326124645441f03bc...fa7117db83c52d787ae5a89f350999701505d78e) Updates `github/codeql-action/upload-sarif` from 4.38.2 to 4.38.3 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2...24c54180a607b1449ed407dd24f251e4e9147c8d) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: 7.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: actions/download-artifact dependency-version: 8.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: actions/setup-node dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: ossf/scorecard-action dependency-version: 2.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: github/codeql-action/upload-sarif dependency-version: 4.38.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(model-policy): track the upload-artifact v7.0.2 pin from #3175 Intentional pin change: test/model-policy-workflow.test.ts asserted actions/upload-artifact@043fb46d…; dependabot #3175 moves the workflow to cf430e03… (v7.0.2, verified against the upstream tag). The pin tracks the workflow. #3175's free-tests.yml hunk is left out of this PR (free-tests.yml is a #3190 file; it is re-bumped in PR 5). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(model-policy): its upload-artifact pin matches the eval workflows' pin Reviewer test for dependabot #3175: the model-policy workflow's single upload-artifact pin equals the pin evals.yml, evals-periodic.yml and windows-free-tests.yml use, so a group bump that misses one workflow (or the hard-coded pin above) is caught here. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * build(deps): hold Playwright minor/major bumps behind the windowsHide patch (#2923) Dependabot #2923 bumped playwright to ^1.64.0 and dropped the patchedDependencies entry keyed to playwright-core@1.62.1, which keeps windowsHide on Windows (#2160, #1989). The bun ecosystem now ignores only semver-minor and semver-major updates for playwright and playwright-core; patch updates still flow. The 1.64 migration (re-key the patch, the Dia/cookie qualification pins, the arm64 artifact name) is filed with owner Garry, revisit 2026-11-15. Test fails on47d639a(no ignore rule). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(readme): drop the stale skill lists users pasted into CLAUDE.md (#3169) README's install prompt and troubleshooting block each carried a skill list for CLAUDE.md; both were stale (18 shipped skills missing) and they disagreed. Claude Code lists installed skills itself, so both now keep only the /browse rule, and the troubleshooting entry says to delete an old pasted list. New free test: any comma-separated skill list in README.md or CLAUDE.md must name exactly the shipped skills (with a negative control for the detector). Fails on 47d639a; passes now. Reported by the #3169 issue author. The matching doctor warning for pasted lists ships in PR 5. Intentional pin change: test/test-value-bar.test.ts no longer expects the README skill list to name /test-audit twice; it now expects that list to be gone (0 occurrences), the registration this commit removes on purpose. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * chore(osv): image-size has a fix; html-to-docx's ^1.0.0 pin blocks it (#2753) The image-size ledger said no fixed release exists. OSV lists 2.0.3 as fixed for GHSA-5p2g-fcmc-qvqq and GHSA-w3rx-r6r6-pgpr (checked against api.osv.dev), but html-to-docx@1.8.0 pins image-size ^1.0.0 and there is no fixed 1.x, so the fix is a cross-major override. Both entries now say so and name the upgrade trigger; the 2026-11-30 expiry is kept. New test checks the wording and that bun.lock still shows the stated pin (it fails on47d639a). Correction first raised on #2753 by sonukapoor. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * feat(ios-qa): forward GSTACK_IOS_LAUNCH_ENV to devicectl launches (#1796) Reimplements only the launch-environment half of #1796 (credit Bmathews721; the session-cache half is superseded by #3132's design and had state-root and symlink-write problems). devicectl.ts parses GSTACK_IOS_LAUNCH_ENV as a JSON object of string to string; launchEnvArgs() returns the --environment-variables argv (empty when unset or {}) and launchApp passes it before the bundle id. Invalid JSON, a non-object, a non-string value, a bad name or a key in the debug bridge's reserved GSTACK_ namespace refuses before any launch with the new result code IOS_LAUNCH_ENV_INVALID (the detail names keys and types, never values). launchEnvArgs is exported for the forced-relaunch path in tunnel-bootstrap.ts. Adds the result-code row (bin/gstack-doctor-components.sh regenerated by gen:skill-docs), a troubleshooting entry under its exact text, the pregate-no-lane entry's explain note, and the how-to section with an example. New test fails on47d639a(module load: no parseLaunchEnv). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(deps): declare sharp and clear two transitive advisories sharp is imported in four files, including browse/src/screenshot-size-guard.ts, and test/dependency-security.test.ts asserts a >=0.35.4 floor on it and loads it. It was declared in no dependency field, reaching the tree only through @huggingface/transformers with the overrides pin forcing the version. Declare it at ^0.35.4, matching the floor that test already asserts. Upgrade @huggingface/transformers to ^4.3.0, which clears sprintf-js@1.1.3 and aligns the sharp override with what the parent declares: 4.2.0 declared sharp ^0.34.5 while the override pins 0.35.5, which is outside that range, and 4.3.0 declares ^0.35.4. Upgrade @anthropic-ai/claude-agent-sdk to 0.2.141, which clears @anthropic-ai/sdk@0.81.0. The existing overrides entry for sharp is left in place. * test(deps): sharp is declared and its override satisfies every asking range Reviewer test for #3145 (adopted from sonukapoor): sharp must be a declared dependency, and the pinned overrides.sharp must satisfy both that declaration and every lockfile package that depends on sharp (@huggingface/transformers included). Fails on47d639a(sharp not declared; transformers 4.2.0 asked for ^0.34.5 against a 0.35.5 pin). Classifier smoke on the changed tree (transformers 4.3.0, onnxruntime-node 1.30.0, sharp 0.35.5, claude-agent-sdk 0.2.141): the real sidecar entry bundled for Node with a private state root, and the classifier in-process under Bun, each downloaded the TestSavantAI model fresh, reported testsavant: ok, and returned scores identical to 47d639a's tree on five inputs, including a >512-token input that exercises the truncation override. dependency-security, deps-smoke, overlay-sdk-cancel-eof, security-classifier and screenshot-size-guard pass; typecheck:test reports no new diagnostics. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(gbrain-sync): the no-bash skip names GSTACK_GIT_BASH and how to set it (#3197) The brain-sync stage's Windows skip line told users to set GSTACK_BASH. After the fix wave the canonical override is GSTACK_GIT_BASH, with GSTACK_BASH as a deprecated alias (plan correction 9). The summary is now the exported NO_BASH_SUMMARY: it names GSTACK_GIT_BASH first and GSTACK_BASH as the old name, and gives the two recipes that reach Claude Code (a PowerShell user environment variable plus a Claude Code restart, or the "env" block of ~/.claude/settings.json). Minimal on purpose: once PR 2 lands, this switches to lib/script-invocation.ts noBashMessage(). Until then lib/gbrain-exec.ts still reads only GSTACK_BASH, so this line is accurate only with PR 2 merged first. New test test/gbrain-sync-no-bash-message.test.ts fails on the previous commit (NO_BASH_SUMMARY not exported) and passes now. Handoff from Lane C (PR 2). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(ios-qa): the forced relaunch carries GSTACK_IOS_LAUNCH_ENV too (#1796) bootstrapTunnel's relaunchApp (an app whose boot token an earlier daemon consumed is relaunched once with --terminate-existing) built its own devicectl argv and dropped GSTACK_IOS_LAUNCH_ENV, so an env-gated debug bridge vanished after the one relaunch the howto says carries it. It now uses launchEnvArgs(); an invalid value refuses the relaunch with launch_failed and the IOS_LAUNCH_ENV_INVALID detail before anything is terminated. Two new tests in ios-qa/daemon/test/devicectl-launch-env.test.ts drive bootstrapTunnel through a consumed-token device: both fail on the previous commit (relaunch argv lacks --environment-variables; the invalid value still terminates and relaunches) and pass now. ios-qa daemon: 167 pass. tunnel-bootstrap.ts was assigned to Lane D by the coordinator for this fix. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ci(version-gate): check the version queue only on PRs into main Stacked layer PRs carry no VERSION stamp by design (the release layer stamps once), so the queue check failed on any layer touching package.json. The queue and its collision rule only describe main; a PR into main is still checked exactly as before. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(browse): scope the SIGTERM PTY-reap case to POSIX signals (#3147) windows-free-tests run 38813751242 (shard 6) failed "SIGTERM reaps every active PTY child before terminal-agent exits" with "timed out waiting for pty-child.pid", serially and on retry. Diagnosis: invalid test expectation on Windows, not an agent defect the test can observe. The contract under test is the agent's graceful shutdown, its process.on('SIGTERM'/'SIGINT') cleanup in terminal-agent.ts. On Windows, Bun's subprocess.kill('SIGTERM') is libuv's TerminateProcess, so that handler never runs there; and the PTY fixture is an extension-less `#!/bin/bash` script, which CreateProcess cannot launch, so the child never starts (the timeout is at the pid file, after the port, token, grant and WebSocket all succeeded). The file's other integration cases were already Linux-scoped; this one now skips only on win32 and still runs on Linux and macOS. The pure ownership unit tests in the file keep running on Windows. Open, not covered by any test: whether a ConPTY child outlives a hard-terminated agent on Windows. Testing it needs a Windows-launchable terminal fixture, which BROWSE_TERMINAL_BINARY (one executable, fixed argv) cannot express without a product change. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(plan-review): bound the native outside voice without TaskOutput (#3182) Claude Code 2.1.277 removed TaskOutput, so the plan-review native fallback's preflight always failed and users without the Codex CLI never got a second voice. The fallback now uses primitives the host still enforces: a background `sleep 300` Bash timer (its exit re-invokes the parent; the 2.1.300 sleep block applies only to foreground commands), a background Plan dispatch whose completion arrives as a <task-notification>, and TaskStop for whichever task loses. Only a matching completed notification that beats the timer counts; interim ("is waiting on its own background work"), turn-limit, foreground and late results get no credit. The "[Subagent hand-back]" header (2.1.277) is treated as framing. The unavailable line now names its cause and fix, ends with OUTSIDE_VOICE_UNAVAILABLE (new result code + troubleshooting entry), and the review-log row carries unavailable_reason. The bounded-wait prose was tightened so plan-ceo-review and plan-eng-review stay under their existing size ceilings (no ratchet raise for this item). Intentional pin change: test/run-in-background-guidance.test.ts hasBoundedOutsideVoiceWait and the dispatch-contract cases now pin the timer/notification/TaskStop contract instead of TaskOutput's envelope. bin/gstack-doctor-components.sh is regenerated from lib/result-codes.ts. Reported by HuellintonMota in #3182. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * feat(bin): gstack-ceo-plan-find locates the CEO plan for a branch (#280) /plan-ceo-review saves its scope decisions under the state root's ceo-plans/, but no plan review can find them: only /design-html reads that directory, newest file first. This helper is the CEO-plan sibling of gstack-design-doc-find, so /plan-eng-review can call one command instead of a glob in prose. It prints the newest top-level plan whose "Branch:" header names the branch, compared the way gstack-slug writes BRANCH (feat/x matches feat-x), else the newest plan, else nothing. Subdirectories are not read. A usage error exits 2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(plan-eng-review): read the CEO plan in the Design Doc Check (#280) /plan-eng-review never looked in ceo-plans/, so an eng review after /plan-ceo-review ran without the scope that review accepted, deferred or skipped. capy-ai closed #414 asking for this focused fix, and TODOS.md scopes it as a gstack-ceo-plan-find sibling of gstack-design-doc-find. The Design Doc Check now prints "CEO plan found: <path>" or "No CEO plan found" after the design doc line, and the prose says what to read the plan for. The data-not-instructions rule names the CEO plan too, since another agent may have written it. Only plan-eng-review changes: the shared {{DESIGN_DOC_DISCOVERY}} block and the branch-scoped review log are untouched. Reported by @chancheuklap in #280. main left plan-eng-review 4 bytes under its parity cap, so the +325 bytes raise maxSizeRatio to the measured 1.2196, noted the way earlier growth was. Fixes #280 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(plan-eng-review): disclose a CEO plan borrowed from another branch (#280) Review changes on top of #3159 (szsunyuan / y$un_): - gstack-ceo-plan-find keeps stdout a bare path or empty; when it falls back to another branch's plan it prints one stderr line, "CEO plan found (from branch <b>, not <current>): <path>", with control characters stripped from the plan header ("unknown" when it has none). - The Design Doc Check tells an interactive reviewer to ask before using such a plan, and a spawned session to use it and quote the disclosure. - The Design Doc Check prose is tightened so plan-eng-review fits the owner-approved 1.2196 ceiling (measured 151,950 / 124,597 = 1.2195). Reviewer tests: test/ceo-plan-find-cross-branch.test.ts (5 of 7 fail on the Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> #3159 head). The design-doc finder's matching disclosure stays deferred. * fix(test): credit abutting section chunks whose edge bytes repeat (#3182) detectSectionReads trims the longest suffix/prefix overlap between consecutive Bash outputs. Two chunks that abut exactly (tail -c +N after a chunk ending at N-1) can share an edge byte by chance; the trim then drops a real byte and a fully printed section reads as incomplete. #3182's review-sections edit moved plan-ceo-review's 66,999-byte boundary onto "cur|rent", which turned the existing byte-range test red. The detector now also checks the plain concatenation; a gap still refuses. Detector/fixture defect, not a product change. New regression case in test/section-capture-native-tools.test.ts fails without the fix. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(changelog): fix wave 2026-10-15 release notes Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * v1.91.104.0 fix: the 2026-10-15 issue wave Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(qa): probe each documented input rule, not only its boundary values The paid gate's qa-functional-cli-report run (38829994639) probed zero and an unsafe integer but never a non-digit amount, so it missed the planted parseInt defect ("Amounts contain only ASCII digits") and reported no defect. The functional contract map's invalid-input row now asks for one probe per documented input rule (allowed characters, format, sign, range, arity). test/qa-functional-prompt.test.ts replays a captured CI Read of system-functional.md; its completed-method variant now feeds the current section bytes, so the validator check keeps its omitted/pending negative controls without pinning the old wording. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * v1.91.106.0: restamp the fix wave above v1.91.105.0 Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(release): keep the wave's dependency bumps through the main merge Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Co-authored-by: Bryan Stone <aegixx@gmail.com> Co-authored-by: vilano93 <244097767+vilano93@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: aftabkh4n <akobkz@gmail.com> Co-authored-by: Benjamin D. Smith <benjamin.smith@binarysword.com> Co-authored-by: Jess Sullivan <jess@sulliwood.org> Co-authored-by: NetrioGit <5wngh@naver.com> Co-authored-by: y$un_ <forrest.sun527@gmail.com> Co-authored-by: Lockyer <135391289+Lockyer228@users.noreply.github.com> Co-authored-by: davidfragnoli-lang <249433777+davidfragnoli-lang@users.noreply.github.com> Co-authored-by: KuroChen <kurochen_macmini@KuroChendeMac-mini.local> Co-authored-by: AV <vo.quanganh@gmail.com> Co-authored-by: Y4NN777 <171065166+Y4NN777@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sonu Kapoor <sonukapoor@gmail.com>
849 lines
86 KiB
Markdown
849 lines
86 KiB
Markdown
# gstack
|
||
|
||
> "I don't think I've typed like a line of code probably since December, basically, which is an extremely large change." — [Andrej Karpathy](https://fortune.com/2026/03/21/andrej-karpathy-openai-cofounder-ai-agents-coding-state-of-psychosis-openclaw/), No Priors podcast, March 2026
|
||
|
||
When I heard Karpathy say this, I wanted to find out how. How does one person ship like a team of twenty? Peter Steinberger built [OpenClaw](https://github.com/openclaw/openclaw) — 247K GitHub stars — essentially solo with AI agents. The revolution is here. A single builder with the right tooling can move faster than a traditional team.
|
||
|
||
I'm [Garry Tan](https://x.com/garrytan), President & CEO of [Y Combinator](https://www.ycombinator.com/). I've worked with thousands of startups — Coinbase, Instacart, Rippling — when they were one or two people in a garage. Before YC, I was one of the first eng/PM/designers at Palantir, cofounded Posterous (sold to Twitter), and built Bookface, YC's internal social network.
|
||
|
||
**gstack is my answer.** I've been building products for twenty years, and right now I'm shipping more products than I ever have. In the last 60 days: 3 production services, 40+ shipped features, part-time, while running YC full-time. On logical code change — not raw LOC, which AI inflates — my 2026 run rate is **~810× my 2013 pace** (11,417 vs 14 logical lines/day). Year-to-date (through April 18), 2026 has already produced **240× the entire 2013 year**. Measured across 40 public + private `garrytan/*` repos including Bookface, after excluding one demo repo. AI wrote most of it. The point isn't who typed it, it's what shipped.
|
||
|
||
> The LOC critics aren't wrong that raw line counts inflate with AI. They are wrong that normalized-for-inflation, I'm less productive. I'm more productive, by a lot. Full methodology, caveats, and reproduction script: **[On the LOC Controversy](docs/ON_THE_LOC_CONTROVERSY.md)**.
|
||
|
||
**2026 — 1,237 contributions and counting:**
|
||
|
||

|
||
|
||
**2013 — when I built Bookface at YC (772 contributions):**
|
||
|
||

|
||
|
||
Same person. Different era. The difference is the tooling.
|
||
|
||
**gstack is how I do it.** It turns Claude Code into a virtual engineering team — a CEO who rethinks the product, an eng manager who locks architecture, a designer who catches AI slop, a reviewer who finds production bugs, a QA lead who opens a real browser, a security officer who runs OWASP + STRIDE audits, and a release engineer who ships the PR. Twenty-three specialists and eight power tools, all slash commands, all Markdown, all free, MIT license.
|
||
|
||
This is my open source software factory. I use it every day. I'm sharing it because these tools should be available to everyone.
|
||
|
||
Fork it. Improve it. Make it yours. And if you want to hate on free open source software — you're welcome to, but I'd rather you just try it first.
|
||
|
||
**Who this is for:**
|
||
- **Founders and CEOs** — especially technical ones who still want to ship
|
||
- **First-time Claude Code users** — structured roles instead of a blank prompt
|
||
- **Tech leads and staff engineers** — rigorous review, QA, and release automation on every PR
|
||
|
||
## Quick start
|
||
|
||
1. Install gstack (about 30 seconds of setup — see below)
|
||
2. Run `/office-hours` — describe what you're building
|
||
3. Run `/plan-ceo-review` on any feature idea
|
||
4. Run `/review` on any branch with changes
|
||
5. Run `/qa` on your staging URL or an isolated local API, CLI, job or webhook
|
||
6. Stop there. You'll know if this is for you.
|
||
|
||
## Install — about 30 seconds
|
||
|
||
`./setup` took 31 seconds after the clone on a 4-vCPU Linux cloud machine (v1.91.13.0, clean HOME, including the binary build and the Chromium download). Slower networks and laptops take longer.
|
||
|
||
**Requirements:** [Claude Code](https://docs.anthropic.com/en/docs/claude-code), [Git](https://git-scm.com/), [Bun](https://bun.sh/) v1.4.2+ (the tested version; setup refuses Bun older than 1.3.3, which would let compiled tools read a project's `.env`, and warns in between), [Node.js](https://nodejs.org/) (Windows only). **Recommended on macOS:** the [Aside](https://aside.com) browser (macOS 15+) — browser skills, `/make-pdf`, and `/diagram` drive it first, with your real logged-in sessions. Without it, `./setup` builds gstack's own bundled browser and the same skills use that. `/cso` additionally needs a Bun release with all four `--no-compile-autoload-*` build flags plus a native toolchain: a static-capable C compiler on Linux, Xcode command-line tools on macOS, or Visual Studio 2022 Build Tools with Desktop development with C++ on Windows. If those are absent, setup installs everything else, removes stale CSO helpers, and `/cso` reports `not assessed` with the prerequisite.
|
||
|
||
When qualified CSO runtime images are published, setup gives each automatic preload a 30-second window plus a bounded setup allowance for the declared catalog. For slower registries, set an integer such as `GSTACK_CSO_IMAGE_PULL_TIMEOUT_SECONDS=120` (accepted range: 5–300 seconds). One image timing out does not consume the remaining images' windows; setup reports partial progress and a later run resumes from exact digests already present in local Docker. The complete preload is capped at one hour.
|
||
|
||
### Step 1: Install on your machine
|
||
|
||
Open Claude Code and paste this. Claude does the rest.
|
||
|
||
> Install gstack: run **`git clone --single-branch --depth 1 https://github.com/garrytan/gstack.git ~/.claude/skills/gstack && cd ~/.claude/skills/gstack && ./setup`** then add a "gstack" section to CLAUDE.md that says to use the /browse skill from gstack for all web browsing and never use mcp\_\_claude-in-chrome\_\_\* tools. Claude Code lists the installed skills itself, so the section needs no skill list. Then ask the user if they also want to add gstack to the current project so teammates get it.
|
||
|
||
### Step 2: Team mode — auto-update for shared repos (recommended)
|
||
|
||
From inside your repo, paste this. Switches you to team mode, bootstraps the repo so teammates get gstack automatically, and commits the change:
|
||
|
||
```bash
|
||
(cd ~/.claude/skills/gstack && ./setup --team) && ~/.claude/skills/gstack/bin/gstack-team-init required && git add .claude/ CLAUDE.md && git commit -m "require gstack for AI-assisted work"
|
||
```
|
||
|
||
No vendored files in your repo, no version drift, no manual upgrades. Every Claude Code session starts with a fast auto-update check (throttled to once/hour, network-failure-safe, completely silent).
|
||
|
||
Swap `required` for `optional` if you'd rather nudge teammates than block them.
|
||
|
||
### OpenClaw
|
||
|
||
OpenClaw spawns Claude Code sessions via ACP, so every gstack skill just works
|
||
when Claude Code has gstack installed. Paste this to your OpenClaw agent:
|
||
|
||
> Install gstack: run `git clone --single-branch --depth 1 https://github.com/garrytan/gstack.git ~/.claude/skills/gstack && cd ~/.claude/skills/gstack && ./setup` to install gstack for Claude Code. Then add a "Coding Tasks" section to AGENTS.md that says: when spawning Claude Code sessions for coding work, tell the session to use gstack skills. Include these examples — security audit: "Load gstack. Run /cso", code review: "Load gstack. Run /review", QA test a URL: "Load gstack. Run /qa https://...", build a feature end-to-end: "Load gstack. Run /autoplan, implement the plan, then run /ship", plan before building: "Load gstack. Run /office-hours then /autoplan. Save the plan, don't implement."
|
||
|
||
**After setup, just talk to your OpenClaw agent naturally:**
|
||
|
||
| You say | What happens |
|
||
|---------|-------------|
|
||
| "Fix the typo in README" | Simple — Claude Code session, no gstack needed |
|
||
| "Run a security audit on this repo" | Spawns Claude Code with `Run /cso` |
|
||
| "Build me a notifications feature" | Spawns Claude Code with /autoplan → implement → /ship |
|
||
| "Help me plan the v2 API redesign" | Spawns Claude Code with /office-hours → /autoplan, saves plan |
|
||
|
||
See [docs/OPENCLAW.md](docs/OPENCLAW.md) for advanced dispatch routing and
|
||
the gstack-lite/gstack-full prompt templates.
|
||
|
||
### Native OpenClaw Skills (via ClawHub)
|
||
|
||
Four methodology skills that work directly in your OpenClaw agent, no Claude Code
|
||
session needed. Install from ClawHub:
|
||
|
||
```
|
||
clawhub install gstack-openclaw-office-hours gstack-openclaw-ceo-review gstack-openclaw-investigate gstack-openclaw-retro
|
||
```
|
||
|
||
| Skill | What it does |
|
||
|-------|-------------|
|
||
| `gstack-openclaw-office-hours` | Product interrogation with 6 forcing questions |
|
||
| `gstack-openclaw-ceo-review` | Strategic challenge with 4 scope modes |
|
||
| `gstack-openclaw-investigate` | Root cause debugging methodology |
|
||
| `gstack-openclaw-retro` | Weekly engineering retrospective |
|
||
|
||
These are conversational skills. Your OpenClaw agent runs them directly via chat.
|
||
|
||
### Other AI Agents
|
||
|
||
gstack runs on more agents than Claude. Bare `./setup` installs for Claude
|
||
Code only. Pick another agent with `--host <name>`, or install for every agent
|
||
setup detects on this machine with `--host auto`:
|
||
|
||
```bash
|
||
git clone --single-branch --depth 1 https://github.com/garrytan/gstack.git ~/gstack
|
||
cd ~/gstack && ./setup --host auto # or: ./setup --host codex
|
||
./setup --status # one row per install: host, tier, scope, version, path
|
||
```
|
||
|
||
An explicit `--host X` installs for X only and never changes another agent's
|
||
install. `/gstack-upgrade` refreshes every install it registered, one row per
|
||
host, and says which ones failed.
|
||
|
||
A checkout carries skills only for the agents installed from it. Setup records
|
||
them in `.gstack-installed-hosts` and never drops one, so adding an agent later
|
||
is just `./setup --host <name>`. Copies rendered for other agents are pruned:
|
||
generated files move to `~/.gstack/backups/host-renders/`, and files gstack
|
||
can't prove it generated stay where they are. A global Claude install went
|
||
from 632 `SKILL.md` files (34.7 MB) to its own 63 (2.5 MB), which keeps Cursor-agent
|
||
from freezing on the skills tree (#1694). In a development checkout,
|
||
`bun run build` still renders every agent; inside an install it renders the
|
||
recorded ones, and `GSTACK_RENDER_HOSTS=all bun run build` renders them all.
|
||
|
||
Tiers: **full** is certified by a real workflow run (see
|
||
[Certify your host](docs/ADDING_A_HOST.md#certify-your-host)); **experimental**
|
||
installs and passes the conformance tests but has no certification run yet;
|
||
**instruction-only** installs nothing: setup prints what to copy.
|
||
|
||
| Agent | Tier | Install | First invocation | Safety skills | Outside review needs | Repair |
|
||
|-------|------|---------|------------------|---------------|----------------------|--------|
|
||
| Claude Code | full | `--host claude` (default) | `/office-hours` | enforced (hooks block) | Codex CLI, signed in | `./setup --host claude` |
|
||
| OpenAI Codex CLI | experimental | `--host codex` → `${CODEX_HOME:-~/.codex}/skills/gstack-*/` | ask for `gstack-office-hours` | advisory, not blocked | Claude Code CLI, signed in | `./setup --host codex` |
|
||
| OpenCode | experimental | `--host opencode` → `~/.config/opencode/skills/gstack-*/` + `/gstack-*` commands | `/gstack-office-hours` | advisory, not blocked | Codex CLI, signed in | `./setup --host opencode` |
|
||
| Cursor | experimental | `--host cursor` → `~/.cursor/skills/gstack-*/` | ask for `gstack-office-hours` | advisory, not blocked | Codex CLI, signed in | `./setup --host cursor` |
|
||
| Factory Droid | experimental | `--host factory` → `~/.factory/skills/gstack-*/` | ask for `gstack-office-hours` | advisory, not blocked | Codex CLI, signed in | `./setup --host factory` |
|
||
| Kiro | experimental | `--host kiro` → `~/.kiro/skills/gstack-*/` | ask for `gstack-office-hours` | advisory, not blocked | Codex CLI, signed in | `./setup --host kiro` |
|
||
| GitHub Copilot CLI | experimental | `--host copilot` → `~/.copilot/skills/gstack-*/` | `/gstack-office-hours` | advisory, not blocked | Codex CLI, signed in | `./setup --host copilot` |
|
||
| Antigravity CLI | experimental | `--host agy` (or `--host antigravity`) → `~/.gemini/antigravity-cli/skills/gstack-*/` | `/gstack-office-hours` | advisory, not blocked | Codex CLI, signed in | `./setup --host agy` |
|
||
| Slate | instruction-only | `--host slate` (points at the Claude install; Slate reads `.claude/skills`) | `/office-hours` via the Claude install | advisory, not blocked | — | `./setup --host claude` |
|
||
| OpenClaw | instruction-only | `--host openclaw` (prints the digest path; ACP spawns Claude Code — [docs/OPENCLAW.md](docs/OPENCLAW.md)) | "Load gstack. Run /review" | advisory, not blocked | — | re-copy the digest after upgrades |
|
||
| Hermes | instruction-only | `--host hermes` (prints the digest path and `gen:skill-docs --host hermes`) | copy the digest, or render skills yourself | advisory, not blocked | — | re-copy the digest after upgrades |
|
||
| GBrain (mod) | instruction-only | `--host gbrain` (brain-aware variants ship from the GBrain repo) | — | advisory, not blocked | — | — |
|
||
|
||
Copilot invokes gstack skills by their prefixed names (`/gstack-review`) because
|
||
`/review` is a Copilot built-in. Copilot ignores skill hooks, so `/careful` and
|
||
`/freeze` only advise there, and `COPILOT_HOME` other than `~/.copilot` is not
|
||
supported yet (setup refuses and changes nothing).
|
||
|
||
Antigravity CLI also invokes skills by prefixed name (`/gstack-review`). Setup
|
||
writes only `~/.gemini/antigravity-cli/skills/gstack*`: Gemini CLI's
|
||
`~/.gemini/skills` and settings are never touched, and `--host auto` selects
|
||
Antigravity only when `agy` is on `PATH` or `~/.gemini/antigravity-cli` exists,
|
||
never for a Gemini-CLI-only `~/.gemini`. The Antigravity 2.0 app and IDE read
|
||
`~/.gemini/config/skills`, which this host does not install.
|
||
|
||
Outside reviews require the selected CLI to be installed and authenticated: Claude Code when using gstack in Codex, or Codex on other harnesses. External harnesses discover these commands as `/gstack-claude-code` and `/gstack-codex`; each harness omits its own wrapper. Explicit provider requests keep that provider. The existing `codex_reviews` setting controls automatic outside reviews where supported, regardless of the provider selected.
|
||
|
||
`/claude` has been renamed to `/claude-code`. Re-run `./setup --host <name>` to migrate managed installations, including other harnesses sharing the checkout. Setup preserves the previous installation if replacement generation or installation fails and prints repair instructions.
|
||
|
||
**Instruction-only tier (any rules-reading agent — Zed, Amp, Jules, side projects):**
|
||
copy the 2KB digest at [`agents-digest/gstack-AGENTS.md`](agents-digest/gstack-AGENTS.md)
|
||
into a location your agent reads (for example, append it to your project's `AGENTS.md`).
|
||
It carries gstack's ethos, reuse ladder, and voice rules — no install required. The
|
||
digest's first line shows its gstack version; re-copy it after upgrading.
|
||
|
||
For Codex, setup reads the top-level `model` from
|
||
`${CODEX_HOME:-~/.codex}/config.toml` and generates the matching behavioral
|
||
profile, falling back to `gpt-6-astra` when no usable model is configured.
|
||
`gpt-5.6-sol` automatically receives bounded-scope instructions that
|
||
finish the requested lake without expanding into adjacent cleanup or speculative
|
||
hardening. The Sol profile is exact-match only: dated snapshots and other 5.6
|
||
variants get the generic GPT profile, and setup warns on near-misses like
|
||
`gpt-5.6-sol-2026-08-01`. Override detection with `./setup --host codex --model <id>` — the
|
||
override applies to that run only; set `model` in your Codex `config.toml` to
|
||
make it stick across upgrades. After changing your Codex model, rerun
|
||
`./setup --host codex` to regenerate the skills.
|
||
|
||
**Plan-review and implementation tiers.** Plan workflows use an independent
|
||
`frontier` reviewer: Fable 5.1 from Codex, or GPT-6 Astra from Claude Code.
|
||
Implementation handoffs recommend the `smart` tier: Opus 5.5 or GPT-6.1 Sol.
|
||
Choose a different tier, pin either provider's model, or use `host` mode to
|
||
preserve native model settings. The read-only `gstack-models` command explains
|
||
the effective choices; changing these settings does not require regenerating
|
||
skills or switch your running session. A weekly maintenance check flags changed
|
||
official recommendations and retirement notices without automatically changing
|
||
models. See [model policy: setup, overrides and freshness](docs/model-policy.md).
|
||
|
||
**Other Codex calls keep their existing selection.** Without the explicit
|
||
`plan-review` role (including ordinary review and ship adversarial passes), gstack picks the model in this
|
||
order: a model you name for that request, then `GSTACK_CODEX_MODEL`, then
|
||
`model` in your Codex `config.toml` (for native `codex review`, `review_model`
|
||
first; a custom `CODEX_HOME` is honored), and only then gstack's default,
|
||
`gpt-6-astra`. Before spending anything, it prints the choice and where it came
|
||
from, for example `CODEX_MODEL: gpt-5.6-terra (exec; source: ~/.codex/config.toml model)`.
|
||
If your choice is invalid or your account cannot use it, gstack stops with a
|
||
repair message and reports the outside review as unavailable. It never silently
|
||
switches to its default. Nested Codex reviews also run with installed skills
|
||
hidden (`-c skills.include_instructions=false`), so a review cannot turn into a
|
||
whole nested skill run. Runtime model selection is separate from the setup-time
|
||
behavioral profile above. Without the plan-review role, `/claude-code` (`gstack-claude-code`
|
||
on Codex) preserves Claude's configured model. Set `GSTACK_CLAUDE_MODEL=<model>`
|
||
or name a model in your request to override it for the invocation, including
|
||
resumed consultations. See [eval defaults and overrides](CONTRIBUTING.md#testing--evals)
|
||
for capture, judge, and benchmark model selection.
|
||
|
||
The design binary (`$D`) uses OpenAI's `gpt-5.5` by default, with image
|
||
generation through `gpt-image-2`. Set `GSTACK_DESIGN_MODEL=<model>` to use
|
||
another gpt-5-class model for both image generation and screenshot analysis;
|
||
if OpenAI rejects it, the error names `GSTACK_DESIGN_MODEL`. Set
|
||
`GSTACK_DESIGN_IMAGE_MODEL=<gpt-image model>` to change the image tool model; a
|
||
value that is not a gpt-image model name is refused before any request. Check a
|
||
key against the defaults with `bun run design/scripts/live-model-check.ts`,
|
||
which always tests the default models and ignores both overrides; the weekly
|
||
periodic census runs the same check. Set `OPENAI_BASE_URL` to send every `$D`
|
||
call to an OpenAI-compatible gateway instead of `api.openai.com`; egress
|
||
receipts record the gateway host. On Codex, `/design-shotgun` generates mockups
|
||
with Codex's built-in `$imagegen` skill instead, so it needs no
|
||
`OPENAI_API_KEY`; `$D` still builds and serves the comparison board.
|
||
|
||
**Want to add support for another agent?** See [docs/ADDING_A_HOST.md](docs/ADDING_A_HOST.md).
|
||
Rendering a new agent is one TypeScript config file; installing it also needs a
|
||
setup arm and the conformance kit, and it starts as experimental.
|
||
|
||
## See it work
|
||
|
||
```
|
||
You: I want to build a daily briefing app for my calendar.
|
||
You: /office-hours
|
||
Claude: [asks about the pain — specific examples, not hypotheticals]
|
||
|
||
You: Multiple Google calendars, events with stale info, wrong locations.
|
||
Prep takes forever and the results aren't good enough...
|
||
|
||
Claude: I'm going to push back on the framing. You said "daily briefing
|
||
app." But what you actually described is a personal chief of
|
||
staff AI.
|
||
[extracts 5 capabilities you didn't realize you were describing]
|
||
[challenges 4 premises — you agree, disagree, or adjust]
|
||
[generates 3 implementation approaches with effort estimates]
|
||
RECOMMENDATION: Ship the narrowest wedge tomorrow, learn from
|
||
real usage. The full vision is a 3-month project — start with
|
||
the daily briefing that actually works.
|
||
[writes design doc → feeds into downstream skills automatically]
|
||
|
||
You: /plan-ceo-review
|
||
[reads the design doc, challenges scope, runs 10-section review]
|
||
|
||
You: /plan-eng-review
|
||
[ASCII diagrams for data flow, state machines, error paths]
|
||
[test matrix, failure modes, security concerns]
|
||
|
||
You: Approve plan. Exit plan mode.
|
||
[writes 2,400 lines across 11 files. ~8 minutes.]
|
||
|
||
You: /review
|
||
[AUTO-FIXED] 2 issues. [ASK] Race condition → you approve fix.
|
||
|
||
You: /qa https://staging.myapp.com
|
||
[opens real browser, clicks through flows, finds and fixes a bug]
|
||
|
||
You: /ship
|
||
Tests: 42 → 51 (+9 new). PR: github.com/you/app/pull/42
|
||
```
|
||
|
||
You said "daily briefing app." The agent said "you're building a chief of staff AI" — because it listened to your pain, not your feature request. Eight commands, end to end. That is not a copilot. That is a team.
|
||
|
||
## The sprint
|
||
|
||
gstack is a process, not a collection of tools. The skills run in the order a sprint runs:
|
||
|
||
**Think → Plan → Build → Review → Test → Ship → Reflect**
|
||
|
||
Each skill feeds into the next. `/office-hours` writes a design doc that `/plan-ceo-review` reads. `/plan-eng-review` writes a test plan that `/qa` picks up. `/review` catches bugs that `/ship` verifies are fixed. Nothing falls through the cracks because every step knows what came before it.
|
||
|
||
| Skill | Your specialist | What they do |
|
||
|-------|----------------|--------------|
|
||
| `/office-hours` | **YC Office Hours** | Start here. Six forcing questions that reframe your product before you write code. Pushes back on your framing, challenges premises, generates implementation alternatives. Design doc feeds into every downstream skill. |
|
||
| `/plan-ceo-review` | **CEO / Founder** | Rethink the problem. Find the 10-star product hiding inside the request. Four modes: Expansion, Selective Expansion, Hold Scope, Reduction. |
|
||
| `/plan-eng-review` | **Eng Manager** | Lock in architecture, data flow, diagrams, edge cases, and tests. Forces hidden assumptions into the open. |
|
||
| `/plan-design-review` | **Senior Designer** | Rates each design dimension 0-10, explains what a 10 looks like, then edits the plan to get there. AI Slop detection. Interactive — one AskUserQuestion per design choice. |
|
||
| `/plan-devex-review` | **Developer Experience Lead** | Interactive DX review: explores developer personas, benchmarks against competitors' TTHW, designs your magical moment, traces friction points step by step. Three modes: DX EXPANSION, DX POLISH, DX TRIAGE. 20-45 forcing questions. |
|
||
| `/design-consultation` | **Design Partner** | Build a complete design system from scratch. Researches the landscape, proposes creative risks, generates realistic product mockups. Writes `DESIGN.md` in the open DESIGN.md format, so impeccable, Google Stitch, and any tool that reads it share one file. |
|
||
| `/review` | **Staff Engineer** | Find the bugs that pass CI but blow up in production. Auto-fixes the obvious ones. Flags completeness gaps and gate integrity: every weakened test, timeout, snapshot or suppression reaches a human by name. Advisory simplification lens flags over-built code — never blocks, never auto-applies. |
|
||
| `/deslop-shared-libs` | **Shared Code Reviewer** | Find worthwhile shared-code extractions in recent work. Compares up to five opportunities and recommends the best three, with source evidence, reliability gains, and total code savings. Recommendations only. |
|
||
| `/test-audit` | **Test Auditor** | Sweep existing tests for ones that cost more than they protect: source greps, duplicates, assertion-free probes, test-only exports. Every candidate carries an evidence card; report-only unless you approve a batch. |
|
||
| `/investigate` | **Debugger** | Systematic root-cause debugging. Iron Law: no fixes without investigation. Traces data flow, tests hypotheses, stops after 3 failed fixes. |
|
||
| `/design-review` | **Designer Who Codes** | Same audit as /plan-design-review, then fixes what it finds. Atomic commits, before/after screenshots. If you have impeccable installed, its engine runs first and every mechanical finding arrives tagged with its rule id. |
|
||
| `/devex-review` | **DX Tester** | Live developer experience audit. Actually tests your onboarding: navigates docs, tries the getting started flow, times TTHW, screenshots errors. Compares against `/plan-devex-review` scores — the boomerang that shows if your plan matched reality. |
|
||
| `/design-shotgun` | **Design Explorer** | "Show me options." Generates 4-6 AI mockup variants, opens a comparison board in your browser, collects your feedback, and iterates. Taste memory learns what you like. Repeat until you love something, then hand it to `/design-html`. |
|
||
| `/design-html` | **Design Engineer** | Turn a mockup into production HTML that actually works. Pretext computed layout: text reflows, heights adjust, layouts are dynamic. 30KB, zero deps. Detects React/Svelte/Vue. Smart API routing per design type (landing page vs dashboard vs form). One slop-gate pass through the impeccable engine when you have it. The output is shippable, not a demo. |
|
||
| `/qa` | **QA Lead** | Explore browser, API, CLI, job and webhook behavior. Reproduce bugs, write failing regressions, fix the cause and re-verify before committing. |
|
||
| `/qa-only` | **QA Reporter** | Explore and report with replayable evidence. Suggest regression cases without changing product code or tests. |
|
||
| `/pair-agent` | **Multi-Agent Coordinator** | Share gstack's own browser with any AI agent. One command, one paste, connected. Works with OpenClaw, Hermes, Codex, Cursor, or anything that can curl. Each agent gets its own tab. Auto-launches headed mode so you watch everything. Auto-starts ngrok tunnel for remote agents. Scoped tokens, tab isolation, rate limiting, activity attribution. (Runs on the bundled browser — the fallback engine; agents driving Aside just open their own tabs.) |
|
||
| `/cso` | **Chief Security Officer** | Security audit with an application model, supported findings, independent challenge, and explicit coverage. Static assessment remains available without catalog profiles. With matching qualified profiles, comprehensive mode adds contained runtime/scanner execution and reviewable repair candidates for Node/Bun, Python, and Rails; no qualified runtime or scanner profile is published yet, so audits run static assessment only. Runtime-tested bundles authenticate separate external assertions. Project-test completion remains `self_reported` because target code controls the test process; `tested` is reserved for a future target-independent completion witness. |
|
||
| `/ship` | **Release Engineer** | Sync main, run tests, explore changed behavior, audit coverage, gate integrity and docs, then verify, push and open a PR. |
|
||
| `/land-and-deploy` | **Release Engineer** | Merge the PR, wait for CI and deploy, verify production health. One command from "approved" to "verified in production." |
|
||
| `/canary` | **SRE** | Post-deploy monitoring loop. Watches for console errors, performance regressions, and page failures. |
|
||
| `/benchmark` | **Performance Engineer** | Baseline page load times, Core Web Vitals, and resource sizes. Compare before/after on every PR. |
|
||
| `/eval-plan` | **Eval Planner** | Preregister a paid eval before the first priced call: bars, arms, decoys and stop rules, a $0 stub-model dry run over the real inputs, and a three-item priced pilot whose extrapolation and spend table gate the approval. |
|
||
| `/document-release` | **Technical Writer** | Audit changed behavior against project docs on every ship, before final verification and publication. Also runs standalone. Shows updated, reviewed/current or blocked docs and any remaining gaps. |
|
||
| `/document-generate` | **Documentation Author** | Generate missing docs from scratch using the Diataxis framework. Researches the codebase first, then writes reference / how-to / tutorial / explanation docs that actually match the code. Invokable standalone or chained from `/document-release` when the coverage map finds gaps. Learn more: [tutorial](docs/tutorial-document-generate.md) • [how-to](docs/howto-document-a-shipped-feature.md) • [why Diataxis](docs/explanation-diataxis-in-gstack.md). |
|
||
| `/retro` | **Eng Manager** | Team-aware weekly retro. Per-person breakdowns, shipping streaks, test health trends, growth opportunities. `/retro global` runs across all your projects and AI tools (Claude Code, Codex, Gemini). |
|
||
| `/browse` | **QA Engineer** | Give the agent eyes. Drives your [Aside](https://aside.com) browser first — your real sessions, real clicks, real screenshots — through deterministic `aside repl` scripts. No Aside? It falls back to gstack's own Chromium: real clicks, ~100ms per command, and `/open-gstack-browser` shows it headed with sidebar, anti-bot stealth, and auto model routing. Every other browser skill stands on it. |
|
||
| `/scrape` | **Data Extractor** | Pull structured data off a web page — tables, lists, prices — in your Aside browser with the page's real logged-in state. On the fallback browser, `/skillify` turns the flow into a permanent browser-skill that runs in ~200ms next time. |
|
||
| `/setup-browser-cookies` | **Session Manager** | Copy selected cookies from Chrome, Chromium, Brave, Edge, Windows-only Opera and Opera GX, or macOS-only Comet, Arc, and Dia into gstack's bundled browser. Choose your profile and domains; copying and sign-in verification are separate. Only needed on the fallback path — Aside already has your sessions. |
|
||
| `/autoplan` | **Review Pipeline** | One command, fully reviewed plan. Runs CEO → design → DX → eng review automatically (eng always last, so the shipping gate reviews the final amended plan) with encoded decision principles. Surfaces only taste decisions for your approval. |
|
||
| `/spec` | **Spec Author** | Turn vague intent into a precise, executable spec in five phases (why, scope, technical with mandatory code-reading, draft, file). Outside-review quality gate before filing (Claude Code on Codex; Codex on other harnesses; blocks below 7/10), fail-closed secret redaction, dedupe against existing issues, archive to `$GSTACK_STATE_ROOT/projects/$SLUG/specs/` for team-corpus recall. `--execute` spawns `claude -p` in a fresh worktree; `/ship` auto-closes the source issue on merge. Plan-mode aware. |
|
||
| `/learn` | **Memory** | Manage what gstack learned across sessions. Review, search, prune, and export project-specific patterns, pitfalls, and preferences. Learnings compound across sessions so gstack gets smarter on your codebase over time. |
|
||
| `/make-pdf` | **Publisher** | Markdown in, publication-quality document out. Mermaid and excalidraw fences render as vector diagrams, fully offline. Images scale to the page and never truncate; wide diagrams get their own landscape page. `--to html` emits one self-contained file, `--to docx` a Word doc. |
|
||
| `/diagram` | **Diagram Maker** | English in, editable diagram out. Emits a triplet: mermaid source, `.excalidraw` you can open and edit on excalidraw.com (hand-drawn style), and rendered SVG/PNG. Zero network. Embed the source in markdown and `/make-pdf` renders it. |
|
||
|
||
### QA without a webpage
|
||
|
||
Use the same commands for browser and non-browser software. Start in a repository
|
||
with its documented native command and an isolated local fixture; name the target
|
||
and the behavior you want checked. For example:
|
||
|
||
```text
|
||
/qa-only Test this repo's CLI using its documented local fixture. Check valid and invalid input, exit codes, stdout/stderr, and cancellation. Report only; do not change code or tests. For each finding, include the exact command, expected and actual results, and which checks remain untested. Keep requests inside the fixture; ask before contacting an external service.
|
||
|
||
/qa Test this repo's local webhook and worker fixture. Explore duplicate deliveries and recovery after a partial failure. Keep all effects inside the fixture; preserve reproduced bugs in native regression tests before repairing them.
|
||
```
|
||
|
||
QA first tells you which surface, tools and write permissions it will use. A CLI or
|
||
API does not need a browser. Browser targets keep real browser testing; developer
|
||
experience audits load only when onboarding, installation or ergonomics are in scope.
|
||
If the native tools or safe fixture are unavailable, the report names the blocker
|
||
and untested contracts instead of inventing a pass or installing another framework.
|
||
|
||
Exploration means learning from each result and choosing the next useful challenge,
|
||
not running random commands. Before the next discovery probe, QA saves a short
|
||
`exploration-NNN.json` evidence note with the previous result, the assumption being
|
||
tested and the next command. The final report links these notes; they do not require
|
||
an extra chat message between probes. A discovered bug must be reproducible, and its new test
|
||
must fail for the bug before the repair and pass afterward. Unit tests protect logic;
|
||
integration and end-to-end tests protect real boundaries that mocks would hide.
|
||
`/qa-only` proposes those tests without writing them.
|
||
|
||
Normal `/review` and `/ship` run a bounded version on changed behavior and nearby
|
||
risks automatically, including small diffs without a plan or web server. Existing
|
||
fix/test approval rules still apply. Missing dependencies, denied actions and time
|
||
limits remain visible coverage gaps; a short smoke pass never means exhaustive QA.
|
||
Production access and destructive or external effects require specific permission.
|
||
|
||
Bounded exploration uses an executable deadline guard, not an estimated clock: it
|
||
refuses late probes and stops owned foreground work at the limit. Unfinished checks
|
||
stay visible in the report. Required plan checks remain outside the review/ship smoke
|
||
budget. See [QA deadlines](docs/reference-qa-deadlines.md) for command, platform and
|
||
cleanup limits.
|
||
|
||
Every ship also runs the existing documentation audit, including repeat ships and
|
||
existing PR updates. Clear factual corrections join the final checked change; risky
|
||
rewrites need approval. A failed audit stops for recovery or explicit acceptance of
|
||
the named risk rather than silently dropping its result. Ship owns versioning, Git
|
||
and PR publication; the docs helper does not commit or push independently.
|
||
|
||
### Which review should I use?
|
||
|
||
| Building for... | Plan stage (before code) | Live audit (after shipping) |
|
||
|-----------------|--------------------------|----------------------------|
|
||
| **End users** (UI, web app, mobile) | `/plan-design-review` | `/design-review` |
|
||
| **Developers** (API, CLI, SDK, docs) | `/plan-devex-review` | `/devex-review` |
|
||
| **Architecture** (data flow, perf, tests) | `/plan-eng-review` | `/review` |
|
||
| **All of the above** | `/autoplan` (runs CEO → design → DX → eng, auto-detects which apply; eng always last) | — |
|
||
|
||
### Power tools
|
||
|
||
| Skill | What it does |
|
||
|-------|-------------|
|
||
| `/codex` | **Second Opinion** — independent code review from OpenAI Codex CLI. Review, challenge, and consult modes. Available on every harness except Codex. |
|
||
| `/claude-code` | **Second Opinion** — independent code review from Claude Code. Review, challenge, and consult modes, with session continuity for consultation. Available on every harness except Claude Code. |
|
||
| `/careful` | **Safety Guardrails** — warns before destructive commands (rm -rf, DROP TABLE, force-push). Say "be careful" to activate. Override any MEDIUM warning; root/home recursive deletes and default-branch force-pushes are hard-denied. |
|
||
| `/freeze` | **Edit Lock** — restrict file edits to one directory. Prevents accidental changes outside scope while debugging. |
|
||
| `/guard` | **Full Safety** — `/careful` + `/freeze` in one command. Maximum safety for prod work. |
|
||
| `/unfreeze` | **Unlock** — remove the `/freeze` boundary. |
|
||
| `/open-gstack-browser` | **GStack Browser** — launch gstack's own browser headed, with sidebar, anti-bot stealth, auto model routing (Sonnet for actions, Opus for analysis), one-click cookie import, and Claude Code integration. Clean up pages, take smart screenshots, edit CSS, and pass info back to your terminal. The visible face of the fallback engine; with Aside open you watch the agent's tabs there instead. |
|
||
| `/setup-deploy` | **Deploy Configurator** — one-time setup for `/land-and-deploy`. Detects your platform, production URL, and deploy commands. |
|
||
| `/setup-gbrain` | **GBrain Onboarding** — from zero to running gbrain in under 5 minutes. PGLite local, Supabase existing URL, or auto-provision a new Supabase project via Management API. MCP registration for Claude Code + per-repo trust triad (read-write/read-only/deny). [Full guide](USING_GBRAIN_WITH_GSTACK.md). |
|
||
| `/sync-gbrain` | **Keep Brain Current** — re-index this repo's code into gbrain via `gbrain sources add` + `gbrain sync --strategy code`, refresh the `## GBrain Search Guidance` block in CLAUDE.md, and auto-remove guidance when the capability check fails. `--incremental` (default), `--full`, `--dry-run`. Idempotent; safe to re-run. |
|
||
| `/gstack-upgrade` | **Self-Updater** — upgrade gstack to latest. Detects global vs vendored install, syncs both, shows what changed. |
|
||
| `/ios-qa` | **iOS Live-Device QA (v1.43.0.0+)** — drive a real iPhone or iPad over USB CoreDevice via an embedded `StateServer` in the app. Read Swift source, codegen typed `@Observable` accessors, run the agent loop. Optional `--tailnet` flag exposes the device to OpenClaw or any HTTP-capable agent on your Tailscale tailnet so remote agents can run iOS QA without ever touching the hardware. Capability-tier allowlist (observe/interact/mutate/restore), per-device session lock, audit log. |
|
||
| `/ios-fix`, `/ios-design-review`, `/ios-clean`, `/ios-sync` | iOS bug-fix loop, designer's-eye HIG audit, debug-bridge cleanup, and accessor resync. See `docs/skills.md`. End-to-end walkthrough: [docs/howto-ios-testing-with-gstack.md](docs/howto-ios-testing-with-gstack.md). |
|
||
|
||
### Standalone binaries
|
||
|
||
Beyond the slash-command skills, gstack ships standalone CLIs for workflows that don't belong inside a session:
|
||
|
||
| Command | What it does |
|
||
|---------|-------------|
|
||
| `gstack-model-benchmark` | **Cross-model benchmark** — run the same prompt through Claude, GPT (via Codex CLI), and Gemini; compare latency, tokens, cost, and (optionally) LLM-judge quality score. Auth detected per provider, unavailable providers skip cleanly. Output as table, JSON, or markdown. `--dry-run` validates flags + auth without spending API calls. |
|
||
| `gstack-taste-update` | **Design taste learning** — writes approvals and rejections from `/design-shotgun` into a persistent per-project taste profile. Decays 5%/week. Feeds back into future variant generation so the system learns what you actually pick. |
|
||
| `gstack-egress` | **Egress receipt auditor** — every gstack-initiated off-machine send writes a tamper-evident, hash-chained receipt to `~/.gstack/security/egress.jsonl` before the send. `list` shows what gstack attempted to send and to which host, `grants` shows the standing consent settings plus the exact command that revokes each, `verify` recomputes the hash chain and exits 3 on tamper (catches edits, reordering, and mid-chain deletion; truncating or deleting the ledger itself is out of scope — it's a forensic log, not tamper-proof storage). |
|
||
| `gstack-context-bill` | **Token bill-of-materials** — read-only, offline audit of what an installed skills tree costs in tokens: always-on frontmatter every session pays vs per-invocation SKILL.md + forced references. `--diff` compares two trees, `--budget` enforces a ceiling, `--exact` opts into Anthropic `count_tokens` (sends file text off-machine; writes an egress receipt first, degrades to the offline estimate if the receipt can't be written). |
|
||
| `gstack-code-intelligence` | **Code-intelligence provider picker** — wraps GBrain, Sourcebot, and Graphify behind one interface: `options`/`status` to see what's available, `select` to pick one, `index`/`search` to use it, `suggest` to check whether the one-time indexing offer should fire here. The offer triggers on large repos (1,000+ tracked files; a decline is persisted). Non-local providers refuse to index *or search* until you record per-repo consent (`consent <repo> yes\|no` — the query text is repo-derived content), the per-repo trust policy's deny and read-only tiers veto write-class operations regardless of consent, and every off-machine send writes an egress receipt. Fully optional — with nothing selected, gstack falls back to grep. |
|
||
| `gstack-verify-gate` | **Verification stop hook (opt-in)** — blocks a Claude Code turn from ending until the project's declared verify command passes (after 3 blocked re-entries it yields with a loud still-RED warning instead of looping forever). Declare it on one line in CLAUDE.md: `<!-- gstack:verify: bun test -->`. Hooks bypass the permission system, so a declared command never runs until you trust it once per repo (`gstack-verify-gate --trust`); editing the command invalidates trust until re-granted, and every grant is audit-logged. `./setup` never registers it for you — opt in with `gstack-settings-hook add-event --event Stop --command ~/.claude/skills/gstack/bin/gstack-verify-gate --source verify-gate`, remove with `gstack-settings-hook remove-source --source verify-gate`. |
|
||
| `gstack-memorable` | **Memorable recall bridge (opt-in, third party, Claude Code only)** — connects Claude Code to the external [Memorable](https://memorable.sh) CLI *through gstack* instead of the vendor's own installer, so the hook gets gstack's guarantees: an explicit consent key (`memorable_recall`, off by default, listed by `gstack-egress grants`), a fail-closed egress receipt for every prompt handed over (`gstack-egress list --sink memorable-recall`), a HIGH-tier secret pre-scan, a trust envelope and 8 KiB cap on whatever comes back, an allowlisted environment and process-group containment for the vendor process, and clean removal. `enable` registers the hook at the stable install with a 5 s timeout and never runs the vendor's own consent command; `disable` revokes the gate first and removes the entry by identity even after Claude Code strips the tag; `status` is read-only. gstack never installs Memorable, and what its binary sends is the vendor's claim, not gstack's. Not available on Windows yet. [Full guide](docs/memorable-workflow-memory.md). |
|
||
| `gstack-wtree` | **Working-tree fingerprint** — prints a content hash of what's actually on disk (temp index seeded from the stat cache, ~40x cheaper than a full re-hash; untracked source counts, gitignored scratch doesn't). Identical content fingerprints identically through commits, rebases, amends, and squashes — it's what binds reviews and test evidence to content instead of commit SHAs. |
|
||
| `gstack-review-log` | **Review-pass receipts** — `--start <skill>` captures the working-tree fingerprint before a diff review; `'<JSON>' --finish <token>` consumes that single-use, repository/branch/skill-scoped receipt. Binding requires matching start/end content and reviewer-reported `completed:true` and `converged:true`; it is not independent proof that a model read the source. `--check-shared-libs <token>` reads a current finding as JSON on stdin and checks prior Skip decisions against the actual branch, capture and eligible raw source blobs. It returns `reusable:false` when proof is missing or unsafe, including older records without logger-versioned coverage. Final review logging computes shared-code fingerprints and coverage rather than trusting supplied proof. |
|
||
| `gstack-review-read` | **Review freshness** — emits review records with computed `review_freshness.status` and `reason`: CURRENT, STALE, or UNVERIFIED for diff reviews. `/ship` and `/land-and-deploy` use the same grade; a matching commit alone never certifies a diff review. [Dashboard rules](docs/skills.md#review-readiness-dashboard). |
|
||
| `gstack-evidence` | **Verification-evidence ledger** — `run --label <lane> -- <cmd>` transparently wraps any test command (the child's exit code always passes through) and records what ran against which working-tree fingerprint; `check` grades each label FRESH/STALE/MISSING with `--expect-cmd`, `--max-age`, and `--allow-paths` binding. /ship and /land-and-deploy cite fresh evidence instead of re-running suites. Per-run logs are 0600, capped at 2MB, pruned after 30 days; the ledger and logs stay machine-local by design. |
|
||
| `gstack-issue-guard` | **Tracker-text trust envelope** — fetches GitHub issue/PR text (`issue <n>`, `pr-body`, `pr-comments`, or `--stdin`) and wraps it in a labeled envelope so agents treat it as data: injection-shaped lines get labeled even through fullwidth and invisible-character evasion, and forged envelope banners are defused. Every tracker-text ingress in gstack routes through it, enforced by a CI scanner. |
|
||
| `gstack-ios-qa-daemon` | **iOS QA daemon** — Mac-side broker between an agent and a connected iPhone or iPad over USB CoreDevice. Loopback by default; `--tailnet` opens a Tailscale-facing listener with identity-gated capability tiers. Single-instance via flock on `~/.gstack/ios-qa-daemon.pid`. See [docs/howto-ios-testing-with-gstack.md](docs/howto-ios-testing-with-gstack.md). |
|
||
| `gstack-ios-qa-mint` | **iOS allowlist manager** — owner-grant CLI for the tailnet allowlist. `grant`/`revoke`/`list` against `~/.gstack/ios-qa-allowlist.json` (mode 0600). Remote agents never auto-allowlist; this is the explicit-intent path. |
|
||
| `gstack-ios-qa-regen` | **iOS bridge regenerator** — deterministically installs the canonical DebugBridge package, generates typed state accessors, and records the installed gstack version. Safe to rerun after source changes or upgrades. |
|
||
|
||
The private paid CSO evaluation producer is a packaging contract, not an ordinary `bun run build` artifact. On macOS or Linux, a release operator compiles `cso-eval-producer` with the documented hardened Bun flags in the same clean build session as `bun run build:cso`, then installs it beside `gstack-cso-launcher`, `gstack-cso-core`, `gstack-cso-watchdog`, and the hidden `.gstack-cso-generation` manifest as one root-owned, nonwritable five-artifact unit. The producer rejects root execution, writable/symlinked/incomplete installations, and unreviewed provider CLI versions; each receipt binds all five artifact hashes, and collection rejects receipts from different unit identities. See the [clean producer procedure](test/fixtures/cso-eval/README.md#trusted-five-artifact-producer-unit). Paid producer evaluation remains unavailable on Windows because the detached watchdog has no Windows build.
|
||
|
||
Each producer gets a curated one-cell source copy with directories sealed to `0555` and files to `0444`, plus pre/post content, Git, and mode checks. Claude receives no source add-directory, because an add-directory is a sandbox write root where Claude Code's bubblewrap leaves an empty `.mcp.json` mount point. Its Bash runs inside Claude Code's sandbox with one exception: the exact absolute launcher path that `--allowed-tools` names, which runs outside it as it does for users. The launcher is the boundary there. It replaces its environment with a fixed allowlist, uses only the local Docker Unix socket, and runs every target in hardened containers. The producer passes that policy through `--settings` (sandbox enabled, fail if unavailable, no unsandboxed fallback, no auto-allow, and `excludedCommands` naming only the launcher). It refuses to start the agent (`CLAUDE_PRODUCER_SANDBOX_POLICY_MISMATCH`) unless the generated arguments and environment carry exactly that policy. `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB` stays unset, because it would force the launcher back into the sandbox. Every other Bash command is denied by `--allowed-tools`, and Write is confined to the provider work directory and `cso-home`. Gemini receives no source working directory or include-directory. Codex technically receives read-only filesystem access to the exact curated source root because the trusted helper inherits the Codex permission profile; its private provider work directory and exact `cso-home` artifact directory are the only write roots, every other root path remains denied, and the producer prompt requires source access through the helper. This is evaluation containment for an immutable public fixture, not a claim that Codex cannot directly read that fixture.
|
||
|
||
Copy each completed cell's receipt together with `state/cso-home/security/cso/` to the trusted adjudication host. Receipt entries are sorted paths relative to that directory and bind every retained file's size and SHA-256 plus an aggregate inventory hash. Provider homes, settings, sessions, and credentials live under separate disposable directories and are removed after the cell; they are never part of the retained artifact tree. The adjudicator must re-hash the transported tree against the receipt before trusting reports or repair bundles.
|
||
|
||
Paid producer qualification uses this explicit host matrix:
|
||
|
||
| Producer host | Daily/static cells | Comprehensive target execution |
|
||
|---|---|---|
|
||
| Codex CLI 0.153.4 | Supported under the custom permission profile | Fails closed because Docker/socket access is not granted to the model command sandbox; report the setup gap as partial |
|
||
| Claude Code 2.1.263 | Supported under restricted safe mode | Fails closed when the restricted launcher child cannot reach Docker; report the setup gap as partial |
|
||
| Gemini CLI 0.59.0 | Supported with isolated home/settings | Private release qualification host: the exact `run_shell_command(<launcher>)` policy can run the trusted helper without exposing a general shell |
|
||
|
||
Every setup-blocked comprehensive cell remains a miss in release-gate denominators. The evaluator does not silently count a host or workflow as supported when its containment policy prevents required setup.
|
||
|
||
`./setup` also registers one default-on Stop hook in `~/.claude/settings.json`:
|
||
`gstack-timeline-stop` (closes dangling session-timeline entries when a session
|
||
is interrupted; fail-open — 2s internal budget, always exits 0, can never block
|
||
a session). Opt out persistently with `./setup --no-timeline-stop-hook` — the
|
||
choice lands in the `timeline_stop_hook` config key, survives upgrades, and an
|
||
explicit "no" removes a live registration. `GSTACK_TIMELINE_STOP_HOOK=no` and
|
||
`gstack-config set timeline_stop_hook no` work too (flag > env > config).
|
||
`./setup --no-team` skips it for that run, `gstack-settings-hook remove-source
|
||
--source gstack-timeline-stop` removes it by hand, and `gstack-uninstall`
|
||
removes it too.
|
||
|
||
Hook registration is canonical-only: every hook command points at the stable
|
||
`~/.claude/skills/gstack` install, never the tree setup ran from, so deleting
|
||
a worktree or Conductor workspace can't leave dead hooks erroring in your
|
||
sessions. Every `./setup` run also heals first: `gstack-settings-hook
|
||
prune-stale --repoint` removes dead gstack hook entries, re-points stale ones
|
||
at the stable install, and collapses duplicates, printing one line (and
|
||
writing a backup beside the file) only when it changed something.
|
||
|
||
### Domain skills + raw CDP escape hatch
|
||
|
||
Two browser primitives in gstack's own engine (the fallback path when Aside isn't there) compound the agent over time:
|
||
|
||
- **`$B domain-skill save`** — agent saves a per-site note (e.g., "LinkedIn's Apply button lives in an iframe") that fires automatically next time it visits that hostname. Quarantined → active after 3 successful uses → optional cross-project promotion via `$B domain-skill promote-to-global`. Storage lives alongside `/learn`'s per-project learnings file. Full reference: **[docs/domain-skills.md](docs/domain-skills.md)**.
|
||
- **`$B cdp <Domain.method>`** — raw Chrome DevTools Protocol escape hatch for the rare case curated commands miss. Deny-default: methods must be explicitly added to `browse/src/cdp-allowlist.ts` with a one-line justification. Two-tier mutex serializes browser-scoped CDP calls against per-tab work. Output for data-exfil methods is wrapped in the UNTRUSTED envelope.
|
||
|
||
> Want raw CDP with no rails, no allowlist, no daemon — just thin transport from agent to Chrome? [browser-use/browser-harness-js](https://github.com/browser-use/browser-harness-js) is a different philosophy (agent-authored helpers vs gstack's curated commands) and a good fit if you don't want gstack's security stack. The two can coexist: gstack's `$B cdp` and harness can both attach to the same Chrome via Playwright's `newCDPSession`.
|
||
|
||
**[Deep dives with examples and philosophy for every skill →](docs/skills.md)**
|
||
|
||
### Karpathy's four failure modes? Already covered.
|
||
|
||
Andrej Karpathy's [AI coding rules](https://github.com/forrestchang/andrej-karpathy-skills) (17K stars) nail four failure modes: wrong assumptions, overcomplexity, orthogonal edits, imperative over declarative. gstack's workflow skills enforce all four. `/office-hours` forces assumptions into the open before code is written. The Confusion Protocol stops Claude from guessing on architectural decisions. `/review` catches unnecessary complexity and drive-by edits. `/ship` transforms tasks into verifiable goals with test-first execution. If you already use Karpathy-style CLAUDE.md rules, gstack is the workflow enforcement layer that makes them stick across entire sprints, not just single prompts.
|
||
|
||
## Parallel sprints
|
||
|
||
gstack works well with one sprint. It gets interesting with ten running at once.
|
||
|
||
**Design is at the heart.** `/design-consultation` builds your design system from scratch, researches what's out there, proposes creative risks, and writes `DESIGN.md`. But the real magic is the shotgun-to-HTML pipeline.
|
||
|
||
**`/design-shotgun` is how you explore.** You describe what you want. It generates 4-6 AI mockup variants using GPT Image. Then it opens a comparison board in your browser with all variants side by side. You pick favorites, leave feedback ("more whitespace", "bolder headline", "lose the gradient"), and it generates a new round. Repeat until you love something. Taste memory kicks in after a few rounds so it starts biasing toward what you actually like. No more describing your vision in words and hoping the AI gets it. You see options, pick the good ones, and iterate visually.
|
||
|
||
**Works with impeccable.** If you use [impeccable](https://impeccable.style) too, gstack does not fight it. gstack runs impeccable's deterministic engine as a pre-pass in `/design-review`, `/review`, `/ship`, and `/design-html` when you have it installed (gstack never runs impeccable's installer or launcher; the first time a design skill finds no engine it asks once whether to download the engine binary, checksum-pinned and logged, into `~/.impeccable`, and remembers your answer), speaks the same 61 rule ids in its own voice, reads `PRODUCT.md`, writes `DESIGN.md` in the open DESIGN.md format both tools read, and hands deferred findings to `/impeccable <command>`. Say no and nothing changes: no nag, no missing step. `gstack-config set design_detector off` turns the pre-pass off. Attribution for the material gstack derived from impeccable and the DESIGN.md spec is in `NOTICE.md`.
|
||
|
||
**`/design-html` makes it real.** Take that approved mockup (from `/design-shotgun`, a CEO plan, a design review, or just a description) and turn it into production-quality HTML/CSS. Not the kind of AI HTML that looks fine at one viewport width and breaks everywhere else. This uses Pretext for computed text layout: text actually reflows on resize, heights adjust to content, layouts are dynamic. 30KB overhead, zero dependencies. It detects your framework (React, Svelte, Vue) and outputs the right format. Smart API routing picks different Pretext patterns depending on whether it's a landing page, dashboard, form, or card layout. The output is something you'd actually ship, not a demo.
|
||
|
||
**`/qa` was a massive unlock.** It let me go from 6 to 12 parallel workers. Claude Code saying *"I SEE THE ISSUE"* and then actually fixing it, generating a regression test, and verifying the fix — that changed how I work. The agent has eyes now.
|
||
|
||
**Smart review routing.** Just like at a well-run startup: CEO doesn't have to look at infra bug fixes, design review isn't needed for backend changes. gstack tracks what reviews are run, figures out what's appropriate, and just does the smart thing. The Review Readiness Dashboard tells you where you stand before you ship.
|
||
|
||
**Test everything.** `/ship` bootstraps test frameworks from scratch if your project doesn't have one. Every `/ship` run produces a coverage audit. `/qa` creates native regressions when infrastructure is available and explicitly reports missing test coverage; CSS-only fixes may use browser evidence instead. 100% test coverage is the goal — tests make vibe coding safe instead of yolo coding.
|
||
|
||
**`/document-release` is the engineer you never had.** It audits relevant authored docs against the release diff and corrects factual drift before final verification. Risky changes return for approval. `/ship` invokes it on every run and owns TODOS, release metadata, generation and publication; the child reports updated, current or blocked documentation.
|
||
|
||
**Aside is the browser gstack drives first.** For browser surfaces, on a Mac with the [Aside](https://aside.com) AI browser open, `/qa`, `/qa-only`, `/design-review`, `/canary`, `/benchmark`, `/scrape`, and `/browse` all run there — your real browser, with your real logged-in sessions, in tabs the agent opens for itself and closes when it's done. No cookie import, no "open the browser" step, no CAPTCHA handoff dance: hit a sign-in wall, sign in inside Aside, say "done", and the agent continues. Anything a page returns is treated as untrusted content — the agent takes syntax from it, never instructions. `/make-pdf`, `/diagram`, and design previews print and screenshot through Aside too (served from your machine on loopback, one render per script), and the planning skills do their web research through Aside's own agent before reaching for a search tool.
|
||
|
||
**When Aside isn't there, gstack's own browser takes over — automatically.** Linux, Windows, or a Mac with Aside closed: the same skills use the bundled headless Chromium that `./setup` builds, produce the same evidence, and light up the features below that only make sense when the browser is gstack's rather than yours.
|
||
|
||
**Real browser mode.** `/open-gstack-browser` launches GStack Browser, an AI-controlled Chromium with anti-bot stealth, custom branding, and the sidebar extension baked in. Sites like Google and NYTimes work without captchas. The menu bar says "GStack Browser" instead of "Chrome for Testing." Your regular Chrome stays untouched. All existing browse commands work unchanged. `$B disconnect` returns to headless. The browser stays alive as long as the window is open... no idle timeout killing it while you're working.
|
||
|
||
**Sidebar agent — your AI browser assistant.** Type natural language in the Chrome side panel and a child Claude instance executes it. "Navigate to the settings page and screenshot it." "Fill out this form with test data." "Go through every item in this list and extract the prices." The sidebar auto-routes to the right model: Sonnet for fast actions (click, navigate, screenshot) and Opus for reading and analysis. Each task gets up to 5 minutes. The sidebar agent runs in an isolated session, so it won't interfere with your main Claude Code window. One-click cookie import right from the sidebar footer.
|
||
|
||
**Personal automation.** The sidebar agent isn't just for dev workflows. Example: "Browse my kid's school parent portal and add all the other parents' names, phone numbers, and photos to my Google Contacts." Two ways to get authenticated: (1) log in once in the headed browser, your session persists, or (2) click the "cookies" button in the sidebar footer to import cookies from your real Chrome. Once authenticated, Claude navigates the directory, extracts the data, and creates the contacts.
|
||
|
||
**Prompt injection defense.** Hostile web pages try to hijack your sidebar agent. gstack ships a layered defense: content filters (datamarking, hidden-element stripping, ARIA scrubbing, URL blocklist) on every page read, plus a 22MB ML classifier running locally in a sidecar subprocess that scans page-derived content before the agent sees it, with a verdict combiner that requires classifier agreement before blocking (prevents single-model false positives on Stack Overflow-style instruction pages). Everything runs on your machine, no network calls. Emergency kill switch: `GSTACK_SECURITY_OFF=1`. See [ARCHITECTURE.md](ARCHITECTURE.md#prompt-injection-defense-sidebar-agent) for the full stack.
|
||
|
||
**Browser handoff when the AI gets stuck.** Hit a CAPTCHA, auth wall, or MFA prompt? `$B handoff` opens a visible Chrome at the exact same page with all your cookies and tabs intact. Solve the problem, tell Claude you're done, `$B resume` picks up right where it left off. The agent even suggests it automatically after 3 consecutive failures.
|
||
|
||
**`/pair-agent` is cross-agent coordination.** You're in Claude Code. You also have OpenClaw running. Or Hermes. Or Codex. You want them both looking at the same website. Type `/pair-agent`, pick your agent, and a GStack Browser window opens so you can watch. The skill prints a block of instructions. Paste that block into the other agent's chat. It exchanges a one-time setup key for a session token, creates its own tab, and starts browsing. You see both agents working in the same browser, each in their own tab, neither able to interfere with the other. If ngrok is installed, the tunnel starts automatically so the other agent can be on a completely different machine. Same-machine agents get a zero-friction shortcut that writes credentials directly. This is the first time AI agents from different vendors can coordinate through a shared browser with real security: scoped tokens, tab isolation, rate limiting, domain restrictions, and activity attribution.
|
||
|
||
**Multi-AI second opinion.** In Codex, gstack sends outside reviews to Claude Code through `/claude-code`. In Claude Code, `/codex` sends them to OpenAI Codex. Other harnesses expose both skills and use Codex where automatic outside reviews are supported. Each skill supports code review, adversarial challenge, and consultation with session continuity. Routing follows the harness, so changing your configured model does not change the outside reviewer. Reports identify the provider that actually completed each review; unavailable outside coverage remains visible.
|
||
|
||
**Safety guardrails on demand.** Say "be careful" and `/careful` warns before any destructive command — rm -rf, DROP TABLE, force-push, git reset --hard. `/freeze` locks edits to one directory while debugging so Claude can't accidentally "fix" unrelated code. `/guard` activates both. `/investigate` auto-freezes to the module being investigated.
|
||
|
||
**Proactive skill suggestions.** gstack notices what stage you're in — brainstorming, reviewing, debugging, testing — and suggests the right skill. Don't like it? Say "stop suggesting" and it remembers across sessions.
|
||
|
||
## 10-15 parallel sprints
|
||
|
||
gstack is powerful with one sprint. It is transformative with ten running at once.
|
||
|
||
[Conductor](https://conductor.build) runs multiple Claude Code sessions in parallel — each in its own isolated workspace. One session running `/office-hours` on a new idea, another doing `/review` on a PR, a third implementing a feature, a fourth running `/qa` on staging, and six more on other branches. All at the same time. I regularly run 10-15 parallel sprints — that's the practical max right now.
|
||
|
||
The sprint structure is what makes parallelism work. Without a process, ten agents is ten sources of chaos. With a process — think, plan, build, review, test, ship — each agent knows exactly what to do and when to stop. You manage them the way a CEO manages a team: check in on the decisions that matter, let the rest run.
|
||
|
||
### Voice input (AquaVoice, Whisper, etc.)
|
||
|
||
gstack skills have voice-friendly trigger phrases. Say what you want naturally —
|
||
"run a security check", "test the website", "do an engineering review" — and the
|
||
right skill activates. You don't need to remember slash command names or acronyms.
|
||
|
||
## Uninstall
|
||
|
||
### Option 1: Run the uninstall script
|
||
|
||
If gstack is installed on your machine:
|
||
|
||
```bash
|
||
~/.claude/skills/gstack/bin/gstack-uninstall
|
||
```
|
||
|
||
This handles skills, symlinks, global state (`~/.gstack/`), project-local state, browse daemons, and temp files. Use `--keep-state` to preserve config and analytics. Use `--force` to skip confirmation.
|
||
|
||
### Option 2: Manual removal (no local repo)
|
||
|
||
If you don't have the repo cloned (e.g. you installed via a Claude Code paste and later deleted the clone):
|
||
|
||
```bash
|
||
# 1. Stop browse daemons
|
||
pkill -f "gstack.*browse" 2>/dev/null || true
|
||
|
||
# 2. Remove per-skill directories whose SKILL.md points into gstack/
|
||
# (rm -rf, not rmdir — installed dirs also contain runtime-asset links)
|
||
find ~/.claude/skills -mindepth 1 -maxdepth 1 -type d ! -name gstack 2>/dev/null |
|
||
while IFS= read -r dir; do
|
||
link="$dir/SKILL.md"
|
||
[ -L "$link" ] || continue
|
||
target=$(readlink "$link" 2>/dev/null) || continue
|
||
case "$target" in
|
||
gstack/*|*/gstack/*)
|
||
rm -rf "$dir"
|
||
;;
|
||
esac
|
||
done
|
||
# Directories gstack created carry a .gstack-owned marker (the only signal on
|
||
# Windows, where installs are file copies with no symlink to read)
|
||
for marker in ~/.claude/skills/*/.gstack-owned; do
|
||
[ -f "$marker" ] && rm -rf "$(dirname "$marker")"
|
||
done
|
||
# Alias skills install as copies (no symlink to detect) — remove by name
|
||
rm -rf ~/.claude/skills/_gstack-command ~/.claude/skills/connect-chrome 2>/dev/null
|
||
|
||
# 3. Remove gstack
|
||
rm -rf ~/.claude/skills/gstack
|
||
|
||
# 4. Remove global state
|
||
rm -rf ~/.gstack
|
||
|
||
# 5. Remove integrations (skip any you never installed)
|
||
rm -rf "${CODEX_HOME:-$HOME/.codex}/skills/gstack"* 2>/dev/null
|
||
rm -rf ~/.factory/skills/gstack* 2>/dev/null
|
||
rm -rf ~/.kiro/skills/gstack* 2>/dev/null
|
||
rm -rf ~/.openclaw/skills/gstack* 2>/dev/null
|
||
rm -rf ~/.cursor/skills/gstack* 2>/dev/null
|
||
rm -rf ~/.config/opencode/skills/gstack* 2>/dev/null
|
||
rm -rf ~/.gemini/antigravity-cli/skills/gstack* 2>/dev/null
|
||
|
||
# 6. Remove temp files
|
||
rm -f /tmp/gstack-* 2>/dev/null
|
||
|
||
# 7. Per-project cleanup (run from each project root)
|
||
rm -rf .gstack .gstack-worktrees .claude/skills/gstack 2>/dev/null
|
||
rm -rf .agents/skills/gstack* .factory/skills/gstack* 2>/dev/null
|
||
```
|
||
|
||
Manual removal leaves gstack's hook entries behind in `~/.claude/settings.json`
|
||
(the uninstall script removes all of them for you, including entries whose
|
||
`_gstack_source` tag was stripped). Edit that file and delete every hook whose
|
||
command path points into `.claude/skills/gstack/`: the SessionStart auto-update
|
||
hook, the AskUserQuestion PreToolUse/PostToolUse hooks, and the Stop hooks
|
||
(session timeline, plus verify-gate if you opted in). Left in place, they error
|
||
on every matching event once the install directory is gone.
|
||
|
||
### Clean up CLAUDE.md
|
||
|
||
The uninstall script does not edit CLAUDE.md. In each project where gstack was added, remove the `## gstack` and `## Skill routing` sections.
|
||
|
||
### Playwright
|
||
|
||
`~/Library/Caches/ms-playwright/` (macOS) is left in place because other tools may share it. Remove it if nothing else needs it.
|
||
|
||
### Aside
|
||
|
||
gstack never installed Aside, so it never uninstalls it. Keep it or remove it like any other app.
|
||
|
||
---
|
||
|
||
Free, MIT licensed, open source. No premium tier, no waitlist.
|
||
|
||
I open sourced how I build software. You can fork it and make it your own.
|
||
|
||
> **We're hiring.** Want to ship real products at AI-coding speed and help harden gstack?
|
||
> Come work at YC — [ycombinator.com/software](https://ycombinator.com/software)
|
||
> Extremely competitive salary and equity. San Francisco, Dogpatch District.
|
||
|
||
## GBrain — persistent knowledge for your coding agent
|
||
|
||
[GBrain](https://github.com/garrytan/gbrain) is a persistent knowledge base for AI agents — think of it as the memory your agent actually keeps between sessions. GStack gives you a one-command path from zero to "it's running, my agent can call it."
|
||
|
||
```bash
|
||
/setup-gbrain
|
||
```
|
||
|
||
Four paths, pick one:
|
||
|
||
- **Supabase, existing URL** — your cloud agent already provisioned a brain; paste the Session Pooler URL, now this laptop uses the same data.
|
||
- **Supabase, auto-provision** — paste a Supabase Personal Access Token; the skill creates a new project, polls to healthy, fetches the pooler URL, hands it to `gbrain init`. ~90 seconds end-to-end.
|
||
- **PGLite local** — zero accounts, zero network, ~30 seconds. Isolated brain on this Mac only. Great for try-first; migrate to Supabase later with `/setup-gbrain --switch`.
|
||
- **Remote gbrain MCP** — your brain runs on another machine (Tailscale, ngrok, internal LAN) or a teammate's server; paste an MCP URL and bearer token. Optionally pair with a local PGLite for symbol-aware code search in split-engine mode. Best for cross-machine memory without standing up a local DB.
|
||
|
||
After init, the skill offers to register gbrain as an MCP server for Claude Code (`claude mcp add gbrain -- gbrain serve`) so `gbrain search`, `gbrain put`, etc. show up as first-class typed tools — not bash shell-outs.
|
||
|
||
**Keeping the brain current.** Run `/sync-gbrain` from any repo to re-index its code into gbrain (incremental by default, `--full` for a full reindex, `--dry-run` to preview). The skill registers the cwd as a federated source via `gbrain sources add`, runs `gbrain sync --strategy code`, and writes a `## GBrain Search Guidance` block to your project's CLAUDE.md so the agent prefers `gbrain search`/`code-def`/`code-refs` over Grep. The block is removed automatically if the capability check fails — no stale guidance pointing at tools that aren't installed.
|
||
|
||
**Per-remote trust policy.** Each repo on your machine gets one of three tiers:
|
||
|
||
- `read-write` — agent can search the brain AND write new pages back from this repo
|
||
- `read-only` — agent can search but never writes (best for multi-client consultants: search the shared brain, don't contaminate it with Client A's work while in Client B's repo)
|
||
- `deny` — no gbrain interaction at all
|
||
|
||
The skill asks once per repo. The decision is sticky across worktrees and branches of the same remote.
|
||
|
||
**GStack memory sync (different feature, same private-repo infra).** Optionally pushes your gstack state (learnings, CEO plans, design docs, retros, developer profile) to a private git repo so your memory follows you across machines, with a one-time privacy prompt (everything allowlisted / artifacts only / off) and a defense-in-depth secret scanner that blocks AWS keys, tokens, PEM blocks, and JWTs before they leave your machine.
|
||
|
||
```bash
|
||
gstack-artifacts-init
|
||
```
|
||
|
||
**Running gstack in Conductor?** Conductor explicitly strips `ANTHROPIC_API_KEY` and `OPENAI_API_KEY` from every workspace's process env, so paid evals and gbrain embeddings won't work out of the box. Set `GSTACK_ANTHROPIC_API_KEY` and `GSTACK_OPENAI_API_KEY` in Conductor's workspace env config instead — gstack's TS entry points promote them to canonical names at runtime. Full details and the contributor checklist for adding the import to new entry points: [Conductor + GSTACK_* env vars](USING_GBRAIN_WITH_GSTACK.md#conductor--gstack_-env-vars).
|
||
|
||
**Full monty — every scenario, every flag, every bin helper, every troubleshooting step:** [USING_GBRAIN_WITH_GSTACK.md](USING_GBRAIN_WITH_GSTACK.md)
|
||
|
||
Other references: [docs/gbrain-sync.md](docs/gbrain-sync.md) (sync-specific guide) • [docs/gbrain-sync-errors.md](docs/gbrain-sync-errors.md) (error index)
|
||
|
||
## Docs
|
||
|
||
| Doc | What it covers |
|
||
|-----|---------------|
|
||
| [Skill Deep Dives](docs/skills.md) | Philosophy, examples, and workflow for every skill (includes Greptile integration) |
|
||
| [Diagrams & Document Formats](docs/howto-diagrams-and-formats.md) | Mermaid/excalidraw fences in PDFs, image sizing and safety defaults, `--to html\|docx`, `/diagram` triplets |
|
||
| [Builder Ethos](ETHOS.md) | Builder philosophy: Boil the Ocean, Search Before Building, three layers of knowledge |
|
||
| [Using GBrain with GStack](USING_GBRAIN_WITH_GSTACK.md) | Every path, flag, bin helper, and troubleshooting step for `/setup-gbrain` |
|
||
| [GBrain Sync](docs/gbrain-sync.md) | Cross-machine memory setup, privacy modes, troubleshooting |
|
||
| [Architecture](ARCHITECTURE.md) | Design decisions and system internals |
|
||
| [Browser](BROWSER.md) | How gstack drives Aside first (the contract, the cookbook, rendering, research), when the fallback engine kicks in, and the fallback's full `$B` command reference |
|
||
| [Contributing](CONTRIBUTING.md) | Dev setup, testing, contributor mode, and dev mode |
|
||
| [Memorable recall bridge](docs/memorable-workflow-memory.md) | Opt-in third-party workflow memory through gstack: two consents, what gstack hands over and can attest, removal, troubleshooting |
|
||
| [Troubleshooting](docs/troubleshooting.md) | Every `not run` / `unavailable` message, what it means, and the fix |
|
||
| [Changelog](CHANGELOG.md) | What's new in every version |
|
||
|
||
## Privacy & Telemetry
|
||
|
||
gstack sends nothing about how you use it unless you opt in. Three kinds of
|
||
network traffic exist, and each has its own switch.
|
||
|
||
**Telemetry (opt-in, default off).** On first run gstack asks once. You can say
|
||
no, and `gstack-config set telemetry off` turns it off at any time.
|
||
|
||
- **What's sent, per skill run:** skill name, event type, outcome
|
||
(success/error/abort), duration, gstack version, OS and CPU architecture,
|
||
whether the browser was used, whether the run was live or a test, a session
|
||
id, the count of live session markers (below), the error class, the failed step, and an error message passed through gstack's
|
||
secret redaction (cut to 200 characters). `community` adds a stable device
|
||
ID; `anonymous` sends no ID. Prompt-injection detections add the attacking
|
||
page's domain, a payload hash, a confidence score, the detection layer and
|
||
the verdict.
|
||
- **What's never sent:** code, file paths, repo names, branch names, prompts,
|
||
or any other content you write.
|
||
- **What stays on your machine:** opted in, each run is also logged to
|
||
`~/.gstack/analytics/skill-usage.jsonl` (under your state root; see
|
||
[docs/state-root.md](docs/state-root.md)) with the repo name and branch, so
|
||
`gstack-analytics` can show your own dashboard. `gstack-telemetry-sync`
|
||
deletes those two fields (and, for `anonymous`, the device ID) before
|
||
anything is uploaded. With telemetry off, gstack logs no usage analytics at
|
||
all; nothing new is written there.
|
||
- **Where it goes:** [Supabase](https://supabase.com) (an open-source Firebase
|
||
alternative). The schema is in [`supabase/migrations/`](supabase/migrations/),
|
||
so you can verify what's collected. The publishable key in the repo is a
|
||
public key; row-level security denies direct access, and edge functions
|
||
enforce schema checks, event allowlists and field length limits.
|
||
|
||
**Update check (on by default, regardless of telemetry).** Every interactive
|
||
skill start runs `gstack-update-check`. When its cache is stale (60 minutes after an
|
||
up-to-date result, 12 hours while an upgrade is pending, 10 minutes after a
|
||
failure) it asks GitHub for the latest version: a `git ls-remote` of
|
||
`github.com/garrytan/gstack` and a GET of the `VERSION` file from
|
||
`raw.githubusercontent.com`. GitHub sees your IP address; nothing about you or
|
||
your code is sent. With telemetry on, the same check also posts your gstack
|
||
version and OS to gstack's Supabase. Turn the check off with
|
||
`gstack-config set update_check false`.
|
||
|
||
**Outside reviews (on by default; the first one prints a notice).** Plan
|
||
reviews, `/autoplan`, `/review` and `/ship` adversarial passes, `/ship`'s design
|
||
check, `/design-review`, `/design-consultation`, `/office-hours`,
|
||
`/document-release` and `/spec` can
|
||
ask a second model for an independent review: Codex under Claude Code, Claude
|
||
Code under Codex. That sends the review prompt and the relevant code, diff or
|
||
plan to that provider, using your own Codex or Claude Code login. The first
|
||
send on a machine says which provider and which account. Turn it off with
|
||
`gstack-config set codex_reviews disabled`; the binaries that send then refuse
|
||
(`not_run`, `consent_missing`) and start nothing, and an unreadable config
|
||
counts as disabled. `/codex` and `/claude-code` still run when you ask for
|
||
them by name.
|
||
|
||
**Local state that is not telemetry.** gstack keeps a few local files whatever
|
||
your telemetry setting. They are functional state, not usage logs, and the
|
||
files are never sent:
|
||
|
||
- **Session markers:** `~/.gstack/sessions/<pid>`, one empty file per live agent
|
||
session, touched at skill start and deleted after 120 minutes. The count lets
|
||
skills notice several sessions on one machine; with telemetry on, that number
|
||
is the session count above.
|
||
- **Project timeline:** `~/.gstack/projects/<repo>/timeline.jsonl` records skill
|
||
starts and finishes with the branch name, for `/context-restore` and `/retro`.
|
||
It leaves the machine only if you turn on `artifacts_sync_mode full`
|
||
([docs/gbrain-sync.md](docs/gbrain-sync.md)).
|
||
|
||
**Every off-machine send is receipted.** Any gstack-initiated network send,
|
||
telemetry included, writes a hash-chained, tamper-evident receipt to
|
||
`~/.gstack/security/egress.jsonl` before the send; sensitive sinks refuse to
|
||
send at all if the receipt can't be written. Audit with `gstack-egress list`,
|
||
verify the chain with `gstack-egress verify` (exit 3 on tamper), and see the
|
||
standing consent settings with `gstack-egress grants`. The ledger records
|
||
attempted sends so accidents are auditable; it's an audit trail, not a network
|
||
firewall.
|
||
|
||
**Optional third-party bridges are off by default and receipted too.** The one
|
||
that exists today, the [Memorable recall bridge](docs/memorable-workflow-memory.md),
|
||
hands your prompt to a locally installed vendor binary only after you run
|
||
`gstack-memorable enable`; every hand-off writes a receipt first, the consent
|
||
shows up in `gstack-egress grants`, and what the vendor then sends is
|
||
documented as the vendor's claim.
|
||
|
||
## Troubleshooting
|
||
|
||
**Not sure what's wrong?** Run the doctor: `~/.claude/skills/gstack/bin/gstack-doctor`
|
||
(on other hosts, `./setup --status` in your gstack checkout ends with the
|
||
doctor's absolute path). Without starting a skill or spending anything, it
|
||
prints one row per check (install, state root, Bun, hooks, Codex and its cached
|
||
model probe, artifacts sync, the browse bundle, the other compiled binaries,
|
||
the /cso native helper, Claude Code, your largest session journal and recent
|
||
/autoplan guard codes), each `ok`, `warn`,
|
||
`not configured` or `fail` with the command that fixes it. It exits non-zero
|
||
only on `fail`. `--live` also runs the paid Codex model check (one short call).
|
||
Paste its output into bug reports.
|
||
|
||
**A message says `not run`, `unavailable` or names a fix?** Look it up in
|
||
[docs/troubleshooting.md](docs/troubleshooting.md): every gate message gstack
|
||
prints, what it means, what was kept, and the command that fixes it.
|
||
|
||
**Skill not showing up?** Run `./setup --status` from your gstack checkout. It
|
||
prints every install (host, scope, version, skills directory, source checkout)
|
||
and, for a `stale`, `missing` or `unregistered` row, the exact command that fixes
|
||
it. The usual fix is to re-run setup from that row's source for that host, e.g.
|
||
`cd ~/.claude/skills/gstack && ./setup` (Claude) or `cd ~/gstack && ./setup --host codex`.
|
||
A project install lives in the project's `.claude/skills/gstack` or
|
||
`.agents/skills/gstack`; run its `setup` from inside the project.
|
||
|
||
**Cursor freezes on load, or an agent's gstack skills went missing after an upgrade?** Each checkout now renders skills only for the agents installed from it (#1694). `./setup --status` lists them; `./setup --host <name>` adds one back. Pruned copies are in `~/.gstack/backups/host-renders/<time>-<id>/`, with every path in its `prune.log` ([troubleshooting](docs/troubleshooting.md#host-renders-pruned)).
|
||
|
||
**`/browse` (or `/qa`, `/design-review`) says `NEEDS_ASIDE` or `ASIDE_NOT_RUNNING`?** That's the probe telling you it's about to use the fallback browser. Want Aside? Open the app and sign in — `aside --version` should print a version and `aside repl 'console.log("ok")'` should print `ok` — then re-run. gstack never installs it for you. Want the fallback on purpose while Aside is open? `GSTACK_SKIP_ASIDE=1` makes every skill, the renderer, and `./setup` treat Aside as absent. When Aside is absent the probe prints `NEEDS_ASIDE: <OS>` and skills trust that line for the macOS-only download pitch; `GSTACK_PLATFORM` overrides the OS it names, for tests and unusual hosts (set it in your shell — gstack never reads it from a project `.env`).
|
||
|
||
**`/browse` fails on the fallback browser?** `cd ~/.claude/skills/gstack && bun install && bun run build`
|
||
|
||
**`/make-pdf` or `/diagram` can't render?** Same two paths: with Aside open they print through Aside (`bun run ~/.claude/skills/gstack/bin/gstack-render.ts some.html --screenshot /tmp/out.png` tests it directly, and its first line, `ENGINE=aside` or `ENGINE=browse`, names the browser that actually rendered); without it they use the bundled browser, so `bun run build` is the fix.
|
||
|
||
**Stale install?** Run `/gstack-upgrade` — or set `auto_upgrade: true` in `~/.gstack/config.yaml`.
|
||
On Codex and the other non-Claude hosts, upgrade from a terminal: find the
|
||
checkout in the `source` column of `./setup --status`, then
|
||
`cd <source> && git pull && ./setup --host <host>`, and start a new session.
|
||
|
||
**Typing into a specific field with the fallback browser?** `browse type --selector '<css>' <text>`
|
||
types into that element; bare `browse type <text>` types into whatever has focus.
|
||
|
||
**State in the wrong place, or a setting that won't stick?** `~/.claude/skills/gstack/bin/gstack-paths --explain` shows which directory gstack uses for its state and why. See [docs/state-root.md](docs/state-root.md).
|
||
|
||
**Want shorter commands?** `cd ~/.claude/skills/gstack && ./setup --no-prefix` — switches from `/gstack-qa` to `/qa`. Your choice is remembered for future upgrades.
|
||
|
||
**Don't use some skills?** `gstack-config set disabled_skills make-pdf,pair-agent` stops registering them on every host, so their descriptions stop loading into each session. Claude Code updates right away; other hosts on their next `./setup --host <name>` or `/gstack-upgrade`. Their files stay installed, so a skill that calls a disabled one still works (you get a warning). Typos are rejected with the closest skill name, `gstack-upgrade` can't be disabled, and `gstack-config set disabled_skills ""` re-enables everything.
|
||
|
||
**Want namespaced commands?** `cd ~/.claude/skills/gstack && ./setup --prefix` — switches from `/qa` to `/gstack-qa`. Useful if you run other skill packs alongside gstack.
|
||
|
||
**Codex says "Skipped loading skill(s) due to invalid SKILL.md"?** Your Codex skill descriptions are stale. `${CODEX_HOME:-~/.codex}/skills/gstack` is a runtime directory, not the checkout: `./setup --status` shows the Codex row's source checkout. Fix: `cd <that source> && git pull && ./setup --host codex` — for a repo-local install, run it from inside the project.
|
||
|
||
**Windows users:** gstack works on Windows 11 via Git Bash or WSL. Aside is macOS-only, so on Windows (and Linux) the browser skills, `/make-pdf`, and `/diagram` always use gstack's bundled browser. Node.js is required in addition to Bun — Bun has a known bug with Playwright's pipe transport on Windows ([bun#4253](https://github.com/oven-sh/bun/issues/4253)). The browse server automatically falls back to Node.js. Make sure both `bun` and `node` are on your PATH. Native `/cso` additionally requires PowerShell (PowerShell 7 `pwsh` is preferred; Windows PowerShell 5.1 is the fallback) and Visual Studio 2022 Build Tools with the Desktop development with C++ workload; setup leaves that skill explicitly unavailable when they are absent. /cso is optional: if its native helper fails to build or publish, setup still finishes, says which step failed with the log path and retry command, and keeps an earlier helper when it has one (`GSTACK_STRICT_BUILD=1` makes that failure fatal, as CI does).
|
||
|
||
**Known issue: Windows Smart App Control** ([#2595](https://github.com/garrytan/gstack/issues/2595)). gstack's compiled binaries (`browse`, `find-browse`, `design`, `pdf`, `gstack-global-discover`) are built on your machine and unsigned, so Windows 11 with Smart App Control on refuses to start them; Git Bash shows `Permission denied`. setup detects this, names the blocked binaries and the skills that need them, and `gstack-doctor` reports them as `blocked`. Today's workarounds are running gstack inside WSL, or turning Smart App Control off. Details: [troubleshooting](docs/troubleshooting.md#windows-smart-app-control). The sidebar terminal uses Consolas on Windows, so its text no longer renders spaced out.
|
||
|
||
From PowerShell, `.\setup.ps1` (same arguments as `./setup`) checks that Git for Windows, Bun and Node.js are on PATH, prints the `winget` command for any that are missing, and otherwise runs `./setup` in Git Bash.
|
||
|
||
On Windows without Developer Mode (MSYS2 / Git Bash), `setup` falls back to file copies instead of symlinks because `ln -snf` produces frozen copies that don't refresh on `git pull`. **Re-run `cd ~/.claude/skills/gstack && ./setup` after every `git pull`** so your skill files match the repo. `setup` prints a one-line note reminding you. Unix and WSL keep symlinks and don't need the re-run.
|
||
|
||
**Chromium install failed or hung during `./setup`?** The bundled browser is
|
||
best-effort: setup records the reason, finishes registering every skill, and
|
||
prints which skills are affected (`/qa`, `/qa-only`, `/design-review`,
|
||
`/browse`, make-pdf, `/diagram`, `/pair-agent`). With Aside open, the browser
|
||
skills keep running in Aside and only the fallback engine is missing;
|
||
`/pair-agent` always needs the bundled browser. Fix the cause and re-run
|
||
`./setup`. Knobs:
|
||
`GSTACK_PLAYWRIGHT_INSTALL_TIMEOUT=<seconds>` raises the download bound
|
||
(default 600) on slow links; `GSTACK_SKIP_PLAYWRIGHT=1` skips the Chromium
|
||
install entirely (CI, no-browser boxes); `GSTACK_CHROMIUM_NO_SANDBOX=1` is the
|
||
fix when Chromium installs but cannot launch because the host blocks
|
||
unprivileged user namespaces (Ubuntu 24.04+ AppArmor default, #2157).
|
||
|
||
**Setup ended with "Not registered (a skill you own already uses the name; left untouched)"?**
|
||
gstack only deletes or links over a skill entry it can prove it created: a
|
||
symlink into gstack, a directory carrying the `.gstack-owned` marker `./setup`
|
||
writes into every directory it creates, or a SKILL.md that is byte-identical to
|
||
gstack's or carries the generated `<!-- AUTO-GENERATED from ... -->` banner. A
|
||
`qa/` or `ship/` you wrote yourself is left untouched by `./setup`,
|
||
`gstack-relink`, and both prefix-mode flips, and the linker names it in the
|
||
final summary. Rename or move yours, or switch modes (`./setup --prefix` /
|
||
`--no-prefix`) so the names stop colliding. If you started your own skill from
|
||
a generated gstack SKILL.md and then edited it, that file is moved to
|
||
`~/.gstack/backups/skills/<timestamp>/<skill>/SKILL.md` before gstack's is
|
||
linked in, never deleted.
|
||
|
||
**Claude says it can't see the skills?** Check that they are installed (`ls ~/.claude/skills`) and restart Claude Code; it lists every installed skill with its description, so CLAUDE.md does not need to enumerate them (a pasted list goes stale with each release). Your project's `CLAUDE.md` only needs the browsing rule:
|
||
|
||
```
|
||
## gstack
|
||
Use /browse from gstack for all web browsing. Never use mcp__claude-in-chrome__* tools.
|
||
```
|
||
|
||
If an older install prompt left an "Available skills:" line in your CLAUDE.md, delete it.
|
||
|
||
## License
|
||
|
||
MIT. Free forever. Go build something.
|