[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M734YJ3KH3D7JQX2YFC3RCP2":3,"skill-same:01M734YJ3KH3D7JQX2YFC3RCP2":52},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":34,"repositoryHtmlUrl":35,"repositoryHomepageUrl":36,"ownerHtmlUrl":37,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":38,"install":39,"resources":51},"01M734YJ3KH3D7JQX2YFC3RCP2","ardi",null,"Drive one PR to clean.","Morrison-Lab\u002Fai-config","Morrison-Lab","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F104235520?v=4","01M734G0451S2G35MN4HFQK7XP","Morrison Lab","01M734G059BYFDFQA8YTPDGPMH",4,"MIT","https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config\u002Fblob\u002Fmain\u002Fskills\u002Fardi\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: ardi\ndescription: \"Drive one PR to clean.\"\nuser-invocable: true\nallowed-tools:\n  - Bash\n  - Agent\n  - Read\n  - Edit\n  - Write\n---\n\n# ARDI --- ARD + Iterate (single PR\u002FMR)\n\nDrive one PR\u002FMR to a clean review verdict by looping: read every review → ARD every\nfinding from every reviewer → push → post summary → re-request review from those\nreviewers → repeat until every reviewer's latest verdict is clean.\nA later all-clear from one reviewer does not clear another reviewer's standing\nnot-clean, even with `mwc` active (ai-config#2274).\n\n## Procedure\n\n1. **Identify and claim the PR\u002FMR.**\nUse the current branch's open MR, or the one the user specified.\nPost a brief claim comment (`COMMENT_PR`) so a parallel `@claude` CI run or another person doesn't start a colliding session.\nThe body carries a real blank line before the disclosure marker --- `\\n` inside a bash double-quoted string is the two characters, not a newline:\n\n```bash\ngh pr comment \u003CN> --body \"Driving this PR to clean --- please hold off until done.\n\nSession worktree: \u003Coutput of git rev-parse --show-toplevel>\n\n_Posted by Claude Code (AI agent) --- not written by a human._\"   # COMMENT_PR\n```\nSkip if your most recent comment already says so and is still live --- claims expire 2 hours after the most recent push or comment, and an expired one needs reasserting, per [`claim-pr`](..\u002F..\u002Fshared\u002Fworkflow\u002Fclaim-pr.md).\n(`COMMENT_PR` and the other bracketed tokens below are abstract operation tokens --- resolve to your model's tool via [`tool-mappings.md`](..\u002F..\u002Ftool-mappings.md).)\n\n2. **Read every review, not only the latest.**\nPull the most recent reviewer comment --- the `@claude` bot's, or a human's ---\nand every other review that still has a standing verdict.\nDon't trust earlier cached verdicts --- actively poll until a review appears that references the commit you just pushed, then read **that** one.\nIf one review is all-clear and another raises findings or nits, the findings\nwin: ARD the union, then request fresh reviews.\nDo not merge on the all-clear, even with `mwc` (ai-config#2274).\n`gh pr checks` (`PR_CHECKS`) \u002F `glab ci list` going green is about **CI state**, not the review verdict --- always parse the latest review *body* for findings.\nA user question about this PR that is not the word \"status\" still requires\nthis fetch (see [`pr-status`](..\u002Fpr-status\u002FSKILL.md)).\nDon't answer the chat question from session memory while a review comment\nsits unread.\n\n   **When the user provides a specific review link\u002FID** (e.g. `#pullrequestreview-4761444085`): Fetch that review directly via the GitHub API using its ID.\n   Many bot reviews have a generic overview body but the actual findings live in **inline comments on specific lines** --- don't rely on the top-level review body alone.\n   Fetch both the review overview and its inline comments:\n   ```bash\n   gh api \"repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fpulls\u002F\u003CN>\u002Freviews\u002F\u003Creview-id>\" --jq '{state, body}'\n   gh api \"repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fpulls\u002F\u003CN>\u002Fcomments\" --paginate --jq '.[] | select(.pull_request_review_id == \u003Creview-id>) | {line: (.line \u002F\u002F .original_line), body}'\n   ```\n   The comments endpoint returns pages oldest-first -- without `--paginate`\n   a later review's inline comments can sit past the first page and never\n   reach the filter, making a review with real findings look empty.\n\n   - **GitHub:**\n     Filter on the body marker, not on an author login.\n     Do not take `| last` as the only review to ARD\n     (ai-config#2274).\n     Claude, Antigravity, and skip notices can all post as `github-actions[bot]`,\n     so a login filter silently drops a standing not-clean.\n     ```bash\n     gh api repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fissues\u002F\u003CN>\u002Fcomments --paginate \\\n       | jq -s '[.[][] | select(.body | test(\"\\\\*\\\\*Claude finished|### Verdict|Antigravity Agent Report\"; \"i\"))] | .[] | {created: .created_at, user: .user.login, body: .body}'   # READ_PR_COMMENTS\n     ```\n     Completed Claude runs start the body with `**Claude finished`.\n     Read every matching comment, not only the newest.\n     A later all-clear from a different reviewer does not clear another\n     reviewer's standing not-clean.\n     For a **human** reviewer (any login), also gather comments with the `ard`\n     skill's step 1 (`gh pr view \u003CN> --comments` plus the inline-thread API).\n\n     **Copilot code review doesn't post as a PR comment at all -- it's a\n     formal GitHub review**, invisible to the command above.\n\n     **Do not request it while the Copilot moratorium stands.**\n     `MORATORIUM_END` in\n     [`hooks\u002Fno-unreviewed-pr.py`](..\u002F..\u002Fhooks\u002Fno-unreviewed-pr.py) is the\n     live value, and `memories\u002Fgh-cli.md` carries the directive it\n     implements.\n     While that date is in the future, skip the request and read whatever\n     Copilot reviews already exist.\n     A missing Copilot verdict is then not a gap to fill but the expected\n     state, and\n     [`self-review-fallback.md`](..\u002F..\u002Fshared\u002Fworkflow\u002Fself-review-fallback.md)\n     governs the resulting absence exactly as it governs a quota-skipped\n     `@claude` round.\n\n     Otherwise request it\n     (`REQUEST_COPILOT_REVIEW` -- abstract operation token; resolve to your\n     model's tool via [`tool-mappings.md`](..\u002F..\u002Ftool-mappings.md)) and check\n     whether it posted a verdict *at the current head*. Finding a review\n     object at the right `commit_id` only proves Copilot *looked* -- it says\n     nothing about whether that review is clean. Fetch the matched review's\n     own overview **and** its inline comments (same two-call shape as the\n     review-link case above; the reviews list itself is `READ_PR_REVIEWS`)\n     before treating it as an all-clear:\n     `gh api`'s own `--jq` flag has no `--arg`\u002F`--argjson` (see\n     [`memories\u002Fgh-cli.md`](..\u002F..\u002Fmemories\u002Fgh-cli.md)'s `gh api`\u002F`jq` note) --\n     pipe the raw paginated output into standalone `jq -s` instead, which\n     supports both:\n     ```bash\n     set -o pipefail\n     head=\"$(gh pr view \"\u003CN>\" --json headRefOid -q .headRefOid)\"\n     review_ids=\"$(gh api \"repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fpulls\u002F\u003CN>\u002Freviews\" --paginate \\\n       | jq -r -s --arg head \"$head\" \\\n       '[.[][] | select(.user.login==\"copilot-pull-request-reviewer[bot]\" and .commit_id==$head)] | .[].id')\"\n     if [ -n \"$review_ids\" ]; then\n       comments=\"$(gh api \"repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fpulls\u002F\u003CN>\u002Fcomments\" --paginate | jq -s '[.[][]]')\"\n       for rid in $review_ids; do\n         gh api \"repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fpulls\u002F\u003CN>\u002Freviews\u002F$rid\" --jq '{state, body}'\n         jq --arg rid \"$rid\" \\\n           '.[] | select(.pull_request_review_id == ($rid | tonumber)) | {line: (.line \u002F\u002F .original_line), body}' \\\n           \u003C\u003C\u003C\"$comments\"\n       done\n     else\n       echo \"no fresh review yet -- wait or re-request\"\n     fi\n     ```\n     A genuine clean Copilot overview is **not** an empty string -- it reads something like \"Copilot reviewed N files and generated no new comments.\"\n     Don't require a literally empty body; parse the overview for a zero-new-findings phrasing **and** confirm zero matched inline comments -- both, not either alone, since zero inline comments with no affirmative zero-findings overview doesn't rule out a non-verdict formal review.\n     **A \"no new comments\" overview can still carry real findings in a collapsed suppression block** -- these are genuine flagged items under the fully-clean rule (address every finding regardless of confidence label), even though they never become formal inline comment objects the `\u002Fcomments` endpoint returns (verified: PR #660's review 4767752501 read \"generated no new comments\" in its overview while its full body carried 3 suppressed findings; PR #1029 repeated the shape from round 3 onward).\n     A third condition is required: the raw review **body** must not contain a suppression block at all.\n     **Match the suppression block on its heading --- a `\u003Csummary>` element, or an ATX heading inside a collapsed `\u003Cdetails>` region --- case-insensitively on `suppressed`, not on either exact phrase, not on `\u003Csummary>` alone, and not anywhere in the body.**\n     GitHub changed the wording and dropped the reason: PR #660 emits `\u003Csummary>Comments suppressed due to low confidence (3)\u003C\u002Fsummary>`, while PRs #1029 and #1031 emit `\u003Csummary>Suppressed comments (4)\u003C\u002Fsummary>`.\n     So a literal grep for `Comments suppressed` returns **zero** against a current body that plainly has the block, which produced a real false negative during the ai-config#1029 loop.\n     A body-wide match over-corrects, though, and would keep a clean PR permanently non-clean: ordinary overview prose contains the word, verified on ai-config#1038 review 4837572117, whose uncollapsed overview sentence reads \"Aligns ARDI-family guidance on deadlocks, sweep scheduling, and suppressed Copilot findings\" while its body carries no suppression block, its summary table containing no occurrence of the word (re-read 2026-09-04).\n     Scope the match to headings rather than to `\u003Csummary>` alone, and accept every heading: measured 2026-09-03 on ai-config#3084 review `5098574802`, the block arrives as a `### Suppressed comments (1)` heading nested under `\u003Csummary>Review details\u003C\u002Fsummary>`, so a `\u003Csummary>`-only match returns zero against a body that plainly has it.\n     Scoping to the whole `\u003Cdetails>` region instead would readmit the *class* of false positive a body-wide match produces, because that same review wraps its `Pull request overview` and `File summaries` prose in collapsed `\u003Cdetails>` regions of their own --- 4837572117's overview sentence was uncollapsed, so it controls only for prose sitting outside a `\u003Cdetails>` region.\n     A body does exercise that class: ai-config#1036 review `4837539268` collapses a `Show a summary per file` table reading \"Detects suppressed Copilot findings.\" and carries no suppression block, so the region-wide form flags it and the heading anchor does not.\n     Enumerating Copilot review bodies from the `reviews` endpoint on 2026-09-04 --- 137 bodies across 39 PRs, from ai-config PRs 1000 through 1100 and 3060 through 3130 plus ai-config#660, ai-config#2913 and ai-config#2976 --- that is the region-wide form's only false positive and its only disagreement with the heading anchor.\n     Keep it as a fallback anyway, on the cost asymmetry rather than on a clean record: a false zero merges over real findings while a false positive costs one re-read.\n     So read a hit only the fallback finds as probably spurious, and re-read the region before treating it as a finding.\n     Apply all three to **every** Copilot review at the head, which is why the block above loops rather than reducing the id list with `| last`.\n     No per-author grouping rescues that reduction here, because every Copilot review shares one login.\n\n     The stakes are why this matters: from round 3 of ai-config#1029 onward *every* substantive finding arrived suppressed, under a \"generated no new comments\" overview with zero inline comments -- including CRLF silently disabling a failure path repo-wide.\n     So a suppressed finding is not a lower-value one, on the evidence available here --- which is a run of valuable suppressed findings, not a measured correlation.\n     GitHub's own docs do not document suppression at all, so expect the label to keep moving and key on the stable token within that scope.\n     And dispositioning a finding-bearing review's comments yourself does **not** make that same review the all-clear -- the fully-clean bar needs a *later* review, at the still-current head, that doesn't re-raise them.\n     So the all-clear is either (a) a review with a zero-new-findings overview, zero inline comments, and no suppressed- findings block, or (b) a later review at the same head as a finding-bearing one, confirming nothing remains -- never the finding-bearing review itself, however thoroughly you addressed its findings.\n     A review object existing at the current `commit_id` with unresolved findings inside it is not clean, it's just current.\n     A stub-like non-answer (\"ineligible\", \"reached their quota limit\") is also not a verdict -- treat it the same as a skipped\u002Fstub `@claude` run (see the \"Do the review yourself\" fallback in `CLAUDE.md`) and retry later or fall back accordingly.\n   - **GitLab:** poll the MR notes (`sort=desc`) for a review note that\n     references your latest short SHA before proceeding; if none has appeared,\n     wait and retry rather than reading a stale verdict.\n\n   **If the latest review is a cancellation, the live verdict is stale --- don't re-do already-applied fixes.**\n   A `cancel-in-progress` cancellation (on setups that cancel superseded review runs) means the last *complete* review's findings may already have been fixed by a commit that landed after it, with the confirming re-review killed before it could post.\n   Before treating those findings as outstanding work, **diff the current code against each one** to see what's already addressed --- then push only what's genuinely needed and let a fresh review confirm.\n   Re-applying fixes that are already in the tree wastes a round and muddies the diff.\n   If *nothing* remains outstanding (every finding is already applied), don't push an empty commit --- skip to step 6 and re-request the review directly.\n\n   **Execute the sequential multi-provider review loop** defined in `shared\u002Fworkflow\u002Fadversarial-self-review.md`.\n   You must pin all available providers (including external reviewers and the local `adversarial-reviewer` subagent).\n   You must query them sequentially, one at a time.\n   Do not request them in parallel.\n   **When the loop reaches the local self-review step, don't perform it.**\n   Hand the review to a separate [`adversarial-reviewer`](..\u002F..\u002F.claude\u002Fagents\u002Fadversarial-reviewer.md) subagent (foreground, read-only), briefed with the base ref, the paths, and the standards that apply --- never with your rationale for the change, which is what makes a reviewer agree with you.\n   The session that wrote the diff knows what it was meant to say, so an inline pass reads the artifact and recovers the intent: confirmation rather than review, and indistinguishable from the real thing in the output (see [`adversarial-self-review`](..\u002F..\u002Fshared\u002Fworkflow\u002Fadversarial-self-review.md)).\n   Its brief covers what an inline pass would have done: independently assessing both line-level implementation defects and the whole change (requirements, intent, cross-file consistency, integration, regression risk, and validation), explicitly reporting both passes in the structured verdict.\n   This includes the current PR diff against its base, each changed call path and edge case, the focused tests, and the relevant lint\u002Fdocumentation checks.\n   You must Address, Rebut, or Defer every finding it returns.\n   If a provider skips or cannot produce a verdict (quota, offline), note the skip in your ARD summary comment.\n   **Re-check reviewer availability every round, not just once:**\n   A reviewer that was unavailable a few pushes ago can become available mid-session.\n   A skipped review is never a clean external verdict on its own and does not authorize marking the PR as approved.\n   See [*The bar: \"fully clean\"*](#the-bar-fully-clean).\n   It requires clean verdicts at the current head from all reachable providers in your pinned quorum, not just a self-review.\n\n3. **ARD every finding --- regardless of severity label.**\n   \"Informational\", \"Not a blocker\", \"minor\", \"nit\", \"optional\", \"consider\", \"if you want\" are for the user's prioritization, not a pass for the implementer.\n   For each flagged item, choose exactly one:\n   - **Address** --- fix it, commit.\n   - **Rebut** --- explain why it's correct (with evidence).\n   - **Defer** --- file a follow-up issue, link it (use the `defer-issue` skill).\n\n4. **Push fixes** (if any). If main moved ahead of the branch, sync it in\n   *before* you push, so the next review evaluates against current main:\n   ```bash\n   git fetch origin main\n   git log --oneline ..origin\u002Fmain | head   # any commits? merge them in\n   git merge origin\u002Fmain\n   ```\n   Resolve conflicts, run the repo's pre-commit checks, then re-scan the PR's touched files with whitespace-normalizing search for merge-status hedges that `main` may have falsified (`still open`, `not yet merged`, `once that merges`, `as of`, `will live at`, `proposed in`) before pushing.\n   Do not use line-oriented literal grep; semantic line breaks can split the phrase this check needs to find.\n   Don't rebase\u002Fsquash a published branch -- a merge commit matches GitHub's \"Update branch\" button. (The `sync-pr-branch` skill does exactly this.)\n\n   **Resolve inline threads as you go --- including outdated ones.**\n   After pushing fixes for a round, resolve the corresponding inline review threads immediately (`RESOLVE_REVIEW_THREAD`) via `mcp__github__pull_request_review_write` with `method: resolve_thread` and the `threadId` (returned by `READ_PR_REVIEW_COMMENTS` --- `mcp__github__pull_request_read` with `method: get_review_comments`).\n   Don't wait until fully-clean to do thread housekeeping.\n   For threads marked *outdated* in GitHub (the underlying code changed), confirm the fix is in the current tree, then resolve.\n   Threads whose fixes are already in the tree but were never resolved still block the \"fully clean\" check --- clear them as soon as you confirm the code is right.\n\n   **Opportunistic conflict sweep.**\n   After pushing (or after any round where all findings were Rebutted\u002FDeferred with no push), scan other open PRs in the same repo for merge conflicts:\n   ```bash\n   gh pr list --state open --json number,title,headRefName,author,assignees,mergeable,mergeStateStatus,comments   # LIST_PRS\n   ```\n   Filter that list by `memories\u002Freviewing-prs.md`'s scope test first, as `ardia` step 1 does (opened by or assigned to the invoking user, explicitly requested by name, or authored by the GitHub Actions app (`github-actions`));\n   an out-of-scope conflicting PR is reported to the user and left untouched (no comment, no push);\n   they can assign or name it if they want it resolved.\n   For each in-scope PR where `mergeable == \"CONFLICTING\"` **or `\"UNKNOWN\"`** (see `resolve-conflicts`, \"Verify before you act\" --- `UNKNOWN` can mean GitHub hasn't finished computing yet, not that there's no conflict), verify with `git merge-tree --write-tree origin\u002Fmain origin\u002F\u003Cbranch>` (git ≥ 2.38) before acting, then check claim status (most recent comment) and fix unclaimed ones --- same cascade procedure as `post-merge` step 1.5 (claim → isolated worktree → fetch main → merge → `resolve-conflicts` skill → push → unclaim).\n   A merge to `main` during your ARDI loop can create new conflicts in sibling PRs; clearing them while waiting for the next verdict is better than letting them pile up.\n\n5. **Post the ARD summary** as a comment on the MR\u002FPR (table format per the\n   ARD skill).\n\n6. **Re-request review --- but don't double-trigger.**\nHow depends on the repo's review trigger first, and on whether this round pushed code second.\n**Read the review workflow's `on:` block once per repo** (the first time you push to a PR there) before applying the branches below --- the first one is wrong for a repo that has no push-based trigger, and nothing about the PR's appearance will tell you.\n   - **Code was pushed, and the review workflow carries a push-based trigger** (`pull_request:` with `synchronize`): the push **already** triggers the review.\n     Do **NOT** also post \"@claude review again\".\n     On workflows with `concurrency: cancel-in-progress`, the push-triggered and mention-triggered runs **cancel each other**, leaving the latest commit with a canceled, never-posted verdict.\n     Just wait for the push-triggered review.\n   - **Code was pushed, and the review workflow is dispatch-only** --- its `pull_request:` trigger is absent or commented out, leaving `workflow_dispatch` (and perhaps `issue_comment`), which is how a repo disables automatic review on PR activity.\n     The push fires **nothing**, so you must dispatch explicitly, **after the round's last push** rather than once when the PR opened: `gh workflow run \u003Creview-workflow>.yml -R \u003Cowner>\u002F\u003Crepo> --ref \u003CPR-branch> -f pr_number=\u003CN>`, taking the input's name from that workflow's own file.\n     **There IS a cancel-in-progress race here, and it is one you create yourself** --- dispatching after each push means each dispatch cancels the last, since the group is keyed on the PR number rather than on the trigger.\n     Finish pushing, then dispatch once.\n     Pass `--ref` as well, or the cancelled run's failing review gate attaches to the default branch and never appears on the PR.\n     See [`ardi`](..\u002F..\u002Fshared\u002Fworkflow\u002Fardi.md)'s \"Dispatch once, after the round's LAST push\".\n     This is the branch that fails silently: CI still goes green on each push, so watching CI to green feels like watching the PR, and a verdict from an earlier head stands unchallenged for as long as you keep pushing.\n     (UCD-SERG\u002Fserocalculator, 2026-08-07: `claude-code-review.yml` has its `pull_request:` trigger commented out with the note \"reviews are on request only\".\n     Six pushes across several hours were each followed by watching CI to green.\n     No review was ever dispatched, and a verdict from roughly 20 hours earlier stood until the user asked whether the PR had a clean review.)\n   - **No code pushed** (all Rebut\u002FDefer): no push occurred, so nothing\n     auto-triggers --- you **must** explicitly re-request (post `@claude review`,\n     or the forge's equivalent). This is the only case where you post the\n     mention.\n   - **Heads-up --- some repos' review workflow is *not* comment-triggered.**\n     Some Quarto \u002F R-package repos run `claude-code-review.yml` on `pull_request` (`opened, synchronize, ready_for_review, reopened`) and `workflow_dispatch` (input `pr_number`), not on an `@claude` comment.\n     A new push auto-fires it.\n     To force a fresh review on an existing PR **without a new commit**, prefer `workflow_dispatch`: `gh workflow run claude-code-review.yml --ref \u003CPR-branch> -f pr_number=\u003CN>`.\n     Without `gh`, use the REST `...\u002Factions\u002Fworkflows\u002Fclaude-code-review.yml\u002Fdispatches` endpoint, or your GitHub MCP workflow-dispatch tool.\n     Closing+reopening the PR also works (fires `reopened`) but adds timeline noise.\n     See [`memories\u002Fclaude-review-dispatch.md`](..\u002F..\u002Fmemories\u002Fclaude-review-dispatch.md).\n   - **Marking a draft ready seconds after its final push is another cancel-in-progress race** --- the ready-event and synchronize runs fire a second apart and the cancellation can land on the newer (current-head) run; see [`pr-on-claim`](..\u002F..\u002Fshared\u002Fworkflow\u002Fpr-on-claim.md) for the diagnosis and the `gh run rerun` remedy.\n   - **A review ends up canceled with no comment:** first check whether a **newer run for this same PR** is already in flight.\n     Under `concurrency: cancel-in-progress` a fresh dispatch is what cancelled the old run, so a retry cancels the new one --- possibly a review a human just asked for, since `claude-bot.yml`'s `review-workflow-file` re-dispatches this very workflow into the same per-PR group.\n     Attribute each in-flight run to a PR from its own `gather-context` log, since `gh run list`'s branch column reads `main` for all of them, and **wait** rather than retry if one is running.\n     Only when nothing is running, trigger one cleanly via `gh workflow run claude-review.yml --ref \u003CPR-branch> -f pr_number=\u003CN>` (input is `pr_number`) and don't push\u002Fcomment again until it posts.\n     Pass `--ref` rather than omitting it: without it the dispatch runs against the default branch, so the run's check runs attach to `main`'s tip instead of the PR's head commit, leaving the PR's own review check stale and making a check-runs query at that head useless as the in-flight pre-check above.\n     See [`review-verdict-pitfalls`](..\u002F..\u002Fshared\u002Fworkflow\u002Freview-verdict-pitfalls.md)'s \"A `cancelled` review is the one case where retrying is the cause rather than the remedy\", and its follow-on on why the cheap PR-side pre-check needs that ref.\n     Note: a review run on a **bot-pushed** commit may show as `action_required` (gated) and never run --- the explicit `workflow_dispatch` bypasses that.\n\n   **Don't let the trigger phrase leak into prose.**\n   The `issue_comment` trigger fires on the bare bot `@`-mention **anywhere** in a comment body --- even inside a sentence saying you're *not* triggering a review.\n   In ARD summaries and status comments, refer to it obliquely (\"re-request review\", \"the review-trigger mention\") or split the tokens (e.g. `@ claude`, with a space, so the raw body never contains the contiguous handle); paste the literal `@`-mention only when you actually intend to dispatch.\n   A stray mention spawns a run that cancels the push-triggered review on `cancel-in-progress` setups.\n   On some mention-bot setups it also starts a session whose residual-commit sweep can churn the branch.\n\n    Then wait for the new verdict **and** for CI.\n\n    A CI-fix push is not handled when the first few jobs go green.\n    Read the full rollup: pending, queued, and in-progress jobs are still running;\n    a cancelled job has finished but is not clean and still needs investigation or a rerun before the rollup counts as done.\n    Arm [`wait-for-results`](..\u002Fwait-for-results\u002FSKILL.md) (or the timer\n    below) instead of returning to chat with a partial `gh pr checks` read.\n    (gha#511, 2026-08-18: lint\u002Flink went green, a sibling job sat in\n    setup then cancelled, and the session left without waiting; the user\n    asked why.)\n\n    **Set a timer when ending a turn waiting for AI reviews.**\n    Whenever ending a turn while waiting for AI reviews or CI completion after pushing code, launch a `schedule` timer (e.g. 120s) and follow the check-and-reschedule procedure in [`shared\u002Fworkflow\u002Fardi.md`](..\u002F..\u002Fshared\u002Fworkflow\u002Fardi.md) when it fires.\n\n   **While waiting, keep checking for merge conflicts.**\n   Other PRs in this repo can become conflicting at any time (someone merges to `main` while the review runs).\n   Poll every few minutes with `\u002Floop` or a manual re-check:\n   ```bash\n   gh pr list --state open --json number,title,headRefName,author,assignees,mergeable,mergeStateStatus,comments \\\n     --jq '.[] | select(.mergeable == \"CONFLICTING\" or .mergeable == \"UNKNOWN\")'   # LIST_PRS\n   ```\n   Apply the same scope test as the sweep above before touching a candidate;\n   an out-of-scope one is reported to the user and left untouched.\n   Verify each in-scope candidate with `git merge-tree --write-tree origin\u002Fmain\n   origin\u002F\u003Cbranch>` (git ≥ 2.38; see `resolve-conflicts`, \"Verify before you act\") before\n   claiming --- `UNKNOWN` isn't proof of a real conflict, and `CONFLICTING` can\n   be stale if a sibling PR merged since GitHub last computed it. Claim and\n   fix confirmed conflicts using the cascade procedure in `post-merge` step\n   1.5. Re-check after each resolution --- new ones can appear at any time.\n   This turns idle wait time into productive conflict prevention.\n\n### Per-round checklist\n\n**Pause point: before advancing to the next round.**\nDo-Confirm; per\n[`shared\u002Fworkflow\u002Fskill-checklists.md`](..\u002F..\u002Fshared\u002Fworkflow\u002Fskill-checklists.md).\n\n- [ ] **Killer item:** the latest review analyzed is for the current head\n      commit, not a stale prior run.\n      Marked because getting this wrong invalidates the whole round rather\n      than leaving a gap in it: a reviewer's snapshot predating your rebuttal\n      re-raises an item you already answered, and a verdict from an older head\n      says nothing about the code you just pushed.\n      Compare the review run's `started_at` against your last reply and the\n      head SHA.\n- [ ] Every finding from that review has an ARD disposition.\n- [ ] If code changed, main was synced in first when needed, merge-status\n      hedges in touched files were re-scanned with whitespace normalization,\n      then fixes were pushed.\n- [ ] If source comments or generated inputs changed, the repository's\n      generator was run after the final edit and its generated paths are clean\n      against the index; stage any resulting artifacts before pushing.\n- [ ] ARD summary was posted and corresponding inline-thread replies\u002Fresolutions\n      were handled.\n- [ ] Re-review trigger was chosen correctly, reading the repo's trigger class\n      first: rely on the push alone only where the review workflow carries a\n      push-based trigger; dispatch explicitly after **every** push where it is\n      dispatch-only; post the mention only when no code was pushed.\n      A green CI run at the current head is not a review in flight.\n\n7. **Repeat from step 2** until the PR\u002FMR is **fully clean** (see [*The bar: \"fully clean\"*](#the-bar-fully-clean) -- zero findings **and** all CI workflows and check runs green and completed **and** every inline thread resolved).\n   Don't exit on a clean review body alone.\n\n## Fix broken CI\u002Fworkflows too\n\nIf the PR's CI checks are failing (not just the review), investigate and fix them as part of the ARDI loop --- don't declare \"clean\" with red CI.\nThis includes:\n\n- **Workflow syntax errors** --- fix them in this repo.\n- **Caller\u002Fbootstrap failures** --- trace the local caller and reusable\n  workflow interface before filing anything.\n  When a supported caller setting\n  can remove an unnecessary bootstrap step, make the scoped local repair in\n  the same round; reserve an issue-only response for a genuinely upstream or\n  externally blocked fix.\n- **Upstream template bugs** --- if the failure is in a reusable workflow from\n  a shared CI library (e.g., HACtions) or a GitHub Action, file an issue (or open a PR) upstream using\n  the `sup` skill, then either pin a working version or apply a local\n  workaround until the upstream fix lands.\n- **Flaky \u002F infra failures** --- retry once; if it persists, investigate root\n  cause.\n\nThe goal is green CI + clean review, not just clean review.\n\n## Delegating sidecar work\n\nSome steps benefit from a subagent rather than blocking the round on the main\nthread --- investigating a CI failure whose cause isn't obvious (see above),\nverifying a reviewer's factual claim before Addressing\u002FRebutting it, or\nchecking a sibling PR for a merge conflict during the opportunistic sweep.\nDelegate that via the `Agent` tool and keep driving the round itself (ARD,\npush, post summary, re-request review) on the main thread.\n\nFor a judgment-heavy sidecar task (a subtle root-cause hunt, adjudicating a deadlocked rebuttal before escalating to a human), give the subagent a stronger model via the `Agent` tool's `model` parameter (e.g. `model: 'opus'`).\nSymmetrically, drop to a cheaper\u002Ffaster tier (`model: 'fable'` or `'haiku'`) for a mechanical sidecar task --- see [`select-model`](..\u002F..\u002Fskills\u002Fselect-model\u002FSKILL.md)'s decision tree for both directions.\nFor a heavy fan-out investigation\u002Fverification pass, prefer a separately-billed provider (e.g. the `codex` CLI, in UCDH projects only) first when available --- see [`delegate-to-codex`](..\u002Fdelegate-to-codex\u002FSKILL.md).\n\n## The bar: \"fully clean\"\n\nThe loop ends only at **fully clean**, which means **both**:\n\n1. **All CI workflows and check runs are green and completed** --- every check,\n   not just required ones and not just the review job; never still queued or\n   in progress (see *Fix broken CI\u002Fworkflows too* above, and\n   `shared\u002Fworkflow\u002Ffully-clean.md` for the check-run-vs-workflow-run and\n   API-casing gotchas).\n2. **Every reviewer's latest verdict is totally clean** --- zero flagged items under any heading.\n   \"Looks good\" \u002F \"no findings\" \u002F \"approved\" with no follow-on bullets.\n   Every item that wasn't directly **Addressed** is either **Deferred** to a tracked issue or **Rebutted with a rebuttal that actually convinced the reviewer** (they didn't re-raise it on the next round).\n   A rebuttal the reviewer still disputes does **not** count as clean.\n   Don't stop at \"ready with one minor nit.\"\n   A later all-clear from one reviewer does not clear another reviewer's standing\n   not-clean, even with `mwc` (ai-config#2274).\n   **That review must be a genuine posted verdict at the current head, from an external reviewer if one is reachable** -- check availability again right before declaring clean, not just at the round where self-review first started; an inferred \"probably clean\" from green CI and resolved threads does not satisfy this.\n\n**Threads:** at fully-clean, every **inline** review thread is resolved, and\nthe only conversation left open is the final all-clear exchange --- the\nreviewer's all-clear comment (usually a top-level PR comment, not an inline\nthread) and your reply to it. (Thread mechanics live in the `ard` skill, step\n4b.)\n\n### Fully-clean exit checklist\n\n**Pause point: before declaring \"clean\" or reporting the PR ready.**\nDo-Confirm; per\n[`shared\u002Fworkflow\u002Fskill-checklists.md`](..\u002F..\u002Fshared\u002Fworkflow\u002Fskill-checklists.md).\n\n- [ ] **Run automated clean check**: `python3 scripts\u002Fcheck-pr-fully-clean.py --quorum \u003Cnumber-of-reachable-providers> \u003Cpr-number>` returned exit code `0` (confirming all CI check runs completed with success AND clean review comments for current HEAD SHA have been posted).\n- [ ] **No reviews in flight:** no review check runs are in progress and no review requests are pending;\n  consensus clean verdicts have landed across all active reviewers with none still running (ai-config#3570).\n- [ ] **Killer item:** all workflows and check runs are green **and completed** for the current head --- re-fetched and re-counted now, not checked off from the names you were watching.\n  Marked because a posted verdict does not mean the review job finished, the check set can *grow* mid-run as jobs spawn others, and two check runs can share a name (a stale green plus a live one), so matching on name returns the wrong one.\n  Key on check-run id, and read `status` before `conclusion`.\n- [ ] Every reviewer's latest verdict has zero findings and no disputed rebuttals.\n- [ ] You have obtained genuine posted clean verdicts at the current head from ALL reachable providers in your pinned quorum -- re-checked right before declaring clean.\n- [ ] Every self-review posted along the way was produced by a separate `adversarial-reviewer` subagent rather than inline, and its findings were dispositioned ([`adversarial-self-review`](..\u002F..\u002Fshared\u002Fworkflow\u002Fadversarial-self-review.md)).\n- [ ] **Killer item, for a PR that changes a rendered document (Word, PDF, slides, a manuscript):** the render at the current head has been viewed page by page, the evidence posted on the PR, and an independent referee read of that render posted too, per [`review-rendered-documents`](..\u002F..\u002Fshared\u002Fworkflow\u002Freview-rendered-documents.md).\n  Marked because green CI and a clean verdict say nothing about caption placement, table layout, or page breaks, and skipping this step is how broken manuscripts were reported ready.\n- [ ] Every inline review thread is resolved.\n- [ ] The only open conversation is the final all-clear exchange (the reviewer's all-clear comment and your reply --- normally a top-level PR comment, not an inline thread).\n\n## Stopping conditions\n\n**There is no round limit.\nAlways request another review.**\nThe loop on a single PR ends on exactly three things:\n\n1. **A totally clean review consensus on the latest pushed commit** ---\n   no nits, no non-blocking comments, no informational notes,\n   everything Addressed or agreed Deferred,\n   evaluating the exact HEAD SHA currently on the branch across all active reviewers\n   with no reviews still running (ai-config#3570).\n   **Crucial:** Pushing fixes for a review starts a new review cycle. The ARDI loop is **NEVER** finished when you push fixes for a finding-bearing review or post an ARD summary. You must wait for the new review run evaluating your latest pushed commit to post, fetch and parse that review, and confirm it contains zero findings before ending the loop. See [*The bar: \"fully clean\"*](#the-bar-fully-clean).\n2. **Nothing actionable remains** --- every open item has been escalated to a human and is waiting on their decision, so there is no next action you can take.\n   Not \"some items are deadlocked\"; *all* of them.\n3. **The user says stop.**\n\nNothing else.\nNot a round count, not a sense that findings are getting smaller, not a judgment that the reviewer is nitpicking.\n\n**Deadlock is per-item, and it does not stop the loop.**\nIf you and the reviewer can't reach consensus on one finding (your rebuttal didn't convince them, and their re-raise didn't convince you), **escalate that item to a human reviewer** rather than looping on it or unilaterally overriding.\nRequest `the repository owner` via the `request-pr-review` skill, `@`-mention them in a comment summarizing the impasse, and surface the open item to the user.\nThe raw `gh pr edit \u003CN> --add-reviewer \u003Creviewer>` form bypasses that skill and so does **not** inherit its `Lacaedemon\u002Fsparta` exception.\nIn sparta, escalate to the user in chat rather than requesting a reviewer at all.\nThen **keep driving the PR**: address every other finding, push, and request the next review.\nOnly when *every* remaining item is an escalated deadlock does condition 2 above fire, and even then the loop resumes the moment the human rules.\n\n### Sweep-level scheduling is a different question\n\n[`ardia`](..\u002Fardia\u002FSKILL.md) and [`gia`](..\u002Fgia\u002FSKILL.md) drive *many* PRs.\nWhen one of those is waiting on a human --- a deadlocked item, a blocked dependency, an unresolvable conflict --- the sweep records it and moves to the next PR so the batch keeps moving.\nThat is **scheduling**, not a stopping condition for the loop: the sweep returns when the human rules, and nothing about it licenses accepting unaddressed findings on the PR itself.\n\n### \"Asymptotic noise\" is an anti-pattern, not a signal\n\nThis skill used to carry a guard saying that after 3-4 rounds of new nits you should surface the pattern and ask whether to continue.\n**That guard is removed, and reasoning of that shape must not be reintroduced.**\nIt fails three ways:\n\n- **It fires on round count, not on finding quality.**\nA round producing genuine, reproducible correctness bugs is indistinguishable from a round producing style churn if all you count is rounds.\n- **It reads as diligence**, which is exactly why it goes unexamined. Stopping\n  to ask feels like respecting the user's time.\n- **It hands triage back to the user** --- the precise move [`address-every-comment`](..\u002F..\u002Fshared\u002Fworkflow\u002Faddress-every-comment.md) already forbids for individual findings.\n  The guard reintroduced at loop scale the thing that fragment bans at item scale.\n\nThe tell is any sentence of the form \"the reviewer keeps finding things, so maybe we should stop.\"\nReplace it with another review request --- and, from the third finding-bearing round on, with a changed procedure alongside it, per [`ardi`](..\u002F..\u002Fshared\u002Fworkflow\u002Fardi.md)'s \"Three or more review rounds that each returned findings\".\n\nTwo things that are **not** this anti-pattern and stay:\n\n- **The per-item hold.**\nWhen a reviewer re-raises one already-deferred item verbatim each round, reply once pointing at the tracked issue and hold on *that item*, while continuing to fix every new finding.\nThat is about not re-litigating one item; it never stops the loop.\n- **Reporting the round count.**\nSaying \"round 7, 23 findings, all Addressed\" is useful information.\nAttaching \"shall I stop?\" to it is the anti-pattern.\n\n(ai-config#1029 is the case record: six rounds, 23 findings, all Addressed, with rounds 2-6 each finding real bugs in *earlier rounds' own fixes* --- including CRLF silently disabling a failure path repo-wide, a `--compare` reporting a zero delta, and a traversal-order-dependent measurement.\nThe loop stopped to ask twice under the old guard; both times the answer was to keep going, and the next round found four more real bugs.)\n\n## On clean\n\nPost an unclaim comment (`COMMENT_PR`) to unblock any parallel sessions that backed off in step 1:\n\n```bash\ngh pr comment \u003CN> --body \"Done --- PR is free.\n\n_Posted by Claude Code (AI agent) --- not written by a human._\"   # COMMENT_PR\n```\n\n**Then run `ums`, before reporting ready.**\nThe clean verdict is still a proactive-UMS checkpoint for this PR, not the\nmerge, but it is not the first one: run a pass when you read the review,\nincluding a Rebut\u002FDefer round, rather than holding everything for the\nverdict.\nSee `CLAUDE.md`'s \"Run UMS proactively, as learnings accumulate\".\nThe loop's whole point is that it ends here and hands the merge to a human,\nso a pass deferred to the merge is deferred to a moment this session may\nnever see.\nEverything the review lifecycle taught -- recurring findings, corrections,\nguidance given along the way -- is complete as of the verdict.\n\nAlways provide a clickable link to the MR\u002FPR in the final message.\n\nReport the final verdict and round count. Don't merge unless asked.\n","# ARDI --- ARD + Iterate (single PR\u002FMR)\n\nDrive one PR\u002FMR to a clean review verdict by looping: read every review → ARD every\nfinding from every reviewer → push → post summary → re-request review from those\nreviewers → repeat until every reviewer's latest verdict is clean.\nA later all-clear from one reviewer does not clear another reviewer's standing\nnot-clean, even with `mwc` active (ai-config#2274).\n\n## Procedure\n\n1. **Identify and claim the PR\u002FMR.**\nUse the current branch's open MR, or the one the user specified.\nPost a brief claim comment (`COMMENT_PR`) so a parallel `@claude` CI run or another person doesn't start a colliding session.\nThe body carries a real blank line before the disclosure marker --- `\\n` inside a bash double-quoted string is the two characters, not a newline:\n\n```bash\ngh pr comment \u003CN> --body \"Driving this PR to clean --- please hold off until done.\n\nSession worktree: \u003Coutput of git rev-parse --show-toplevel>\n\n_Posted by Claude Code (AI agent) --- not written by a human._\"   # COMMENT_PR\n```\nSkip if your most recent comment already says so and is still live --- claims expire 2 hours after the most recent push or comment, and an expired one needs reasserting, per [`claim-pr`](..\u002F..\u002Fshared\u002Fworkflow\u002Fclaim-pr.md).\n(`COMMENT_PR` and the other bracketed tokens below are abstract operation tokens --- resolve to your model's tool via [`tool-mappings.md`](..\u002F..\u002Ftool-mappings.md).)\n\n2. **Read every review, not only the latest.**\nPull the most recent reviewer comment --- the `@claude` bot's, or a human's ---\nand every other review that still has a standing verdict.\nDon't trust earlier cached verdicts --- actively poll until a review appears that references the commit you just pushed, then read **that** one.\nIf one review is all-clear and another raises findings or nits, the findings\nwin: ARD the union, then request fresh reviews.\nDo not merge on the all-clear, even with `mwc` (ai-config#2274).\n`gh pr checks` (`PR_CHECKS`) \u002F `glab ci list` going green is about **CI state**, not the review verdict --- always parse the latest review *body* for findings.\nA user question about this PR that is not the word \"status\" still requires\nthis fetch (see [`pr-status`](..\u002Fpr-status\u002FSKILL.md)).\nDon't answer the chat question from session memory while a review comment\nsits unread.\n\n   **When the user provides a specific review link\u002FID** (e.g. `#pullrequestreview-4761444085`): Fetch that review directly via the GitHub API using its ID.\n   Many bot reviews have a generic overview body but the actual findings live in **inline comments on specific lines** --- don't rely on the top-level review body alone.\n   Fetch both the review overview and its inline comments:\n   ```bash\n   gh api \"repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fpulls\u002F\u003CN>\u002Freviews\u002F\u003Creview-id>\" --jq '{state, body}'\n   gh api \"repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fpulls\u002F\u003CN>\u002Fcomments\" --paginate --jq '.[] | select(.pull_request_review_id == \u003Creview-id>) | {line: (.line \u002F\u002F .original_line), body}'\n   ```\n   The comments endpoint returns pages oldest-first -- without `--paginate`\n   a later review's inline comments can sit past the first page and never\n   reach the filter, making a review with real findings look empty.\n\n   - **GitHub:**\n     Filter on the body marker, not on an author login.\n     Do not take `| last` as the only review to ARD\n     (ai-config#2274).\n     Claude, Antigravity, and skip notices can all post as `github-actions[bot]`,\n     so a login filter silently drops a standing not-clean.\n     ```bash\n     gh api repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fissues\u002F\u003CN>\u002Fcomments --paginate \\\n       | jq -s '[.[][] | select(.body | test(\"\\\\*\\\\*Claude finished|### Verdict|Antigravity Agent Report\"; \"i\"))] | .[] | {created: .created_at, user: .user.login, body: .body}'   # READ_PR_COMMENTS\n     ```\n     Completed Claude runs start the body with `**Claude finished`.\n     Read every matching comment, not only the newest.\n     A later all-clear from a different reviewer does not clear another\n     reviewer's standing not-clean.\n     For a **human** reviewer (any login), also gather comments with the `ard`\n     skill's step 1 (`gh pr view \u003CN> --comments` plus the inline-thread API).\n\n     **Copilot code review doesn't post as a PR comment at all -- it's a\n     formal GitHub review**, invisible to the command above.\n\n     **Do not request it while the Copilot moratorium stands.**\n     `MORATORIUM_END` in\n     [`hooks\u002Fno-unreviewed-pr.py`](..\u002F..\u002Fhooks\u002Fno-unreviewed-pr.py) is the\n     live value, and `memories\u002Fgh-cli.md` carries the directive it\n     implements.\n     While that date is in the future, skip the request and read whatever\n     Copilot reviews already exist.\n     A missing Copilot verdict is then not a gap to fill but the expected\n     state, and\n     [`self-review-fallback.md`](..\u002F..\u002Fshared\u002Fworkflow\u002Fself-review-fallback.md)\n     governs the resulting absence exactly as it governs a quota-skipped\n     `@claude` round.\n\n     Otherwise request it\n     (`REQUEST_COPILOT_REVIEW` -- abstract operation token; resolve to your\n     model's tool via [`tool-mappings.md`](..\u002F..\u002Ftool-mappings.md)) and check\n     whether it posted a verdict *at the current head*. Finding a review\n     object at the right `commit_id` only proves Copilot *looked* -- it says\n     nothing about whether that review is clean. Fetch the matched review's\n     own overview **and** its inline comments (same two-call shape as the\n     review-link case above; the reviews list itself is `READ_PR_REVIEWS`)\n     before treating it as an all-clear:\n     `gh api`'s own `--jq` flag has no `--arg`\u002F`--argjson` (see\n     [`memories\u002Fgh-cli.md`](..\u002F..\u002Fmemories\u002Fgh-cli.md)'s `gh api`\u002F`jq` note) --\n     pipe the raw paginated output into standalone `jq -s` instead, which\n     supports both:\n     ```bash\n     set -o pipefail\n     head=\"$(gh pr view \"\u003CN>\" --json headRefOid -q .headRefOid)\"\n     review_ids=\"$(gh api \"repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fpulls\u002F\u003CN>\u002Freviews\" --paginate \\\n       | jq -r -s --arg head \"$head\" \\\n       '[.[][] | select(.user.login==\"copilot-pull-request-reviewer[bot]\" and .commit_id==$head)] | .[].id')\"\n     if [ -n \"$review_ids\" ]; then\n       comments=\"$(gh api \"repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fpulls\u002F\u003CN>\u002Fcomments\" --paginate | jq -s '[.[][]]')\"\n       for rid in $review_ids; do\n         gh api \"repos\u002F\u003Cowner>\u002F\u003Crepo>\u002Fpulls\u002F\u003CN>\u002Freviews\u002F$rid\" --jq '{state, body}'\n         jq --arg rid \"$rid\" \\\n           '.[] | select(.pull_request_review_id == ($rid | tonumber)) | {line: (.line \u002F\u002F .original_line), body}' \\\n           \u003C\u003C\u003C\"$comments\"\n       done\n     else\n       echo \"no fresh review yet -- wait or re-request\"\n     fi\n     ```\n     A genuine clean Copilot overview is **not** an empty string -- it reads something like \"Copilot reviewed N files and generated no new comments.\"\n     Don't require a literally empty body; parse the overview for a zero-new-findings phrasing **and** confirm zero matched inline comments -- both, not either alone, since zero inline comments with no affirmative zero-findings overview doesn't rule out a non-verdict formal review.\n     **A \"no new comments\" overview can still carry real findings in a collapsed suppression block** -- these are genuine flagged items under the fully-clean rule (address every finding regardless of confidence label), even though they never become formal inline comment objects the `\u002Fcomments` endpoint returns (verified: PR #660's review 4767752501 read \"generated no new comments\" in its overview while its full body carried 3 suppressed findings; PR #1029 repeated the shape from round 3 onward).\n     A third condition is required: the raw review **body** must not contain a suppression block at all.\n     **Match the suppression block on its heading --- a `\u003Csummary>` element, or an ATX heading inside a collapsed `\u003Cdetails>` region --- case-insensitively on `suppressed`, not on either exact phrase, not on `\u003Csummary>` alone, and not anywhere in the body.**\n     GitHub changed the wording and dropped the reason: PR #660 emits `\u003Csummary>Comments suppressed due to low confidence (3)\u003C\u002Fsummary>`, while PRs #1029 and #1031 emit `\u003Csummary>Suppressed comments (4)\u003C\u002Fsummary>`.\n     So a literal grep for `Comments suppressed` returns **zero** against a current body that plainly has the block, which produced a real false negative during the ai-config#1029 loop.\n     A body-wide match over-corrects, though, and would keep a clean PR permanently non-clean: ordinary overview prose contains the word, verified on ai-config#1038 review 4837572117, whose uncollapsed overview sentence reads \"Aligns ARDI-family guidance on deadlocks, sweep scheduling, and suppressed Copilot findings\" while its body carries no suppression block, its summary table containing no occurrence of the word (re-read 2026-09-04).\n     Scope the match to headings rather than to `\u003Csummary>` alone, and accept every heading: measured 2026-09-03 on ai-config#3084 review `5098574802`, the block arrives as a `### Suppressed comments (1)` heading nested under `\u003Csummary>Review details\u003C\u002Fsummary>`, so a `\u003Csummary>`-only match returns zero against a body that plainly has it.\n     Scoping to the whole `\u003Cdetails>` region instead would readmit the *class* of false positive a body-wide match produces, because that same review wraps its `Pull request overview` and `File summaries` prose in collapsed `\u003Cdetails>` regions of their own --- 4837572117's overview sentence was uncollapsed, so it controls only for prose sitting outside a `\u003Cdetails>` region.\n     A body does exercise that class: ai-config#1036 review `4837539268` collapses a `Show a summary per file` table reading \"Detects suppressed Copilot findings.\" and carries no suppression block, so the region-wide form flags it and the heading anchor does not.\n     Enumerating Copilot review bodies from the `reviews` endpoint on 2026-09-04 --- 137 bodies across 39 PRs, from ai-config PRs 1000 through 1100 and 3060 through 3130 plus ai-config#660, ai-config#2913 and ai-config#2976 --- that is the region-wide form's only false positive and its only disagreement with the heading anchor.\n     Keep it as a fallback anyway, on the cost asymmetry rather than on a clean record: a false zero merges over real findings while a false positive costs one re-read.\n     So read a hit only the fallback finds as probably spurious, and re-read the region before treating it as a finding.\n     Apply all three to **every** Copilot review at the head, which is why the block above loops rather than reducing the id list with `| last`.\n     No per-author grouping rescues that reduction here, because every Copilot review shares one login.\n\n     The stakes are why this matters: from round 3 of ai-config#1029 onward *every* substantive finding arrived suppressed, under a \"generated no new comments\" overview with zero inline comments -- including CRLF silently disabling a failure path repo-wide.\n     So a suppressed finding is not a lower-value one, on the evidence available here --- which is a run of valuable suppressed findings, not a measured correlation.\n     GitHub's own docs do not document suppression at all, so expect the label to keep moving and key on the stable token within that scope.\n     And dispositioning a finding-bearing review's comments yourself does **not** make that same review the all-clear -- the fully-clean bar needs a *later* review, at the still-current head, that doesn't re-raise them.\n     So the all-clear is either (a) a review with a zero-new-findings overview, zero inline comments, and no suppressed- findings block, or (b) a later review at the same head as a finding-bearing one, confirming nothing remains -- never the finding-bearing review itself, however thoroughly you addressed its findings.\n     A review object existing at the current `commit_id` with unresolved findings inside it is not clean, it's just current.\n     A stub-like non-answer (\"ineligible\", \"reached their quota limit\") is also not a verdict -- treat it the same as a skipped\u002Fstub `@claude` run (see the \"Do the review yourself\" fallback in `CLAUDE.md`) and retry later or fall back accordingly.\n   - **GitLab:** poll the MR notes (`sort=desc`) for a review note that\n     references your latest short SHA before proceeding; if none has appeared,\n     wait and retry rather than reading a stale verdict.\n\n   **If the latest review is a cancellation, the live verdict is stale --- don't re-do already-applied fixes.**\n   A `cancel-in-progress` cancellation (on setups that cancel superseded review runs) means the last *complete* review's findings may already have been fixed by a commit that landed after it, with the confirming re-review killed before it could post.\n   Before treating those findings as outstanding work, **diff the current code against each one** to see what's already addressed --- then push only what's genuinely needed and let a fresh review confirm.\n   Re-applying fixes that are already in the tree wastes a round and muddies the diff.\n   If *nothing* remains outstanding (every finding is already applied), don't push an empty commit --- skip to step 6 and re-request the review directly.\n\n   **Execute the sequential multi-provider review loop** defined in `shared\u002Fworkflow\u002Fadversarial-self-review.md`.\n   You must pin all available providers (including external reviewers and the local `adversarial-reviewer` subagent).\n   You must query them sequentially, one at a time.\n   Do not request them in parallel.\n   **When the loop reaches the local self-review step, don't perform it.**\n   Hand the review to a separate [`adversarial-reviewer`](..\u002F..\u002F.claude\u002Fagents\u002Fadversarial-reviewer.md) subagent (foreground, read-only), briefed with the base ref, the paths, and the standards that apply --- never with your rationale for the change, which is what makes a reviewer agree with you.\n   The session that wrote the diff knows what it was meant to say, so an inline pass reads the artifact and recovers the intent: confirmation rather than review, and indistinguishable from the real thing in the output (see [`adversarial-self-review`](..\u002F..\u002Fshared\u002Fworkflow\u002Fadversarial-self-review.md)).\n   Its brief covers what an inline pass would have done: independently assessing both line-level implementation defects and the whole change (requirements, intent, cross-file consistency, integration, regression risk, and validation), explicitly reporting both passes in the structured verdict.\n   This includes the current PR diff against its base, each changed call path and edge case, the focused tests, and the relevant lint\u002Fdocumentation checks.\n   You must Address, Rebut, or Defer every finding it returns.\n   If a provider skips or cannot produce a verdict (quota, offline), note the skip in your ARD summary comment.\n   **Re-check reviewer availability every round, not just once:**\n   A reviewer that was unavailable a few pushes ago can become available mid-session.\n   A skipped review is never a clean external verdict on its own and does not authorize marking the PR as approved.\n   See [*The bar: \"fully clean\"*](#the-bar-fully-clean).\n   It requires clean verdicts at the current head from all reachable providers in your pinned quorum, not just a self-review.\n\n3. **ARD every finding --- regardless of severity label.**\n   \"Informational\", \"Not a blocker\", \"minor\", \"nit\", \"optional\", \"consider\", \"if you want\" are for the user's prioritization, not a pass for the implementer.\n   For each flagged item, choose exactly one:\n   - **Address** --- fix it, commit.\n   - **Rebut** --- explain why it's correct (with evidence).\n   - **Defer** --- file a follow-up issue, link it (use the `defer-issue` skill).\n\n4. **Push fixes** (if any). If main moved ahead of the branch, sync it in\n   *before* you push, so the next review evaluates against current main:\n   ```bash\n   git fetch origin main\n   git log --oneline ..origin\u002Fmain | head   # any commits? merge them in\n   git merge origin\u002Fmain\n   ```\n   Resolve conflicts, run the repo's pre-commit checks, then re-scan the PR's touched files with whitespace-normalizing search for merge-status hedges that `main` may have falsified (`still open`, `not yet merged`, `once that merges`, `as of`, `will live at`, `proposed in`) before pushing.\n   Do not use line-oriented literal grep; semantic line breaks can split the phrase this check needs to find.\n   Don't rebase\u002Fsquash a published branch -- a merge commit matches GitHub's \"Update branch\" button. (The `sync-pr-branch` skill does exactly this.)\n\n   **Resolve inline threads as you go --- including outdated ones.**\n   After pushing fixes for a round, resolve the corresponding inline review threads immediately (`RESOLVE_REVIEW_THREAD`) via `mcp__github__pull_request_review_write` with `method: resolve_thread` and the `threadId` (returned by `READ_PR_REVIEW_COMMENTS` --- `mcp__github__pull_request_read` with `method: get_review_comments`).\n   Don't wait until fully-clean to do thread housekeeping.\n   For threads marked *outdated* in GitHub (the underlying code changed), confirm the fix is in the current tree, then resolve.\n   Threads whose fixes are already in the tree but were never resolved still block the \"fully clean\" check --- clear them as soon as you confirm the code is right.\n\n   **Opportunistic conflict sweep.**\n   After pushing (or after any round where all findings were Rebutted\u002FDeferred with no push), scan other open PRs in the same repo for merge conflicts:\n   ```bash\n   gh pr list --state open --json number,title,headRefName,author,assignees,mergeable,mergeStateStatus,comments   # LIST_PRS\n   ```\n   Filter that list by `memories\u002Freviewing-prs.md`'s scope test first, as `ardia` step 1 does (opened by or assigned to the invoking user, explicitly requested by name, or authored by the GitHub Actions app (`github-actions`));\n   an out-of-scope conflicting PR is reported to the user and left untouched (no comment, no push);\n   they can assign or name it if they want it resolved.\n   For each in-scope PR where `mergeable == \"CONFLICTING\"` **or `\"UNKNOWN\"`** (see `resolve-conflicts`, \"Verify before you act\" --- `UNKNOWN` can mean GitHub hasn't finished computing yet, not that there's no conflict), verify with `git merge-tree --write-tree origin\u002Fmain origin\u002F\u003Cbranch>` (git ≥ 2.38) before acting, then check claim status (most recent comment) and fix unclaimed ones --- same cascade procedure as `post-merge` step 1.5 (claim → isolated worktree → fetch main → merge → `resolve-conflicts` skill → push → unclaim).\n   A merge to `main` during your ARDI loop can create new conflicts in sibling PRs; clearing them while waiting for the next verdict is better than letting them pile up.\n\n5. **Post the ARD summary** as a comment on the MR\u002FPR (table format per the\n   ARD skill).\n\n6. **Re-request review --- but don't double-trigger.**\nHow depends on the repo's review trigger first, and on whether this round pushed code second.\n**Read the review workflow's `on:` block once per repo** (the first time you push to a PR there) before applying the branches below --- the first one is wrong for a repo that has no push-based trigger, and nothing about the PR's appearance will tell you.\n   - **Code was pushed, and the review workflow carries a push-based trigger** (`pull_request:` with `synchronize`): the push **already** triggers the review.\n     Do **NOT** also post \"@claude review again\".\n     On workflows with `concurrency: cancel-in-progress`, the push-triggered and mention-triggered runs **cancel each other**, leaving the latest commit with a canceled, never-posted verdict.\n     Just wait for the push-triggered review.\n   - **Code was pushed, and the review workflow is dispatch-only** --- its `pull_request:` trigger is absent or commented out, leaving `workflow_dispatch` (and perhaps `issue_comment`), which is how a repo disables automatic review on PR activity.\n     The push fires **nothing**, so you must dispatch explicitly, **after the round's last push** rather than once when the PR opened: `gh workflow run \u003Creview-workflow>.yml -R \u003Cowner>\u002F\u003Crepo> --ref \u003CPR-branch> -f pr_number=\u003CN>`, taking the input's name from that workflow's own file.\n     **There IS a cancel-in-progress race here, and it is one you create yourself** --- dispatching after each push means each dispatch cancels the last, since the group is keyed on the PR number rather than on the trigger.\n     Finish pushing, then dispatch once.\n     Pass `--ref` as well, or the cancelled run's failing review gate attaches to the default branch and never appears on the PR.\n     See [`ardi`](..\u002F..\u002Fshared\u002Fworkflow\u002Fardi.md)'s \"Dispatch once, after the round's LAST push\".\n     This is the branch that fails silently: CI still goes green on each push, so watching CI to green feels like watching the PR, and a verdict from an earlier head stands unchallenged for as long as you keep pushing.\n     (UCD-SERG\u002Fserocalculator, 2026-08-07: `claude-code-review.yml` has its `pull_request:` trigger commented out with the note \"reviews are on request only\".\n     Six pushes across several hours were each followed by watching CI to green.\n     No review was ever dispatched, and a verdict from roughly 20 hours earlier stood until the user asked whether the PR had a clean review.)\n   - **No code pushed** (all Rebut\u002FDefer): no push occurred, so nothing\n     auto-triggers --- you **must** explicitly re-request (post `@claude review`,\n     or the forge's equivalent). This is the only case where you post the\n     mention.\n   - **Heads-up --- some repos' review workflow is *not* comment-triggered.**\n     Some Quarto \u002F R-package repos run `claude-code-review.yml` on `pull_request` (`opened, synchronize, ready_for_review, reopened`) and `workflow_dispatch` (input `pr_number`), not on an `@claude` comment.\n     A new push auto-fires it.\n     To force a fresh review on an existing PR **without a new commit**, prefer `workflow_dispatch`: `gh workflow run claude-code-review.yml --ref \u003CPR-branch> -f pr_number=\u003CN>`.\n     Without `gh`, use the REST `...\u002Factions\u002Fworkflows\u002Fclaude-code-review.yml\u002Fdispatches` endpoint, or your GitHub MCP workflow-dispatch tool.\n     Closing+reopening the PR also works (fires `reopened`) but adds timeline noise.\n     See [`memories\u002Fclaude-review-dispatch.md`](..\u002F..\u002Fmemories\u002Fclaude-review-dispatch.md).\n   - **Marking a draft ready seconds after its final push is another cancel-in-progress race** --- the ready-event and synchronize runs fire a second apart and the cancellation can land on the newer (current-head) run; see [`pr-on-claim`](..\u002F..\u002Fshared\u002Fworkflow\u002Fpr-on-claim.md) for the diagnosis and the `gh run rerun` remedy.\n   - **A review ends up canceled with no comment:** first check whether a **newer run for this same PR** is already in flight.\n     Under `concurrency: cancel-in-progress` a fresh dispatch is what cancelled the old run, so a retry cancels the new one --- possibly a review a human just asked for, since `claude-bot.yml`'s `review-workflow-file` re-dispatches this very workflow into the same per-PR group.\n     Attribute each in-flight run to a PR from its own `gather-context` log, since `gh run list`'s branch column reads `main` for all of them, and **wait** rather than retry if one is running.\n     Only when nothing is running, trigger one cleanly via `gh workflow run claude-review.yml --ref \u003CPR-branch> -f pr_number=\u003CN>` (input is `pr_number`) and don't push\u002Fcomment again until it posts.\n     Pass `--ref` rather than omitting it: without it the dispatch runs against the default branch, so the run's check runs attach to `main`'s tip instead of the PR's head commit, leaving the PR's own review check stale and making a check-runs query at that head useless as the in-flight pre-check above.\n     See [`review-verdict-pitfalls`](..\u002F..\u002Fshared\u002Fworkflow\u002Freview-verdict-pitfalls.md)'s \"A `cancelled` review is the one case where retrying is the cause rather than the remedy\", and its follow-on on why the cheap PR-side pre-check needs that ref.\n     Note: a review run on a **bot-pushed** commit may show as `action_required` (gated) and never run --- the explicit `workflow_dispatch` bypasses that.\n\n   **Don't let the trigger phrase leak into prose.**\n   The `issue_comment` trigger fires on the bare bot `@`-mention **anywhere** in a comment body --- even inside a sentence saying you're *not* triggering a review.\n   In ARD summaries and status comments, refer to it obliquely (\"re-request review\", \"the review-trigger mention\") or split the tokens (e.g. `@ claude`, with a space, so the raw body never contains the contiguous handle); paste the literal `@`-mention only when you actually intend to dispatch.\n   A stray mention spawns a run that cancels the push-triggered review on `cancel-in-progress` setups.\n   On some mention-bot setups it also starts a session whose residual-commit sweep can churn the branch.\n\n    Then wait for the new verdict **and** for CI.\n\n    A CI-fix push is not handled when the first few jobs go green.\n    Read the full rollup: pending, queued, and in-progress jobs are still running;\n    a cancelled job has finished but is not clean and still needs investigation or a rerun before the rollup counts as done.\n    Arm [`wait-for-results`](..\u002Fwait-for-results\u002FSKILL.md) (or the timer\n    below) instead of returning to chat with a partial `gh pr checks` read.\n    (gha#511, 2026-08-18: lint\u002Flink went green, a sibling job sat in\n    setup then cancelled, and the session left without waiting; the user\n    asked why.)\n\n    **Set a timer when ending a turn waiting for AI reviews.**\n    Whenever ending a turn while waiting for AI reviews or CI completion after pushing code, launch a `schedule` timer (e.g. 120s) and follow the check-and-reschedule procedure in [`shared\u002Fworkflow\u002Fardi.md`](..\u002F..\u002Fshared\u002Fworkflow\u002Fardi.md) when it fires.\n\n   **While waiting, keep checking for merge conflicts.**\n   Other PRs in this repo can become conflicting at any time (someone merges to `main` while the review runs).\n   Poll every few minutes with `\u002Floop` or a manual re-check:\n   ```bash\n   gh pr list --state open --json number,title,headRefName,author,assignees,mergeable,mergeStateStatus,comments \\\n     --jq '.[] | select(.mergeable == \"CONFLICTING\" or .mergeable == \"UNKNOWN\")'   # LIST_PRS\n   ```\n   Apply the same scope test as the sweep above before touching a candidate;\n   an out-of-scope one is reported to the user and left untouched.\n   Verify each in-scope candidate with `git merge-tree --write-tree origin\u002Fmain\n   origin\u002F\u003Cbranch>` (git ≥ 2.38; see `resolve-conflicts`, \"Verify before you act\") before\n   claiming --- `UNKNOWN` isn't proof of a real conflict, and `CONFLICTING` can\n   be stale if a sibling PR merged since GitHub last computed it. Claim and\n   fix confirmed conflicts using the cascade procedure in `post-merge` step\n   1.5. Re-check after each resolution --- new ones can appear at any time.\n   This turns idle wait time into productive conflict prevention.\n\n### Per-round checklist\n\n**Pause point: before advancing to the next round.**\nDo-Confirm; per\n[`shared\u002Fworkflow\u002Fskill-checklists.md`](..\u002F..\u002Fshared\u002Fworkflow\u002Fskill-checklists.md).\n\n- [ ] **Killer item:** the latest review analyzed is for the current head\n      commit, not a stale prior run.\n      Marked because getting this wrong invalidates the whole round rather\n      than leaving a gap in it: a reviewer's snapshot predating your rebuttal\n      re-raises an item you already answered, and a verdict from an older head\n      says nothing about the code you just pushed.\n      Compare the review run's `started_at` against your last reply and the\n      head SHA.\n- [ ] Every finding from that review has an ARD disposition.\n- [ ] If code changed, main was synced in first when needed, merge-status\n      hedges in touched files were re-scanned with whitespace normalization,\n      then fixes were pushed.\n- [ ] If source comments or generated inputs changed, the repository's\n      generator was run after the final edit and its generated paths are clean\n      against the index; stage any resulting artifacts before pushing.\n- [ ] ARD summary was posted and corresponding inline-thread replies\u002Fresolutions\n      were handled.\n- [ ] Re-review trigger was chosen correctly, reading the repo's trigger class\n      first: rely on the push alone only where the review workflow carries a\n      push-based trigger; dispatch explicitly after **every** push where it is\n      dispatch-only; post the mention only when no code was pushed.\n      A green CI run at the current head is not a review in flight.\n\n7. **Repeat from step 2** until the PR\u002FMR is **fully clean** (see [*The bar: \"fully clean\"*](#the-bar-fully-clean) -- zero findings **and** all CI workflows and check runs green and completed **and** every inline thread resolved).\n   Don't exit on a clean review body alone.\n\n## Fix broken CI\u002Fworkflows too\n\nIf the PR's CI checks are failing (not just the review), investigate and fix them as part of the ARDI loop --- don't declare \"clean\" with red CI.\nThis includes:\n\n- **Workflow syntax errors** --- fix them in this repo.\n- **Caller\u002Fbootstrap failures** --- trace the local caller and reusable\n  workflow interface before filing anything.\n  When a supported caller setting\n  can remove an unnecessary bootstrap step, make the scoped local repair in\n  the same round; reserve an issue-only response for a genuinely upstream or\n  externally blocked fix.\n- **Upstream template bugs** --- if the failure is in a reusable workflow from\n  a shared CI library (e.g., HACtions) or a GitHub Action, file an issue (or open a PR) upstream using\n  the `sup` skill, then either pin a working version or apply a local\n  workaround until the upstream fix lands.\n- **Flaky \u002F infra failures** --- retry once; if it persists, investigate root\n  cause.\n\nThe goal is green CI + clean review, not just clean review.\n\n## Delegating sidecar work\n\nSome steps benefit from a subagent rather than blocking the round on the main\nthread --- investigating a CI failure whose cause isn't obvious (see above),\nverifying a reviewer's factual claim before Addressing\u002FRebutting it, or\nchecking a sibling PR for a merge conflict during the opportunistic sweep.\nDelegate that via the `Agent` tool and keep driving the round itself (ARD,\npush, post summary, re-request review) on the main thread.\n\nFor a judgment-heavy sidecar task (a subtle root-cause hunt, adjudicating a deadlocked rebuttal before escalating to a human), give the subagent a stronger model via the `Agent` tool's `model` parameter (e.g. `model: 'opus'`).\nSymmetrically, drop to a cheaper\u002Ffaster tier (`model: 'fable'` or `'haiku'`) for a mechanical sidecar task --- see [`select-model`](..\u002F..\u002Fskills\u002Fselect-model\u002FSKILL.md)'s decision tree for both directions.\nFor a heavy fan-out investigation\u002Fverification pass, prefer a separately-billed provider (e.g. the `codex` CLI, in UCDH projects only) first when available --- see [`delegate-to-codex`](..\u002Fdelegate-to-codex\u002FSKILL.md).\n\n## The bar: \"fully clean\"\n\nThe loop ends only at **fully clean**, which means **both**:\n\n1. **All CI workflows and check runs are green and completed** --- every check,\n   not just required ones and not just the review job; never still queued or\n   in progress (see *Fix broken CI\u002Fworkflows too* above, and\n   `shared\u002Fworkflow\u002Ffully-clean.md` for the check-run-vs-workflow-run and\n   API-casing gotchas).\n2. **Every reviewer's latest verdict is totally clean** --- zero flagged items under any heading.\n   \"Looks good\" \u002F \"no findings\" \u002F \"approved\" with no follow-on bullets.\n   Every item that wasn't directly **Addressed** is either **Deferred** to a tracked issue or **Rebutted with a rebuttal that actually convinced the reviewer** (they didn't re-raise it on the next round).\n   A rebuttal the reviewer still disputes does **not** count as clean.\n   Don't stop at \"ready with one minor nit.\"\n   A later all-clear from one reviewer does not clear another reviewer's standing\n   not-clean, even with `mwc` (ai-config#2274).\n   **That review must be a genuine posted verdict at the current head, from an external reviewer if one is reachable** -- check availability again right before declaring clean, not just at the round where self-review first started; an inferred \"probably clean\" from green CI and resolved threads does not satisfy this.\n\n**Threads:** at fully-clean, every **inline** review thread is resolved, and\nthe only conversation left open is the final all-clear exchange --- the\nreviewer's all-clear comment (usually a top-level PR comment, not an inline\nthread) and your reply to it. (Thread mechanics live in the `ard` skill, step\n4b.)\n\n### Fully-clean exit checklist\n\n**Pause point: before declaring \"clean\" or reporting the PR ready.**\nDo-Confirm; per\n[`shared\u002Fworkflow\u002Fskill-checklists.md`](..\u002F..\u002Fshared\u002Fworkflow\u002Fskill-checklists.md).\n\n- [ ] **Run automated clean check**: `python3 scripts\u002Fcheck-pr-fully-clean.py --quorum \u003Cnumber-of-reachable-providers> \u003Cpr-number>` returned exit code `0` (confirming all CI check runs completed with success AND clean review comments for current HEAD SHA have been posted).\n- [ ] **No reviews in flight:** no review check runs are in progress and no review requests are pending;\n  consensus clean verdicts have landed across all active reviewers with none still running (ai-config#3570).\n- [ ] **Killer item:** all workflows and check runs are green **and completed** for the current head --- re-fetched and re-counted now, not checked off from the names you were watching.\n  Marked because a posted verdict does not mean the review job finished, the check set can *grow* mid-run as jobs spawn others, and two check runs can share a name (a stale green plus a live one), so matching on name returns the wrong one.\n  Key on check-run id, and read `status` before `conclusion`.\n- [ ] Every reviewer's latest verdict has zero findings and no disputed rebuttals.\n- [ ] You have obtained genuine posted clean verdicts at the current head from ALL reachable providers in your pinned quorum -- re-checked right before declaring clean.\n- [ ] Every self-review posted along the way was produced by a separate `adversarial-reviewer` subagent rather than inline, and its findings were dispositioned ([`adversarial-self-review`](..\u002F..\u002Fshared\u002Fworkflow\u002Fadversarial-self-review.md)).\n- [ ] **Killer item, for a PR that changes a rendered document (Word, PDF, slides, a manuscript):** the render at the current head has been viewed page by page, the evidence posted on the PR, and an independent referee read of that render posted too, per [`review-rendered-documents`](..\u002F..\u002Fshared\u002Fworkflow\u002Freview-rendered-documents.md).\n  Marked because green CI and a clean verdict say nothing about caption placement, table layout, or page breaks, and skipping this step is how broken manuscripts were reported ready.\n- [ ] Every inline review thread is resolved.\n- [ ] The only open conversation is the final all-clear exchange (the reviewer's all-clear comment and your reply --- normally a top-level PR comment, not an inline thread).\n\n## Stopping conditions\n\n**There is no round limit.\nAlways request another review.**\nThe loop on a single PR ends on exactly three things:\n\n1. **A totally clean review consensus on the latest pushed commit** ---\n   no nits, no non-blocking comments, no informational notes,\n   everything Addressed or agreed Deferred,\n   evaluating the exact HEAD SHA currently on the branch across all active reviewers\n   with no reviews still running (ai-config#3570).\n   **Crucial:** Pushing fixes for a review starts a new review cycle. The ARDI loop is **NEVER** finished when you push fixes for a finding-bearing review or post an ARD summary. You must wait for the new review run evaluating your latest pushed commit to post, fetch and parse that review, and confirm it contains zero findings before ending the loop. See [*The bar: \"fully clean\"*](#the-bar-fully-clean).\n2. **Nothing actionable remains** --- every open item has been escalated to a human and is waiting on their decision, so there is no next action you can take.\n   Not \"some items are deadlocked\"; *all* of them.\n3. **The user says stop.**\n\nNothing else.\nNot a round count, not a sense that findings are getting smaller, not a judgment that the reviewer is nitpicking.\n\n**Deadlock is per-item, and it does not stop the loop.**\nIf you and the reviewer can't reach consensus on one finding (your rebuttal didn't convince them, and their re-raise didn't convince you), **escalate that item to a human reviewer** rather than looping on it or unilaterally overriding.\nRequest `the repository owner` via the `request-pr-review` skill, `@`-mention them in a comment summarizing the impasse, and surface the open item to the user.\nThe raw `gh pr edit \u003CN> --add-reviewer \u003Creviewer>` form bypasses that skill and so does **not** inherit its `Lacaedemon\u002Fsparta` exception.\nIn sparta, escalate to the user in chat rather than requesting a reviewer at all.\nThen **keep driving the PR**: address every other finding, push, and request the next review.\nOnly when *every* remaining item is an escalated deadlock does condition 2 above fire, and even then the loop resumes the moment the human rules.\n\n### Sweep-level scheduling is a different question\n\n[`ardia`](..\u002Fardia\u002FSKILL.md) and [`gia`](..\u002Fgia\u002FSKILL.md) drive *many* PRs.\nWhen one of those is waiting on a human --- a deadlocked item, a blocked dependency, an unresolvable conflict --- the sweep records it and moves to the next PR so the batch keeps moving.\nThat is **scheduling**, not a stopping condition for the loop: the sweep returns when the human rules, and nothing about it licenses accepting unaddressed findings on the PR itself.\n\n### \"Asymptotic noise\" is an anti-pattern, not a signal\n\nThis skill used to carry a guard saying that after 3-4 rounds of new nits you should surface the pattern and ask whether to continue.\n**That guard is removed, and reasoning of that shape must not be reintroduced.**\nIt fails three ways:\n\n- **It fires on round count, not on finding quality.**\nA round producing genuine, reproducible correctness bugs is indistinguishable from a round producing style churn if all you count is rounds.\n- **It reads as diligence**, which is exactly why it goes unexamined. Stopping\n  to ask feels like respecting the user's time.\n- **It hands triage back to the user** --- the precise move [`address-every-comment`](..\u002F..\u002Fshared\u002Fworkflow\u002Faddress-every-comment.md) already forbids for individual findings.\n  The guard reintroduced at loop scale the thing that fragment bans at item scale.\n\nThe tell is any sentence of the form \"the reviewer keeps finding things, so maybe we should stop.\"\nReplace it with another review request --- and, from the third finding-bearing round on, with a changed procedure alongside it, per [`ardi`](..\u002F..\u002Fshared\u002Fworkflow\u002Fardi.md)'s \"Three or more review rounds that each returned findings\".\n\nTwo things that are **not** this anti-pattern and stay:\n\n- **The per-item hold.**\nWhen a reviewer re-raises one already-deferred item verbatim each round, reply once pointing at the tracked issue and hold on *that item*, while continuing to fix every new finding.\nThat is about not re-litigating one item; it never stops the loop.\n- **Reporting the round count.**\nSaying \"round 7, 23 findings, all Addressed\" is useful information.\nAttaching \"shall I stop?\" to it is the anti-pattern.\n\n(ai-config#1029 is the case record: six rounds, 23 findings, all Addressed, with rounds 2-6 each finding real bugs in *earlier rounds' own fixes* --- including CRLF silently disabling a failure path repo-wide, a `--compare` reporting a zero delta, and a traversal-order-dependent measurement.\nThe loop stopped to ask twice under the old guard; both times the answer was to keep going, and the next round found four more real bugs.)\n\n## On clean\n\nPost an unclaim comment (`COMMENT_PR`) to unblock any parallel sessions that backed off in step 1:\n\n```bash\ngh pr comment \u003CN> --body \"Done --- PR is free.\n\n_Posted by Claude Code (AI agent) --- not written by a human._\"   # COMMENT_PR\n```\n\n**Then run `ums`, before reporting ready.**\nThe clean verdict is still a proactive-UMS checkpoint for this PR, not the\nmerge, but it is not the first one: run a pass when you read the review,\nincluding a Rebut\u002FDefer round, rather than holding everything for the\nverdict.\nSee `CLAUDE.md`'s \"Run UMS proactively, as learnings accumulate\".\nThe loop's whole point is that it ends here and hands the merge to a human,\nso a pass deferred to the merge is deferred to a moment this session may\nnever see.\nEverything the review lifecycle taught -- recurring findings, corrections,\nguidance given along the way -- is complete as of the verdict.\n\nAlways provide a clickable link to the MR\u002FPR in the final message.\n\nReport the final verdict and round count. Don't merge unless asked.\n",{"name":5,"description":7,"allowed-tools":24,"user-invocable":30},[25,26,27,28,29],"Bash","Agent","Read","Edit","Write",true,"main","0f720481f8ce3b3d9fef485f6e230d8b3035748e","skills\u002Fardi",1,"https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config","https:\u002F\u002Fmorrison-lab.github.io\u002Fai-config\u002F","https:\u002F\u002Fgithub.com\u002FMorrison-Lab","2026-11-15 04:39:15",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":30},[41,44,47],{"tool":42,"command":43},"npx","npx skills add Morrison-Lab\u002Fai-config --skill ardi",{"tool":45,"command":46},"bunx","bunx skills add Morrison-Lab\u002Fai-config --skill ardi",{"tool":48,"command":49},"pnpm","pnpm dlx skills add Morrison-Lab\u002Fai-config --skill ardi","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config\u002Fblob\u002Fmain\u002Fskills\u002Fardi\u002FSKILL.md",[],[53,60,67,74,81,88],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M735BVYCGR5VEC65AFDVSNKW","wrap-up","End-of-session verification and UMS.","https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config\u002Fblob\u002Fmain\u002Fskills\u002Fwrap-up\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M735BTH469T1CQ8G2Q9GENCR","workaround-watcher","Watch upstream issue for fix.","https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config\u002Fblob\u002Fmain\u002Fskills\u002Fworkaround-watcher\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M735BRKZWFANSQ0GM380B4TD","wn","→ whats-next.","https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config\u002Fblob\u002Fmain\u002Fskills\u002Fwn\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M735BPE9V830B3B6NGXQ56J6","whats-next","Recommend concrete next step or action.","https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config\u002Fblob\u002Fmain\u002Fskills\u002Fwhats-next\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M735BMHQ60EAD5B7QAWXC5A0","wait-for-results","Wait for pipeline\u002FCI results.","https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config\u002Fblob\u002Fmain\u002Fskills\u002Fwait-for-results\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M735BKGZHPN1PEMJ7YBD5VJ8","wai","→ send-notes.","https:\u002F\u002Fgithub.com\u002FMorrison-Lab\u002Fai-config\u002Fblob\u002Fmain\u002Fskills\u002Fwai\u002FSKILL.md",[],[]]