feat(land): enqueue-and-return default + first-time trunk.io onboarding

On a merge queue, /land now enqueues the PR and returns by default, so you can
/land a stack of ready PRs and walk away while the queue lands them. --watch
opts into the blocking poll (and is what /land-and-deploy uses, since it deploys
the result). No-queue repos still merge synchronously.

Also: /land explains in plain English what a merge queue is and what it'll do
before submitting (teacher mode on first encounter), and when no queue is
configured it offers to set trunk.io up and hand-holds the whole flow. The
onboarding lives in one shared {{MERGE_QUEUE_SETUP}} resolver included by both
/land and /setup-deploy (DRY).

Atomic .tmpl + gen:skill-docs regen. The postfail-ordering test is updated in
the same commit because 4.3 was renamed (Wait -> enqueue/watch); it now matches
the section number so the rename stays bisect-clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-06-01 08:34:09 -07:00
parent f05e61a0bf
commit 9e49d4f812
10 changed files with 509 additions and 33 deletions
+8 -1
View File
@@ -1126,7 +1126,14 @@ Continue to Step 2.
The entire "land" half — pre-flight, CI wait, VERSION-drift check, the pre-merge
readiness gate, and the actual merge through the right regime (none / GitHub native
merge queue / trunk.io merge queue) — is owned by the `/land` skill. Run it now:
merge queue / trunk.io merge queue) — is owned by the `/land` skill. Run it now.
**Run `/land` as if invoked with `--watch`.** `/land`'s default for a queue regime is
enqueue-and-return (hand the PR to the queue and come back) — but the deploy and revert
steps below need the *completed* merge and its SHA, so here you MUST block until the PR
actually lands. Take `/land`'s `--watch` branch at its Step 4.3 (`gstack-merge wait`, then
Step 5 `write-state`), not the enqueue-and-return branch. If the PR ejects or times out in
the queue, `/land` STOPs and so do you — there is nothing to deploy.
Read the `/land` skill file at `~/.claude/skills/gstack/land/SKILL.md` using the Read tool.
+8 -1
View File
@@ -308,7 +308,14 @@ Continue to Step 2.
The entire "land" half — pre-flight, CI wait, VERSION-drift check, the pre-merge
readiness gate, and the actual merge through the right regime (none / GitHub native
merge queue / trunk.io merge queue) — is owned by the `/land` skill. Run it now:
merge queue / trunk.io merge queue) — is owned by the `/land` skill. Run it now.
**Run `/land` as if invoked with `--watch`.** `/land`'s default for a queue regime is
enqueue-and-return (hand the PR to the queue and come back) — but the deploy and revert
steps below need the *completed* merge and its SHA, so here you MUST block until the PR
actually lands. Take `/land`'s `--watch` branch at its Step 4.3 (`gstack-merge wait`, then
Step 5 `write-state`), not the enqueue-and-return branch. If the PR ejects or times out in
the queue, `/land` STOPs and so do you — there is nothing to deploy.
{{INVOKE_SKILL:land}}