From f40b374342c132aff71a19eaac6bcd0fc476adce Mon Sep 17 00:00:00 2001 From: Jeffery Date: Mon, 24 Aug 2026 14:46:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(ask):=20=E4=BF=AE=E6=AD=A3=20skill-check=20?= =?UTF-8?q?=E4=B8=8D=E5=90=88=E8=A6=8F=E9=A0=85=E4=B8=A6=E5=8D=87=E7=89=88?= =?UTF-8?q?=E8=87=B3=200.0.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit What:修剪 SKILL.md 的 frontmatter description 至 5 句內並補上明確的排除 觸發語句;將 SKILL.md 與兩份範本中重述的 wiki hash 演算法說明,改為指向 canonical 的 `jsc-gitea/tools/hash-id` 工具;同步更新 README.md 的 Skills 目錄描述;三份 manifest 版本號自 0.0.2 升至 0.0.3。 Why:jsc-meta:skill-check 稽核發現 SKILL.md 的 description 超過 5 句且缺少 明確排除觸發語句,且 SKILL.md 與 question-contents.md、question-record.md 重複描述同一套 wiki hash 演算法,違反「委派 canonical 工具、不重複邏輯」 的準則。 How:改寫 skills/ask/SKILL.md 的 description 為精簡版並加入排除語句;三處 重述 hash 演算法的段落,統一改寫為呼叫 `jsc-gitea/tools/hash-id`(演算法 細節見 guidelines.md);README.md 的 ask 技能描述同步調整;plugin.json、 .claude-plugin/plugin.json、.codex-plugin/plugin.json 版本號 0.0.2 → 0.0.3。 Who:ask 技能本身(skills/ask/SKILL.md 與其範本、manifest)。 --- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- README.md | 2 +- plugin.json | 2 +- skills/ask/SKILL.md | 4 ++-- templates/question-contents.md | 2 +- templates/question-record.md | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 7fc0990..d3a751b 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-ask", - "version": "0.0.2", + "version": "0.0.3", "description": "決策樹問詢與問詢紀錄(QUESTION_* wiki 頁)", "skills": "./skills", "author": { diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 5b21104..95d001f 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-ask", - "version": "0.0.2", + "version": "0.0.3", "description": "決策樹問詢與問詢紀錄(QUESTION_* wiki 頁)", "skills": "./skills" } diff --git a/README.md b/README.md index c196622..6b783fd 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Marketplace 統一為 `jsc`(https://gitea.jsc.idv.tw/plugins/jsc.git),安 ### `ask` -決策樹問詢:一題一個決策點、選項標明影響範圍、問到沒有疑慮為止。問前查 `QUESTION_CONTENTS` 與 `QUESTION_{HASH}`,其中 `{HASH}` 依共用 wiki hash 規則產生;已有答案不再問;AI 取用舊答案時依意圖判斷適用性,意圖不符就重新問。問後套範本寫回 wiki,每節開頭記錄使用者意圖(沒有存取庫名稱就不紀錄)。 +決策樹問詢:一題一個決策點、選項標明影響範圍、問到沒有疑慮為止。問前查 `QUESTION_CONTENTS` 與 `QUESTION_{HASH}`,其中 `{HASH}` 執行 `jsc-gitea/tools/hash-id` 產生;已有答案不再問;AI 取用舊答案時依意圖判斷適用性,意圖不符就重新問。問後套範本寫回 wiki,每節開頭記錄使用者意圖(沒有存取庫名稱就不紀錄)。不適用於答案已有紀錄的情況。 diff --git a/plugin.json b/plugin.json index 9d1579a..f7eaedd 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-ask", - "version": "0.0.2", + "version": "0.0.3", "description": "決策樹問詢與問詢紀錄(QUESTION_* wiki 頁)", "skills": "./skills/" } diff --git a/skills/ask/SKILL.md b/skills/ask/SKILL.md index cb6c47b..6c17b81 100644 --- a/skills/ask/SKILL.md +++ b/skills/ask/SKILL.md @@ -1,6 +1,6 @@ --- name: ask -description: Decision-tree questioning until no doubt remains. Check wiki QUESTION_CONTENTS and QUESTION_{HASH} first and never re-ask answered questions. Compute HASH with the shared 8-character wiki hash rule. Every option must state its impact scope. After each answer, save the record back to the wiki. Use whenever a jsc skill needs user input; skip recording when no {owner}/{repo} is known. +description: Decision-tree questioning until no doubt remains. Checks wiki QUESTION_CONTENTS and QUESTION_{HASH} first and never re-asks answered questions. Every option states its impact scope; after each answer, save the record back to the wiki. Use whenever a jsc skill needs user input; skip recording when no {owner}/{repo} is known; not for skills whose answer is already on record. --- # ask — decision-tree questioning @@ -10,7 +10,7 @@ Every jsc skill that needs user input MUST follow the rules in this skill. ## Before asking 1. Confirm the repository name `{owner}/{repo}` of the current work. Without one, skip steps 2 and 3: ask directly but do NOT record. -2. Compute `HASH` with the shared wiki hash rule: 8 characters, uppercase hex, and if the first character would be `0-9`, `A`, `B`, or `C`, replace it with `H` and keep the total length at 8. +2. Compute `HASH` by running `jsc-gitea/tools/hash-id {owner}/{repo}` (the shared wiki hash rule — see guidelines.md for the algorithm). 3. Read `QUESTION_CONTENTS` and `QUESTION_{HASH}` via `jsc-gitea:wiki`. Never re-ask a question already answered in the record; use the recorded answer directly. When reusing an answer, read the section's intent to judge whether the answer fits the current situation and whether it extends to similar unrecorded decisions. If the intent differs from the current situation, ask again instead of forcing the old answer. ## Questioning rules diff --git a/templates/question-contents.md b/templates/question-contents.md index b77c002..a346925 100644 --- a/templates/question-contents.md +++ b/templates/question-contents.md @@ -1,6 +1,6 @@ # 問詢目錄 -> 由 `jsc-ask:ask` 維護。這是問詢目錄頁 `QUESTION_CONTENTS`。每個存取庫一列;`QUESTION_{HASH}` 的 `{HASH}` 依共用 wiki hash 規則產生:先取 `{owner}/{repo}` 的 SHA-1 前 8 碼並轉成大寫;若首碼是 `0-9`、`A`、`B`、`C`,改用 `H` 開頭並維持 8 碼總長。 +> 由 `jsc-ask:ask` 維護。這是問詢目錄頁 `QUESTION_CONTENTS`。每個存取庫一列;`QUESTION_{HASH}` 的 `{HASH}` 執行 `jsc-gitea/tools/hash-id {owner}/{repo}` 取得(共用 wiki hash 規則,演算法見 guidelines.md)。 | 存取庫名稱 | 問詢紀錄 | 最後更新 | | --- | --- | --- | diff --git a/templates/question-record.md b/templates/question-record.md index 9066433..a4c917e 100644 --- a/templates/question-record.md +++ b/templates/question-record.md @@ -1,6 +1,6 @@ # 問詢紀錄 — {owner}/{repo} -> 由 `jsc-ask:ask` 維護。這是問詢紀錄頁 `QUESTION_{HASH}`;`HASH` 依共用 wiki hash 規則產生,格式為 8 碼大寫,首碼不得是 `0-9`、`A`、`B`、`C`。新問答**附加**在文末,不覆蓋舊紀錄。相同問題再次出現時,直接採用此處答案,不再詢問。 +> 由 `jsc-ask:ask` 維護。這是問詢紀錄頁 `QUESTION_{HASH}`;`HASH` 執行 `jsc-gitea/tools/hash-id {owner}/{repo}` 取得(共用 wiki hash 規則,演算法見 guidelines.md)。新問答**附加**在文末,不覆蓋舊紀錄。相同問題再次出現時,直接採用此處答案,不再詢問。 ## {yyyy-MM-dd HH:mm} {問詢主題}