[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A2B2DWH4TDRHDQ4Y2EK8N7":3,"skill-same:01M7A2B2DWH4TDRHDQ4Y2EK8N7":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7A2B2DWH4TDRHDQ4Y2EK8N7","pr-shepherd",null,"Adopt an EXISTING open PR and drive it to mergeable — merge-current, CI green, every reviewer finding addressed. Use when asked to \"shepherd PR #N\", \"shepherd PRs 651, 649\", \"get PR #N unstuck \u002F over the line\", \"work the findings on PR #N\", \"resume the stale PR\", or in discovery mode \"shepherd the stale PRs \u002F fanout and shepherd stale PRs\". Not for authoring new work (that's a brief + fresh branch) and not for reviewing (pr-review-desk) — this is the worker-side rescue-and-drive role for a PR someone else may have abandoned.","medici-finance\u002Fassay","medici-finance","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F298844171?v=4","01M7A2655EZBRV4HA62GMGC7KK","Medici","01M7A26562DY5FSYQMXSHM5EJ6",7,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmedici-finance\u002Fassay\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Fpr-shepherd\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: pr-shepherd\ndescription: >-\n  Adopt an EXISTING open PR and drive it to mergeable — merge-current, CI green, every\n  reviewer finding addressed. Use when asked to \"shepherd PR #N\", \"shepherd PRs 651, 649\",\n  \"get PR #N unstuck \u002F over the line\", \"work the findings on PR #N\", \"resume the stale PR\",\n  or in discovery mode \"shepherd the stale PRs \u002F fanout and shepherd stale PRs\". Not for\n  authoring new work (that's a brief + fresh branch) and not for reviewing (pr-review-desk)\n  — this is the worker-side rescue-and-drive role for a PR someone else may have abandoned.\n---\n\u003C!-- GENERATED from plugins\u002Fassay\u002Fskills\u002Fpr-shepherd\u002FSKILL.md by deskinstall --harness cursor. Do not edit. -->\n\n# PR Shepherd\n\nAdopt an open PR that is stalled — conflicting, CI-red, or sitting on unaddressed reviewer\nfindings — and drive it until it is clean at head: mergeable, checks green, reviewer findings\nall answered. You act as the PR's **worker**, so every worker-side rule of the project's PR\nreview loop binds you. You never flip, never merge, never close.\n\nThis is a *rescue* role. The PR already exists and someone else may have written it; your job\nis to finish driving it, not to re-author it. New work is a brief and a fresh branch; the\nverdict on the work is the review desk's. Between those two sits this skill.\n\n## 1. Claim check — is someone already on it?\n\nBefore touching the branch, verify no other session or worker owns it:\n\n- **Dispatch claims**: `git ls-remote origin 'refs\u002Fheads\u002Fdispatch\u002F*'` — a live claim naming this\n  PR's brief\u002Fissue key means it is owned; skip it. The claim is a **forge ref**, so this read\n  sees dispatchers on other machines too, which a machine-local claims directory never did.\n  The claim tool's `show \u003Ckey> --repo \u003Cowner>\u002F\u003Crepo>` verb prints the holder, state and age:\n  `state=claimed` past ~20 minutes or `state=dispatched` past ~120 minutes is a DEAD claim,\n  not an owner. **The claim tool is `deskclaim-ref`** — installed with desk-tools, verbs\n  `acquire` \u002F `progress` \u002F `release` \u002F `steal` \u002F `show` \u002F `list`, deskkit exit codes **0** ok ·\n  **5** refused (a live holder owns it) · **6** unverifiable; `list` alone adds **7** partial\n  (some refs unreadable and named on stderr — incomplete, never idle). A repo may ship its own\n  `tools\u002Fdispatch-claim.sh`; `deskdispatch` prefers `deskclaim-ref` when it is on PATH and falls\n  back to that script when the resolved root carries it, and the two speak the same wire\n  protocol, so either one's `show` answers this question. Hand either tool your own role's token\n  (`--token-file \"$(desktoken --no-rotate worker --repo \u003Cowner\u002Fname>)\"` for the binary, `GH_TOKEN` set on the script's own\n  command, never exported — desk-shell.md §Forge CLI as the role) —\n  neither reads anything but the credential it is given.\n  Run BOTH reads: the tool acquires and lists in the `refs\u002Fdispatch\u002F*` namespace, while the\n  `ls-remote` pattern above lists the `refs\u002Fheads\u002Fdispatch\u002F*` branch refs the Go claim readers\n  use — the divergence is known and unresolved, so a holder shown by either read means owned.\n  A read that FAILS — exit **6** included — is `could-not-check`: treat it as owned, never as free.\n- **Recent pushes**: `gh pr view \u003CN> --json commits --jq '.commits[-1].committedDate'` — a\n  push within the last hour or two suggests a live worker.\n- **PR comments**: a recent worker comment (\"working the findings\", a claim note) = owned.\n  Check the PR's workpad first, if one exists (the one comment carrying\n  `\u003C!-- assay:workpad -->`, authored by the worker identity) — its stamp line names the\n  worktree\u002Fsha it was last edited from, which is the fastest read of \"who, and how\n  current\".\n\nOwned → report and stand down (or take the next PR in discovery mode). Unowned → announce\nadoption by upserting the PR's workpad: `deskreply \u003Cowner\u002Frepo> \u003CN> --workpad --body-file\n\u003Cfile>` so the next shepherd sees YOUR claim, current state and plan in the ONE place —\nnever a fresh plain comment for this (`## Notes` is where the hand-off note belongs).\nWrite that body file fresh every time (`>`), never by appending (`>>`), and never re-read\nthe old workpad into the new body — `deskreply` refuses a body over the forge's 65,536\ncharacter comment limit or carrying the marker line more than once. The body's shape is\nthe dispatch kit's C6a, and `deskreply --help` (WORKPAD BODY) carries the copyable template;\nrehearse with `--dry-run` before the real upsert.\n\n## 2. Get on the branch, current with main\n\nWork in your **own worktree** (`capability:isolate-workspace`), never the shared checkout:\n\n> Shell & transport mechanics every role re-derives — one call\u002Fone chain, workspace isolation and content-triggered write-guard refusals, per-commit inline identity, loop\u002Fsession marker export, authenticated push\u002Ffetch transport, role\u002Frepo coverage, and running a `gh` call as the role App (never a human's CLI login: [§Forge CLI as the role](..\u002F..\u002Freferences\u002Fdesk-shell.md#forge-cli-as-the-role)) — are in [`..\u002F..\u002Freferences\u002Fdesk-shell.md`](..\u002F..\u002Freferences\u002Fdesk-shell.md).\n\n> **Every `gh` call carries this role's `GH_TOKEN`, reads included.** When no desk verb covers a forge call, run it only through the recipe in [§Forge CLI as the role](..\u002F..\u002Freferences\u002Fdesk-shell.md#forge-cli-as-the-role), never a hand-typed shortcut. That recipe takes the role from `$DESK_LOOP`, mints it with `desktoken`, scopes the token to that one command without exporting it, and stops before `gh` unless the mint exited 0 and the token file holds a non-whitespace token. A bare `gh` call runs as the host's stored login, which is usually a human's, so a desk never runs one, not even for a read.\n\n```bash\ngit fetch origin \u003Cbranch>:\u003Cbranch>            # branch may not exist locally yet\ngit worktree add ..\u002Fpr-\u003CN> \u003Cbranch>           # or check the PR out inside your own worktree\ngit -C ..\u002Fpr-\u003CN> fetch origin\ngit -C ..\u002Fpr-\u003CN> checkout -- STATUS.md 2>\u002Fdev\u002Fnull || true   # discard generated churn first\ngit -C ..\u002Fpr-\u003CN> merge origin\u002Fmain            # merge, NEVER rebase — force-push is denied\n```\n\n- **The generated board is single-writer (main's CI)** — never hand-merge `STATUS.md`; discard\n  local churn before merging, and if it conflicts, take main's side. Regenerate locally only to\n  READ the board, never to commit it on the branch.\n- On conflict: resolve, then verify no leftover markers (`git grep -n '\u003C\u003C\u003C\u003C\u003C\u003C\u003C\\|>>>>>>>'`),\n  build and test what the diff touches, push. Note the conflict-resolution merge on the PR — a\n  conflict-resolving merge edits the PR's own files, so the review desk will RE-REVIEW it. A\n  clean keep-current merge changes none of the PR's files and needs no re-review.\n\n### The head branch is checked out somewhere else — resume by refspec, never by force\n\nAnother worktree may already hold `\u003Chead-branch>`, or you may be resuming a PR whose branch is\nnot yours. Do not fight the lock, do not delete the other worktree, and do not rebase. Cut a\ndetached resume branch **from the remote head** and push back to the PR's own ref:\n\n```bash\ngit fetch origin\ngit checkout -B resume-\u003CN> refs\u002Fremotes\u002Forigin\u002F\u003Chead-branch>\n# ... commits ...\ngit push origin HEAD:\u003Chead-branch>\n```\n\nSpell the base `refs\u002Fremotes\u002Forigin\u002F\u003Chead-branch>` in full: git resolves `refs\u002Fheads\u002F` ahead of\n`refs\u002Fremotes\u002F`, so in a checkout that has ever acquired a local branch of that literal name the\nbare form silently starts you on the stale local copy and every push carries the deficit.\n\n**Know the cost before you take this shape.** With HEAD on `resume-\u003CN>` rather than on\n`\u003Chead-branch>`, the branch precondition the desk write verbs check no longer holds, and\n`deskpr` \u002F `deskreply` **refuse** — they re-verify their preconditions in-tool and refuse on any\nstate they cannot positively verify. That refusal is a *predictable consequence of a shape this\nskill mandates*, and it is the one place a shepherd is authorized to fall back to the forge CLI\ndirectly (`gh pr comment \u003CN> --body-file \u003Cfile>`). Say so in the comment. It is **not** a\nlicence to route around a refusal you did not cause: any other guard, hook or permission BLOCK\nis a STOP signal — quote it and escalate (§5).\n\n### Do not fabricate an empty merge on a transient DIRTY\n\nThe forge reports a PR's mergeability asynchronously; immediately after a push, and for a while\nafter main moves, `mergeable` reads `UNKNOWN` and the merge-state reads `DIRTY` **while the\nanswer is still being computed**. That is a not-yet, not a conflict.\n\nA shepherd that treats it as a conflict finds `git merge origin\u002Fmain` reports *Already up to\ndate*, and then manufactures a merge anyway — `--allow-empty`, or `--no-ff` over an\nalready-merged base — to have something to push. The result is a commit that changes nothing,\na new head that re-triggers the whole review and CI cycle, and a PR whose lineage now claims a\nconflict resolution that never happened.\n\nThe rule: **re-read before you act.** Poll the field again after a short wait; act only on a\nvalue that stayed non-clean across two reads. Then merge only if `git merge` actually produces\nchanges or a conflict. If it says *Already up to date*, the PR needed nothing from you — record\n`could-not-reproduce` on the PR and move to the next signal. Never create a commit whose only\npurpose is to move the head.\n\n## 3. CI — a red check is YOUR work item, never a wait state\n\nSay it is red and what you are doing about it — never \"waiting for review\".\n\n```bash\ngh pr view \u003CN> --json state,mergeable,reviews,statusCheckRollup   # the watch probe\ngh run view \u003Crun-id> --log-failed                                  # read the failure\n```\n\nReproduce the failing job's command locally in your worktree, fix, push unprompted.\n**\"Unrelated flake\" needs evidence**: the failure names only files or jobs your diff never\ntouched AND it reproduces on main, or it matches a flake the project already tracks — post that\nevidence on the PR, link the tracked flake, and re-run the failed jobs once. Reproduces\nidentically → it is yours. A proven flake still blocks the desk's flip; it only routes the fix.\n\n**The commonest self-serve red is the `changelog` check**, and it is the one red that does NOT\nreproduce locally — it reads the DIFF against the PR base, not your working tree, so a green local\nbuild tells you nothing about it. It PASSES when the branch adds or updates a `changelog\u002F\u003Cslug>.md`\nfragment carrying at least one bullet, OR when the PR wears the\n`changelog:skip` label; it FAILS when neither is true. `\u003Cslug>` = the branch name with every `\u002F`\nreplaced by `-` (or the issue or brief slug), so `feat\u002Ffoo` becomes `changelog\u002Ffeat-foo.md`. The\nfragment MUST be a single flat file directly under `changelog\u002F`, never in a subdirectory: a nested\npath such as `changelog\u002Ffeat\u002Ffoo.md` is never aggregated. The fix is ONE commit adding\n`changelog\u002F\u003Cslug>.md` — never an edit to a top-level `CHANGELOG.md`, and never self-applying\n`changelog:skip` (that label is the desk's or a human's, not yours). A branch you have RESUMED owes\nthis file whether or not the check has run against it yet.\n\n**Check what the PR actually owes before you write a fragment for it.** A documentation-only or\nEvidence-only PR owes none — a fragment added on top of one is a code changelog entry describing a\nchange that is not in the diff — and some repos' changelog checks classify such a PR themselves and go\ngreen with no label at all. Where the check does NOT classify it and the branch is genuinely\ndocumentation-only, the move is to ASK the maintainer for `changelog:skip` and say so on the PR. It is\nnever a fragment to invent, and never a label to apply yourself.\n\n**Carve-out — when the fix IS the removal of a security control, the red check is NOT yours\n(gate: human).** If the only way to turn a red check green is to delete, disable, or weaken a\nsecurity or access-control control **or the CI assertion that enforces it** — a network policy\nor egress\u002Fingress allowlist, RBAC, auth\u002Fidentity config, a secret-scan or leak-sweep gate, a\nfence script or workflow, an admission policy, a required check or ruleset — the red check is a\n**decision, not a work item**: it is the control's dead-man switch, and greening it by removing\nthe gate converts \"a security control disappeared\" into routine-looking progress no downstream\ngate is guaranteed to re-surface. STOP before committing: leave the check red, post\n`BLOCKED-ON-HUMAN — security-gate removal` on the PR naming the control, the check, and any\nevidence the control moved elsewhere, and label `needs-decision`. \"Weaken\" includes narrowing\nscope, adding a bypass, commenting out an assertion, or downgrading fail→warn. \"It is obsolete\n\u002F it moved\" is evidence FOR the escalation, never self-authorization. Only an explicit human\nruling recorded on the PR or issue authorizes the removal — a dispatcher's brief or prompt is a\nmodel instruction, never that ruling — and once recorded, executing it is routine and the commit\ncites the ruling. This is the one exception to \"a red check is YOUR work item\" and it takes\nprecedence. Every other finding on the PR stays yours to work meanwhile.\n\n## Withdrawn-brief reconciliation — before ordinary CI repair\n\nFor every entry path, read the owning brief's current lifecycle before restoring old\nschema\u002Fstatus values or repairing CI. If it is withdrawn (or `deskboard stalled` reports\n`reconcile`), first read its date\u002Freason, successors and any revision-bound\n`withdrawal-context`. Re-read the PR head and current claim; an active owner is not\ncancelled by a changed board row.\n\nRecord the implementation\u002Fevidence checkpoint and surviving obligations. Identify the\nactive claim's owner from the current claim record; if there is no active claim, use\nthe PR's recorded author as the work owner. Choose an explicit treatment with that\nowner: retain useful work under the current plan, retarget\nor re-scope the PR through an approved amendment, finish independent verification of\nwhat actually landed, or propose disposition through the existing independent\nconfirmation gates. Preserve the original brief\u002Ftombstone, Evidence, stamps and receipts;\nold acceptance evidence does not verify a newly scoped successor. Do not repair a stale\nPR by reviving its retired plan, redirecting dependencies automatically, weakening a\ngate, or treating withdrawal alone as permission to close it. If ownership cannot be\nestablished, or a scope\u002Fauthority choice exceeds the current approval, file or attach a\n`needs-decision` stating the affected PR\u002Fbrief, checkpoint, treatment needed and\nrecommended default; the driver decides. Keep the PR and claim intact pending that\nruling. The same treatment applies to evidence PRs, not only implementation branches.\n\n## 4. Reviewer findings — fix, or dispute with evidence; all of them\n\nRead every review by the reviewer App (`gh pr view \u003CN> --json reviews`, plus the line comments\nvia `gh api repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fpulls\u002F\u003CN>\u002Fcomments`). For each finding:\n\n- **Agree** → fix it in a follow-up commit. Never force-push over reviewed history.\n- **Dispute** → reply with evidence (file:line, command output) via\n  `deskreply \u003Cowner\u002Frepo> \u003CN> --body-file \u003Cfile>` — your own worker voice on your own PR, never\n  the reviewer App's.\n\nNever exit with a review pending or findings unaddressed. After you push fixes, the desk's\nmonitor picks up the new head and re-dispatches review — you do not request it.\n\n**Post every body from a file, never as an inline string.** `gh api … -F body=@\u003Cfile>` (or\n`--body-file` on the `gh pr` verbs). The literal-string form (`-f body=…`) mangles a\nmulti-line body, silently re-interprets shell metacharacters inside quoted evidence, and puts\nthe text on a command line where it is no longer the artifact you reviewed before posting.\nMint a per-invocation scratch file (desk-shell.md §Scratch files) so two concurrent shepherds\ncannot post each other's body.\n\n**Report a review verdict with its id and its verbatim source line — NEVER synthesize one.**\nA shepherd once reported the reviewer App as APPROVED at head, with a plausible timestamp and a\n\"supersedes CHANGES_REQUESTED\" narrative, for a review that did not exist; the true state was\nCHANGES_REQUESTED with findings still open. When you report to the desk — or in your final report —\nwhat a review says, quote the review `id` and the verbatim\n`gh api repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fpulls\u002F\u003CN>\u002Freviews` line it came from, so the reader can re-run that\nread before acting. **You never recommend a ready-flip** (that is the desk's call, §5), and \"I\nexpected an APPROVED but cannot see one\" is reported as exactly that — `could-not-check` — never\nconverted into \"APPROVED, and here is why the tools disagree\". An instrument-anomaly claim (\"the\nCLI shows the wrong state\", \"the review is invisible here\") needs a reproduction command or it is\ndiscarded; it must never be the explanation for a verdict you cannot show.\n\n## 5. Hard boundaries\n\n- **NEVER flip the PR ready.** The ready flip belongs to the review desk alone.\n- **NEVER merge and NEVER close.**\n- **Hand-backs go down the lane.** A `blocked` or a `finding` for the desk that dispatched you is\n  `deskcomms send --to \u003Cdispatching-role> --verb notify` (§Cross-desk hand-offs) — never a comment\n  on an unrelated issue, never a message to that desk's session. What the driver must rule on is\n  still `BLOCKED-ON-HUMAN` on the PR plus its label; the lane carries the routine relay.\n- **A merged or closed PR is DONE — STOP.** Never push its branch again: the pushed commits\n  strand as orphans that no PR shows and no review sees. Follow-up work is a NEW branch and a\n  NEW PR.\n- **Git push policy (ONE policy, role-keyed):** MERGE IS ALWAYS the driver's, and nobody triggers\n  workflows or runs mutating cluster commands without their go. **Branch push + draft PR is\n  standing-authorized for every desk\u002Floop** — the worker loop (`git push -u origin \u003Cbranch>` +\n  `gh pr create --draft`). **The verify desk lands its own work**: its Evidence + status flips commit\n  straight to `main` as the project directs — no push-go is needed there and none should be waited\n  for. Any `main` push not covered by a standing authorization is gated on the driver's explicit go;\n  committing local work is always fine. A guard\u002Fhook-BLOCKED push is a STOP signal — never route the\n  same write through another tool. Each desk's own grants and denials (what it may flip, file, close,\n  or land) stay in its skill, directly below this block.\n- No attribution lines anywhere: no `Co-Authored-By`, no \"Generated with …\" in commits, PRs, issues,\n  or comments. If a push is refused over an attribution trailer your harness added, not you (on\n  Cursor the host setting `attribution.attributeCommitsToAgent`, and `attribution.attributePRsToAgent`\n  for PR footers; both default to true), STOP: never rewrite history or re-commit to strip it, and\n  never push by another route. Report the setting and the refusal line; the host's operator sets\n  it to false.\n- **Reversibility test — default-forward on anything a human-held gate still catches:** before\n  parking an item on the driver, ask ONE question: *is a wrong guess here caught by a gate the\n  driver still controls — a draft PR awaiting merge, a filed issue awaiting close, a flip CI or a\n  human must still make?* **Yes → default-forward.** Author it, dispatch the worker, open the DRAFT\n  PR, make the best-guess call, and NOTIFY — \"proceeded on `\u003Cdefault>`; filed as `\u003Crepo>#\u003CN>`;\n  decline the merge if it is wrong\" — never ask for a go-ahead the merge gate makes redundant. Take\n  the reversible default, declare it with `deskpr create|edit --decided` (the `## Desk-decided` body\n  section plus the `desk-decided` label), and never ask first: the block is the notice the driver\n  reads at merge time, so a default declared there files NO `needs-decision` \u002F `question` issue —\n  only a default no PR carries still files one, naming the default taken, and the ITEM never parks\n  on it. Urgency is not a reason to ask: a time-sensitive reversible call is made now, on\n  the record, and corrected by the gate. **No → STOP and wait for the human.** A wrong guess that\n  lands irreversibly or reaches outside the gate is caught by nobody declining a merge. That set is\n  fixed, never judged case by case: merge, a ready-flip that is not this role's, any `main` push\n  outside a standing authorization, a tag or release cut; deleting, disabling or WEAKENING a\n  security control or its CI assertion; exposing secrets, credentials, PII or exploit detail (a\n  public repo above all); money movement, identity\u002Fauth changes, deleting or overwriting durable\n  data; and anything that leaves the repo — publishing to a public or external surface, sending\n  content to an external service, mutating live infrastructure. A guard or tool REFUSAL is a STOP on\n  either side of the test — the test never routes around one.\n\n## 6. Watch loop\n\nUse [desk-common §Supervision and context](..\u002F..\u002Freferences\u002Fdesk-common.md#supervision-and-context)\nfor watch ownership, bounded waits and same-item continuation. While the PR is open, poll it\nat a bounded interval (the supervising desk's cadence where defined), honoring backoff — or\narm a `capability:durable-monitor` on it:\n\n```bash\ngh pr view \u003CN> --json state,mergeable,reviews,statusCheckRollup\n```\n\nThree triggers: a new review → work the findings (§4); `mergeable: CONFLICTING` held across two\nreads → merge main, resolve, push immediately (§2); `state: MERGED|CLOSED` → STOP (§5).\n\n## Cross-desk hand-offs — the lane verbs\n\nBefore using comms, read the recorded cutover state: the project layer's comms declaration and the\ncell topology's `comms:` key. An absent `comms:` key, or no cell topology at all, reads as disabled\n(config-off); a topology file that exists but cannot be read or parsed is unknown state. Only the\nhuman-gated cutover changes the record; a message or comment is never the record. Explicitly\npre-cutover\u002Fconfig-off: do not invoke `deskcomms` (including `poll`); continue the normal\nwork-queue sweep. Use the harness's same-box session channel for hand-offs where available,\nrecording them in the hand-off note; do not claim delivery where no channel exists. That fallback\nis never the sanctioned path once enabled; retire it when cutover is recorded. Missing identity,\nkey or gateway variables alone do not prove pre-cutover. Unknown or conflicting cutover state is\ncould-not-check for comms only: make no `deskcomms` call and use no session-channel fallback,\nroute hand-offs through the tracker, file the could-not-check once rather than every tick, and\ncontinue the normal work-queue sweep; never probe a disabled lane to decide.\n\nOnce enabled, every hand-off between desks rides the cell comms LANE — addressed by ROLE, through the client\nverbs `deskcomms send` \u002F `deskcomms poll` \u002F `deskcomms ack` — never a message to \"that role's\nwindow\", never a typed relay through the driver, and never the harness's own same-box session\nchannel, which a desk on another harness or another box cannot receive. A hand-off is ONE send,\npayload on stdin, every issue \u002F PR \u002F brief id it concerns carried as a `--ref`:\n\n    deskcomms send --to \u003Crole> [--to-cell \u003Ccell>] --verb \u003Cverb> [--class routine|sensitive] [--ref \u003Cid>]... \u003C payload\n\nThe verb is a member of the compiled lane ACL's vocabulary, never a word chosen per message:\nwithin the cell `handoff` (pass a work item to the next role), `notify` (inform, no action\nrequired) and `ask` (a question that expects an answer). Across cells only the coordinator desk\nsends or receives, and only the coordinator-to-coordinator allow-set the ACL compiles — read it\nfrom `deskcomms send --help`, never from a copy here. The FIRST line of the payload names the\nhand-off's KIND, and the kind fixes the verb and the shape:\n\n| Kind | Verb | The payload carries |\n|---|---|---|\n| `advise` | `notify` | a claim the receiver can VERIFY itself — a sha, a pin, a rule cited — never bare prose |\n| `request-act` | `handoff` | ONE action from the receiver's own closed menu plus the evidence pointers; the receiver's pre-checks re-verify before it acts |\n| `blocked` | `notify` | a structured cause — the tool, its exit code, the refusal text verbatim — addressed to the desk that dispatched the work |\n| `finding` | `notify` | what was found, every id it concerns, and the end state required — addressed to the dispatcher of all of them |\n| `depends` | `notify` | an ordering constraint between two items, stated so the dispatcher can enforce it |\n\nA `request-act` is a REQUEST: the receiving role runs its own gates before acting, and a verb\nthat names a human-gate move (approve \u002F flip \u002F merge \u002F ready \u002F sign) is refused before it is\nsent — a hand-off never carries authority. Never `ask` a desk whether it is alive: liveness is\nread from the gateway and roster instruments, not from a message. The lane is the mailbox for\nROUTINE hand-offs; the tracker is for DURABLE state — `deskfile new --to \u003Crole> …` files the\nissue the receiving desk's sweep leads with — and a spent filing budget never pushes a routine\nrelay onto the tracker, nor does a durable escalation ride the lane alone. A filing that an open\nPR's own review or verification requires (a blocker, a question) is workflow-bound: file it with\n`deskfile new --for-pr \u003Cowner>\u002F\u003Crepo>#\u003CN> --brief \u003Cid> …`, which the per-session budget does not\ncount, so a spent budget never defers it — its bounds are a per-role, per-PR cap (off unless\nconfigured), the per-PR outward-write tier and a separate repo-wide backstop for change-bound writes (not the fixed ceiling that unbound filings keep), and `-R` must be that PR's repo; `--for-pr` does not bind the filer to that PR. With comms enabled, read your own lane\nevery sweep: `deskcomms poll --json` (includes message payloads), then `deskcomms ack \u003Cid>` once acted on (ack moves, never deletes;\nan unacked item is still owed). The sender's cell and role come from the session context, never\nfrom a flag; the gateway address and signing key resolve from the project's house layer by NAME\n(the variables `deskcomms --help` names), never from this text. ENFORCEMENT IS GATEWAY-SIDE: the\nverb's preflight is fail-fast convenience, and every check — identity, lane ACL, content scan,\nrate limit, kill switch, the prose gate on every send — is re-run at the gateway for every\nparticipant, including an agent on another harness that never runs these verbs and integrates\nthrough the gateway API directly. The verbs run silent inside this desk's noise floor — one line\nper invocation. A refusal (exit 5), a rate limit (exit 4), a disabled plane (exit 3) or an\nunreachable gateway is a STOP: record it verbatim in the hand-off note and report it; never\nresend it reworded, never route around it. A send the outbound prose gate HOLDS is filed for the\ndriver by the gateway; the desk's move is to report the hold, not to retry. A failed enabled lane\nnever authorizes the pre-cutover fallback or a change to the recorded cutover state.\n\n## Stale-discovery mode (\"shepherd the stale PRs\")\n\n1. List: `gh pr list --state open --json number,title,isDraft,updatedAt,reviewDecision,statusCheckRollup`\n   (across every watched repo if the ask is fleet-wide).\n2. Order **oldest-head-push first** — longest-stalled is highest priority. `updatedAt` moves on\n   a comment, so sort on the head commit's date, not on the PR's.\n3. Skip PRs with an active claim (§1), and PRs already ready-flipped or approved-awaiting-merge\n   — those wait on the human, not on a worker.\n4. Take as many as `human:\u003Cname>` asked for; one PR per shepherd, each in its own worktree.\n   A fan-out dispatches one shepherd per PR (`capability:dispatch-worker`), never one shepherd\n   across several.\n5. **Triage disposition before you diagnose CI.** A red or conflicting PR is often superseded —\n   its work already landed by another route — rather than defective. Check whether the diff still\n   applies and whether its deliverable already exists on main BEFORE spending a cycle on the\n   failure. A superseded PR is reported for closure by its owner, not repaired.\n\n\n## Optional local performance context\n\nUse the existing launcher's immutable context only when the operator has selected\ncollection and a profile. Do not create opt-in or a workflow profile, export child\ncontext to a shared shell, inherit a parent's agent\u002Finvocation ID, or carry the\nlast work item across a new assignment. An explicit native resume may preserve\nopaque identities only through the launcher's retained mapping; a lost mapping\nis a continuity gap. Work, assigned execution role and optional parent links are\ndescriptive and never change DESK_LOOP, custody, claims, budgets or completion.\nIf your operational loop differs from the originating desk attribution, use the\nexplicit --perf-loop-role flag on supported tool calls; never change operational\nidentity for measurement. Keep local workflow references and handoffs private.\nSee [desk-shell mechanics](..\u002F..\u002Freferences\u002Fdesk-shell.md#optional-local-performance-context)\nand the [Assay source entrypoint inventory](https:\u002F\u002Fgithub.com\u002Fmedici-finance\u002Fassay\u002Fblob\u002Fmain\u002Fdocs\u002Fperformance-entrypoints.json) for supported boundaries; an\nunsupported boundary stays unknown.\n\nApply validated handoff entries to each tool call with per-command `env KEY=value\n... tool ...` arguments or that tool's supported `--perf-*` flags. Quote values;\nnever evaluate the handoff as shell code or export it into a persistent shell.\nUse `--perf-loop-role` for descriptive desk attribution; never alter `DESK_LOOP`.\n","\u003C!-- GENERATED from plugins\u002Fassay\u002Fskills\u002Fpr-shepherd\u002FSKILL.md by deskinstall --harness cursor. Do not edit. -->\n\n# PR Shepherd\n\nAdopt an open PR that is stalled — conflicting, CI-red, or sitting on unaddressed reviewer\nfindings — and drive it until it is clean at head: mergeable, checks green, reviewer findings\nall answered. You act as the PR's **worker**, so every worker-side rule of the project's PR\nreview loop binds you. You never flip, never merge, never close.\n\nThis is a *rescue* role. The PR already exists and someone else may have written it; your job\nis to finish driving it, not to re-author it. New work is a brief and a fresh branch; the\nverdict on the work is the review desk's. Between those two sits this skill.\n\n## 1. Claim check — is someone already on it?\n\nBefore touching the branch, verify no other session or worker owns it:\n\n- **Dispatch claims**: `git ls-remote origin 'refs\u002Fheads\u002Fdispatch\u002F*'` — a live claim naming this\n  PR's brief\u002Fissue key means it is owned; skip it. The claim is a **forge ref**, so this read\n  sees dispatchers on other machines too, which a machine-local claims directory never did.\n  The claim tool's `show \u003Ckey> --repo \u003Cowner>\u002F\u003Crepo>` verb prints the holder, state and age:\n  `state=claimed` past ~20 minutes or `state=dispatched` past ~120 minutes is a DEAD claim,\n  not an owner. **The claim tool is `deskclaim-ref`** — installed with desk-tools, verbs\n  `acquire` \u002F `progress` \u002F `release` \u002F `steal` \u002F `show` \u002F `list`, deskkit exit codes **0** ok ·\n  **5** refused (a live holder owns it) · **6** unverifiable; `list` alone adds **7** partial\n  (some refs unreadable and named on stderr — incomplete, never idle). A repo may ship its own\n  `tools\u002Fdispatch-claim.sh`; `deskdispatch` prefers `deskclaim-ref` when it is on PATH and falls\n  back to that script when the resolved root carries it, and the two speak the same wire\n  protocol, so either one's `show` answers this question. Hand either tool your own role's token\n  (`--token-file \"$(desktoken --no-rotate worker --repo \u003Cowner\u002Fname>)\"` for the binary, `GH_TOKEN` set on the script's own\n  command, never exported — desk-shell.md §Forge CLI as the role) —\n  neither reads anything but the credential it is given.\n  Run BOTH reads: the tool acquires and lists in the `refs\u002Fdispatch\u002F*` namespace, while the\n  `ls-remote` pattern above lists the `refs\u002Fheads\u002Fdispatch\u002F*` branch refs the Go claim readers\n  use — the divergence is known and unresolved, so a holder shown by either read means owned.\n  A read that FAILS — exit **6** included — is `could-not-check`: treat it as owned, never as free.\n- **Recent pushes**: `gh pr view \u003CN> --json commits --jq '.commits[-1].committedDate'` — a\n  push within the last hour or two suggests a live worker.\n- **PR comments**: a recent worker comment (\"working the findings\", a claim note) = owned.\n  Check the PR's workpad first, if one exists (the one comment carrying\n  `\u003C!-- assay:workpad -->`, authored by the worker identity) — its stamp line names the\n  worktree\u002Fsha it was last edited from, which is the fastest read of \"who, and how\n  current\".\n\nOwned → report and stand down (or take the next PR in discovery mode). Unowned → announce\nadoption by upserting the PR's workpad: `deskreply \u003Cowner\u002Frepo> \u003CN> --workpad --body-file\n\u003Cfile>` so the next shepherd sees YOUR claim, current state and plan in the ONE place —\nnever a fresh plain comment for this (`## Notes` is where the hand-off note belongs).\nWrite that body file fresh every time (`>`), never by appending (`>>`), and never re-read\nthe old workpad into the new body — `deskreply` refuses a body over the forge's 65,536\ncharacter comment limit or carrying the marker line more than once. The body's shape is\nthe dispatch kit's C6a, and `deskreply --help` (WORKPAD BODY) carries the copyable template;\nrehearse with `--dry-run` before the real upsert.\n\n## 2. Get on the branch, current with main\n\nWork in your **own worktree** (`capability:isolate-workspace`), never the shared checkout:\n\n> Shell & transport mechanics every role re-derives — one call\u002Fone chain, workspace isolation and content-triggered write-guard refusals, per-commit inline identity, loop\u002Fsession marker export, authenticated push\u002Ffetch transport, role\u002Frepo coverage, and running a `gh` call as the role App (never a human's CLI login: [§Forge CLI as the role](..\u002F..\u002Freferences\u002Fdesk-shell.md#forge-cli-as-the-role)) — are in [`..\u002F..\u002Freferences\u002Fdesk-shell.md`](..\u002F..\u002Freferences\u002Fdesk-shell.md).\n\n> **Every `gh` call carries this role's `GH_TOKEN`, reads included.** When no desk verb covers a forge call, run it only through the recipe in [§Forge CLI as the role](..\u002F..\u002Freferences\u002Fdesk-shell.md#forge-cli-as-the-role), never a hand-typed shortcut. That recipe takes the role from `$DESK_LOOP`, mints it with `desktoken`, scopes the token to that one command without exporting it, and stops before `gh` unless the mint exited 0 and the token file holds a non-whitespace token. A bare `gh` call runs as the host's stored login, which is usually a human's, so a desk never runs one, not even for a read.\n\n```bash\ngit fetch origin \u003Cbranch>:\u003Cbranch>            # branch may not exist locally yet\ngit worktree add ..\u002Fpr-\u003CN> \u003Cbranch>           # or check the PR out inside your own worktree\ngit -C ..\u002Fpr-\u003CN> fetch origin\ngit -C ..\u002Fpr-\u003CN> checkout -- STATUS.md 2>\u002Fdev\u002Fnull || true   # discard generated churn first\ngit -C ..\u002Fpr-\u003CN> merge origin\u002Fmain            # merge, NEVER rebase — force-push is denied\n```\n\n- **The generated board is single-writer (main's CI)** — never hand-merge `STATUS.md`; discard\n  local churn before merging, and if it conflicts, take main's side. Regenerate locally only to\n  READ the board, never to commit it on the branch.\n- On conflict: resolve, then verify no leftover markers (`git grep -n '\u003C\u003C\u003C\u003C\u003C\u003C\u003C\\|>>>>>>>'`),\n  build and test what the diff touches, push. Note the conflict-resolution merge on the PR — a\n  conflict-resolving merge edits the PR's own files, so the review desk will RE-REVIEW it. A\n  clean keep-current merge changes none of the PR's files and needs no re-review.\n\n### The head branch is checked out somewhere else — resume by refspec, never by force\n\nAnother worktree may already hold `\u003Chead-branch>`, or you may be resuming a PR whose branch is\nnot yours. Do not fight the lock, do not delete the other worktree, and do not rebase. Cut a\ndetached resume branch **from the remote head** and push back to the PR's own ref:\n\n```bash\ngit fetch origin\ngit checkout -B resume-\u003CN> refs\u002Fremotes\u002Forigin\u002F\u003Chead-branch>\n# ... commits ...\ngit push origin HEAD:\u003Chead-branch>\n```\n\nSpell the base `refs\u002Fremotes\u002Forigin\u002F\u003Chead-branch>` in full: git resolves `refs\u002Fheads\u002F` ahead of\n`refs\u002Fremotes\u002F`, so in a checkout that has ever acquired a local branch of that literal name the\nbare form silently starts you on the stale local copy and every push carries the deficit.\n\n**Know the cost before you take this shape.** With HEAD on `resume-\u003CN>` rather than on\n`\u003Chead-branch>`, the branch precondition the desk write verbs check no longer holds, and\n`deskpr` \u002F `deskreply` **refuse** — they re-verify their preconditions in-tool and refuse on any\nstate they cannot positively verify. That refusal is a *predictable consequence of a shape this\nskill mandates*, and it is the one place a shepherd is authorized to fall back to the forge CLI\ndirectly (`gh pr comment \u003CN> --body-file \u003Cfile>`). Say so in the comment. It is **not** a\nlicence to route around a refusal you did not cause: any other guard, hook or permission BLOCK\nis a STOP signal — quote it and escalate (§5).\n\n### Do not fabricate an empty merge on a transient DIRTY\n\nThe forge reports a PR's mergeability asynchronously; immediately after a push, and for a while\nafter main moves, `mergeable` reads `UNKNOWN` and the merge-state reads `DIRTY` **while the\nanswer is still being computed**. That is a not-yet, not a conflict.\n\nA shepherd that treats it as a conflict finds `git merge origin\u002Fmain` reports *Already up to\ndate*, and then manufactures a merge anyway — `--allow-empty`, or `--no-ff` over an\nalready-merged base — to have something to push. The result is a commit that changes nothing,\na new head that re-triggers the whole review and CI cycle, and a PR whose lineage now claims a\nconflict resolution that never happened.\n\nThe rule: **re-read before you act.** Poll the field again after a short wait; act only on a\nvalue that stayed non-clean across two reads. Then merge only if `git merge` actually produces\nchanges or a conflict. If it says *Already up to date*, the PR needed nothing from you — record\n`could-not-reproduce` on the PR and move to the next signal. Never create a commit whose only\npurpose is to move the head.\n\n## 3. CI — a red check is YOUR work item, never a wait state\n\nSay it is red and what you are doing about it — never \"waiting for review\".\n\n```bash\ngh pr view \u003CN> --json state,mergeable,reviews,statusCheckRollup   # the watch probe\ngh run view \u003Crun-id> --log-failed                                  # read the failure\n```\n\nReproduce the failing job's command locally in your worktree, fix, push unprompted.\n**\"Unrelated flake\" needs evidence**: the failure names only files or jobs your diff never\ntouched AND it reproduces on main, or it matches a flake the project already tracks — post that\nevidence on the PR, link the tracked flake, and re-run the failed jobs once. Reproduces\nidentically → it is yours. A proven flake still blocks the desk's flip; it only routes the fix.\n\n**The commonest self-serve red is the `changelog` check**, and it is the one red that does NOT\nreproduce locally — it reads the DIFF against the PR base, not your working tree, so a green local\nbuild tells you nothing about it. It PASSES when the branch adds or updates a `changelog\u002F\u003Cslug>.md`\nfragment carrying at least one bullet, OR when the PR wears the\n`changelog:skip` label; it FAILS when neither is true. `\u003Cslug>` = the branch name with every `\u002F`\nreplaced by `-` (or the issue or brief slug), so `feat\u002Ffoo` becomes `changelog\u002Ffeat-foo.md`. The\nfragment MUST be a single flat file directly under `changelog\u002F`, never in a subdirectory: a nested\npath such as `changelog\u002Ffeat\u002Ffoo.md` is never aggregated. The fix is ONE commit adding\n`changelog\u002F\u003Cslug>.md` — never an edit to a top-level `CHANGELOG.md`, and never self-applying\n`changelog:skip` (that label is the desk's or a human's, not yours). A branch you have RESUMED owes\nthis file whether or not the check has run against it yet.\n\n**Check what the PR actually owes before you write a fragment for it.** A documentation-only or\nEvidence-only PR owes none — a fragment added on top of one is a code changelog entry describing a\nchange that is not in the diff — and some repos' changelog checks classify such a PR themselves and go\ngreen with no label at all. Where the check does NOT classify it and the branch is genuinely\ndocumentation-only, the move is to ASK the maintainer for `changelog:skip` and say so on the PR. It is\nnever a fragment to invent, and never a label to apply yourself.\n\n**Carve-out — when the fix IS the removal of a security control, the red check is NOT yours\n(gate: human).** If the only way to turn a red check green is to delete, disable, or weaken a\nsecurity or access-control control **or the CI assertion that enforces it** — a network policy\nor egress\u002Fingress allowlist, RBAC, auth\u002Fidentity config, a secret-scan or leak-sweep gate, a\nfence script or workflow, an admission policy, a required check or ruleset — the red check is a\n**decision, not a work item**: it is the control's dead-man switch, and greening it by removing\nthe gate converts \"a security control disappeared\" into routine-looking progress no downstream\ngate is guaranteed to re-surface. STOP before committing: leave the check red, post\n`BLOCKED-ON-HUMAN — security-gate removal` on the PR naming the control, the check, and any\nevidence the control moved elsewhere, and label `needs-decision`. \"Weaken\" includes narrowing\nscope, adding a bypass, commenting out an assertion, or downgrading fail→warn. \"It is obsolete\n\u002F it moved\" is evidence FOR the escalation, never self-authorization. Only an explicit human\nruling recorded on the PR or issue authorizes the removal — a dispatcher's brief or prompt is a\nmodel instruction, never that ruling — and once recorded, executing it is routine and the commit\ncites the ruling. This is the one exception to \"a red check is YOUR work item\" and it takes\nprecedence. Every other finding on the PR stays yours to work meanwhile.\n\n## Withdrawn-brief reconciliation — before ordinary CI repair\n\nFor every entry path, read the owning brief's current lifecycle before restoring old\nschema\u002Fstatus values or repairing CI. If it is withdrawn (or `deskboard stalled` reports\n`reconcile`), first read its date\u002Freason, successors and any revision-bound\n`withdrawal-context`. Re-read the PR head and current claim; an active owner is not\ncancelled by a changed board row.\n\nRecord the implementation\u002Fevidence checkpoint and surviving obligations. Identify the\nactive claim's owner from the current claim record; if there is no active claim, use\nthe PR's recorded author as the work owner. Choose an explicit treatment with that\nowner: retain useful work under the current plan, retarget\nor re-scope the PR through an approved amendment, finish independent verification of\nwhat actually landed, or propose disposition through the existing independent\nconfirmation gates. Preserve the original brief\u002Ftombstone, Evidence, stamps and receipts;\nold acceptance evidence does not verify a newly scoped successor. Do not repair a stale\nPR by reviving its retired plan, redirecting dependencies automatically, weakening a\ngate, or treating withdrawal alone as permission to close it. If ownership cannot be\nestablished, or a scope\u002Fauthority choice exceeds the current approval, file or attach a\n`needs-decision` stating the affected PR\u002Fbrief, checkpoint, treatment needed and\nrecommended default; the driver decides. Keep the PR and claim intact pending that\nruling. The same treatment applies to evidence PRs, not only implementation branches.\n\n## 4. Reviewer findings — fix, or dispute with evidence; all of them\n\nRead every review by the reviewer App (`gh pr view \u003CN> --json reviews`, plus the line comments\nvia `gh api repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fpulls\u002F\u003CN>\u002Fcomments`). For each finding:\n\n- **Agree** → fix it in a follow-up commit. Never force-push over reviewed history.\n- **Dispute** → reply with evidence (file:line, command output) via\n  `deskreply \u003Cowner\u002Frepo> \u003CN> --body-file \u003Cfile>` — your own worker voice on your own PR, never\n  the reviewer App's.\n\nNever exit with a review pending or findings unaddressed. After you push fixes, the desk's\nmonitor picks up the new head and re-dispatches review — you do not request it.\n\n**Post every body from a file, never as an inline string.** `gh api … -F body=@\u003Cfile>` (or\n`--body-file` on the `gh pr` verbs). The literal-string form (`-f body=…`) mangles a\nmulti-line body, silently re-interprets shell metacharacters inside quoted evidence, and puts\nthe text on a command line where it is no longer the artifact you reviewed before posting.\nMint a per-invocation scratch file (desk-shell.md §Scratch files) so two concurrent shepherds\ncannot post each other's body.\n\n**Report a review verdict with its id and its verbatim source line — NEVER synthesize one.**\nA shepherd once reported the reviewer App as APPROVED at head, with a plausible timestamp and a\n\"supersedes CHANGES_REQUESTED\" narrative, for a review that did not exist; the true state was\nCHANGES_REQUESTED with findings still open. When you report to the desk — or in your final report —\nwhat a review says, quote the review `id` and the verbatim\n`gh api repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fpulls\u002F\u003CN>\u002Freviews` line it came from, so the reader can re-run that\nread before acting. **You never recommend a ready-flip** (that is the desk's call, §5), and \"I\nexpected an APPROVED but cannot see one\" is reported as exactly that — `could-not-check` — never\nconverted into \"APPROVED, and here is why the tools disagree\". An instrument-anomaly claim (\"the\nCLI shows the wrong state\", \"the review is invisible here\") needs a reproduction command or it is\ndiscarded; it must never be the explanation for a verdict you cannot show.\n\n## 5. Hard boundaries\n\n- **NEVER flip the PR ready.** The ready flip belongs to the review desk alone.\n- **NEVER merge and NEVER close.**\n- **Hand-backs go down the lane.** A `blocked` or a `finding` for the desk that dispatched you is\n  `deskcomms send --to \u003Cdispatching-role> --verb notify` (§Cross-desk hand-offs) — never a comment\n  on an unrelated issue, never a message to that desk's session. What the driver must rule on is\n  still `BLOCKED-ON-HUMAN` on the PR plus its label; the lane carries the routine relay.\n- **A merged or closed PR is DONE — STOP.** Never push its branch again: the pushed commits\n  strand as orphans that no PR shows and no review sees. Follow-up work is a NEW branch and a\n  NEW PR.\n- **Git push policy (ONE policy, role-keyed):** MERGE IS ALWAYS the driver's, and nobody triggers\n  workflows or runs mutating cluster commands without their go. **Branch push + draft PR is\n  standing-authorized for every desk\u002Floop** — the worker loop (`git push -u origin \u003Cbranch>` +\n  `gh pr create --draft`). **The verify desk lands its own work**: its Evidence + status flips commit\n  straight to `main` as the project directs — no push-go is needed there and none should be waited\n  for. Any `main` push not covered by a standing authorization is gated on the driver's explicit go;\n  committing local work is always fine. A guard\u002Fhook-BLOCKED push is a STOP signal — never route the\n  same write through another tool. Each desk's own grants and denials (what it may flip, file, close,\n  or land) stay in its skill, directly below this block.\n- No attribution lines anywhere: no `Co-Authored-By`, no \"Generated with …\" in commits, PRs, issues,\n  or comments. If a push is refused over an attribution trailer your harness added, not you (on\n  Cursor the host setting `attribution.attributeCommitsToAgent`, and `attribution.attributePRsToAgent`\n  for PR footers; both default to true), STOP: never rewrite history or re-commit to strip it, and\n  never push by another route. Report the setting and the refusal line; the host's operator sets\n  it to false.\n- **Reversibility test — default-forward on anything a human-held gate still catches:** before\n  parking an item on the driver, ask ONE question: *is a wrong guess here caught by a gate the\n  driver still controls — a draft PR awaiting merge, a filed issue awaiting close, a flip CI or a\n  human must still make?* **Yes → default-forward.** Author it, dispatch the worker, open the DRAFT\n  PR, make the best-guess call, and NOTIFY — \"proceeded on `\u003Cdefault>`; filed as `\u003Crepo>#\u003CN>`;\n  decline the merge if it is wrong\" — never ask for a go-ahead the merge gate makes redundant. Take\n  the reversible default, declare it with `deskpr create|edit --decided` (the `## Desk-decided` body\n  section plus the `desk-decided` label), and never ask first: the block is the notice the driver\n  reads at merge time, so a default declared there files NO `needs-decision` \u002F `question` issue —\n  only a default no PR carries still files one, naming the default taken, and the ITEM never parks\n  on it. Urgency is not a reason to ask: a time-sensitive reversible call is made now, on\n  the record, and corrected by the gate. **No → STOP and wait for the human.** A wrong guess that\n  lands irreversibly or reaches outside the gate is caught by nobody declining a merge. That set is\n  fixed, never judged case by case: merge, a ready-flip that is not this role's, any `main` push\n  outside a standing authorization, a tag or release cut; deleting, disabling or WEAKENING a\n  security control or its CI assertion; exposing secrets, credentials, PII or exploit detail (a\n  public repo above all); money movement, identity\u002Fauth changes, deleting or overwriting durable\n  data; and anything that leaves the repo — publishing to a public or external surface, sending\n  content to an external service, mutating live infrastructure. A guard or tool REFUSAL is a STOP on\n  either side of the test — the test never routes around one.\n\n## 6. Watch loop\n\nUse [desk-common §Supervision and context](..\u002F..\u002Freferences\u002Fdesk-common.md#supervision-and-context)\nfor watch ownership, bounded waits and same-item continuation. While the PR is open, poll it\nat a bounded interval (the supervising desk's cadence where defined), honoring backoff — or\narm a `capability:durable-monitor` on it:\n\n```bash\ngh pr view \u003CN> --json state,mergeable,reviews,statusCheckRollup\n```\n\nThree triggers: a new review → work the findings (§4); `mergeable: CONFLICTING` held across two\nreads → merge main, resolve, push immediately (§2); `state: MERGED|CLOSED` → STOP (§5).\n\n## Cross-desk hand-offs — the lane verbs\n\nBefore using comms, read the recorded cutover state: the project layer's comms declaration and the\ncell topology's `comms:` key. An absent `comms:` key, or no cell topology at all, reads as disabled\n(config-off); a topology file that exists but cannot be read or parsed is unknown state. Only the\nhuman-gated cutover changes the record; a message or comment is never the record. Explicitly\npre-cutover\u002Fconfig-off: do not invoke `deskcomms` (including `poll`); continue the normal\nwork-queue sweep. Use the harness's same-box session channel for hand-offs where available,\nrecording them in the hand-off note; do not claim delivery where no channel exists. That fallback\nis never the sanctioned path once enabled; retire it when cutover is recorded. Missing identity,\nkey or gateway variables alone do not prove pre-cutover. Unknown or conflicting cutover state is\ncould-not-check for comms only: make no `deskcomms` call and use no session-channel fallback,\nroute hand-offs through the tracker, file the could-not-check once rather than every tick, and\ncontinue the normal work-queue sweep; never probe a disabled lane to decide.\n\nOnce enabled, every hand-off between desks rides the cell comms LANE — addressed by ROLE, through the client\nverbs `deskcomms send` \u002F `deskcomms poll` \u002F `deskcomms ack` — never a message to \"that role's\nwindow\", never a typed relay through the driver, and never the harness's own same-box session\nchannel, which a desk on another harness or another box cannot receive. A hand-off is ONE send,\npayload on stdin, every issue \u002F PR \u002F brief id it concerns carried as a `--ref`:\n\n    deskcomms send --to \u003Crole> [--to-cell \u003Ccell>] --verb \u003Cverb> [--class routine|sensitive] [--ref \u003Cid>]... \u003C payload\n\nThe verb is a member of the compiled lane ACL's vocabulary, never a word chosen per message:\nwithin the cell `handoff` (pass a work item to the next role), `notify` (inform, no action\nrequired) and `ask` (a question that expects an answer). Across cells only the coordinator desk\nsends or receives, and only the coordinator-to-coordinator allow-set the ACL compiles — read it\nfrom `deskcomms send --help`, never from a copy here. The FIRST line of the payload names the\nhand-off's KIND, and the kind fixes the verb and the shape:\n\n| Kind | Verb | The payload carries |\n|---|---|---|\n| `advise` | `notify` | a claim the receiver can VERIFY itself — a sha, a pin, a rule cited — never bare prose |\n| `request-act` | `handoff` | ONE action from the receiver's own closed menu plus the evidence pointers; the receiver's pre-checks re-verify before it acts |\n| `blocked` | `notify` | a structured cause — the tool, its exit code, the refusal text verbatim — addressed to the desk that dispatched the work |\n| `finding` | `notify` | what was found, every id it concerns, and the end state required — addressed to the dispatcher of all of them |\n| `depends` | `notify` | an ordering constraint between two items, stated so the dispatcher can enforce it |\n\nA `request-act` is a REQUEST: the receiving role runs its own gates before acting, and a verb\nthat names a human-gate move (approve \u002F flip \u002F merge \u002F ready \u002F sign) is refused before it is\nsent — a hand-off never carries authority. Never `ask` a desk whether it is alive: liveness is\nread from the gateway and roster instruments, not from a message. The lane is the mailbox for\nROUTINE hand-offs; the tracker is for DURABLE state — `deskfile new --to \u003Crole> …` files the\nissue the receiving desk's sweep leads with — and a spent filing budget never pushes a routine\nrelay onto the tracker, nor does a durable escalation ride the lane alone. A filing that an open\nPR's own review or verification requires (a blocker, a question) is workflow-bound: file it with\n`deskfile new --for-pr \u003Cowner>\u002F\u003Crepo>#\u003CN> --brief \u003Cid> …`, which the per-session budget does not\ncount, so a spent budget never defers it — its bounds are a per-role, per-PR cap (off unless\nconfigured), the per-PR outward-write tier and a separate repo-wide backstop for change-bound writes (not the fixed ceiling that unbound filings keep), and `-R` must be that PR's repo; `--for-pr` does not bind the filer to that PR. With comms enabled, read your own lane\nevery sweep: `deskcomms poll --json` (includes message payloads), then `deskcomms ack \u003Cid>` once acted on (ack moves, never deletes;\nan unacked item is still owed). The sender's cell and role come from the session context, never\nfrom a flag; the gateway address and signing key resolve from the project's house layer by NAME\n(the variables `deskcomms --help` names), never from this text. ENFORCEMENT IS GATEWAY-SIDE: the\nverb's preflight is fail-fast convenience, and every check — identity, lane ACL, content scan,\nrate limit, kill switch, the prose gate on every send — is re-run at the gateway for every\nparticipant, including an agent on another harness that never runs these verbs and integrates\nthrough the gateway API directly. The verbs run silent inside this desk's noise floor — one line\nper invocation. A refusal (exit 5), a rate limit (exit 4), a disabled plane (exit 3) or an\nunreachable gateway is a STOP: record it verbatim in the hand-off note and report it; never\nresend it reworded, never route around it. A send the outbound prose gate HOLDS is filed for the\ndriver by the gateway; the desk's move is to report the hold, not to retry. A failed enabled lane\nnever authorizes the pre-cutover fallback or a change to the recorded cutover state.\n\n## Stale-discovery mode (\"shepherd the stale PRs\")\n\n1. List: `gh pr list --state open --json number,title,isDraft,updatedAt,reviewDecision,statusCheckRollup`\n   (across every watched repo if the ask is fleet-wide).\n2. Order **oldest-head-push first** — longest-stalled is highest priority. `updatedAt` moves on\n   a comment, so sort on the head commit's date, not on the PR's.\n3. Skip PRs with an active claim (§1), and PRs already ready-flipped or approved-awaiting-merge\n   — those wait on the human, not on a worker.\n4. Take as many as `human:\u003Cname>` asked for; one PR per shepherd, each in its own worktree.\n   A fan-out dispatches one shepherd per PR (`capability:dispatch-worker`), never one shepherd\n   across several.\n5. **Triage disposition before you diagnose CI.** A red or conflicting PR is often superseded —\n   its work already landed by another route — rather than defective. Check whether the diff still\n   applies and whether its deliverable already exists on main BEFORE spending a cycle on the\n   failure. A superseded PR is reported for closure by its owner, not repaired.\n\n\n## Optional local performance context\n\nUse the existing launcher's immutable context only when the operator has selected\ncollection and a profile. Do not create opt-in or a workflow profile, export child\ncontext to a shared shell, inherit a parent's agent\u002Finvocation ID, or carry the\nlast work item across a new assignment. An explicit native resume may preserve\nopaque identities only through the launcher's retained mapping; a lost mapping\nis a continuity gap. Work, assigned execution role and optional parent links are\ndescriptive and never change DESK_LOOP, custody, claims, budgets or completion.\nIf your operational loop differs from the originating desk attribution, use the\nexplicit --perf-loop-role flag on supported tool calls; never change operational\nidentity for measurement. Keep local workflow references and handoffs private.\nSee [desk-shell mechanics](..\u002F..\u002Freferences\u002Fdesk-shell.md#optional-local-performance-context)\nand the [Assay source entrypoint inventory](https:\u002F\u002Fgithub.com\u002Fmedici-finance\u002Fassay\u002Fblob\u002Fmain\u002Fdocs\u002Fperformance-entrypoints.json) for supported boundaries; an\nunsupported boundary stays unknown.\n\nApply validated handoff entries to each tool call with per-command `env KEY=value\n... tool ...` arguments or that tool's supported `--perf-*` flags. Quote values;\nnever evaluate the handoff as shell code or export it into a persistent shell.\nUse `--perf-loop-role` for descriptive desk attribution; never alter `DESK_LOOP`.\n",{"name":5,"description":7},"main","7b56c62e2c2dc6a597a6b41ccdd43c72c70fe0ca",".cursor\u002Fskills\u002Fpr-shepherd",5,"https:\u002F\u002Fgithub.com\u002Fmedici-finance\u002Fassay","https:\u002F\u002Fgithub.com\u002Fmedici-finance","2026-11-15 00:52:35",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add medici-finance\u002Fassay --skill pr-shepherd",{"tool":37,"command":38},"bunx","bunx skills add medici-finance\u002Fassay --skill pr-shepherd",{"tool":40,"command":41},"pnpm","pnpm dlx skills add medici-finance\u002Fassay --skill pr-shepherd","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmedici-finance\u002Fassay\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Fpr-shepherd\u002FSKILL.md",true,[],[46,53,59,66,72,79],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M7A2KDJHD3C240974C8CHEK0","Bad--Name","A valid description.","https:\u002F\u002Fgithub.com\u002Fmedici-finance\u002Fassay\u002Fblob\u002Fmain\u002Ftools\u002Fskillslint\u002Ftestdata\u002Fconformance\u002Fname-pattern\u002FBad--Name\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7A2KCG3W4TB4ZTKK9NC3TX5","not-the-desk","https:\u002F\u002Fgithub.com\u002Fmedici-finance\u002Fassay\u002Fblob\u002Fmain\u002Ftools\u002Fskillslint\u002Ftestdata\u002Fconformance\u002Fname-mismatch\u002Fthe-desk\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7A2K70T9HZHH43ARFZP6P0A","skill","abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde abcde","https:\u002F\u002Fgithub.com\u002Fmedici-finance\u002Fassay\u002Fblob\u002Fmain\u002Ftools\u002Fskillslint\u002Ftestdata\u002Fconformance\u002Fdesc-1025\u002Fskill\u002FSKILL.md",[],[],{"skillNo":67,"name":61,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7A2JYP6F7FCZK539GA01MFQ","字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字字 字字字字","https:\u002F\u002Fgithub.com\u002Fmedici-finance\u002Fassay\u002Fblob\u002Fmain\u002Ftools\u002Fskillslint\u002Ftestdata\u002Fconformance\u002Fdesc-1024-multibyte\u002Fskill\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7A2JSBQENV3BBQZ3FQNSJ5E","skill-9","This is a filler sentence used only to push the summed bundle description character budget over its threshold for the fixture. This is a filler sentence used only to push the summed bundle description character budget over its threshold for the fixture. This is a filler sentence used only to push the summed bundle description character budget over its threshold for the fixture. This is a filler sentence used only to push the summed bundle description character budget over its threshold for the fixture. This is a filler sentence used only to push the summed bundle description character budget over its threshold for the fixture. This is a filler sentence used only to push the summed bundle description character budget over its threshold for the fixture. This is a filler sentence used only to push the summed bundle description character budget over its threshold for the fixture. This is a f","https:\u002F\u002Fgithub.com\u002Fmedici-finance\u002Fassay\u002Fblob\u002Fmain\u002Ftools\u002Fskillslint\u002Ftestdata\u002Fconformance\u002Fbudget-over\u002Fskill-9\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7A2JKR0EGK44TQVGZ1EWCW4","skill-8","https:\u002F\u002Fgithub.com\u002Fmedici-finance\u002Fassay\u002Fblob\u002Fmain\u002Ftools\u002Fskillslint\u002Ftestdata\u002Fconformance\u002Fbudget-over\u002Fskill-8\u002FSKILL.md",[],[]]