@runchr/gstack-antigravity 0.1.0 → 0.1.2

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.

Files changed (231) hide show
  1. package/.agents/skills/gstack/.agents/skills/gstack/SKILL.md +651 -0
  2. package/.agents/skills/gstack/.agents/skills/gstack-autoplan/SKILL.md +678 -0
  3. package/.agents/skills/gstack/.agents/skills/gstack-benchmark/SKILL.md +482 -0
  4. package/.agents/skills/gstack/.agents/skills/gstack-browse/SKILL.md +511 -0
  5. package/.agents/skills/gstack/.agents/skills/gstack-canary/SKILL.md +486 -0
  6. package/.agents/skills/gstack/.agents/skills/gstack-careful/SKILL.md +50 -0
  7. package/.agents/skills/gstack/.agents/skills/gstack-cso/SKILL.md +607 -0
  8. package/.agents/skills/gstack/.agents/skills/gstack-design-consultation/SKILL.md +615 -0
  9. package/.agents/skills/gstack/.agents/skills/gstack-design-review/SKILL.md +988 -0
  10. package/.agents/skills/gstack/.agents/skills/gstack-document-release/SKILL.md +604 -0
  11. package/.agents/skills/gstack/.agents/skills/gstack-freeze/SKILL.md +67 -0
  12. package/.agents/skills/gstack/.agents/skills/gstack-guard/SKILL.md +62 -0
  13. package/.agents/skills/gstack/.agents/skills/gstack-investigate/SKILL.md +415 -0
  14. package/.agents/skills/gstack/.agents/skills/gstack-land-and-deploy/SKILL.md +873 -0
  15. package/.agents/skills/gstack/.agents/skills/gstack-office-hours/SKILL.md +986 -0
  16. package/.agents/skills/gstack/.agents/skills/gstack-plan-ceo-review/SKILL.md +1268 -0
  17. package/.agents/skills/gstack/.agents/skills/gstack-plan-design-review/SKILL.md +668 -0
  18. package/.agents/skills/gstack/.agents/skills/gstack-plan-eng-review/SKILL.md +826 -0
  19. package/.agents/skills/gstack/.agents/skills/gstack-qa/SKILL.md +1006 -0
  20. package/.agents/skills/gstack/.agents/skills/gstack-qa-only/SKILL.md +626 -0
  21. package/.agents/skills/gstack/.agents/skills/gstack-retro/SKILL.md +1065 -0
  22. package/.agents/skills/gstack/.agents/skills/gstack-review/SKILL.md +704 -0
  23. package/.agents/skills/gstack/.agents/skills/gstack-setup-browser-cookies/SKILL.md +325 -0
  24. package/.agents/skills/gstack/.agents/skills/gstack-setup-deploy/SKILL.md +450 -0
  25. package/.agents/skills/gstack/.agents/skills/gstack-ship/SKILL.md +1312 -0
  26. package/.agents/skills/gstack/.agents/skills/gstack-unfreeze/SKILL.md +36 -0
  27. package/.agents/skills/gstack/.agents/skills/gstack-upgrade/SKILL.md +220 -0
  28. package/.agents/skills/gstack/.env.example +5 -0
  29. package/.agents/skills/gstack/.github/workflows/skill-docs.yml +17 -0
  30. package/.agents/skills/gstack/AGENTS.md +49 -0
  31. package/.agents/skills/gstack/ARCHITECTURE.md +359 -0
  32. package/.agents/skills/gstack/BROWSER.md +271 -0
  33. package/.agents/skills/gstack/CHANGELOG.md +800 -0
  34. package/.agents/skills/gstack/CLAUDE.md +284 -0
  35. package/.agents/skills/gstack/CONTRIBUTING.md +370 -0
  36. package/.agents/skills/gstack/ETHOS.md +129 -0
  37. package/.agents/skills/gstack/LICENSE +21 -0
  38. package/.agents/skills/gstack/README.md +228 -0
  39. package/.agents/skills/gstack/SKILL.md +657 -0
  40. package/.agents/skills/gstack/SKILL.md.tmpl +281 -0
  41. package/.agents/skills/gstack/TODOS.md +564 -0
  42. package/.agents/skills/gstack/VERSION +1 -0
  43. package/.agents/skills/gstack/autoplan/SKILL.md +689 -0
  44. package/.agents/skills/gstack/autoplan/SKILL.md.tmpl +416 -0
  45. package/.agents/skills/gstack/benchmark/SKILL.md +489 -0
  46. package/.agents/skills/gstack/benchmark/SKILL.md.tmpl +233 -0
  47. package/.agents/skills/gstack/bin/dev-setup +68 -0
  48. package/.agents/skills/gstack/bin/dev-teardown +56 -0
  49. package/.agents/skills/gstack/bin/gstack-analytics +191 -0
  50. package/.agents/skills/gstack/bin/gstack-community-dashboard +113 -0
  51. package/.agents/skills/gstack/bin/gstack-config +38 -0
  52. package/.agents/skills/gstack/bin/gstack-diff-scope +71 -0
  53. package/.agents/skills/gstack/bin/gstack-global-discover.ts +591 -0
  54. package/.agents/skills/gstack/bin/gstack-repo-mode +93 -0
  55. package/.agents/skills/gstack/bin/gstack-review-log +9 -0
  56. package/.agents/skills/gstack/bin/gstack-review-read +12 -0
  57. package/.agents/skills/gstack/bin/gstack-slug +15 -0
  58. package/.agents/skills/gstack/bin/gstack-telemetry-log +158 -0
  59. package/.agents/skills/gstack/bin/gstack-telemetry-sync +127 -0
  60. package/.agents/skills/gstack/bin/gstack-update-check +196 -0
  61. package/.agents/skills/gstack/browse/SKILL.md +517 -0
  62. package/.agents/skills/gstack/browse/SKILL.md.tmpl +141 -0
  63. package/.agents/skills/gstack/browse/bin/find-browse +21 -0
  64. package/.agents/skills/gstack/browse/bin/remote-slug +14 -0
  65. package/.agents/skills/gstack/browse/scripts/build-node-server.sh +48 -0
  66. package/.agents/skills/gstack/browse/src/browser-manager.ts +634 -0
  67. package/.agents/skills/gstack/browse/src/buffers.ts +137 -0
  68. package/.agents/skills/gstack/browse/src/bun-polyfill.cjs +109 -0
  69. package/.agents/skills/gstack/browse/src/cli.ts +420 -0
  70. package/.agents/skills/gstack/browse/src/commands.ts +111 -0
  71. package/.agents/skills/gstack/browse/src/config.ts +150 -0
  72. package/.agents/skills/gstack/browse/src/cookie-import-browser.ts +417 -0
  73. package/.agents/skills/gstack/browse/src/cookie-picker-routes.ts +207 -0
  74. package/.agents/skills/gstack/browse/src/cookie-picker-ui.ts +541 -0
  75. package/.agents/skills/gstack/browse/src/find-browse.ts +61 -0
  76. package/.agents/skills/gstack/browse/src/meta-commands.ts +269 -0
  77. package/.agents/skills/gstack/browse/src/platform.ts +17 -0
  78. package/.agents/skills/gstack/browse/src/read-commands.ts +335 -0
  79. package/.agents/skills/gstack/browse/src/server.ts +369 -0
  80. package/.agents/skills/gstack/browse/src/snapshot.ts +398 -0
  81. package/.agents/skills/gstack/browse/src/url-validation.ts +91 -0
  82. package/.agents/skills/gstack/browse/src/write-commands.ts +352 -0
  83. package/.agents/skills/gstack/browse/test/bun-polyfill.test.ts +72 -0
  84. package/.agents/skills/gstack/browse/test/commands.test.ts +1836 -0
  85. package/.agents/skills/gstack/browse/test/config.test.ts +250 -0
  86. package/.agents/skills/gstack/browse/test/cookie-import-browser.test.ts +397 -0
  87. package/.agents/skills/gstack/browse/test/cookie-picker-routes.test.ts +205 -0
  88. package/.agents/skills/gstack/browse/test/find-browse.test.ts +50 -0
  89. package/.agents/skills/gstack/browse/test/fixtures/basic.html +33 -0
  90. package/.agents/skills/gstack/browse/test/fixtures/cursor-interactive.html +22 -0
  91. package/.agents/skills/gstack/browse/test/fixtures/dialog.html +15 -0
  92. package/.agents/skills/gstack/browse/test/fixtures/empty.html +2 -0
  93. package/.agents/skills/gstack/browse/test/fixtures/forms.html +55 -0
  94. package/.agents/skills/gstack/browse/test/fixtures/qa-eval-checkout.html +108 -0
  95. package/.agents/skills/gstack/browse/test/fixtures/qa-eval-spa.html +98 -0
  96. package/.agents/skills/gstack/browse/test/fixtures/qa-eval.html +51 -0
  97. package/.agents/skills/gstack/browse/test/fixtures/responsive.html +49 -0
  98. package/.agents/skills/gstack/browse/test/fixtures/snapshot.html +55 -0
  99. package/.agents/skills/gstack/browse/test/fixtures/spa.html +24 -0
  100. package/.agents/skills/gstack/browse/test/fixtures/states.html +17 -0
  101. package/.agents/skills/gstack/browse/test/fixtures/upload.html +25 -0
  102. package/.agents/skills/gstack/browse/test/gstack-config.test.ts +125 -0
  103. package/.agents/skills/gstack/browse/test/gstack-update-check.test.ts +467 -0
  104. package/.agents/skills/gstack/browse/test/handoff.test.ts +235 -0
  105. package/.agents/skills/gstack/browse/test/path-validation.test.ts +63 -0
  106. package/.agents/skills/gstack/browse/test/platform.test.ts +37 -0
  107. package/.agents/skills/gstack/browse/test/snapshot.test.ts +467 -0
  108. package/.agents/skills/gstack/browse/test/test-server.ts +57 -0
  109. package/.agents/skills/gstack/browse/test/url-validation.test.ts +72 -0
  110. package/.agents/skills/gstack/canary/SKILL.md +493 -0
  111. package/.agents/skills/gstack/canary/SKILL.md.tmpl +220 -0
  112. package/.agents/skills/gstack/careful/SKILL.md +59 -0
  113. package/.agents/skills/gstack/careful/SKILL.md.tmpl +57 -0
  114. package/.agents/skills/gstack/careful/bin/check-careful.sh +112 -0
  115. package/.agents/skills/gstack/codex/SKILL.md +677 -0
  116. package/.agents/skills/gstack/codex/SKILL.md.tmpl +356 -0
  117. package/.agents/skills/gstack/conductor.json +6 -0
  118. package/.agents/skills/gstack/cso/SKILL.md +615 -0
  119. package/.agents/skills/gstack/cso/SKILL.md.tmpl +376 -0
  120. package/.agents/skills/gstack/design-consultation/SKILL.md +625 -0
  121. package/.agents/skills/gstack/design-consultation/SKILL.md.tmpl +369 -0
  122. package/.agents/skills/gstack/design-review/SKILL.md +998 -0
  123. package/.agents/skills/gstack/design-review/SKILL.md.tmpl +262 -0
  124. package/.agents/skills/gstack/docs/images/github-2013.png +0 -0
  125. package/.agents/skills/gstack/docs/images/github-2026.png +0 -0
  126. package/.agents/skills/gstack/docs/skills.md +877 -0
  127. package/.agents/skills/gstack/document-release/SKILL.md +613 -0
  128. package/.agents/skills/gstack/document-release/SKILL.md.tmpl +357 -0
  129. package/.agents/skills/gstack/freeze/SKILL.md +82 -0
  130. package/.agents/skills/gstack/freeze/SKILL.md.tmpl +80 -0
  131. package/.agents/skills/gstack/freeze/bin/check-freeze.sh +68 -0
  132. package/.agents/skills/gstack/gstack-upgrade/SKILL.md +226 -0
  133. package/.agents/skills/gstack/gstack-upgrade/SKILL.md.tmpl +224 -0
  134. package/.agents/skills/gstack/guard/SKILL.md +82 -0
  135. package/.agents/skills/gstack/guard/SKILL.md.tmpl +80 -0
  136. package/.agents/skills/gstack/investigate/SKILL.md +435 -0
  137. package/.agents/skills/gstack/investigate/SKILL.md.tmpl +196 -0
  138. package/.agents/skills/gstack/land-and-deploy/SKILL.md +880 -0
  139. package/.agents/skills/gstack/land-and-deploy/SKILL.md.tmpl +575 -0
  140. package/.agents/skills/gstack/office-hours/SKILL.md +996 -0
  141. package/.agents/skills/gstack/office-hours/SKILL.md.tmpl +624 -0
  142. package/.agents/skills/gstack/package.json +55 -0
  143. package/.agents/skills/gstack/plan-ceo-review/SKILL.md +1277 -0
  144. package/.agents/skills/gstack/plan-ceo-review/SKILL.md.tmpl +838 -0
  145. package/.agents/skills/gstack/plan-design-review/SKILL.md +676 -0
  146. package/.agents/skills/gstack/plan-design-review/SKILL.md.tmpl +314 -0
  147. package/.agents/skills/gstack/plan-eng-review/SKILL.md +836 -0
  148. package/.agents/skills/gstack/plan-eng-review/SKILL.md.tmpl +279 -0
  149. package/.agents/skills/gstack/qa/SKILL.md +1016 -0
  150. package/.agents/skills/gstack/qa/SKILL.md.tmpl +316 -0
  151. package/.agents/skills/gstack/qa/references/issue-taxonomy.md +85 -0
  152. package/.agents/skills/gstack/qa/templates/qa-report-template.md +126 -0
  153. package/.agents/skills/gstack/qa-only/SKILL.md +633 -0
  154. package/.agents/skills/gstack/qa-only/SKILL.md.tmpl +101 -0
  155. package/.agents/skills/gstack/retro/SKILL.md +1072 -0
  156. package/.agents/skills/gstack/retro/SKILL.md.tmpl +833 -0
  157. package/.agents/skills/gstack/review/SKILL.md +849 -0
  158. package/.agents/skills/gstack/review/SKILL.md.tmpl +259 -0
  159. package/.agents/skills/gstack/review/TODOS-format.md +62 -0
  160. package/.agents/skills/gstack/review/checklist.md +190 -0
  161. package/.agents/skills/gstack/review/design-checklist.md +132 -0
  162. package/.agents/skills/gstack/review/greptile-triage.md +220 -0
  163. package/.agents/skills/gstack/scripts/analytics.ts +190 -0
  164. package/.agents/skills/gstack/scripts/dev-skill.ts +82 -0
  165. package/.agents/skills/gstack/scripts/eval-compare.ts +96 -0
  166. package/.agents/skills/gstack/scripts/eval-list.ts +116 -0
  167. package/.agents/skills/gstack/scripts/eval-select.ts +86 -0
  168. package/.agents/skills/gstack/scripts/eval-summary.ts +187 -0
  169. package/.agents/skills/gstack/scripts/eval-watch.ts +172 -0
  170. package/.agents/skills/gstack/scripts/gen-skill-docs.ts +2414 -0
  171. package/.agents/skills/gstack/scripts/skill-check.ts +167 -0
  172. package/.agents/skills/gstack/setup +269 -0
  173. package/.agents/skills/gstack/setup-browser-cookies/SKILL.md +330 -0
  174. package/.agents/skills/gstack/setup-browser-cookies/SKILL.md.tmpl +74 -0
  175. package/.agents/skills/gstack/setup-deploy/SKILL.md +459 -0
  176. package/.agents/skills/gstack/setup-deploy/SKILL.md.tmpl +220 -0
  177. package/.agents/skills/gstack/ship/SKILL.md +1457 -0
  178. package/.agents/skills/gstack/ship/SKILL.md.tmpl +528 -0
  179. package/.agents/skills/gstack/supabase/config.sh +10 -0
  180. package/.agents/skills/gstack/supabase/functions/community-pulse/index.ts +59 -0
  181. package/.agents/skills/gstack/supabase/functions/telemetry-ingest/index.ts +135 -0
  182. package/.agents/skills/gstack/supabase/functions/update-check/index.ts +37 -0
  183. package/.agents/skills/gstack/supabase/migrations/001_telemetry.sql +89 -0
  184. package/.agents/skills/gstack/test/analytics.test.ts +277 -0
  185. package/.agents/skills/gstack/test/codex-e2e.test.ts +197 -0
  186. package/.agents/skills/gstack/test/fixtures/coverage-audit-fixture.ts +76 -0
  187. package/.agents/skills/gstack/test/fixtures/eval-baselines.json +7 -0
  188. package/.agents/skills/gstack/test/fixtures/qa-eval-checkout-ground-truth.json +43 -0
  189. package/.agents/skills/gstack/test/fixtures/qa-eval-ground-truth.json +43 -0
  190. package/.agents/skills/gstack/test/fixtures/qa-eval-spa-ground-truth.json +43 -0
  191. package/.agents/skills/gstack/test/fixtures/review-eval-design-slop.css +86 -0
  192. package/.agents/skills/gstack/test/fixtures/review-eval-design-slop.html +41 -0
  193. package/.agents/skills/gstack/test/fixtures/review-eval-enum-diff.rb +30 -0
  194. package/.agents/skills/gstack/test/fixtures/review-eval-enum.rb +27 -0
  195. package/.agents/skills/gstack/test/fixtures/review-eval-vuln.rb +14 -0
  196. package/.agents/skills/gstack/test/gemini-e2e.test.ts +173 -0
  197. package/.agents/skills/gstack/test/gen-skill-docs.test.ts +1049 -0
  198. package/.agents/skills/gstack/test/global-discover.test.ts +187 -0
  199. package/.agents/skills/gstack/test/helpers/codex-session-runner.ts +282 -0
  200. package/.agents/skills/gstack/test/helpers/e2e-helpers.ts +239 -0
  201. package/.agents/skills/gstack/test/helpers/eval-store.test.ts +548 -0
  202. package/.agents/skills/gstack/test/helpers/eval-store.ts +689 -0
  203. package/.agents/skills/gstack/test/helpers/gemini-session-runner.test.ts +104 -0
  204. package/.agents/skills/gstack/test/helpers/gemini-session-runner.ts +201 -0
  205. package/.agents/skills/gstack/test/helpers/llm-judge.ts +130 -0
  206. package/.agents/skills/gstack/test/helpers/observability.test.ts +283 -0
  207. package/.agents/skills/gstack/test/helpers/session-runner.test.ts +96 -0
  208. package/.agents/skills/gstack/test/helpers/session-runner.ts +357 -0
  209. package/.agents/skills/gstack/test/helpers/skill-parser.ts +206 -0
  210. package/.agents/skills/gstack/test/helpers/touchfiles.ts +260 -0
  211. package/.agents/skills/gstack/test/hook-scripts.test.ts +373 -0
  212. package/.agents/skills/gstack/test/skill-e2e-browse.test.ts +293 -0
  213. package/.agents/skills/gstack/test/skill-e2e-deploy.test.ts +279 -0
  214. package/.agents/skills/gstack/test/skill-e2e-design.test.ts +614 -0
  215. package/.agents/skills/gstack/test/skill-e2e-plan.test.ts +538 -0
  216. package/.agents/skills/gstack/test/skill-e2e-qa-bugs.test.ts +194 -0
  217. package/.agents/skills/gstack/test/skill-e2e-qa-workflow.test.ts +412 -0
  218. package/.agents/skills/gstack/test/skill-e2e-review.test.ts +535 -0
  219. package/.agents/skills/gstack/test/skill-e2e-workflow.test.ts +586 -0
  220. package/.agents/skills/gstack/test/skill-e2e.test.ts +3325 -0
  221. package/.agents/skills/gstack/test/skill-llm-eval.test.ts +787 -0
  222. package/.agents/skills/gstack/test/skill-parser.test.ts +179 -0
  223. package/.agents/skills/gstack/test/skill-routing-e2e.test.ts +605 -0
  224. package/.agents/skills/gstack/test/skill-validation.test.ts +1520 -0
  225. package/.agents/skills/gstack/test/telemetry.test.ts +278 -0
  226. package/.agents/skills/gstack/test/touchfiles.test.ts +262 -0
  227. package/.agents/skills/gstack/unfreeze/SKILL.md +40 -0
  228. package/.agents/skills/gstack/unfreeze/SKILL.md.tmpl +38 -0
  229. package/README.md +12 -7
  230. package/README_KO.md +12 -6
  231. package/package.json +3 -2
