@runchr/gstack-antigravity 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @runchr/gstack-antigravity might be problematic. Click here for more details.
- package/.agents/rules/ETHOS.md +129 -0
- package/.agents/rules/global-gstack.md +117 -0
- package/.agents/rules/persona-gstack-autoplan.md +14 -0
- package/.agents/rules/persona-gstack-benchmark.md +14 -0
- package/.agents/rules/persona-gstack-browse.md +14 -0
- package/.agents/rules/persona-gstack-canary.md +14 -0
- package/.agents/rules/persona-gstack-careful.md +14 -0
- package/.agents/rules/persona-gstack-codex.md +14 -0
- package/.agents/rules/persona-gstack-cso.md +14 -0
- package/.agents/rules/persona-gstack-design-consultation.md +14 -0
- package/.agents/rules/persona-gstack-design-review.md +14 -0
- package/.agents/rules/persona-gstack-document-release.md +14 -0
- package/.agents/rules/persona-gstack-freeze.md +14 -0
- package/.agents/rules/persona-gstack-gstack-upgrade.md +14 -0
- package/.agents/rules/persona-gstack-guard.md +14 -0
- package/.agents/rules/persona-gstack-investigate.md +14 -0
- package/.agents/rules/persona-gstack-land-and-deploy.md +14 -0
- package/.agents/rules/persona-gstack-office-hours.md +14 -0
- package/.agents/rules/persona-gstack-plan-ceo-review.md +14 -0
- package/.agents/rules/persona-gstack-plan-design-review.md +14 -0
- package/.agents/rules/persona-gstack-plan-eng-review.md +14 -0
- package/.agents/rules/persona-gstack-qa-only.md +14 -0
- package/.agents/rules/persona-gstack-qa.md +14 -0
- package/.agents/rules/persona-gstack-retro.md +14 -0
- package/.agents/rules/persona-gstack-review.md +14 -0
- package/.agents/rules/persona-gstack-setup-browser-cookies.md +14 -0
- package/.agents/rules/persona-gstack-setup-deploy.md +14 -0
- package/.agents/rules/persona-gstack-ship.md +14 -0
- package/.agents/rules/persona-gstack-unfreeze.md +14 -0
- package/.agents/rules/persona-gstack.md +40 -0
- package/.agents/rules/recursive-identities.md +22 -0
- package/.agents/workflows/autoplan.md +30 -0
- package/.agents/workflows/benchmark.md +31 -0
- package/.agents/workflows/browse.md +26 -0
- package/.agents/workflows/canary.md +33 -0
- package/.agents/workflows/careful.md +22 -0
- package/.agents/workflows/codex.md +36 -0
- package/.agents/workflows/cso.md +29 -0
- package/.agents/workflows/design-consultation.md +28 -0
- package/.agents/workflows/design-review.md +28 -0
- package/.agents/workflows/document-release.md +32 -0
- package/.agents/workflows/freeze.md +17 -0
- package/.agents/workflows/gstack-upgrade.md +54 -0
- package/.agents/workflows/gstack.md +56 -0
- package/.agents/workflows/guard.md +18 -0
- package/.agents/workflows/investigate.md +37 -0
- package/.agents/workflows/land-and-deploy.md +35 -0
- package/.agents/workflows/office-hours.md +27 -0
- package/.agents/workflows/plan-ceo-review.md +34 -0
- package/.agents/workflows/plan-design-review.md +31 -0
- package/.agents/workflows/plan-eng-review.md +28 -0
- package/.agents/workflows/qa-only.md +28 -0
- package/.agents/workflows/qa.md +73 -0
- package/.agents/workflows/retro.md +34 -0
- package/.agents/workflows/review.md +30 -0
- package/.agents/workflows/setup-browser-cookies.md +15 -0
- package/.agents/workflows/setup-cookies.md +8 -0
- package/.agents/workflows/setup-deploy.md +21 -0
- package/.agents/workflows/ship.md +93 -0
- package/.agents/workflows/unfreeze.md +12 -0
- package/LICENSE +22 -0
- package/README.md +189 -0
- package/README_KO.md +191 -0
- package/bin/install.js +105 -0
- package/gstack-origin/.agents/skills/gstack/SKILL.md +651 -0
- package/gstack-origin/.agents/skills/gstack-autoplan/SKILL.md +678 -0
- package/gstack-origin/.agents/skills/gstack-benchmark/SKILL.md +482 -0
- package/gstack-origin/.agents/skills/gstack-browse/SKILL.md +511 -0
- package/gstack-origin/.agents/skills/gstack-canary/SKILL.md +486 -0
- package/gstack-origin/.agents/skills/gstack-careful/SKILL.md +50 -0
- package/gstack-origin/.agents/skills/gstack-cso/SKILL.md +607 -0
- package/gstack-origin/.agents/skills/gstack-design-consultation/SKILL.md +615 -0
- package/gstack-origin/.agents/skills/gstack-design-review/SKILL.md +988 -0
- package/gstack-origin/.agents/skills/gstack-document-release/SKILL.md +604 -0
- package/gstack-origin/.agents/skills/gstack-freeze/SKILL.md +67 -0
- package/gstack-origin/.agents/skills/gstack-guard/SKILL.md +62 -0
- package/gstack-origin/.agents/skills/gstack-investigate/SKILL.md +415 -0
- package/gstack-origin/.agents/skills/gstack-land-and-deploy/SKILL.md +873 -0
- package/gstack-origin/.agents/skills/gstack-office-hours/SKILL.md +986 -0
- package/gstack-origin/.agents/skills/gstack-plan-ceo-review/SKILL.md +1268 -0
- package/gstack-origin/.agents/skills/gstack-plan-design-review/SKILL.md +668 -0
- package/gstack-origin/.agents/skills/gstack-plan-eng-review/SKILL.md +826 -0
- package/gstack-origin/.agents/skills/gstack-qa/SKILL.md +1006 -0
- package/gstack-origin/.agents/skills/gstack-qa-only/SKILL.md +626 -0
- package/gstack-origin/.agents/skills/gstack-retro/SKILL.md +1065 -0
- package/gstack-origin/.agents/skills/gstack-review/SKILL.md +704 -0
- package/gstack-origin/.agents/skills/gstack-setup-browser-cookies/SKILL.md +325 -0
- package/gstack-origin/.agents/skills/gstack-setup-deploy/SKILL.md +450 -0
- package/gstack-origin/.agents/skills/gstack-ship/SKILL.md +1312 -0
- package/gstack-origin/.agents/skills/gstack-unfreeze/SKILL.md +36 -0
- package/gstack-origin/.agents/skills/gstack-upgrade/SKILL.md +220 -0
- package/gstack-origin/.env.example +5 -0
- package/gstack-origin/.github/workflows/skill-docs.yml +17 -0
- package/gstack-origin/AGENTS.md +49 -0
- package/gstack-origin/ARCHITECTURE.md +359 -0
- package/gstack-origin/BROWSER.md +271 -0
- package/gstack-origin/CHANGELOG.md +800 -0
- package/gstack-origin/CLAUDE.md +284 -0
- package/gstack-origin/CONTRIBUTING.md +370 -0
- package/gstack-origin/ETHOS.md +129 -0
- package/gstack-origin/LICENSE +21 -0
- package/gstack-origin/README.md +228 -0
- package/gstack-origin/SKILL.md +657 -0
- package/gstack-origin/SKILL.md.tmpl +281 -0
- package/gstack-origin/TODOS.md +564 -0
- package/gstack-origin/VERSION +1 -0
- package/gstack-origin/autoplan/SKILL.md +689 -0
- package/gstack-origin/autoplan/SKILL.md.tmpl +416 -0
- package/gstack-origin/benchmark/SKILL.md +489 -0
- package/gstack-origin/benchmark/SKILL.md.tmpl +233 -0
- package/gstack-origin/bin/dev-setup +68 -0
- package/gstack-origin/bin/dev-teardown +56 -0
- package/gstack-origin/bin/gstack-analytics +191 -0
- package/gstack-origin/bin/gstack-community-dashboard +113 -0
- package/gstack-origin/bin/gstack-config +38 -0
- package/gstack-origin/bin/gstack-diff-scope +71 -0
- package/gstack-origin/bin/gstack-global-discover.ts +591 -0
- package/gstack-origin/bin/gstack-repo-mode +93 -0
- package/gstack-origin/bin/gstack-review-log +9 -0
- package/gstack-origin/bin/gstack-review-read +12 -0
- package/gstack-origin/bin/gstack-slug +15 -0
- package/gstack-origin/bin/gstack-telemetry-log +158 -0
- package/gstack-origin/bin/gstack-telemetry-sync +127 -0
- package/gstack-origin/bin/gstack-update-check +196 -0
- package/gstack-origin/browse/SKILL.md +517 -0
- package/gstack-origin/browse/SKILL.md.tmpl +141 -0
- package/gstack-origin/browse/bin/find-browse +21 -0
- package/gstack-origin/browse/bin/remote-slug +14 -0
- package/gstack-origin/browse/scripts/build-node-server.sh +48 -0
- package/gstack-origin/browse/src/browser-manager.ts +634 -0
- package/gstack-origin/browse/src/buffers.ts +137 -0
- package/gstack-origin/browse/src/bun-polyfill.cjs +109 -0
- package/gstack-origin/browse/src/cli.ts +420 -0
- package/gstack-origin/browse/src/commands.ts +111 -0
- package/gstack-origin/browse/src/config.ts +150 -0
- package/gstack-origin/browse/src/cookie-import-browser.ts +417 -0
- package/gstack-origin/browse/src/cookie-picker-routes.ts +207 -0
- package/gstack-origin/browse/src/cookie-picker-ui.ts +541 -0
- package/gstack-origin/browse/src/find-browse.ts +61 -0
- package/gstack-origin/browse/src/meta-commands.ts +269 -0
- package/gstack-origin/browse/src/platform.ts +17 -0
- package/gstack-origin/browse/src/read-commands.ts +335 -0
- package/gstack-origin/browse/src/server.ts +369 -0
- package/gstack-origin/browse/src/snapshot.ts +398 -0
- package/gstack-origin/browse/src/url-validation.ts +91 -0
- package/gstack-origin/browse/src/write-commands.ts +352 -0
- package/gstack-origin/browse/test/bun-polyfill.test.ts +72 -0
- package/gstack-origin/browse/test/commands.test.ts +1836 -0
- package/gstack-origin/browse/test/config.test.ts +250 -0
- package/gstack-origin/browse/test/cookie-import-browser.test.ts +397 -0
- package/gstack-origin/browse/test/cookie-picker-routes.test.ts +205 -0
- package/gstack-origin/browse/test/find-browse.test.ts +50 -0
- package/gstack-origin/browse/test/fixtures/basic.html +33 -0
- package/gstack-origin/browse/test/fixtures/cursor-interactive.html +22 -0
- package/gstack-origin/browse/test/fixtures/dialog.html +15 -0
- package/gstack-origin/browse/test/fixtures/empty.html +2 -0
- package/gstack-origin/browse/test/fixtures/forms.html +55 -0
- package/gstack-origin/browse/test/fixtures/qa-eval-checkout.html +108 -0
- package/gstack-origin/browse/test/fixtures/qa-eval-spa.html +98 -0
- package/gstack-origin/browse/test/fixtures/qa-eval.html +51 -0
- package/gstack-origin/browse/test/fixtures/responsive.html +49 -0
- package/gstack-origin/browse/test/fixtures/snapshot.html +55 -0
- package/gstack-origin/browse/test/fixtures/spa.html +24 -0
- package/gstack-origin/browse/test/fixtures/states.html +17 -0
- package/gstack-origin/browse/test/fixtures/upload.html +25 -0
- package/gstack-origin/browse/test/gstack-config.test.ts +125 -0
- package/gstack-origin/browse/test/gstack-update-check.test.ts +467 -0
- package/gstack-origin/browse/test/handoff.test.ts +235 -0
- package/gstack-origin/browse/test/path-validation.test.ts +63 -0
- package/gstack-origin/browse/test/platform.test.ts +37 -0
- package/gstack-origin/browse/test/snapshot.test.ts +467 -0
- package/gstack-origin/browse/test/test-server.ts +57 -0
- package/gstack-origin/browse/test/url-validation.test.ts +72 -0
- package/gstack-origin/canary/SKILL.md +493 -0
- package/gstack-origin/canary/SKILL.md.tmpl +220 -0
- package/gstack-origin/careful/SKILL.md +59 -0
- package/gstack-origin/careful/SKILL.md.tmpl +57 -0
- package/gstack-origin/careful/bin/check-careful.sh +112 -0
- package/gstack-origin/codex/SKILL.md +677 -0
- package/gstack-origin/codex/SKILL.md.tmpl +356 -0
- package/gstack-origin/conductor.json +6 -0
- package/gstack-origin/cso/SKILL.md +615 -0
- package/gstack-origin/cso/SKILL.md.tmpl +376 -0
- package/gstack-origin/design-consultation/SKILL.md +625 -0
- package/gstack-origin/design-consultation/SKILL.md.tmpl +369 -0
- package/gstack-origin/design-review/SKILL.md +998 -0
- package/gstack-origin/design-review/SKILL.md.tmpl +262 -0
- package/gstack-origin/docs/images/github-2013.png +0 -0
- package/gstack-origin/docs/images/github-2026.png +0 -0
- package/gstack-origin/docs/skills.md +877 -0
- package/gstack-origin/document-release/SKILL.md +613 -0
- package/gstack-origin/document-release/SKILL.md.tmpl +357 -0
- package/gstack-origin/freeze/SKILL.md +82 -0
- package/gstack-origin/freeze/SKILL.md.tmpl +80 -0
- package/gstack-origin/freeze/bin/check-freeze.sh +68 -0
- package/gstack-origin/gstack-upgrade/SKILL.md +226 -0
- package/gstack-origin/gstack-upgrade/SKILL.md.tmpl +224 -0
- package/gstack-origin/guard/SKILL.md +82 -0
- package/gstack-origin/guard/SKILL.md.tmpl +80 -0
- package/gstack-origin/investigate/SKILL.md +435 -0
- package/gstack-origin/investigate/SKILL.md.tmpl +196 -0
- package/gstack-origin/land-and-deploy/SKILL.md +880 -0
- package/gstack-origin/land-and-deploy/SKILL.md.tmpl +575 -0
- package/gstack-origin/office-hours/SKILL.md +996 -0
- package/gstack-origin/office-hours/SKILL.md.tmpl +624 -0
- package/gstack-origin/package.json +55 -0
- package/gstack-origin/plan-ceo-review/SKILL.md +1277 -0
- package/gstack-origin/plan-ceo-review/SKILL.md.tmpl +838 -0
- package/gstack-origin/plan-design-review/SKILL.md +676 -0
- package/gstack-origin/plan-design-review/SKILL.md.tmpl +314 -0
- package/gstack-origin/plan-eng-review/SKILL.md +836 -0
- package/gstack-origin/plan-eng-review/SKILL.md.tmpl +279 -0
- package/gstack-origin/qa/SKILL.md +1016 -0
- package/gstack-origin/qa/SKILL.md.tmpl +316 -0
- package/gstack-origin/qa/references/issue-taxonomy.md +85 -0
- package/gstack-origin/qa/templates/qa-report-template.md +126 -0
- package/gstack-origin/qa-only/SKILL.md +633 -0
- package/gstack-origin/qa-only/SKILL.md.tmpl +101 -0
- package/gstack-origin/retro/SKILL.md +1072 -0
- package/gstack-origin/retro/SKILL.md.tmpl +833 -0
- package/gstack-origin/review/SKILL.md +849 -0
- package/gstack-origin/review/SKILL.md.tmpl +259 -0
- package/gstack-origin/review/TODOS-format.md +62 -0
- package/gstack-origin/review/checklist.md +190 -0
- package/gstack-origin/review/design-checklist.md +132 -0
- package/gstack-origin/review/greptile-triage.md +220 -0
- package/gstack-origin/scripts/analytics.ts +190 -0
- package/gstack-origin/scripts/dev-skill.ts +82 -0
- package/gstack-origin/scripts/eval-compare.ts +96 -0
- package/gstack-origin/scripts/eval-list.ts +116 -0
- package/gstack-origin/scripts/eval-select.ts +86 -0
- package/gstack-origin/scripts/eval-summary.ts +187 -0
- package/gstack-origin/scripts/eval-watch.ts +172 -0
- package/gstack-origin/scripts/gen-skill-docs.ts +2414 -0
- package/gstack-origin/scripts/skill-check.ts +167 -0
- package/gstack-origin/setup +269 -0
- package/gstack-origin/setup-browser-cookies/SKILL.md +330 -0
- package/gstack-origin/setup-browser-cookies/SKILL.md.tmpl +74 -0
- package/gstack-origin/setup-deploy/SKILL.md +459 -0
- package/gstack-origin/setup-deploy/SKILL.md.tmpl +220 -0
- package/gstack-origin/ship/SKILL.md +1457 -0
- package/gstack-origin/ship/SKILL.md.tmpl +528 -0
- package/gstack-origin/supabase/config.sh +10 -0
- package/gstack-origin/supabase/functions/community-pulse/index.ts +59 -0
- package/gstack-origin/supabase/functions/telemetry-ingest/index.ts +135 -0
- package/gstack-origin/supabase/functions/update-check/index.ts +37 -0
- package/gstack-origin/supabase/migrations/001_telemetry.sql +89 -0
- package/gstack-origin/test/analytics.test.ts +277 -0
- package/gstack-origin/test/codex-e2e.test.ts +197 -0
- package/gstack-origin/test/fixtures/coverage-audit-fixture.ts +76 -0
- package/gstack-origin/test/fixtures/eval-baselines.json +7 -0
- package/gstack-origin/test/fixtures/qa-eval-checkout-ground-truth.json +43 -0
- package/gstack-origin/test/fixtures/qa-eval-ground-truth.json +43 -0
- package/gstack-origin/test/fixtures/qa-eval-spa-ground-truth.json +43 -0
- package/gstack-origin/test/fixtures/review-eval-design-slop.css +86 -0
- package/gstack-origin/test/fixtures/review-eval-design-slop.html +41 -0
- package/gstack-origin/test/fixtures/review-eval-enum-diff.rb +30 -0
- package/gstack-origin/test/fixtures/review-eval-enum.rb +27 -0
- package/gstack-origin/test/fixtures/review-eval-vuln.rb +14 -0
- package/gstack-origin/test/gemini-e2e.test.ts +173 -0
- package/gstack-origin/test/gen-skill-docs.test.ts +1049 -0
- package/gstack-origin/test/global-discover.test.ts +187 -0
- package/gstack-origin/test/helpers/codex-session-runner.ts +282 -0
- package/gstack-origin/test/helpers/e2e-helpers.ts +239 -0
- package/gstack-origin/test/helpers/eval-store.test.ts +548 -0
- package/gstack-origin/test/helpers/eval-store.ts +689 -0
- package/gstack-origin/test/helpers/gemini-session-runner.test.ts +104 -0
- package/gstack-origin/test/helpers/gemini-session-runner.ts +201 -0
- package/gstack-origin/test/helpers/llm-judge.ts +130 -0
- package/gstack-origin/test/helpers/observability.test.ts +283 -0
- package/gstack-origin/test/helpers/session-runner.test.ts +96 -0
- package/gstack-origin/test/helpers/session-runner.ts +357 -0
- package/gstack-origin/test/helpers/skill-parser.ts +206 -0
- package/gstack-origin/test/helpers/touchfiles.ts +260 -0
- package/gstack-origin/test/hook-scripts.test.ts +373 -0
- package/gstack-origin/test/skill-e2e-browse.test.ts +293 -0
- package/gstack-origin/test/skill-e2e-deploy.test.ts +279 -0
- package/gstack-origin/test/skill-e2e-design.test.ts +614 -0
- package/gstack-origin/test/skill-e2e-plan.test.ts +538 -0
- package/gstack-origin/test/skill-e2e-qa-bugs.test.ts +194 -0
- package/gstack-origin/test/skill-e2e-qa-workflow.test.ts +412 -0
- package/gstack-origin/test/skill-e2e-review.test.ts +535 -0
- package/gstack-origin/test/skill-e2e-workflow.test.ts +586 -0
- package/gstack-origin/test/skill-e2e.test.ts +3325 -0
- package/gstack-origin/test/skill-llm-eval.test.ts +787 -0
- package/gstack-origin/test/skill-parser.test.ts +179 -0
- package/gstack-origin/test/skill-routing-e2e.test.ts +605 -0
- package/gstack-origin/test/skill-validation.test.ts +1520 -0
- package/gstack-origin/test/telemetry.test.ts +278 -0
- package/gstack-origin/test/touchfiles.test.ts +262 -0
- package/gstack-origin/unfreeze/SKILL.md +40 -0
- package/gstack-origin/unfreeze/SKILL.md.tmpl +38 -0
- package/package.json +38 -0
- package/scripts/install-antigravity-skill.ps1 +33 -0
- package/scripts/install-antigravity-skill.sh +41 -0
- package/scripts/sync-gstack-origin.ps1 +37 -0
- package/scripts/sync-gstack-origin.sh +35 -0
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
# gstack development
|
|
2
|
+
|
|
3
|
+
## Commands
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
bun install # install dependencies
|
|
7
|
+
bun test # run free tests (browse + snapshot + skill validation)
|
|
8
|
+
bun run test:evals # run paid evals: LLM judge + E2E (diff-based, ~$4/run max)
|
|
9
|
+
bun run test:evals:all # run ALL paid evals regardless of diff
|
|
10
|
+
bun run test:e2e # run E2E tests only (diff-based, ~$3.85/run max)
|
|
11
|
+
bun run test:e2e:all # run ALL E2E tests regardless of diff
|
|
12
|
+
bun run eval:select # show which tests would run based on current diff
|
|
13
|
+
bun run dev <cmd> # run CLI in dev mode, e.g. bun run dev goto https://example.com
|
|
14
|
+
bun run build # gen docs + compile binaries
|
|
15
|
+
bun run gen:skill-docs # regenerate SKILL.md files from templates
|
|
16
|
+
bun run skill:check # health dashboard for all skills
|
|
17
|
+
bun run dev:skill # watch mode: auto-regen + validate on change
|
|
18
|
+
bun run eval:list # list all eval runs from ~/.gstack-dev/evals/
|
|
19
|
+
bun run eval:compare # compare two eval runs (auto-picks most recent)
|
|
20
|
+
bun run eval:summary # aggregate stats across all eval runs
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`test:evals` requires `ANTHROPIC_API_KEY`. Codex E2E tests (`test/codex-e2e.test.ts`)
|
|
24
|
+
use Codex's own auth from `~/.codex/` config — no `OPENAI_API_KEY` env var needed.
|
|
25
|
+
E2E tests stream progress in real-time (tool-by-tool via `--output-format stream-json
|
|
26
|
+
--verbose`). Results are persisted to `~/.gstack-dev/evals/` with auto-comparison
|
|
27
|
+
against the previous run.
|
|
28
|
+
|
|
29
|
+
**Diff-based test selection:** `test:evals` and `test:e2e` auto-select tests based
|
|
30
|
+
on `git diff` against the base branch. Each test declares its file dependencies in
|
|
31
|
+
`test/helpers/touchfiles.ts`. Changes to global touchfiles (session-runner, eval-store,
|
|
32
|
+
llm-judge, gen-skill-docs) trigger all tests. Use `EVALS_ALL=1` or the `:all` script
|
|
33
|
+
variants to force all tests. Run `eval:select` to preview which tests would run.
|
|
34
|
+
|
|
35
|
+
## Testing
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
bun test # run before every commit — free, <2s
|
|
39
|
+
bun run test:evals # run before shipping — paid, diff-based (~$4/run max)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`bun test` runs skill validation, gen-skill-docs quality checks, and browse
|
|
43
|
+
integration tests. `bun run test:evals` runs LLM-judge quality evals and E2E
|
|
44
|
+
tests via `claude -p`. Both must pass before creating a PR.
|
|
45
|
+
|
|
46
|
+
## Project structure
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
gstack/
|
|
50
|
+
├── browse/ # Headless browser CLI (Playwright)
|
|
51
|
+
│ ├── src/ # CLI + server + commands
|
|
52
|
+
│ │ ├── commands.ts # Command registry (single source of truth)
|
|
53
|
+
│ │ └── snapshot.ts # SNAPSHOT_FLAGS metadata array
|
|
54
|
+
│ ├── test/ # Integration tests + fixtures
|
|
55
|
+
│ └── dist/ # Compiled binary
|
|
56
|
+
├── scripts/ # Build + DX tooling
|
|
57
|
+
│ ├── gen-skill-docs.ts # Template → SKILL.md generator
|
|
58
|
+
│ ├── skill-check.ts # Health dashboard
|
|
59
|
+
│ └── dev-skill.ts # Watch mode
|
|
60
|
+
├── test/ # Skill validation + eval tests
|
|
61
|
+
│ ├── helpers/ # skill-parser.ts, session-runner.ts, llm-judge.ts, eval-store.ts
|
|
62
|
+
│ ├── fixtures/ # Ground truth JSON, planted-bug fixtures, eval baselines
|
|
63
|
+
│ ├── skill-validation.test.ts # Tier 1: static validation (free, <1s)
|
|
64
|
+
│ ├── gen-skill-docs.test.ts # Tier 1: generator quality (free, <1s)
|
|
65
|
+
│ ├── skill-llm-eval.test.ts # Tier 3: LLM-as-judge (~$0.15/run)
|
|
66
|
+
│ └── skill-e2e-*.test.ts # Tier 2: E2E via claude -p (~$3.85/run, split by category)
|
|
67
|
+
├── qa-only/ # /qa-only skill (report-only QA, no fixes)
|
|
68
|
+
├── plan-design-review/ # /plan-design-review skill (report-only design audit)
|
|
69
|
+
├── design-review/ # /design-review skill (design audit + fix loop)
|
|
70
|
+
├── ship/ # Ship workflow skill
|
|
71
|
+
├── review/ # PR review skill
|
|
72
|
+
├── plan-ceo-review/ # /plan-ceo-review skill
|
|
73
|
+
├── plan-eng-review/ # /plan-eng-review skill
|
|
74
|
+
├── autoplan/ # /autoplan skill (auto-review pipeline: CEO → design → eng)
|
|
75
|
+
├── benchmark/ # /benchmark skill (performance regression detection)
|
|
76
|
+
├── canary/ # /canary skill (post-deploy monitoring loop)
|
|
77
|
+
├── codex/ # /codex skill (multi-AI second opinion via OpenAI Codex CLI)
|
|
78
|
+
├── land-and-deploy/ # /land-and-deploy skill (merge → deploy → canary verify)
|
|
79
|
+
├── office-hours/ # /office-hours skill (YC Office Hours — startup diagnostic + builder brainstorm)
|
|
80
|
+
├── investigate/ # /investigate skill (systematic root-cause debugging)
|
|
81
|
+
├── retro/ # Retrospective skill (includes /retro global cross-project mode)
|
|
82
|
+
├── bin/ # Standalone scripts (gstack-global-discover for cross-tool session discovery)
|
|
83
|
+
├── document-release/ # /document-release skill (post-ship doc updates)
|
|
84
|
+
├── cso/ # /cso skill (OWASP Top 10 + STRIDE security audit)
|
|
85
|
+
├── design-consultation/ # /design-consultation skill (design system from scratch)
|
|
86
|
+
├── setup-deploy/ # /setup-deploy skill (one-time deploy config)
|
|
87
|
+
├── bin/ # CLI utilities (gstack-repo-mode, gstack-slug, gstack-config, etc.)
|
|
88
|
+
├── setup # One-time setup: build binary + symlink skills
|
|
89
|
+
├── SKILL.md # Generated from SKILL.md.tmpl (don't edit directly)
|
|
90
|
+
├── SKILL.md.tmpl # Template: edit this, run gen:skill-docs
|
|
91
|
+
├── ETHOS.md # Builder philosophy (Boil the Lake, Search Before Building)
|
|
92
|
+
└── package.json # Build scripts for browse
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## SKILL.md workflow
|
|
96
|
+
|
|
97
|
+
SKILL.md files are **generated** from `.tmpl` templates. To update docs:
|
|
98
|
+
|
|
99
|
+
1. Edit the `.tmpl` file (e.g. `SKILL.md.tmpl` or `browse/SKILL.md.tmpl`)
|
|
100
|
+
2. Run `bun run gen:skill-docs` (or `bun run build` which does it automatically)
|
|
101
|
+
3. Commit both the `.tmpl` and generated `.md` files
|
|
102
|
+
|
|
103
|
+
To add a new browse command: add it to `browse/src/commands.ts` and rebuild.
|
|
104
|
+
To add a snapshot flag: add it to `SNAPSHOT_FLAGS` in `browse/src/snapshot.ts` and rebuild.
|
|
105
|
+
|
|
106
|
+
**Merge conflicts on SKILL.md files:** NEVER resolve conflicts on generated SKILL.md
|
|
107
|
+
files by accepting either side. Instead: (1) resolve conflicts on the `.tmpl` templates
|
|
108
|
+
and `scripts/gen-skill-docs.ts` (the sources of truth), (2) run `bun run gen:skill-docs`
|
|
109
|
+
to regenerate all SKILL.md files, (3) stage the regenerated files. Accepting one side's
|
|
110
|
+
generated output silently drops the other side's template changes.
|
|
111
|
+
|
|
112
|
+
## Platform-agnostic design
|
|
113
|
+
|
|
114
|
+
Skills must NEVER hardcode framework-specific commands, file patterns, or directory
|
|
115
|
+
structures. Instead:
|
|
116
|
+
|
|
117
|
+
1. **Read CLAUDE.md** for project-specific config (test commands, eval commands, etc.)
|
|
118
|
+
2. **If missing, AskUserQuestion** — let the user tell you or let gstack search the repo
|
|
119
|
+
3. **Persist the answer to CLAUDE.md** so we never have to ask again
|
|
120
|
+
|
|
121
|
+
This applies to test commands, eval commands, deploy commands, and any other
|
|
122
|
+
project-specific behavior. The project owns its config; gstack reads it.
|
|
123
|
+
|
|
124
|
+
## Writing SKILL templates
|
|
125
|
+
|
|
126
|
+
SKILL.md.tmpl files are **prompt templates read by Claude**, not bash scripts.
|
|
127
|
+
Each bash code block runs in a separate shell — variables do not persist between blocks.
|
|
128
|
+
|
|
129
|
+
Rules:
|
|
130
|
+
- **Use natural language for logic and state.** Don't use shell variables to pass
|
|
131
|
+
state between code blocks. Instead, tell Claude what to remember and reference
|
|
132
|
+
it in prose (e.g., "the base branch detected in Step 0").
|
|
133
|
+
- **Don't hardcode branch names.** Detect `main`/`master`/etc dynamically via
|
|
134
|
+
`gh pr view` or `gh repo view`. Use `{{BASE_BRANCH_DETECT}}` for PR-targeting
|
|
135
|
+
skills. Use "the base branch" in prose, `<base>` in code block placeholders.
|
|
136
|
+
- **Keep bash blocks self-contained.** Each code block should work independently.
|
|
137
|
+
If a block needs context from a previous step, restate it in the prose above.
|
|
138
|
+
- **Express conditionals as English.** Instead of nested `if/elif/else` in bash,
|
|
139
|
+
write numbered decision steps: "1. If X, do Y. 2. Otherwise, do Z."
|
|
140
|
+
|
|
141
|
+
## Browser interaction
|
|
142
|
+
|
|
143
|
+
When you need to interact with a browser (QA, dogfooding, cookie setup), use the
|
|
144
|
+
`/browse` skill or run the browse binary directly via `$B <command>`. NEVER use
|
|
145
|
+
`mcp__claude-in-chrome__*` tools — they are slow, unreliable, and not what this
|
|
146
|
+
project uses.
|
|
147
|
+
|
|
148
|
+
## Vendored symlink awareness
|
|
149
|
+
|
|
150
|
+
When developing gstack, `.claude/skills/gstack` may be a symlink back to this
|
|
151
|
+
working directory (gitignored). This means skill changes are **live immediately** —
|
|
152
|
+
great for rapid iteration, risky during big refactors where half-written skills
|
|
153
|
+
could break other Claude Code sessions using gstack concurrently.
|
|
154
|
+
|
|
155
|
+
**Check once per session:** Run `ls -la .claude/skills/gstack` to see if it's a
|
|
156
|
+
symlink or a real copy. If it's a symlink to your working directory, be aware that:
|
|
157
|
+
- Template changes + `bun run gen:skill-docs` immediately affect all gstack invocations
|
|
158
|
+
- Breaking changes to SKILL.md.tmpl files can break concurrent gstack sessions
|
|
159
|
+
- During large refactors, remove the symlink (`rm .claude/skills/gstack`) so the
|
|
160
|
+
global install at `~/.claude/skills/gstack/` is used instead
|
|
161
|
+
|
|
162
|
+
**For plan reviews:** When reviewing plans that modify skill templates or the
|
|
163
|
+
gen-skill-docs pipeline, consider whether the changes should be tested in isolation
|
|
164
|
+
before going live (especially if the user is actively using gstack in other windows).
|
|
165
|
+
|
|
166
|
+
## Commit style
|
|
167
|
+
|
|
168
|
+
**Always bisect commits.** Every commit should be a single logical change. When
|
|
169
|
+
you've made multiple changes (e.g., a rename + a rewrite + new tests), split them
|
|
170
|
+
into separate commits before pushing. Each commit should be independently
|
|
171
|
+
understandable and revertable.
|
|
172
|
+
|
|
173
|
+
Examples of good bisection:
|
|
174
|
+
- Rename/move separate from behavior changes
|
|
175
|
+
- Test infrastructure (touchfiles, helpers) separate from test implementations
|
|
176
|
+
- Template changes separate from generated file regeneration
|
|
177
|
+
- Mechanical refactors separate from new features
|
|
178
|
+
|
|
179
|
+
When the user says "bisect commit" or "bisect and push," split staged/unstaged
|
|
180
|
+
changes into logical commits and push.
|
|
181
|
+
|
|
182
|
+
## CHANGELOG + VERSION style
|
|
183
|
+
|
|
184
|
+
**VERSION and CHANGELOG are branch-scoped.** Every feature branch that ships gets its
|
|
185
|
+
own version bump and CHANGELOG entry. The entry describes what THIS branch adds —
|
|
186
|
+
not what was already on main.
|
|
187
|
+
|
|
188
|
+
**When to write the CHANGELOG entry:**
|
|
189
|
+
- At `/ship` time (Step 5), not during development or mid-branch.
|
|
190
|
+
- The entry covers ALL commits on this branch vs the base branch.
|
|
191
|
+
- Never fold new work into an existing CHANGELOG entry from a prior version that
|
|
192
|
+
already landed on main. If main has v0.10.0.0 and your branch adds features,
|
|
193
|
+
bump to v0.10.1.0 with a new entry — don't edit the v0.10.0.0 entry.
|
|
194
|
+
|
|
195
|
+
**Key questions before writing:**
|
|
196
|
+
1. What branch am I on? What did THIS branch change?
|
|
197
|
+
2. Is the base branch version already released? (If yes, bump and create new entry.)
|
|
198
|
+
3. Does an existing entry on this branch already cover earlier work? (If yes, replace
|
|
199
|
+
it with one unified entry for the final version.)
|
|
200
|
+
|
|
201
|
+
CHANGELOG.md is **for users**, not contributors. Write it like product release notes:
|
|
202
|
+
|
|
203
|
+
- Lead with what the user can now **do** that they couldn't before. Sell the feature.
|
|
204
|
+
- Use plain language, not implementation details. "You can now..." not "Refactored the..."
|
|
205
|
+
- **Never mention TODOS.md, internal tracking, eval infrastructure, or contributor-facing
|
|
206
|
+
details.** These are invisible to users and meaningless to them.
|
|
207
|
+
- Put contributor/internal changes in a separate "For contributors" section at the bottom.
|
|
208
|
+
- Every entry should make someone think "oh nice, I want to try that."
|
|
209
|
+
- No jargon: say "every question now tells you which project and branch you're in" not
|
|
210
|
+
"AskUserQuestion format standardized across skill templates via preamble resolver."
|
|
211
|
+
|
|
212
|
+
## AI effort compression
|
|
213
|
+
|
|
214
|
+
When estimating or discussing effort, always show both human-team and CC+gstack time:
|
|
215
|
+
|
|
216
|
+
| Task type | Human team | CC+gstack | Compression |
|
|
217
|
+
|-----------|-----------|-----------|-------------|
|
|
218
|
+
| Boilerplate / scaffolding | 2 days | 15 min | ~100x |
|
|
219
|
+
| Test writing | 1 day | 15 min | ~50x |
|
|
220
|
+
| Feature implementation | 1 week | 30 min | ~30x |
|
|
221
|
+
| Bug fix + regression test | 4 hours | 15 min | ~20x |
|
|
222
|
+
| Architecture / design | 2 days | 4 hours | ~5x |
|
|
223
|
+
| Research / exploration | 1 day | 3 hours | ~3x |
|
|
224
|
+
|
|
225
|
+
Completeness is cheap. Don't recommend shortcuts when the complete implementation
|
|
226
|
+
is a "lake" (achievable) not an "ocean" (multi-quarter migration). See the
|
|
227
|
+
Completeness Principle in the skill preamble for the full philosophy.
|
|
228
|
+
|
|
229
|
+
## Search before building
|
|
230
|
+
|
|
231
|
+
Before designing any solution that involves concurrency, unfamiliar patterns,
|
|
232
|
+
infrastructure, or anything where the runtime/framework might have a built-in:
|
|
233
|
+
|
|
234
|
+
1. Search for "{runtime} {thing} built-in"
|
|
235
|
+
2. Search for "{thing} best practice {current year}"
|
|
236
|
+
3. Check official runtime/framework docs
|
|
237
|
+
|
|
238
|
+
Three layers of knowledge: tried-and-true (Layer 1), new-and-popular (Layer 2),
|
|
239
|
+
first-principles (Layer 3). Prize Layer 3 above all. See ETHOS.md for the full
|
|
240
|
+
builder philosophy.
|
|
241
|
+
|
|
242
|
+
## Local plans
|
|
243
|
+
|
|
244
|
+
Contributors can store long-range vision docs and design documents in `~/.gstack-dev/plans/`.
|
|
245
|
+
These are local-only (not checked in). When reviewing TODOS.md, check `plans/` for candidates
|
|
246
|
+
that may be ready to promote to TODOs or implement.
|
|
247
|
+
|
|
248
|
+
## E2E eval failure blame protocol
|
|
249
|
+
|
|
250
|
+
When an E2E eval fails during `/ship` or any other workflow, **never claim "not
|
|
251
|
+
related to our changes" without proving it.** These systems have invisible couplings —
|
|
252
|
+
a preamble text change affects agent behavior, a new helper changes timing, a
|
|
253
|
+
regenerated SKILL.md shifts prompt context.
|
|
254
|
+
|
|
255
|
+
**Required before attributing a failure to "pre-existing":**
|
|
256
|
+
1. Run the same eval on main (or base branch) and show it fails there too
|
|
257
|
+
2. If it passes on main but fails on the branch — it IS your change. Trace the blame.
|
|
258
|
+
3. If you can't run on main, say "unverified — may or may not be related" and flag it
|
|
259
|
+
as a risk in the PR body
|
|
260
|
+
|
|
261
|
+
"Pre-existing" without receipts is a lazy claim. Prove it or don't say it.
|
|
262
|
+
|
|
263
|
+
## Long-running tasks: don't give up
|
|
264
|
+
|
|
265
|
+
When running evals, E2E tests, or any long-running background task, **poll until
|
|
266
|
+
completion**. Use `sleep 180 && echo "ready"` + `TaskOutput` in a loop every 3
|
|
267
|
+
minutes. Never switch to blocking mode and give up when the poll times out. Never
|
|
268
|
+
say "I'll be notified when it completes" and stop checking — keep the loop going
|
|
269
|
+
until the task finishes or the user tells you to stop.
|
|
270
|
+
|
|
271
|
+
The full E2E suite can take 30-45 minutes. That's 10-15 polling cycles. Do all of
|
|
272
|
+
them. Report progress at each check (which tests passed, which are running, any
|
|
273
|
+
failures so far). The user wants to see the run complete, not a promise that
|
|
274
|
+
you'll check later.
|
|
275
|
+
|
|
276
|
+
## Deploying to the active skill
|
|
277
|
+
|
|
278
|
+
The active skill lives at `~/.claude/skills/gstack/`. After making changes:
|
|
279
|
+
|
|
280
|
+
1. Push your branch
|
|
281
|
+
2. Fetch and reset in the skill directory: `cd ~/.claude/skills/gstack && git fetch origin && git reset --hard origin/main`
|
|
282
|
+
3. Rebuild: `cd ~/.claude/skills/gstack && bun run build`
|
|
283
|
+
|
|
284
|
+
Or copy the binary directly: `cp browse/dist/browse ~/.claude/skills/gstack/browse/dist/browse`
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
# Contributing to gstack
|
|
2
|
+
|
|
3
|
+
Thanks for wanting to make gstack better. Whether you're fixing a typo in a skill prompt or building an entirely new workflow, this guide will get you up and running fast.
|
|
4
|
+
|
|
5
|
+
## Quick start
|
|
6
|
+
|
|
7
|
+
gstack skills are Markdown files that Claude Code discovers from a `skills/` directory. Normally they live at `~/.claude/skills/gstack/` (your global install). But when you're developing gstack itself, you want Claude Code to use the skills *in your working tree* — so edits take effect instantly without copying or deploying anything.
|
|
8
|
+
|
|
9
|
+
That's what dev mode does. It symlinks your repo into the local `.claude/skills/` directory so Claude Code reads skills straight from your checkout.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
git clone <repo> && cd gstack
|
|
13
|
+
bun install # install dependencies
|
|
14
|
+
bin/dev-setup # activate dev mode
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Now edit any `SKILL.md`, invoke it in Claude Code (e.g. `/review`), and see your changes live. When you're done developing:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
bin/dev-teardown # deactivate — back to your global install
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Contributor mode
|
|
24
|
+
|
|
25
|
+
Contributor mode turns gstack into a self-improving tool. Enable it and Claude Code
|
|
26
|
+
will periodically reflect on its gstack experience — rating it 0-10 at the end of
|
|
27
|
+
each major workflow step. When something isn't a 10, it thinks about why and files
|
|
28
|
+
a report to `~/.gstack/contributor-logs/` with what happened, repro steps, and what
|
|
29
|
+
would make it better.
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
~/.claude/skills/gstack/bin/gstack-config set gstack_contributor true
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The logs are for **you**. When something bugs you enough to fix, the report is
|
|
36
|
+
already written. Fork gstack, symlink your fork into the project where you hit
|
|
37
|
+
the issue, fix it, and open a PR.
|
|
38
|
+
|
|
39
|
+
### The contributor workflow
|
|
40
|
+
|
|
41
|
+
1. **Use gstack normally** — contributor mode reflects and logs issues automatically
|
|
42
|
+
2. **Check your logs:** `ls ~/.gstack/contributor-logs/`
|
|
43
|
+
3. **Fork and clone gstack** (if you haven't already)
|
|
44
|
+
4. **Symlink your fork into the project where you hit the bug:**
|
|
45
|
+
```bash
|
|
46
|
+
# In your core project (the one where gstack annoyed you)
|
|
47
|
+
ln -sfn /path/to/your/gstack-fork .claude/skills/gstack
|
|
48
|
+
cd .claude/skills/gstack && bun install && bun run build
|
|
49
|
+
```
|
|
50
|
+
5. **Fix the issue** — your changes are live immediately in this project
|
|
51
|
+
6. **Test by actually using gstack** — do the thing that annoyed you, verify it's fixed
|
|
52
|
+
7. **Open a PR from your fork**
|
|
53
|
+
|
|
54
|
+
This is the best way to contribute: fix gstack while doing your real work, in the
|
|
55
|
+
project where you actually felt the pain.
|
|
56
|
+
|
|
57
|
+
### Session awareness
|
|
58
|
+
|
|
59
|
+
When you have 3+ gstack sessions open simultaneously, every question tells you which project, which branch, and what's happening. No more staring at a question thinking "wait, which window is this?" The format is consistent across all skills.
|
|
60
|
+
|
|
61
|
+
## Working on gstack inside the gstack repo
|
|
62
|
+
|
|
63
|
+
When you're editing gstack skills and want to test them by actually using gstack
|
|
64
|
+
in the same repo, `bin/dev-setup` wires this up. It creates `.claude/skills/`
|
|
65
|
+
symlinks (gitignored) pointing back to your working tree, so Claude Code uses
|
|
66
|
+
your local edits instead of the global install.
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
gstack/ <- your working tree
|
|
70
|
+
├── .claude/skills/ <- created by dev-setup (gitignored)
|
|
71
|
+
│ ├── gstack -> ../../ <- symlink back to repo root
|
|
72
|
+
│ ├── review -> gstack/review
|
|
73
|
+
│ ├── ship -> gstack/ship
|
|
74
|
+
│ └── ... <- one symlink per skill
|
|
75
|
+
├── review/
|
|
76
|
+
│ └── SKILL.md <- edit this, test with /review
|
|
77
|
+
├── ship/
|
|
78
|
+
│ └── SKILL.md
|
|
79
|
+
├── browse/
|
|
80
|
+
│ ├── src/ <- TypeScript source
|
|
81
|
+
│ └── dist/ <- compiled binary (gitignored)
|
|
82
|
+
└── ...
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Day-to-day workflow
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# 1. Enter dev mode
|
|
89
|
+
bin/dev-setup
|
|
90
|
+
|
|
91
|
+
# 2. Edit a skill
|
|
92
|
+
vim review/SKILL.md
|
|
93
|
+
|
|
94
|
+
# 3. Test it in Claude Code — changes are live
|
|
95
|
+
# > /review
|
|
96
|
+
|
|
97
|
+
# 4. Editing browse source? Rebuild the binary
|
|
98
|
+
bun run build
|
|
99
|
+
|
|
100
|
+
# 5. Done for the day? Tear down
|
|
101
|
+
bin/dev-teardown
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Testing & evals
|
|
105
|
+
|
|
106
|
+
### Setup
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# 1. Copy .env.example and add your API key
|
|
110
|
+
cp .env.example .env
|
|
111
|
+
# Edit .env → set ANTHROPIC_API_KEY=sk-ant-...
|
|
112
|
+
|
|
113
|
+
# 2. Install deps (if you haven't already)
|
|
114
|
+
bun install
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Bun auto-loads `.env` — no extra config. Conductor workspaces inherit `.env` from the main worktree automatically (see "Conductor workspaces" below).
|
|
118
|
+
|
|
119
|
+
### Test tiers
|
|
120
|
+
|
|
121
|
+
| Tier | Command | Cost | What it tests |
|
|
122
|
+
|------|---------|------|---------------|
|
|
123
|
+
| 1 — Static | `bun test` | Free | Command validation, snapshot flags, SKILL.md correctness, TODOS-format.md refs, observability unit tests |
|
|
124
|
+
| 2 — E2E | `bun run test:e2e` | ~$3.85 | Full skill execution via `claude -p` subprocess |
|
|
125
|
+
| 3 — LLM eval | `bun run test:evals` | ~$0.15 standalone | LLM-as-judge scoring of generated SKILL.md docs |
|
|
126
|
+
| 2+3 | `bun run test:evals` | ~$4 combined | E2E + LLM-as-judge (runs both) |
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
bun test # Tier 1 only (runs on every commit, <5s)
|
|
130
|
+
bun run test:e2e # Tier 2: E2E only (needs EVALS=1, can't run inside Claude Code)
|
|
131
|
+
bun run test:evals # Tier 2 + 3 combined (~$4/run)
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Tier 1: Static validation (free)
|
|
135
|
+
|
|
136
|
+
Runs automatically with `bun test`. No API keys needed.
|
|
137
|
+
|
|
138
|
+
- **Skill parser tests** (`test/skill-parser.test.ts`) — Extracts every `$B` command from SKILL.md bash code blocks and validates against the command registry in `browse/src/commands.ts`. Catches typos, removed commands, and invalid snapshot flags.
|
|
139
|
+
- **Skill validation tests** (`test/skill-validation.test.ts`) — Validates that SKILL.md files reference only real commands and flags, and that command descriptions meet quality thresholds.
|
|
140
|
+
- **Generator tests** (`test/gen-skill-docs.test.ts`) — Tests the template system: verifies placeholders resolve correctly, output includes value hints for flags (e.g. `-d <N>` not just `-d`), enriched descriptions for key commands (e.g. `is` lists valid states, `press` lists key examples).
|
|
141
|
+
|
|
142
|
+
### Tier 2: E2E via `claude -p` (~$3.85/run)
|
|
143
|
+
|
|
144
|
+
Spawns `claude -p` as a subprocess with `--output-format stream-json --verbose`, streams NDJSON for real-time progress, and scans for browse errors. This is the closest thing to "does this skill actually work end-to-end?"
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
# Must run from a plain terminal — can't nest inside Claude Code or Conductor
|
|
148
|
+
EVALS=1 bun test test/skill-e2e-*.test.ts
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
- Gated by `EVALS=1` env var (prevents accidental expensive runs)
|
|
152
|
+
- Auto-skips if running inside Claude Code (`claude -p` can't nest)
|
|
153
|
+
- API connectivity pre-check — fails fast on ConnectionRefused before burning budget
|
|
154
|
+
- Real-time progress to stderr: `[Ns] turn T tool #C: Name(...)`
|
|
155
|
+
- Saves full NDJSON transcripts and failure JSON for debugging
|
|
156
|
+
- Tests live in `test/skill-e2e-*.test.ts` (split by category), runner logic in `test/helpers/session-runner.ts`
|
|
157
|
+
|
|
158
|
+
### E2E observability
|
|
159
|
+
|
|
160
|
+
When E2E tests run, they produce machine-readable artifacts in `~/.gstack-dev/`:
|
|
161
|
+
|
|
162
|
+
| Artifact | Path | Purpose |
|
|
163
|
+
|----------|------|---------|
|
|
164
|
+
| Heartbeat | `e2e-live.json` | Current test status (updated per tool call) |
|
|
165
|
+
| Partial results | `evals/_partial-e2e.json` | Completed tests (survives kills) |
|
|
166
|
+
| Progress log | `e2e-runs/{runId}/progress.log` | Append-only text log |
|
|
167
|
+
| NDJSON transcripts | `e2e-runs/{runId}/{test}.ndjson` | Raw `claude -p` output per test |
|
|
168
|
+
| Failure JSON | `e2e-runs/{runId}/{test}-failure.json` | Diagnostic data on failure |
|
|
169
|
+
|
|
170
|
+
**Live dashboard:** Run `bun run eval:watch` in a second terminal to see a live dashboard showing completed tests, the currently running test, and cost. Use `--tail` to also show the last 10 lines of progress.log.
|
|
171
|
+
|
|
172
|
+
**Eval history tools:**
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
bun run eval:list # list all eval runs (turns, duration, cost per run)
|
|
176
|
+
bun run eval:compare # compare two runs — shows per-test deltas + Takeaway commentary
|
|
177
|
+
bun run eval:summary # aggregate stats + per-test efficiency averages across runs
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**Eval comparison commentary:** `eval:compare` generates natural-language Takeaway sections interpreting what changed between runs — flagging regressions, noting improvements, calling out efficiency gains (fewer turns, faster, cheaper), and producing an overall summary. This is driven by `generateCommentary()` in `eval-store.ts`.
|
|
181
|
+
|
|
182
|
+
Artifacts are never cleaned up — they accumulate in `~/.gstack-dev/` for post-mortem debugging and trend analysis.
|
|
183
|
+
|
|
184
|
+
### Tier 3: LLM-as-judge (~$0.15/run)
|
|
185
|
+
|
|
186
|
+
Uses Claude Sonnet to score generated SKILL.md docs on three dimensions:
|
|
187
|
+
|
|
188
|
+
- **Clarity** — Can an AI agent understand the instructions without ambiguity?
|
|
189
|
+
- **Completeness** — Are all commands, flags, and usage patterns documented?
|
|
190
|
+
- **Actionability** — Can the agent execute tasks using only the information in the doc?
|
|
191
|
+
|
|
192
|
+
Each dimension is scored 1-5. Threshold: every dimension must score **≥ 4**. There's also a regression test that compares generated docs against the hand-maintained baseline from `origin/main` — generated must score equal or higher.
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
# Needs ANTHROPIC_API_KEY in .env — included in bun run test:evals
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
- Uses `claude-sonnet-4-6` for scoring stability
|
|
199
|
+
- Tests live in `test/skill-llm-eval.test.ts`
|
|
200
|
+
- Calls the Anthropic API directly (not `claude -p`), so it works from anywhere including inside Claude Code
|
|
201
|
+
|
|
202
|
+
### CI
|
|
203
|
+
|
|
204
|
+
A GitHub Action (`.github/workflows/skill-docs.yml`) runs `bun run gen:skill-docs --dry-run` on every push and PR. If the generated SKILL.md files differ from what's committed, CI fails. This catches stale docs before they merge.
|
|
205
|
+
|
|
206
|
+
Tests run against the browse binary directly — they don't require dev mode.
|
|
207
|
+
|
|
208
|
+
## Editing SKILL.md files
|
|
209
|
+
|
|
210
|
+
SKILL.md files are **generated** from `.tmpl` templates. Don't edit the `.md` directly — your changes will be overwritten on the next build.
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
# 1. Edit the template
|
|
214
|
+
vim SKILL.md.tmpl # or browse/SKILL.md.tmpl
|
|
215
|
+
|
|
216
|
+
# 2. Regenerate for both hosts
|
|
217
|
+
bun run gen:skill-docs
|
|
218
|
+
bun run gen:skill-docs --host codex
|
|
219
|
+
|
|
220
|
+
# 3. Check health (reports both Claude and Codex)
|
|
221
|
+
bun run skill:check
|
|
222
|
+
|
|
223
|
+
# Or use watch mode — auto-regenerates on save
|
|
224
|
+
bun run dev:skill
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
For template authoring best practices (natural language over bash-isms, dynamic branch detection, `{{BASE_BRANCH_DETECT}}` usage), see CLAUDE.md's "Writing SKILL templates" section.
|
|
228
|
+
|
|
229
|
+
To add a browse command, add it to `browse/src/commands.ts`. To add a snapshot flag, add it to `SNAPSHOT_FLAGS` in `browse/src/snapshot.ts`. Then rebuild.
|
|
230
|
+
|
|
231
|
+
## Dual-host development (Claude + Codex)
|
|
232
|
+
|
|
233
|
+
gstack generates SKILL.md files for two hosts: **Claude** (`.claude/skills/`) and **Codex** (`.agents/skills/`). Every template change needs to be generated for both.
|
|
234
|
+
|
|
235
|
+
### Generating for both hosts
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
# Generate Claude output (default)
|
|
239
|
+
bun run gen:skill-docs
|
|
240
|
+
|
|
241
|
+
# Generate Codex output
|
|
242
|
+
bun run gen:skill-docs --host codex
|
|
243
|
+
# --host agents is an alias for --host codex
|
|
244
|
+
|
|
245
|
+
# Or use build, which does both + compiles binaries
|
|
246
|
+
bun run build
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### What changes between hosts
|
|
250
|
+
|
|
251
|
+
| Aspect | Claude | Codex |
|
|
252
|
+
|--------|--------|-------|
|
|
253
|
+
| Output directory | `{skill}/SKILL.md` | `.agents/skills/gstack-{skill}/SKILL.md` |
|
|
254
|
+
| Frontmatter | Full (name, description, allowed-tools, hooks, version) | Minimal (name + description only) |
|
|
255
|
+
| Paths | `~/.claude/skills/gstack` | `~/.codex/skills/gstack` |
|
|
256
|
+
| Hook skills | `hooks:` frontmatter (enforced by Claude) | Inline safety advisory prose (advisory only) |
|
|
257
|
+
| `/codex` skill | Included (Claude wraps codex exec) | Excluded (self-referential) |
|
|
258
|
+
|
|
259
|
+
### Testing Codex output
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
# Run all static tests (includes Codex validation)
|
|
263
|
+
bun test
|
|
264
|
+
|
|
265
|
+
# Check freshness for both hosts
|
|
266
|
+
bun run gen:skill-docs --dry-run
|
|
267
|
+
bun run gen:skill-docs --host codex --dry-run
|
|
268
|
+
|
|
269
|
+
# Health dashboard covers both hosts
|
|
270
|
+
bun run skill:check
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Dev setup for .agents/
|
|
274
|
+
|
|
275
|
+
When you run `bin/dev-setup`, it creates symlinks in both `.claude/skills/` and `.agents/skills/` (if applicable), so Codex-compatible agents can discover your dev skills too.
|
|
276
|
+
|
|
277
|
+
### Adding a new skill
|
|
278
|
+
|
|
279
|
+
When you add a new skill template, both hosts get it automatically:
|
|
280
|
+
1. Create `{skill}/SKILL.md.tmpl`
|
|
281
|
+
2. Run `bun run gen:skill-docs` (Claude output) and `bun run gen:skill-docs --host codex` (Codex output)
|
|
282
|
+
3. The dynamic template discovery picks it up — no static list to update
|
|
283
|
+
4. Commit both `{skill}/SKILL.md` and `.agents/skills/gstack-{skill}/SKILL.md`
|
|
284
|
+
|
|
285
|
+
## Conductor workspaces
|
|
286
|
+
|
|
287
|
+
If you're using [Conductor](https://conductor.build) to run multiple Claude Code sessions in parallel, `conductor.json` wires up workspace lifecycle automatically:
|
|
288
|
+
|
|
289
|
+
| Hook | Script | What it does |
|
|
290
|
+
|------|--------|-------------|
|
|
291
|
+
| `setup` | `bin/dev-setup` | Copies `.env` from main worktree, installs deps, symlinks skills |
|
|
292
|
+
| `archive` | `bin/dev-teardown` | Removes skill symlinks, cleans up `.claude/` directory |
|
|
293
|
+
|
|
294
|
+
When Conductor creates a new workspace, `bin/dev-setup` runs automatically. It detects the main worktree (via `git worktree list`), copies your `.env` so API keys carry over, and sets up dev mode — no manual steps needed.
|
|
295
|
+
|
|
296
|
+
**First-time setup:** Put your `ANTHROPIC_API_KEY` in `.env` in the main repo (see `.env.example`). Every Conductor workspace inherits it automatically.
|
|
297
|
+
|
|
298
|
+
## Things to know
|
|
299
|
+
|
|
300
|
+
- **SKILL.md files are generated.** Edit the `.tmpl` template, not the `.md`. Run `bun run gen:skill-docs` to regenerate.
|
|
301
|
+
- **TODOS.md is the unified backlog.** Organized by skill/component with P0-P4 priorities. `/ship` auto-detects completed items. All planning/review/retro skills read it for context.
|
|
302
|
+
- **Browse source changes need a rebuild.** If you touch `browse/src/*.ts`, run `bun run build`.
|
|
303
|
+
- **Dev mode shadows your global install.** Project-local skills take priority over `~/.claude/skills/gstack`. `bin/dev-teardown` restores the global one.
|
|
304
|
+
- **Conductor workspaces are independent.** Each workspace is its own git worktree. `bin/dev-setup` runs automatically via `conductor.json`.
|
|
305
|
+
- **`.env` propagates across worktrees.** Set it once in the main repo, all Conductor workspaces get it.
|
|
306
|
+
- **`.claude/skills/` is gitignored.** The symlinks never get committed.
|
|
307
|
+
|
|
308
|
+
## Testing your changes in a real project
|
|
309
|
+
|
|
310
|
+
**This is the recommended way to develop gstack.** Symlink your gstack checkout
|
|
311
|
+
into the project where you actually use it, so your changes are live while you
|
|
312
|
+
do real work:
|
|
313
|
+
|
|
314
|
+
```bash
|
|
315
|
+
# In your core project
|
|
316
|
+
ln -sfn /path/to/your/gstack-checkout .claude/skills/gstack
|
|
317
|
+
cd .claude/skills/gstack && bun install && bun run build
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
Now every gstack skill invocation in this project uses your working tree. Edit a
|
|
321
|
+
template, run `bun run gen:skill-docs`, and the next `/review` or `/qa` call picks
|
|
322
|
+
it up immediately.
|
|
323
|
+
|
|
324
|
+
**To go back to the stable global install**, just remove the symlink:
|
|
325
|
+
|
|
326
|
+
```bash
|
|
327
|
+
rm .claude/skills/gstack
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
Claude Code falls back to `~/.claude/skills/gstack/` automatically.
|
|
331
|
+
|
|
332
|
+
### Alternative: point your global install at a branch
|
|
333
|
+
|
|
334
|
+
If you don't want per-project symlinks, you can switch the global install:
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
cd ~/.claude/skills/gstack
|
|
338
|
+
git fetch origin
|
|
339
|
+
git checkout origin/<branch>
|
|
340
|
+
bun install && bun run build
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
This affects all projects. To revert: `git checkout main && git pull && bun run build`.
|
|
344
|
+
|
|
345
|
+
## Community PR triage (wave process)
|
|
346
|
+
|
|
347
|
+
When community PRs accumulate, batch them into themed waves:
|
|
348
|
+
|
|
349
|
+
1. **Categorize** — group by theme (security, features, infra, docs)
|
|
350
|
+
2. **Deduplicate** — if two PRs fix the same thing, pick the one that
|
|
351
|
+
changes fewer lines. Close the other with a note pointing to the winner.
|
|
352
|
+
3. **Collector branch** — create `pr-wave-N`, merge clean PRs, resolve
|
|
353
|
+
conflicts for dirty ones, verify with `bun test && bun run build`
|
|
354
|
+
4. **Close with context** — every closed PR gets a comment explaining
|
|
355
|
+
why and what (if anything) supersedes it. Contributors did real work;
|
|
356
|
+
respect that with clear communication.
|
|
357
|
+
5. **Ship as one PR** — single PR to main with all attributions preserved
|
|
358
|
+
in merge commits. Include a summary table of what merged and what closed.
|
|
359
|
+
|
|
360
|
+
See [PR #205](../../pull/205) (v0.8.3) for the first wave as an example.
|
|
361
|
+
|
|
362
|
+
## Shipping your changes
|
|
363
|
+
|
|
364
|
+
When you're happy with your skill edits:
|
|
365
|
+
|
|
366
|
+
```bash
|
|
367
|
+
/ship
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
This runs tests, reviews the diff, triages Greptile comments (with 2-tier escalation), manages TODOS.md, bumps the version, and opens a PR. See `ship/SKILL.md` for the full workflow.
|