From 113df378083721162eda409e7ec2fee366cd6e46 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Tue, 1 Sep 2026 12:11:10 +0800 Subject: [PATCH] =?UTF-8?q?fix(comment-scope):=20=E9=A0=81=E9=9D=A2?= =?UTF-8?q?=E7=B7=A8=E8=99=9F=E5=81=B5=E6=B8=AC=E8=A3=9C=E9=BD=8A=E4=B8=89?= =?UTF-8?q?=E7=A8=AE=E7=BC=BA=E6=BC=8F=E7=9A=84=E5=9E=8B=E5=88=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit What: - wiki 頁面編號的偵測樣式補上 SKILLSET、TOOLING 與 MONITOR 三種型別。 - 三份 manifest 的版本一起提升。 Why: - 這支 hook 的職責是擋住把文件追蹤資訊寫進程式碼註解,wiki 頁面編號正是禁止項之一。 - 樣式只列到 REPORT,但實際的頁型清單早就有 SKILLSET 與 TOOLING,現在再加 MONITOR。清單漏掉的那幾種,頁面編號寫進註解就攔不到,等於這條規則對它們不存在。 - SKILLSET 與 TOOLING 的缺漏是既有落差,不是這次新增型別才產生的,一併補齊比較省事,也不會留下第二個要記得的地方。 How: - 型別的排列順序照 gitea.sh 的 resolve_wiki_repo 走,兩邊一致才看得出有沒有漏。 - 規則正文的唯一來源仍是 jsc-review 的註解範圍文件,這裡只補偵測樣式,不重述規則清單。 - 實測過三種型別各自都攔得下來,命中的說明都是「jsc wiki 頁面編號」,不是旁邊那條前綴加流水號的樣式誤撿。 Who: 技能助理落地帶出來的頁型別需求,四個存放庫同一批改。 --- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- hooks/comment-scope.sh | 2 +- plugin.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 24cdf6d..0b0e8e3 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-hooks", - "version": "0.3.5", + "version": "0.3.6", "description": "跨 CLI hooks:STE100 語言強制、工時計時、技能用量記錄、SDLC 模型鎖、版本前置檢查、註解範圍守門、繁中編碼守門、部署後強制重啟、寫入與提交閘門", "skills": "./skills", "author": { diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 90a90b0..f7beb60 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,7 +1,7 @@ { "hooks": "./hooks/codex-hooks.json", "name": "jsc-hooks", - "version": "0.3.5", + "version": "0.3.6", "description": "跨 CLI hooks:STE100 語言強制、工時計時、技能用量記錄、SDLC 模型鎖、版本前置檢查、註解範圍守門、繁中編碼守門、部署後強制重啟、寫入與提交閘門", "skills": "./skills", "jsc": { diff --git a/hooks/comment-scope.sh b/hooks/comment-scope.sh index b0bce81..b426d56 100755 --- a/hooks/comment-scope.sh +++ b/hooks/comment-scope.sh @@ -81,7 +81,7 @@ scan_file() { # $1=檔案路徑;命中就把報告印到 stdout 並回傳 1, hit '(^|[^[:alnum:]_/])#[0-9]+' '議題編號(#123)' hit '(^|[^[:alnum:]_])![0-9]+' 'PR、MR 編號(!45)' hit '[A-Z]{2,6}-[0-9]{1,6}' '工作包、故事、驗收、測試案例、變更單、議題編號(前綴加流水號)' - hit '(QUESTION|PLAN|ANALYZE|DELIVER|MAINTAIN|REPO|LOG|LEARN|ERROR|CHECK|REPORT)_([A-Z0-9]{8}|CONTENTS)' 'jsc wiki 頁面編號' + hit '(QUESTION|PLAN|ANALYZE|DELIVER|MAINTAIN|REPO|LOG|LEARN|ERROR|CHECK|REPORT|SKILLSET|TOOLING|MONITOR)_([A-Z0-9]{8}|CONTENTS)' 'jsc wiki 頁面編號' hit '(todo|TODO|待辦)[[:space:]]*#?[0-9]+' 'TDD 待辦編號' hit '([Ss]print|里程碑|[Mm]ilestone)[[:space:]]*[0-9]+' 'Sprint、里程碑編號' hit '(^|[^[:alnum:].])v[0-9]+\.[0-9]+|版本[[:space:]]*v?[0-9]+\.[0-9]+' '版本號' diff --git a/plugin.json b/plugin.json index d5b67ff..7c40fa4 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-hooks", - "version": "0.3.5", + "version": "0.3.6", "description": "跨 CLI hooks:STE100 語言強制、工時計時、技能用量記錄、SDLC 模型鎖、版本前置檢查、註解範圍守門、繁中編碼守門、部署後強制重啟、寫入與提交閘門", "skills": "./skills/", "jsc": {