Merge pull request 'fix/wiki-normalize-question-pages' (#4) from develop into master

Reviewed-on: #4
Reviewed-by: 系統管理員 <1+admin@noreply.localhost>
This commit was merged in pull request #4.
This commit is contained in:
2026-08-21 16:56:36 +00:00
7 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "jsc-ask",
"version": "0.0.1",
"version": "0.0.2",
"description": "決策樹問詢與問詢紀錄(QUESTION_* wiki 頁)",
"skills": "./skills",
"author": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "jsc-ask",
"version": "0.0.1",
"version": "0.0.2",
"description": "決策樹問詢與問詢紀錄(QUESTION_* wiki 頁)",
"skills": "./skills"
}
+1 -1
View File
@@ -24,7 +24,7 @@ Marketplace 統一為 `jsc`(https://gitea.jsc.idv.tw/plugins/jsc.git),安
### `ask`
決策樹問詢:一題一個決策點、選項標明影響範圍、問到沒有疑慮為止。問前查 `QUESTION_CONTENTS` 與 `QUESTION_{HASH}`,已有答案不再問;問後套範本寫回 wiki(沒有存取庫名稱就不紀錄)。
決策樹問詢:一題一個決策點、選項標明影響範圍、問到沒有疑慮為止。問前查 `QUESTION_CONTENTS` 與 `QUESTION_{HASH}`,其中 `{HASH}` 依共用 wiki hash 規則產生;已有答案不再問。問後套範本寫回 wiki(沒有存取庫名稱就不紀錄)。
<!-- JSC-SKILLS:END -->
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "jsc-ask",
"version": "0.0.1",
"version": "0.0.2",
"description": "決策樹問詢與問詢紀錄(QUESTION_* wiki 頁)",
"skills": "./skills/"
}
+2 -2
View File
@@ -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. 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. 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.
---
# 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`: `printf '%s' "{owner}/{repo}" | sha1sum | cut -c1-8 | tr a-f A-F`.
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.
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.
## Questioning rules
+1 -1
View File
@@ -1,6 +1,6 @@
# 問詢目錄
> 由 `jsc-ask:ask` 維護。每個存取庫一列;`QUESTION_{HASH}` 的 `{HASH}` 為 `{owner}/{repo}` 的 SHA-1 前 8 碼(大寫)。
> 由 `jsc-ask:ask` 維護。這是問詢目錄頁 `QUESTION_CONTENTS`。每個存取庫一列;`QUESTION_{HASH}` 的 `{HASH}` 依共用 wiki hash 規則產生:先取 `{owner}/{repo}` 的 SHA-1 前 8 碼並轉成大寫;若首碼是 `0-9`、`A`、`B`、`C`,改用 `H` 開頭並維持 8 碼總長。
| 存取庫名稱 | 問詢紀錄 | 最後更新 |
| --- | --- | --- |
+1 -1
View File
@@ -1,6 +1,6 @@
# 問詢紀錄 — {owner}/{repo}
> 由 `jsc-ask:ask` 維護。新問答**附加**在文末,不覆蓋舊紀錄。相同問題再次出現時,直接採用此處答案,不再詢問。
> 由 `jsc-ask:ask` 維護。這是問詢紀錄頁 `QUESTION_{HASH}`;`HASH` 依共用 wiki hash 規則產生,格式為 8 碼大寫,首碼不得是 `0-9`、`A`、`B`、`C`。新問答**附加**在文末,不覆蓋舊紀錄。相同問題再次出現時,直接採用此處答案,不再詢問。
## {yyyy-MM-dd HH:mm} {問詢主題}