What:依 jsc-meta:skill-check 的稽核結果修正技能與工具——補上每個步驟的可檢核完成條件、 把留在內文的標準輸入輸出流程下放 tools/、修正查表與退碼路由造成的誤判。 Why:稽核發現這些缺失會讓技能在實際執行時走錯分支或靜默通過。 完成條件缺漏是最常被違反的一項;退碼誤判與查表錯誤則會讓良性狀況被當成失敗。 How:逐項對照 references/guidelines.md 的審核檢查清單修正,新增的工具都有 documented exit codes,並以真實執行驗證每條路徑。 Who:jsc-meta:skill-check 例行稽核(2026-08-25)。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
3.7 KiB
3.7 KiB
name, description
| name | description |
|---|---|
| wiki | Read or write a Gitea wiki page through tools/gitea.sh and tools/hash-id. Resolve the wiki repo per page type with JSC_WIKI_REPO_{TYPE} first, then JSC_WIKI_REPO, and ask only when neither is set. Page content is chart-first - prefer mermaid diagrams and markdown tables over plain prose. Callers are jsc-ask, jsc-sdlc, jsc-log, and jsc-hooks for its ERROR pages. Use for any wiki page in the skill set; not for repo code files. |
wiki — read and write Gitea wiki pages
Every wiki operation in the jsc skill set goes through this skill. One entry point, one permission path.
Resolve the wiki location
Different page types can live in different {owner}/{repo} repos, classified by the page-name prefix.
- 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, andGITEA_TOKEN(also checktea login listfor a usable login token whenGITEA_TOKENis unset). Use inherited shell values first; only ask when the needed repo or connection value cannot be resolved after that check. Done when every one of those variables is either resolved from the environment or listed as missing. - Run
tools/gitea.sh wiki-repo {TYPE}(TYPE = the page-name prefix). Allowed types areQUESTION,PLAN,ANALYZE,DELIVER,MAINTAIN,REPO,LOG,LEARN, andERROR. Resolution order isJSC_WIKI_REPO_{TYPE}first, thenJSC_WIKI_REPO. Never borrow another type's repo. Done when the command has printed exactly one{owner}/{repo}, or exited 3 and sent this page type to step 3. - On exit 3 (neither is set after env inspection), ask the user for that page type's
{owner}/{repo}per thejsc-ask:askrules, and suggest settingJSC_WIKI_REPO_{TYPE}(can differ per type) orJSC_WIKI_REPO(shared default). Done when the user has supplied one{owner}/{repo}for that page type.
Operations
| Action | Command |
|---|---|
| list pages | tools/gitea.sh wiki-list {owner}/{repo} |
| read page | tools/gitea.sh wiki-get {owner}/{repo} {page} (exit 4 when missing) |
| write page | write the content to a temp file first, then tools/gitea.sh wiki-put {owner}/{repo} {page} {file} (creates or updates automatically) |
| page URL | tools/gitea.sh wiki-url {owner}/{repo} {page} — the page's absolute URL, taken from the API's html_url (exit 4 when the page is missing) |
When writing a page, link same-type pages with the [[display|page]] form (display text on the LEFT) and cross-type pages with the absolute URL from wiki-url, because [[...]] resolves only inside one wiki. Full rules and the direction trap: references/wiki-links.md.
Rules
- Page names must follow the wiki naming table in the skill guidelines (see
jsc-meta/references/guidelines.md). - Use
tools/hash-idfor{HASH}values. It returns the first 8 uppercase SHA-1 hex chars, orHplus the first 7 chars when the raw hash starts with0-9,A,B, orC. - To update a contents page (
*_CONTENTS):wiki-getit first, apply the template to append or modify, thenwiki-putthe whole page back. Never overwrite entries owned by others. - Write all wiki content in UTF-8 Traditional Chinese, per the STE100 output rule.
- Prefer visual forms for page content: use mermaid diagrams (flowchart, sequence, gantt, pie) and markdown tables wherever the information allows. Prose is capped at 3 sentences per section, and a sentence stays only when neither a mermaid diagram nor a markdown table can carry the same information.
tools/gitea.shretries once with the tea CLI login token whenGITEA_TOKENis missing or the response is 401/403. Report a failure only after that retry also fails.