From 458bbb7fff690c125998c2a164dbbfdb4ce7cc8f Mon Sep 17 00:00:00 2001 From: Jeffery Date: Mon, 24 Aug 2026 17:24:31 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat(wiki):=20=E9=A0=81=E5=9E=8B=E5=85=81?= =?UTF-8?q?=E8=A8=B1=E6=B8=85=E5=96=AE=E6=96=B0=E5=A2=9E=20DELIVER?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5 (1M context) --- skills/wiki/SKILL.md | 4 ++-- tools/gitea.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/skills/wiki/SKILL.md b/skills/wiki/SKILL.md index b4ef1ae..8be55d4 100644 --- a/skills/wiki/SKILL.md +++ b/skills/wiki/SKILL.md @@ -9,10 +9,10 @@ Every wiki operation in the jsc skill set goes through this skill. One entry poi ## Resolve the wiki location -Different page types can live in different `{owner}/{repo}` repos, classified by page-name prefix: `QUESTION`, `PLAN`, `ANALYZE`, `MAINTAIN`, `REPO`, `LOG`, `LEARN`, `ERROR`. +Different page types can live in different `{owner}/{repo}` repos, classified by page-name prefix: `QUESTION`, `PLAN`, `ANALYZE`, `DELIVER`, `MAINTAIN`, `REPO`, `LOG`, `LEARN`, `ERROR`. 1. Before asking the user, inspect the current shell environment for the needed repo variables and Gitea connection variables: `JSC_WIKI_REPO_{TYPE}`, `JSC_WIKI_REPO`, `GITEA_HOST`, and `GITEA_TOKEN` (also check `tea login list` for a usable login token when `GITEA_TOKEN` is unset). Use inherited shell values first; only ask when the needed repo or connection value cannot be resolved after that check. `GITEA_HOST` and `GITEA_TOKEN` are both covered by this ask-if-unresolvable rule, the same as the wiki-repo variables below. -2. Run `tools/gitea.sh wiki-repo {TYPE}` (TYPE = the page-name prefix). Allowed types are `QUESTION`, `PLAN`, `ANALYZE`, `MAINTAIN`, `REPO`, `LOG`, `LEARN`, and `ERROR`. Resolution order is `JSC_WIKI_REPO_{TYPE}` first, then `JSC_WIKI_REPO`. Never borrow another type's repo. +2. Run `tools/gitea.sh wiki-repo {TYPE}` (TYPE = the page-name prefix). Allowed types are `QUESTION`, `PLAN`, `ANALYZE`, `DELIVER`, `MAINTAIN`, `REPO`, `LOG`, `LEARN`, and `ERROR`. Resolution order is `JSC_WIKI_REPO_{TYPE}` first, then `JSC_WIKI_REPO`. Never borrow another type's repo. 3. On exit 3 (neither is set after env inspection), ask the user for that page type's `{owner}/{repo}` per the `jsc-ask:ask` rules, and suggest setting `JSC_WIKI_REPO_{TYPE}` (can differ per type) or `JSC_WIKI_REPO` (shared default). ## Operations diff --git a/tools/gitea.sh b/tools/gitea.sh index d88206f..2f1363d 100755 --- a/tools/gitea.sh +++ b/tools/gitea.sh @@ -7,7 +7,7 @@ # gitea.sh clone-url / # 印出 clone URL # gitea.sh hash-id # 產生 8 碼大寫 SHA-1 hash;首碼為 0-9/A/B/C 時改成 Hxxxxxxx # gitea.sh wiki-repo # 解析頁面類型的 wiki 位置: -# TYPE = QUESTION|PLAN|ANALYZE|MAINTAIN|REPO|LOG|LEARN|ERROR(即頁名前綴) +# TYPE = QUESTION|PLAN|ANALYZE|DELIVER|MAINTAIN|REPO|LOG|LEARN|ERROR(即頁名前綴) # 依序取 JSC_WIKI_REPO_{TYPE} > JSC_WIKI_REPO;不得跨類型代用;都未設定 exit 3 # gitea.sh wiki-list / # 列出 wiki 頁名 # gitea.sh wiki-get / # 印出 wiki 頁 markdown;不存在時 exit 4 @@ -27,7 +27,7 @@ script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) resolve_wiki_repo() { # TYPE -> JSC_WIKI_REPO_{TYPE} -> JSC_WIKI_REPO type=$(printf '%s' "${1:?TYPE required}" | tr a-z A-Z) case "$type" in - QUESTION|PLAN|ANALYZE|MAINTAIN|REPO|LOG|LEARN|ERROR) ;; + QUESTION|PLAN|ANALYZE|DELIVER|MAINTAIN|REPO|LOG|LEARN|ERROR) ;; *) echo "unknown wiki type: $type" >&2; exit 2 ;; esac eval "v=\${JSC_WIKI_REPO_${type}:-}" -- 2.53.0 From afd10ebfb8559d34e536c2a0068dd759b4156237 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Mon, 24 Aug 2026 17:24:31 +0800 Subject: [PATCH 2/4] =?UTF-8?q?test(wiki-rules):=20=E8=A3=9C=E4=B8=8A=20DE?= =?UTF-8?q?LIVER=20=E9=A0=81=E5=9E=8B=E7=9A=84=E8=A7=A3=E6=9E=90=E6=B8=AC?= =?UTF-8?q?=E8=A9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5 (1M context) --- tools/check-wiki-rules.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/check-wiki-rules.sh b/tools/check-wiki-rules.sh index 8b107fe..008f503 100755 --- a/tools/check-wiki-rules.sh +++ b/tools/check-wiki-rules.sh @@ -60,6 +60,14 @@ check_repo LEARN 'LEARN falls back to shared only' 'shared/wiki' \ JSC_WIKI_REPO_LOG='records/LOG' \ JSC_WIKI_REPO='shared/wiki' +check_repo DELIVER 'DELIVER specific wins' 'handover/DELIVER' \ + JSC_WIKI_REPO_DELIVER='handover/DELIVER' \ + JSC_WIKI_REPO='shared/wiki' + +check_repo DELIVER 'DELIVER falls back to shared only' 'shared/wiki' \ + JSC_WIKI_REPO_ANALYZE='knowledges/ANALYZE' \ + JSC_WIKI_REPO='shared/wiki' + check_repo ERROR 'ERROR uses its own repo' 'errors/wiki' \ JSC_WIKI_REPO_ERROR='errors/wiki' \ JSC_WIKI_REPO='shared/wiki' -- 2.53.0 From 9607bae6c3ae9f2721424a41648a2e10ea1285a7 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Mon, 24 Aug 2026 17:24:31 +0800 Subject: [PATCH 3/4] =?UTF-8?q?docs(README):=20=E9=A0=81=E5=9E=8B=E6=B8=85?= =?UTF-8?q?=E5=96=AE=E5=90=8C=E6=AD=A5=E6=94=B6=E9=8C=84=20DELIVER?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5 (1M context) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 257e194..2e6e98a 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ gitea.sh repos # 列出 owner 的 repo 全名 gitea.sh default-branch / gitea.sh clone-url / gitea.sh hash-id # 產生 8 碼大寫 SHA-1;首碼 0-9/A/B/C 時改成 Hxxxxxxx -gitea.sh wiki-repo # 解析頁面類型的 wiki 位置(TYPE = QUESTION / PLAN / ANALYZE / MAINTAIN / REPO / LOG / LEARN / ERROR) +gitea.sh wiki-repo # 解析頁面類型的 wiki 位置(TYPE = QUESTION / PLAN / ANALYZE / DELIVER / MAINTAIN / REPO / LOG / LEARN / ERROR) gitea.sh wiki-list / gitea.sh wiki-get / # 不存在 exit 4 gitea.sh wiki-put / # 自動判斷新建或更新 @@ -44,7 +44,7 @@ check-wiki-rules.sh # 驗證 wiki repo 解析與 ha ### `wiki` -Gitea wiki 頁讀寫的統一入口:依頁面類型(QUESTION / PLAN / ANALYZE / MAINTAIN / REPO / LOG / LEARN / ERROR)解析 wiki 所在的 `{owner}/{repo}`,先讀對應的 `JSC_WIKI_REPO_{TYPE}`,再退回 `JSC_WIKI_REPO`,不同類型不可互相代用。頁面內容以圖表優先(mermaid 圖、markdown 表格),純文字為最後手段。 +Gitea wiki 頁讀寫的統一入口:依頁面類型(QUESTION / PLAN / ANALYZE / DELIVER / MAINTAIN / REPO / LOG / LEARN / ERROR)解析 wiki 所在的 `{owner}/{repo}`,先讀對應的 `JSC_WIKI_REPO_{TYPE}`,再退回 `JSC_WIKI_REPO`,不同類型不可互相代用。頁面內容以圖表優先(mermaid 圖、markdown 表格),純文字為最後手段。 ### `repo-sync` @@ -58,7 +58,7 @@ Gitea wiki 頁讀寫的統一入口:依頁面類型(QUESTION / PLAN / ANALYZ | --- | --- | --- | | `GITEA_HOST` | Gitea 站台(可省略 scheme,預設 https) | 詢問使用者 | | `GITEA_TOKEN` | Gitea API token;缺少或遇 401/403 時自動退回 tea CLI 登入 token | 詢問使用者 | -| `JSC_WIKI_REPO_{TYPE}` | 各類型 wiki 頁的 `{owner}/{repo}`;TYPE = QUESTION / PLAN / ANALYZE / MAINTAIN / REPO / LOG / LEARN / ERROR | 退回 `JSC_WIKI_REPO`,不做跨類型代用 | +| `JSC_WIKI_REPO_{TYPE}` | 各類型 wiki 頁的 `{owner}/{repo}`;TYPE = QUESTION / PLAN / ANALYZE / DELIVER / MAINTAIN / REPO / LOG / LEARN / ERROR | 退回 `JSC_WIKI_REPO`,不做跨類型代用 | | `JSC_WIKI_REPO` | 共用預設的 wiki `{owner}/{repo}` | 詢問使用者 | ## Hash 規則 -- 2.53.0 From 7fce55edee439805d413031f2dd314640328d303 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Mon, 24 Aug 2026 17:24:31 +0800 Subject: [PATCH 4/4] =?UTF-8?q?chore(plugin=20=E7=89=88=E6=9C=AC):=20?= =?UTF-8?q?=E4=B8=89=E4=BB=BD=20manifest=20=E5=8D=87=E7=89=88=E8=87=B3=200?= =?UTF-8?q?.0.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5 (1M context) --- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- plugin.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 2546c3a..644be66 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-gitea", - "version": "0.0.5", + "version": "0.0.6", "description": "Gitea API 工具、Wiki 讀寫與存取庫批次同步", "skills": "./skills", "author": { diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 1a45573..c206563 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-gitea", - "version": "0.0.5", + "version": "0.0.6", "description": "Gitea API 工具、Wiki 讀寫與存取庫批次同步", "skills": "./skills" } diff --git a/plugin.json b/plugin.json index e093428..e08ec3b 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-gitea", - "version": "0.0.5", + "version": "0.0.6", "description": "Gitea API 工具、Wiki 讀寫與存取庫批次同步", "skills": "./skills/" } -- 2.53.0