diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 0f9198a..e6f1c9c 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-hooks", - "version": "0.0.1", + "version": "0.0.2", "description": "跨 CLI hooks:STE100 語言強制、工時計時、技能用量記錄", "skills": "./skills", "author": { @@ -13,6 +13,5 @@ "hooks", "skills", "cross-tool" - ], - "hooks": "./hooks/hooks.json" + ] } diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 39f01b3..ab9fbcb 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-hooks", - "version": "0.0.1", + "version": "0.0.2", "description": "跨 CLI hooks:STE100 語言強制、工時計時、技能用量記錄", "skills": "./skills" } diff --git a/README.md b/README.md index 4866ea4..729910f 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,16 @@ Marketplace 統一為 `jsc`(https://gitea.jsc.idv.tw/plugins/jsc.git),安 Claude 由 `hooks/hooks.json` 自動接線;其他 CLI 用 `hooks-install` 技能接線或降級為規則檔。 +## 失敗回報範本 + +這兩個模板給外層的 hook 失敗回報流程使用,不改動現有 hook 行為。 +失敗時若要寫入 wiki,套用這兩個檔案即可。 + +| 範本 | 用途 | +| --- | --- | +| `templates/error-page.md` | 單筆 hook 異常頁 `ERROR_{HASH}`,記錄當次失敗的觸發條件、錯誤摘要與處理結果。 | +| `templates/error-contents.md` | 異常目錄 `ERROR_CONTENTS`,彙整所有異常頁,方便先看最新問題再往下追。 | + ## Skills 目錄 呼叫方式:Claude / Antigravity `/jsc-hooks:{name}`;Codex `${name}`;Copilot / Kiro 描述需求自動觸發。 diff --git a/plugin.json b/plugin.json index 8959b93..ecc0924 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-hooks", - "version": "0.0.1", + "version": "0.0.2", "description": "跨 CLI hooks:STE100 語言強制、工時計時、技能用量記錄", "skills": "./skills/" } diff --git a/templates/error-contents.md b/templates/error-contents.md new file mode 100644 index 0000000..4e15acc --- /dev/null +++ b/templates/error-contents.md @@ -0,0 +1,9 @@ +# 異常目錄 — ERROR_CONTENTS + +> 由 `jsc-hooks` 的失敗回報流程維護。新異常附加在文末,查問題時先看最新一筆。 + +## 異常清單 + +| 時間 | 頁名 | 存取庫名稱 | 觸發 hook | 退出碼 | 摘要 | +| --- | --- | --- | --- | --- | --- | +| {yyyy-MM-dd HH:mm:ss} | [[ERROR_{HASH}|{error title}]] | {owner}/{repo} | {hook_name} | {exit_code} | {error_summary} | diff --git a/templates/error-page.md b/templates/error-page.md new file mode 100644 index 0000000..f923f59 --- /dev/null +++ b/templates/error-page.md @@ -0,0 +1,32 @@ +# hook 失敗紀錄 — ERROR_{HASH} + +> 由 `jsc-hooks` 的失敗回報流程建立。這是一筆單次異常紀錄,不覆寫舊內容;同類失敗再發生時,請另開新頁。 + +- 頁名:`ERROR_{HASH}` +- 發生時間:{yyyy-MM-dd HH:mm:ss} +- 存取庫名稱:{owner}/{repo} +- CLI:{cli} +- Session:{session_id} +- 觸發 hook:{hook_name} +- 退出碼:{exit_code} +- 錯誤摘要:{error_summary} + +## 現象 + +- {現象描述} + +## 可能原因 + +- {可能原因} + +## 處理結果 + +- {處理方式} + +## 相關資訊 + +| 欄位 | 內容 | +| --- | --- | +| 訊息來源 | {stdin / env / command} | +| 相關輸出 | {stdout / stderr 摘要} | +| 關聯 ticket | [[TICKET_{yyyyMMdd}_{HHmmss}_{HASH}|{ticket 標題}]] |