用于 APM 编排流程中单个 PR 的审查整合、修复迭代与合并就绪推进。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "shepherd-driver" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/apm/main/packages/shepherd-driver/SKILL.md 2. 保存为 ~/.claude/skills/shepherd-driver/SKILL.md 3. 装好后重载技能,告诉我可以用了
你是 shepherd-driver。仅处理已由上游编排器在 microsoft/apm 中选定的这一个开放 PR。分类 copilot-pull-request-reviewer[bot] 的行内评论,运行 apm-review-panel,在不超出 PR 既定范围的前提下默认采纳建议,推送到头部分支,并汇报当前状态:ready-to-merge、advisory-with-deferred、superseded 或 blocked。
一份针对该 PR 的审查处理结果,包括已采纳修改、保留原因与最终合并状态判断。
作为 shepherd-driver,针对这个已选中的 PR 持续观察 CI 状态;若失败,在固定迭代上限内分析失败原因并提交最小范围修复,直到 CI 变绿或明确标记为 blocked,同时保留作者归属信息。
CI 修复迭代记录,以及该 PR 是否已达到可合并门槛的结论。
你是 shepherd-driver。对这个已选中的 PR 执行跨 PR 冲突检查与 mergeability gate;如需以替代 PR 或补充提交解决问题,请确保保留原作者归属(例如使用 commit trailers),并给出 superseded 或 ready-to-merge 的最终建议。
冲突处理方案、作者归属保留说明,以及替代或可合并的最终判定。
This SKILL.md is the natural-language module derived from a genesis design packet; refactors re-run the genesis skill from that packet.
This skill is a COMPOSED BUILDING BLOCK, not a user-facing entrypoint. It was extracted (genesis R3 EXTRACT) from batch-bug-shepherd when a second consumer (apm-issue-autopilot) needed the same per-PR convergence loop. Both orchestrators COMPOSE this skill; neither re-implements the loop. It in turn COMPOSES the apm-review-panel skill for the review pass -- it does NOT re-implement panel review.
DOES: take ONE PR that already exists and drive it to a terminal
landing-ready state; resolve cross-PR merge conflicts; emit the
PR-facing advisory and supersede comments; return a schema-valid
completion_return.
Does NOT: triage issues, decide which issues are worth fixing, open the first PR for an issue, choose the batch, or maintain the orchestrator's ground-truth table. Those are the parent orchestrator's responsibility. If you find yourself triaging or opening greenfield PRs, you are in the wrong skill.
The parent orchestrator, for each PR in its batch, spawns ONE
shepherd-driver subagent with the spawn body in
assets/shepherd-driver-prompt.md.
The orchestrator passes the inputs that prompt declares (PR_NUMBER,
ISSUE_NUMBER, AUTHOR, HEAD_REPO, HEAD_BRANCH, MAINTAINER_CAN_MODIFY,
REPO_ROOT, ORIGIN, optional PANEL_PRIOR). The subagent owns the whole
convergence loop end-to-end and returns a completion_return.
After every shepherded PR returns ready-to-merge, the orchestrator
runs the conflict-resolution phase: probe mergeability and, on
DIRTY / BEHIND / CONFLICTING, spawn one conflict-resolution subagent
per assets/conflict-resolution-prompt.md.
The step-by-step gate procedure is in
references/mergeability-gate.md
(load it when entering that phase).
This skill is a same-repo LOCAL SIBLING. A consuming orchestrator MUST declare the dependency at its own distribution surface and PROBE for this skill before spawning. The probe is a tool call, not an assertion from recall (A9 SUPERVISED EXECUTION; truth #2 CONTEXT EXPLICIT):
test -f ../shepherd-driver/assets/shepherd-driver-prompt.md \
&& test -f ../shepherd-driver/assets/completion-schema.json \
&& echo "shepherd-driver present" \
|| echo "MISSING shepherd-driver - stop and ask the operator"
On a probe MISS the orchestrator stops and asks the operator rather than re-implementing the loop inline (avoids HAND-ROLLED HALLUCINATION and PHANTOM DEPENDENCY).
This skill itself COMPOSES apm-review-panel.
A consuming orchestrator inherits that transitive dependency; the
spawned shepherd-driver subagent PROBES for it at preflight (all
load-bearing panel assets under
$REPO_ROOT/.agents/skills/apm-review-panel/) and returns
status: blocked ONLY on a genuine asset MISS, before any checkout
(see the spawn body Step 0.0). Note: a missing skill TOOL is NOT a
miss -- in the normal subagent context the panel is executed INLINE
from its on-disk SKILL.md + schemas (Step X.1.1), which is a
first-class path, not a fallback.
The shepherd-driver subagent runs this loop (full detail in the spawn body):
copilot-pull-request-reviewer[bot]
inline review per
assets/copilot-classification-prompt.md.apm-review-panel against the PR: via the
skill tool if present, otherwise (the normal subagent case)
execute it INLINE from its on-disk SKILL.md + schemas. Both paths
produce the same single recommendation comment.…
批量梳理并分诊 APM 仓库问题,将明确事项推进到可合并 PR。
对涉及 OpenAPM 规范的 PR 进行多专家对抗式审查并给出发布建议。
优化 APM 代码库中的 CLI 输出、日志提示与诊断信息体验
对整个文档语料逐页对照源码审计,定位过时表述并给出精确修复建议。
在每次 PR 变更时评估文档影响并生成可执行的更新建议
为复杂拉取请求发起多专家并行评审,汇总架构、测试、安全与文档建议。
在批处理编排中接管单个PR审查整合、修复迭代与合并就绪推进
批量分诊并推进疑似缺陷到可合并 PR 队列,持续跟踪评审、冲突与 CI 状态。
批量分诊并推进疑似缺陷与相关 PR 到可合并状态的工程协作技能
批量分诊并推进 APM issue,从需求 intake 到可合并 PR。
对 microsoft/apm 的标记 PR 发起多专家联合审查并给出综合建议
帮助团队处理 apm 项目的定位调整、发布沟通与破坏性变更决策。