CodeVetter
← All unpacks
CodeVetter · Repo Unpack evidence

garrytan/gstack

Scanned commit 35dd014c58 dated 2026-09-21 — last upstream commit. Generated by codevetter 1.12.0 on 2026-09-22.

github.com/garrytan/gstack ↗ · 2278 files · 31.9 MB

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, No Priors podcast, March 2026 When I heard Karpathy say this, I wanted to find out how.

Deep analysis by swe-2 via the devin CLI on 2026-09-22 (runtime not recorded) — every claim below links to its cited source files.

Overview

gstack is Garry Tan's open-source 'AI engineering workflow' toolkit: ~40 slash-command skills (SKILL.md files generated from .tmpl templates) that turn Claude Code and 9 other AI coding agents into a virtual eng team (CEO review, eng review, design, QA, ship, security audit, retro), plus a bundled Playwright/Chromium browse daemon exposed as a compiled `$B` binary for agents that need eyes on a web page. The distinctive architecture is a two-engine browser model — every browser skill drives the user's real Aside browser first (macOS 15+, real cookies/sessions) and falls back automatically to gstack's own persistent headless Chromium daemon — wrapped in an unusually dense security and testing apparatus (scoped tokens, untrusted-content envelopes, an ONNX prompt-injection classifier, hash-chained egress receipts, and a two-tier free/paid test system).

System map

gstack is a Bun/TypeScript monorepo whose primary artifact is a set of generated SKILL.md prompt files installed into AI agent harnesses (Claude Code first, plus Codex, OpenCode, Cursor, Kiro, Factory, Slate, OpenClaw, Hermes, GBrain). Around the skills sit three compiled Bun binaries (browse daemon CLI, make-pdf, design), a ~3.3K-line persistent Chromium daemon (browse/src/server.ts), a Chrome extension sidebar, an iOS-QA daemon with Swift bridge templates, and a supabase telemetry function. The generator (scripts/gen-skill-docs.ts) renders per-host skill docs from .tmpl templates through a RESOLVERS registry; a bash `setup` script builds binaries and links skills per host. Runtime state lives under ~/.gstack (or GSTACK_HOME / CLAUDE_PLUGIN_DATA via bin/gstack-paths) and per-project .gstack/. CI is GitHub Actions: a secretless required free-test lane and a secret-gated paid eval lane.

All 14 system map claims →

Feature catalog

The user-facing surface is ~40 slash skills plus a set of compiled/shell CLIs. Skills cluster into plan-mode reviews, implementation+review, release+deploy, ops/memory, browser automation, iOS QA, and safety rails. Under the skills, the browse daemon exposes ~60 commands partitioned into read/write/meta sets, and separate CLIs handle PDF rendering, AI design generation, iOS device bridging, and utility functions (telemetry, config, decisions, learnings, gbrain sync).

All 15 feature catalog claims →

Data flow

There are four main data pipelines. (1) Doc generation: .tmpl + resolvers + host config → committed SKILL.md per host. (2) Browser commands: CLI → state file → localhost POST /command → scoped-token check → Playwright/CDP → sanitizers + untrusted-content envelope → stdout. (3) Rendering: a local HTML file is served on a loopback Bun.serve port and printed/screenshotted through Aside or the browse daemon. (4) Telemetry/egress: every off-machine send writes a hash-chained receipt before transmitting; eval results land under ~/.gstack/projects/<slug>/evals/. State ownership is split between per-project .gstack/ (daemon state, logs) and the machine-level state root from bin/gstack-paths (sessions, egress ledger, security logs, evals).

All 14 data flow claims →

Behavior traces

Four flows were traced end-to-end. Install: ./setup checks bun, compiles binaries, regenerates host skill docs, and links skills into the host's skill dir. Browse command: CLI → state file → health probe → daemon spawn → authenticated POST → scope check → Playwright → sanitized untrusted-wrapped output. Local render: gstack-render → pickEngine → loopback static serve → aside repl single script (or daemon command sequence) → artifact copy-out. Paid-eval CI: planner emits a slice manifest from diff selection, six executors run shards, and a fail-closed reconcile job + token-isolated comment job close the lane.

Testing signals

