From df81eec8fb038dbb0affca9f4c6c584262765bf2 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Wed, 26 Aug 2026 19:00:12 +0800 Subject: [PATCH] =?UTF-8?q?feat(review):=20=E6=8A=80=E8=83=BD=E8=88=87?= =?UTF-8?q?=E8=AA=AA=E6=98=8E=E6=96=87=E4=BB=B6=E7=B4=8D=E5=85=A5=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=B7=A8=E8=99=9F=E5=A4=BE=E5=B8=B6=E5=AF=A9=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit What:skills/code-review/SKILL.md 的第 2 組 Obscurity 審查範圍納入 2.5, Notes 補上與 jsc-hooks 的 comment-scope.sh 分工說明;README.md 的技能說明 與參考檔表格同步。 Why:規則正文放進 references 還不夠,sub agent 讀的是 SKILL.md 的審查範圍表。 範圍表沒寫,第 2 組就不會查這一項。使用者讀的是 README.md,參考檔沒列出來就找不到。 How:審查範圍表的第 2 組直接列出六類命中樣式,並指向 references/comment-scope.md 取完整清單。Notes 寫明 comment-scope.sh 負責樣式判定得了的項目,第 2 組負責 樣式判定不了的專案代號與客戶名稱,兩邊不重複回報。README.md 表格新增一列。 Who:jsc-review 的 code-review 技能與存取庫說明文件。 --- README.md | 3 ++- skills/code-review/SKILL.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b89ea3d..44a199b 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Marketplace 統一為 `jsc`(https://gitea.jsc.idv.tw/plugins/meta.git),安 ### `code-review` -對 git diff 進行六組壞味道審查,每組一個 sub agent 平行執行;回報 `檔案:行號`、嚴重度、建議重構手法,修正與否由呼叫端決定。diff 是空的就直接回報「無發現」,不開任何 sub agent;六組全部回覆才進入彙整,沒東西可報的那組也要回「無發現」。安全性與 bug 審查交給 CLI 內建 review,不重複。 +對 git diff 進行六組壞味道審查,每組一個 sub agent 平行執行;回報 `檔案:行號`、嚴重度、建議重構手法,修正與否由呼叫端決定。第 2 組同時擋「文件編號夾帶」:註解只寫「為什麼這樣寫」,議題編號、wiki 頁編號、工作包編號、commit hash、`@` 提及、外部文件連結一律不進註解,清單看 `references/comment-scope.md`。diff 是空的就直接回報「無發現」,不開任何 sub agent;六組全部回覆才進入彙整,沒東西可報的那組也要回「無發現」。安全性與 bug 審查交給 CLI 內建 review,不重複。 @@ -35,6 +35,7 @@ Marketplace 統一為 `jsc`(https://gitea.jsc.idv.tw/plugins/meta.git),安 | 檔案 | 用途 | | --- | --- | | `references/smells.md` | 六組壞味道完整清單:定義、偵測訊號、建議重構手法、嚴重度分級;範例資料必須去識別化 | +| `references/comment-scope.md` | 程式碼註解內容界線:禁止寫進註解的文件編號清單、允許項目與白名單、命中時的改法 | ## 相關 domain diff --git a/skills/code-review/SKILL.md b/skills/code-review/SKILL.md index d344759..b8a472f 100644 --- a/skills/code-review/SKILL.md +++ b/skills/code-review/SKILL.md @@ -25,7 +25,7 @@ Review changed code against `references/smells.md` (from the book *Refactoring*) | Group | Scope | | --- | --- | | 1 Bloaters | smells.md group 1 | - | 2 Obscurity | smells.md group 2 | + | 2 Obscurity | smells.md group 2, including 2.5 document reference leak — comments carrying issue ids, wiki page ids, work package ids, commit hashes, @ mentions, or external document links; the full banned and allowed lists live in `references/comment-scope.md` | | 3 Couplers | smells.md group 3 | | 4 Dispensables & Others | smells.md group 4 | | 5 Comment contract | smells.md group 5 | @@ -39,5 +39,6 @@ Review changed code against `references/smells.md` (from the book *Refactoring*) ## Notes +- `jsc-hooks`' `comment-scope.sh` already matches the pattern-detectable items after every file write. Group 2 here covers what patterns cannot decide — project code names and customer names — plus the overall judgment; the two never report the same finding twice. - If group 5 examples are fetched from a database, they must be de-identified; never include personal data. - When there are no findings, report the literal 「無發現」 explicitly; never leave the report empty.