/agent-traffic-control:executed-prompt-not-retired-sibling-redoes-itfrom agent-traffic-control
A prompt/brief/runbook file and the index that lists it are SHARED STATE between parallel sessions, so finishing the work is only half of finishing: the session that executes a brief must retire it on BOTH surfaces, and the session that writes one must register it, or a sibling redoes work that already merged or never sees the file at all. Use when: (1) you are about to execute a brief from a handoffs/plans/runbooks directory, or an index says "take this one" / "next" / "live, unclaimed"; (2) you have just finished executing such a brief and are writing the wrap-up; (3) you just authored a new prompt for a future session; (4) an index line claims a row count, a "next" pick, or an unclaimed state; (5) a session reports "this was already done" or "the prompt would have re-derived a committed result". Symptoms: the top recommendation names an issue that is CLOSED or a PR that is MERGED; two or more rows both say "next"; the prompt file has no DONE banner though its issue is closed; `ls` of the prompt directory returns files with no row in the index. Checks are cheap and exact — `gh issue view <N> --json state`, `gh pr list --search "<prompt filename>" --state merged`, and `ls <dir>` diffed against the index rows. NOT for a prompt whose PREMISE merely drifted while still being unexecuted (that is handoff-prompt-stale-user-hint-newer-state), and NOT for concurrent writes to a machine-written index (that is shared-mutable-index-rmw-race-use-marker-blob-per-item).
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 keeps session briefs in docs/handoffs/ with an index, next_session_prompt.md, whose
table says which are live. Sessions run in parallel and pick their work off that table.
Session A executes 2026-08-05-registered-scope-drift.md in full: the analysis lands, a ruling
is committed, the issue is closed, the PR merges. Session A writes an excellent handoff about
what it found.
It does not touch the brief it executed, or the row that pointed at it.
An hour later the index still reads:
| 2026-08-05-registered-scope-drift.md | ... | live, unclaimed — **TAKE THIS ONE** |
and the brief itself still opens "Nothing here is blocked and nothing needs the owner to start." A fresh session, told only "read the index and take the top row", starts re-deriving a result that merged an hour ago.
The same repo hit the identical shape twice in one day: a second stream's brief said "task 1: classify the marks", the marks had been classified that morning, and the PR that caught it is titled "the prompt would have commissioned a rival tally against the committed one" — the danger is not just wasted time, it is a second, divergent artifact for a question already answered.
And the mirror-image half: three workstream-*.md prompts sat in the directory for a day
with no row in the index at all, so a session reading only the index could not see them —
including the one stream that could have run to completion that day.
Any of:
Environmental smell: parallel sessions, a solo maintainer who self-merges, and a hand-edited index. Nothing in CI reads prose, so no gate catches any of this.
The brief's own text cannot tell you whether it has been done, because the session that did it is exactly the session that would have updated it. Check the artifacts instead.
# 1. Does the brief name an issue, and is that issue closed?
grep -oE '#[0-9]{2,6}' docs/handoffs/<brief>.md | sort -u | head
gh issue view <N> --json state,title --jq '"\(.state) — \(.title)"'
# 2. Has any merged PR named this brief? PR bodies usually say "Executes <path>".
gh pr list --state merged --limit 60 --search "<brief-filename>" \
--json number,title,mergedAt
# 3. Does an analysis/result artifact already exist for it?
ls docs/analysis/ | grep -i "<topic>"
A CLOSED issue or a merged PR naming the brief means stop and re-scope, not "proceed carefully". If the work is genuinely done, your job is to retire the brief — that is a real, valuable half-hour, and it is the fix for the next session too.
One is not enough. A reader arrives by either path.
The brief file gets a banner at the very top, above the original text:
> ## ✅ DONE <date>, PR #<N> — do not execute this again
>
> <one-paragraph result, with the numbers that changed>
> Ruling: `<decision-id>`. Read the result instead: <link>.
> The brief below is kept unedited as the record of what was asked for.
Keep the body unedited. A brief that silently rewrites itself teaches nothing, and the next reader needs to see what was asked as well as what came back.
The index row changes state and says what it produced, so the row is still useful:
| `<brief>.md` | … | **RETIRED — DONE <date>, PR #N.** <the one-line outcome>; #<issue> closed |
A prompt that exists only in the directory is invisible to anyone using the index, which is what the index is for. Add the row in the commit that adds the file, and give it:
# every prompt on disk that has no row in the index
comm -23 \
<(ls docs/handoffs/*.md | xargs -n1 basename | sort) \
<(grep -oE '\[`[^`]+\.md`\]' docs/handoffs/next_session_prompt.md \
| tr -d '[`]' | sort -u)
Run this whenever you touch the index. Recount the rows from the table and fix the prose count — a number in prose beside an appendable table rots on someone else's commit.
If two do, the index is not ordering anything. Resolve it explicitly, in the index, with the reason — and re-resolve it when a row retires, because retiring the top pick silently promotes whatever was second without anyone deciding that.
# no live row points at a closed issue
grep -oE '#[0-9]{2,6}' docs/handoffs/next_session_prompt.md | sort -u \
| sed 's/#//' | while read n; do
s=$(gh issue view "$n" --json state --jq .state 2>/dev/null)
[ "$s" = "CLOSED" ] && echo "index cites CLOSED #$n — check the row's state"
done
# exactly one "next"
grep -c 'TAKE THIS ONE\|— \*\*next\*\*' docs/handoffs/next_session_prompt.md # want 1
# prose count matches the table
grep -c '^| \[' docs/handoffs/next_session_prompt.md
Real sequence, one repo, one day:
| # | What happened |
|---|---|
| 1 | Session A executes a brief; PR merges; issue closed. Brief and index untouched |
| 2 | Session B is told "read the index" — the top row says TAKE THIS ONE for A's work |
| 3 | Caught only because a human asked "will the index cover all of them?" |
| 4 | Separately, three prompts had no index row for a full day |
| 5 | And an unrelated stream's brief said "task 1: classify the marks" after they were classified — a merged PR is literally titled "the prompt would have commissioned a rival tally" |
Fix shipped in one PR: DONE banner on the brief, row retired with its outcome, three missing rows added, prose count corrected, and the "next" ordering re-resolved because retiring the top pick had silently promoted the second.
handoff-prompt-stale-user-hint-newer-state. Both can fire on the same file.shared-mutable-index-rmw-race-use-marker-blob-per-item does not apply.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.