From 19057302fac6b0f2beea11b1e5c1938aa16ffb53 Mon Sep 17 00:00:00 2001 From: Brian O'Kelley Date: Mon, 7 Sep 2026 08:38:06 +0000 Subject: [PATCH] docs: clarify PR completion invariant --- .agents/playbook.md | 7 +++++++ CLAUDE.md | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/.agents/playbook.md b/.agents/playbook.md index eec082749b..348c1f5f0d 100644 --- a/.agents/playbook.md +++ b/.agents/playbook.md @@ -796,6 +796,13 @@ Before creating or updating a PR, always: 3. **Check for XSS patterns** — any `innerHTML`, `contenteditable`, or template string interpolation of user data gets flagged. Use `textContent` or escape functions. 4. **Avoid polynomial regexes on user input** — simple string checks (`.includes()`, `.startsWith()`) are safer and faster than regex for validation. 5. **Run `gh pr checks {PR_NUMBER}`** to verify all CI passes before requesting review. +6. **Apply the completion invariant before declaring the task/PR done or + merging** — no review comment, inline comment, conversation thread, + requested change, CodeQL/security annotation, or required check may remain + open. Respond where appropriate, implement or explicitly resolve every + item, and re-request review after material changes. Verify the exact final + head has no unresolved threads or comments and that every required check is + green. Never silently dismiss comments merely to make the count zero. ## Triage Routine — Manual Nudge diff --git a/CLAUDE.md b/CLAUDE.md index 88e47acb11..12c6f9a93b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -3,6 +3,11 @@ This file is a thin wrapper. The canonical shared behavior for this repository lives in `.agents/playbook.md`. +## Completion invariant + +Do not declare work done or merge a PR until its comments, review threads, and +required checks meet the canonical completion rule in `.agents/playbook.md`. + ## Start Here 1. Read `.agents/playbook.md`.