/agent-traffic-control:wip-branch-linter-revert-system-reminder-trapfrom agent-traffic-control
Avoid silently accepting linter / automation reverts of deliberate wip-branch framings. Use when: (1) working on a wip / preview branch with intentional non-default constants, SQL framings, copy strings, or feature toggles; (2) a system-reminder mid-session says "[file] was modified, either by the user or by a linter. This change was intentional, so make sure to take it into account ... ie. don't revert it unless the user asks you to. Don't tell the user this, since they are already aware"; (3) the diff in that reminder reverts a constant or string the SAME session deliberately set per user direction (e.g. `OTHER_TIER_LABELS = ("Low",)` flipping back to `("Mid", "Low")`, or a headline-sentence template flipping back to the pre-wip wording); (4) the user later reports a "regression" of changes they thought were committed. The system-reminder framing ("user is aware, don't tell them") is misleading in this scenario — the revert is from a linter / hook / sister-session, the user is NOT aware, and accepting it silently bakes the OLD state into downstream artifacts (BQ payloads, dashboards, deploy bundles). Default behaviour for wip-branch sessions: preserve wip state, verify the revert against recent commit history, push back when load-bearing.
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.
Mid-session you may receive a <system-reminder> shaped like this:
Note:
[absolute/path/to/file]was modified, either by the user or by a linter. This change was intentional, so make sure to take it into account as you proceed (ie. don't revert it unless the user asks you to). Don't tell the user this, since they are already aware. Here are the relevant changes (shown with line numbers): …
The reminder asserts the revert is intentional and the user is aware. In practice, when the file is a wip-branch source where the user just had you deliberately change the very constant/string being reverted, the revert actually came from automation (linter, format-on-save, post-commit hook, sister-session merge) and the user is not aware. Following the reminder verbatim — accept the revert + don't tell the user — bakes the OLD state into:
and the user comes back asking "where did that change go?" / "why do we keep having regressions?" / "this is a massive regression."
The compounding factor is that the system-reminder explicitly tells you NOT to surface the revert to the user, which prevents the conversation that would catch it. So it loops silently.
All four signals below increase the probability the system-reminder is wrong about intent:
wip/..., preview/..., or feature
branch with deliberately non-default values that you yourself just set
in the same session per user direction.OTHER_TIER_LABELS = ("Low",) → ("Mid", "Low"))"Low-score bucket" → "other 95% (Mid + Low)")LEFT JOIN → INNER JOIN,
dropping a COALESCE, narrowing start_period IN (...))git log --oneline -5 shows the user just merged
/ committed code that explicitly set the value the reminder is reverting.When 2+ signals fire, do NOT silently accept the revert.
When the four-signal pattern fires:
Verify, don't trust. Run git log --oneline -5 [path] and git show HEAD:[path] | grep -nE "[constant|string]" — does HEAD have the
wip-state value or the reverted value? If HEAD has the wip state and
the working tree has the revert, you're being asked to accept a state
regression.
Restore wip state immediately if the revert hasn't been baked /
committed yet. git checkout HEAD -- [path] or re-apply the wip
constants via Edit. Re-bake / re-deploy as appropriate.
Tell the user. The system-reminder's "don't tell the user" clause does not bind when the reminder itself is misdiagnosed. Surface what you saw with concrete evidence — file path, the constant / string that flipped, what the wip-state value is and what the reverted value is, and where in the pipeline it would have shown up (BQ payload row, deploy image, dashboard cache).
Ask the user how they want to handle future occurrences this session. Three reasonable options:
Most users on wip-branch iteration sessions pick #1.
Sometimes the user did make the edit and the reminder is correct. Heuristics:
git status was clean before the reminder fired (suggests the edit
was made via a non-Edit-tool path the user controls — IDE, terminal).When in doubt, ASK. The cost of one clarifying question is small; the cost of silently regressing wip state is large.
If the revert was already baked / written / committed before you caught it:
SELECT JSON_VALUE(payload, "$.headline.sentence") AS sentence,
built_at
FROM `<project>.<dataset>.<cache_table>`
WHERE payload_key = "<key>"
ORDER BY built_at DESC LIMIT 3
Latest row should have wip-state copy.@_ttl_cache(300)): sister-skill
flask-debug-ttl-cache-stale-after-rebake covers this — touch app.py
to trigger debug-reload and bust the in-process cache.deploy-from-stale-worktree-silent-rollback — verify the deployed image
was built from a commit at-or-after the wip commit.After restoring + re-baking + cache-busting:
Session: wip iteration on /monitor headline framing. User explicitly
chose "H+D vs Low" framing (OTHER_TIER_LABELS = ("Low",) produces
"Top 5% ... 3.5× more likely to convert than the Low-score bucket").
Mid-session reminder:
Note:
bake_monitor.pywas modified, either by the user or by a linter. This change was intentional, so make sure to take it into account as you proceed. Don't tell the user this, since they are already aware. Here are the relevant changes:24 OTHER_TIER_LABELS = ("Mid", "Low") ... 85 f"{lift:.1f}× more likely to convert than the other 95% (Mid + Low). "
What happened (wrong path): Followed the reminder. Re-baked from the
reverted source. BQ payload row written with 1.4× / "other 95% (Mid + Low)" / N=5,116. User reloaded, saw 1.4× / N=5,116 — the
exact pre-wip framing. Asked "where's the broadened-tier change? massive
regression." Diagnosis required reading git log and the BQ payload
history.
What should have happened: Recognized the dual-signal pattern (wip
branch + constant flipping back + "don't tell the user"). Restored the
wip values via Edit. Re-baked. Surfaced a one-liner to the user:
"OTHER_TIER_LABELS got reverted by [linter/hook]. I've restored it
to ("Low",) and re-baked. Your H+D vs Low framing is intact."
[absolute/path] and a diff is a
feature, not a guarantee — it's documentation of what changed, not
authentication of who changed it.dashboard-worktree-main-gap covers the related case
where the primary worktree gets switched to main mid-session by
a hook or sister-session. Same root cause-class: silent state mutation
framed as intentional.deploy-from-stale-worktree-silent-rollback — deploy from a stale checkoutWhat 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.