refactor(worklog): worklog-target.sh 改為接收已算好的 hash
什麼: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 技能)。
This commit is contained in:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user