/agent-traffic-control:batch-merge-subject-is-not-evidence-a-member-landedfrom agent-traffic-control
You are about to close, delete the branch of, or mark as landed a pull request because a batch, roll-up or merge-train commit on the target branch names it in the subject line, and because the member's own commits all predate that merge by wall clock. Neither of those is evidence. A batch branch is assembled at some moment BEFORE it merges, so anything the member pushed after assembly is outside it, and the subject records INTENT at assembly time rather than CONTENT at merge time. Use before closing a member, when an ancestry check against a squashed batch says no, or when a member's branch still shows commits ahead of the target. Compare file content against the target branch instead, expecting exactly one legitimate difference: the shared aggregate file every member appends to.
Ships in agent-traffic-control. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Several small pull requests were combined into one branch and landed together
to save CI runs. The squash commit on the target branch says, in git log:
Batch: four small pull requests in one run — #2767, #2743, #2739, #2772
That subject is written by the batch itself, it is in the permanent history, and it reads as a receipt. The obvious next step is to close each named member as already landed and delete its branch.
The subject is a claim about what was ASSEMBLED, not about what MERGED. A batch branch is built at some moment T by merging or cherry-picking each member's head as it stood at T. The batch then sits in review, gates run, and it merges at some later moment. Everything a member pushed between T and the merge is outside the batch and is not on the target branch, while the subject still names that member exactly as before.
Nothing in the batch notices. The member's branch is not rewritten, no conflict is raised, no gate fails, and the batch's own diff looks complete because it IS complete with respect to the heads it was built from.
Closing the member on the strength of the subject deletes work that was never merged. In the worked example below, that was 261 added and 257 removed lines across four files, including a behaviour change in application code.
You are in the right place if:
git merge-base --is-ancestor on the
member's head returns non-zero, which after a squash means nothing in either
directionTwo things that look like corroboration and are not:
Compare content, file by file, against the target branch. Ancestry and subject lines both answer a question you did not ask.
BASE=$(git merge-base origin/main <member-branch>)
git diff --name-only "$BASE" <member-branch>
Use the merge base rather than the target tip, so the list is the member's own files and not everything that moved on the target since.
for f in $(git diff --name-only "$BASE" <member-branch>); do
a=$(git rev-parse <member-branch>:"$f" 2>/dev/null)
b=$(git rev-parse origin/main:"$f" 2>/dev/null)
[ "$a" = "$b" ] && echo "SAME $f" || echo "DIFFERENT $f"
done
Blob equality is exact and cheap. It is stronger than line counts and it does not care how the merge was performed.
Most batches have one, and only one, file that is allowed to differ: the shared aggregate file that every member appends to — a tracker data file, a changelog, a generated index, a lockfile, a fixture registry. On the target branch that file holds the base plus EVERY member's additions; on the member's own branch it holds the base plus only its own. So it is different by construction even when the member landed perfectly, and it is different in a way no amount of comparing will resolve.
Confirm that one by looking for the member's own entries, never by comparing the blob:
git show origin/main:path/to/aggregate | grep -c '<the member's own row id>'
A count of at least what the member added means the member's rows are there. The blob will still differ, and that is correct.
The member is still open and its branch still exists, so there is nothing to rescue from a reflog. Rebase it onto the current target branch, confirm the diff is now only the stranded work, and land it on its own. If the aggregate file conflicts, resolve it by keeping BOTH sides' rows and then COUNTING: base plus your own additions is the whole answer.
A batch that can strand a member will do it again. Either freeze members before assembly (mark them ready and stop pushing), or record the assembly time and each member's head SHA in the batch body, so the check above has something to compare against. The subject line cannot carry that, because it is written once and the world moves afterwards.
The check has to be able to return YES, or it is not a check. Run it on a batch you already believe landed cleanly and confirm it says so — same files, one aggregate difference, rows present. If it reports every member as stranded, the comparison is wrong, not the batches.
A clean member reads:
--- is member head an ancestor of origin/main? ---
NO ← expected after a squash, means nothing
--- file-by-file content comparison ---
SAME tools/validate_data.mjs
SAME tools/validate_data.test.cjs
SAME scripts/test_facts.py
SAME deliverables/night.html
SAME README.md
--- aggregate ---
site/assets/data.js: DIFFERENT (expected), member's rows present: 1 ✓
=== Verdict: landed ===
A stranded member reads the same until a second file says DIFFERENT.
Worked example from a route-generation repository that lands several small pull requests in one run to cut CI cost. Names and paths are that repo's; the mechanism is not.
On 2026-09-11 a batch (#2776) merged at 04:45:37Z as squash commit
b61f7fadd3, with the subject quoted at the top of this skill naming four
members. One of them, #2767 (store the option a reviewer was shown so an
unmatched card has somewhere honest to go), was about to be closed as already
landed.
It had not landed. Measured against the target branch it was 261 added and 257 removed lines across four files, including 78 lines in a rulings document and a real behaviour change in application code. The batch branch had been assembled from an older head of #2767, and #2767 kept committing afterwards. It is still OPEN.
All six of #2767's commits predate the batch's merge timestamp, which is what made the wrong answer feel verified. That ordering is guaranteed by the mechanism and proves nothing.
The positive control, from the same repository the same day. A second batch (#2792) merged at 16:20:39Z naming four members, one of which was #2788 (a validator counted three arrays and validated four). The same comparison run on #2788: ancestry NO, and all five of its files byte-identical on the target branch. That member landed, and the check said so. Closing it was right, and it was right for a reason the subject line could not supply.
verify-a-squash-merge-by-content-not-lineage
covers the other half — why the ancestry probe fails after a squash even
when the content is preserved verbatim. This skill is about the case where
the content genuinely is NOT preserved, and every signal except a content
comparison says it is.git merge-base —
--is-ancestor answers reachability in the commit graph, never content
equivalence.git rev-parse —
<rev>:<path> resolves to the blob SHA, which is what makes the
file-by-file comparison in Step 2 exact.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub wan-huiyan/agent-traffic-control --plugin agent-traffic-control118 skills in this plugin
/agent-refusal-with-evidence-beats-literal-complianceA dispatched agent that does exactly what you asked can ship a defect you would
have stopped yourself, because it can see something at the worksite that you
could not see when you wrote the brief. Use when: (1) you are writing a brief
that prescribes a specific fix, threshold, wording or value rather than the
outcome you want; (2) an agent reports that it did not do what you asked and
you are deciding whether that is insubordination or judgement; (3) an agent
asserts "this is fine" or "not needed" with no measurement behind it; (4) you
are reviewing overnight output and want to know which decisions were checked
and which were assumed. Two halves, and both are needed: give the agent
explicit permission to satisfy the INTENT of an instruction while refusing its
letter, and REQUIRE the evidence with the refusal — what it built or measured,
what that showed, what it did instead. Evidence is the whole difference between
a refusal you can bank and one you have to re-litigate. Four agents correctly
declined an instruction in a single run; one built the suggested fix, measured
that it turned a silent safe refusal into a permanently red pipeline, and
reverted it unpushed.
/auto-merge-rearms-while-agent-live-kill-then-disarm-verifyDisarming auto-merge on a PR whose agent is still running does not hold it —
the agent re-arms within minutes and the PR merges, because arming is a step in
the agent's brief and disarming is not an instruction to the agent at all. Use
when: (1) you want to STOP a pull request from merging that an agent opened and
armed, for review, for a rethink, or because it is landing into a queue you are
trying to drain; (2) a PR you disarmed merged anyway; (3) you are telling agents
which PRs are on hold and want the hold to be enforced rather than announced;
(4) you are about to run `gh pr merge --disable-auto` and have not decided what
to do about the agent. The order is KILL THE AGENT FIRST, THEN DISARM, THEN
VERIFY the disarm by reading `autoMergeRequest` back — a disarm you did not read
back is not a hold. The stronger form needs no ordering at all: convert the PR
to a draft with `gh pr ready --undo`. A draft cannot merge whatever any agent
does to it, so the hold survives an agent you missed, an agent that restarts,
and an agent you did not know about.
/batch-member-cites-a-path-only-a-non-member-addsYou wrote something correct that the default reader cannot reach: a batch member citing a
path only a NON-member adds, or a rule, ruling or ledger sitting on an unlanded branch.
/check-a-stale-branch-is-not-undoing-newer-main-workA branch built on an out-of-date main is about to merge, or has merged, and may undo work
that landed since. Use when a green, conflict-free PR deletes files you never touched,
newer values or a whole redesign vanish after a sibling PR merged, rows of a shared ledger
(tracker, registry, CHANGELOG) disappear or revert, or when `git diff main...HEAD` or a
reviewer says your small PR touches dozens of files you did not change.
/ci-leg-skipping-moves-minutes-it-does-not-remove-themYou are about to propose, price or approve a CI cost saving that works by
making a job or matrix leg SKIP on pull requests — a path filter, a safe
list, a changed-files gate, an exemption list. Check first whether the
pipeline runs a complement or backstop on merge, on push, or nightly:
many do, and then the legs a pull request skipped are exactly the legs some
later run executes, so a branch that goes green once and merges bills the
same total either way and the wall clock does not move at all. Use when
pricing a filter change, when a percentage saving is quoted with no basis,
or when choosing between filtering legs and batching pull requests. The
question that separates money from bookkeeping is whether the change
removes RUNS or merely moves LEGS.
/cjk-structured-llm-output-truncates-json-needs-2x-tokensWhen generating LONG Chinese/Japanese/Korean (CJK) STRUCTURED output (a big JSON report, a multi-section
document) from an LLM chat API, the response truncates mid-JSON and your parser throws "no parseable JSON"
/ "Expecting ',' delimiter" / JSONDecodeError — even though the SAME prompt in English worked. Root cause:
CJK is token-heavy (≈1–2 tokens per character vs ≈0.25 for English), so a report that fit your max_tokens in
English overflows it in Chinese. Some models ALSO hard-cap output well below what you request (e.g. qwen-max
caps at 8192) and silently truncate. Use when: a zh/ja/ko structured-generation run fails JSON parsing,
worked in English, or a specific model truncates while others on the same prompt succeed. Covers the ~2×
token budget rule, per-model output caps, and a salvage that recovers the complete sections from a
truncated object.