From 538190861402018e41a9906b2c2c54fd7fc3a679 Mon Sep 17 00:00:00 2001 From: Jakub Florkowski Date: Wed, 4 Feb 2026 00:40:48 +0100 Subject: [PATCH] Add critical rule: agents must NEVER approve/request-changes on PRs - Add prominent warning section at top of pr-finalize skill - Add CRITICAL note to copilot-instructions.md AI agents should only post comments with findings. Approval and rejection decisions are reserved for human reviewers. --- .github/copilot-instructions.md | 1 + .github/skills/pr-finalize/SKILL.md | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index f03c3ac15a4d..da34ce55332a 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -242,6 +242,7 @@ Skills are modular capabilities that can be invoked directly or used by agents. - **Trigger phrases**: "finalize PR #XXXXX", "check PR description for #XXXXX", "review commit message" - **Used by**: Before merging any PR, when description may be stale - **Note**: Does NOT require agent involvement or session markdown - works on any PR + - **🚨 CRITICAL**: NEVER use `--approve` or `--request-changes` - only post comments. Approval is a human decision. 4. **learn-from-pr** (`.github/skills/learn-from-pr/SKILL.md`) - **Purpose**: Analyzes completed PR to identify repository improvements (analysis only, no changes applied) diff --git a/.github/skills/pr-finalize/SKILL.md b/.github/skills/pr-finalize/SKILL.md index d99df5da8e72..87059ea54c0e 100644 --- a/.github/skills/pr-finalize/SKILL.md +++ b/.github/skills/pr-finalize/SKILL.md @@ -9,6 +9,24 @@ Ensures PR title and description accurately reflect the implementation for a goo **Standalone skill** - Can be used on any PR, not just PRs created by the pr agent. +--- + +## 🚨 CRITICAL: NEVER Approve or Request Changes + +**AI agents must NEVER use `--approve` or `--request-changes` flags.** + +| Action | Allowed? | Why | +|--------|----------|-----| +| `gh pr review --approve` | ❌ **NEVER** | Approval is a human decision | +| `gh pr review --request-changes` | ❌ **NEVER** | Blocking PRs is a human decision | + +**Only humans can approve or block PRs.** The agent's role is to: +1. Analyze and provide findings +2. Post comments with recommendations +3. Let humans make the final decision + +--- + ## Core Principle: Preserve Quality **Review existing description BEFORE suggesting changes.** Many PR authors write excellent, detailed descriptions. Your job is to: