From 1f17f1779ab0f308ed4c5ff21892441ad1a4df40 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 08:23:27 +0000 Subject: [PATCH] =?UTF-8?q?feat(wiki):=20wiki=20=E6=8A=80=E8=83=BD?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=9C=96=E8=A1=A8=E5=84=AA=E5=85=88=E5=85=A7?= =?UTF-8?q?=E5=AE=B9=E8=A6=8F=E5=89=87=E4=B8=A6=E6=9B=B4=E6=96=B0=20README?= =?UTF-8?q?=20=E8=AA=AA=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit What(改了什麼) - skills/wiki/SKILL.md 新增兩條規則:頁面內容以圖表優先(mermaid 流程圖、時序圖、甘特圖、圓餅圖與 markdown 表格),純文字為最後手段且保持精簡;tools/gitea.sh 已內建認證退回機制,兩條路徑都失敗才回報認證錯誤。 - SKILL.md frontmatter description 補上 chart-first 說明,讓技能挑選時就能看到此規則。 - README.md:「Skills 目錄」的 wiki 條目補上圖表優先說明;環境變數表的 GITEA_TOKEN 一列補上 401/403 自動退回 tea CLI token 的行為。 Why(為什麼改) - 使用者規則:wiki 輸出盡量用 mermaid 與表格呈現,不要只有純文字。 - 認證退回已在 tools/gitea.sh 實作,技能文件與 README 需同步,避免技能誤判認證失敗或文件與行為不一致。 How(怎麼改) - 在 SKILL.md 規則清單追加第 4、5 條,並同步改寫 frontmatter description。 - README 對應兩處文字更新,與 gitea.sh 的實際行為一致。 Who(影響哪個功能/使用者) - 使用 jsc-gitea:wiki 的所有呼叫方(jsc-ask、jsc-sdlc、jsc-log):之後寫出的 wiki 頁會以圖表為主;閱讀 README 的使用者能得知 token 退回行為。 備註:README.md 的 GITEA_TOKEN 環境變數表一列在語意上屬於前一個 commit(tea token 退回),但為避免以 hunk 拆分 README,整檔併入本 commit。 Co-Authored-By: Claude Fable 5 --- README.md | 4 ++-- skills/wiki/SKILL.md | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 974c9f2..65baa07 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ gitea.sh api [json-file] ### `wiki` -Gitea wiki 頁讀寫的統一入口:依頁面類型(QUESTION / PLAN / ANALYZE / MAINTAIN / REPO / LOG)解析 wiki 所在的 `{owner}/{repo}`,未設定環境變數時以決策樹詢問。 +Gitea wiki 頁讀寫的統一入口:依頁面類型(QUESTION / PLAN / ANALYZE / MAINTAIN / REPO / LOG)解析 wiki 所在的 `{owner}/{repo}`,未設定環境變數時以決策樹詢問。頁面內容以圖表優先(mermaid 圖、markdown 表格),純文字為最後手段。 ### `repo-sync` @@ -54,7 +54,7 @@ Gitea wiki 頁讀寫的統一入口:依頁面類型(QUESTION / PLAN / ANALYZ | 變數 | 用途 | 未設定時 | | --- | --- | --- | | `GITEA_HOST` | Gitea 站台(可省略 scheme,預設 https) | 詢問使用者 | -| `GITEA_TOKEN` | Gitea API token | 詢問使用者 | +| `GITEA_TOKEN` | Gitea API token;缺少或遇 401/403 時自動退回 tea CLI 登入 token | 詢問使用者 | | `JSC_WIKI_REPO_{TYPE}` | 各類型 wiki 頁的 `{owner}/{repo}`;TYPE = QUESTION / PLAN / ANALYZE / MAINTAIN / REPO / LOG | 退回 `JSC_WIKI_REPO` | | `JSC_WIKI_REPO` | 共用預設的 wiki `{owner}/{repo}` | 詢問使用者 | diff --git a/skills/wiki/SKILL.md b/skills/wiki/SKILL.md index 8e85c5a..efab159 100644 --- a/skills/wiki/SKILL.md +++ b/skills/wiki/SKILL.md @@ -1,6 +1,6 @@ --- name: wiki -description: Read or write a Gitea wiki page through tools/gitea.sh with GITEA_TOKEN. Resolve the wiki repo per page type (QUESTION/PLAN/ANALYZE/MAINTAIN/REPO/LOG) via gitea.sh wiki-repo, falling back to JSC_WIKI_REPO or a decision-tree question. Used by jsc-ask, jsc-sdlc, and jsc-log for all wiki pages; not for repo code files. +description: Read or write a Gitea wiki page through tools/gitea.sh with GITEA_TOKEN. Resolve the wiki repo per page type (QUESTION/PLAN/ANALYZE/MAINTAIN/REPO/LOG) via gitea.sh wiki-repo, falling back to JSC_WIKI_REPO or a decision-tree question. Page content is chart-first - prefer mermaid diagrams and markdown tables over plain prose. Used by jsc-ask, jsc-sdlc, and jsc-log for all wiki pages; not for repo code files. --- # wiki — read and write Gitea wiki pages @@ -27,3 +27,5 @@ Different page types can live in different `{owner}/{repo}` repos, classified by 1. Page names must follow the wiki naming table in the skill guidelines (see `jsc-meta/references/guidelines.md`). 2. To update a contents page (`*_CONTENTS`): `wiki-get` it first, apply the template to append or modify, then `wiki-put` the whole page back. Never overwrite entries owned by others. 3. Write all wiki content in UTF-8 Traditional Chinese, per the STE100 output rule. +4. Prefer visual forms for page content: use mermaid diagrams (flowchart, sequence, gantt, pie) and markdown tables wherever the information allows. Plain running text is the last resort, kept short. +5. Authentication fallback is built into `tools/gitea.sh`: on a missing GITEA_TOKEN or a 401/403 response it retries with the tea CLI login token automatically, so only report an auth failure when both paths fail.