From 377121d1c53ca691c5fec198b2998fe0f7c37cca Mon Sep 17 00:00:00 2001 From: Jeffery Date: Tue, 28 Jul 2026 14:21:14 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat(hooks):=20=E8=A3=9C=E4=B8=8A=E8=88=87?= =?UTF-8?q?=20doc=EF=BC=8Fgeneric=20=E7=9B=B8=E5=90=8C=E7=9A=84=E5=90=88?= =?UTF-8?q?=E4=BD=B5=E8=B6=85=E9=9B=86=20hooks.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 三個 repo 的 plugin.json 名稱都是 jsc,Claude Code 以 plugin 名稱為鍵註冊 hooks,同名時只保留一份(實測 stop_hook_summary 的 hookCount 為 1),無法 預期哪一份會贏。因此每個 repo 都必須帶同一份合併超集,否則贏的那份缺少的 hook 會靜默失效。 code 本身沒有 hook 腳本,此檔僅作為超集載體:SessionStart 載入角色、Stop 執行 worklog 與角色記憶記錄;指令先試 CLAUDE_PLUGIN_ROOT,找不到再依 「擁有者 marketplace 優先 → 全 cache 後援」搜尋 ~/.claude 與 ~/.codex 快取。 Co-Authored-By: Claude Opus 5 (1M context) --- hooks/hooks.json | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 hooks/hooks.json diff --git a/hooks/hooks.json b/hooks/hooks.json new file mode 100644 index 0000000..6eab4fe --- /dev/null +++ b/hooks/hooks.json @@ -0,0 +1,31 @@ +{ + "hooks": { + "SessionStart": [ + { + "hooks": [ + { + "type": "command", + "command": "rel='scripts/role/role_load.sh'; own='generic'; root=\"${CLAUDE_PLUGIN_ROOT:-}\"; if [ -n \"$root\" ] && [ -f \"$root/$rel\" ]; then exec \"$root/$rel\"; fi; for base in \"$HOME/.claude/plugins/cache\" \"$HOME/.codex/plugins/cache\"; do for dir in \"$base/$own/jsc\" \"$base\"; do s=$(find \"$dir\" -path \"*/jsc/*/$rel\" -type f 2>/dev/null | sort -V | tail -n 1); if [ -n \"$s\" ]; then exec \"$s\"; fi; done; done; exit 0", + "timeout": 20 + } + ] + } + ], + "Stop": [ + { + "hooks": [ + { + "type": "command", + "command": "rel='scripts/worklog/worklog.sh'; own='doc'; root=\"${CLAUDE_PLUGIN_ROOT:-}\"; if [ -n \"$root\" ] && [ -f \"$root/$rel\" ]; then exec \"$root/$rel\"; fi; for base in \"$HOME/.claude/plugins/cache\" \"$HOME/.codex/plugins/cache\"; do for dir in \"$base/$own/jsc\" \"$base\"; do s=$(find \"$dir\" -path \"*/jsc/*/$rel\" -type f 2>/dev/null | sort -V | tail -n 1); if [ -n \"$s\" ]; then exec \"$s\"; fi; done; done; exit 0", + "timeout": 60 + }, + { + "type": "command", + "command": "rel='scripts/role/role_capture.sh'; own='generic'; root=\"${CLAUDE_PLUGIN_ROOT:-}\"; if [ -n \"$root\" ] && [ -f \"$root/$rel\" ]; then exec \"$root/$rel\"; fi; for base in \"$HOME/.claude/plugins/cache\" \"$HOME/.codex/plugins/cache\"; do for dir in \"$base/$own/jsc\" \"$base\"; do s=$(find \"$dir\" -path \"*/jsc/*/$rel\" -type f 2>/dev/null | sort -V | tail -n 1); if [ -n \"$s\" ]; then exec \"$s\"; fi; done; done; exit 0", + "timeout": 60 + } + ] + } + ] + } +} From 729e6e794a0da68b70030ce773b0e9144b6f00c7 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Tue, 28 Jul 2026 14:21:15 +0800 Subject: [PATCH 2/3] =?UTF-8?q?chore(plugin=20=E7=89=88=E6=9C=AC):=20?= =?UTF-8?q?=E4=B8=89=E5=AE=B6=20manifest=20=E5=8D=87=E7=89=88=200.0.11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hooks/hooks.json 為新增檔案,需升版才會重建版本化快取目錄並被載入。 Co-Authored-By: Claude Opus 5 (1M context) --- .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 cf12d12..00c3c0d 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc", - "version": "0.0.10", + "version": "0.0.11", "description": "JSC 程式碼工作流 plugin(Claude Code / Codex / Antigravity / OpenCode),提供 Gitea AI review findings 修復/PR 流程、Gitea 議題 TODO 彙整與逐項實作、C# / .NET NuGet 套件更新、Gitea 專案批次同步,以及 action / Dockerfile 標準化流程;於 Claude Code 以 /jsc: 前綴呼叫。", "skills": "./skills", "author": { diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 22769d2..153dd5d 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc", - "version": "0.0.10", + "version": "0.0.11", "description": "JSC 程式碼工作流 plugin,提供 Gitea AI review findings 修復/PR 流程、Gitea 議題 TODO 彙整與逐項實作、C# / .NET NuGet 套件更新、Gitea 專案批次同步,以及 action / Dockerfile 標準化流程。", "skills": "./skills" } diff --git a/plugin.json b/plugin.json index 7a3d389..5cab7ec 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc", - "version": "0.0.10", + "version": "0.0.11", "description": "JSC 程式碼工作流 plugin,提供 Gitea AI review findings 修復/PR 流程、Gitea 議題 TODO 彙整與逐項實作、C# / .NET NuGet 套件更新、Gitea 專案批次同步,以及 action / Dockerfile 標準化流程;於 Antigravity 以 /jsc: 前綴呼叫。", "skills": "./skills/" } From c288dd3c0947db69049c90415a6ce8dd8a9b3cac Mon Sep 17 00:00:00 2001 From: Jeffery Date: Tue, 28 Jul 2026 16:16:23 +0800 Subject: [PATCH 3/3] =?UTF-8?q?chore(plugin=20=E7=89=88=E6=9C=AC):=20?= =?UTF-8?q?=E4=B8=89=E5=AE=B6=20manifest=20=E5=8D=87=E7=89=88=200.1.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 00c3c0d..bbe8cff 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc", - "version": "0.0.11", + "version": "0.1.0", "description": "JSC 程式碼工作流 plugin(Claude Code / Codex / Antigravity / OpenCode),提供 Gitea AI review findings 修復/PR 流程、Gitea 議題 TODO 彙整與逐項實作、C# / .NET NuGet 套件更新、Gitea 專案批次同步,以及 action / Dockerfile 標準化流程;於 Claude Code 以 /jsc: 前綴呼叫。", "skills": "./skills", "author": { diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 153dd5d..e6bd076 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc", - "version": "0.0.11", + "version": "0.1.0", "description": "JSC 程式碼工作流 plugin,提供 Gitea AI review findings 修復/PR 流程、Gitea 議題 TODO 彙整與逐項實作、C# / .NET NuGet 套件更新、Gitea 專案批次同步,以及 action / Dockerfile 標準化流程。", "skills": "./skills" } diff --git a/plugin.json b/plugin.json index 5cab7ec..732a5ab 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc", - "version": "0.0.11", + "version": "0.1.0", "description": "JSC 程式碼工作流 plugin,提供 Gitea AI review findings 修復/PR 流程、Gitea 議題 TODO 彙整與逐項實作、C# / .NET NuGet 套件更新、Gitea 專案批次同步,以及 action / Dockerfile 標準化流程;於 Antigravity 以 /jsc: 前綴呼叫。", "skills": "./skills/" }