[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F91HHENDJWAWR9RH5FJEJA":3,"skill-same:01M7F91HHENDJWAWR9RH5FJEJA":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7F91HHENDJWAWR9RH5FJEJA","pullrequests-review-loop",null,"Poll an automated PR reviewer's reviews (login from --reviewer or WORKBENCH_REVIEWER), judge each finding (the reviewer is flaky - never obey blindly), dispatch fixer subagents, and loop until clean or a round cap. Use between pipeline-watch and merge.","szymonrychu\u002Fworkbench","szymonrychu","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2943524?v=4","01M7F8VBGRDFJ2PSH14RM80E4G","Szymon Richert","01M7F8VBHCQTC2RMKXJ93RHMB3",0,"MIT","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench\u002Fskills\u002Fpullrequests-review-loop\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: pullrequests-review-loop\ndescription: \"Poll an automated PR reviewer's reviews (login from --reviewer or WORKBENCH_REVIEWER), judge each finding (the reviewer is flaky - never obey blindly), dispatch fixer subagents, and loop until clean or a round cap. Use between pipeline-watch and merge.\"\n---\n\n# pullrequests-review-loop\n\nDrives the review-fix loop between CI going green (`pullrequests-watch`)\nand merge. An automated PR reviewer (login from `--reviewer` or `WORKBENCH_REVIEWER`) posts GitHub PR reviews (`APPROVED` \u002F `CHANGES_REQUESTED` \u002F\n`COMMENTED`) plus inline comments on our PRs. **It is flaky**:\nobserved flipping `CHANGES_REQUESTED` -> `APPROVED` on the exact same\nunchanged commit, and sometimes going unreachable and never reviewing at all.\nThis skill never obeys its verdict blindly in either direction - a\n`CHANGES_REQUESTED` might be wrong, an `APPROVED` might be papering over a\nreal finding from two minutes earlier. The calling agent always judges.\n\n**GitHub only.** The review loop covers GitHub PRs; any GitHub host works\n(the `WORKBENCH_SCM_HOSTS` map is honoured). On a GitLab repo the script prints\n`pullrequests-review-loop: \u003Crepo>: unsupported on GitLab (review-loop is\nGitHub-only)` on stderr, still processes the run's GitHub repos, and exits 1.\nA local-only repo (no PR host) is reported skipped on stderr and does not fail\nthe run. For GitLab, judge unresolved discussions via `pullrequests-watch` `reviews=` and the MR UI\u002FAPI.\n\nThis skill does **not** merge. Merging stays the caller's job (`merge own\nPRs` step in `start-development`).\n\n## Procedure\n\n1. **Poll.** Run the script for the PRs in scope:\n\n   ```\n   mise exec -- python3 ${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Fpullrequests-review-loop\u002Fscripts\u002Freview_state.py \\\n     --branch \u003Cbranch> --repos repoA,repoB\n   ```\n\n   or, with explicit PRs:\n\n   ```\n   mise exec -- python3 ${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Fpullrequests-review-loop\u002Fscripts\u002Freview_state.py \\\n     --prs repoA#123,repoB#45\n   ```\n\n   `--reviewer \u003Clogin>` names the reviewer and wins over env `WORKBENCH_REVIEWER`; with neither the script exits 2 with `review_state: no reviewer; pass --reviewer \u003Clogin> or set WORKBENCH_REVIEWER`. Output is\n   newline-delimited JSON, one object per PR:\n\n   ```\n   repo, pr, url, headSha, prState, mergeable,\n   reviewerDecisionOnHead: APPROVED|CHANGES_REQUESTED|COMMENTED|NONE,\n   reviewsAll: [{state, submittedAt, commitId, onHead, body}, ...]   (newest first, reviewer's only),\n   inlineComments: [{path, line, commitId, onHead, createdAt, body}, ...]  (newest first, reviewer's only),\n   hasStaleReviews: bool,\n   actionable: bool,\n   error: \u003Cstring, only present on a per-PR API failure>\n   ```\n\n   A per-PR `error` does not stop the others; the script exits non-zero when\n   every requested PR errored or any repo was GitLab. `reviewerDecisionOnHead` is always the\n   *latest* review on the current head commit - never a stale one.\n\n2. **Judge, per PR - never obey blindly.** Read\n   `${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Fstart-review\u002Freferences\u002Freview-checklist.md`\n   first and apply it. Classify each bot finding by kind - `missing`, `extra`,\n   `wrong` or `quality` - and attach `evidence` from the code (file:line or a\n   command output). A finding no evidence confirms is dropped. If you are not certain an issue is real,\n   do not flag it. Severity follows the checklist's\n   rubric (`critical`, `high`, `medium`; nothing lower is reported). Keep a\n   `declined` list naming what you did not judge, each with why. For each PR\n   object:\n   - If `actionable` is true, OR `reviewsAll` contains a `CHANGES_REQUESTED`\n     entry anywhere (even when `reviewerDecisionOnHead` is now `APPROVED` -\n     the flip-flop case), read every review body and inline comment yourself\n     judge it against the actual code before acting: is the claim real? A real bug gets fixed. A wrong or stale nitpick gets a\n     reasoned rebuttal (in your own head, not posted back to the bot) and is\n     dropped. A flip-flopped `APPROVED` sitting on top of a real earlier\n     `CHANGES_REQUESTED` finding still gets fixed - the later approve does\n     not excuse it.\n   - If `reviewerDecisionOnHead == \"NONE\"` and `reviewsAll` is empty, the\n     reviewer hasn't weighed in (never reviewed, or currently unreachable).\n     Do not block on it. Apply a grace window (a couple of poll rounds,\n     spaced a few minutes apart, is enough - the reviewer is asynchronous,\n     not a synchronous check): if it still hasn't reviewed, proceed on the\n     strength of your own review (the `start-review` pass already run\n     earlier in the flow) and note in your report that the automated\n     reviewer never weighed in.\n\n3. **Fix real findings.** For each PR with a verified real finding, dispatch\n   a fixer subagent sized to the fix (sonnet\u002Flow for a one-line correction,\n   sonnet\u002Fmedium for a multi-file fix) into that repo's existing worktree.\n   The fixer writes a failing test first where the finding is testable,\n   then fixes, commits, and pushes. A new head commit makes every prior review stale by construction\n   (`onHead` flips to false on the next poll) - the reviewer\n   re-reviews the new head on its own schedule.\n\n4. **Re-poll and repeat, bounded.** Re-run step 1 after giving the\n   reviewer time to react to the new head (poll every few minutes, do not\n   hot-loop). Cap fix rounds at **3 per PR**. A PR still carrying an\n   unresolved real finding after 3 rounds is surfaced to the human instead of\n   looped forever.\n\n5. **Exit condition, per PR.** Stop looping and consider a PR clear when ALL\n   of:\n   - CI is green (checked separately via `pullrequests-watch`, not by\n     this skill).\n   - `reviewerDecisionOnHead != \"CHANGES_REQUESTED\"`, OR the reviewer never\n     reviewed within the grace window (step 2's escape hatch).\n   - No un-addressed real finding remains in `reviewsAll` \u002F\n     `inlineComments` per your own judgment from step 2.\n\n6. **Hand back to the caller.** Report, per PR: final `reviewerDecisionOnHead`,\n   whether any findings were fixed (and what), whether the reviewer ever\n   showed up, and whether the round cap was hit. The caller merges from here\n   - this skill never merges.\n\n## Notes\n\n- Never treat `APPROVED` as proof of correctness, and never treat\n  `CHANGES_REQUESTED` as proof of a bug. Both are one flaky agent's opinion.\n  The gate is your own judgment plus this loop together, not the bot's label.\n- The bot flip-flopping `CHANGES_REQUESTED` -> `APPROVED` on an unchanged\n  commit is expected behavior for some reviewers, not a script bug - that is\n  exactly why `reviewsAll` carries full history instead of just the latest\n  state.\n- `hasStaleReviews: true` with `reviewerDecisionOnHead: \"NONE\"` means the\n  reviewer's only opinion is about a commit that's no longer the head (you\n  already pushed a fix past it) - treat that PR as awaiting a fresh review,\n  not as clean.\n","# pullrequests-review-loop\n\nDrives the review-fix loop between CI going green (`pullrequests-watch`)\nand merge. An automated PR reviewer (login from `--reviewer` or `WORKBENCH_REVIEWER`) posts GitHub PR reviews (`APPROVED` \u002F `CHANGES_REQUESTED` \u002F\n`COMMENTED`) plus inline comments on our PRs. **It is flaky**:\nobserved flipping `CHANGES_REQUESTED` -> `APPROVED` on the exact same\nunchanged commit, and sometimes going unreachable and never reviewing at all.\nThis skill never obeys its verdict blindly in either direction - a\n`CHANGES_REQUESTED` might be wrong, an `APPROVED` might be papering over a\nreal finding from two minutes earlier. The calling agent always judges.\n\n**GitHub only.** The review loop covers GitHub PRs; any GitHub host works\n(the `WORKBENCH_SCM_HOSTS` map is honoured). On a GitLab repo the script prints\n`pullrequests-review-loop: \u003Crepo>: unsupported on GitLab (review-loop is\nGitHub-only)` on stderr, still processes the run's GitHub repos, and exits 1.\nA local-only repo (no PR host) is reported skipped on stderr and does not fail\nthe run. For GitLab, judge unresolved discussions via `pullrequests-watch` `reviews=` and the MR UI\u002FAPI.\n\nThis skill does **not** merge. Merging stays the caller's job (`merge own\nPRs` step in `start-development`).\n\n## Procedure\n\n1. **Poll.** Run the script for the PRs in scope:\n\n   ```\n   mise exec -- python3 ${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Fpullrequests-review-loop\u002Fscripts\u002Freview_state.py \\\n     --branch \u003Cbranch> --repos repoA,repoB\n   ```\n\n   or, with explicit PRs:\n\n   ```\n   mise exec -- python3 ${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Fpullrequests-review-loop\u002Fscripts\u002Freview_state.py \\\n     --prs repoA#123,repoB#45\n   ```\n\n   `--reviewer \u003Clogin>` names the reviewer and wins over env `WORKBENCH_REVIEWER`; with neither the script exits 2 with `review_state: no reviewer; pass --reviewer \u003Clogin> or set WORKBENCH_REVIEWER`. Output is\n   newline-delimited JSON, one object per PR:\n\n   ```\n   repo, pr, url, headSha, prState, mergeable,\n   reviewerDecisionOnHead: APPROVED|CHANGES_REQUESTED|COMMENTED|NONE,\n   reviewsAll: [{state, submittedAt, commitId, onHead, body}, ...]   (newest first, reviewer's only),\n   inlineComments: [{path, line, commitId, onHead, createdAt, body}, ...]  (newest first, reviewer's only),\n   hasStaleReviews: bool,\n   actionable: bool,\n   error: \u003Cstring, only present on a per-PR API failure>\n   ```\n\n   A per-PR `error` does not stop the others; the script exits non-zero when\n   every requested PR errored or any repo was GitLab. `reviewerDecisionOnHead` is always the\n   *latest* review on the current head commit - never a stale one.\n\n2. **Judge, per PR - never obey blindly.** Read\n   `${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Fstart-review\u002Freferences\u002Freview-checklist.md`\n   first and apply it. Classify each bot finding by kind - `missing`, `extra`,\n   `wrong` or `quality` - and attach `evidence` from the code (file:line or a\n   command output). A finding no evidence confirms is dropped. If you are not certain an issue is real,\n   do not flag it. Severity follows the checklist's\n   rubric (`critical`, `high`, `medium`; nothing lower is reported). Keep a\n   `declined` list naming what you did not judge, each with why. For each PR\n   object:\n   - If `actionable` is true, OR `reviewsAll` contains a `CHANGES_REQUESTED`\n     entry anywhere (even when `reviewerDecisionOnHead` is now `APPROVED` -\n     the flip-flop case), read every review body and inline comment yourself\n     judge it against the actual code before acting: is the claim real? A real bug gets fixed. A wrong or stale nitpick gets a\n     reasoned rebuttal (in your own head, not posted back to the bot) and is\n     dropped. A flip-flopped `APPROVED` sitting on top of a real earlier\n     `CHANGES_REQUESTED` finding still gets fixed - the later approve does\n     not excuse it.\n   - If `reviewerDecisionOnHead == \"NONE\"` and `reviewsAll` is empty, the\n     reviewer hasn't weighed in (never reviewed, or currently unreachable).\n     Do not block on it. Apply a grace window (a couple of poll rounds,\n     spaced a few minutes apart, is enough - the reviewer is asynchronous,\n     not a synchronous check): if it still hasn't reviewed, proceed on the\n     strength of your own review (the `start-review` pass already run\n     earlier in the flow) and note in your report that the automated\n     reviewer never weighed in.\n\n3. **Fix real findings.** For each PR with a verified real finding, dispatch\n   a fixer subagent sized to the fix (sonnet\u002Flow for a one-line correction,\n   sonnet\u002Fmedium for a multi-file fix) into that repo's existing worktree.\n   The fixer writes a failing test first where the finding is testable,\n   then fixes, commits, and pushes. A new head commit makes every prior review stale by construction\n   (`onHead` flips to false on the next poll) - the reviewer\n   re-reviews the new head on its own schedule.\n\n4. **Re-poll and repeat, bounded.** Re-run step 1 after giving the\n   reviewer time to react to the new head (poll every few minutes, do not\n   hot-loop). Cap fix rounds at **3 per PR**. A PR still carrying an\n   unresolved real finding after 3 rounds is surfaced to the human instead of\n   looped forever.\n\n5. **Exit condition, per PR.** Stop looping and consider a PR clear when ALL\n   of:\n   - CI is green (checked separately via `pullrequests-watch`, not by\n     this skill).\n   - `reviewerDecisionOnHead != \"CHANGES_REQUESTED\"`, OR the reviewer never\n     reviewed within the grace window (step 2's escape hatch).\n   - No un-addressed real finding remains in `reviewsAll` \u002F\n     `inlineComments` per your own judgment from step 2.\n\n6. **Hand back to the caller.** Report, per PR: final `reviewerDecisionOnHead`,\n   whether any findings were fixed (and what), whether the reviewer ever\n   showed up, and whether the round cap was hit. The caller merges from here\n   - this skill never merges.\n\n## Notes\n\n- Never treat `APPROVED` as proof of correctness, and never treat\n  `CHANGES_REQUESTED` as proof of a bug. Both are one flaky agent's opinion.\n  The gate is your own judgment plus this loop together, not the bot's label.\n- The bot flip-flopping `CHANGES_REQUESTED` -> `APPROVED` on an unchanged\n  commit is expected behavior for some reviewers, not a script bug - that is\n  exactly why `reviewsAll` carries full history instead of just the latest\n  state.\n- `hasStaleReviews: true` with `reviewerDecisionOnHead: \"NONE\"` means the\n  reviewer's only opinion is about a commit that's no longer the head (you\n  already pushed a fix past it) - treat that PR as awaiting a fresh review,\n  not as clean.\n",{"name":5,"description":7},"main","ce8273d3492a5008dd408c4823db370b23e18863","plugins\u002Fworkbench\u002Fskills\u002Fpullrequests-review-loop","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench","https:\u002F\u002Fgithub.com\u002Fszymonrychu","www.szymonrichert.pl","2026-10-26 04:36:12",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add szymonrychu\u002Fworkbench --skill pullrequests-review-loop",{"tool":37,"command":38},"bunx","bunx skills add szymonrychu\u002Fworkbench --skill pullrequests-review-loop",{"tool":40,"command":41},"pnpm","pnpm dlx skills add szymonrychu\u002Fworkbench --skill pullrequests-review-loop","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench\u002Fskills\u002Fpullrequests-review-loop\u002FSKILL.md",true,[45,51,55],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"scripts\u002Freview_state.py","SCRIPT","脚本",7595,"https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench\u002Fskills\u002Fpullrequests-review-loop\u002Fscripts\u002Freview_state.py",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"tests\u002Ftest_review_loop_structure.py",895,"https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench\u002Fskills\u002Fpullrequests-review-loop\u002Ftests\u002Ftest_review_loop_structure.py",{"path":56,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":57,"sourceHtmlUrl":58},"tests\u002Ftest_review_state.py",20274,"https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench\u002Fskills\u002Fpullrequests-review-loop\u002Ftests\u002Ftest_review_state.py",[60,67,74,81,88,95],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7F949PAG534XSY6BXH4GKY0","claudy","d claudy","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fscripts\u002Ftests\u002Fharness\u002Fgolden\u002Fskills\u002Fclaudy\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7F947QH8VQ5WGVMFWFS57M0","gamma","Literal line one.\nLiteral line two.","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fscripts\u002Ftests\u002Fharness\u002Ffixtures\u002Ftree\u002Fplugins\u002Fextra\u002Fskills\u002Fgamma\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7F944VTWR1AAACZGTNWYJYP","beta","Quoted: description with a colon.","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fscripts\u002Ftests\u002Fharness\u002Ffixtures\u002Ftree\u002Fplugins\u002Fcore\u002Fskills\u002Fbeta\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7F941QWM4KQTX9KA6JQKF2G","alpha","Folded description that spans two lines and ends here.","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fscripts\u002Ftests\u002Fharness\u002Ffixtures\u002Ftree\u002Fplugins\u002Fcore\u002Fskills\u002Falpha\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7F93XXR4JY2S2KXD70JY4GM","worktree-merge","Rebases one subagent's worktree onto the base branch, optionally verifies the rebased tree, fast-forwards it into the worktree that has the base checked out (an epic integration tree or the main checkout), verifies every commit landed, and only then removes the worktree and its branch. Keeps the worktree intact on any conflict, dirty tree, or failed check. Use after a subagent returns work created with worktree-create.","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench\u002Fskills\u002Fworktree-merge\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M7F93TBQKKF3KM4VDVQ8PVHR","worktree-create","Creates one isolated git worktree for one subagent, at \u003Cworkbench>\u002F.claude\u002Fworktrees\u002F\u003Cname>, branched from main with the newest origin\u002Fmain and local main merged in. Refuses a name already in use so two agents can never share a tree. Use once per implementation or review subagent before dispatching it; pair with worktree-merge to land the work and clean up.","https:\u002F\u002Fgithub.com\u002Fszymonrychu\u002Fworkbench\u002Fblob\u002Fmain\u002Fplugins\u002Fworkbench\u002Fskills\u002Fworktree-create\u002FSKILL.md",[],[]]