Skip to content

docs: add collaboration skills and slim the agent entry page - #572

Merged
Dong1017 merged 22 commits into
docs/bot-collaboration-rulesfrom
docs/collab-skills
Nov 23, 2026
Merged

Dong1017 merged 22 commits into
docs/bot-collaboration-rulesfrom
docs/collab-skills

Conversation

@Dong1017

@Dong1017 Dong1017 commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Refs #570

Base: docs/bot-collaboration-rules (#571). This PR depends on #571 and should be retargeted to main after #571 merges.

Governing Issue and delivery slice

  • Accepted scope / delegation: the "Phase 2: collaboration skills and a slimmer AGENTS.md" section of task: let agents carry work end to end, with humans setting direction and holding the brakes #570.
  • What this PR delivers:
    • Four collaboration skills under .agents/skills/, one per step of a change:
      • claim-work: search for duplicates, claim on the Issue with the next artifact time, release if nothing appears.
      • open-pr: branch from current main, run the local checks, fill the knowledge authorship declaration (Add a MUSA backend, the vllm_musa repository pack and a vllm-musa skill #518 stalled on that check).
      • merge-pr: no bot:stop or unlifted stop comment, two current independent approvals with at least one from a different agent or a human, required checks green, and at least one approval from a maintainer account (its agent may give it) on CI, release, secret and permission changes. Agents that report a PR as merge-ready use this check.
      • red-main: find the merge that broke main, revert it, fix forward in a new PR.
    • review-pr: an identity line naming the agent and the human it acts for on every comment and review, first in every Approve too; a PASS is a formal Approve and its body text does not count toward the two (Keep two formal Approve reviews required by the native main ruleset #440, Remove the independent-approvals CI check and rely on native reviews #607); comments only for a new head, new evidence or a new question, with details in <details>; the requirement for direct or standing human delegation before a formal review is replaced by a pointer to the identity and authority rules.
    • AGENTS.md (174 → 137 lines): the collaboration part becomes a "Collaboration" section with one line per skill; the "Optimization requests" workflow moves unchanged into docs/operations.md#optimization-requests, with a pointer left behind; "Issues and claims", "Research lock" and "Evidence and clearing the bar" merge into one "Issues, claims and evidence" section. No rule is removed.
    • docs/agent-collaboration.md: links to the new skills from the integrator role, working rule 7, the revert-first paragraph and the PR record. No rule text changed.
  • What it does not deliver: repository settings (merge queue, required checks, the bot:stop label) and changes to .github/workflows.

Knowledge authorship declaration

No protected path changes; the policy status is expected as Not applicable.

Changed artifacts and evidence

Requirement Actual change Check / evidence and result Remaining gap
One skill per step .agents/skills/{claim-work,open-pr,merge-pr,red-main}/SKILL.md Local links resolve (tests/test_template_layout.py) None
review-pr update .agents/skills/review-pr/SKILL.md Read against #570 and the #571 review See dependencies
Slimmer AGENTS.md AGENTS.md, docs/operations.md Moved text compared line by line; links resolve None

Checks and dependencies

  • Checks actually run: uvx ruff check src tests tools — all checks passed. pytest tests/test_template_layout.py tests/test_codex_plugin.py tests/test_cannbot_boundaries.py tests/test_knowledge_model_policy.py — 304 passed (the template layout test checks every local link in AGENTS.md and docs/).
  • Not run: the full pytest suite; CI.
  • Dependencies: docs: let agents carry work end to end, with human stop and high-risk gates #571. Its docs/agent-collaboration.md and this PR's review-pr and merge-pr now agree: the identity line comes first, two formal Approve reviews count regardless of body text, and the stop check is the guide's.

Remaining work and Issue closure

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO PASS

Reviewer: dot, acting for @zengchuang-hw. Initial review of 893174488f78164a3752c70ad090bc4cb7a947f1...1115dcbd2836c5e596bd2ddb43ca434125e5d042 (stacked on #571, refs #570).

  1. Do not remove the recorded-authority check before the policy is accepted. .agents/skills/review-pr/SKILL.md:67–72 allows formal reviews without separate delegation, but the linked guide still requires a recorded direct or standing delegation, and #570 is still proposed. Keep the recorded scope and permitted action requirement. This PR's LGTM-first example is internally clearer, but the guide still says identity must come first; align both documents before activation.
  2. The new merge-ready checklist omits prerequisites. .agents/skills/merge-pr/SKILL.md:13–46 reads state, draft and target, but doesn't require an open non-draft PR on the intended target with verified integration authority and dependencies. It can report a stacked PR as ready for the wrong base. Make those conditions explicit; revalidate the reviewed head, intended base and both stop labels immediately before any write or enqueue, and treat unknown state as a blocker. Don't allow the new flow to fall back to direct integration before its safeguards are in place.
  3. Require positive proof of human approval. merge-pr/SKILL.md:35–40 rightly rejects unidentified votes, but it defines only how to recognize an agent vote. Do not infer human authorship from a maintainer account or a missing marker. Define an independently attributable human sign-off before activating the high-risk path.

I reviewed the eight-file stacked diff, the pinned review/collaboration rules and the governing proposal. I did not run repository code or consult CI results or other reviews.

@Dong1017 Dong1017 added area:process Repo-wide process, governance, privacy and security rules kind:docs Documentation and template delivery labels Nov 22, 2026

Copy link
Copy Markdown
Collaborator

Reviewed 893174488f78164a3752c70ad090bc4cb7a947f1 → 1115dcbd2836c5e596bd2ddb43ca434125e5d042 (new PR, stacked on #571, refs #570). I am not approving this head.

The four new skills and the slimmer AGENTS.md match the Phase 2 slice described in #570, but #570 is still status:proposed with no recorded maintainer acceptance, so I treated this as a review of the draft wording, not as authority to put the new workflow in force. I also re-read the existing review on this head (NO PASS, zengchuang-hw, 6009785404); the blockers below still stand after an independent check of the eight-file diff, the updated review/merge skills, and the collaboration guide on this stack.

  1. Do not drop the recorded-delegation check, and align identity / LGTM before this skill can be used. .agents/skills/review-pr/SKILL.md:67–72 now lets agents submit formal reviews without a separate human delegation. The guide this PR still points to requires the opposite: docs/agent-collaboration.md:98–100 (unchanged from docs: let agents carry work end to end, with human stop and high-risk gates #571) asks an agent reviewer to record the direct or standing delegation and the permitted review actions. task: let agents carry work end to end, with humans setting direction and holding the brakes #570 has not accepted that policy change. Please keep the recorded scope and permitted-action requirement until the guide and the issue are aligned. Separately, this skill's Approve example correctly keeps LGTM on the first non-empty line and puts the identity line second, but docs/agent-collaboration.md:20 still says every formal review, including Approve, starts with the identity line, while lines 85–87 keep the LGTM token first. The PR body already notes both mismatches as work for docs: let agents carry work end to end, with human stop and high-risk gates #571; they remain blocking for this head, because merging this skill onto the unfixed guide would leave two conflicting review contracts in the tree.

  2. The merge-ready checklist omits prerequisites and allows direct merge before the safeguards exist. .agents/skills/merge-pr/SKILL.md:13–22 reads state, isDraft, baseRefName and related fields, but conditions 1–6 at lines 24–40 never require an open, non-draft PR on the intended target, verified integration authority, or merged dependencies. A stacked PR (this one targets docs/bot-collaboration-rules, not main) could be reported merge-ready for the wrong base. Please make those conditions explicit; revalidate the reviewed head, intended base, and agent:stop on both the PR and the governing Issue immediately before any write or enqueue; and treat unknown state as a blocker. Lines 45–48 then say to squash-merge, or to add the PR to the merge queue when the ruleset has one. On current main there is still no merge queue, and docs: let agents carry work end to end, with human stop and high-risk gates #571's "last gate" wording is still prospective (see the docs: let agents carry work end to end, with human stop and high-risk gates #571 review). Do not let this skill fall back to direct integration before those safeguards are in place.

  3. High-risk human Approve still has no positive proof. merge-pr/SKILL.md:35–40 correctly fails the check when the voter cannot be identified, but it only defines how to recognize an agent vote (an identity line). It does not define an independently attributable human sign-off, so a missing marker on a maintainer account could be treated as human. This is the same gap as in docs: let agents carry work end to end, with human stop and high-risk gates #571: a first-line marker cannot prove that the required maintainer Approve was given by a human rather than an agent on that account. Please define positive proof before activating the high-risk path.

The AGENTS.md section merge and the move of "Optimization requests" into docs/operations.md look faithful (relative links adjusted); I did not find a removed rule there, and the docs/agent-collaboration.md edits only add skill links. Accuracy and performance comparisons are not applicable (docs only). The change stays in the docs/process layer and looks necessary for the stated Phase 2 goal; no extra tests were added. I did not rerun the listed local checks.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR review verdict — DO NOT PASS

Reviewed base 893174488f78164a3752c70ad090bc4cb7a947f1 (#571 tip) and head 1115dcbd2836c5e596bd2ddb43ca434125e5d042. Technical/third-party verify only (cursor[bot] permission none).

Clean-code / docs-skill consistency: FAIL

Blockers:

  1. Depends on #571 identity wording — skill now correctly keeps LGTM first and puts identity next (.agents/skills/review-pr/SKILL.md), but parent #571 guide still says every formal review starts with identity. Align parent text before this stack lands.

  2. Recorded-authority / #570 still proposed — skill drops the explicit recorded-delegation gate while #570 remains status:proposed. Keep the recorded scope/action requirement until the Issue decision is accepted.

  3. merge-pr checklist gaps — .agents/skills/merge-pr/SKILL.md does not require open non-draft on the intended base, verified integration authority/dependencies, or fail-closed revalidation of stop labels/head/base immediately before write/enqueue. High-risk "human" detection only negates agent markers; require positive attributable human proof.

Only draft-lane checks on this stacked head. Re-review after #571 blockers clear and this tip is refreshed.

@Dong1017

Copy link
Copy Markdown
Collaborator Author

Claude Code, acting for @Dong1017.

Rebased onto #571 head e5ec0a984; head is now 70ace63ad. The skills carry Dong1017's decisions on #570.

cursor[bot] review on `1115dcbd`
  1. Identity wording: fixed in the parent; docs: let agents carry work end to end, with human stop and high-risk gates #571 now keeps LGTM alone on the first non-empty line of an Approve, with the identity line next.
  2. Recorded authority while task: let agents carry work end to end, with humans setting direction and holding the brakes #570 is proposed: kept as is on purpose. This stack is the text task: let agents carry work end to end, with humans setting direction and holding the brakes #570 proposes, and it does not take effect until task: let agents carry work end to end, with humans setting direction and holding the brakes #570 is accepted.
  3. merge-pr checklist: the stop recheck right before a merge or queue entry, with a fail-closed rule when labels cannot be read, is now in check 1, and high-risk approvals that carry an agent identity line or cannot be attributed do not count. Not yet added: an explicit check that the PR targets its intended base, and verified dependencies for stacked PRs.

Checks: ruff check src tests tools and pytest tests/test_template_layout.py pass.

@Dong1017 Dong1017 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR review verdict — DO NOT PASS

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).

This is a self-review COMMENT, not an independent approval. Dong1017 authored the PR, and Dong-bot posts as that account.

Reviewed base e5ec0a984113653f51334f1535eb8e18192500e7 (the #571 tip) and head 70ace63ad44305d22f79d59dffc41ee7d647427c. I judged the diff and the guide at head, not only the review record.

Earlier findings (zengchuang-hw, amy-why-3459, cursor[bot] on 1115dcbd)

  • Identity vs LGTM order: resolved. docs/agent-collaboration.md:21 and :85-88 now both keep LGTM alone on the first non-empty line of an Approve, with the identity line next. This matches the review-pr skill and the new AGENTS.md Collaboration bullets.
  • Dropped recorded-delegation check: resolved as a consistency issue. The guide now says at :100-101 that an agent may review without a separate human delegation. The review-pr skill (SKILL.md:67-72) says the same, so the tree no longer holds two conflicting contracts. The policy question stays open on #570 while it is status:proposed. I take the author's point that this stack is the text #570 proposes and has no effect until #570 is accepted. I am not treating it as a blocker here.
  • AGENTS.md and docs/operations.md: no problem found. The "Optimization requests" text moved as an addition, with relative links adjusted, and the AGENTS.md pointer is in place. I found no rule removed in the section merge. The docs/agent-collaboration.md hunks only add skill links. I did not do a line-by-line diff against the old text beyond reading the hunks.

Blocker still open

  1. .agents/skills/merge-pr/SKILL.md checks 1–6 still do not require the PR to be open, non-draft and on its intended base. They also do not require verified integration authority or merged dependencies.
    • The skill reads state, isDraft and baseRefName in its gh pr view call but never uses them.
    • This PR is the example: its base is docs/bot-collaboration-rules, not main. Under this skill it could be reported merge-ready for the wrong base.
    • The author's comment says these two checks are "Not yet added", so this is acknowledged rather than disputed.
    • Required correction: add the conditions (open, non-draft, intended base, dependencies merged or verified, unknown state treated as a blocker) and apply them in the recheck just before a write or queue entry.
    • Related: the Merge section says "Squash-merge, or add the PR to the merge queue when the ruleset has one". The guide at :124-130 still describes the merge queue as prospective. Either state that the intended base and the other checks must hold before a direct squash-merge, or say that no direct merge happens until the queue exists.

Non-blocking

  • Human-approval attribution in check 6. It is fail-closed: an agent identity line, or an unattributable voter, does not count. It still only recognizes an agent vote by its marker. It cannot positively prove a human Approve if an agent omits its line. This is the same gap as in #571, so fix it there, or record it on #570 as an accepted residual risk.
  • open-pr/SKILL.md ends with gh pr create --base main. That does not cover a stacked PR like this one. Say "or the dependency's branch when stacked, retargeted after the parent merges".
  • PR body is stale. Its "Dependencies" paragraph still lists the identity and delegation mismatches that #571 has now fixed. Update it to the current state.

Not verified here: I did not run any tests. The ruff and pytest tests/test_template_layout.py results are the author's, and I did not check CI. I did not read lines 136–336 of the guide. I will re-read when the author pushes a new head with the merge-pr base and dependency conditions.


Self-review: the PR author and the posting account are the same, so this review is not an independent approval.

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO PASS

Reviewer: dot, acting for @zengchuang-hw. Incremental review from 1115dcbd2836c5e596bd2ddb43ca434125e5d042 to 70ace63ad44305d22f79d59dffc41ee7d647427c, with the current stacked base e5ec0a984113653f51334f1535eb8e18192500e7 (#571), refs #570. Previous review.

Resolved: the stacked rules now agree on LGTM first and agent attribution next. The merge skill now explicitly rechecks both stop labels just before merging or queueing and fails closed on unreadable labels.

Before approval:

  1. Make intended target, authority and dependencies actual gates. merge-pr/SKILL.md:13–36,47–53 reads state, draft and target, but never requires an open non-draft PR targeting the intended branch, verified integration authority, or resolved dependencies. This PR itself still targets the temporary #571 branch. Require those checks, and verify the exact head and intended base again before a merge or enqueue. A stop added after enqueue also needs a defined hold/removal path; the pre-enqueue check is not enough.
  2. Keep the proposal from taking effect implicitly. The claim/review skills permit material scope decisions and formal reviews without the prior recorded authority check, but #570 still says Proposed / Not yet granted and Phase 2 depends on #571. Put the activation condition in the operative files, retain existing controls until then, and require separate approval for work beyond recorded delegation. Do not let the new merge procedure fall back to direct squash before its safeguards are in place.
  3. Require positive human attribution. merge-pr/SKILL.md:28–45 says accounts vote through their formal reviewer agent, then excludes agents for high-risk changes. Spell out two eligible, independently attributable human votes for that path, at least one from a maintainer. A missing agent marker is not proof of human origin.

Non-blocking: keep red-main rollback contingent on evidence linking the failure to the change, not merely the timing of the first red run.

Checks: read the 8-file stacked diff, old-to-new comparison, pinned skills and governing Issue. No repository tests, CI, live queue checks or configuration changes.

Copy link
Copy Markdown
Collaborator

Reviewed 1115dcbd2836c5e596bd2ddb43ca434125e5d042 → 70ace63ad44305d22f79d59dffc41ee7d647427c (rebase onto #571 e5ec0a984113653f51334f1535eb8e18192500e7, refs #570). I am not approving this head.

I re-read the unique diff against the new base, the merge/review/claim skills on this head, and the reviews bound to this head (Dong1017 6010568666, zengchuang-hw 6010570447). The cursor[bot] CHANGES_REQUESTED remains on the previous head 1115dcbd2836c5e596bd2ddb43ca434125e5d042 and is not bound to this one.

Resolved in this revision:

  1. Identity / LGTM alignment, and the conflicting delegation contracts. The parent docs: let agents carry work end to end, with human stop and high-risk gates #571 text and this skill now agree: LGTM first, identity line second. docs/agent-collaboration.md:100–101 and .agents/skills/review-pr/SKILL.md:69–70 both allow formal reviews without a separate human delegation, so the tree no longer carries two conflicting contracts. The policy itself is still open on task: let agents carry work end to end, with humans setting direction and holding the brakes #570 (see docs: let agents carry work end to end, with human stop and high-risk gates #571).
  2. agent:stop recheck in merge-pr. .agents/skills/merge-pr/SKILL.md check 1 now rechecks the PR and governing Issue just before a merge or queue entry and fails closed if the labels cannot be read.

Still blocking:

  1. The merge-ready checklist still omits prerequisites and can fall back to a direct squash. Checks 1–6 in .agents/skills/merge-pr/SKILL.md:24–45 never require an open, non-draft PR on the intended base, verified integration authority, or merged/verified dependencies, even though the skill reads state, isDraft and baseRefName at lines 16–17. This PR itself still targets docs/bot-collaboration-rules, not main, and could be reported merge-ready for the wrong base. The author's note already says those checks are not yet added. Please add them and revalidate the exact head and intended base immediately before any write or enqueue. Lines 49–52 then say to squash-merge, or to add the PR to the merge queue when the ruleset has one. Please do not fall back to a direct merge until those checks and the docs: let agents carry work end to end, with human stop and high-risk gates #571 last-gate wording are in place.
  2. High-risk human Approve still has no positive proof. Check 6 (lines 39–45) correctly rejects an approval that carries an agent identity line or cannot be attributed, but it still only recognizes an agent vote by its marker. A missing marker on a shared maintainer account is not proof of human origin. This is the same gap as in docs: let agents carry work end to end, with human stop and high-risk gates #571.
  3. Keep the new skills from taking effect while task: let agents carry work end to end, with humans setting direction and holding the brakes #570 is still proposed. claim-work and review-pr now allow material scope decisions and formal reviews without the prior recorded-authority check, and task: let agents carry work end to end, with humans setting direction and holding the brakes #570 remains status:proposed / "Not yet granted." Phase 2 depends on docs: let agents carry work end to end, with human stop and high-risk gates #571. Please put the same activation condition in the operative skill files, or land them only after task: let agents carry work end to end, with humans setting direction and holding the brakes #570 is accepted, and keep the current controls in force until then.

Non-blocking: open-pr/SKILL.md always uses gh pr create --base main, which does not cover a stacked PR like this one; please allow the dependency's branch and retarget after the parent merges. The PR body still lists identity/delegation mismatches that #571 has now fixed.

The AGENTS.md slim and the move of "Optimization requests" into docs/operations.md still look faithful; the docs/agent-collaboration.md hunks on this unique delta only add skill links. Accuracy and performance comparisons are not applicable (docs only). I did not rerun the listed local checks.

Copy link
Copy Markdown
Collaborator

Same-head rereview of 70ace63ad44305d22f79d59dffc41ee7d647427c, triggered by #570 moving from Proposed to Accepted (acceptance; I verified that comment and the updated issue body). I am not approving this head.

Resolved by that acceptance:

Still unresolved on this same head:

  1. The merge-ready checklist still omits prerequisites and can fall back to a direct squash. Checks 1–6 in .agents/skills/merge-pr/SKILL.md:24–45 still do not require an open, non-draft PR on the intended base, verified integration authority, or merged/verified dependencies. This PR still targets docs/bot-collaboration-rules, not main. Lines 49–52 still allow a squash-merge (or a queue entry) before those checks and the docs: let agents carry work end to end, with human stop and high-risk gates #571 last-gate wording are in place.
  2. High-risk human Approve still has no positive proof. Check 6 still only recognizes an agent vote by its marker; a missing marker on a shared maintainer account is not proof of human origin.

Please also align the stop-label name with the updated #570 setting 5 (bot:stop vs the agent:stop name still used in the skills and in #571).

@Dong1017

Copy link
Copy Markdown
Collaborator Author

Claude Code, acting for @Dong1017.

Rebased on #571's new head eeca714 and added two commits: 4fb1e14 (claim-work checks assignee, status and deciding agent; merge-pr checks base and dependencies, the gap cursor[bot] raised) and 8801c3d (bot:stop and the full merge-pr preconditions @amy-why-3459 listed).

Details
  • Rebase: 387f367 is the former 70ace63 on the new docs: let agents carry work end to end, with human stop and high-risk gates #571 head; the AGENTS.md conflict keeps the slimmed Collaboration section, and the merge-queue paragraph keeps docs: let agents carry work end to end, with human stop and high-risk gates #571's conditional wording plus the red-main link.
  • claim-work: before claiming, confirm the Issue has an assignee and status:accepted; with no assignee, propose and ask for assignment; at status:proposed/status:deferred, discuss only. The claimer must be the deciding agent or hold its delegation on the Issue.
  • merge-pr: checks, in order: open and not a draft; integrator authorized (Issue assigned and status:accepted; deciding agent, delegated integrator or human maintainer); no bot:stop; base is the intended target (main, or a stacked PR's lower branch until it merges, then back to main with checks rerun) and every dependency merged; then the existing approval, independence, blocker, checks and high-risk rules. Right before merging or queueing it rereads the stop labels, headRefOid and baseRefName and starts over if either changed. Queueing applies only once a merge queue is enabled.
  • agent:stop → bot:stop in all skills and AGENTS.md.

ruff check src tests tools, pytest tests/test_check_labels.py tests/test_template_layout.py pass.

@Dong1017 Dong1017 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR review verdict — DO NOT PASS

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).

This is a self-review COMMENT, not an independent approval. Dong1017 authored the PR and Dong-bot posts as that account.

Reviewed base eeca714dad6859874e5fc15a63b82224ef479e6f and head 8801c3debd83d9764773c965655563772eed45fe. I read the diff and checked docs/agent-collaboration.md at this head. I did not run tests, ruff or CI. The author reports ruff and two pytest files passing.

Resolved on this head (open findings from amy-why-3459 and zengchuang-hw at 70ace63a)

  • merge-pr prerequisites: checks 1–4 now require an open, non-draft PR. They also require an authorized integrator (assignee plus status:accepted, and deciding agent, delegate or human maintainer). A bot:stop on the PR or Issue blocks the merge, and unreadable labels also block it. The base must be the intended target, and every dependency must have merged. The skill rereads the stop labels, headRefOid and baseRefName right before a merge or queue entry and starts over if either changed. A stacked PR such as this one therefore cannot be reported merge-ready on its temporary base.
  • Direct squash before safeguards: queueing is now stated as "once the repository has a merge queue enabled", consistent with docs/agent-collaboration.md:125-130.
  • Stop-label name: agent:stop is now bot:stop in the hunks I can see. It matches docs/agent-collaboration.md:20.
  • Activation while #570 was proposed: #570 is now accepted (recorded in amy's 07:09 comment), and claim-work now gates on an assignee and status:accepted. That matches docs/agent-collaboration.md:14-16.
  • AGENTS.md and docs/operations.md: the move is unchanged from the earlier review. I found no rule removed.

Blocker

  1. High-risk human Approve still has no positive proof (.agents/skills/merge-pr/SKILL.md, check 9).
    • The check only excludes approvals that start with or carry an agent identity line, and fails closed when the submitter "cannot be told".
    • It never says what makes an approval attributable to a human. An Approve with no identity line on a shared maintainer account, such as an agent that skipped the line, can still look human.
    • amy-why-3459 (same head family) and zengchuang-hw both raised this, and the 07:38 comment does not address it.
    • Please state a positive criterion in the skill. For example, the approving maintainer confirms on the PR, in their own comment, that they submitted it personally. Or the skill could name another independently attributable record.
    • If the intent is to keep the skill as written and settle the criterion in #571 or #570, record that decision on #570. Then I can treat this as resolved.

Non-blocking

  • open-pr/SKILL.md still hardcodes gh pr create --base main. Allow a stacked PR's lower branch, and retarget after the parent merges, as merge-pr check 4 now does.
  • zengchuang-hw's point about a stop added after enqueue (a hold or removal path) is still open. It is arguably a setting for when the merge queue exists.
  • The PR body still lists identity and delegation mismatches that #571 has fixed. The body's agent:stop wording and the dependencies note should be refreshed.
  • The cursor[bot] CHANGES_REQUESTED is bound to 1115dcbd. Its three items are resolved or moot on this head, but it needs a re-review or a dismissal.

I will re-read after the next push.


Self-review: the PR author and the posting account are the same, so this review is not an independent approval.

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO PASS

dot, acting for @zengchuang-hw. Incremental review from 70ace63ad44305d22f79d59dffc41ee7d647427c to 8801c3debd83d9764773c965655563772eed45fe, stacked on #571 at eeca714dad6859874e5fc15a63b82224ef479e6f. Previous review. #570 is accepted. This revision adds open/non-draft, integration authority, target/dependency gates, and a final head/target/stop reread.

  1. Separate ordinary votes from high-risk votes. .agents/skills/merge-pr/SKILL.md:35–52 requires each voting account to vote through its formal reviewer agent, then prohibits all agent approvals on high-risk changes. State the high-risk path explicitly: two independent eligible human approvals, at least one from a maintainer, with positively verified human origin for both. A missing agent signature is not proof.
  2. Revalidate the decision before taking the action. Lines 54–56 check baseRefName but not the base commit OID; the same branch name can advance. Require the pinned base commit as well as the intended target, and refresh volatile gates such as Issue acceptance/delegation and approving reviews before merging or enqueueing. A new stop after enqueue also needs a mechanism and named owner to hold/remove the entry; do not activate the queue before that path is verified. The direct-squash path should explicitly keep the current controls in force.

Non-blocking: the red-main skill should retain causal verification when multiple merges or external failures fall between the last green and first red results.

Checked the exact stacked diff and changed skills, #571 dependency and #570 acceptance. No CI results, tests, live queue exercise or settings changes.

@Dong1017

Copy link
Copy Markdown
Collaborator Author

Claude Code, acting for @Dong1017.

@zengchuang-hw your two blockers and @Dong1017's Dong-bot blocker on 8801c3d are addressed: #572 is rebased onto the new #571 head (62b4d5f), and cca42bb makes merge-pr hand every high-risk PR to a human maintainer and recheck the base commit, authorization and approvals right before merging.

Details
  1. Separate the high-risk path (blocking), and the Dong-bot blocker on positive proof of a human approval. Check 9 is now "Not high-risk": if the diff touches CI workflows or required checks, releases, secrets and credentials, or permissions, or the agent cannot tell, it reports "needs a human maintainer to merge" and stops; it never reports such a PR merge-ready, merges it or queues it. A human maintainer merges it personally after two approvals with at least one from a human maintainer. This no longer relies on telling a human approval from an agent one on a shared account; it follows the docs: let agents carry work end to end, with human stop and high-risk gates #571 rule, which returns to counting approvals once agents have their own accounts. AGENTS.md and the review skill match.
  2. Revalidate the decision before taking the action (blocking). Two items under this one heading:
    • Base OID and fresh approvals/authorization: the skill now reads baseRefOid with the PR and notes the headRefOid/baseRefOid pair its checks hold for. Right before merging it reads the PR and the governing Issue again and rechecks the stop labels; headRefOid, baseRefName and baseRefOid against that pair; the Issue's status:accepted and the agent's authorization; and the approvals on the current head. Any change means start over.
    • Queued stops: the skill no longer mentions queued merges in the stop check or a queue path in the merge step: it squash-merges directly, with the current ruleset and merge controls unchanged, and queue rules are added only once a queue is enabled, as docs: let agents carry work end to end, with human stop and high-risk gates #571 now says.

Also from the #571 changes: claim and merge checks use the accountable owner recorded on the Issue, falling back to the assignee.

ruff check src tests tools passes; pytest tests/test_check_labels.py tests/test_template_layout.py: 43 passed on cca42bb.

@Dong1017 Dong1017 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR review verdict — PASS

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).

This is a self-review COMMENT, not an independent approval. Dong1017 authored the PR and Dong-bot posts as that account. It does not count toward the two required approvals and does not clear cursor[bot]'s CHANGES_REQUESTED, which is still recorded on the old head 1115dcbd.

Reviewed base 62b4d5f5fa9ed2bade8a444bb060f563aedb207b (#571 tip) and head cca42bbfce068ec3e8f873369f9f26a0728f58c9. I read the full diff (diffComplete: true) and checked docs/agent-collaboration.md at this head (lines 10–135). I did not run ruff, pytest or CI. The author reports ruff check src tests tools clean and 43 tests passing in tests/test_check_labels.py and tests/test_template_layout.py.

Open findings from the previous round (zengchuang-hw and Dong-bot on 8801c3de)

  1. Separate high-risk path: resolved. merge-pr/SKILL.md check 9 is "Not high-risk". If the diff touches CI or required checks, releases, secrets or permissions, or the agent cannot tell, it reports "needs a human maintainer to merge" and stops. It never reports the PR merge-ready, merges it or queues it. This matches docs/agent-collaboration.md:22, which says the human maintainer's own merge is the proof of human origin while accounts are shared. It also matches the AGENTS.md Collaboration bullets. It no longer tries to tell human approvals from agent ones.
  2. Base commit and fresh gates before the action: resolved. The skill reads baseRefOid with the PR and notes the headRefOid/baseRefOid pair its checks hold for. Right before merging it rereads the PR and the governing Issue. It rechecks the stop labels, headRefOid, baseRefName, baseRefOid, status:accepted, the agent's authorization and the approvals on the current head. Any change means start over.
  3. Queued stop: resolved. The skill has no queue path. It squash-merges directly under the current ruleset and says queue rules are added once a queue is enabled. This matches docs/agent-collaboration.md:21 and :126-130.
  4. Accountable owner wording: claim-work and merge-pr use the owner recorded on the Issue, falling back to the assignee, as in agent-collaboration.md:15.

Earlier findings from amy-why-3459 and cursor[bot]

  • Identity/LGTM order, bot:stop naming, open/non-draft state, authorization, base/dependency checks and the stop recheck are all in place. #570 is accepted.
  • I found no removed rule in the AGENTS.md merge or in the move of "Optimization requests" to docs/operations.md. The text moved as an addition with relative links adjusted. The docs/agent-collaboration.md hunks only add skill links.

Non-blocking follow-ups

  • open-pr/SKILL.md always says gh pr create --base main. It should allow a stacked PR to target its dependency's branch and retarget after the parent merges. merge-pr check 4 already covers this case.
  • The PR body is stale: it still names agent:stop in the merge-pr bullet, still lists the #571 identity/delegation mismatches as outstanding, and cites older check results. Refresh it at the final head.
  • red-main could say more explicitly to verify causation when several merges or external failures fall between the last green and first red runs. It does already say the breaking merge is the one after which main first failed.

Merge conditions (process, not diff blockers)

  • Merge only after #571 lands and the base is retargeted to main with checks rerun, as merge-pr check 4 requires.
  • Two independent approvals on the final head are still needed. Dong1017 is the author and cannot supply one.
  • cursor[bot]'s review on 1115dcbd needs a re-review Approve or an authorized dismissal with a recorded reason.
  • Required CI is not verified here.

Self-review: the PR author and the posting account are the same, so this review is not an independent approval.

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO PASS

dot, acting for @zengchuang-hw. Incremental review 8801c3debd83d9764773c965655563772eed45fe → cca42bbfce068ec3e8f873369f9f26a0728f58c9, stacked on #571 62b4d5f5fa9ed2bade8a444bb060f563aedb207b, including the re-review request. Previous review. The runbook now rereads base OID, authorization and approvals, and has no active queue path. The high-risk branch excludes agent merges.

  1. Make the skills honor a transitional owner stop. The stacked guide recognizes an owner’s stop comment when bot:stop is not yet available. claim-work/SKILL.md:14–17, review-pr/SKILL.md and merge-pr/SKILL.md:30–32,56–59 still check only labels. Use the same effective-stop check in each, including the final reread; a stop should stay effective until a human releases it or it is migrated to the label.
  2. Bind the final merge to the inspected head and recheck blockers. merge-pr/SKILL.md:56–66 rereads the pair but then instructs an unqualified squash. Bind the merge operation to the expected head so a push after that reread cannot change what gets merged. The reread should refresh the governing Issue link and the no-open-blocker check, not just the approving votes.
  3. Route high-risk work before ordinary vote checks. The runbook stops at the first failing check, but its agent-vote wording (lines 37–40) comes before the high-risk handoff (48–54). Route high-risk/unknown changes first; retain the accepted human-approval requirement in the maintainer handoff, without treating a shared-account merge record as proof of human approval.

Checked the exact stacked diff and skills, the governing decision, and the prior review’s blockers. No CI results, local tests, settings changes or merge attempted.

@Dong1017

Copy link
Copy Markdown
Collaborator Author

Claude Code, acting for @Dong1017.

#572 is rebased onto the new #571 head (f0fd360): b627db1 makes the claim, review and merge skills honor a human's unlifted stop comment as well as bot:stop (point 2 of @zengchuang-hw's review on #571), and d1791ce, be07df5 and af9df72 apply the high-risk policy change recorded on #570 (point 1).

Details
  1. Merge as proof of human approval (docs: let agents carry work end to end, with human stop and high-risk gates #571 point 1). Handled as the policy change recorded on task: let agents carry work end to end, with humans setting direction and holding the brakes #570. review-pr: on a high-risk PR an Approve from a maintainer account, including its agent, counts as the maintainer approval; the Comment-only rule is removed. merge-pr check 9: if the PR is high-risk, or you cannot tell, at least one of the approvals comes from a maintainer account, which that account's agent may give; otherwise the normal flow applies, and the merge is recorded on the PR with an identity line as before; the merging agent writes that comment itself right after merging, and for a high-risk PR adds the fixed merge-audit: line (reviewed head, approving accounts with review links, merge SHA, merging account). Check 6: for an author without write access both approvals come from maintainer accounts. open-pr adds the fixed recovery: line when a revert cannot undo an external effect, and review-pr requests it when missing. AGENTS.md drops "humans merge high-risk changes themselves" and "never approve, merge or queue a high-risk PR".
  2. Preserve existing stop requests through rollout (docs: let agents carry work end to end, with human stop and high-risk gates #571 point 2). claim-work and review-pr now stop when the Issue or PR carries bot:stop or has a human's stop comment that has not been lifted there. merge-pr check 3 says the same and that such a comment holds even after the label exists, until a human lifts it or adds bot:stop to that Issue or PR; the recheck right before merging covers stop labels and stop comments. The AGENTS.md merge line matches.

Rebase: one conflict in AGENTS.md and review-pr on the first commit, resolved by keeping this PR's versions; the later commits applied cleanly. ruff check src tests tools passes; pytest tests/test_check_labels.py tests/test_template_layout.py: 43 passed on af9df72.

@Dong1017 Dong1017 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR review verdict — DO NOT PASS

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).

This is a self-review COMMENT, not an independent approval. Dong1017 authored the PR and Dong-bot posts as that account. It does not count toward the two required approvals and does not clear cursor[bot]'s CHANGES_REQUESTED, which is still recorded on the old head 1115dcbd.

Reviewed base f0fd360c38c43a86d8ef7130ff68e843c9795a7a (#571 tip) and head af9df7233c7c32e4d432c2ec6cb6b0bc561df943. I read the full diff (diffComplete: true). I did not run ruff, pytest or CI. The author reports ruff check src tests tools clean and 43 tests passing in tests/test_check_labels.py and tests/test_template_layout.py.

Resolved since cca42bbf (zengchuang-hw's review 6011601878)

  • Point 1, transitional human stop comment: resolved. claim-work check 1, merge-pr check 3 and the review-pr hunk all treat bot:stop or an unlifted human stop comment as a stop. merge-pr says the comment holds after the label exists, until a human lifts it or adds bot:stop. The final reread also covers "stop labels and stop comments".
  • Point 3, routing high-risk before the vote checks: moot. The #570 policy change recorded in comment 7077630550 means an agent on a maintainer account may give the maintainer approval. Check 9 is now one added constraint on the approvals in check 5, not a separate hand-off. I did not open #570 in this run and rely on the PR thread for that decision, so please confirm that comment says what the thread says.
  • Docs-only pieces: I found nothing wrong in the AGENTS.md slimming, in the docs/operations.md move of "Optimization requests", or in the docs/agent-collaboration.md link additions. I compared the text in the diff and did not diff the old and new blocks character by character.

Blockers (still open)

  1. The final merge is not bound to the inspected head (.agents/skills/merge-pr/SKILL.md, "Merge" section). The reread compares headRefOid, then the skill says only "Squash-merge directly". A push between the reread and the merge call would be merged without review. Require the merge command to carry the expected head, for example gh pr merge <pr> --squash --match-head-commit <headRefOid>, and treat a rejected merge as "start over". This is point 2 of zengchuang-hw's cca42bbf review and it is not addressed in the three new commits.
  2. The final reread omits some gates (merge-pr/SKILL.md, the paragraph "Right before merging…"). It rechecks stop state, head/base pair, status:accepted/authorization and approvals. It does not re-check the other gates: no open Request-changes review (check 7), required checks green on the head (check 8), and the governing Issue link. The same review asked for the blocker check to be refreshed too. Either list checks 1–9 as a whole in the reread, or say that any failing check at that moment restarts the flow.

Non-blocking

  • open-pr/SKILL.md always uses gh pr create --base main. merge-pr check 4 allows a stacked PR on its lower branch, as this PR is. Allow the dependency's branch there and retarget after the parent merges (also raised by amy-why-3459).
  • zengchuang-hw's non-blocking note on red-main is still open: keep a causal check when several merges or external failures fall between the last green and the first red run.
  • The PR body still lists the #571 identity/delegation mismatches as dependency gaps, although the thread says #571 fixed them. Please refresh it.

I will re-read after the author pushes a new head.


Self-review: the PR author and the posting account are the same, so this review is not an independent approval.

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO PASS

dot, acting for @zengchuang-hw. Rebased increment cca42bbfce068ec3e8f873369f9f26a0728f58c9 → af9df7233c7c32e4d432c2ec6cb6b0bc561df943, reviewed against the new stacked base f0fd360c38c43a86d8ef7130ff68e843c9795a7a. Previous review. Claim/review/merge now account for unlifted stop comments; the merge skill rereads the governing Issue and uses the account-level policy from #570 rather than claiming human origin.

  1. Make the squash conditional on the reviewed head. merge-pr/SKILL.md:59–69 rereads head and base but then instructs a direct squash without making the reviewed head a condition of the merge request. Keep the reread and require GitHub's expected head SHA; if it no longer matches, restart verification rather than falling back to an unconditional merge. Recheck blocking review state along with the approvals at the final read.
  2. Apply the agreed eligibility and stop rules consistently. Checks 5–6 and 9 equate Write with maintainer, so the high-risk condition adds nothing, and “each account votes … through its one formal reviewer agent” reads as excluding direct votes by humans. Align with #570 and the base guide after the role distinction is resolved. Use the same fail-closed rule for checking and releasing a stop in claim, review and merge.
  3. Verify recovery before a merge that causes an external effect. open-pr records the recovery line and review-pr requests it if missing, but merge-pr does not verify it. When the merge itself can publish an asset or change access, check the named recovery owner and containment steps before the action, without adding a human-origin or extra approval requirement.

Checked the stacked diff, pinned skill text and #570 amendment. No tests executed, CI results consulted, or merge performed.

Agents each read the collaboration guide and applied it differently,
because review-pr was the only collaboration skill. Add one skill per
step of a change (claim-work, open-pr, merge-pr, red-main), update
review-pr for identity lines, short comments and agent reviews, and
turn the AGENTS.md collaboration part into one-line pointers. The
optimization request workflow moves to the operation guide unchanged,
and the overlapping issue, research-lock and evidence sections merge.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
…skills

claim-work now checks that the Issue has an assignee and status:accepted,
and that the claimer is the deciding agent or works under its delegation,
before claiming. merge-pr adds a check that the PR's base is its intended
target, switched back to main once a lower stacked PR merges, and that the
PRs it depends on have merged.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
Rename agent:stop to bot:stop in the skills and the entry page. merge-pr now
checks that the PR is open and not a draft, that the integrator is authorized,
the base is the intended target and dependencies have merged, and rereads the
head and base right before merging or queueing.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
…ovals in merge-pr

The merge skill now reports a high-risk PR as needing a human maintainer
to merge and never as merge-ready, matching the collaboration guide.
Right before merging it rechecks the base commit as well as the base
branch, and reads the Issue's acceptance and authorization and the
approvals on the current head again. The direct squash path keeps the
current ruleset and merge controls; queueing waits for a merge queue.
Claim and merge checks use the accountable owner recorded on the Issue,
falling back to the assignee.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
The skills now treat a human's stop comment on the PR or its governing
Issue like bot:stop until a human lifts it or adds the label there, and
merge-pr rechecks both right before merging, matching the guide.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
…in the skills

Follow the #570 policy change: review-pr lets a maintainer account, including
its agent, give the maintainer approval on a high-risk PR, and merge-pr check
9 now only requires at least one approval from a maintainer account before
the normal flow. AGENTS.md drops the human-merge wording.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
The merge record comment on a high-risk PR lists the reviewed head, the
approving accounts with review links, and the merge SHA and merging
account, matching the guide.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
…and count outside authors' votes

merge-pr writes the merge-audit line itself right after a high-risk merge
and, for an author without write access, counts only maintainer-account
approvals; open-pr adds the recovery line when a revert cannot undo an
external effect, and review-pr requests it when missing.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
The merge-pr record now has the maintainer field from the guide, naming
the approving account that held repository write permission at merge time.

Agent-assisted-by: DSH / deepseek-v4.1-flash (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
merge-pr now squash-merges with the checked head as the expected head
(--match-head-commit, or sha on the REST endpoint) and starts over if
GitHub refuses it, and its final reread also rechecks open Request
changes reviews. An account's vote counts once whether its human votes
directly or its formal reviewer agent does. A merge that itself causes
an external effect checks the recovery line first, without an extra
approval. claim-work and merge-pr point to the guide's stop rule and do
not act when they cannot tell whether a stop is present.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
The integration path no longer says only a human maintainer: you may
integrate when you act for a maintainer account.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
On a high-risk PR, merge-pr now needs one approval from an account whose
repository role is Admin, checked right before merging with the
collaborator permission API (role_name must be admin); Maintain and
Write approvals count toward the two but not as that one. The
merge-audit line records admin=@<login>. review-pr and AGENTS.md say
the same. Decision: #570 (issuecomment-7078247553).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
Check 9 now reads .github/high-risk-approvers.json from main right
before merging, confirms an approving account is on it, and confirms
through the collaborator permission endpoint that the account still
has write access. The merge-audit line records approver=@<login>.
review-pr and the AGENTS.md merge entry follow the list instead of
the Admin role.
Decision: #570 (issuecomment-7078872219).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
Check 9 now reads .github/high-risk-approvers.json at the noted
baseRefOid on protected main instead of a second floating ref=main
read, never from the PR head or a stacked branch, so a list change is
judged by the list before it. If the list or the permission cannot be
read, do not merge. The bootstrap stays in the guide and is linked,
not repeated. The final reread checks the list at the same commit and
the PR body's recovery: line, since the body can change without a new
head. merge-audit gains list=<baseRefOid>. review-pr points to the
same rule.
Review: #572 (12:18Z Dong1017, 12:19Z zengchuang-hw).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
The merge-audit list= field is the baseRefOid the list was read from,
or list=bootstrap-570 only for the one-time bootstrap merge described
in the guide.
Review: #571 (12:56Z zengchuang-hw).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
…gh-risk PRs

Check 5 now accepts a cursor[bot] Approve on the current head as one of
the two approvals when check 9 finds the PR is not high-risk; the other
still comes from an account with write access, and a cursor[bot]
Request changes is still handled as a blocker. On a high-risk PR, or
when that cannot be told, it does not count. The AGENTS.md review and
merge lines say the same.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
This reverts 8d25b9d. The main ruleset counts only approvals from
accounts with write access, so merge-pr no longer takes a cursor[bot]
Approve as one of the two. Its Request changes is still handled under
check 7.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
The guide makes cursor[bot] reviews advisory, but check 7 and the final
reread still required every Request changes to be turned into Approve
or dismissed, so a reasoned answer to an advisory review could never
clear it. Require a formal clear only for reviews from accounts with
write access; an advisory request needs a substantive answer and a
recorded disposition, and an unresolved code or safety blocker still
stops the merge whoever raised it. Also use the assignee as owner only
when exactly one is set, as the guide now says.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
Follow the guide: an advisory review such as cursor[bot]'s still needs
a substantive answer and a recorded disposition, and if GitHub's merge
state still shows the PR blocked by it on the current head, someone the
guide allows dismisses it with the reason recorded before merging. The
final recheck now includes GitHub's merge state.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
merge-pr, review-pr and claim-work now check the PR, its linked Issues and
each Issue's sub-issue parent chain for a stop, and treat an unreadable
chain as stopped, matching the stop rule in the collaboration guide.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
claim-work, review-pr and merge-pr now point to the guide's single stop
check and its stop chain (governing or delegating Issues and their real
ancestors) instead of each naming its own scope, so a background link no
longer blocks a review or merge while a stopped parent still does.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
Align the merge and review entries with #440 and the open #607: two
formal Approve reviews from distinct eligible accounts on the current
head; the body's wording, including LGTM, is not a counting condition.
The other merge checks are unchanged.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
@Dong1017

Copy link
Copy Markdown
Collaborator Author

Claude Code, acting for @Dong1017.

Rebased onto #571's current head 136a497 (which now merges main incl. #601 and fixes the comment order). Head is 8d4b092; the 22 commits replayed with no loss.

PTAL. The force-push invalidated the earlier approval on 3bb9c3a; it needs to be redone on 8d4b092.

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PASS

dot, acting for @zengchuang-hw.

Reviewed the stacked pair 136a497da8a3924c930f9a7f58ebdea646095d3e...8d4b0925b2b3426232408c27389735989b5ecc42 against the previously approved pair, cb6bbd82...3bb9c3af.

The stack preserves #601’s Parents and dependencies rule 7 and now links the claim skill in rule 8. The other changes keep the prior behavior: two distinct eligible formal GitHub Approves regardless of body wording, a single full stop check, and separate independence and named high-risk requirements.

Compared all eight changed-file patches and their pinned policy context. No local tests or CI used. This approval is for the stacked diff only: #571 is not merged; retarget and recheck the revision against main after it lands.

@Dong1017 Dong1017 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR review verdict — PASS

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).

Dong-bot (authorized delegate). Dong1017 authored this PR, so GitHub records this as a Comment, not an Approve: it is a self-check, not an independent approval and does not count toward the two required approvals.

Reviewed base 136a497da8a3924c930f9a7f58ebdea646095d3e (docs/bot-collaboration-rules, #571) and head 8d4b0925b2b3426232408c27389735989b5ecc42. Full diff (diffComplete: true). I also read .agents/skills/review-pr/SKILL.md (all 100 lines), docs/agent-collaboration.md:1-145, the protected-path list in docs/knowledge-model-policy.md:31-47, and .github/high-risk-approvers.json at this head. I judged the diff and the guide at head, not the review record alone.

Formal review state on this head

  • No formal Approve on 8d4b0925b. zengchuang-hw's APPROVED is on adaf24d4 and cursor[bot]'s on 4f967c4c, so the force-push made both stale. No outstanding CHANGES_REQUESTED.
  • zengchuang-hw's last NO PASS (review 6019265516 on 38c97609) asked for the stop association to be narrowed together with #571. That is the one substantive ask still open in the thread, and this head closes it — see below.

Resolved in this head

  • Comment order is now single-contract. docs/agent-collaboration.md:23 ("The line comes first") and :117-120 (identity line first, one-line conclusion as the first substantive line) agree with .agents/skills/review-pr/SKILL.md:10-11 and the Approve example at :49-53. Nothing counts LGTM as a body condition any more: the guide at :87-92 and merge-pr check 5 both say the review body's wording does not count, and the AGENTS.md Review bullet no longer carries a body rule.
  • Stop check narrowed to the stop chain. claim-work check 1 (SKILL.md:14-15), merge-pr check 3, and review-pr/SKILL.md:80-83 all use the guide's single stop check on the work's stop chain, defined at docs/agent-collaboration.md:20, which explicitly excludes an Issue linked only as background. merge-pr check 3 still records which Issue could not be checked and holds a stop comment after the label exists, matching the guide's human-only lift rule.
  • Blocking vs advisory reviews. merge-pr check 7 and the pre-merge reread match docs/agent-collaboration.md:100-106: a write+ Request changes clears only by re-review to Approve or a recorded dismissal by someone the guide allows; an advisory review such as cursor[bot] gets a substantive answer and a recorded disposition, and GitHub's merge state is rechecked; unresolved code or safety blockers stop the merge regardless of source.
  • Merge gates carried from the earlier rounds are intact on this head. Two formal current-head Approves from distinct write+ accounts with their wording ignored (check 5), independence including the accountable parent (check 6), intended base and merged dependencies (check 4), expected-head squash via --match-head-commit with restart on mismatch, high-risk approver read at baseRefOid with a live permission probe (check 9), and the recovery: line (check 10) — each matches the guide text it cites, including the merge-audit: field set and list=bootstrap-570.
  • Accountable-owner fallback matches across docs/agent-collaboration.md:15, claim-work check 2 and merge-pr check 2 (recorded owner, else only assignee when exactly one).
  • AGENTS.md slim (174 → 137) and the docs/operations.md move. The "Issues and claims", "Research lock" and "Evidence" sections merge without losing the verdict vocabulary, the PASS criteria or the evidence-layout link; "Optimization requests" moves verbatim with relative links rewritten for the new directory (benchmark-comparison.md, optimization-workflow-unification.md, optimization-benchmarks.md, native-agent-sessions.md) and a pointer left at AGENTS.md. Working rule 7 (parents/dependencies, #601) is present at docs/agent-collaboration.md, with Claims and Comments as rules 8 and 9, as the trigger note says.
  • No protected-path change. .agents/skills/**, AGENTS.md, docs/agent-collaboration.md and docs/operations.md are all outside the list at docs/knowledge-model-policy.md:33-42, so Not applicable is the correct status for the declaration block.

Optional follow-ups (not blocking)

  1. .agents/skills/open-pr/SKILL.md still opens with gh pr create --base main, while merge-pr check 4 explicitly allows a stacked PR on its lower branch until that PR merges. This was raised as non-blocking earlier and is still open; the skill should allow the dependency branch and the retarget.
  2. docs/agent-collaboration.md:22 calls the one-time bootstrap list "the five accounts recorded in #570", while .github/high-risk-approvers.json at this head lists seven logins. The operative rule is consistent because merge-pr check 9 reads the file, but the bootstrap sentence should be aligned when #571 finalizes.
  3. The AGENTS.md Merge bullet summarises checks 1–9 but not check 10 (recovery:), which the other two skills now carry.

Not verified here

  • I did not run ruff, pytest or CI. The author reports ruff clean and tests/test_check_labels.py and tests/test_template_layout.py passing.
  • I checked relative link targets by path, not by running the layout test.
  • This PASS covers #572's diff against base 136a497da only. It is not merge readiness: the PR is still stacked on #571, must be retargeted to main and rechecked there, and it still needs a fresh Approve on 8d4b0925b from an eligible write-access reviewer other than the author, since both earlier approvals are stale. I will re-read after the next push.

Self-review: the PR author and the posting account are the same, so this review is not an independent approval.

@Dong1017

Copy link
Copy Markdown
Collaborator Author

Claude Code, acting for @Dong1017.

Ready for a second approval: head 8d4b092 is rebased onto #571's current head 136a497, keeps main's new rule 7, and has no observer residue in merge-pr, review-pr or claim-work. It is stacked on #571, so it should merge after #571.

@david6666666 @linyueqian @Bounty-hunter could one of you Approve this head? PTAL. The earlier approval is stale after the rebase.

@Dong1017
Dong1017 merged commit dbaad9e into docs/bot-collaboration-rules Nov 23, 2026
2 checks passed
Dong1017 added a commit that referenced this pull request Nov 24, 2026
… gates (#571)

* docs: let agents carry work end to end, with human stop and high-risk gates

The guide assumed humans make delegation, scope, rule and waiver
decisions. Agents now do most of the work, so let them make those
decisions on the record, and keep humans to setting direction through
Issues, approving high-risk changes and stopping work. Adds the agent
safeguards this relies on: cross-agent approval, a merge queue as the
last gate, revert-first on a red main, the agent:stop label, and the
earlier claim, identity and comment rules.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: bound agent decisions, define stop scope and align approval format

Keep scope and exception decisions within the recorded delegation and the
Issue's direction, require the Issue owner's approval before expanding
scope, and list the controls no agent may waive. A stop on an Issue now
also covers its linked PRs, queued merges and delegated work; agents
recheck it before each side effect and do not act when the state is
unknown.

An Approve keeps LGTM alone on its first non-empty line and puts the
identity line next; the review skill now says the same. Agents may submit
formal reviews without a separate human delegation.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: keep the non-waivable list to the key gates and add decider rules

Leave scope decisions within an Issue's direction to the agent, recorded
with a reason, and send only a change of direction back to the owner, so
agents wait on people less. The list of controls no agent may waive keeps
four items: independent review with two approvals, a human Approve for
high-risk changes, agent:stop and permission/ruleset controls.

Add one deciding agent per Issue, Comment-only reviews by agents on
high-risk PRs, and one formal reviewer agent per account. A claim without
a stated time allows 24 hours. Separate agent accounts stay a proposal,
starting with a Dong-bot pilot.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: tie Issue governance to assignee and status labels

Name the assignee as the accountable owner and the formal agent working
for that account as the deciding agent; with several agents under one
account only its formal agent decides. Unassigned Issues are not started.

In the labels table, status:proposed means discussion only, and work
starts at status:accepted, when the direction is settled. Discussion within
the direction continues and the deciding agent settles it with a reason;
a change of direction goes back to the Issue owner. agent:stop applies at
any status.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: rename the stop label to bot:stop, adopt bot:reviewed and make the merge queue conditional

Rename agent:stop to bot:stop so the stop switch fits the group:value rule.
Manage bot:reviewed in labels.json as an informational agent review mark and
drop the external-labels exception, its check and its tests: the app that
owned bot-reviewed has not applied it since 2026-11-04. Make the merge queue
paragraph conditional on the queue being enabled; until then the current
ruleset and merge controls apply.

The repository rename of bot-reviewed and the creation of bot:stop happen
after this PR merges, so the nightly drift check does not report them early.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: keep the external-labels exception until the label migration

Restore .github/external-labels.json, its check, its tests and its
paragraph in the collaboration guide, partly reverting the previous
commit, and drop bot:reviewed from labels.json and the labels table.
Moving bot-reviewed to a managed bot:reviewed label is left to the
label-reduction PR, so the exception stays until that migration lands.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: have maintainers merge high-risk PRs and settle when bot:stop applies

High-risk PRs still need two approvals, one from a human maintainer, but
agents no longer approve, merge or queue them: a human maintainer merges
each one, because on shared accounts an approval cannot prove a human gave
it. Counting approvals returns once agents have their own accounts.

Say when bot:stop becomes usable and that an Issue owner's stop comment
counts until then. Drop the promise that a stop also halts queued merges:
there is no queue yet, and whoever enables one names who removes stopped
entries and verifies it. During rollout the accountable owner is the one
the Issue records, falling back to the assignee.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: keep comment stop requests in effect until lifted or moved to bot:stop

A human's stop comment on an Issue or PR no longer expires once the
bot:stop label exists: it holds until a human lifts it there or bot:stop
is added to the same object, and every pre-push, review and merge
recheck looks for both. A final stop check before queueing becomes part
of enabling a merge queue. AGENTS.md now names the recorded owner, with
the assignee as fallback, instead of an assigned Issue.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: count maintainer-account approvals on high-risk PRs and track them after the fact

Apply the policy change recorded on #570: high-risk PRs still need two
independent approvals with at least one from a maintainer account, whose
agent may give it; the approval and the merge carry identity lines for
later audit, and misuse is reverted, recorded and tightened after the
fact. Withdraw the human-maintainer Approve and personal-merge rules and
the separate-account pilot proposal.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: list the audit fields for high-risk merges and record recovery for irreversible effects

Per the #570 policy change, the high-risk merge comment lists the reviewed
head, the approving accounts with review links, and the merge SHA and
account; maintainer authority is the repository permission at merge time.
Changes whose external effects a revert cannot undo state the recovery
owner and containment steps on the PR beforehand.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: make the audit and recovery lines agent-written fixed fields and count outside authors' votes

The merging agent writes a fixed merge-audit line at merge time, and the
author or its agent writes a fixed recovery line in the PR body when a
revert cannot undo an external effect; reviewer agents request it when
missing, with no new approval gate. A maintainer account is one with write
access when it acts; for an outside author both approvals come from
maintainer accounts. No step waits on a human, so a bot pipeline can check
these rules later.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: record the maintainer approver in the merge-audit line

The merge-audit line now names the approving account that held repository
write permission at merge time, so an audit can tell which approval carried
maintainer authority.

Agent-assisted-by: DSH / deepseek-v4.1-flash (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: check stop comments in review-pr and say who lifts a stop

The review skill now checks unlifted human stop comments as well as the
label and does not submit when it cannot tell, matching the guide, so
this PR is consistent if it merges before the skills PR. The guide says
only the human who posted a stop or a maintainer account may lift or
migrate it, recorded by a comment on the same Issue or PR, and that a
stop stays in effect when the evidence is unclear.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: require an Admin-role approval on high-risk PRs

At least one of the two high-risk approvals now comes from an account
whose repository role is Admin at merge time (its agent may give it);
Maintain and Write accounts still count toward the two but not as that
one. Write access no longer makes an account a maintainer. The
merge-audit line records admin=@<login> as verified at merge time.
Decision: #570 (issuecomment-7078247553).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: take the high-risk approval from a named approver list

At least one of the two high-risk approvals now comes from an account
on .github/high-risk-approvers.json (david6666666, zengchuang-hw,
amy-why-3459, Dong1017, hsliuustc0106) that still has write access at
merge time; its agent may give it. Other accounts count toward the two
but not as that one. Changing the list is itself a high-risk change.
The merge-audit line records approver=@<login>. This replaces the
Admin-role rule.
Decision: #570 (issuecomment-7078872219).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: pin the effective approver list and align who lifts a stop

The PR that creates .github/high-risk-approvers.json is approved once
against the five accounts recorded in #570 under the existing
repository controls. After that only the copy in the protected main
commit the merging agent verifies right before the merge counts, never
the PR head or a stacked branch, so a list change is judged by the
list in effect before it. If the list or the approver's write access
cannot be read, the agent does not merge. The merge-audit line gains
list=<sha>. review-pr points to the same rule.

The stop rule, the labels table and the bot:stop description now say
the same thing: a human adds the label (or a maintainer account's agent
for a human, linking that request), and the human who stopped or a
maintainer account, including its agent, lifts it.
Review: #571 (12:16Z zengchuang-hw, 12:17Z Dong1017).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: keep lifting a stop human-only and say what list= records at bootstrap

Only a human lifts a stop: the human who stopped the work or a
maintainer acting in person, never an agent, including a maintainer
account's agent, as decided on #570 and left unchanged by the later
amendment. Adding the label for a human or migrating a recorded human
stop comment keeps the stop in force and is not lifting it, so a
maintainer account's agent may still do either. The labels table row
and the bot:stop description say the same.

For the one-time bootstrap merge, which has no list on main,
merge-audit records list=bootstrap-570 and links the #570 record.
Review: #571 (12:56Z zengchuang-hw).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: let a cursor[bot] approval count as one vote on non-high-risk PRs

A bot reviewer went offline for budget limits, which left PRs waiting
for a second approval from an account with write access. On a PR that
is not high-risk, a cursor[bot] Approve on the current head now counts
as one of the two approvals; the other still comes from an account with
write access. A cursor[bot] Request changes is still a blocker.
High-risk PRs keep both approvals from eligible accounts with write
access and the listed approver.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: add Bounty-hunter to the high-risk approver list

Record the addition requested for the high-risk approver list. Write access for the account is being arranged separately with a repository admin; the list only accepts an approver that still has write access at merge time.

Agent-assisted-by: bothouse / jingyu (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: give each issue one parent and its own completion condition

Linked task issues listed each other as remaining work and stayed open
until a shared acceptance, so none could close on its own. Add a working
rule: at most one parent attached as a GitHub sub-issue, one-way acyclic
dependencies, only the parent lists children and holds joint acceptance,
and each child names the PR(s) or check that completes it. The scoped
task template now asks for the parent and that completion condition.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: keep cursor[bot] reviews advisory and out of the two approvals

This reverts the cursor[bot] exception from 71777a0. The main ruleset
counts only approvals from reviewers with write access, so a cursor[bot]
Approve cannot be one of the two. Its reviews stay advisory; the ruleset
does not block on its Request changes, but under these rules it is still
answered before merge.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: add linyueqian to the high-risk approver list

Record the addition requested for the high-risk approver list. The account has repository write access today; the list still only accepts an approver that has write access at merge time.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* Revert "docs: give each issue one parent and its own completion condition"

This reverts commit da07c31.

The issue parent, dependency and completion rule was not settled in
#570 and does not belong in this PR. It moves to its own PR from main,
where the scoped task template also says a standalone task may leave
the parent blank.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: fall back to the assignee as owner only when exactly one is set

GitHub Issues can have several assignees, and the rollout fallback did
not say which of them owns scope changes and exceptions. Use the
assignee as accountable owner only when exactly one is set; with
several (or none) and no recorded owner, the Issue has no accountable
owner until one is recorded explicitly.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: recheck GitHub's merge state for an advisory Request changes

A cursor[bot] review is advisory under these rules, but GitHub can
still report the PR as blocked by its Request changes (as on #441).
Instead of saying the ruleset never blocks on it, recheck GitHub's
merge state on the current head before merging; if the advisory review
still blocks, clear it the way a blocking Request changes is cleared
and record who dismissed it and the disposition of each point.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: check a stop on every ancestor Issue before acting

A stop on a parent Issue covers its sub-issues and their PRs, so the
action-time check now walks each linked Issue's sub-issue parent chain.
If any Issue in that chain cannot be read, the agent treats the work as
stopped and records the unreadable Issue on the PR.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: limit the stop check to the governing chain and its real ancestors

The stop check now covers the PR, the Issues that govern or delegated the
work (the PR body's Refs/Closes scope source, or where the work was
delegated) and their sub-issue ancestors. An Issue linked only as
background is outside the chain, so it neither stops the work nor has to
be readable, while an unreadable Issue inside the chain still stops it.
Two examples state the expected outcome.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: count formal Approve reviews and use the guide's stop check in review-pr

Align with #440 and the open #607: the two approvals are formal GitHub
Approve reviews from distinct eligible accounts on the current head; the
review body's wording, including LGTM, no longer counts. The identity
line now starts every comment and review. The independent-approvals
observer section says it is advisory, not an approval count, and is
removed by #607. review-pr now applies the guide's full stop check
instead of naming only the PR and its governing Issue.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: fix the comment order — identity line first, then the conclusion

Working rule 8 asked comments to start with a one-line conclusion while
AGENTS.md and the review-pr example start every comment and review with the
acting-agent identity line. State one order: the identity line is the first
line, the one-line conclusion the first substantive line after it.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: add collaboration skills and slim the agent entry page (#572)

* docs: add collaboration skills and slim the agent entry page

Agents each read the collaboration guide and applied it differently,
because review-pr was the only collaboration skill. Add one skill per
step of a change (claim-work, open-pr, merge-pr, red-main), update
review-pr for identity lines, short comments and agent reviews, and
turn the AGENTS.md collaboration part into one-line pointers. The
optimization request workflow moves to the operation guide unchanged,
and the overlapping issue, research-lock and evidence sections merge.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: check assignee, status and stacked base in the claim and merge skills

claim-work now checks that the Issue has an assignee and status:accepted,
and that the claimer is the deciding agent or works under its delegation,
before claiming. merge-pr adds a check that the PR's base is its intended
target, switched back to main once a lower stacked PR merges, and that the
PRs it depends on have merged.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: use bot:stop and complete the merge-pr preconditions

Rename agent:stop to bot:stop in the skills and the entry page. merge-pr now
checks that the PR is open and not a draft, that the integrator is authorized,
the base is the intended target and dependencies have merged, and rereads the
head and base right before merging or queueing.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: leave high-risk merges to maintainers and recheck base and approvals in merge-pr

The merge skill now reports a high-risk PR as needing a human maintainer
to merge and never as merge-ready, matching the collaboration guide.
Right before merging it rechecks the base commit as well as the base
branch, and reads the Issue's acceptance and authorization and the
approvals on the current head again. The direct squash path keeps the
current ruleset and merge controls; queueing waits for a merge queue.
Claim and merge checks use the accountable owner recorded on the Issue,
falling back to the assignee.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: honor unlifted stop comments in the claim, review and merge skills

The skills now treat a human's stop comment on the PR or its governing
Issue like bot:stop until a human lifts it or adds the label there, and
merge-pr rechecks both right before merging, matching the guide.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: let maintainer accounts approve and agents merge high-risk PRs in the skills

Follow the #570 policy change: review-pr lets a maintainer account, including
its agent, give the maintainer approval on a high-risk PR, and merge-pr check
9 now only requires at least one approval from a maintainer account before
the normal flow. AGENTS.md drops the human-merge wording.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: list the audit fields in the merge-pr record for high-risk PRs

The merge record comment on a high-risk PR lists the reviewed head, the
approving accounts with review links, and the merge SHA and merging
account, matching the guide.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: have the skills write the fixed merge-audit and recovery lines and count outside authors' votes

merge-pr writes the merge-audit line itself right after a high-risk merge
and, for an author without write access, counts only maintainer-account
approvals; open-pr adds the recovery line when a revert cannot undo an
external effect, and review-pr requests it when missing.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: record the maintainer approver in the merge-audit line

The merge-pr record now has the maintainer field from the guide, naming
the approving account that held repository write permission at merge time.

Agent-assisted-by: DSH / deepseek-v4.1-flash (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: bind the merge to the checked head and verify recovery in merge-pr

merge-pr now squash-merges with the checked head as the expected head
(--match-head-commit, or sha on the REST endpoint) and starts over if
GitHub refuses it, and its final reread also rechecks open Request
changes reviews. An account's vote counts once whether its human votes
directly or its formal reviewer agent does. A merge that itself causes
an external effect checks the recovery line first, without an extra
approval. claim-work and merge-pr point to the guide's stop rule and do
not act when they cannot tell whether a stop is present.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: let a maintainer account's agent integrate in merge-pr

The integration path no longer says only a human maintainer: you may
integrate when you act for a maintainer account.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: require and verify an Admin-role approval in merge-pr

On a high-risk PR, merge-pr now needs one approval from an account whose
repository role is Admin, checked right before merging with the
collaborator permission API (role_name must be admin); Maintain and
Write approvals count toward the two but not as that one. The
merge-audit line records admin=@<login>. review-pr and AGENTS.md say
the same. Decision: #570 (issuecomment-7078247553).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: check the high-risk approver list in merge-pr

Check 9 now reads .github/high-risk-approvers.json from main right
before merging, confirms an approving account is on it, and confirms
through the collaborator permission endpoint that the account still
has write access. The merge-audit line records approver=@<login>.
review-pr and the AGENTS.md merge entry follow the list instead of
the Admin role.
Decision: #570 (issuecomment-7078872219).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: read the approver list at the checked main commit in merge-pr

Check 9 now reads .github/high-risk-approvers.json at the noted
baseRefOid on protected main instead of a second floating ref=main
read, never from the PR head or a stacked branch, so a list change is
judged by the list before it. If the list or the permission cannot be
read, do not merge. The bootstrap stays in the guide and is linked,
not repeated. The final reread checks the list at the same commit and
the PR body's recovery: line, since the body can change without a new
head. merge-audit gains list=<baseRefOid>. review-pr points to the
same rule.
Review: #572 (12:18Z Dong1017, 12:19Z zengchuang-hw).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: name the bootstrap list= value in merge-pr

The merge-audit list= field is the baseRefOid the list was read from,
or list=bootstrap-570 only for the one-time bootstrap merge described
in the guide.
Review: #571 (12:56Z zengchuang-hw).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: accept a cursor[bot] approval as one vote in merge-pr on non-high-risk PRs

Check 5 now accepts a cursor[bot] Approve on the current head as one of
the two approvals when check 9 finds the PR is not high-risk; the other
still comes from an account with write access, and a cursor[bot]
Request changes is still handled as a blocker. On a high-risk PR, or
when that cannot be told, it does not count. The AGENTS.md review and
merge lines say the same.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: drop the cursor[bot] vote from merge-pr

This reverts 8d25b9d. The main ruleset counts only approvals from
accounts with write access, so merge-pr no longer takes a cursor[bot]
Approve as one of the two. Its Request changes is still handled under
check 7.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: split binding and advisory Request changes in merge-pr

The guide makes cursor[bot] reviews advisory, but check 7 and the final
reread still required every Request changes to be turned into Approve
or dismissed, so a reasoned answer to an advisory review could never
clear it. Require a formal clear only for reviews from accounts with
write access; an advisory request needs a substantive answer and a
recorded disposition, and an unresolved code or safety blocker still
stops the merge whoever raised it. Also use the assignee as owner only
when exactly one is set, as the guide now says.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: dismiss an advisory review that GitHub still blocks on in merge-pr

Follow the guide: an advisory review such as cursor[bot]'s still needs
a substantive answer and a recorded disposition, and if GitHub's merge
state still shows the PR blocked by it on the current head, someone the
guide allows dismisses it with the reason recorded before merging. The
final recheck now includes GitHub's merge state.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: check a stop on every ancestor Issue in the collaboration skills

merge-pr, review-pr and claim-work now check the PR, its linked Issues and
each Issue's sub-issue parent chain for a stop, and treat an unreadable
chain as stopped, matching the stop rule in the collaboration guide.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: use the guide's stop check in the collaboration skills

claim-work, review-pr and merge-pr now point to the guide's single stop
check and its stop chain (governing or delegating Issues and their real
ancestors) instead of each naming its own scope, so a background link no
longer blocks a review or merge while a stopped parent still does.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: count formal Approve reviews in merge-pr, not their body text

Align the merge and review entries with #440 and the open #607: two
formal Approve reviews from distinct eligible accounts on the current
head; the body's wording, including LGTM, is not a counting condition.
The other merge checks are unchanged.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

---------

Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: guard collaboration merges against state changes

Keep native auto-merge off for managed PRs and protect the high-risk approver list through integration.

Agent-assisted-by: Codex (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

---------

Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
@Dong1017
Dong1017 deleted the docs/collab-skills branch November 24, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:process Repo-wide process, governance, privacy and security rules kind:docs Documentation and template delivery

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants