/waylode:commit-and-mergefrom Waylode
Commits finished work in worktrees and merges verified branches into the default branch while preserving locked-in branches. Never pushes or deletes remote branches.
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.
None: SKILL.md is the whole skill.
Commit what is finished, verify it, and merge it into the default branch. Locked-in branches are kept exactly as they are.
What this skill never does:
The waylode:wrap-up skill runs this procedure as one of its steps. The waylode:merge-prs skill covers pull requests on the remote.
Pass the absolute repo_path on every waylode_* and devmap_* call.
Settings live in the repository's local git config (under the gitpulse.* compat namespace). Every worktree of the clone shares them, and none of them is committed.
| Key | Meaning | Default |
|---|---|---|
gitpulse.lockedBranch | Multi-valued. Each value is a branch name or a pattern under refs/heads/, such as labs, labs/** or release/2026-* (matching below). | none |
gitpulse.gate | The full gate command, run from the root of the worktree under test. | discovered (below) |
gitpulse.trainWorktree | Path of the persistent integration worktree. A sibling path when the gate needs sibling checkouts beside it. | <repo>/.worktrees/merge-train |
gitpulse.gateDiskGb | Free disk, in GiB, a full gate run needs. | 30 |
git config --get-all gitpulse.lockedBranch and git config --get gitpulse.gate.git config --local … line that would save it.git check-ignore -q .worktrees/. If .worktrees/ is not ignored, add /.worktrees/ to the clone's own exclude file, $(git rev-parse --git-path info/exclude), which is never committed, and say that you did. Never put it under .gitpulse/worktrees/: that directory belongs to Waylode's lanes.The default branch. Take the first of these that exists:
git symbolic-ref --quiet --short refs/remotes/origin/HEAD, without the origin/ prefix;git config --get init.defaultBranch;main, then master.Otherwise ask.
The full gate. Take the first of these that names one, and say which source you used:
gitpulse.gate.AGENTS.md, CLAUDE.md, CONTRIBUTING.md) naming the command that must pass before merging.ci:local, ci or verify; a Makefile or justfile ci, verify or check target; ./verify.sh.If none, or more than one, fits, ask the owner. Never invent a gate. Running the tests you guess are relevant is not running the gate.
A branch is locked-in when any of these is true:
git worktree list --porcelain shows a locked line in its worktree's block. The reason follows the word; initializing means Waylode is still creating it.waylode_sessions or waylode_insights (agents.live) lists a session in its worktree;waylode_worktree_radar shows a lane claim on it;in_progress card on waylode_list_tasks names it;lsof -d cwd shows a process whose working directory is inside its worktree. Agents' build and test children count.main, master, develop, staging, production, trunk and release/**.wip/**, draft/**, **/wip and **/draft.archive/**.gitpulse.lockedBranch value.Expanding patterns. Expand the protected names and the repository's values the same way, with git's own matching. Never hand-roll a glob.
Normalise each value first: drop a leading refs/heads/ or heads/.
Expand it with:
git for-each-ref --format='%(refname:short)' "refs/heads/<value>"
Run it once per pattern. The matching rules:
* stays inside one path segment: labs/* matches labs/geek but not labs/geek/v2.** crosses /: labs/** matches both, and **/wip matches wip at any depth.<value>/: labs matches labs/geek and labs/geek/v2.So write a whole family as labs or labs/**, never labs/*.
For remote branches (pull request heads), expand the same values under refs/remotes/origin/<value> after git fetch origin.
A repository value that matches nothing may be a typo, and then a branch the owner meant to keep has no protection. Report it, and delete nothing in this run until the owner answers. Merging may go on.
Fail closed. A facet that could not scan (ok: false, truncated, deferred) leaves the branches it covers as unknown, and an unknown branch is locked-in for this run.
Recompute the list mechanically at the start, again right before each merge, and again before each deletion. Intersect it with what you are about to touch, and refuse on any hit. A prose rule in a brief is not a check.
What locked-in means:
Edge cases:
git branch --contains <sha> is empty). Treat it as locked-in and name its sha in the report. Never remove it.- or contain unusual characters. Pass full refs (refs/heads/<name>) and -- before paths.waylode_insights and waylode_sessions. Check each facet's ok: a facet that could not scan has not come back clean.waylode_worktree_merge, waylode-worktree merge, and LandQueue) automatically serializes ref and checkout mutations across processes via a kernel-released flock at "$(git rev-parse --path-format=absolute --git-common-dir)/gitpulse/mutation.lock", and coordinates hot-file conflict resolution via sorted-path SQLite WAL FIFO tickets (<common>/gitpulse/land_tickets.sqlite).
When a calling skill (waylode:wrap-up, waylode:merge-prs) coordinates a multi-step external gate run, keep its outer coordinator lock if used; otherwise do not create a manual mkdir .../merge-train.lock directory just to invoke waylode_worktree_merge or LandQueue (directory locks leak on SIGKILL, whereas mutation.lock auto-releases on crash).
Look for an integrator operating outside Waylode's engine:
train/*, integrat*) whose tip moved in the last hour;waylode_agent_peers (or, in Claude Code, ListAgents) name as integrating.Message each one (waylode_agent_send) and agree on one integrator before doing anything.
waylode:load skill. Free disk must be at least gitpulse.gateDiskGb.For every local branch and every worktree, record:
git rev-list --left-right --count <default>...<branch>);waylode_landed with commit: <tip> and base: <default>. That check also recognises squash and rebase merges.Put each branch in the first class that fits:
| Class | Meaning |
|---|---|
| integration | train/* and other branches a merge train or integrator built. They are never candidates. Keep the newest per integrator; the rest are listed for the owner. |
| unstarted | 0 ahead, and no commit was ever made on it: git reflog show refs/heads/<branch> has exactly one entry, its creation. Count the entries rather than reading the message: a branch made with git update-ref has an empty one. If there is no reflog at all, it is unknown: keep it. A lane that has not begun is never landed and never pruned. |
| landed | waylode_landed says landed: true, and the branch did carry commits of its own. Nothing to merge. |
| candidate | Ahead and not deferred. |
| deferred | A live holder is still working, it conflicts, or it touches files a sibling lane holds (waylode_collision_risk). Record the reason. |
Where you commit. Only in a worktree that meets all of these:
Everywhere else:
waylode_agent_send or waylode_worktree_send_message) and wait for its reply. Never commit for it.In each worktree you commit in:
git status --porcelain=v1 -z and the diff. Group the changes by concern: one coherent concern per commit.git add -- <paths>.
git add -A, git add . or git add -u. A worktree can carry another session's files..env*, keys, credentials, or build output. Leave untracked files that look generated or secret where they are, and list them in the report.git log): what changed and why.Show a table with one row per branch:
Order the candidates:
Locked-in candidates get their own group. Wait for the owner's yes, and take the plan as they edit it. Nothing merges without it.
git merge-tree --write-tree --name-only --messages HEAD <sha>. On a conflict, leave that branch out and record why. Never resolve conflicts in a branch you don't own.waylode:merge-train skill with this batch. You already hold its lock, so skip its lock step.git merge --no-ff --no-edit <sha>. Then run the full gate there and compare it with a base run of the default branch, using merge-train's compare and confirm steps.<merge-base>..<sha>) with the strongest model the host has. In Claude Code that is an Agent with model: "opus". Give the reviewer the brief, the branch's card if it has one, and devmap_impact on the symbols the diff changes. Ask for correctness bugs, regressions, and tests that would not fail without the change.git rev-parse <commit>^{tree}. Waylode's verification gate and LandQueue compare ^{tree} equality (and verified lands best-effort advance refs/gitpulse/green/<default> monotonically via CAS).waylode:wrap-up decides that.Primary path — Rust LandQueue & merge_tree::land (waylode_worktree_merge / waylode-worktree merge):
LandQueue): coalesces concurrent lands (10ms window, AIMD sizing) into one ObjectQuarantine + one git pack-objects migration + one atomic CAS update-ref, isolating conflicting lanes without losing clean lanes (CompleteEarly safety proof, split_dependents, and sequential solo fallback on hook rejection).land_identities): persists (target_ref, source_oid) -> landed_oid in .devcouncil/ledger.sqlite with revertOf (including revert-of-revert) awareness so retried lands return AlreadyLanded cleanly.mutation.lock & disjoint-dirty advancement: under <common>/gitpulse/mutation.lock (flock), merge_tree::land moves refs/heads/<default> by CAS and advances every checkout holding <default> via git read-tree -m -u — allowing strictly disjoint uncommitted/staged/untracked edits to remain untouched while failing closed on all 5 data-loss guards (APFS case-folding, symlink_metadata == NotFound for added/type-changed paths including gitignored files, 160000 gitlink refusal, untruncated dirty scan, per-holder repo_op/index.lock checks, and pre_cached_digest CAS rollback).<common>/gitpulse/verify-scratch/), best-effort advances refs/gitpulse/green/<default> without failing an already-landed merge.If waylode_worktree_merge is unavailable or refs/heads/<default> moved since the verified run:
git rev-parse <new>^{tree} differs from the verified tree.LandQueue:
git update-ref refs/heads/<default> <new> <old>.git merge --ff-only <new> in that worktree.If git or merge_tree::land refuses because dirty files overlap the landing (HeldReason::CheckoutDirty), stop. Show the owner the overlapping paths and whose session holds them. Land only after the holder commits, or after the owner explicitly approves an emergency manual three-way landing.
Emergency / Manual Fallback Only — Three-way landing (git merge-file): Use this manual procedure only as an emergency fallback when waylode_worktree_merge / LandQueue refuses an overlapping dirty file and the owner explicitly approves merging their uncommitted edit in place. Run it in the checkout that has the default branch, with <old> as its current tip. Give git every path with --literal-pathspecs, so a name like docs/[x].md cannot also match docs/x.md.
git status --porcelain=v1 -z -uall --no-renames, which includes untracked files. The landed paths: git diff --no-renames --raw -z <old> <new>, which also gives each path's old and new mode.git diff --cached --no-renames --name-only -z);120000 or 160000);test -e <path> || test -L <path>);foo and foo/bar).git hash-object -w -- <path>, and keep the list. It proves later that nothing else changed, and it is what you restore from.git merge-file -p --object-id <saved blob> <old>:<path> <new>:<path> > <tmp>
A non-zero exit is a conflict: delete the temp files and stop.cat <tmp> > <path>, which keeps the file's mode, and delete the temp file.git --literal-pathspecs restore --source=<new> --worktree -- <paths>. It creates added files, removes deleted ones, and sets modes and symlinks, none of which git show does.git cat-file blob <saved blob> > <path>;<old> does not have, with git --literal-pathspecs clean -f -- <paths> (restore refuses a path missing from its source, and then restores nothing);git --literal-pathspecs restore --source=<old> --worktree -- <paths>.git --literal-pathspecs reset -q -- <every landed path>. Otherwise the holder's next commit would revert the landing.git status lists only the holder's own changes.This is the one place this skill moves a ref that another worktree has checked out. It needs the owner's yes every time.
Never push. Say that the default branch moved locally, and by how many commits.
Recompute the locked-in list first. Then, for each branch merged in this run that is not locked-in:
waylode_landed that its tip is on the default branch.git update-ref refs/backup/<yyyymmdd-hhmm>/<branch> <sha> "". The empty old value makes it fail rather than overwrite an existing ref.waylode_worktree_prune with branch: first with dry_run: true, then without it. Read each worktree's own outcome in outcomes.
force. It also discards uncommitted files.waylode_landed recognised), git worktree remove <path> without --force is the fallback. It refuses a dirty or locked worktree.git update-ref -d refs/heads/<branch> <backed-up sha>. Check first that git worktree list --porcelain has no branch refs/heads/<branch> line: update-ref -d does not look, and deleting a checked-out branch leaves that worktree on an unborn branch. That is a compare-and-swap, so it fails if the branch moved. Do not use git branch -d: it checks the branch's upstream rather than the default branch, and refuses squash-landed work.Locked-in branches stay, merged or not.
Write commit-and-merge-<stamp>.md to "$(git rev-parse --path-format=absolute --git-common-dir)/gitpulse/reports/". Never write it into a tracked path of the main checkout. It holds:
Then remove the lock, and tell the owner the same in a few lines.
What SKILL.md sets; muted values are Claude Code's defaults
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./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.Other plugins' skills for the same job