/agent-traffic-control:clean-merge-lands-line-guard-on-a-value-neither-branch-predictedfrom agent-traffic-control
Two branches each contain a guard, test or document that pins a line NUMBER in a third file, each side correctly re-aims that number for its own tree, and git merges both edits with NO conflict — leaving a merged tree whose real line can be neither number. Use when: (1) two parallel PRs both insert or delete lines in a file that other files cite by line, (2) a merge you just completed touched a test or page that resolves `path:NNN` and the merge was clean, (3) a guard file in your merge result looks "freshly fixed" — touched minutes ago by a competent session for this exact reason — and leaving it alone feels like respecting their work, (4) you are tempted to compute the new line by adding your insertion's size to the old one. A clean auto-merge is evidence of nothing here: conflict is the loud case and this is the quiet one. Re-grep the anchor TEXT on the merged bytes, run the guards before the long test legs, and never carry an offset. NOT for a merge conflict in a generated file (regenerate it instead) and NOT for a stale citation in a dated document, which is correct as of its own commit.
Trending skills
7-day visitors to each skill page
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.
A repo has guards that pin line numbers: a test asserting that handler.py:992
still reads if name not in REGISTRY:, a published page citing
handler.py:1559, a docstring citing handler.py:1582 for the line its own
example came from. They exist because the statement is stable and its address
is not.
Two branches are open. Branch A inserts 22 lines into handler.py and, being
careful, re-aims the three citations that moved — for its tree. Branch B
adds 64 lines to a different file and re-aims the same two guard files — for
its tree. Each side is right. The edits are in different lines of the same
files, so git merges them cleanly.
The merged tree is the first tree either set of numbers has ever been read against, and it can agree with neither. Nothing conflicts, no gate is red at merge time, and the guard fails later — on the base branch, and then on every branch queued behind it.
The trap is psychological rather than technical. After the merge, those guard files look freshly fixed: modified minutes ago, by a competent session, for precisely this reason. Leaving them alone reads as respecting somebody's work rather than as skipping a check.
path:NNNgit log --oneline <base>..origin/main -- <cited file> shows the other side
touched it tooold + lines_I_addedLine-number citations are measurements about one commit, not pointers. Git merges text, so two edits to different lines of the same file combine without complaint; it has no idea that both numbers describe the same moving target in a third file, or that the target moved twice.
This is the same family as a rebase resolving text while leaving values wrong, and it fails in the quiet direction: the merge is clean, both parents' tests passed, and the first red appears after landing.
# the statement is stable; the address is not. Read the address off the result.
grep -n "if name not in REGISTRY:" handler.py
grep -n "label=field.label" handler.py
Never add your insertion's size to the old number. An offset agrees with one parent and is wrong about the merge — and it is wrong invisibly, because the result is a plausible number.
They answer in about a second, and unlike the numbers written in them they are evaluated against the merged tree:
# the guard files themselves, before the long legs
python -m pytest <guard test files> -q -p no:cacheprovider
If they are red, the rest of the local run is wasted — find out first, not twenty minutes later.
Each guard usually says so in its own failure message ("fix the page's citation, not this test"). Where a page the owner has already answered on carries the citation and may not be edited, the remedy is the opposite: move your inserted block below the cited code so the address resolves again, then re-run the whole documentation leg, because moving a block shifts every line between its old and new position.
Those are the three citations above as they read before the 22-line insertion moved them — 970 -> 992, 1537 -> 1559, 1560 -> 1582:
# every file type, not just tests: pages, docstrings, comments, data files
git grep -n "handler\.py:970\|handler\.py:1537\|handler\.py:1560"
# expect zero hits before you commit
grep -n line number
equals the number the citing file states.Observed 2026-09-16 in the repository this came from, across three trees in one morning.
My merge. A runtime branch had inserted a 22-line block into one handler and
re-stamped three citations: one test's reference tuple and one published page's
two figures. The base branch had meanwhile added 64 lines to a different
module and re-aimed the same two guard files for its own tree. git merge
reported Auto-merging on both guard files and no conflict. Measured on the
merged bytes rather than derived: the three anchors resolved at the numbers the
branch had written, and both guards passed — all 22 of their test cases, in
1.00 s. In this instance the clean merge happened to be right, and running the
guards is what established that; the skill's claim is that a clean merge is no
EVIDENCE either way, not that it always lands wrong.
A peer's merge, the same morning (their measurement, relayed to me, not mine). Their side cited lines 3154–3155, the base cited 3189–3190, and the merged tree's real answer was 3194–3195 — a value neither parent predicted. They found it by re-grepping the anchor on the merged bytes instead of carrying an offset.
So of two merges in one morning, one landed exactly where its branch had written and one landed on a number neither parent had written — and the merge looked identically clean in both cases. That is the whole argument for putting the check in the merge routine rather than in a reviewer's memory: the merge's own quietness does not distinguish them.
git show origin/main:<path>), not
the file.merge-conflict-generated-files — the loud sibling: both branches changed a
generated file and it does conflict, so you regenerate from the union of
inputs rather than hand-merging. This skill is the case with no conflict at
all, in hand-authored references.synthetic-id-collision-rebase — identifiers rather than line numbers, and
the LOUD version of it: two branches minting the same id collide as a real
conflict with markers, which is the case this skill is the quiet counterpart
to.conflicted-pr-starts-no-ci-run-push-resolution-first — what to do when the
merge is not clean and no CI run exists to tell you anything.gha-pr-merge-ref-shows-upstream-changes — why CI can see a collision your
branch alone does not have.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.
/batch-merge-subject-is-not-evidence-a-member-landedYou 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.
/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.