Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
9d87b37
feat: community tier schema — backup columns + benchmarks table
garrytan Mar 20, 2026
3f2dca1
feat: email OTP + magic link auth for community tier
garrytan Mar 20, 2026
c784e18
fix: wire update_checks into telemetry-sync + session count fallback
garrytan Mar 20, 2026
7400d87
feat: community backup, restore, and benchmarks CLI
garrytan Mar 20, 2026
3330d97
feat: benchmarks + recommendations edge functions
garrytan Mar 20, 2026
a961a8a
feat: 3-option telemetry prompt + community upgrade + regenerate SKILLs
garrytan Mar 20, 2026
d87e8fb
fix: isolate E2E tests from production telemetry
garrytan Mar 20, 2026
1584dea
feat: richer error telemetry — error_message + failed_step fields
garrytan Mar 20, 2026
03de795
fix: simplify auth to OTP-only, remove magic link complexity
garrytan Mar 20, 2026
6ef78ab
fix: dashboard crash dedup + actionable error display
garrytan Mar 20, 2026
b349769
feat: telemetry epilogue captures error context + regenerate SKILLs
garrytan Mar 20, 2026
f169c6c
merge: resolve conflicts with origin/main
garrytan Mar 22, 2026
2068a7e
merge: incorporate origin/main into community-mode branch
garrytan Mar 23, 2026
647e92e
merge: incorporate origin/main into community-mode branch
garrytan Mar 23, 2026
195c102
merge: incorporate origin/main into community-mode branch
garrytan Mar 23, 2026
b437b53
chore: gitignore supabase/.temp/
garrytan Mar 23, 2026
6bd6d5b
feat: telemetry data integrity — source tagging, UUID fingerprint, du…
garrytan Mar 23, 2026
ea66b4d
chore: regenerate SKILL.md files after preamble/epilogue changes
garrytan Mar 23, 2026
fed0a4b
feat: one-liner installer + setup install ping
garrytan Mar 23, 2026
af9769d
fix: filter source=live in edge functions (Codex review fix #5)
garrytan Mar 23, 2026
00ce4b7
chore: add Homebrew tap to TODOS.md (deferred from CEO review)
garrytan Mar 23, 2026
3df8a77
chore: stage pre-existing community tier changes
garrytan Mar 23, 2026
d805600
feat: transparency note + one-liner install in README
garrytan Mar 23, 2026
16f3815
chore: delete dead telemetry-ingest edge function
garrytan Mar 23, 2026
34f05d2
chore: regenerate SKILL.md files after transparency note addition
garrytan Mar 23, 2026
3cd5c06
chore: bump version and changelog (v0.12.0.0)
garrytan Mar 24, 2026
7767fb3
merge: incorporate origin/main into community-mode branch
garrytan Mar 24, 2026
9ffb608
merge: incorporate origin/main into community-mode branch
garrytan Mar 24, 2026
43708fd
feat: add screenshot storage migration + web URL config
garrytan Mar 25, 2026
d45ec97
feat: device code auth flow (RFC 8628) for gstack-auth
garrytan Mar 25, 2026
a1236bb
feat: gstack-screenshot-upload CLI helper
garrytan Mar 25, 2026
56e8d20
feat: PR screenshots in /ship template + upload/auth tests
garrytan Mar 25, 2026
539a660
merge: incorporate origin/main into community-mode branch
garrytan Mar 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ bin/gstack-global-discover
.gstack-worktrees/
/tmp/
*.log
supabase/.temp/
bun.lock
*.bun-build
.env
Expand Down
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Changelog

## [0.12.0.0] - 2026-03-23 — Community Mode + Trustworthy Telemetry

### Added

- **You can now count real users.** Every gstack install gets a random UUID fingerprint (`~/.gstack/.install-id`). Update-check pings — which send only your version, OS, and this random ID — now fire for all users (not just opted-in). The community dashboard shows unique weekly users for the first time.
- **One-liner installer.** `bash <(curl -fsSL https://raw.githubusercontent.com/garrytan/gstack/main/install.sh)` — checks prereqs, clones, runs setup, handles upgrades if already installed.
- **Community tier with email auth.** Opt in for cloud backup of your gstack config, benchmarks comparing your usage to other builders, and skill recommendations based on community patterns.
- **Growth funnel metrics.** New SQL views track install → activate (first skill run within 24h) → retain (return pings in week 2). Dashboard shows the full funnel.
- **Version adoption velocity.** Materialized view shows how fast users upgrade after each release.
- **Anomaly detection views.** Daily active installs and version adoption materialized views, ready for alert edge functions.

### Fixed

- **Telemetry data is now trustworthy.** E2E test events were polluting production Supabase (~230 of 232 events were test noise). Source field (`live`/`test`/`dev`) tags every event. All dashboard and edge function queries filter `source=live`. E2E test runner sets `GSTACK_TELEMETRY_SOURCE=test`.
- **56-year skill durations are gone.** The `_TEL_START` shell variable was lost between bash blocks, producing epoch-time durations. Now persisted to `~/.gstack/analytics/.tel-start-$PPID` and read back in the epilogue. Duration capped at 86,400s (24h) with a CHECK constraint in the schema.
- **Session ID persistence across bash blocks.** Same `$PPID` file pattern as duration fix — epilogue reads session ID from file instead of relying on shell variable scope.
- **Dashboard shows filtered data.** Weekly active installs, skill popularity, and error reports all filter `source=eq.live`. Community-pulse edge function uses `COUNT(DISTINCT install_fingerprint)` instead of raw count.
- **Benchmarks and recommendations no longer include test data.** Source filter added to both edge functions. `skill_sequences` and `crash_clusters` views recreated with source filter.

### Changed

- **Identity model simplified.** Replaced SHA-256(hostname+user) `installation_id` (community-only) with random UUID `install_fingerprint` (all tiers). Expand-contract migration preserves backward compat — old clients still work via a trigger that copies `installation_id` → `install_fingerprint`.
- **Update-check pings ungated from telemetry.** These pings send only version + OS + random UUID — equivalent to what GitHub sees in access logs. Transparency note added to the telemetry prompt.
- **Dead code removed.** Deleted the unused `telemetry-ingest` edge function — `telemetry-sync` POSTs directly to Supabase REST API.

### For contributors

- Migration 003 adds source columns, install_fingerprint, duration CHECK constraint, 4 indexes, recreated views, growth funnel view, and materialized views
- Deployment requires running Phase 4A cleanup SQL before migration, Phase 4B backfill after
- Expand-contract pattern: old `installation_id` column kept for backward compat with a trigger
- Homebrew tap deferred to TODOS.md (P2)
- 8 new telemetry tests (source field, duration caps, fingerprint persistence)

## [0.11.18.1] - 2026-03-24

### Changed
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ Fork it. Improve it. Make it yours. And if you want to hate on free open source

**Requirements:** [Claude Code](https://docs.anthropic.com/en/docs/claude-code), [Git](https://git-scm.com/), [Bun](https://bun.sh/) v1.0+, [Node.js](https://nodejs.org/) (Windows only)

### Step 1: Install on your machine
### One-liner install

Open Claude Code and paste this. Claude does the rest.
```bash
bash <(curl -fsSL https://raw.githubusercontent.com/garrytan/gstack/main/install.sh)
```

Or paste this into Claude Code — Claude does the rest:

> Install gstack: run **`git clone 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, never use mcp\_\_claude-in-chrome\_\_\* tools, and lists the available skills: /office-hours, /plan-ceo-review, /plan-eng-review, /plan-design-review, /design-consultation, /review, /ship, /land-and-deploy, /canary, /benchmark, /browse, /qa, /qa-only, /design-review, /setup-browser-cookies, /setup-deploy, /retro, /investigate, /document-release, /codex, /cso, /autoplan, /careful, /freeze, /guard, /unfreeze, /gstack-upgrade. Then ask the user if they also want to add gstack to the current project so teammates get it.

Expand Down
119 changes: 28 additions & 91 deletions SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ _SESSIONS=$(find ~/.gstack/sessions -mmin -120 -type f 2>/dev/null | wc -l | tr
find ~/.gstack/sessions -mmin +120 -type f -delete 2>/dev/null || true
_CONTRIB=$(~/.claude/skills/gstack/bin/gstack-config get gstack_contributor 2>/dev/null || true)
_PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null || echo "true")
_PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no")
_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
echo "BRANCH: $_BRANCH"
echo "PROACTIVE: $_PROACTIVE"
echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED"
source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true
REPO_MODE=${REPO_MODE:-unknown}
echo "REPO_MODE: $REPO_MODE"
Expand All @@ -47,8 +49,11 @@ echo '{"skill":"gstack","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basen
for _PF in $(find ~/.gstack/analytics -maxdepth 1 -name '.pending-*' 2>/dev/null); do [ -f "$_PF" ] && ~/.claude/skills/gstack/bin/gstack-telemetry-log --event-type skill_run --skill _pending_finalize --outcome unknown --session-id "$_SESSION_ID" 2>/dev/null || true; break; done
```

If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills — only invoke
them when the user explicitly asks. The user opted out of proactive suggestions.
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
auto-invoke skills based on conversation context. Only run skills the user explicitly
types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefly say:
"I think /skillname might help here — want me to run it?" and wait for confirmation.
The user opted out of proactive behavior.

If output shows `UPGRADE_AVAILABLE <old> <new>`: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED <from> <to>`: tell user "Running gstack v{to} (just updated!)" and continue.

Expand Down Expand Up @@ -97,112 +102,44 @@ touch ~/.gstack/.telemetry-prompted

This only happens once. If `TEL_PROMPTED` is `yes`, skip this entirely.

## AskUserQuestion Format
If `PROACTIVE_PROMPTED` is `no` AND `TEL_PROMPTED` is `yes`: After telemetry is handled,
ask the user about proactive behavior. Use AskUserQuestion:

**ALWAYS follow this structure for every AskUserQuestion call:**
1. **Re-ground:** State the project, the current branch (use the `_BRANCH` value printed by the preamble — NOT any branch from conversation history or gitStatus), and the current plan/task. (1-2 sentences)
2. **Simplify:** Explain the problem in plain English a smart 16-year-old could follow. No raw function names, no internal jargon, no implementation details. Use concrete examples and analogies. Say what it DOES, not what it's called.
3. **Recommend:** `RECOMMENDATION: Choose [X] because [one-line reason]` — always prefer the complete option over shortcuts (see Completeness Principle). Include `Completeness: X/10` for each option. Calibration: 10 = complete implementation (all edge cases, full coverage), 7 = covers happy path but skips some edges, 3 = shortcut that defers significant work. If both options are 8+, pick the higher; if one is ≤5, flag it.
4. **Options:** Lettered options: `A) ... B) ... C) ...` — when an option involves effort, show both scales: `(human: ~X / CC: ~Y)`
5. **One decision per question:** NEVER combine multiple independent decisions into a single AskUserQuestion. Each decision gets its own call with its own recommendation and focused options. Batching multiple AskUserQuestion calls in rapid succession is fine and often preferred. Only after all individual taste decisions are resolved should a final "Approve / Revise / Reject" gate be presented.
> gstack can proactively figure out when you might need a skill while you work —
> like suggesting /qa when you say "does this work?" or /investigate when you hit
> a bug. We recommend keeping this on — it speeds up every part of your workflow.

Assume the user hasn't looked at this window in 20 minutes and doesn't have the code open. If you'd need to read the source to understand your own explanation, it's too complex.

Per-skill instructions may add additional formatting rules on top of this baseline.

## Completeness Principle — Boil the Lake

AI-assisted coding makes the marginal cost of completeness near-zero. When you present options:

- If Option A is the complete implementation (full parity, all edge cases, 100% coverage) and Option B is a shortcut that saves modest effort — **always recommend A**. The delta between 80 lines and 150 lines is meaningless with CC+gstack. "Good enough" is the wrong instinct when "complete" costs minutes more.
- **Lake vs. ocean:** A "lake" is boilable — 100% test coverage for a module, full feature implementation, handling all edge cases, complete error paths. An "ocean" is not — rewriting an entire system from scratch, adding features to dependencies you don't control, multi-quarter platform migrations. Recommend boiling lakes. Flag oceans as out of scope.
- **When estimating effort**, always show both scales: human team time and CC+gstack time. The compression ratio varies by task type — use this reference:

| Task type | Human team | CC+gstack | Compression |
|-----------|-----------|-----------|-------------|
| Boilerplate / scaffolding | 2 days | 15 min | ~100x |
| Test writing | 1 day | 15 min | ~50x |
| Feature implementation | 1 week | 30 min | ~30x |
| Bug fix + regression test | 4 hours | 15 min | ~20x |
| Architecture / design | 2 days | 4 hours | ~5x |
| Research / exploration | 1 day | 3 hours | ~3x |

- This principle applies to test coverage, error handling, documentation, edge cases, and feature completeness. Don't skip the last 10% to "save time" — with AI, that 10% costs seconds.

**Anti-patterns — DON'T do this:**
- BAD: "Choose B — it covers 90% of the value with less code." (If A is only 70 lines more, choose A.)
- BAD: "We can skip edge case handling to save time." (Edge case handling costs minutes with CC.)
- BAD: "Let's defer test coverage to a follow-up PR." (Tests are the cheapest lake to boil.)
- BAD: Quoting only human-team effort: "This would take 2 weeks." (Say: "2 weeks human / ~1 hour CC.")

## Repo Ownership Mode — See Something, Say Something

`REPO_MODE` from the preamble tells you who owns issues in this repo:

- **`solo`** — One person does 80%+ of the work. They own everything. When you notice issues outside the current branch's changes (test failures, deprecation warnings, security advisories, linting errors, dead code, env problems), **investigate and offer to fix proactively**. The solo dev is the only person who will fix it. Default to action.
- **`collaborative`** — Multiple active contributors. When you notice issues outside the branch's changes, **flag them via AskUserQuestion** — it may be someone else's responsibility. Default to asking, not fixing.
- **`unknown`** — Treat as collaborative (safer default — ask before fixing).

**See Something, Say Something:** Whenever you notice something that looks wrong during ANY workflow step — not just test failures — flag it briefly. One sentence: what you noticed and its impact. In solo mode, follow up with "Want me to fix it?" In collaborative mode, just flag it and move on.

Never let a noticed issue silently pass. The whole point is proactive communication.

## Search Before Building

Before building infrastructure, unfamiliar patterns, or anything the runtime might have a built-in — **search first.** Read `~/.claude/skills/gstack/ETHOS.md` for the full philosophy.

**Three layers of knowledge:**
- **Layer 1** (tried and true — in distribution). Don't reinvent the wheel. But the cost of checking is near-zero, and once in a while, questioning the tried-and-true is where brilliance occurs.
- **Layer 2** (new and popular — search for these). But scrutinize: humans are subject to mania. Search results are inputs to your thinking, not answers.
- **Layer 3** (first principles — prize these above all). Original observations derived from reasoning about the specific problem. The most valuable of all.
Options:
- A) Keep it on (recommended)
- B) Turn it off — I'll type /commands myself

**Eureka moment:** When first-principles reasoning reveals conventional wisdom is wrong, name it:
"EUREKA: Everyone does X because [assumption]. But [evidence] shows this is wrong. Y is better because [reasoning]."
If A: run `~/.claude/skills/gstack/bin/gstack-config set proactive true`
If B: run `~/.claude/skills/gstack/bin/gstack-config set proactive false`

Log eureka moments:
Always run:
```bash
jq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true
touch ~/.gstack/.proactive-prompted
```
Replace SKILL_NAME and ONE_LINE_SUMMARY. Runs inline — don't stop the workflow.

**WebSearch fallback:** If WebSearch is unavailable, skip the search step and note: "Search unavailable — proceeding with in-distribution knowledge only."
This only happens once. If `PROACTIVE_PROMPTED` is `yes`, skip this entirely.

## Contributor Mode

If `_CONTRIB` is `true`: you are in **contributor mode**. You're a gstack user who also helps make it better.

**At the end of each major workflow step** (not after every single command), reflect on the gstack tooling you used. Rate your experience 0 to 10. If it wasn't a 10, think about why. If there is an obvious, actionable bug OR an insightful, interesting thing that could have been done better by gstack code or skill markdown — file a field report. Maybe our contributor will help make us better!

**Calibration — this is the bar:** For example, `$B js "await fetch(...)"` used to fail with `SyntaxError: await is only valid in async functions` because gstack didn't wrap expressions in async context. Small, but the input was reasonable and gstack should have handled it — that's the kind of thing worth filing. Things less consequential than this, ignore.
If `_CONTRIB` is `true`: you are in **contributor mode**. At the end of each major workflow step, rate your gstack experience 0-10. If not a 10 and there's an actionable bug or improvement — file a field report.

**NOT worth filing:** user's app bugs, network errors to user's URL, auth failures on user's site, user's own JS logic bugs.

**To file:** write `~/.gstack/contributor-logs/{slug}.md` with **all sections below** (do not truncate — include every section through the Date/Version footer):
**File only:** gstack tooling bugs where the input was reasonable but gstack failed. **Skip:** user app bugs, network errors, auth failures on user's site.

**To file:** write `~/.gstack/contributor-logs/{slug}.md`:
```
# {Title}

