From d8769ec76a5e143e4967607b4568856feb16a08a Mon Sep 17 00:00:00 2001 From: Jeffery Date: Mon, 24 Aug 2026 14:47:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(marketplace):=20=E5=90=8C=E6=AD=A5=20ma?= =?UTF-8?q?rketplace.json=20=E8=87=B3=20plugins/jsc=20=E6=A8=99=E6=BA=96?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 什麼:為 .agents/plugins/marketplace.json 補上 description、owner 欄位,並為所有 plugin 項目補上各自的 description;同時修正 .claude-plugin/marketplace.json 中 jsc-meta 描述的標點(斜線改為頓號)。 為什麼:兩份 marketplace.json 與 plugins/jsc 的標準格式不同步,缺少的欄位會讓其他 CLI(antigravity 等)讀到的 marketplace metadata 不完整。 如何:對照 plugins/jsc 的 canonical marketplace.json,逐一補齊頂層 description、owner 物件,以及每個 plugin 的 description 欄位;統一標點用字。 誰:jsc-meta:skill-check 例行合規稽核。 --- .agents/plugins/marketplace.json | 34 ++++++++++++++++++++++---------- .claude-plugin/marketplace.json | 2 +- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/.agents/plugins/marketplace.json b/.agents/plugins/marketplace.json index 12df680..a9b4e66 100644 --- a/.agents/plugins/marketplace.json +++ b/.agents/plugins/marketplace.json @@ -1,75 +1,89 @@ { "name": "jsc", + "description": "jsc 跨 AI 助理技能組的統一 marketplace(claude / codex / copilot / antigravity / kiro)。", + "owner": { + "name": "JSC" + }, "plugins": [ { "name": "jsc-ask", "source": { "source": "url", "url": "https://gitea.jsc.idv.tw/plugins/ask.git" - } + }, + "description": "決策樹問詢與問詢紀錄(QUESTION_* wiki 頁)" }, { "name": "jsc-cli", "source": { "source": "url", "url": "https://gitea.jsc.idv.tw/plugins/cli.git" - } + }, + "description": "CLI 偵測、模型能力標籤與技能庫批次部署" }, { "name": "jsc-git", "source": { "source": "url", "url": "https://gitea.jsc.idv.tw/plugins/git.git" - } + }, + "description": "Commit 分組認可與 Push Request 建立" }, { "name": "jsc-gitea", "source": { "source": "url", "url": "https://gitea.jsc.idv.tw/plugins/gitea.git" - } + }, + "description": "Gitea API 工具、Wiki 讀寫與存取庫批次同步" }, { "name": "jsc-hooks", "source": { "source": "url", "url": "https://gitea.jsc.idv.tw/plugins/hooks.git" - } + }, + "description": "跨 CLI hooks:STE100 語言強制、工時計時、技能用量記錄" }, { "name": "jsc-log", "source": { "source": "url", "url": "https://gitea.jsc.idv.tw/plugins/log.git" - } + }, + "description": "工作日誌(LOG_* wiki 頁)與技能使用統計" }, { "name": "jsc-meta", "source": { "source": "url", "url": "https://gitea.jsc.idv.tw/plugins/meta.git" - } + }, + "description": "技能組自我管理:新建、更新、刪除技能與技能準則" }, { "name": "jsc-pkg", "source": { "source": "url", "url": "https://gitea.jsc.idv.tw/plugins/pkg.git" - } + }, + "description": "套件批次更新(nodejs/python/dotnet),失敗還原" }, { "name": "jsc-review", "source": { "source": "url", "url": "https://gitea.jsc.idv.tw/plugins/review.git" - } + }, + "description": "程式碼審查:Refactoring 壞味道六組 + 註解規範 + 淺模組" }, { "name": "jsc-sdlc", "source": { "source": "url", "url": "https://gitea.jsc.idv.tw/plugins/sdlc.git" - } + }, + "description": "開發生命週期:規劃/分析/實作/維護(wiki 追蹤)" } ] } diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 28bb223..a9b4e66 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -59,7 +59,7 @@ "source": "url", "url": "https://gitea.jsc.idv.tw/plugins/meta.git" }, - "description": "技能組自我管理:新建/更新/刪除技能與技能準則" + "description": "技能組自我管理:新建、更新、刪除技能與技能準則" }, { "name": "jsc-pkg", -- 2.53.0 From b1a04182110a929e08e11ec7a64d0acd9aaeb2c5 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Mon, 24 Aug 2026 14:47:26 +0800 Subject: [PATCH 2/2] =?UTF-8?q?refactor(worklog):=20worklog-target.sh=20?= =?UTF-8?q?=E6=94=B9=E7=82=BA=E6=8E=A5=E6=94=B6=E5=B7=B2=E7=AE=97=E5=A5=BD?= =?UTF-8?q?=E7=9A=84=20hash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 什麼:tools/worklog-target.sh 不再自行重算 SHA-1,改為直接接收呼叫端算好的 hash 參數;skills/worklog/SKILL.md、README.md 同步更新呼叫方式與工具說明;plugin.json、.claude-plugin/plugin.json、.codex-plugin/plugin.json 版本號由 0.0.3 升至 0.0.4。 為什麼:原本 worklog-target.sh 重複實作了共享的 SHA-1 wiki-hash 演算法,與 jsc-gitea/tools/hash-id 的邏輯重複,違反單一事實來源原則,也和 learn 技能已採用的正確呼叫模式不一致。 如何:移除腳本內建的 sha1sum/shasum 計算與 hash 前綴修正邏輯,改為直接使用傳入的 hash 參數組出 LOG_{HASH}、LOG_CONTENTS;SKILL.md 改為先呼叫 jsc-gitea/tools/hash-id 算出 HASH 再傳給 worklog-target.sh;輸出行為與結果不變。 誰:jsc-meta:skill-check 例行合規稽核(worklog 技能)。 --- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- README.md | 2 +- plugin.json | 2 +- skills/worklog/SKILL.md | 3 ++- tools/worklog-target.sh | 27 ++++++--------------------- 6 files changed, 12 insertions(+), 26 deletions(-) diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index b4c54fe..51a0132 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-log", - "version": "0.0.3", + "version": "0.0.4", "description": "工作日誌(LOG_{HASH} wiki 頁)、技能使用統計與教訓紀錄(LEARN_{HASH} wiki 頁)", "skills": "./skills", "author": { diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index a5ed236..c3fdd64 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-log", - "version": "0.0.3", + "version": "0.0.4", "description": "工作日誌(LOG_{HASH} wiki 頁)、技能使用統計與教訓紀錄(LEARN_{HASH} wiki 頁)", "skills": "./skills" } diff --git a/README.md b/README.md index 10e11a6..c9e1151 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Marketplace 統一為 `jsc`(https://gitea.jsc.idv.tw/plugins/jsc.git),安 | 工具 | 用途 | | --- | --- | | `tools/usage-stats.sh` | 聚合 `$JSC_HOME/usage/*.jsonl`:`skills` 列技能使用次數、`chains` 列呼叫鏈次數(皆降冪),`--cli ` 過濾 | -| `tools/worklog-target.sh` | 依 `{owner}/{repo}` 產生 `LOG_{HASH}`、`LOG_CONTENTS` 與符合共享規則的 `HASH` | +| `tools/worklog-target.sh` | 接收已由 `jsc-gitea/tools/hash-id` 算好的 `HASH`,組出 `LOG_{HASH}`、`LOG_CONTENTS`(本身不再計算 SHA-1) | ## Skills 目錄 diff --git a/plugin.json b/plugin.json index e46824f..449fce1 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-log", - "version": "0.0.3", + "version": "0.0.4", "description": "工作日誌(LOG_{HASH} wiki 頁)、技能使用統計與教訓紀錄(LEARN_{HASH} wiki 頁)", "skills": "./skills/" } diff --git a/skills/worklog/SKILL.md b/skills/worklog/SKILL.md index d52c831..b08c2c7 100644 --- a/skills/worklog/SKILL.md +++ b/skills/worklog/SKILL.md @@ -35,7 +35,8 @@ After work completes, collect the ten items below and append a `templates/log-en ## Target page and work week - Page name: `LOG_{HASH}`. -- Compute the target page by running `tools/worklog-target.sh "{owner}/{repo}" all`. Use `PAGE` for `LOG_{HASH}` and `CONTENTS` for `LOG_CONTENTS`. +- Compute `{HASH}` from `{owner}/{repo}` with `jsc-gitea/tools/hash-id` (shared wiki hash rule: first 8 uppercase SHA-1 hex chars; `H` plus the first 7 chars when the raw hash starts with `0-9`, `A`, `B`, or `C`). +- Compute the target page by running `tools/worklog-target.sh "{HASH}" all`. Use `PAGE` for `LOG_{HASH}` and `CONTENTS` for `LOG_CONTENTS`. - The work-week Friday still drives the page content and the row dates. - Read the page via `jsc-gitea:wiki`. If it does not exist, create it with the structure described in `templates/log-contents.md`; otherwise APPEND the new entry at the end. - Update `LOG_CONTENTS` in the same pass (apply `templates/log-contents.md`; add the row if missing). diff --git a/tools/worklog-target.sh b/tools/worklog-target.sh index 0e0028b..f8b102f 100755 --- a/tools/worklog-target.sh +++ b/tools/worklog-target.sh @@ -1,47 +1,32 @@ #!/usr/bin/env sh -# worklog-target.sh: 產生 worklog wiki 目標頁。 +# worklog-target.sh: 由已算好的 hash 組出 worklog wiki 目標頁名稱。 +# hash 一律由 jsc-gitea/tools/hash-id 算出後傳入,本腳本不再自行計算 SHA-1。 # 用法: -# worklog-target.sh [hash|page|contents|all] +# worklog-target.sh [page|contents|all] set -eu usage() { - echo 'usage: worklog-target.sh [hash|page|contents|all]' >&2 + echo 'usage: worklog-target.sh [page|contents|all]' >&2 exit 2 } [ "$#" -ge 1 ] || usage [ "$#" -le 2 ] || usage -repo=$1 +hash=$1 field=${2:-page} -if [ -z "$repo" ]; then +if [ -z "$hash" ]; then usage fi -if command -v sha1sum >/dev/null 2>&1; then - raw=$(printf '%s' "$repo" | sha1sum | awk '{print $1}') -elif command -v shasum >/dev/null 2>&1; then - raw=$(printf '%s' "$repo" | shasum -a 1 | awk '{print $1}') -else - echo 'no SHA-1 helper found' >&2 - exit 1 -fi - -hash=$(printf '%s' "$raw" | cut -c1-8 | tr a-f A-F) -case "$hash" in - [0-9ABC]*) hash="H$(printf '%s' "$hash" | cut -c1-7)" ;; -esac - page="LOG_${hash}" contents='LOG_CONTENTS' case "$field" in - hash) printf '%s\n' "$hash" ;; page) printf '%s\n' "$page" ;; contents) printf '%s\n' "$contents" ;; all) - printf 'HASH=%s\n' "$hash" printf 'PAGE=%s\n' "$page" printf 'CONTENTS=%s\n' "$contents" ;; -- 2.53.0