Review inbox
Use when the user wants to discover and review PRs across the team awaiting their attention. NOT for a single specific PR (use review-pr). Supports three discovery modes: Label (GitHub label scan), Slack (channel-wide scan), Thread (specific Slack thread URL). Trigger: '掃 PR', 'review 大家的 PR', '批次 review', '有哪些 PR 要我看', Slack thread URL + review intent ('review <slack_url>', '幫我看這串'). Key: '我的 PR' → check-pr-approvals; '大家的 PR' / Slack URL → here; single PR URL → review-pr.From its SKILL.md
npx -y skills add HsuanYuLee/polaris --skill review-inboxAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 6 commands, including `annotate-review-candidates.py` and 5 more.
SKILL.md
5.9 KB, ~1.5k tokens by cl100k_base, as published. Nobody here has run it
Review Inbox — 批次 Review 待審 PR
找出 team 內需要自己 first review、re-approve、或 re-review 的 PR,批次執行 review, 並依來源回 Slack 通知。
Contract
此 skill 只處理多 PR discovery + batch review orchestration。單一 PR URL 轉 review-pr;
「我的 PR」approval 狀態轉 check-pr-approvals。
支援三個來源:
| Source | Use when |
|---|---|
| Slack | 預設;掃 PR channel 最近訊息中的 PR URLs |
| Thread | 使用者提供 Slack thread URL 並要求 review |
| Label | 使用者明確提到 need review label |
不得 review 自己的 PR。不得對 waiting_for_author PR 重複 review。
Review inbox 屬 reviewer-side read-only lane;它可以 advisory,但對 awaiting_re_review、
mergeable_ready、unsupported_mutation、changes_requested 的解釋必須沿用 shared PR state。
它不得把 batch review 結果升格成 author-side completion / release authority;所有
「可 merge / 已修完 / 可 release」語句只能轉述 shared state,不可自行推論。
Reference Loading
| Situation | Load |
|---|---|
| Any run | context-budget-contract.md, review-inbox-discovery-flow.md, shared-defaults.md, stale-approval-detection.md, workspace-config-reader.md |
| Batch review execution | review-inbox-batch-review-flow.md, review-inbox/dispatch-context-bundle.md |
| Slack notification | review-inbox-slack-reporting.md, slack-message-format.md, github-slack-user-mapping.md, workspace-language-policy.md |
Slack channel scan 可以派 read-only sub-agent。Per-PR review 不得使用 Claude Code
general-purpose sub-agent;只有 runtime 提供 constrained code-reviewer adapter 時才可平行
dispatch。否則依 build-review-runtime-plan.py 產生的 main_session_sequential plan,一次執行
一個 review packet,完成後只把 Completion Envelope summary 留在主 context。Batch review
dispatch 由 main session 讀取 dispatch-context-bundle.md 一次,再把濃縮後的 review flow inline
注入每個 review packet;不得要求執行者重讀完整 review skill / reference stack。
Flow
- 讀 workspace config 與 defaults,取得 GitHub org、PR channel、approval threshold、 batch size、concurrency、confirm setting。
- 解析 mode:Thread 優先,其次 explicit Label,其餘走 Slack。
- 取得 current GitHub username,作為 exclude author 與 review-status 判定依據。
- 依 discovery reference 產生 candidates JSON;scan snapshot 超過 60 秒不可沿用。
Slack channel scan 使用 MCP 時指定 concise output;fallback CLI 的
--oldest可接受 Slack timestamp 或 ISO date/datetime。 - 將 candidates JSON 經
annotate-review-candidates.pyenrich,補上 sister PR cluster metadata 與model_tiersemantic class。Slack mapping 若含root_ticket_key,cluster 必須優先使用 root ticket;若沒有 umbrella ticket 但同一 Slack root message 有可辨識 topic,使用root_topic_key;最後才 fallback 到每張 PR 自己的 ticket。 - 若 candidates 為空,回報目前沒有需要 review 的 PR 並停止。
- 顯示排序後清單;若 config 要求 confirm,等待使用者選擇。
- 先用
build-review-prompt.sh產生 review packets + manifest,再用build-review-runtime-plan.py產生 runtime plan。Plan 必須禁止 general-purpose sub-agent; 若無 constrained code-reviewer adapter,主 session 依 sequential plan 執行。 - 依 batch size / runtime plan 執行 per-PR review packets;prompt 必須使用
deterministic handbook resolver 列出已存在的 project handbook paths,空清單時明確標示
no project handbook。Prompt 必須要求執行者先讀 changed-file names,再依 diff size
sampling;existing inline comments 只能以 metadata-only dedup,不把完整 comment body 放進
context。Cluster lead 先跑完整 review;cluster sibling 使用 sibling-diff mode 與
small_fastmodel class hint,不確定時標記needs_standard_review。 - 收斂結果,依來源模式發 Slack summary 或 thread replies。
- 跑
measure-review-inbox-session.sh產生 telemetry JSON,並用polaris-learnings.sh add --type telemetry --tag review-inbox寫入metadata.review_inbox_run。若無法取得完整 transcript,仍需用 line-count proxy 記錄 candidate count、reviewed count、runtime plan kind 與 artifact volume。 - 在對話中回報每個 PR 的 review result、approve status 與 telemetry run_id。
Write And Notification Rules
- Review body 與 inline comments 由
review-pr流程負責。 - Slack message 送出前必須通過
workspace-language-policy.mdlanguage gate。 - Slack mode 不發 channel-wide summary;只回覆原始 PR threads。
- Label mode 發一則 channel summary。
- Thread mode 回覆指定 thread。
- Thread replies 不設
reply_broadcast: true。
Completion
輸出 reviewed count、APPROVE / REQUEST_CHANGES / COMMENT counts、Slack notification count、 任何 blocked PR 的原因,以及 telemetry run_id。Telemetry 可用:
POLARIS_WORKSPACE_ROOT={workspace_root} .claude/skills/references/scripts/polaris-learnings.sh query --type telemetry --tag review-inbox
查到 metadata.review_inbox_run.main_session_input_tokens。
Post-Task Reflection (required)
Execute post-task-reflection-checkpoint.md before reporting completion.
What ships with it: 40 files
220.9 KB alongside SKILL.md, 29 of them executable
references/
- context-budget-contract.md5.4 KB
- github-slack-user-mapping.md1.8 KB
- review-inbox-batch-review-flow.md7.9 KB
- review-inbox-discovery-flow.md12.9 KB
- review-inbox-slack-reporting.md2.3 KB
- review-pr-analysis-flow.md2.7 KB
- review-pr-entry-fetch-flow.md2.1 KB
- review-pr-submit-flow.md3.0 KB
- slack-message-format.md1.6 KB
- stale-approval-detection.md2.3 KB
scripts/
- annotate-review-candidates.pyruns8.3 KB
- annotate-review-candidates-selftest.shruns5.4 KB
- approval-staleness.shruns2.1 KB
- build-review-prompt-selftest.shruns5.2 KB
- build-review-prompt.shruns11.5 KB
- build-review-runtime-plan.pyruns12.1 KB
- build-review-runtime-plan-selftest.shruns5.1 KB
- check-my-review-status-selftest.shruns14.9 KB
- check-my-review-status.shruns10.7 KB
- extract-pr-urls.pyruns13.0 KB
- extract-pr-urls-selftest.shruns11.6 KB
- fetch-prs-by-url.shruns3.4 KB
- inspect-pr-section-selftest.shruns1.0 KB
- inspect-pr-section.shruns1.8 KB
- lib/main-checkout.shruns1.6 KB
- lib/validate_language_policy_1.pyruns10.0 KB
- lib/workspace-config-root.shruns2.2 KB
- measure-review-inbox-session-selftest.shruns2.1 KB
- measure-review-inbox-session.shruns4.4 KB
- polaris-embed.pyruns7.5 KB
- polaris-embed-setup.shruns917 B
- polaris-learnings.shruns9.8 KB
- resolve-handbook.shruns5.5 KB
- review-inbox-discovery-probe.shruns8.2 KB
- scan-need-review-prs.shruns2.0 KB
- slack-webapi-selftest.shruns758 B
- slack-webapi.shruns4.8 KB
- submit-pr-review.shruns3.1 KB
- validate-language-policy.shruns8.1 KB