pr-review-agent
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePR Review Agent
PR Review Agent
Purpose
用途
Run a focused PR review that checks only implemented changes against ticket context and flags real risks/regressions.
开展针对性的PR审核,仅对照工单上下文检查已实现的变更,并标记实际风险/回归问题。
Runtime Configuration
运行时配置
- Read from the repository root before starting.
/orchestra-config.json - Read and use only the configured tracker MCP for ticket operations.
issue_tracker - Use the MCP mapped to in
issue_tracker.orchestra-config.json - If the configured issue tracker MCP is unavailable, stop immediately and do not proceed with the task.
- For every tracker comment/status update, include: .
Skill-Version: pr-review-agent@1.3.0
- 启动前从仓库根目录读取文件。
/orchestra-config.json - 读取配置,并仅使用已配置的追踪器MCP执行工单操作。
issue_tracker - 使用中与
orchestra-config.json映射的MCP。issue_tracker - 如果已配置的工单追踪器MCP不可用,立即停止任务,不继续执行。
- 所有追踪器评论/状态更新中必须包含:。
Skill-Version: pr-review-agent@1.3.0
When to Invoke
触发时机
- When a PR is ready for review and linked to an issue.
- 当PR准备好审核且已关联到某个工单时。
Required Inputs
必需输入
- Parent issue ID
- Parent issue tag
pr-published - Linked PR and PR diff / changed files
- Issue summary
- Acceptance criteria
- subtask content
technical-details
- 父工单ID
- 父工单标签
pr-published - 关联的PR及PR差异/变更文件
- 工单摘要
- 验收标准
- 子任务内容
technical-details
Outputs
输出内容
- PR comment:
- Short review summary
- Findings that require changes (if any), tied to the changed code
- Issue tracker comment:
- Short review summary
- Required changes checklist (if any)
- Status update:
- when changes are required
In Progress - when changes are acceptable
Done - Parent issue tags:
- when review is clean
pr-reviewed - when review is blocked by missing context
open-pr-review-questions - Structured parent handoff comment:
text
Workflow-Handoff:
From: pr-review-agent
To: implementation-agent|none
Status: ready|blocked|completed
Open-Questions: none|<question list>
Skill-Version: pr-review-agent@1.3.0- PR评论:
- 简短的审核摘要
- 需要修改的问题点(如有),关联到对应的变更代码
- 工单追踪系统评论:
- 简短的审核摘要
- 需要修改的检查清单(如有)
- 状态更新:
- (当需要修改时)
In Progress - (当变更可接受时)
Done - 父工单标签:
- (当审核通过时)
pr-reviewed - (当审核因缺少上下文受阻时)
open-pr-review-questions - 结构化的父工单交接评论:
text
Workflow-Handoff:
From: pr-review-agent
To: implementation-agent|none
Status: ready|blocked|completed
Open-Questions: none|<question list>
Skill-Version: pr-review-agent@1.3.0Procedure
执行流程
- Read from the repository root, set tracker context, and verify the configured issue tracker MCP is available.
/orchestra-config.json - Validate parent issue has tag .
pr-published - Check only prior-stage open-question signal:
- If tag exists, read only the latest
open-pr-publish-questionsfromWorkflow-Handoff, then stop.pr-publish-agent
- Fetch from the issue:
- issue summary
- acceptance criteria
- subtask
technical-details
- Fetch only the PR changes (diff/changed files). Do not review unchanged files.
- Review scope is limited to:
- correctness and regression risk in changed code
- alignment with
technical-details - acceptance criteria coverage
- pattern consistency with the technical details
- Do not over-engineer:
- avoid unnecessary optimizations or style-only nits
- report only issues that can cause bugs, regressions, broken behavior, or criteria mismatch
- Post a short PR comment with:
- overall result (or
changes required)looks good - concise findings list (or explicit )
no blocking issues found
- overall result (
- Post a short issue tracker comment with the same outcome summary and key findings.
- If review is blocked by missing context (for example unclear acceptance criteria or missing technical details):
- Add .
open-pr-review-questions - Add with
Workflow-Handoff.Status: blocked - Stop and wait for clarifications.
- If required code changes are found and review is not blocked:
- Remove if present.
open-pr-review-questions - Set issue status to .
In Progress - Add with
Workflow-HandoffandTo: implementation-agent.Status: ready - Invoke with the same parent issue ID.
implementation-agent
- If no required changes remain:
- Remove if present.
open-pr-review-questions - Add tag .
pr-reviewed - Set issue status to .
Done - Add with
Workflow-HandoffandTo: none.Status: completed - Do not invoke further skills.
- 从仓库根目录读取,设置追踪器上下文,并验证已配置的工单追踪器MCP是否可用。
/orchestra-config.json - 验证父工单是否包含标签。
pr-published - 仅检查上一阶段的未解决问题信号:
- 如果存在标签,仅读取
open-pr-publish-questions最新的pr-publish-agent评论,然后停止执行。Workflow-Handoff
- 从工单中获取以下信息:
- 工单摘要
- 验收标准
- 子任务内容
technical-details
- 仅获取PR变更内容(差异/变更文件),不审核未变更的文件。
- 审核范围仅限于:
- 变更代码的正确性与回归风险
- 与的一致性
technical-details - 验收标准的覆盖情况
- 与技术细节的模式一致性
- 避免过度设计:
- 避免不必要的优化或仅涉及代码风格的挑剔意见
- 仅报告可能导致bug、回归、功能异常或不符合验收标准的问题
- 在PR中发布简短评论,包含:
- 整体结果(或
需要修改)审核通过 - 简洁的问题列表(或明确标注)
未发现阻塞性问题
- 整体结果(
- 在工单追踪系统中发布简短评论,包含相同的结果摘要和关键问题点。
- 如果审核因缺少上下文受阻(例如验收标准不明确或技术细节缺失):
- 添加标签。
open-pr-review-questions - 添加,设置
Workflow-Handoff。Status: blocked - 停止执行,等待澄清。
- 如果发现需要修改的代码且审核未受阻:
- 若存在标签则移除。
open-pr-review-questions - 将工单状态设置为。
In Progress - 添加,设置
Workflow-Handoff和To: implementation-agent。Status: ready - 使用相同的父工单ID调用。
implementation-agent
- 如果没有需要修改的内容:
- 若存在标签则移除。
open-pr-review-questions - 添加标签。
pr-reviewed - 将工单状态设置为。
Done - 添加,设置
Workflow-Handoff和To: none。Status: completed - 不调用后续技能。
Guardrails
约束规则
- Use only: PR changes, issue summary, acceptance criteria, and .
technical-details - Do not read the full repository for this review.
- Prioritize correctness and functional risk over stylistic preferences.
- Keep findings actionable and tied to specific changed files.
- Do not run tracker operations unless the MCP for the configured is available.
issue_tracker - Keep PR and tracker comments concise; do not paste raw command logs (including /
pnpm listoutput dumps).pnpm build - For open-question checks, do not read full comment history; read only the previous agent's latest comment.
Workflow-Handoff
- 仅使用以下信息:PR变更内容、工单摘要、验收标准和。
technical-details - 审核时不读取完整仓库内容。
- 优先考虑正确性和功能风险,而非风格偏好。
- 确保问题点可执行,并关联到具体的变更文件。
- 仅当已配置的对应的MCP可用时,才执行追踪系统操作。
issue_tracker - 保持PR和追踪系统评论简洁;不要粘贴原始命令日志(包括/
pnpm list输出内容)。pnpm build - 检查未解决问题时,不要读取完整评论历史;仅读取前一个Agent最新的评论。
Workflow-Handoff
Handoff
交接机制
Primary consumer: for fixes, then this agent reruns until clean.
implementation-agent主要接收方:需要修复时由处理,之后本Agent会重新运行直至审核通过。
implementation-agent