diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 8298308..369bd7a 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-doc", - "version": "0.1.1", + "version": "0.1.2", "description": "JSC 文件化 skills(Claude Code / Codex / Antigravity / OpenCode / GitHub Copilot CLI):docker 會整理 docker-compose.yaml 的行內註解與標題日期;funcs 會為專案 functions 建立 .docs 草稿、補齊 XML 文件註解並重建 README 功能列表與使用範例;issues-analyze-to-file 會讀取 Gitea issue、彙整需求、拆成多階段 issue 並產生實作草稿與交付留言;issues-analyze 會把專案/議題/文件來源(議題連同留言與附件一起讀取)拆成小功能議題(母議題須待所有子議題關閉後才可關閉)、分析完成後把屬於專案看板的議題移到「待處理」欄位並依到期日實作;issues-sync 會讀取 Gitea 專案或議題、依工作目錄檔案勾稽並同步議題的 TODO 進度、標籤與專案看板進度欄位並產生進度留言(指定關閉專案/專案完成時改為批次把專案所有議題搬到「已完成」並關閉);notifications 會讀取 Gitea 通知、依通知類型分組並照 REVIEW.md 流程處理,沒有流程時詢問使用者並把缺少流程的類別附加到 REVIEW.md;worklog 會以 README 定義的 headless CLI 將每輪工作整理成六欄工作紀錄並追加到 Gitea wiki。所有 skills 以 SKILL.md 為共通標準;於 Claude Code 以 /jsc-doc: 前綴呼叫。", "skills": "./skills", "author": { diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 5d96a97..53025ed 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-doc", - "version": "0.1.1", + "version": "0.1.2", "description": "JSC 文件化 skills:docker 會整理 docker-compose.yaml 的行內註解與標題日期;funcs 會為專案 functions 建立 .docs 草稿、補齊 XML 文件註解並重建 README 功能列表與使用範例;issues-analyze-to-file 會讀取 Gitea issue、彙整需求、拆成多階段 issue 並產生實作草稿與交付留言;issues-analyze 會把專案/議題/文件來源(議題連同留言與附件一起讀取)拆成小功能議題(母議題須待所有子議題關閉後才可關閉)、分析完成後把屬於專案看板的議題移到「待處理」欄位並依到期日實作;issues-sync 會讀取 Gitea 專案或議題、依工作目錄檔案勾稽並同步議題的 TODO 進度、標籤與專案看板進度欄位並產生進度留言(指定關閉專案/專案完成時改為批次把專案所有議題搬到「已完成」並關閉);notifications 會讀取 Gitea 通知、依通知類型分組並照 REVIEW.md 流程處理,沒有流程時詢問使用者並把缺少流程的類別附加到 REVIEW.md;worklog 會以 README 定義的 headless CLI 將每輪工作整理成六欄工作紀錄並追加到 Gitea wiki(自動 Stop hook 僅相容 hook 環境支援)。所有 skills 以 SKILL.md 為共通標準。", "skills": "./skills" } diff --git a/hooks/hooks.json b/hooks/hooks.json index 2aba569..d94f7ed 100644 --- a/hooks/hooks.json +++ b/hooks/hooks.json @@ -1,5 +1,18 @@ { "hooks": { + "PreToolUse": [ + { + "matcher": "Read|Write|Edit|MultiEdit|NotebookEdit|Glob|Grep|LS|Bash", + "hooks": [ + { + "type": "command", + "command": "own='shared'; plug='jsc-shared'; rel='scripts/version-guard.mjs'; for base in \"$HOME/.claude/plugins/cache\" \"$HOME/.codex/plugins/cache\" \"$HOME/.copilot/installed-plugins\"; do for dir in \"$base/$own/$plug\" \"$base\"; do s=$(find \"$dir\" -path \"*/$plug/*/$rel\" -type f 2>/dev/null | sort -V | tail -n 1); if [ -n \"$s\" ]; then exec node --use-system-ca \"$s\"; fi; done; done; ts=$(TZ='Asia/Taipei' date +'%Y/%m/%d %H:%M:%S'); echo \"[$ts][版本檢查][ERR]: 找不到 jsc-shared 的 version-guard.mjs,fail-closed 阻擋。\" >&2; printf '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"deny\",\"permissionDecisionReason\":\"找不到 jsc-shared 的 version-guard.mjs,fail-closed 阻擋\"}}\\n'; exit 0", + "timeout": 15, + "statusMessage": "檢查 jsc-doc 版本…" + } + ] + } + ], "Stop": [ { "hooks": [ diff --git a/plugin.json b/plugin.json index 617b8d9..e9c7340 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-doc", - "version": "0.1.1", + "version": "0.1.2", "description": "JSC 文件化 skills:docker 會整理 docker-compose.yaml 的行內註解與標題日期;funcs 會為專案 functions 建立 .docs 草稿、補齊 XML 文件註解並重建 README 功能列表與使用範例;issues-analyze-to-file 會讀取 Gitea issue、彙整需求、拆成多階段 issue 並產生實作草稿與交付留言;issues-analyze 會把專案/議題/文件來源(議題連同留言與附件一起讀取)拆成小功能議題(母議題須待所有子議題關閉後才可關閉)、分析完成後把屬於專案看板的議題移到「待處理」欄位並依到期日實作;issues-sync 會讀取 Gitea 專案或議題、依工作目錄檔案勾稽並同步議題的 TODO 進度、標籤與專案看板進度欄位並產生進度留言(指定關閉專案/專案完成時改為批次把專案所有議題搬到「已完成」並關閉);notifications 會讀取 Gitea 通知、依通知類型分組並照 REVIEW.md 流程處理,沒有流程時詢問使用者並把缺少流程的類別附加到 REVIEW.md;worklog 會以 README 定義的 headless CLI 將每輪工作整理成六欄工作紀錄並追加到 Gitea wiki。所有 skills 以 SKILL.md 為共通標準;於 Antigravity 以 /jsc-doc: 前綴呼叫。", "skills": "./skills" } diff --git a/plugin.meta.json b/plugin.meta.json index c3b0acd..cde9f1b 100644 --- a/plugin.meta.json +++ b/plugin.meta.json @@ -1,7 +1,7 @@ { "name": "jsc-doc", "shortName": "doc", - "version": "0.1.1", + "version": "0.1.2", "descriptionCore": "JSC 文件化 skills:docker 會整理 docker-compose.yaml 的行內註解與標題日期;funcs 會為專案 functions 建立 .docs 草稿、補齊 XML 文件註解並重建 README 功能列表與使用範例;issues-analyze-to-file 會讀取 Gitea issue、彙整需求、拆成多階段 issue 並產生實作草稿與交付留言;issues-analyze 會把專案/議題/文件來源(議題連同留言與附件一起讀取)拆成小功能議題(母議題須待所有子議題關閉後才可關閉)、分析完成後把屬於專案看板的議題移到「待處理」欄位並依到期日實作;issues-sync 會讀取 Gitea 專案或議題、依工作目錄檔案勾稽並同步議題的 TODO 進度、標籤與專案看板進度欄位並產生進度留言(指定關閉專案/專案完成時改為批次把專案所有議題搬到「已完成」並關閉);notifications 會讀取 Gitea 通知、依通知類型分組並照 REVIEW.md 流程處理,沒有流程時詢問使用者並把缺少流程的類別附加到 REVIEW.md;worklog 會以 README 定義的 headless CLI 將每輪工作整理成六欄工作紀錄並追加到 Gitea wiki。所有 skills 以 SKILL.md 為共通標準。", "assistants": ["Claude Code", "Codex", "Antigravity", "OpenCode", "GitHub Copilot CLI"], "cliPrefix": "/jsc-doc:", diff --git a/skills/docker/SKILL.md b/skills/docker/SKILL.md index fc764f2..765bb6b 100644 --- a/skills/docker/SKILL.md +++ b/skills/docker/SKILL.md @@ -9,7 +9,7 @@ description: 整理並對齊 docker-compose.yaml 的行內註解與標題區塊 先載入 `/jsc-shared:spec-preflight` 並依其流程處理;載入不到即代表 shared plugin 未安裝, 依該 spec 詢問使用者是否安裝 `https://gitea.jsc.idv.tw/plugins/shared.git`,不安裝則中斷本 skill。 -本 skill 需要的規範:`spec-output`、`spec-execution`、`spec-time-log` +本 skill 需要的規範:`spec-version-guard`、`spec-output`、`spec-execution`、`spec-time-log` 整理並對齊 `docker-compose.yaml` 的行內註解與標題。請優先使用自動化腳本執行。 diff --git a/skills/funcs/SKILL.md b/skills/funcs/SKILL.md index b44a54c..e6d1f0c 100644 --- a/skills/funcs/SKILL.md +++ b/skills/funcs/SKILL.md @@ -11,7 +11,7 @@ description: 先判斷專案語言,再為每個 function 與每個指令檔( 先載入 `/jsc-shared:spec-preflight` 並依其流程處理;載入不到即代表 shared plugin 未安裝, 依該 spec 詢問使用者是否安裝 `https://gitea.jsc.idv.tw/plugins/shared.git`,不安裝則中斷本 skill。 -本 skill 需要的規範:`spec-output`、`spec-execution`、`spec-subagent`、`spec-time-log`、`spec-ask-user`、`spec-git-safety` +本 skill 需要的規範:`spec-version-guard`、`spec-output`、`spec-execution`、`spec-subagent`、`spec-time-log`、`spec-ask-user`、`spec-git-safety` ## 第 0 步:先判斷語言與生態 diff --git a/skills/issues-analyze-to-file/SKILL.md b/skills/issues-analyze-to-file/SKILL.md index 07ab023..e526cec 100644 --- a/skills/issues-analyze-to-file/SKILL.md +++ b/skills/issues-analyze-to-file/SKILL.md @@ -11,7 +11,7 @@ description: 讀取一或多筆 Gitea issue URL(優先用 tea,否則用 Gite 先載入 `/jsc-shared:spec-preflight` 並依其流程處理;載入不到即代表 shared plugin 未安裝, 依該 spec 詢問使用者是否安裝 `https://gitea.jsc.idv.tw/plugins/shared.git`,不安裝則中斷本 skill。 -本 skill 需要的規範:`spec-output`、`spec-execution`、`spec-gitea`、`spec-issue-read`、`spec-ask-user`、`spec-subagent` +本 skill 需要的規範:`spec-version-guard`、`spec-output`、`spec-execution`、`spec-gitea`、`spec-issue-read`、`spec-ask-user`、`spec-subagent` ## 前置:輸入與工具 diff --git a/skills/issues-analyze/SKILL.md b/skills/issues-analyze/SKILL.md index 20782ec..edffbbf 100644 --- a/skills/issues-analyze/SKILL.md +++ b/skills/issues-analyze/SKILL.md @@ -11,7 +11,7 @@ description: 讀取使用者選擇的一或多種來源(專案編號、議題 先載入 `/jsc-shared:spec-preflight` 並依其流程處理;載入不到即代表 shared plugin 未安裝, 依該 spec 詢問使用者是否安裝 `https://gitea.jsc.idv.tw/plugins/shared.git`,不安裝則中斷本 skill。 -本 skill 需要的規範:`spec-output`、`spec-execution`、`spec-gitea`、`spec-issue-read`、`spec-no-scratch-files`、`spec-subagent`、`spec-todo-list`、`spec-project-board` +本 skill 需要的規範:`spec-version-guard`、`spec-output`、`spec-execution`、`spec-gitea`、`spec-issue-read`、`spec-no-scratch-files`、`spec-subagent`、`spec-todo-list`、`spec-project-board` ## 絕對準則(不可違反) diff --git a/skills/issues-sync/SKILL.md b/skills/issues-sync/SKILL.md index 4d4def9..613870e 100644 --- a/skills/issues-sync/SKILL.md +++ b/skills/issues-sync/SKILL.md @@ -11,7 +11,7 @@ description: 讀取一個 Gitea 專案(project)或單一議題(優先用 t 先載入 `/jsc-shared:spec-preflight` 並依其流程處理;載入不到即代表 shared plugin 未安裝, 依該 spec 詢問使用者是否安裝 `https://gitea.jsc.idv.tw/plugins/shared.git`,不安裝則中斷本 skill。 -本 skill 需要的規範:`spec-output`、`spec-execution`、`spec-gitea`、`spec-project-board`、`spec-issue-read`、`spec-todo-list`、`spec-ask-user`、`spec-subagent`、`spec-no-scratch-files` +本 skill 需要的規範:`spec-version-guard`、`spec-output`、`spec-execution`、`spec-gitea`、`spec-project-board`、`spec-issue-read`、`spec-todo-list`、`spec-ask-user`、`spec-subagent`、`spec-no-scratch-files` ## 絕對準則(不可違反) diff --git a/skills/notifications/SKILL.md b/skills/notifications/SKILL.md index c4324ce..3646edf 100644 --- a/skills/notifications/SKILL.md +++ b/skills/notifications/SKILL.md @@ -7,7 +7,7 @@ description: 讀取 Gitea 通知,依通知類型分組後逐組執行;若沒 先載入 `/jsc-shared:spec-preflight` 並依其流程處理;載入不到即代表 shared plugin 未安裝, 依該 spec 詢問使用者是否安裝 `https://gitea.jsc.idv.tw/plugins/shared.git`,不安裝則中斷本 skill。 -本 skill 需要的規範:`spec-output`、`spec-execution`、`spec-gitea`、`spec-no-scratch-files` +本 skill 需要的規範:`spec-version-guard`、`spec-output`、`spec-execution`、`spec-gitea`、`spec-no-scratch-files` # 依 REVIEW.md 處理 Gitea 通知 diff --git a/skills/worklog/SKILL.md b/skills/worklog/SKILL.md index 3e0a591..431d5ac 100644 --- a/skills/worklog/SKILL.md +++ b/skills/worklog/SKILL.md @@ -54,7 +54,7 @@ WORKLOG_DIR="/../../scripts/worklog" 先載入 `/jsc-shared:spec-preflight` 並依其流程處理;載入不到即代表 shared plugin 未安裝, 依該 spec 詢問使用者是否安裝 `https://gitea.jsc.idv.tw/plugins/shared.git`,不安裝則中斷本 skill。 -本 skill 需要的規範:`spec-output`、`spec-execution`、`spec-gitea`、`spec-time-log`、`spec-no-scratch-files`、`spec-script-path`、`spec-skill-invocation`、`spec-model` +本 skill 需要的規範:`spec-version-guard`、`spec-output`、`spec-execution`、`spec-gitea`、`spec-time-log`、`spec-no-scratch-files`、`spec-script-path`、`spec-skill-invocation`、`spec-model` 本 skill 特有補充: