From stdd
Merge finished parallel slice worktrees back into the primary branch — the fan-in half of /stdd:batch. Use once slices built in worktrees are ready to integrate; conservative by design, it stops rather than force anything past a merge conflict or a failing suite. Invoke with /stdd:land [slice ...].
How this skill is triggered — by the user, by Claude, or both
Slash command
/stdd:land [slice ...][slice ...]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Slices: $ARGUMENTS
Slices: $ARGUMENTS
/stdd:batch and /stdd:worktree fan work out into parallel worktrees; this
is the fan-in. It sequences the tedious, mechanical part of landing them
(green-check, merge, integration re-check, cleanup) while stopping for you on
anything that needs judgment. It is conservative on purpose: a branch lands
only if it is green and merges without conflict; everything else stops with a
report and is left untouched for you.
Merging is an integration step, not a rubber stamp: slices that are disjoint in
src/ can still collide on shared files (docs/roadmap.md AC ticks, an umbrella
test file) or pass alone yet break together. So this re-runs the whole suite
(not just the per-commit unit tier) after every merge.
git rev-parse --show-toplevel is under .claude/worktrees/ (or
otherwise a linked worktree), stop and tell the user to run this from the
primary checkout.git status --porcelain is empty). If
dirty, stop: commit or stash first. A merge onto a dirty tree is not safe to
automate.Record the primary's current branch as the merge target (usually main).
Enumerate the landable worktrees:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/worktree.sh" landable
It prints one <worktree-path>\t<branch> line per linked worktree whose branch
is ahead of the current (primary) branch, excluding the primary itself,
detached-HEAD, and bare entries. This catches both /stdd:worktree sessions and
/stdd:batch subagent worktrees, wherever they live. If it exits non-zero it
either printed no slice worktree is ahead of <target> (nothing to do, stop)
or is not a git repo.
$ARGUMENTS names slices, restrict to the branches matching them; report
any named slice that landable did not list.Landing 3 branches into main: billing/invoice, reports/export, notify/email.For each branch, in a stable order. A branch that trips any check is skipped, not aborted: record why and move to the next, so clean branches still land.
Green in isolation. In that worktree, run the full suite:
( cd <worktree> && ./scripts/run-tests.sh --all ). If it fails, skip the
branch (blocked: tests red in its own tree).
Merge, no auto-resolve. From the primary: git merge --no-ff <branch>. On
a conflict, git merge --abort and skip the branch (blocked: merge conflict — resolve by hand). Never resolve a conflict yourself.
Green after integration. Re-run ./scripts/run-tests.sh --all on the
merged primary. If it fails, the merge broke integration: undo it with
git reset --hard HEAD~1 (safe: the tree was clean and this is the merge we
just made) and skip the branch (blocked: integration failure after merge).
Clean up. Remove the worktree through the provenance-guarded helper (it removes and prunes, but only a worktree stdd created), then handle the branch by its result:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/worktree.sh" remove <worktree>
.claude/worktrees/, now removed and
pruned): delete the merged branch with git branch -d <branch> — the -d
form only deletes a fully-merged branch, so it double-checks the merge.
Record landed..claude/worktrees/ — harness- or
user-owned): it is left in place, and so is its branch (a branch checked out
in a worktree can't be deleted anyway). Record landed (worktree left for its owner). This is not a failure; the merge still happened.landed but worktree not cleaned — <reason>, and move on.Never touch the remote. Pushing the newly-landed commits stays the user's call, as everywhere else in stdd.
If anything landed, run the tree-wide freshness sweep to catch AC-tick or drift the merges introduced:
/stdd:review
Then print one table: slice · landed / blocked · reason. End with a tally, e.g.
2 landed, 1 blocked (notify/email: merge conflict). For each blocked branch,
name the concrete next step (resolve the conflict and re-run /stdd:land <slice>, or fix the failing test in its worktree first).
Creates, edits, and verifies skills using a test-driven development approach with pressure scenarios and subagents.
npx claudepluginhub dominik-rehse/stdd --plugin stdd