From e458123e7ab5015f49ccfb6fa4a7e0b9326a85f7 Mon Sep 17 00:00:00 2001 From: kaizen-agents-sync Date: Wed, 1 Jul 2026 23:14:59 +0000 Subject: [PATCH 1/2] Sync Kaizen shared skills --- skills/kaizen-bug-router/SKILL.md | 8 ++++++++ skills/pr-guardian/SKILL.md | 12 +----------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/skills/kaizen-bug-router/SKILL.md b/skills/kaizen-bug-router/SKILL.md index 9dc1400..d179b5e 100644 --- a/skills/kaizen-bug-router/SKILL.md +++ b/skills/kaizen-bug-router/SKILL.md @@ -65,6 +65,14 @@ Use this structure: ## Routing Filed in `` because . +## PR linkage requirement +The implementation PR for this issue must target the repository default branch, +include `Closes #` for same-repository work or `Closes +kaizen-agents-org/#` for cross-repository work in the PR +body, and verify `gh pr view --json baseRefName,closingIssuesReferences,isDraft` +before reporting the PR ready. Do not rely on a PR title, branch name, or issue +comment as proof that GitHub will close the issue on merge. + ## Notes - If ownership is uncertain, state what was checked and why this issue falls back to `kaizen-loop`. ``` diff --git a/skills/pr-guardian/SKILL.md b/skills/pr-guardian/SKILL.md index 22300dc..682a20f 100644 --- a/skills/pr-guardian/SKILL.md +++ b/skills/pr-guardian/SKILL.md @@ -15,16 +15,6 @@ 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. @@ -33,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 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. From f2332d8c03301e893381fa7125cd05070f56a021 Mon Sep 17 00:00:00 2001 From: "hiraoku.shinichi" Date: Thu, 2 Jul 2026 08:27:10 +0900 Subject: [PATCH 2/2] Restore pr guardian review thread lookup --- skills/pr-guardian/SKILL.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/skills/pr-guardian/SKILL.md b/skills/pr-guardian/SKILL.md index 682a20f..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. @@ -23,7 +33,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.