/waylode:merge-trainfrom Waylode
Verifies multiple branches together in a single gate run instead of one per branch. Merges onto a persistent integration worktree, runs the repository's full gate once, bisects failing tests to identify the culprit branch, and produces a verified train branch and report.
Ships in Waylode. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
One full gate run per batch, not per branch.
Below, main means the repository's default branch, worked out as waylode:commit-and-merge describes.
What this skill does not do:
train/<stamp> branch and a report, and the owner decides what lands. The waylode:commit-and-merge and waylode:wrap-up skills land a verified train.waylode_insights for the repository. Check each facet's ok: a facet that could not scan has not come back clean.waylode:commit-and-merge or waylode:wrap-up called this skill, the batch is the plan the owner already approved.LandQueue, waylode_worktree_merge, waylode-worktree merge) already serializes cross-process ref/checkout mutations with a kernel-released flock at "$(git rev-parse --path-format=absolute --git-common-dir)/gitpulse/mutation.lock" and coordinates concurrent conflict resolution via <common>/gitpulse/land_tickets.sqlite.waylode:commit-and-merge, waylode:merge-prs, waylode:wrap-up), and prefer Waylode's pooled CoW scratch worktree (<common>/gitpulse/verify-scratch/, which preserves target/ and node_modules/ via APFS CoW cloning and git clean -fdx -e target -e node_modules) or gitpulse.trainWorktree over the main checkout.merge-train.lock exists from an older script and kill -0 <pid> fails on its owner file, tell the owner it is stale; only they remove it.df -h . must show at least gitpulse.gateDiskGb free (30 GB when unset). Below it, stop and report.Read the gate, the integration worktree and the disk floor from the repository settings in waylode:commit-and-merge:
gitpulse.gate, else the gate the repository's own instructions or CI scripts name;gitpulse.trainWorktree, default <repo>/.worktrees/merge-train. Ignore that path through the clone's info/exclude first, as that skill says.gitpulse.gateDiskGb.Before the first train in a repository, read the gate script itself and answer these. Write the answers into the report.
--continue, --no-fail-fast, -k), use it on both the base and the batch run.
compare reports that as partial; see step 5.go.mod replace or a script that reads ../<other repo>.
gitpulse.trainWorktree to a sibling path.Logs go to "$(git rev-parse --path-format=absolute --git-common-dir)/gitpulse/merge-train/". That path is inside git's own directory, so it is never tracked in any repository. Never write logs into the main checkout.
Run every gate in the background. A full gate can take most of an hour, so wait for its completion notice rather than polling it.
git worktree add --detach <path> main. If it already exists, keep it: its warm build output saves a cold build every train.EnterWorktree by path, or brief a subagent whose working directory is that worktree.
git -C <other worktree> and cd into one.update-ref, commit-tree).LOGS="$(git rev-parse --path-format=absolute --git-common-dir)/gitpulse/merge-train"
mkdir -p "$LOGS"
go -C <this skill's directory>/failset build -o "$LOGS/failset" .
failset compare <base-log> <batch-log> exits:
Supported gate output. failset can only compare gates whose output it recognises. For any other gate it exits 2, and the compare is done by hand: collect each log's failing test ids and diff the two sets. Say in the report that you did.
The summaries it reads:
ci-local.mjs-style summary block, in its default, --continue and --only forms;verify.sh that prints one line per step;local-ci.js runner.The runners it reads inside those: nextest, libtest, vitest, go test, pytest, Playwright and the Waylode browser harness.
verify.sh that the outer runner calls last.cannot compare (exit 2). Compare its failing test names by hand, and say so in the report.git switch --detach main.git rev-parse HEAD;bun --version, cargo --version, go version, and the helper binaries it calls);$LOGS/base-<main-sha12>.log.Reusing a base log: an existing base log can stand in only when:
failset extract exits 0, meaning it is complete;incomplete.Otherwise run it again. A base log from a different main, from different tools or from different siblings is not this base.
git switch -C train/<yyyymmdd-hhmm> main.git merge-tree --write-tree --name-only --messages HEAD <branch>.--merge-base=main. A branch that is behind main then appears to revert main's newer commits, which shows a conflict that a real sequential merge does not have.git merge --no-ff --no-edit <branch>. When the batch was pinned to commits, merge the pinned sha, not the moving branch name.cargo check --all-targets, go build ./..., tsc --noEmit or its wrapper), and stop there if it fails.$LOGS/batch-<stamp>.log.Run "$LOGS/failset" compare <base-log> <batch-log>, and read every section, not just the verdict:
partial: the batch's effect on it is unknown.When main stops a stop-at-first-failure gate early. If that first red step is red on main, everything after it runs on neither tree, and compare says so (partial, "every step after the first failure"). The steps after it may be exactly what the batch changed. In that case:
--no-fail-fast, go test across all packages, vitest without --bail. Without it, cargo stops at the first failing test binary, and the crates after it never run.The lasting fix is a continue-past-failure mode in the gate itself. Name its absence in the report.
Machines running several agents are often loaded, and load-sensitive tests fail on their own. Re-run each new failure alone, on the batch tree and on a detached main checkout of the same worktree:
| Runner | Re-run one test |
|---|---|
| nextest | cargo nextest run [--manifest-path <crate>/Cargo.toml] -E 'binary_id(<binary>) & test(=<name>)' (the binary is the id's first word) |
| cargo test | cargo test [-p <crate>] <name> -- --exact |
| vitest | the repository's test script with -- <file> -t '<name>'. Check that the RUN line names the integration worktree, not another checkout. |
| go | go test -run '^<Name>$' <package> |
| pytest | pytest '<file>::<name>' |
| a gate step | the gate's own single-step mode, if it has one (--only <step>, --leg <name>) |
Scripting these re-runs: read the runner's own result lines (test result: ok. 1 passed, --- PASS), never a pipeline's exit status. (cargo test … | grep …) returns grep's status, so a script built that way reports "pass" whatever the test did.
train/<stamp> from the rest, and run the full gate once more.
Write $LOGS/report-<stamp>.md with:
Then tell the owner:
Remove the lock, unless a calling skill holds it. Leave the integration worktree for the next train, apart from build output you deleted for disk.
LandQueue + refs/gitpulse/green/): Waylode's Rust LandQueue performs single-quarantine batched landing, cross-process mutation.lock serialization, disjoint-dirty target advancement (read-tree -m -u with 5 safety guards), land_identities idempotency (revertOf), tree-OID equivalence checks (^{tree}), and monotonic CAS updates to refs/gitpulse/green/<branch> after verified lands.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub bharathvbcr/gitpulse --plugin waylode9 skills in this plugin
/collisionsDetect overlapping uncommitted edits across Waylode worktrees and agent sessions. Use when two agents, worktrees, or checkouts might be touching the same files, before merging or continuing a parked rebase, or when the user asks who is editing what./commit-and-mergeCommit the finished work in a repository's worktrees and merge the verified branches into its default branch, while keeping every locked-in branch in place. Locked-in means a locked worktree, a branch a live agent holds, a protected or archive name, or the repository's own list (git config gitpulse.lockedBranch, such as labs/**). A locked-in branch may be merged once it verifies, but is never deleted, rewritten or committed into. Use when asked to "commit and merge the branches", "merge everything into main", "land the lanes", or "merge but keep my locked branches". It never pushes and never deletes a remote branch./insightsRead Waylode repository insights over MCP — worktrees, agent sessions, uncommitted changes, overlapping dirty files, ledger verdicts, and code-graph availability. Use when an agent needs a honest snapshot of a checkout before editing, when multiple worktrees or coding agents are in flight, or when the user asks what is happening in a Waylode-managed repo./loadCheck host load before heavy builds and tests, and know what to do when Waylode refuses one. Use before running cargo, go, npm/bun/pnpm test, vitest or jest, before an unbounded grep, rg or go test, and whenever a command was refused for host load or the session brief says host load is elevated, severe or UNKNOWN./merge-prsMerge a repository's open pull requests on its forge (GitHub, through the gh CLI), safely and in order. Lists them, sorts out drafts, conflicts, failing or missing checks and requested changes, reviews what has not been reviewed, shows the plan, and after the owner's yes merges each one pinned to the head commit that was checked, so nothing pushed later slips in. Head branches that are locked-in (see waylode:commit-and-merge) are never deleted. Use when asked to "merge the PRs", "merge the open pull requests", or "land what is green on GitHub". It never uses admin overrides, never force-pushes, and never merges without the owner's yes on the list./tasksFile, import, list, read, complete, merge and delete tasks on the Waylode task board over MCP — the board a person sees in Waylode and launches agents from. Use when an agent needs to record follow-up work, plan upcoming tasks, put Markdown task briefs from a repository's tasks/ folder onto the board, read a task's brief before implementing it, mark the task it was launched on done when the work is finished, merge duplicate tasks into one, or delete a task that should not exist, with a recorded reason.Other plugins' skills for the same job