# garrytan/gstack architecture

> Architecture diagram of the GitHub repository garrytan/gstack, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/garrytan/gstack
- Repository: https://github.com/garrytan/gstack

## Overview

gstack is a portable toolkit that gives a solo builder specialist engineering-agent roles, then supports a path from product framing through review and QA to shipping. The README also describes security audits, plan review, browser-based QA, and multi-agent-host support as distinct capabilities. The graph groups these runtime/product areas rather than setup or delivery tooling. Relationships use README workflow statements and sampled source references; many feature implementations were not sampled, so their internal calls are not inferred.

Main entry points: [`lib/pregate/index.ts`](https://github.com/garrytan/gstack/blob/main/lib/pregate/index.ts) (Pre-gate checks), [`lib/ship-queue.ts`](https://github.com/garrytan/gstack/blob/main/lib/ship-queue.ts) (Ship workflow), [`design/src`](https://github.com/garrytan/gstack/tree/main/design/src) (Office hours), [`browse/src`](https://github.com/garrytan/gstack/tree/main/browse/src) (QA workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_roles["Agent roles"]
  node_office_hours["Office hours"]
  node_design_review["Design review"]
end

subgraph group_quality["Review and assurance"]
  node_engineering_review["Engineering review<br/>[review-pass.ts]"]
  node_security_audit["Security audit<br/>[cli.ts]"]
end

subgraph group_browser["Browser and QA"]
  node_qa["QA workflow"]
  node_browser_daemon["Browser daemon<br/>[server.ts]"]
  node_browser_manager["Browser manager<br/>[browser-manager.ts]"]
end

subgraph group_release["Planning and release"]
  node_autoplan["Plan review<br/>[autoplan-run.ts]"]
  node_pregate["Pre-gate checks<br/>[index.ts]"]
  node_pregate_context["Gate context<br/>[context.ts]"]
  node_pregate_config["Gate policy<br/>[config.ts]"]
  node_ship["Ship workflow<br/>[ship-queue.ts]"]
  node_ship_train["Release train"]
end

subgraph group_platform["Agent platform"]
  node_memory_ingest["Memory ingest"]
  node_memory_landing["Ingest landing"]
  node_host_registry["Host registry<br/>[index.ts]"]
  node_pdf["PDF output<br/>[orchestrator.ts]"]
  node_pdf_render["PDF render client<br/>[asideClient.ts]"]
  node_aside_render["Browser renderer<br/>[aside-render.ts]"]
end

node_builder(("Builder"))

node_builder -->|"frames product"| node_office_hours
node_office_hours -->|"writes design doc"| node_design_review
node_builder -->|"requests review"| node_engineering_review
node_builder -->|"requests QA"| node_qa
node_qa -->|"uses browser"| node_browser_daemon
node_browser_daemon -->|"delegates browser control"| node_browser_manager
node_builder -->|"requests audit"| node_security_audit
node_builder -->|"reviews plan"| node_autoplan
node_builder -->|"ships PR"| node_ship
node_ship -.->|"runs checks"| node_pregate
node_pregate -->|"builds context"| node_pregate_context
node_pregate -->|"loads policy"| node_pregate_config
node_builder -.->|"ingests transcripts"| node_memory_ingest
node_memory_ingest -->|"lands imports"| node_memory_landing
node_builder -->|"chooses agent host"| node_host_registry
node_builder -->|"requests PDF"| node_pdf
node_pdf -->|"renders document"| node_pdf_render
node_pdf_render -->|"calls renderer"| node_aside_render
node_ship -.->|"dispatches train"| node_ship_train

click node_office_hours "https://github.com/garrytan/gstack/tree/main/design/src"
click node_design_review "https://github.com/garrytan/gstack/tree/main/design/src"
click node_engineering_review "https://github.com/garrytan/gstack/blob/main/lib/review-pass.ts"
click node_qa "https://github.com/garrytan/gstack/tree/main/browse/src"
click node_browser_daemon "https://github.com/garrytan/gstack/blob/main/browse/src/server.ts"
click node_security_audit "https://github.com/garrytan/gstack/blob/main/lib/cso/cli.ts"
click node_autoplan "https://github.com/garrytan/gstack/blob/main/lib/autoplan-run.ts"
click node_pregate "https://github.com/garrytan/gstack/blob/main/lib/pregate/index.ts"
click node_pregate_context "https://github.com/garrytan/gstack/blob/main/lib/pregate/context.ts"
click node_pregate_config "https://github.com/garrytan/gstack/blob/main/lib/pregate/config.ts"
click node_ship "https://github.com/garrytan/gstack/blob/main/lib/ship-queue.ts"
click node_ship_train "https://github.com/garrytan/gstack/blob/main/crew/lib/ship-queue-train.ts"
click node_memory_ingest "https://github.com/garrytan/gstack/blob/main/bin/gstack-memory-ingest.ts"
click node_memory_landing "https://github.com/garrytan/gstack/blob/main/lib/memory-ingest-landing.ts"
click node_host_registry "https://github.com/garrytan/gstack/blob/main/hosts/index.ts"
click node_pdf "https://github.com/garrytan/gstack/blob/main/make-pdf/src/orchestrator.ts"
click node_pdf_render "https://github.com/garrytan/gstack/blob/main/make-pdf/src/asideClient.ts"
click node_aside_render "https://github.com/garrytan/gstack/blob/main/lib/aside-render.ts"
click node_browser_manager "https://github.com/garrytan/gstack/blob/main/browse/src/browser-manager.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_office_hours,node_design_review toneBlue
class node_engineering_review,node_security_audit toneAmber
class node_qa,node_browser_daemon,node_browser_manager toneMint
class node_autoplan,node_pregate,node_pregate_context,node_pregate_config,node_ship,node_ship_train toneRose
class node_memory_ingest,node_memory_landing,node_host_registry,node_pdf,node_pdf_render,node_aside_render,node_builder toneIndigo
```

## Components

### Agent roles

- [Office hours](https://github.com/garrytan/gstack/tree/main/design/src): `design/src`
- [Design review](https://github.com/garrytan/gstack/tree/main/design/src): `design/src`

### Review and assurance

- [Engineering review](https://github.com/garrytan/gstack/blob/main/lib/review-pass.ts): `lib/review-pass.ts`
- [Security audit](https://github.com/garrytan/gstack/blob/main/lib/cso/cli.ts): `lib/cso/cli.ts`

### Browser and QA

- [QA workflow](https://github.com/garrytan/gstack/tree/main/browse/src): `browse/src`
- [Browser daemon](https://github.com/garrytan/gstack/blob/main/browse/src/server.ts): `browse/src/server.ts`
- [Browser manager](https://github.com/garrytan/gstack/blob/main/browse/src/browser-manager.ts): `browse/src/browser-manager.ts`

### Planning and release

- [Plan review](https://github.com/garrytan/gstack/blob/main/lib/autoplan-run.ts): `lib/autoplan-run.ts`
- [Pre-gate checks](https://github.com/garrytan/gstack/blob/main/lib/pregate/index.ts): `lib/pregate/index.ts`
- [Gate context](https://github.com/garrytan/gstack/blob/main/lib/pregate/context.ts): `lib/pregate/context.ts`
- [Gate policy](https://github.com/garrytan/gstack/blob/main/lib/pregate/config.ts): `lib/pregate/config.ts`
- [Ship workflow](https://github.com/garrytan/gstack/blob/main/lib/ship-queue.ts): `lib/ship-queue.ts`
- [Release train](https://github.com/garrytan/gstack/blob/main/crew/lib/ship-queue-train.ts): `crew/lib/ship-queue-train.ts`

### Agent platform

- [Memory ingest](https://github.com/garrytan/gstack/blob/main/bin/gstack-memory-ingest.ts): `bin/gstack-memory-ingest.ts`
- [Ingest landing](https://github.com/garrytan/gstack/blob/main/lib/memory-ingest-landing.ts): `lib/memory-ingest-landing.ts`
- [Host registry](https://github.com/garrytan/gstack/blob/main/hosts/index.ts): `hosts/index.ts`
- [PDF output](https://github.com/garrytan/gstack/blob/main/make-pdf/src/orchestrator.ts): `make-pdf/src/orchestrator.ts`
- [PDF render client](https://github.com/garrytan/gstack/blob/main/make-pdf/src/asideClient.ts): `make-pdf/src/asideClient.ts`
- [Browser renderer](https://github.com/garrytan/gstack/blob/main/lib/aside-render.ts): `lib/aside-render.ts`

### Other components

- **Builder**

## Connections

- Builder → Office hours: frames product (evidence: `README.md`)
- Office hours → Design review: writes design doc (evidence: `README.md`)
- Builder → Engineering review: requests review (evidence: `README.md`)
- Builder → QA workflow: requests QA (evidence: `README.md`)
- QA workflow → Browser daemon: uses browser (evidence: `README.md`)
- Browser daemon → Browser manager: delegates browser control (evidence: `browse/src/server.ts`)
- Builder → Security audit: requests audit (evidence: `README.md`)
- Builder → Plan review: reviews plan (evidence: `README.md`)
- Builder → Ship workflow: ships PR (evidence: `README.md`)
- Ship workflow → Pre-gate checks: runs checks
- Pre-gate checks → Gate context: builds context (evidence: `lib/pregate/index.ts`)
- Pre-gate checks → Gate policy: loads policy (evidence: `lib/pregate/index.ts`)
- Builder → Memory ingest: ingests transcripts
- Memory ingest → Ingest landing: lands imports (evidence: `bin/gstack-memory-ingest.ts`)
- Builder → Host registry: chooses agent host (evidence: `README.md`)
- Builder → PDF output: requests PDF (evidence: `README.md`)
- PDF output → PDF render client: renders document (evidence: `make-pdf/src/orchestrator.ts`)
- PDF render client → Browser renderer: calls renderer (evidence: `make-pdf/src/asideClient.ts`)
- Ship workflow → Release train: dispatches train
