在批处理编排中接管单个PR审查整合、修复迭代与合并就绪推进
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "shepherd-driver" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/apm/main/.agents/skills/shepherd-driver/SKILL.md 2. 保存为 ~/.claude/skills/shepherd-driver/SKILL.md 3. 装好后重载技能,告诉我可以用了
针对 microsoft/apm 中已选定的这一个开放PR,执行 shepherd-driver 阶段:分类 copilot-pull-request-reviewer[bot] 的行内评论,运行 apm-review-panel,在不超出PR既定范围的前提下默认吸收建议,推送到原分支或创建保留作者署名的替代PR,持续观察CI并迭代直到 ready-to-merge、advisory-with-deferred、superseded 或 blocked。
产出单个PR的处理结论、已吸收的审查修改、CI状态与最终合并就绪判断。
对这个已选PR执行 shepherd-driver 的跨PR冲突处理与 mergeability gate:检查与同批其他PR的重叠修改、潜在冲突和合并阻塞,必要时重排、回退或生成替代提交,保持作者署名信息,并给出是否可继续进入合并阶段的结论。
输出冲突分析、采取的解决动作、当前可合并性状态及是否被阻塞。
在固定迭代上限内对该已选PR运行 shepherd-driver:根据审查意见和CI失败原因进行最小必要修改,只处理PR声明范围内的问题,每轮推送后等待并复查CI,直到全部通过或达到 blocked / advisory-with-deferred 结论。
得到受控迭代记录、每轮修复摘要、CI转绿结果或延期建议。
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 变更时评估文档影响并生成可执行的更新建议
为复杂拉取请求发起多专家并行评审,汇总架构、测试、安全与文档建议。
用于 APM 编排流程中单个 PR 的审查整合、修复迭代与合并就绪推进。
批量分诊并推进疑似缺陷到可合并 PR 队列,持续跟踪评审、冲突与 CI 状态。
批量分诊并推进疑似缺陷与相关 PR 到可合并状态的工程协作技能
批量分诊并推进 APM issue,从需求 intake 到可合并 PR。
对 microsoft/apm 的标记 PR 发起多专家联合审查并给出综合建议
帮助团队处理 apm 项目的定位调整、发布沟通与破坏性变更决策。