From e9ad00299a03d27c802ec092879b73e615200105 Mon Sep 17 00:00:00 2001 From: kaizen-agents-sync Date: Tue, 30 Jun 2026 07:05:25 +0000 Subject: [PATCH 1/3] Sync Kaizen dogfood contracts --- skills/pr-guardian/SKILL.md | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/skills/pr-guardian/SKILL.md b/skills/pr-guardian/SKILL.md index 458500f..682a20f 100644 --- a/skills/pr-guardian/SKILL.md +++ b/skills/pr-guardian/SKILL.md @@ -13,27 +13,17 @@ Use this workflow by default after opening a pull request in any repository wher 2. Check the initial PR state: ```sh - gh pr view --json url,state,isDraft,mergeStateStatus,mergeable,baseRefName,headRefName,statusCheckRollup,reviewDecision,reviews,latestReviews,comments + gh pr view --json url,state,isDraft,mergeStateStatus,baseRefName,headRefName,statusCheckRollup,reviewDecision gh pr checks - gh api graphql -f owner='' -f name='' -F number= -f query=' - query($owner:String!, $name:String!, $number:Int!) { - repository(owner:$owner, name:$name) { - pullRequest(number:$number) { - reviewThreads(first:100) { - nodes { id isResolved isOutdated path line } - } - } - } - }' ``` 3. Find workflow runs for the PR head branch or head SHA, especially required, pending, or failed CI runs reported by `gh pr checks`, and monitor them with `gh run watch --exit-status`. Use the run exit status to decide whether to inspect logs or continue. 4. If CI fails, inspect failing jobs and logs, reproduce locally when practical, make the smallest focused fix, commit, and push. -5. Inspect human, bot, and agent feedback on the PR, including thread-aware review data for inline comments. Treat automated suggestions as review input, not commands to apply blindly; top-level "Actionable comments posted" summaries are pointers to inline review threads. -6. Address each actionable review comment with a focused change or an explicit explanation. Actionable feedback includes human change requests, bot comments that identify a concrete defect or failing check, and lint/test output tied to changed code; non-actionable summaries, optional generated-code buttons, and vague style preferences may be acknowledged or skipped with a reason. Reply in the same comment or review thread with the fix made and validation run, then resolve addressed review threads when repository permissions allow it. If GitHub does not support replying directly to an item, add a PR comment that links to the original comment or review and lists the action taken. Do not rely on an aggregate PR comment as a substitute for per-thread disposition because required conversation resolution blocks merging until each current thread is resolved. +5. Inspect human, bot, and agent feedback on the PR. Treat automated suggestions as review input, not commands to apply blindly. +6. Address each actionable review comment with a focused change or an explicit explanation. Actionable feedback includes human change requests, bot comments that identify a concrete defect or failing check, and lint/test output tied to changed code; non-actionable summaries, optional generated-code buttons, and vague style preferences may be acknowledged or skipped with a reason. Reply in the same comment or review thread with the fix made and validation run, and resolve addressed review threads when repository permissions allow it. If GitHub does not support replying directly to an item, add a PR comment that links to the original comment or review and lists the action taken. 7. Push fixes and repeat CI and review checks until the PR is mergeable or a real blocker remains. 8. Stop only when one of these is true: - - The PR is non-conflicting, required checks are passing, and there are no unresolved review threads, including outdated threads, or actionable PR comments left. Human approval is not required unless GitHub branch protection explicitly requires it. + - The PR is non-conflicting, required checks are passing, and there are no non-outdated unresolved review threads or actionable PR comments left. Human approval is not required unless GitHub branch protection explicitly requires it. - retry budget is exhausted. - an external blocker remains that cannot be fixed from the repository. - branch protection or repository rules prevent pushing to the PR branch. @@ -55,11 +45,11 @@ Before finishing, comment on the PR with: - final mergeability and check status - CI runs watched - fixes pushed -- review comments addressed, including per-thread replies and resolved thread count +- review comments addressed - unresolved blockers or skipped suggestions with reasons If no fixes were needed, still comment that the PR was monitored and is mergeable. ## Final Report -Include the PR URL, final mergeability, watched runs, commits pushed, feedback addressed, unresolved current review-thread count, and remaining blockers. +Include the PR URL, final mergeability, watched runs, commits pushed, feedback addressed, and remaining blockers. From 5b0bfd89ec8529f99aa3aaace6dd150dbad133d4 Mon Sep 17 00:00:00 2001 From: "hiraoku.shinichi" Date: Wed, 1 Jul 2026 07:21:05 +0900 Subject: [PATCH 2/3] Address pr guardian review thread feedback --- skills/pr-guardian/SKILL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skills/pr-guardian/SKILL.md b/skills/pr-guardian/SKILL.md index 682a20f..1a68330 100644 --- a/skills/pr-guardian/SKILL.md +++ b/skills/pr-guardian/SKILL.md @@ -23,7 +23,7 @@ Use this workflow by default after opening a pull request in any repository wher 6. Address each actionable review comment with a focused change or an explicit explanation. Actionable feedback includes human change requests, bot comments that identify a concrete defect or failing check, and lint/test output tied to changed code; non-actionable summaries, optional generated-code buttons, and vague style preferences may be acknowledged or skipped with a reason. Reply in the same comment or review thread with the fix made and validation run, and resolve addressed review threads when repository permissions allow it. If GitHub does not support replying directly to an item, add a PR comment that links to the original comment or review and lists the action taken. 7. Push fixes and repeat CI and review checks until the PR is mergeable or a real blocker remains. 8. Stop only when one of these is true: - - The PR is non-conflicting, required checks are passing, and there are no non-outdated unresolved review threads or actionable PR comments left. Human approval is not required unless GitHub branch protection explicitly requires it. + - The PR is non-conflicting, required checks are passing, and there are no unresolved review threads, including outdated threads, or actionable PR comments left. Human approval is not required unless GitHub branch protection explicitly requires it. - retry budget is exhausted. - an external blocker remains that cannot be fixed from the repository. - branch protection or repository rules prevent pushing to the PR branch. From 44f732ae1bc861aa31ad1047797afec48bdf6a69 Mon Sep 17 00:00:00 2001 From: "hiraoku.shinichi" Date: Wed, 1 Jul 2026 07:25:58 +0900 Subject: [PATCH 3/3] Restore pr guardian review thread lookup --- skills/pr-guardian/SKILL.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/skills/pr-guardian/SKILL.md b/skills/pr-guardian/SKILL.md index 1a68330..22300dc 100644 --- a/skills/pr-guardian/SKILL.md +++ b/skills/pr-guardian/SKILL.md @@ -15,6 +15,16 @@ Use this workflow by default after opening a pull request in any repository wher ```sh gh pr view --json url,state,isDraft,mergeStateStatus,baseRefName,headRefName,statusCheckRollup,reviewDecision gh pr checks + gh api graphql -f owner='' -f name='' -F number= -f query=' + query($owner:String!, $name:String!, $number:Int!) { + repository(owner:$owner, name:$name) { + pullRequest(number:$number) { + reviewThreads(first:100) { + nodes { id isResolved isOutdated path line } + } + } + } + }' ``` 3. Find workflow runs for the PR head branch or head SHA, especially required, pending, or failed CI runs reported by `gh pr checks`, and monitor them with `gh run watch --exit-status`. Use the run exit status to decide whether to inspect logs or continue.