Testing is heavyweight and multi-tier. The free suite (~750 files in test/ plus browse/test, make-pdf/test, design/test — ~8,700 tests) runs under bun test orchestrated by scripts/test-free-shards.ts with strict-output classification; paid LLM-judge and E2E evals spawn real claude/codex/gemini processes through a hermetic env and are diff-selected + tier-classified (gate vs periodic). CI enforces a secretless required free lane, a sliced paid lane on PRs, a curated Windows subset, weekly periodic evals, plus dedicated CSO platform gates. Numerous tripwire tests pin security contracts, generated-file freshness, token budgets, and wiring invariants. Aside-dependent tests self-skip off-macOS.

All 14 testing signals claims →

Risk map

The biggest blast radius is the browse daemon: it executes JS in pages, imports real browser cookies, and can be exposed to the internet via ngrok — mitigated by bearer tokens, scoped sub-tokens, a physically separated tunnel listener, and a deny-default CDP allowlist. Prompt injection is the second major surface, handled by content envelopes, DOM filters, and a sidecar ONNX classifier (but the L5 canary is currently unwired). Other hotspots: the 3.3K-line server.ts, the 3.2K-line bash setup that mutates user home dirs, cookie decryption paths with a documented v20 debugging-port non-goal, fail-open egress sinks, and generated-file drift that relies on sync tests to stay honest.

All 14 risk map claims →

Extension points

The repo is built around registries and discovery conventions. New skills are a directory + SKILL.md.tmpl picked up automatically by discoverTemplates; new hosts are a defineHost() config + one line in hosts/index.ts; new template placeholders are a RESOLVERS entry; new browse commands are additions to the READ/WRITE/META sets + COMMAND_DESCRIPTIONS + a dispatch handler; new CDP methods are allowlist entries with justification; new models are an overlay file + ALL_MODEL_NAMES entry; browser-skills and domain-skills are runtime-extensible stores; sections/*.md.tmpl let a big skill lazy-carve content.

All 14 extension points claims →

Contributor handoff

Read CLAUDE.md first — it is the operational manual (commands, generated-file rules, security invariants). The cardinal rules: edit .tmpl templates never generated SKILL.md; run `bun run test` (the strict shard runner) before commits and `bun run test:evals` before shipping; never run bare `bun test`; keep registry modules side-effect-free; wire egress receipts for any new off-machine send; and respect the token budgets enforced by catalog-budget/context-budget-ratchet tests. Safe edit boundaries: skill prose in .tmpl files, new commands via the commands.ts registry, new hosts via defineHost. Dangerous zones: browse/src/server.ts + extension/ + SSE/CDP paths (read docs/BROWSER_INTERNALS.md first), test/helpers (read docs/TESTING_INTERNALS.md), setup bash invariants.

All 14 contributor handoff claims →

Languages

LanguageFilesShare of source
TypeScript135195%
JSON296docs/config
Markdown253docs/config
HTML30docs/config
Shell292%
YAML27docs/config
JavaScript191%
Swift101%

Start reading here

Probable source entrypoint: lib/ — inferred from the directory tree and manifest, not the upstream docs.

Source roots

lib/ (97 files) gstack/ (1 files)

Repository structure

Top-level pathFiles
test/1205
browse/247
scripts/97
lib/97
bin/89
docs/57
ios-qa/38
make-pdf/37

Docs found: AGENTS.mdARCHITECTURE.mdCLAUDE.mdCONTRIBUTING.mdREADME.mddocs/ADDING_A_HOST.mddocs/BROWSER_INTERNALS.mddocs/CHANGELOG_STYLE.mddocs/ON_THE_LOC_CONTROVERSY.mddocs/OPENCLAW.md

Package

package.json — gstack v1.87.5, 12 declared dependencies.

@anthropic-ai/claude-agent-sdk@anthropic-ai/sdk@huggingface/transformers@ngrok/ngrokcross-spawndiffhtml-to-docxmarkedplaywrightsocksxtermxterm-addon-fit

CI & config entrypoints

Structural health signals

Average score 7/10 across 96 analyzed source files; 32 hotspots surfaced.

These are deterministic review leads — size, churn, and structural signals — not proof of a bug in this project.

Recent history