@@ -0,0 +1,575 @@
1
+ ---
2
+ name: land-and-deploy
3
+ version: 1.0.0
4
+ description: |
5
+ Land and deploy workflow. Merges the PR, waits for CI and deploy,
6
+ verifies production health via canary checks. Takes over after /ship
7
+ creates the PR. Use when: "merge", "land", "deploy", "merge and verify",
8
+ "land it", "ship it to production".
9
+ allowed-tools:
10
+ - Bash
11
+ - Read
12
+ - Write
13
+ - Glob
14
+ - AskUserQuestion
15
+ ---
16
+
17
+ {{PREAMBLE}}
18
+
19
+ {{BROWSE_SETUP}}
20
+
21
+ {{BASE_BRANCH_DETECT}}
22
+
23
+ # /land-and-deploy — Merge, Deploy, Verify
24
+
25
+ You are a **Release Engineer** who has deployed to production thousands of times. You know the two worst feelings in software: the merge that breaks prod, and the merge that sits in queue for 45 minutes while you stare at the screen. Your job is to handle both gracefully — merge efficiently, wait intelligently, verify thoroughly, and give the user a clear verdict.
26
+
27
+ This skill picks up where `/ship` left off. `/ship` creates the PR. You merge it, wait for deploy, and verify production.
28
+
29
+ ## User-invocable
30
+ When the user types `/land-and-deploy`, run this skill.
31
+
32
+ ## Arguments
33
+ - `/land-and-deploy` — auto-detect PR from current branch, no post-deploy URL
34
+ - `/land-and-deploy <url>` — auto-detect PR, verify deploy at this URL
35
+ - `/land-and-deploy #123` — specific PR number
36
+ - `/land-and-deploy #123 <url>` — specific PR + verification URL
37
+
38
+ ## Non-interactive philosophy (like /ship) — with one critical gate
39
+
40
+ This is a **mostly automated** workflow. Do NOT ask for confirmation at any step except
41
+ the ones listed below. The user said `/land-and-deploy` which means DO IT — but verify
42
+ readiness first.
43
+
44
+ **Always stop for:**
45
+ - **Pre-merge readiness gate (Step 3.5)** — this is the ONE confirmation before merge
46
+ - GitHub CLI not authenticated
47
+ - No PR found for this branch
48
+ - CI failures or merge conflicts
49
+ - Permission denied on merge
50
+ - Deploy workflow failure (offer revert)
51
+ - Production health issues detected by canary (offer revert)
52
+
53
+ **Never stop for:**
54
+ - Choosing merge method (auto-detect from repo settings)
55
+ - Timeout warnings (warn and continue gracefully)
56
+
57
+ ---
58
+
59
+ ## Step 1: Pre-flight
60
+
61
+ 1. Check GitHub CLI authentication:
62
+ ```bash
63
+ gh auth status
64
+ ```
65
+ If not authenticated, **STOP**: "GitHub CLI is not authenticated. Run `gh auth login` first."
66
+
67
+ 2. Parse arguments. If the user specified `#NNN`, use that PR number. If a URL was provided, save it for canary verification in Step 7.
68
+
69
+ 3. If no PR number specified, detect from current branch:
70
+ ```bash
71
+ gh pr view --json number,state,title,url,mergeStateStatus,mergeable,baseRefName,headRefName
72
+ ```
73
+
74
+ 4. Validate the PR state:
75
+ - If no PR exists: **STOP.** "No PR found for this branch. Run `/ship` first to create one."
76
+ - If `state` is `MERGED`: "PR is already merged. Nothing to do."
77
+ - If `state` is `CLOSED`: "PR is closed (not merged). Reopen it first."
78
+ - If `state` is `OPEN`: continue.
79
+
80
+ ---
81
+
82
+ ## Step 2: Pre-merge checks
83
+
84
+ Check CI status and merge readiness:
85
+
86
+ ```bash
87
+ gh pr checks --json name,state,status,conclusion
88
+ ```
89
+
90
+ Parse the output:
91
+ 1. If any required checks are **FAILING**: **STOP.** Show the failing checks.
92
+ 2. If required checks are **PENDING**: proceed to Step 3.
93
+ 3. If all checks pass (or no required checks): skip Step 3, go to Step 4.
94
+
95
+ Also check for merge conflicts:
96
+ ```bash
97
+ gh pr view --json mergeable -q .mergeable
98
+ ```
99
+ If `CONFLICTING`: **STOP.** "PR has merge conflicts. Resolve them and push before landing."
100
+
101
+ ---
102
+
103
+ ## Step 3: Wait for CI (if pending)
104
+
105
+ If required checks are still pending, wait for them to complete. Use a timeout of 15 minutes:
106
+
107
+ ```bash
108
+ gh pr checks --watch --fail-fast
109
+ ```
110
+
111
+ Record the CI wait time for the deploy report.
112
+
113
+ If CI passes within the timeout: continue to Step 4.
114
+ If CI fails: **STOP.** Show failures.
115
+ If timeout (15 min): **STOP.** "CI has been running for 15 minutes. Investigate manually."
116
+
117
+ ---
118
+
119
+ ## Step 3.5: Pre-merge readiness gate
120
+
121
+ **This is the critical safety check before an irreversible merge.** The merge cannot
122
+ be undone without a revert commit. Gather ALL evidence, build a readiness report,
123
+ and get explicit user confirmation before proceeding.
124
+
125
+ Collect evidence for each check below. Track warnings (yellow) and blockers (red).
126
+
127
+ ### 3.5a: Review staleness check
128
+
129
+ ```bash
130
+ ~/.claude/skills/gstack/bin/gstack-review-read 2>/dev/null
131
+ ```
132
+
133
+ Parse the output. For each review skill (plan-eng-review, plan-ceo-review,
134
+ plan-design-review, design-review-lite, codex-review):
135
+
136
+ 1. Find the most recent entry within the last 7 days.
137
+ 2. Extract its `commit` field.
138
+ 3. Compare against current HEAD: `git rev-list --count STORED_COMMIT..HEAD`
139
+
140
+ **Staleness rules:**
141
+ - 0 commits since review → CURRENT
142
+ - 1-3 commits since review → RECENT (yellow if those commits touch code, not just docs)
143
+ - 4+ commits since review → STALE (red — review may not reflect current code)
144
+ - No review found → NOT RUN
145
+
146
+ **Critical check:** Look at what changed AFTER the last review. Run:
147
+ ```bash
148
+ git log --oneline STORED_COMMIT..HEAD
149
+ ```
150
+ If any commits after the review contain words like "fix", "refactor", "rewrite",
151
+ "overhaul", or touch more than 5 files — flag as **STALE (significant changes
152
+ since review)**. The review was done on different code than what's about to merge.
153
+
154
+ ### 3.5b: Test results
155
+
156
+ **Free tests — run them now:**
157
+
158
+ Read CLAUDE.md to find the project's test command. If not specified, use `bun test`.
159
+ Run the test command and capture the exit code and output.
160
+
161
+ ```bash
162
+ bun test 2>&1 | tail -10
163
+ ```
164
+
165
+ If tests fail: **BLOCKER.** Cannot merge with failing tests.
166
+
167
+ **E2E tests — check recent results:**
168
+
169
+ ```bash
170
+ ls -t ~/.gstack-dev/evals/*-e2e-*-$(date +%Y-%m-%d)*.json 2>/dev/null | head -20
171
+ ```
172
+
173
+ For each eval file from today, parse pass/fail counts. Show:
174
+ - Total tests, pass count, fail count
175
+ - How long ago the run finished (from file timestamp)
176
+ - Total cost
177
+ - Names of any failing tests
178
+
179
+ If no E2E results from today: **WARNING — no E2E tests run today.**
180
+ If E2E results exist but have failures: **WARNING — N tests failed.** List them.
181
+
182
+ **LLM judge evals — check recent results:**
183
+
184
+ ```bash
185
+ ls -t ~/.gstack-dev/evals/*-llm-judge-*-$(date +%Y-%m-%d)*.json 2>/dev/null | head -5
186
+ ```
187
+
188
+ If found, parse and show pass/fail. If not found, note "No LLM evals run today."
189
+
190
+ ### 3.5c: PR body accuracy check
191
+
192
+ Read the current PR body:
193
+ ```bash
194
+ gh pr view --json body -q .body
195
+ ```
196
+
197
+ Read the current diff summary:
198
+ ```bash
199
+ git log --oneline $(gh pr view --json baseRefName -q .baseRefName 2>/dev/null || echo main)..HEAD | head -20
200
+ ```
201
+
202
+ Compare the PR body against the actual commits. Check for:
203
+ 1. **Missing features** — commits that add significant functionality not mentioned in the PR
204
+ 2. **Stale descriptions** — PR body mentions things that were later changed or reverted
205
+ 3. **Wrong version** — PR title or body references a version that doesn't match VERSION file
206
+
207
+ If the PR body looks stale or incomplete: **WARNING — PR body may not reflect current
208
+ changes.** List what's missing or stale.
209
+
210
+ ### 3.5d: Document-release check
211
+
212
+ Check if documentation was updated on this branch:
213
+
214
+ ```bash
215
+ git log --oneline --all-match --grep="docs:" $(gh pr view --json baseRefName -q .baseRefName 2>/dev/null || echo main)..HEAD | head -5
216
+ ```
217
+
218
+ Also check if key doc files were modified:
219
+ ```bash
220
+ git diff --name-only $(gh pr view --json baseRefName -q .baseRefName 2>/dev/null || echo main)...HEAD -- README.md CHANGELOG.md ARCHITECTURE.md CONTRIBUTING.md CLAUDE.md VERSION
221
+ ```
222
+
223
+ If CHANGELOG.md and VERSION were NOT modified on this branch and the diff includes
224
+ new features (new files, new commands, new skills): **WARNING — /document-release
225
+ likely not run. CHANGELOG and VERSION not updated despite new features.**
226
+
227
+ If only docs changed (no code): skip this check.
228
+
229
+ ### 3.5e: Readiness report and confirmation
230
+
231
+ Build the full readiness report:
232
+
233
+ ```
234
+ ╔══════════════════════════════════════════════════════════╗
235
+ ║ PRE-MERGE READINESS REPORT ║
236
+ ╠══════════════════════════════════════════════════════════╣
237
+ ║ ║
238
+ ║ PR: #NNN — title ║
239
+ ║ Branch: feature → main ║
240
+ ║ ║
241
+ ║ REVIEWS ║
242
+ ║ ├─ Eng Review: CURRENT / STALE (N commits) / — ║
243
+ ║ ├─ CEO Review: CURRENT / — (optional) ║
244
+ ║ ├─ Design Review: CURRENT / — (optional) ║
245
+ ║ └─ Codex Review: CURRENT / — (optional) ║
246
+ ║ ║
247
+ ║ TESTS ║
248
+ ║ ├─ Free tests: PASS / FAIL (blocker) ║
249
+ ║ ├─ E2E tests: 52/52 pass (25 min ago) / NOT RUN ║
250
+ ║ └─ LLM evals: PASS / NOT RUN ║
251
+ ║ ║
252
+ ║ DOCUMENTATION ║
253
+ ║ ├─ CHANGELOG: Updated / NOT UPDATED (warning) ║
254
+ ║ ├─ VERSION: 0.9.8.0 / NOT BUMPED (warning) ║
255
+ ║ └─ Doc release: Run / NOT RUN (warning) ║
256
+ ║ ║
257
+ ║ PR BODY ║
258
+ ║ └─ Accuracy: Current / STALE (warning) ║
259
+ ║ ║
260
+ ║ WARNINGS: N | BLOCKERS: N ║
261
+ ╚══════════════════════════════════════════════════════════╝
262
+ ```
263
+
264
+ If there are BLOCKERS (failing free tests): list them and recommend B.
265
+ If there are WARNINGS but no blockers: list each warning and recommend A if
266
+ warnings are minor, or B if warnings are significant.
267
+ If everything is green: recommend A.
268
+
269
+ Use AskUserQuestion:
270
+
271
+ - **Re-ground:** "About to merge PR #NNN (title) from branch X to Y. Here's the
272
+ readiness report." Show the report above.
273
+ - List each warning and blocker explicitly.
274
+ - **RECOMMENDATION:** Choose A if green. Choose B if there are significant warnings.
275
+ Choose C only if the user understands the risks.
276
+ - A) Merge — readiness checks passed (Completeness: 10/10)
277
+ - B) Don't merge yet — address the warnings first (Completeness: 10/10)
278
+ - C) Merge anyway — I understand the risks (Completeness: 3/10)
279
+
280
+ If the user chooses B: **STOP.** List exactly what needs to be done:
281
+ - If reviews are stale: "Re-run /plan-eng-review (or /review) to review current code."
282
+ - If E2E not run: "Run `bun run test:e2e` to verify."
283
+ - If docs not updated: "Run /document-release to update documentation."
284
+ - If PR body stale: "Update the PR body to reflect current changes."
285
+
286
+ If the user chooses A or C: continue to Step 4.
287
+
288
+ ---
289
+
290
+ ## Step 4: Merge the PR
291
+
292
+ Record the start timestamp for timing data.
293
+
294
+ Try auto-merge first (respects repo merge settings and merge queues):
295
+
296
+ ```bash
297
+ gh pr merge --auto --delete-branch
298
+ ```
299
+
300
+ If `--auto` is not available (repo doesn't have auto-merge enabled), merge directly:
301
+
302
+ ```bash
303
+ gh pr merge --squash --delete-branch
304
+ ```
305
+
306
+ If the merge fails with a permission error: **STOP.** "You don't have merge permissions on this repo. Ask a maintainer to merge."
307
+
308
+ If merge queue is active, `gh pr merge --auto` will enqueue. Poll for the PR to actually merge:
309
+
310
+ ```bash
311
+ gh pr view --json state -q .state
312
+ ```
313
+
314
+ Poll every 30 seconds, up to 30 minutes. Show a progress message every 2 minutes: "Waiting for merge queue... (Xm elapsed)"
315
+
316
+ If the PR state changes to `MERGED`: capture the merge commit SHA and continue.
317
+ If the PR is removed from the queue (state goes back to `OPEN`): **STOP.** "PR was removed from the merge queue."
318
+ If timeout (30 min): **STOP.** "Merge queue has been processing for 30 minutes. Check the queue manually."
319
+
320
+ Record merge timestamp and duration.
321
+
322
+ ---
323
+
324
+ ## Step 5: Deploy strategy detection
325
+
326
+ Determine what kind of project this is and how to verify the deploy.
327
+
328
+ First, run the deploy configuration bootstrap to detect or read persisted deploy settings:
329
+
330
+ {{DEPLOY_BOOTSTRAP}}
331
+
332
+ Then run `gstack-diff-scope` to classify the changes:
333
+
334
+ ```bash
335
+ eval $(~/.claude/skills/gstack/bin/gstack-diff-scope $(gh pr view --json baseRefName -q .baseRefName 2>/dev/null || echo main) 2>/dev/null)
336
+ echo "FRONTEND=$SCOPE_FRONTEND BACKEND=$SCOPE_BACKEND DOCS=$SCOPE_DOCS CONFIG=$SCOPE_CONFIG"
337
+ ```
338
+
339
+ **Decision tree (evaluate in order):**
340
+
341
+ 1. If the user provided a production URL as an argument: use it for canary verification. Also check for deploy workflows.
342
+
343
+ 2. Check for GitHub Actions deploy workflows:
344
+ ```bash
345
+ gh run list --branch <base> --limit 5 --json name,status,conclusion,headSha,workflowName
346
+ ```
347
+ Look for workflow names containing "deploy", "release", "production", "staging", or "cd". If found: poll the deploy workflow in Step 6, then run canary.
348
+
349
+ 3. If SCOPE_DOCS is the only scope that's true (no frontend, no backend, no config): skip verification entirely. Output: "PR merged. Documentation-only change — no deploy verification needed." Go to Step 9.
350
+
351
+ 4. If no deploy workflows detected and no URL provided: use AskUserQuestion once:
352
+ - **Context:** PR merged successfully. No deploy workflow or production URL detected.
353
+ - **RECOMMENDATION:** Choose B if this is a library/CLI tool. Choose A if this is a web app.
354
+ - A) Provide a production URL to verify
355
+ - B) Skip verification — this project doesn't have a web deploy
356
+
357
+ ---
358
+
359
+ ## Step 6: Wait for deploy (if applicable)
360
+
361
+ The deploy verification strategy depends on the platform detected in Step 5.
362
+
363
+ ### Strategy A: GitHub Actions workflow
364
+
365
+ If a deploy workflow was detected, find the run triggered by the merge commit:
366
+
367
+ ```bash
368
+ gh run list --branch <base> --limit 10 --json databaseId,headSha,status,conclusion,name,workflowName
369
+ ```
370
+
371
+ Match by the merge commit SHA (captured in Step 4). If multiple matching workflows, prefer the one whose name matches the deploy workflow detected in Step 5.
372
+
373
+ Poll every 30 seconds:
374
+ ```bash
375
+ gh run view <run-id> --json status,conclusion
376
+ ```
377
+
378
+ ### Strategy B: Platform CLI (Fly.io, Render, Heroku)
379
+
380
+ If a deploy status command was configured in CLAUDE.md (e.g., `fly status --app myapp`), use it instead of or in addition to GitHub Actions polling.
381
+
382
+ **Fly.io:** After merge, Fly deploys via GitHub Actions or `fly deploy`. Check with:
383
+ ```bash
384
+ fly status --app {app} 2>/dev/null
385
+ ```
386
+ Look for `Machines` status showing `started` and recent deployment timestamp.
387
+
388
+ **Render:** Render auto-deploys on push to the connected branch. Check by polling the production URL until it responds:
389
+ ```bash
390
+ curl -sf {production-url} -o /dev/null -w "%{http_code}" 2>/dev/null
391
+ ```
392
+ Render deploys typically take 2-5 minutes. Poll every 30 seconds.
393
+
394
+ **Heroku:** Check latest release:
395
+ ```bash
396
+ heroku releases --app {app} -n 1 2>/dev/null
397
+ ```
398
+
399
+ ### Strategy C: Auto-deploy platforms (Vercel, Netlify)
400
+
401
+ Vercel and Netlify deploy automatically on merge. No explicit deploy trigger needed. Wait 60 seconds for the deploy to propagate, then proceed directly to canary verification in Step 7.
402
+
403
+ ### Strategy D: Custom deploy hooks
404
+
405
+ If CLAUDE.md has a custom deploy status command in the "Custom deploy hooks" section, run that command and check its exit code.
406
+
407
+ ### Common: Timing and failure handling
408
+
409
+ Record deploy start time. Show progress every 2 minutes: "Deploy in progress... (Xm elapsed)"
410
+
411
+ If deploy succeeds (`conclusion` is `success` or health check passes): record deploy duration, continue to Step 7.
412
+
413
+ If deploy fails (`conclusion` is `failure`): use AskUserQuestion:
414
+ - **Context:** Deploy workflow failed after merging PR.
415
+ - **RECOMMENDATION:** Choose A to investigate before reverting.
416
+ - A) Investigate the deploy logs
417
+ - B) Create a revert commit on the base branch
418
+ - C) Continue anyway — the deploy failure might be unrelated
419
+
420
+ If timeout (20 min): warn "Deploy has been running for 20 minutes" and ask whether to continue waiting or skip verification.
421
+
422
+ ---
423
+
424
+ ## Step 7: Canary verification (conditional depth)
425
+
426
+ Use the diff-scope classification from Step 5 to determine canary depth:
427
+
428
+ | Diff Scope | Canary Depth |
429
+ |------------|-------------|
430
+ | SCOPE_DOCS only | Already skipped in Step 5 |
431
+ | SCOPE_CONFIG only | Smoke: `$B goto` + verify 200 status |
432
+ | SCOPE_BACKEND only | Console errors + perf check |
433
+ | SCOPE_FRONTEND (any) | Full: console + perf + screenshot |
434
+ | Mixed scopes | Full canary |
435
+
436
+ **Full canary sequence:**
437
+
438
+ ```bash
439
+ $B goto <url>
440
+ ```
441
+
442
+ Check that the page loaded successfully (200, not an error page).
443
+
444
+ ```bash
445
+ $B console --errors
446
+ ```
447
+
448
+ Check for critical console errors: lines containing `Error`, `Uncaught`, `Failed to load`, `TypeError`, `ReferenceError`. Ignore warnings.
449
+
450
+ ```bash
451
+ $B perf
452
+ ```
453
+
454
+ Check that page load time is under 10 seconds.
455
+
456
+ ```bash
457
+ $B text
458
+ ```
459
+
460
+ Verify the page has content (not blank, not a generic error page).
461
+
462
+ ```bash
463
+ $B snapshot -i -a -o ".gstack/deploy-reports/post-deploy.png"
464
+ ```
465
+
466
+ Take an annotated screenshot as evidence.
467
+
468
+ **Health assessment:**
469
+ - Page loads successfully with 200 status → PASS
470
+ - No critical console errors → PASS
471
+ - Page has real content (not blank or error screen) → PASS
472
+ - Loads in under 10 seconds → PASS
473
+
474
+ If all pass: mark as HEALTHY, continue to Step 9.
475
+
476
+ If any fail: show the evidence (screenshot path, console errors, perf numbers). Use AskUserQuestion:
477
+ - **Context:** Post-deploy canary detected issues on the production site.
478
+ - **RECOMMENDATION:** Choose based on severity — B for critical (site down), A for minor (console errors).
479
+ - A) Expected (deploy in progress, cache clearing) — mark as healthy
480
+ - B) Broken — create a revert commit
481
+ - C) Investigate further (open the site, look at logs)
482
+
483
+ ---
484
+
485
+ ## Step 8: Revert (if needed)
486
+
487
+ If the user chose to revert at any point:
488
+
489
+ ```bash
490
+ git fetch origin <base>
491
+ git checkout <base>
492
+ git revert <merge-commit-sha> --no-edit
493
+ git push origin <base>
494
+ ```
495
+
496
+ If the revert has conflicts: warn "Revert has conflicts — manual resolution needed. The merge commit SHA is `<sha>`. You can run `git revert <sha>` manually."
497
+
498
+ If the base branch has push protections: warn "Branch protections may prevent direct push — create a revert PR instead: `gh pr create --title 'revert: <original PR title>'`"
499
+
500
+ After a successful revert, note the revert commit SHA and continue to Step 9 with status REVERTED.
501
+
502
+ ---
503
+
504
+ ## Step 9: Deploy report
505
+
506
+ Create the deploy report directory:
507
+
508
+ ```bash
509
+ mkdir -p .gstack/deploy-reports
510
+ ```
511
+
512
+ Produce and display the ASCII summary:
513
+
514
+ ```
515
+ LAND & DEPLOY REPORT
516
+ ═════════════════════
517
+ PR: #<number> — <title>
518
+ Branch: <head-branch> → <base-branch>
519
+ Merged: <timestamp> (<merge method>)
520
+ Merge SHA: <sha>
521
+
522
+ Timing:
523
+ CI wait: <duration>
524
+ Queue: <duration or "direct merge">
525
+ Deploy: <duration or "no workflow detected">
526
+ Canary: <duration or "skipped">
527
+ Total: <end-to-end duration>
528
+
529
+ CI: <PASSED / SKIPPED>
530
+ Deploy: <PASSED / FAILED / NO WORKFLOW>
531
+ Verification: <HEALTHY / DEGRADED / SKIPPED / REVERTED>
532
+ Scope: <FRONTEND / BACKEND / CONFIG / DOCS / MIXED>
533
+ Console: <N errors or "clean">
534
+ Load time: <Xs>
535
+ Screenshot: <path or "none">
536
+
537
+ VERDICT: <DEPLOYED AND VERIFIED / DEPLOYED (UNVERIFIED) / REVERTED>
538
+ ```
539
+
540
+ Save report to `.gstack/deploy-reports/{date}-pr{number}-deploy.md`.
541
+
542
+ Log to the review dashboard:
543
+
544
+ ```bash
545
+ source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)
546
+ mkdir -p ~/.gstack/projects/$SLUG
547
+ ```
548
+
549
+ Write a JSONL entry with timing data:
550
+ ```json
551
+ {"skill":"land-and-deploy","timestamp":"<ISO>","status":"<SUCCESS/REVERTED>","pr":<number>,"merge_sha":"<sha>","deploy_status":"<HEALTHY/DEGRADED/SKIPPED>","ci_wait_s":<N>,"queue_s":<N>,"deploy_s":<N>,"canary_s":<N>,"total_s":<N>}
552
+ ```
553
+
554
+ ---
555
+
556
+ ## Step 10: Suggest follow-ups
557
+
558
+ After the deploy report, suggest relevant follow-ups:
559
+
560
+ - If a production URL was verified: "Run `/canary <url> --duration 10m` for extended monitoring."
561
+ - If performance data was collected: "Run `/benchmark <url>` for a deep performance audit."
562
+ - "Run `/document-release` to update project documentation."
563
+
564
+ ---
565
+
566
+ ## Important Rules
567
+
568
+ - **Never force push.** Use `gh pr merge` which is safe.
569
+ - **Never skip CI.** If checks are failing, stop.
570
+ - **Auto-detect everything.** PR number, merge method, deploy strategy, project type. Only ask when information genuinely can't be inferred.
571
+ - **Poll with backoff.** Don't hammer GitHub API. 30-second intervals for CI/deploy, with reasonable timeouts.
572
+ - **Revert is always an option.** At every failure point, offer revert as an escape hatch.
573
+ - **Single-pass verification, not continuous monitoring.** `/land-and-deploy` checks once. `/canary` does the extended monitoring loop.
574
+ - **Clean up.** Delete the feature branch after merge (via `--delete-branch`).
575
+ - **The goal is: user says `/land-and-deploy`, next thing they see is the deploy report.**