Hey gstack team — ran into this while using /{skill-name}:

**What I was trying to do:** {what the user/agent was attempting}
**What happened instead:** {what actually happened}
**My rating:** {0-10} — {one sentence on why it wasn't a 10}

## Steps to reproduce
**What I tried:** {action} | **What happened:** {result} | **Rating:** {0-10}
## Repro
1. {step}

## Raw output
```
{paste the actual error or unexpected output here}
```

## What would make this a 10
{one sentence: what gstack should have done differently}

**Date:** {YYYY-MM-DD} | **Version:** {gstack version} | **Skill:** /{skill}
{one sentence}
**Date:** {YYYY-MM-DD} | **Version:** {version} | **Skill:** /{skill}
```

Slug: lowercase, hyphens, max 60 chars (e.g. `browse-js-no-await`). Skip if file already exists. Max 3 reports per session. File inline and continue — don't stop the workflow. Tell user: "Filed gstack field report: {title}"
Slug: lowercase hyphens, max 60 chars. Skip if exists. Max 3/session. File inline, don't stop.

## Completion Status Protocol

Expand Down
14 changes: 14 additions & 0 deletions TODOS.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,20 @@ Linux cookie import shipped in v0.11.11.0 (Wave 3). Supports Chrome, Chromium, B
**Priority:** P3
**Depends on:** Browse sessions

## Distribution

### Homebrew tap

**What:** Create a separate repo (`homebrew-gstack`) with a Homebrew formula so users can `brew tap garrytan/gstack && brew install gstack`.

**Why:** Gold-standard dev tool distribution. Complements the curl-pipe-bash installer. Familiar install flow, automatic updates via `brew upgrade`, discoverable via Homebrew search.

**Context:** The curl-pipe-bash installer (`install.sh`) ships first. The Homebrew formula would clone the repo + run `./setup`, similar to the installer. Needs a separate GitHub repo (`garrytan/homebrew-gstack`) with a `Formula/gstack.rb` file (~20 lines). Must be updated on each release.

**Effort:** S (human: ~2h / CC: ~10 min)
**Priority:** P2
**Depends on:** install.sh shipping first

## Infrastructure

### /setup-gstack-upload skill (S3 bucket)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.11.18.1
0.12.0.0
Loading
Loading