From 1d8635976791d9e0c0f16aaafed248f230cb2548 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Wed, 2 Sep 2026 14:57:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(=E6=8E=A5=E7=B7=9A=E7=9B=A4=E9=BB=9E):?= =?UTF-8?q?=20status=20=E5=88=97=E8=88=89=E6=AF=8F=E4=B8=80=E5=80=8B?= =?UTF-8?q?=E6=8E=A5=E7=B7=9A=E9=BB=9E=EF=BC=8C=E4=B8=8D=E5=86=8D=E5=8F=AA?= =?UTF-8?q?=E6=8C=91=E5=9B=9B=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit README 早就寫明「每個接線點印一行 item」,程式卻只列 comment-scope、 lang-guard、restart-gate 與 write-guard 三種模式,共六項。sdlc-gate 的三個 接線點、session-timer 的兩個、skill-usage 與 version-guard 都沒列出來。 漏列的後果不是少幾行字。reason 那行寫的是「全部九支 hook」,拿這份輸出 驗收接線的人會把沒列到的當成沒接——模型能力鎖就是這樣被誤判成沒接線的。 體檢技能也讀這支的輸出,同樣看不到那四支。 一支腳本接在多個接線點時,每個點各自列一項。只驗腳本名的話,「腳本在、 某個接線點沒接」會被算成完整接線,那正是最難查的一種。 --- tools/wire-cli.sh | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/tools/wire-cli.sh b/tools/wire-cli.sh index a3a54b9..f9c818d 100755 --- a/tools/wire-cli.sh +++ b/tools/wire-cli.sh @@ -2302,22 +2302,30 @@ if [ "$action" = status ]; then if [ -n "$claude_root" ] && [ -f "$claude_hooks" ]; then st_item hooks.json "$claude_hooks" present else st_item hooks.json "${claude_hooks:-$HOME/.claude/plugins/installed_plugins.json}" missing; fi # 九支 hook 全靠這一個檔宣告,只看檔案在不在會漏掉「檔在、某支沒接進去」。 - # 後來才加進來的 comment-scope.sh、lang-guard.sh、restart-gate.sh 與 write-guard.sh - # 是最可能漏的四支,所以各列一項。 - if [ -f "$claude_hooks" ] && grep -qF 'comment-scope.sh' "$claude_hooks" 2>/dev/null - then st_item comment-scope "$claude_hooks" present - else st_item comment-scope "$claude_hooks" missing; fi - if [ -f "$claude_hooks" ] && grep -qF 'lang-guard.sh' "$claude_hooks" 2>/dev/null - then st_item lang-guard "$claude_hooks" present - else st_item lang-guard "$claude_hooks" missing; fi - if [ -f "$claude_hooks" ] && grep -qF 'restart-gate.sh' "$claude_hooks" 2>/dev/null - then st_item restart-gate "$claude_hooks" present - else st_item restart-gate "$claude_hooks" missing; fi - # write-guard.sh 接在兩個 matcher 上,三種模式各自是一件事,只驗腳本名會漏掉少接的那一個 - for _m in stage review commit; do - if [ -f "$claude_hooks" ] && grep -qF "write-guard.sh\\\" $_m" "$claude_hooks" 2>/dev/null - then st_item "write-guard-$_m" "$claude_hooks" present - else st_item "write-guard-$_m" "$claude_hooks" missing; fi + # 每一支都列一項,一支都不省。reason 那行講的是「全部九支」,列舉卻只挑幾支的話, + # 拿這份輸出驗收接線的人會把沒列到的當成沒接——模型能力鎖就是這樣被誤判成沒接線的。 + for _h in comment-scope lang-guard restart-gate skill-usage version-guard; do + if [ -f "$claude_hooks" ] && grep -qF "$_h.sh" "$claude_hooks" 2>/dev/null + then st_item "$_h" "$claude_hooks" present + else st_item "$_h" "$claude_hooks" missing; fi + done + # 一支腳本接在多個接線點時,每個點各自是一件事,只驗腳本名會漏掉少接的那一個。 + # 三支這種腳本的接線點對照(左邊是項目名,右邊是 hooks.json 裡的子命令): + # write-guard stage、review、commit + # sdlc-gate check(階段模型鎖)、wp-check prompt、wp-check skill(工作包歸屬) + # session-timer start、mark + for _p in "write-guard-stage write-guard.sh\\\" stage" \ + "write-guard-review write-guard.sh\\\" review" \ + "write-guard-commit write-guard.sh\\\" commit" \ + "sdlc-gate-check sdlc-gate.sh\\\" check" \ + "sdlc-gate-wp-prompt sdlc-gate.sh\\\" wp-check prompt" \ + "sdlc-gate-wp-skill sdlc-gate.sh\\\" wp-check skill" \ + "session-timer-start session-timer.sh\\\" start" \ + "session-timer-mark session-timer.sh\\\" mark"; do + _name=${_p%% *}; _pat=${_p#* } + if [ -f "$claude_hooks" ] && grep -qF "$_pat" "$claude_hooks" 2>/dev/null + then st_item "$_name" "$claude_hooks" present + else st_item "$_name" "$claude_hooks" missing; fi done ;; codex) From c0ce4c5c3c30ca72ace335827725279b97b618e7 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Wed, 2 Sep 2026 14:57:04 +0800 Subject: [PATCH 2/2] =?UTF-8?q?chore(plugin=20=E7=89=88=E6=9C=AC):=20?= =?UTF-8?q?=E4=B8=89=E4=BB=BD=20manifest=20=E5=8D=87=E7=89=88=E8=87=B3=200?= =?UTF-8?q?.4.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- plugin.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 2490afb..a906dd9 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-hooks", - "version": "0.3.9", + "version": "0.4.0", "description": "跨 CLI hooks:STE100 語言強制、工時計時、技能用量記錄、SDLC 模型鎖、版本前置檢查、註解範圍守門、繁中編碼守門、部署後強制重啟、寫入與提交閘門", "skills": "./skills", "author": { diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 76aec92..3d87763 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.9", + "version": "0.4.0", "description": "跨 CLI hooks:STE100 語言強制、工時計時、技能用量記錄、SDLC 模型鎖、版本前置檢查、註解範圍守門、繁中編碼守門、部署後強制重啟、寫入與提交閘門", "skills": "./skills", "jsc": { diff --git a/plugin.json b/plugin.json index 2b486eb..f2ba5b3 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-hooks", - "version": "0.3.9", + "version": "0.4.0", "description": "跨 CLI hooks:STE100 語言強制、工時計時、技能用量記錄、SDLC 模型鎖、版本前置檢查、註解範圍守門、繁中編碼守門、部署後強制重啟、寫入與提交閘門", "skills": "./skills/", "jsc": {