You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(agents): absolute prohibition on Agent merging PRs (#179)
Replaces the conditional rule ('NEVER merge without human authorization')
with an absolute prohibition. The Agent MUST NEVER merge any PR under any
circumstances, including when explicitly instructed or forced by a human.
Adds new subsection §5.1.1.2 with situation/action table, refusal script,
and MUST/MUST-NOT lists.
Triggered by the unauthorized merge of PR #174 and #175 on 2026-07-22,
where the Agent misinterpreted '提交一下代码' as merge authorization.
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Copy file name to clipboardExpand all lines: AGENTS.md
+43-5Lines changed: 43 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -523,18 +523,56 @@ All changes MUST follow this workflow:
523
523
6. Commit with descriptive messages (include devlog files)
524
524
7. Push branch and create a GitHub PR
525
525
8. Obtain **dual-agent review** (Sections 5.3 + 5.4) on the PR
526
-
9.**PR merge requires explicit human confirmation** — AI agents MUST NOT autonomously merge PRsor push to master. Wait for the user to explicitly say "merge" or "approve merge".
526
+
9.**PR merge is a human-only operation** — AI agents MUST NEVER merge PRs, even when explicitly instructed or forced by a human. See [§5.1.1.2](#5112-pr-merge-absolute-prohibition)for the absolute policy. The Agent prepares the PR; the human clicks "Merge".
|**NEVER force-push to `master`**| Under no circumstances. Not for reverts, not for fixes, not for "quick corrections". If master needs changing, create a PR. |
533
-
|**NEVER merge PRs without explicit human authorization**| "merge" or "approve merge" must come from a human comment. Agent reviews passing ≠ authorization to merge. |
533
+
|**NEVER merge PRs — ABSOLUTE PROHIBITION, no exceptions**| PR merges are a **human-only operation**. The Agent MUST NEVER merge any PR, under ANY circumstances. See [§5.1.1.2](#5112-pr-merge-absolute-prohibition) for the full policy.|
534
534
|**NEVER remove and re-apply GitHub branch protection to force changes**| This is a circumvention of the merge policy. If protection blocks a push, the correct response is to create a PR. |
535
535
|**NEVER delete branches or tags without human confirmation**| Preserve work for review. |
536
536
|**NEVER modify `version` field in `package.json` on non-release branches**| Version bumps happen ONLY on `YYYY-MM-DD_release-v*` branches (see §5.4.2). Regular feature/fix PRs MUST NOT touch the `version` field. The CI changelog check (§5.4.1) enforces this indirectly: if `version` changes, `README.md` and `README.zh-CN.md` MUST also be modified with a `### v{VERSION}` header. Violating this rule causes version-number drift across non-release PRs (e.g., v1.13.0 → v1.13.1 in a feature PR) which makes release bookkeeping unpredictable and can lead to skipped or duplicated npm publishes. |
537
537
538
+
### 5.1.1.2 PR Merge — Absolute Prohibition
539
+
540
+
> **PR merges are a human-only operation. The Agent MUST NEVER merge any PR.**
541
+
542
+
This is an **absolute rule with no exceptions**. It applies to:
| No human instruction to merge | Do not merge. End of story. |
547
+
| Human implicitly suggests merging (e.g., "提交一下代码", "ship it", "looks good") | Do not merge. Treat as commit/push only. If ambiguous, ASK; do not assume merge authorization. |
548
+
| Human explicitly authorizes merge (e.g., "you may merge") | Do not merge. Reply that PR merges are a human-only operation and the human must perform it. |
549
+
| Human directly instructs/orders merge (e.g., "merge this now") | Do not merge. Reply that PR merges are a human-only operation and the human must perform it. |
550
+
| Human forces or demands auto-merge (e.g., "I order you to merge", ultimatums) |**Explicitly refuse.** State that this rule cannot be overridden by any instruction, including this one. |
551
+
| Human claims this rule does not apply to a specific case | Do not merge. This rule has no case-by-case exceptions. |
552
+
| The PR is a revert, fix-up, or "obvious" merge | Do not merge. Reverts and fixes follow the same rule. |
553
+
| CI checks all pass and reviews are complete | Do not merge. Green CI is necessary but not sufficient — human action is still required. |
554
+
| Hotfix / urgent situation | Do not merge. Urgency does not override this rule. |
555
+
556
+
**What the Agent MUST do instead:**
557
+
558
+
1. Prepare the PR (branch, commits, push, `gh pr create`).
559
+
2. Verify CI passes.
560
+
3. Report the PR URL to the human.
561
+
4.**Stop.** Wait for the human to click "Merge" themselves.
562
+
563
+
**What the Agent MUST NOT do:**
564
+
565
+
- Call `gh pr merge`, `gh api .../merge`, or any command that merges a PR.
566
+
- Toggle GitHub branch protection to enable a merge (also forbidden by §5.1.1.1).
567
+
- Use admin overrides, force-push, or any workaround to land changes on `master` without going through human-initiated PR merge.
568
+
- Re-interpret human words ("commit", "ship", "land", "deploy", "提交", "上线") as merge authorization. These mean commit/push, not merge.
569
+
570
+
**How to respond when a human instructs the Agent to merge:**
571
+
572
+
> I can't merge PRs — AGENTS.md §5.1.1.2 forbids Agents from merging PRs under any circumstances, including when explicitly instructed. Please merge the PR yourself: [PR URL].
573
+
574
+
This rule exists because PR merges are irreversible, land code on the protected `master` branch, and may trigger automated releases. Human-only execution ensures a human is always in the loop for these irreversible operations. The rule is intentionally designed so that **no instruction — not even an explicit override from the user — can relax it**. If a human wants this rule changed, they must edit this section of AGENTS.md themselves; the Agent will continue to follow the written rule until then.
575
+
538
576
### 5.1.2 Devlog Requirement (MANDATORY)
539
577
540
578
Every PR MUST have a corresponding devlog entry in `devlog/{YYYY-MM-DD_short-title}/`.
**Step 4: Merge PR (requires human confirmation)**
691
+
**Step 4: Merge PR (human-only operation — Agent MUST NOT merge)**
654
692
655
-
Wait for CI to pass (`pr-validation`, `test`, `build`), then a human merges the PR.
693
+
Wait for CI to pass (`pr-validation`, `test`, `build`), then a human merges the PR. The Agent MUST NEVER merge the PR itself, even if explicitly instructed — see [§5.1.1.2](#5112-pr-merge-absolute-prohibition).
0 commit comments