@runchr/gstack-antigravity 0.1.1 → 0.1.3
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/skills/gstack/.agents/skills/gstack/SKILL.md +651 -0
- package/.agents/skills/gstack/.agents/skills/gstack-autoplan/SKILL.md +678 -0
- package/.agents/skills/gstack/.agents/skills/gstack-benchmark/SKILL.md +482 -0
- package/.agents/skills/gstack/.agents/skills/gstack-browse/SKILL.md +511 -0
- package/.agents/skills/gstack/.agents/skills/gstack-canary/SKILL.md +486 -0
- package/.agents/skills/gstack/.agents/skills/gstack-careful/SKILL.md +50 -0
- package/.agents/skills/gstack/.agents/skills/gstack-cso/SKILL.md +607 -0
- package/.agents/skills/gstack/.agents/skills/gstack-design-consultation/SKILL.md +615 -0
- package/.agents/skills/gstack/.agents/skills/gstack-design-review/SKILL.md +988 -0
- package/.agents/skills/gstack/.agents/skills/gstack-document-release/SKILL.md +604 -0
- package/.agents/skills/gstack/.agents/skills/gstack-freeze/SKILL.md +67 -0
- package/.agents/skills/gstack/.agents/skills/gstack-guard/SKILL.md +62 -0
- package/.agents/skills/gstack/.agents/skills/gstack-investigate/SKILL.md +415 -0
- package/.agents/skills/gstack/.agents/skills/gstack-land-and-deploy/SKILL.md +873 -0
- package/.agents/skills/gstack/.agents/skills/gstack-office-hours/SKILL.md +986 -0
- package/.agents/skills/gstack/.agents/skills/gstack-plan-ceo-review/SKILL.md +1268 -0
- package/.agents/skills/gstack/.agents/skills/gstack-plan-design-review/SKILL.md +668 -0
- package/.agents/skills/gstack/.agents/skills/gstack-plan-eng-review/SKILL.md +826 -0
- package/.agents/skills/gstack/.agents/skills/gstack-qa/SKILL.md +1006 -0
- package/.agents/skills/gstack/.agents/skills/gstack-qa-only/SKILL.md +626 -0
- package/.agents/skills/gstack/.agents/skills/gstack-retro/SKILL.md +1065 -0
- package/.agents/skills/gstack/.agents/skills/gstack-review/SKILL.md +704 -0
- package/.agents/skills/gstack/.agents/skills/gstack-setup-browser-cookies/SKILL.md +325 -0
- package/.agents/skills/gstack/.agents/skills/gstack-setup-deploy/SKILL.md +450 -0
- package/.agents/skills/gstack/.agents/skills/gstack-ship/SKILL.md +1312 -0
- package/.agents/skills/gstack/.agents/skills/gstack-unfreeze/SKILL.md +36 -0
- package/.agents/skills/gstack/.agents/skills/gstack-upgrade/SKILL.md +220 -0
- package/.agents/skills/gstack/.env.example +5 -0
- package/.agents/skills/gstack/.github/workflows/skill-docs.yml +17 -0
- package/.agents/skills/gstack/AGENTS.md +49 -0
- package/.agents/skills/gstack/ARCHITECTURE.md +359 -0
- package/.agents/skills/gstack/BROWSER.md +271 -0
- package/.agents/skills/gstack/CHANGELOG.md +800 -0
- package/.agents/skills/gstack/CLAUDE.md +284 -0
- package/.agents/skills/gstack/CONTRIBUTING.md +370 -0
- package/.agents/skills/gstack/ETHOS.md +129 -0
- package/.agents/skills/gstack/LICENSE +21 -0
- package/.agents/skills/gstack/README.md +228 -0
- package/.agents/skills/gstack/SKILL.md +657 -0
- package/.agents/skills/gstack/SKILL.md.tmpl +281 -0
- package/.agents/skills/gstack/TODOS.md +564 -0
- package/.agents/skills/gstack/VERSION +1 -0
- package/.agents/skills/gstack/autoplan/SKILL.md +689 -0
- package/.agents/skills/gstack/autoplan/SKILL.md.tmpl +416 -0
- package/.agents/skills/gstack/benchmark/SKILL.md +489 -0
- package/.agents/skills/gstack/benchmark/SKILL.md.tmpl +233 -0
- package/.agents/skills/gstack/bin/dev-setup +68 -0
- package/.agents/skills/gstack/bin/dev-teardown +56 -0
- package/.agents/skills/gstack/bin/gstack-analytics +191 -0
- package/.agents/skills/gstack/bin/gstack-community-dashboard +113 -0
- package/.agents/skills/gstack/bin/gstack-config +38 -0
- package/.agents/skills/gstack/bin/gstack-diff-scope +71 -0
- package/.agents/skills/gstack/bin/gstack-global-discover.ts +591 -0
- package/.agents/skills/gstack/bin/gstack-repo-mode +93 -0
- package/.agents/skills/gstack/bin/gstack-review-log +9 -0
- package/.agents/skills/gstack/bin/gstack-review-read +12 -0
- package/.agents/skills/gstack/bin/gstack-slug +15 -0
- package/.agents/skills/gstack/bin/gstack-telemetry-log +158 -0
- package/.agents/skills/gstack/bin/gstack-telemetry-sync +127 -0
- package/.agents/skills/gstack/bin/gstack-update-check +196 -0
- package/.agents/skills/gstack/browse/SKILL.md +517 -0
- package/.agents/skills/gstack/browse/SKILL.md.tmpl +141 -0
- package/.agents/skills/gstack/browse/bin/find-browse +21 -0
- package/.agents/skills/gstack/browse/bin/remote-slug +14 -0
- package/.agents/skills/gstack/browse/scripts/build-node-server.sh +48 -0
- package/.agents/skills/gstack/browse/src/browser-manager.ts +634 -0
- package/.agents/skills/gstack/browse/src/buffers.ts +137 -0
- package/.agents/skills/gstack/browse/src/bun-polyfill.cjs +109 -0
- package/.agents/skills/gstack/browse/src/cli.ts +420 -0
- package/.agents/skills/gstack/browse/src/commands.ts +111 -0
- package/.agents/skills/gstack/browse/src/config.ts +150 -0
- package/.agents/skills/gstack/browse/src/cookie-import-browser.ts +417 -0
- package/.agents/skills/gstack/browse/src/cookie-picker-routes.ts +207 -0
- package/.agents/skills/gstack/browse/src/cookie-picker-ui.ts +541 -0
- package/.agents/skills/gstack/browse/src/find-browse.ts +61 -0
- package/.agents/skills/gstack/browse/src/meta-commands.ts +269 -0
- package/.agents/skills/gstack/browse/src/platform.ts +17 -0
- package/.agents/skills/gstack/browse/src/read-commands.ts +335 -0
- package/.agents/skills/gstack/browse/src/server.ts +369 -0
- package/.agents/skills/gstack/browse/src/snapshot.ts +398 -0
- package/.agents/skills/gstack/browse/src/url-validation.ts +91 -0
- package/.agents/skills/gstack/browse/src/write-commands.ts +352 -0
- package/.agents/skills/gstack/browse/test/bun-polyfill.test.ts +72 -0
- package/.agents/skills/gstack/browse/test/commands.test.ts +1836 -0
- package/.agents/skills/gstack/browse/test/config.test.ts +250 -0
- package/.agents/skills/gstack/browse/test/cookie-import-browser.test.ts +397 -0
- package/.agents/skills/gstack/browse/test/cookie-picker-routes.test.ts +205 -0
- package/.agents/skills/gstack/browse/test/find-browse.test.ts +50 -0
- package/.agents/skills/gstack/browse/test/fixtures/basic.html +33 -0
- package/.agents/skills/gstack/browse/test/fixtures/cursor-interactive.html +22 -0
- package/.agents/skills/gstack/browse/test/fixtures/dialog.html +15 -0
- package/.agents/skills/gstack/browse/test/fixtures/empty.html +2 -0
- package/.agents/skills/gstack/browse/test/fixtures/forms.html +55 -0
- package/.agents/skills/gstack/browse/test/fixtures/qa-eval-checkout.html +108 -0
- package/.agents/skills/gstack/browse/test/fixtures/qa-eval-spa.html +98 -0
- package/.agents/skills/gstack/browse/test/fixtures/qa-eval.html +51 -0
- package/.agents/skills/gstack/browse/test/fixtures/responsive.html +49 -0
- package/.agents/skills/gstack/browse/test/fixtures/snapshot.html +55 -0
- package/.agents/skills/gstack/browse/test/fixtures/spa.html +24 -0
- package/.agents/skills/gstack/browse/test/fixtures/states.html +17 -0
- package/.agents/skills/gstack/browse/test/fixtures/upload.html +25 -0
- package/.agents/skills/gstack/browse/test/gstack-config.test.ts +125 -0
- package/.agents/skills/gstack/browse/test/gstack-update-check.test.ts +467 -0
- package/.agents/skills/gstack/browse/test/handoff.test.ts +235 -0
- package/.agents/skills/gstack/browse/test/path-validation.test.ts +63 -0
- package/.agents/skills/gstack/browse/test/platform.test.ts +37 -0
- package/.agents/skills/gstack/browse/test/snapshot.test.ts +467 -0
- package/.agents/skills/gstack/browse/test/test-server.ts +57 -0
- package/.agents/skills/gstack/browse/test/url-validation.test.ts +72 -0
- package/.agents/skills/gstack/canary/SKILL.md +493 -0
- package/.agents/skills/gstack/canary/SKILL.md.tmpl +220 -0
- package/.agents/skills/gstack/careful/SKILL.md +59 -0
- package/.agents/skills/gstack/careful/SKILL.md.tmpl +57 -0
- package/.agents/skills/gstack/careful/bin/check-careful.sh +112 -0
- package/.agents/skills/gstack/codex/SKILL.md +677 -0
- package/.agents/skills/gstack/codex/SKILL.md.tmpl +356 -0
- package/.agents/skills/gstack/conductor.json +6 -0
- package/.agents/skills/gstack/cso/SKILL.md +615 -0
- package/.agents/skills/gstack/cso/SKILL.md.tmpl +376 -0
- package/.agents/skills/gstack/design-consultation/SKILL.md +625 -0
- package/.agents/skills/gstack/design-consultation/SKILL.md.tmpl +369 -0
- package/.agents/skills/gstack/design-review/SKILL.md +998 -0
- package/.agents/skills/gstack/design-review/SKILL.md.tmpl +262 -0
- package/.agents/skills/gstack/docs/images/github-2013.png +0 -0
- package/.agents/skills/gstack/docs/images/github-2026.png +0 -0
- package/.agents/skills/gstack/docs/skills.md +877 -0
- package/.agents/skills/gstack/document-release/SKILL.md +613 -0
- package/.agents/skills/gstack/document-release/SKILL.md.tmpl +357 -0
- package/.agents/skills/gstack/freeze/SKILL.md +82 -0
- package/.agents/skills/gstack/freeze/SKILL.md.tmpl +80 -0
- package/.agents/skills/gstack/freeze/bin/check-freeze.sh +68 -0
- package/.agents/skills/gstack/gstack-upgrade/SKILL.md +226 -0
- package/.agents/skills/gstack/gstack-upgrade/SKILL.md.tmpl +224 -0
- package/.agents/skills/gstack/guard/SKILL.md +82 -0
- package/.agents/skills/gstack/guard/SKILL.md.tmpl +80 -0
- package/.agents/skills/gstack/investigate/SKILL.md +435 -0
- package/.agents/skills/gstack/investigate/SKILL.md.tmpl +196 -0
- package/.agents/skills/gstack/land-and-deploy/SKILL.md +880 -0
- package/.agents/skills/gstack/land-and-deploy/SKILL.md.tmpl +575 -0
- package/.agents/skills/gstack/office-hours/SKILL.md +996 -0
- package/.agents/skills/gstack/office-hours/SKILL.md.tmpl +624 -0
- package/.agents/skills/gstack/package.json +55 -0
- package/.agents/skills/gstack/plan-ceo-review/SKILL.md +1277 -0
- package/.agents/skills/gstack/plan-ceo-review/SKILL.md.tmpl +838 -0
- package/.agents/skills/gstack/plan-design-review/SKILL.md +676 -0
- package/.agents/skills/gstack/plan-design-review/SKILL.md.tmpl +314 -0
- package/.agents/skills/gstack/plan-eng-review/SKILL.md +836 -0
- package/.agents/skills/gstack/plan-eng-review/SKILL.md.tmpl +279 -0
- package/.agents/skills/gstack/qa/SKILL.md +1016 -0
- package/.agents/skills/gstack/qa/SKILL.md.tmpl +316 -0
- package/.agents/skills/gstack/qa/references/issue-taxonomy.md +85 -0
- package/.agents/skills/gstack/qa/templates/qa-report-template.md +126 -0
- package/.agents/skills/gstack/qa-only/SKILL.md +633 -0
- package/.agents/skills/gstack/qa-only/SKILL.md.tmpl +101 -0
- package/.agents/skills/gstack/retro/SKILL.md +1072 -0
- package/.agents/skills/gstack/retro/SKILL.md.tmpl +833 -0
- package/.agents/skills/gstack/review/SKILL.md +849 -0
- package/.agents/skills/gstack/review/SKILL.md.tmpl +259 -0
- package/.agents/skills/gstack/review/TODOS-format.md +62 -0
- package/.agents/skills/gstack/review/checklist.md +190 -0
- package/.agents/skills/gstack/review/design-checklist.md +132 -0
- package/.agents/skills/gstack/review/greptile-triage.md +220 -0
- package/.agents/skills/gstack/scripts/analytics.ts +190 -0
- package/.agents/skills/gstack/scripts/dev-skill.ts +82 -0
- package/.agents/skills/gstack/scripts/eval-compare.ts +96 -0
- package/.agents/skills/gstack/scripts/eval-list.ts +116 -0
- package/.agents/skills/gstack/scripts/eval-select.ts +86 -0
- package/.agents/skills/gstack/scripts/eval-summary.ts +187 -0
- package/.agents/skills/gstack/scripts/eval-watch.ts +172 -0
- package/.agents/skills/gstack/scripts/gen-skill-docs.ts +2414 -0
- package/.agents/skills/gstack/scripts/skill-check.ts +167 -0
- package/.agents/skills/gstack/setup +269 -0
- package/.agents/skills/gstack/setup-browser-cookies/SKILL.md +330 -0
- package/.agents/skills/gstack/setup-browser-cookies/SKILL.md.tmpl +74 -0
- package/.agents/skills/gstack/setup-deploy/SKILL.md +459 -0
- package/.agents/skills/gstack/setup-deploy/SKILL.md.tmpl +220 -0
- package/.agents/skills/gstack/ship/SKILL.md +1457 -0
- package/.agents/skills/gstack/ship/SKILL.md.tmpl +528 -0
- package/.agents/skills/gstack/supabase/config.sh +10 -0
- package/.agents/skills/gstack/supabase/functions/community-pulse/index.ts +59 -0
- package/.agents/skills/gstack/supabase/functions/telemetry-ingest/index.ts +135 -0
- package/.agents/skills/gstack/supabase/functions/update-check/index.ts +37 -0
- package/.agents/skills/gstack/supabase/migrations/001_telemetry.sql +89 -0
- package/.agents/skills/gstack/test/analytics.test.ts +277 -0
- package/.agents/skills/gstack/test/codex-e2e.test.ts +197 -0
- package/.agents/skills/gstack/test/fixtures/coverage-audit-fixture.ts +76 -0
- package/.agents/skills/gstack/test/fixtures/eval-baselines.json +7 -0
- package/.agents/skills/gstack/test/fixtures/qa-eval-checkout-ground-truth.json +43 -0
- package/.agents/skills/gstack/test/fixtures/qa-eval-ground-truth.json +43 -0
- package/.agents/skills/gstack/test/fixtures/qa-eval-spa-ground-truth.json +43 -0
- package/.agents/skills/gstack/test/fixtures/review-eval-design-slop.css +86 -0
- package/.agents/skills/gstack/test/fixtures/review-eval-design-slop.html +41 -0
- package/.agents/skills/gstack/test/fixtures/review-eval-enum-diff.rb +30 -0
- package/.agents/skills/gstack/test/fixtures/review-eval-enum.rb +27 -0
- package/.agents/skills/gstack/test/fixtures/review-eval-vuln.rb +14 -0
- package/.agents/skills/gstack/test/gemini-e2e.test.ts +173 -0
- package/.agents/skills/gstack/test/gen-skill-docs.test.ts +1049 -0
- package/.agents/skills/gstack/test/global-discover.test.ts +187 -0
- package/.agents/skills/gstack/test/helpers/codex-session-runner.ts +282 -0
- package/.agents/skills/gstack/test/helpers/e2e-helpers.ts +239 -0
- package/.agents/skills/gstack/test/helpers/eval-store.test.ts +548 -0
- package/.agents/skills/gstack/test/helpers/eval-store.ts +689 -0
- package/.agents/skills/gstack/test/helpers/gemini-session-runner.test.ts +104 -0
- package/.agents/skills/gstack/test/helpers/gemini-session-runner.ts +201 -0
- package/.agents/skills/gstack/test/helpers/llm-judge.ts +130 -0
- package/.agents/skills/gstack/test/helpers/observability.test.ts +283 -0
- package/.agents/skills/gstack/test/helpers/session-runner.test.ts +96 -0
- package/.agents/skills/gstack/test/helpers/session-runner.ts +357 -0
- package/.agents/skills/gstack/test/helpers/skill-parser.ts +206 -0
- package/.agents/skills/gstack/test/helpers/touchfiles.ts +260 -0
- package/.agents/skills/gstack/test/hook-scripts.test.ts +373 -0
- package/.agents/skills/gstack/test/skill-e2e-browse.test.ts +293 -0
- package/.agents/skills/gstack/test/skill-e2e-deploy.test.ts +279 -0
- package/.agents/skills/gstack/test/skill-e2e-design.test.ts +614 -0
- package/.agents/skills/gstack/test/skill-e2e-plan.test.ts +538 -0
- package/.agents/skills/gstack/test/skill-e2e-qa-bugs.test.ts +194 -0
- package/.agents/skills/gstack/test/skill-e2e-qa-workflow.test.ts +412 -0
- package/.agents/skills/gstack/test/skill-e2e-review.test.ts +535 -0
- package/.agents/skills/gstack/test/skill-e2e-workflow.test.ts +586 -0
- package/.agents/skills/gstack/test/skill-e2e.test.ts +3325 -0
- package/.agents/skills/gstack/test/skill-llm-eval.test.ts +787 -0
- package/.agents/skills/gstack/test/skill-parser.test.ts +179 -0
- package/.agents/skills/gstack/test/skill-routing-e2e.test.ts +605 -0
- package/.agents/skills/gstack/test/skill-validation.test.ts +1520 -0
- package/.agents/skills/gstack/test/telemetry.test.ts +278 -0
- package/.agents/skills/gstack/test/touchfiles.test.ts +262 -0
- package/.agents/skills/gstack/unfreeze/SKILL.md +40 -0
- package/.agents/skills/gstack/unfreeze/SKILL.md.tmpl +38 -0
- package/package.json +2 -1
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup-deploy
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
description: |
|
|
5
|
+
Configure deployment settings for /land-and-deploy. Detects your deploy
|
|
6
|
+
platform (Fly.io, Render, Vercel, Netlify, Heroku, GitHub Actions, custom),
|
|
7
|
+
production URL, health check endpoints, and deploy status commands. Writes
|
|
8
|
+
the configuration to CLAUDE.md so all future deploys are automatic.
|
|
9
|
+
Use when: "setup deploy", "configure deployment", "set up land-and-deploy",
|
|
10
|
+
"how do I deploy with gstack", "add deploy config".
|
|
11
|
+
allowed-tools:
|
|
12
|
+
- Bash
|
|
13
|
+
- Read
|
|
14
|
+
- Write
|
|
15
|
+
- Edit
|
|
16
|
+
- Glob
|
|
17
|
+
- Grep
|
|
18
|
+
- AskUserQuestion
|
|
19
|
+
---
|
|
20
|
+
<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly -->
|
|
21
|
+
<!-- Regenerate: bun run gen:skill-docs -->
|
|
22
|
+
|
|
23
|
+
## Preamble (run first)
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
_UPD=$(~/.claude/skills/gstack/bin/gstack-update-check 2>/dev/null || .claude/skills/gstack/bin/gstack-update-check 2>/dev/null || true)
|
|
27
|
+
[ -n "$_UPD" ] && echo "$_UPD" || true
|
|
28
|
+
mkdir -p ~/.gstack/sessions
|
|
29
|
+
touch ~/.gstack/sessions/"$PPID"
|
|
30
|
+
_SESSIONS=$(find ~/.gstack/sessions -mmin -120 -type f 2>/dev/null | wc -l | tr -d ' ')
|
|
31
|
+
find ~/.gstack/sessions -mmin +120 -type f -delete 2>/dev/null || true
|
|
32
|
+
_CONTRIB=$(~/.claude/skills/gstack/bin/gstack-config get gstack_contributor 2>/dev/null || true)
|
|
33
|
+
_PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null || echo "true")
|
|
34
|
+
_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
|
|
35
|
+
echo "BRANCH: $_BRANCH"
|
|
36
|
+
echo "PROACTIVE: $_PROACTIVE"
|
|
37
|
+
source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true
|
|
38
|
+
REPO_MODE=${REPO_MODE:-unknown}
|
|
39
|
+
echo "REPO_MODE: $REPO_MODE"
|
|
40
|
+
_LAKE_SEEN=$([ -f ~/.gstack/.completeness-intro-seen ] && echo "yes" || echo "no")
|
|
41
|
+
echo "LAKE_INTRO: $_LAKE_SEEN"
|
|
42
|
+
_TEL=$(~/.claude/skills/gstack/bin/gstack-config get telemetry 2>/dev/null || true)
|
|
43
|
+
_TEL_PROMPTED=$([ -f ~/.gstack/.telemetry-prompted ] && echo "yes" || echo "no")
|
|
44
|
+
_TEL_START=$(date +%s)
|
|
45
|
+
_SESSION_ID="$$-$(date +%s)"
|
|
46
|
+
echo "TELEMETRY: ${_TEL:-off}"
|
|
47
|
+
echo "TEL_PROMPTED: $_TEL_PROMPTED"
|
|
48
|
+
mkdir -p ~/.gstack/analytics
|
|
49
|
+
echo '{"skill":"setup-deploy","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}' >> ~/.gstack/analytics/skill-usage.jsonl 2>/dev/null || true
|
|
50
|
+
for _PF in ~/.gstack/analytics/.pending-*; 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
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills — only invoke
|
|
54
|
+
them when the user explicitly asks. The user opted out of proactive suggestions.
|
|
55
|
+
|
|
56
|
+
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.
|
|
57
|
+
|
|
58
|
+
If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle.
|
|
59
|
+
Tell the user: "gstack follows the **Boil the Lake** principle — always do the complete
|
|
60
|
+
thing when AI makes the marginal cost near-zero. Read more: https://garryslist.org/posts/boil-the-ocean"
|
|
61
|
+
Then offer to open the essay in their default browser:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
open https://garryslist.org/posts/boil-the-ocean
|
|
65
|
+
touch ~/.gstack/.completeness-intro-seen
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Only run `open` if the user says yes. Always run `touch` to mark as seen. This only happens once.
|
|
69
|
+
|
|
70
|
+
If `TEL_PROMPTED` is `no` AND `LAKE_INTRO` is `yes`: After the lake intro is handled,
|
|
71
|
+
ask the user about telemetry. Use AskUserQuestion:
|
|
72
|
+
|
|
73
|
+
> Help gstack get better! Community mode shares usage data (which skills you use, how long
|
|
74
|
+
> they take, crash info) with a stable device ID so we can track trends and fix bugs faster.
|
|
75
|
+
> No code, file paths, or repo names are ever sent.
|
|
76
|
+
> Change anytime with `gstack-config set telemetry off`.
|
|
77
|
+
|
|
78
|
+
Options:
|
|
79
|
+
- A) Help gstack get better! (recommended)
|
|
80
|
+
- B) No thanks
|
|
81
|
+
|
|
82
|
+
If A: run `~/.claude/skills/gstack/bin/gstack-config set telemetry community`
|
|
83
|
+
|
|
84
|
+
If B: ask a follow-up AskUserQuestion:
|
|
85
|
+
|
|
86
|
+
> How about anonymous mode? We just learn that *someone* used gstack — no unique ID,
|
|
87
|
+
> no way to connect sessions. Just a counter that helps us know if anyone's out there.
|
|
88
|
+
|
|
89
|
+
Options:
|
|
90
|
+
- A) Sure, anonymous is fine
|
|
91
|
+
- B) No thanks, fully off
|
|
92
|
+
|
|
93
|
+
If B→A: run `~/.claude/skills/gstack/bin/gstack-config set telemetry anonymous`
|
|
94
|
+
If B→B: run `~/.claude/skills/gstack/bin/gstack-config set telemetry off`
|
|
95
|
+
|
|
96
|
+
Always run:
|
|
97
|
+
```bash
|
|
98
|
+
touch ~/.gstack/.telemetry-prompted
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
This only happens once. If `TEL_PROMPTED` is `yes`, skip this entirely.
|
|
102
|
+
|
|
103
|
+
## AskUserQuestion Format
|
|
104
|
+
|
|
105
|
+
**ALWAYS follow this structure for every AskUserQuestion call:**
|
|
106
|
+
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)
|
|
107
|
+
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.
|
|
108
|
+
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.
|
|
109
|
+
4. **Options:** Lettered options: `A) ... B) ... C) ...` — when an option involves effort, show both scales: `(human: ~X / CC: ~Y)`
|
|
110
|
+
|
|
111
|
+
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.
|
|
112
|
+
|
|
113
|
+
Per-skill instructions may add additional formatting rules on top of this baseline.
|
|
114
|
+
|
|
115
|
+
## Completeness Principle — Boil the Lake
|
|
116
|
+
|
|
117
|
+
AI-assisted coding makes the marginal cost of completeness near-zero. When you present options:
|
|
118
|
+
|
|
119
|
+
- 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.
|
|
120
|
+
- **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.
|
|
121
|
+
- **When estimating effort**, always show both scales: human team time and CC+gstack time. The compression ratio varies by task type — use this reference:
|
|
122
|
+
|
|
123
|
+
| Task type | Human team | CC+gstack | Compression |
|
|
124
|
+
|-----------|-----------|-----------|-------------|
|
|
125
|
+
| Boilerplate / scaffolding | 2 days | 15 min | ~100x |
|
|
126
|
+
| Test writing | 1 day | 15 min | ~50x |
|
|
127
|
+
| Feature implementation | 1 week | 30 min | ~30x |
|
|
128
|
+
| Bug fix + regression test | 4 hours | 15 min | ~20x |
|
|
129
|
+
| Architecture / design | 2 days | 4 hours | ~5x |
|
|
130
|
+
| Research / exploration | 1 day | 3 hours | ~3x |
|
|
131
|
+
|
|
132
|
+
- 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.
|
|
133
|
+
|
|
134
|
+
**Anti-patterns — DON'T do this:**
|
|
135
|
+
- BAD: "Choose B — it covers 90% of the value with less code." (If A is only 70 lines more, choose A.)
|
|
136
|
+
- BAD: "We can skip edge case handling to save time." (Edge case handling costs minutes with CC.)
|
|
137
|
+
- BAD: "Let's defer test coverage to a follow-up PR." (Tests are the cheapest lake to boil.)
|
|
138
|
+
- BAD: Quoting only human-team effort: "This would take 2 weeks." (Say: "2 weeks human / ~1 hour CC.")
|
|
139
|
+
|
|
140
|
+
## Repo Ownership Mode — See Something, Say Something
|
|
141
|
+
|
|
142
|
+
`REPO_MODE` from the preamble tells you who owns issues in this repo:
|
|
143
|
+
|
|
144
|
+
- **`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.
|
|
145
|
+
- **`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.
|
|
146
|
+
- **`unknown`** — Treat as collaborative (safer default — ask before fixing).
|
|
147
|
+
|
|
148
|
+
**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.
|
|
149
|
+
|
|
150
|
+
Never let a noticed issue silently pass. The whole point is proactive communication.
|
|
151
|
+
|
|
152
|
+
## Search Before Building
|
|
153
|
+
|
|
154
|
+
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.
|
|
155
|
+
|
|
156
|
+
**Three layers of knowledge:**
|
|
157
|
+
- **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.
|
|
158
|
+
- **Layer 2** (new and popular — search for these). But scrutinize: humans are subject to mania. Search results are inputs to your thinking, not answers.
|
|
159
|
+
- **Layer 3** (first principles — prize these above all). Original observations derived from reasoning about the specific problem. The most valuable of all.
|
|
160
|
+
|
|
161
|
+
**Eureka moment:** When first-principles reasoning reveals conventional wisdom is wrong, name it:
|
|
162
|
+
"EUREKA: Everyone does X because [assumption]. But [evidence] shows this is wrong. Y is better because [reasoning]."
|
|
163
|
+
|
|
164
|
+
Log eureka moments:
|
|
165
|
+
```bash
|
|
166
|
+
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
|
|
167
|
+
```
|
|
168
|
+
Replace SKILL_NAME and ONE_LINE_SUMMARY. Runs inline — don't stop the workflow.
|
|
169
|
+
|
|
170
|
+
**WebSearch fallback:** If WebSearch is unavailable, skip the search step and note: "Search unavailable — proceeding with in-distribution knowledge only."
|
|
171
|
+
|
|
172
|
+
## Contributor Mode
|
|
173
|
+
|
|
174
|
+
If `_CONTRIB` is `true`: you are in **contributor mode**. You're a gstack user who also helps make it better.
|
|
175
|
+
|
|
176
|
+
**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!
|
|
177
|
+
|
|
178
|
+
**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.
|
|
179
|
+
|
|
180
|
+
**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.
|
|
181
|
+
|
|
182
|
+
**To file:** write `~/.gstack/contributor-logs/{slug}.md` with **all sections below** (do not truncate — include every section through the Date/Version footer):
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
# {Title}
|
|
186
|
+
|
|
187
|
+
Hey gstack team — ran into this while using /{skill-name}:
|
|
188
|
+
|
|
189
|
+
**What I was trying to do:** {what the user/agent was attempting}
|
|
190
|
+
**What happened instead:** {what actually happened}
|
|
191
|
+
**My rating:** {0-10} — {one sentence on why it wasn't a 10}
|
|
192
|
+
|
|
193
|
+
## Steps to reproduce
|
|
194
|
+
1. {step}
|
|
195
|
+
|
|
196
|
+
## Raw output
|
|
197
|
+
```
|
|
198
|
+
{paste the actual error or unexpected output here}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## What would make this a 10
|
|
202
|
+
{one sentence: what gstack should have done differently}
|
|
203
|
+
|
|
204
|
+
**Date:** {YYYY-MM-DD} | **Version:** {gstack version} | **Skill:** /{skill}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
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}"
|
|
208
|
+
|
|
209
|
+
## Completion Status Protocol
|
|
210
|
+
|
|
211
|
+
When completing a skill workflow, report status using one of:
|
|
212
|
+
- **DONE** — All steps completed successfully. Evidence provided for each claim.
|
|
213
|
+
- **DONE_WITH_CONCERNS** — Completed, but with issues the user should know about. List each concern.
|
|
214
|
+
- **BLOCKED** — Cannot proceed. State what is blocking and what was tried.
|
|
215
|
+
- **NEEDS_CONTEXT** — Missing information required to continue. State exactly what you need.
|
|
216
|
+
|
|
217
|
+
### Escalation
|
|
218
|
+
|
|
219
|
+
It is always OK to stop and say "this is too hard for me" or "I'm not confident in this result."
|
|
220
|
+
|
|
221
|
+
Bad work is worse than no work. You will not be penalized for escalating.
|
|
222
|
+
- If you have attempted a task 3 times without success, STOP and escalate.
|
|
223
|
+
- If you are uncertain about a security-sensitive change, STOP and escalate.
|
|
224
|
+
- If the scope of work exceeds what you can verify, STOP and escalate.
|
|
225
|
+
|
|
226
|
+
Escalation format:
|
|
227
|
+
```
|
|
228
|
+
STATUS: BLOCKED | NEEDS_CONTEXT
|
|
229
|
+
REASON: [1-2 sentences]
|
|
230
|
+
ATTEMPTED: [what you tried]
|
|
231
|
+
RECOMMENDATION: [what the user should do next]
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Telemetry (run last)
|
|
235
|
+
|
|
236
|
+
After the skill workflow completes (success, error, or abort), log the telemetry event.
|
|
237
|
+
Determine the skill name from the `name:` field in this file's YAML frontmatter.
|
|
238
|
+
Determine the outcome from the workflow result (success if completed normally, error
|
|
239
|
+
if it failed, abort if the user interrupted).
|
|
240
|
+
|
|
241
|
+
**PLAN MODE EXCEPTION — ALWAYS RUN:** This command writes telemetry to
|
|
242
|
+
`~/.gstack/analytics/` (user config directory, not project files). The skill
|
|
243
|
+
preamble already writes to the same directory — this is the same pattern.
|
|
244
|
+
Skipping this command loses session duration and outcome data.
|
|
245
|
+
|
|
246
|
+
Run this bash:
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
_TEL_END=$(date +%s)
|
|
250
|
+
_TEL_DUR=$(( _TEL_END - _TEL_START ))
|
|
251
|
+
rm -f ~/.gstack/analytics/.pending-"$_SESSION_ID" 2>/dev/null || true
|
|
252
|
+
~/.claude/skills/gstack/bin/gstack-telemetry-log \
|
|
253
|
+
--skill "SKILL_NAME" --duration "$_TEL_DUR" --outcome "OUTCOME" \
|
|
254
|
+
--used-browse "USED_BROWSE" --session-id "$_SESSION_ID" 2>/dev/null &
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Replace `SKILL_NAME` with the actual skill name from frontmatter, `OUTCOME` with
|
|
258
|
+
success/error/abort, and `USED_BROWSE` with true/false based on whether `$B` was used.
|
|
259
|
+
If you cannot determine the outcome, use "unknown". This runs in the background and
|
|
260
|
+
never blocks the user.
|
|
261
|
+
|
|
262
|
+
# /setup-deploy — Configure Deployment for gstack
|
|
263
|
+
|
|
264
|
+
You are helping the user configure their deployment so `/land-and-deploy` works
|
|
265
|
+
automatically. Your job is to detect the deploy platform, production URL, health
|
|
266
|
+
checks, and deploy status commands — then persist everything to CLAUDE.md.
|
|
267
|
+
|
|
268
|
+
After this runs once, `/land-and-deploy` reads CLAUDE.md and skips detection entirely.
|
|
269
|
+
|
|
270
|
+
## User-invocable
|
|
271
|
+
When the user types `/setup-deploy`, run this skill.
|
|
272
|
+
|
|
273
|
+
## Instructions
|
|
274
|
+
|
|
275
|
+
### Step 1: Check existing configuration
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
grep -A 20 "## Deploy Configuration" CLAUDE.md 2>/dev/null || echo "NO_CONFIG"
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
If configuration already exists, show it and ask:
|
|
282
|
+
|
|
283
|
+
- **Context:** Deploy configuration already exists in CLAUDE.md.
|
|
284
|
+
- **RECOMMENDATION:** Choose A to update if your setup changed.
|
|
285
|
+
- A) Reconfigure from scratch (overwrite existing)
|
|
286
|
+
- B) Edit specific fields (show current config, let me change one thing)
|
|
287
|
+
- C) Done — configuration looks correct
|
|
288
|
+
|
|
289
|
+
If the user picks C, stop.
|
|
290
|
+
|
|
291
|
+
### Step 2: Detect platform
|
|
292
|
+
|
|
293
|
+
Run the platform detection from the deploy bootstrap:
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
# Platform config files
|
|
297
|
+
[ -f fly.toml ] && echo "PLATFORM:fly" && cat fly.toml
|
|
298
|
+
[ -f render.yaml ] && echo "PLATFORM:render" && cat render.yaml
|
|
299
|
+
[ -f vercel.json ] || [ -d .vercel ] && echo "PLATFORM:vercel"
|
|
300
|
+
[ -f netlify.toml ] && echo "PLATFORM:netlify" && cat netlify.toml
|
|
301
|
+
[ -f Procfile ] && echo "PLATFORM:heroku"
|
|
302
|
+
[ -f railway.json ] || [ -f railway.toml ] && echo "PLATFORM:railway"
|
|
303
|
+
|
|
304
|
+
# GitHub Actions deploy workflows
|
|
305
|
+
for f in .github/workflows/*.yml .github/workflows/*.yaml; do
|
|
306
|
+
[ -f "$f" ] && grep -qiE "deploy|release|production|staging|cd" "$f" 2>/dev/null && echo "DEPLOY_WORKFLOW:$f"
|
|
307
|
+
done
|
|
308
|
+
|
|
309
|
+
# Project type
|
|
310
|
+
[ -f package.json ] && grep -q '"bin"' package.json 2>/dev/null && echo "PROJECT_TYPE:cli"
|
|
311
|
+
ls *.gemspec 2>/dev/null && echo "PROJECT_TYPE:library"
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
### Step 3: Platform-specific setup
|
|
315
|
+
|
|
316
|
+
Based on what was detected, guide the user through platform-specific configuration.
|
|
317
|
+
|
|
318
|
+
#### Fly.io
|
|
319
|
+
|
|
320
|
+
If `fly.toml` detected:
|
|
321
|
+
|
|
322
|
+
1. Extract app name: `grep -m1 "^app" fly.toml | sed 's/app = "\(.*\)"/\1/'`
|
|
323
|
+
2. Check if `fly` CLI is installed: `which fly 2>/dev/null`
|
|
324
|
+
3. If installed, verify: `fly status --app {app} 2>/dev/null`
|
|
325
|
+
4. Infer URL: `https://{app}.fly.dev`
|
|
326
|
+
5. Set deploy status command: `fly status --app {app}`
|
|
327
|
+
6. Set health check: `https://{app}.fly.dev` (or `/health` if the app has one)
|
|
328
|
+
|
|
329
|
+
Ask the user to confirm the production URL. Some Fly apps use custom domains.
|
|
330
|
+
|
|
331
|
+
#### Render
|
|
332
|
+
|
|
333
|
+
If `render.yaml` detected:
|
|
334
|
+
|
|
335
|
+
1. Extract service name and type from render.yaml
|
|
336
|
+
2. Check for Render API key: `echo $RENDER_API_KEY | head -c 4` (don't expose the full key)
|
|
337
|
+
3. Infer URL: `https://{service-name}.onrender.com`
|
|
338
|
+
4. Render deploys automatically on push to the connected branch — no deploy workflow needed
|
|
339
|
+
5. Set health check: the inferred URL
|
|
340
|
+
|
|
341
|
+
Ask the user to confirm. Render uses auto-deploy from the connected git branch — after
|
|
342
|
+
merge to main, Render picks it up automatically. The "deploy wait" in /land-and-deploy
|
|
343
|
+
should poll the Render URL until it responds with the new version.
|
|
344
|
+
|
|
345
|
+
#### Vercel
|
|
346
|
+
|
|
347
|
+
If vercel.json or .vercel detected:
|
|
348
|
+
|
|
349
|
+
1. Check for `vercel` CLI: `which vercel 2>/dev/null`
|
|
350
|
+
2. If installed: `vercel ls --prod 2>/dev/null | head -3`
|
|
351
|
+
3. Vercel deploys automatically on push — preview on PR, production on merge to main
|
|
352
|
+
4. Set health check: the production URL from vercel project settings
|
|
353
|
+
|
|
354
|
+
#### Netlify
|
|
355
|
+
|
|
356
|
+
If netlify.toml detected:
|
|
357
|
+
|
|
358
|
+
1. Extract site info from netlify.toml
|
|
359
|
+
2. Netlify deploys automatically on push
|
|
360
|
+
3. Set health check: the production URL
|
|
361
|
+
|
|
362
|
+
#### GitHub Actions only
|
|
363
|
+
|
|
364
|
+
If deploy workflows detected but no platform config:
|
|
365
|
+
|
|
366
|
+
1. Read the workflow file to understand what it does
|
|
367
|
+
2. Extract the deploy target (if mentioned)
|
|
368
|
+
3. Ask the user for the production URL
|
|
369
|
+
|
|
370
|
+
#### Custom / Manual
|
|
371
|
+
|
|
372
|
+
If nothing detected:
|
|
373
|
+
|
|
374
|
+
Use AskUserQuestion to gather the information:
|
|
375
|
+
|
|
376
|
+
1. **How are deploys triggered?**
|
|
377
|
+
- A) Automatically on push to main (Fly, Render, Vercel, Netlify, etc.)
|
|
378
|
+
- B) Via GitHub Actions workflow
|
|
379
|
+
- C) Via a deploy script or CLI command (describe it)
|
|
380
|
+
- D) Manually (SSH, dashboard, etc.)
|
|
381
|
+
- E) This project doesn't deploy (library, CLI, tool)
|
|
382
|
+
|
|
383
|
+
2. **What's the production URL?** (Free text — the URL where the app runs)
|
|
384
|
+
|
|
385
|
+
3. **How can gstack check if a deploy succeeded?**
|
|
386
|
+
- A) HTTP health check at a specific URL (e.g., /health, /api/status)
|
|
387
|
+
- B) CLI command (e.g., `fly status`, `kubectl rollout status`)
|
|
388
|
+
- C) Check the GitHub Actions workflow status
|
|
389
|
+
- D) No automated way — just check the URL loads
|
|
390
|
+
|
|
391
|
+
4. **Any pre-merge or post-merge hooks?**
|
|
392
|
+
- Commands to run before merging (e.g., `bun run build`)
|
|
393
|
+
- Commands to run after merge but before deploy verification
|
|
394
|
+
|
|
395
|
+
### Step 4: Write configuration
|
|
396
|
+
|
|
397
|
+
Read CLAUDE.md (or create it). Find and replace the `## Deploy Configuration` section
|
|
398
|
+
if it exists, or append it at the end.
|
|
399
|
+
|
|
400
|
+
```markdown
|
|
401
|
+
## Deploy Configuration (configured by /setup-deploy)
|
|
402
|
+
- Platform: {platform}
|
|
403
|
+
- Production URL: {url}
|
|
404
|
+
- Deploy workflow: {workflow file or "auto-deploy on push"}
|
|
405
|
+
- Deploy status command: {command or "HTTP health check"}
|
|
406
|
+
- Merge method: {squash/merge/rebase}
|
|
407
|
+
- Project type: {web app / API / CLI / library}
|
|
408
|
+
- Post-deploy health check: {health check URL or command}
|
|
409
|
+
|
|
410
|
+
### Custom deploy hooks
|
|
411
|
+
- Pre-merge: {command or "none"}
|
|
412
|
+
- Deploy trigger: {command or "automatic on push to main"}
|
|
413
|
+
- Deploy status: {command or "poll production URL"}
|
|
414
|
+
- Health check: {URL or command}
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
### Step 5: Verify
|
|
418
|
+
|
|
419
|
+
After writing, verify the configuration works:
|
|
420
|
+
|
|
421
|
+
1. If a health check URL was configured, try it:
|
|
422
|
+
```bash
|
|
423
|
+
curl -sf "{health-check-url}" -o /dev/null -w "%{http_code}" 2>/dev/null || echo "UNREACHABLE"
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
2. If a deploy status command was configured, try it:
|
|
427
|
+
```bash
|
|
428
|
+
{deploy-status-command} 2>/dev/null | head -5 || echo "COMMAND_FAILED"
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
Report results. If anything failed, note it but don't block — the config is still
|
|
432
|
+
useful even if the health check is temporarily unreachable.
|
|
433
|
+
|
|
434
|
+
### Step 6: Summary
|
|
435
|
+
|
|
436
|
+
```
|
|
437
|
+
DEPLOY CONFIGURATION — COMPLETE
|
|
438
|
+
════════════════════════════════
|
|
439
|
+
Platform: {platform}
|
|
440
|
+
URL: {url}
|
|
441
|
+
Health check: {health check}
|
|
442
|
+
Status cmd: {status command}
|
|
443
|
+
Merge method: {merge method}
|
|
444
|
+
|
|
445
|
+
Saved to CLAUDE.md. /land-and-deploy will use these settings automatically.
|
|
446
|
+
|
|
447
|
+
Next steps:
|
|
448
|
+
- Run /land-and-deploy to merge and deploy your current PR
|
|
449
|
+
- Edit the "## Deploy Configuration" section in CLAUDE.md to change settings
|
|
450
|
+
- Run /setup-deploy again to reconfigure
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
## Important Rules
|
|
454
|
+
|
|
455
|
+
- **Never expose secrets.** Don't print full API keys, tokens, or passwords.
|
|
456
|
+
- **Confirm with the user.** Always show the detected config and ask for confirmation before writing.
|
|
457
|
+
- **CLAUDE.md is the source of truth.** All configuration lives there — not in a separate config file.
|
|
458
|
+
- **Idempotent.** Running /setup-deploy multiple times overwrites the previous config cleanly.
|
|
459
|
+
- **Platform CLIs are optional.** If `fly` or `vercel` CLI isn't installed, fall back to URL-based health checks.
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup-deploy
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
description: |
|
|
5
|
+
Configure deployment settings for /land-and-deploy. Detects your deploy
|
|
6
|
+
platform (Fly.io, Render, Vercel, Netlify, Heroku, GitHub Actions, custom),
|
|
7
|
+
production URL, health check endpoints, and deploy status commands. Writes
|
|
8
|
+
the configuration to CLAUDE.md so all future deploys are automatic.
|
|
9
|
+
Use when: "setup deploy", "configure deployment", "set up land-and-deploy",
|
|
10
|
+
"how do I deploy with gstack", "add deploy config".
|
|
11
|
+
allowed-tools:
|
|
12
|
+
- Bash
|
|
13
|
+
- Read
|
|
14
|
+
- Write
|
|
15
|
+
- Edit
|
|
16
|
+
- Glob
|
|
17
|
+
- Grep
|
|
18
|
+
- AskUserQuestion
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
{{PREAMBLE}}
|
|
22
|
+
|
|
23
|
+
# /setup-deploy — Configure Deployment for gstack
|
|
24
|
+
|
|
25
|
+
You are helping the user configure their deployment so `/land-and-deploy` works
|
|
26
|
+
automatically. Your job is to detect the deploy platform, production URL, health
|
|
27
|
+
checks, and deploy status commands — then persist everything to CLAUDE.md.
|
|
28
|
+
|
|
29
|
+
After this runs once, `/land-and-deploy` reads CLAUDE.md and skips detection entirely.
|
|
30
|
+
|
|
31
|
+
## User-invocable
|
|
32
|
+
When the user types `/setup-deploy`, run this skill.
|
|
33
|
+
|
|
34
|
+
## Instructions
|
|
35
|
+
|
|
36
|
+
### Step 1: Check existing configuration
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
grep -A 20 "## Deploy Configuration" CLAUDE.md 2>/dev/null || echo "NO_CONFIG"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
If configuration already exists, show it and ask:
|
|
43
|
+
|
|
44
|
+
- **Context:** Deploy configuration already exists in CLAUDE.md.
|
|
45
|
+
- **RECOMMENDATION:** Choose A to update if your setup changed.
|
|
46
|
+
- A) Reconfigure from scratch (overwrite existing)
|
|
47
|
+
- B) Edit specific fields (show current config, let me change one thing)
|
|
48
|
+
- C) Done — configuration looks correct
|
|
49
|
+
|
|
50
|
+
If the user picks C, stop.
|
|
51
|
+
|
|
52
|
+
### Step 2: Detect platform
|
|
53
|
+
|
|
54
|
+
Run the platform detection from the deploy bootstrap:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Platform config files
|
|
58
|
+
[ -f fly.toml ] && echo "PLATFORM:fly" && cat fly.toml
|
|
59
|
+
[ -f render.yaml ] && echo "PLATFORM:render" && cat render.yaml
|
|
60
|
+
[ -f vercel.json ] || [ -d .vercel ] && echo "PLATFORM:vercel"
|
|
61
|
+
[ -f netlify.toml ] && echo "PLATFORM:netlify" && cat netlify.toml
|
|
62
|
+
[ -f Procfile ] && echo "PLATFORM:heroku"
|
|
63
|
+
[ -f railway.json ] || [ -f railway.toml ] && echo "PLATFORM:railway"
|
|
64
|
+
|
|
65
|
+
# GitHub Actions deploy workflows
|
|
66
|
+
for f in .github/workflows/*.yml .github/workflows/*.yaml; do
|
|
67
|
+
[ -f "$f" ] && grep -qiE "deploy|release|production|staging|cd" "$f" 2>/dev/null && echo "DEPLOY_WORKFLOW:$f"
|
|
68
|
+
done
|
|
69
|
+
|
|
70
|
+
# Project type
|
|
71
|
+
[ -f package.json ] && grep -q '"bin"' package.json 2>/dev/null && echo "PROJECT_TYPE:cli"
|
|
72
|
+
ls *.gemspec 2>/dev/null && echo "PROJECT_TYPE:library"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Step 3: Platform-specific setup
|
|
76
|
+
|
|
77
|
+
Based on what was detected, guide the user through platform-specific configuration.
|
|
78
|
+
|
|
79
|
+
#### Fly.io
|
|
80
|
+
|
|
81
|
+
If `fly.toml` detected:
|
|
82
|
+
|
|
83
|
+
1. Extract app name: `grep -m1 "^app" fly.toml | sed 's/app = "\(.*\)"/\1/'`
|
|
84
|
+
2. Check if `fly` CLI is installed: `which fly 2>/dev/null`
|
|
85
|
+
3. If installed, verify: `fly status --app {app} 2>/dev/null`
|
|
86
|
+
4. Infer URL: `https://{app}.fly.dev`
|
|
87
|
+
5. Set deploy status command: `fly status --app {app}`
|
|
88
|
+
6. Set health check: `https://{app}.fly.dev` (or `/health` if the app has one)
|
|
89
|
+
|
|
90
|
+
Ask the user to confirm the production URL. Some Fly apps use custom domains.
|
|
91
|
+
|
|
92
|
+
#### Render
|
|
93
|
+
|
|
94
|
+
If `render.yaml` detected:
|
|
95
|
+
|
|
96
|
+
1. Extract service name and type from render.yaml
|
|
97
|
+
2. Check for Render API key: `echo $RENDER_API_KEY | head -c 4` (don't expose the full key)
|
|
98
|
+
3. Infer URL: `https://{service-name}.onrender.com`
|
|
99
|
+
4. Render deploys automatically on push to the connected branch — no deploy workflow needed
|
|
100
|
+
5. Set health check: the inferred URL
|
|
101
|
+
|
|
102
|
+
Ask the user to confirm. Render uses auto-deploy from the connected git branch — after
|
|
103
|
+
merge to main, Render picks it up automatically. The "deploy wait" in /land-and-deploy
|
|
104
|
+
should poll the Render URL until it responds with the new version.
|
|
105
|
+
|
|
106
|
+
#### Vercel
|
|
107
|
+
|
|
108
|
+
If vercel.json or .vercel detected:
|
|
109
|
+
|
|
110
|
+
1. Check for `vercel` CLI: `which vercel 2>/dev/null`
|
|
111
|
+
2. If installed: `vercel ls --prod 2>/dev/null | head -3`
|
|
112
|
+
3. Vercel deploys automatically on push — preview on PR, production on merge to main
|
|
113
|
+
4. Set health check: the production URL from vercel project settings
|
|
114
|
+
|
|
115
|
+
#### Netlify
|
|
116
|
+
|
|
117
|
+
If netlify.toml detected:
|
|
118
|
+
|
|
119
|
+
1. Extract site info from netlify.toml
|
|
120
|
+
2. Netlify deploys automatically on push
|
|
121
|
+
3. Set health check: the production URL
|
|
122
|
+
|
|
123
|
+
#### GitHub Actions only
|
|
124
|
+
|
|
125
|
+
If deploy workflows detected but no platform config:
|
|
126
|
+
|
|
127
|
+
1. Read the workflow file to understand what it does
|
|
128
|
+
2. Extract the deploy target (if mentioned)
|
|
129
|
+
3. Ask the user for the production URL
|
|
130
|
+
|
|
131
|
+
#### Custom / Manual
|
|
132
|
+
|
|
133
|
+
If nothing detected:
|
|
134
|
+
|
|
135
|
+
Use AskUserQuestion to gather the information:
|
|
136
|
+
|
|
137
|
+
1. **How are deploys triggered?**
|
|
138
|
+
- A) Automatically on push to main (Fly, Render, Vercel, Netlify, etc.)
|
|
139
|
+
- B) Via GitHub Actions workflow
|
|
140
|
+
- C) Via a deploy script or CLI command (describe it)
|
|
141
|
+
- D) Manually (SSH, dashboard, etc.)
|
|
142
|
+
- E) This project doesn't deploy (library, CLI, tool)
|
|
143
|
+
|
|
144
|
+
2. **What's the production URL?** (Free text — the URL where the app runs)
|
|
145
|
+
|
|
146
|
+
3. **How can gstack check if a deploy succeeded?**
|
|
147
|
+
- A) HTTP health check at a specific URL (e.g., /health, /api/status)
|
|
148
|
+
- B) CLI command (e.g., `fly status`, `kubectl rollout status`)
|
|
149
|
+
- C) Check the GitHub Actions workflow status
|
|
150
|
+
- D) No automated way — just check the URL loads
|
|
151
|
+
|
|
152
|
+
4. **Any pre-merge or post-merge hooks?**
|
|
153
|
+
- Commands to run before merging (e.g., `bun run build`)
|
|
154
|
+
- Commands to run after merge but before deploy verification
|
|
155
|
+
|
|
156
|
+
### Step 4: Write configuration
|
|
157
|
+
|
|
158
|
+
Read CLAUDE.md (or create it). Find and replace the `## Deploy Configuration` section
|
|
159
|
+
if it exists, or append it at the end.
|
|
160
|
+
|
|
161
|
+
```markdown
|
|
162
|
+
## Deploy Configuration (configured by /setup-deploy)
|
|
163
|
+
- Platform: {platform}
|
|
164
|
+
- Production URL: {url}
|
|
165
|
+
- Deploy workflow: {workflow file or "auto-deploy on push"}
|
|
166
|
+
- Deploy status command: {command or "HTTP health check"}
|
|
167
|
+
- Merge method: {squash/merge/rebase}
|
|
168
|
+
- Project type: {web app / API / CLI / library}
|
|
169
|
+
- Post-deploy health check: {health check URL or command}
|
|
170
|
+
|
|
171
|
+
### Custom deploy hooks
|
|
172
|
+
- Pre-merge: {command or "none"}
|
|
173
|
+
- Deploy trigger: {command or "automatic on push to main"}
|
|
174
|
+
- Deploy status: {command or "poll production URL"}
|
|
175
|
+
- Health check: {URL or command}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Step 5: Verify
|
|
179
|
+
|
|
180
|
+
After writing, verify the configuration works:
|
|
181
|
+
|
|
182
|
+
1. If a health check URL was configured, try it:
|
|
183
|
+
```bash
|
|
184
|
+
curl -sf "{health-check-url}" -o /dev/null -w "%{http_code}" 2>/dev/null || echo "UNREACHABLE"
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
2. If a deploy status command was configured, try it:
|
|
188
|
+
```bash
|
|
189
|
+
{deploy-status-command} 2>/dev/null | head -5 || echo "COMMAND_FAILED"
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Report results. If anything failed, note it but don't block — the config is still
|
|
193
|
+
useful even if the health check is temporarily unreachable.
|
|
194
|
+
|
|
195
|
+
### Step 6: Summary
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
DEPLOY CONFIGURATION — COMPLETE
|
|
199
|
+
════════════════════════════════
|
|
200
|
+
Platform: {platform}
|
|
201
|
+
URL: {url}
|
|
202
|
+
Health check: {health check}
|
|
203
|
+
Status cmd: {status command}
|
|
204
|
+
Merge method: {merge method}
|
|
205
|
+
|
|
206
|
+
Saved to CLAUDE.md. /land-and-deploy will use these settings automatically.
|
|
207
|
+
|
|
208
|
+
Next steps:
|
|
209
|
+
- Run /land-and-deploy to merge and deploy your current PR
|
|
210
|
+
- Edit the "## Deploy Configuration" section in CLAUDE.md to change settings
|
|
211
|
+
- Run /setup-deploy again to reconfigure
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
## Important Rules
|
|
215
|
+
|
|
216
|
+
- **Never expose secrets.** Don't print full API keys, tokens, or passwords.
|
|
217
|
+
- **Confirm with the user.** Always show the detected config and ask for confirmation before writing.
|
|
218
|
+
- **CLAUDE.md is the source of truth.** All configuration lives there — not in a separate config file.
|
|
219
|
+
- **Idempotent.** Running /setup-deploy multiple times overwrites the previous config cleanly.
|
|
220
|
+
- **Platform CLIs are optional.** If `fly` or `vercel` CLI isn't installed, fall back to URL-based health checks.
|