code-reviewer
v3.0.0
多代理 PR 審查,加上各 repo 自己的審查政策
外掛在 PR 上平行執行五個審查員。五個審查員負責正確性、測試、安全、維運與簡潔度。簡潔度審查採用 ponytail 與 /simplify 規則。如果 repo 有本地審查政策,第六個審查員會引用它。政策記錄該 repo 自己的警訊、陷阱與熱點。refresh-policy 從已合併的 git 與 PR 歷史學習這份政策。報告之後,外掛會建立一個本地審查頁面,讓你一步一步閱讀。頁面先用架構圖呈現 PR 前後的變化,再逐一列出發現,並用真實程式碼當證據。你為每個發現選擇處理方式,再把回覆貼回對話。你核准後,Claude 在 GitHub 發布審查。
安裝
claude plugin install code-reviewer@21-breakincode 指令
- /code-reviewer:review-pr Multi-agent PR review with an interactive review page: five common reviewers plus an optional repo-specific policy layer
設定
| 變數 | 預設值 | 說明 |
|---|---|---|
| CODE_REVIEWER_POLICY_DIR | — | Repo review-policy dir. A relative value resolves against the main clone root. Unset means the policy layer is off. |
更新紀錄
3.0.0 2026-11-11
- feat Breaking: the review page is a local file built with answer-me-with-html.
lib/am.mjs(v0.5.11, MIT) is bundled with its license inlib/am.LICENSE./code-reviewer:review-prnow needs Node.js 20 or newer. - feat the page reads from top to bottom: an overview, an architecture diagram before the PR and after it, one panel per finding, then the verdict.
- feat the page builder agent draws the before and after diagrams as
classorflowdiagrams. The after diagram marks the changed parts. Each diagram lists the refs that it is drawn from, and the builder checks each ref against git. - feat new ref suffix
@basereads the merge base, the commit where the PR branch starts. - feat Breaking: you answer the questions on the page, press Reply, and paste the reply into the chat. The page is no longer published, has no db, and is not deleted.
- refactor
lib/build-review-page.pywrites an am draft from git evidence and renders it.templates/review-page.htmlis removed. - test the page builder test renders the fixture with the real am CLI.
2.1.0 2026-10-20
- feat
/code-reviewer:review-prpublishes an interactive review page after the report. For each finding, you choose a call, a fix, and an optional note. The page saves your choices in its own db. - feat you tell Claude that you are done. Claude then reads your choices, drafts the GitHub review, and posts it with
ghafter your approval. Then Claude deletes the page once, and Claude Code shows you a delete prompt. If the delete is refused, Claude gives you the page URL and the manual steps. - feat every run is a new review with a new page and empty choices. The command never reuses an older page or its db.
- feat new
review-page-builderagent,lib/build-review-page.py, andtemplates/review-page.html. The evidence on the page comes from git at the PR head: code lines, diff hunks, andgit grepoutput. Nothing is typed by hand. - feat new
lib/check-base-drift.shtest-merges the PR head into the latest base. Conflicts become a finding. The correctness reviewer searches the test merge for new base code that still uses an API that the PR removes. - feat each finding carries
Ref:evidence refs. The orchestrator writes them tofindings.jsonwith stable ids, and it also writespr.json,drift.json, andreport.md. - feat a gh account fallback. If the active account cannot see the repo, each
ghcall getsGH_TOKENfor an account that can. The plugin never runsgh auth switch. - test tests for the base drift check and the page builder.
2.0.0 2026-09-27
- feat Breaking: five owned reviewer agents (correctness, test, security, ops, simplicity) replace the pr-review-toolkit agents and the orchestrator's inline perspectives. The pr-review-toolkit dependency is removed.
- feat Breaking: the repo policy is found only through
CODE_REVIEWER_POLICY_DIR. The env varsCODE_REVIEWER_PRINCIPLE_DIR,CODE_REVIEWER_CONFIG_FILE, andCODE_REVIEWER_CACHE_FILEare removed. The plugin no longer reads the files in~/.claude/code-reviewer/. - feat Breaking: the skill
refresh-principlesis renamed torefresh-policy. It keeps only repo-specific concepts. - feat the orchestrator passes the diff by file path, and reviewers read code at the PR head SHA.
- feat policy severity is set by rule. The report adds Scrutiny, agent counts, and policy coverage lines.
- refactor "principle" is renamed to "policy" in libs, agents, skill, and tests.
- chore remove the one-time
migrate-to-okf.pyscript and its test.
1.1.1 2026-09-19
- fix rewrite prose across plugin files to clear the simple-english linter. No content or meaning changed, only sentence shape.
1.1.0 2026-08-09
- feat QA fixture representativeness check. Flags synthetic test inputs asserting on diversity-sensitive behavior.
- feat QA verdict → blast radius gate. Flags structural decisions lacking production-shaped test evidence.
- feat mine-git-signals revert chain detection (misdiagnosis signal)
- feat refresh-principles misdiagnosis sequence mining (Pitfall capture)
1.0.0 2026-08-07
- feat migrate to OKF v0.2 concept format
- feat reader walks OKF concept bundle, skips deprecated, flags stale
- feat principle-reviewer cites OKF concept paths + trust/stale weighting
- feat deterministic old→OKF bundle migration transform
- docs refresh-principles writes OKF concepts, stamps verified on approval
- fix seed OKF skeleton on bootstrap. Emit concept path in reader header.
- fix compute caused_change from comment outdated-ness
- fix exclude generated/vendored files from churn hotspots
- fix quote YAML-hostile concept titles, capture wrapped What/Why lines
- test OKF concept conformance check replaces evidence-line check
0.3.0 2026-08-07
- feat add learn-state watermark lib + test helper
- feat add git-signal miner (reverts/hotfixes/churn)
- feat add PR-signal miner with comment→change correlation
- feat add diff-coverage guard (coverage + finding validation)
- feat add refresh-principles producer skill + format reference
- feat wire deterministic coverage guards into orchestrator
- fix handle omitted counts in learn-state write
0.2.0 2026-06-03
- feat configurable principle-directory roots
0.1.0 2026-06-01
- feat initial release. Principle-aware PR review plugin.