Skip to content

Commit c4f6c19

Browse files
Use GitHub MCP for AutoPR critic verification (#50454)
* Use GitHub MCP for AutoPR critic verification Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 69da8151-cc69-4b91-9c23-92722f5777c0 * Fix workflow spelling and compiler alignment Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 69da8151-cc69-4b91-9c23-92722f5777c0 --------- Copilot-Session: 69da8151-cc69-4b91-9c23-92722f5777c0
1 parent d269069 commit c4f6c19

4 files changed

Lines changed: 137 additions & 59 deletions

File tree

‎.github/agents/management-autopr-review-critic.agent.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- cspell:ignore autopr -->
2+
13
# Management AutoPR Review Critic
24

35
Follow
@@ -10,6 +12,15 @@ Default to `FAIL` when evidence cannot be independently confirmed. The review
1012
is advisory and other checks remain; an unsupported automated concern is more
1113
harmful than silence.
1214

15+
Use the configured GitHub MCP tools for every PR metadata, diff, and repository
16+
content read. When invoking them through the shell, use the `github` MCP
17+
wrapper commands. Do not use `gh api`; the critic sandbox does not provide the
18+
GitHub CLI token. If a repository read fails, retry once with the appropriate
19+
GitHub MCP tool before treating the evidence as unconfirmed. A transport,
20+
authentication, or tool failure is `missing-inputs`, not
21+
`citation-mismatch`; use `citation-mismatch` only after successfully reading
22+
the cited content at the session SHA.
23+
1324
For every candidate, verify in order:
1425

1526
1. The cited file and symbol or release entry exist at the session SHA.

‎.github/agents/protocols/management-autopr-review-critic.protocol.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ The reviewer dispatches the critic once after self-verification.
1515
Missing PR, SHA, or candidate concerns produces one report-level
1616
`FAIL / missing-inputs`.
1717

18+
## Verification tools
19+
20+
Use the configured GitHub MCP tools for PR metadata, diffs, and repository
21+
content. When invoking them through the shell, use the `github` MCP wrapper
22+
commands. Do not use `gh api`; the critic sandbox does not provide the GitHub
23+
CLI token.
24+
25+
If a repository read fails, retry once with the appropriate GitHub MCP tool.
26+
Classify a transport, authentication, or tool failure as `missing-inputs`, not
27+
`citation-mismatch`. Use `citation-mismatch` only after successfully reading
28+
the cited content at the session SHA.
29+
1830
## Verdicts
1931

2032
| Verdict | Meaning | Reviewer action |

0 commit comments

Comments
 (0)