Files
meta/skills/skillset-update/SKILL.md
T
jiantw83 5aa4a3da57 feat(skills): 新增技能盤點頁與共用部署驗證流程,並把技能驗證移到新行程
技能盤點以前只回到對話裡,換一台機器就得重跑才知道裝了什麼。
現在新增技能盤點這個 wiki 頁類型,雜湊取「主機、工具名稱、登入帳號」三段。
每支 CLI 各有自己的 plugin 集合,也各有自己的 hook 接線,那是互相獨立的事實。
少了工具名稱那一段,同一台機器上五支 CLI 會算出同一個雜湊,五份盤點互相覆蓋,
讀的人還看不出被蓋掉。技能盤點新增寫入這兩頁的步驟,整步規定必須開 sub agent。
兩份樣板刻意分開:內容頁每次盤點覆寫整頁,目錄頁只更新自己那一列,
兩者的寫入語意剛好相反,合成一份遲早有人把別台機器的紀錄刪掉。

四支異動技能原本在部署完的同一個工作階段,就叫用剛做好的技能。
部署收尾自己立起重啟閘門,那支技能必被擋下,驗證做不完。
解法不是把它加進豁免清單。豁免擋得住閘門,擋不住「行程還載著舊版」這件事,
硬過關驗到的是舊版行為,等於假通過。所以把判路線、部署、驗證、失敗分流
抽成一份共用說明,驗證一律另開 CLI 行程執行,四支技能只留一行指標指過去。

新增腳本檢查工具,一次做完語法、執行權限與結束碼宣告三項檢查,
只被 source 的函式庫豁免後兩項,而且逐支記在錯誤輸出,不靜默略過。
新增部署路線判定工具,判定改動有沒有進存取庫的預設分支,
取代四支技能各抄一段、各自漂移的散文;判不出來就回報停下,不自己挑路線走。

同時把四支技能裡的中文段落抽到共用說明、指標改回英文,
修正六處相對路徑,把技能盤點的模糊描述改成查得出來的條件,
並讓 manifest 同步的每一個呼叫端逐碼分流。

七支技能改為併行執行:例行稽核從九步併成七步,技能盤點併成六步。
技能盤點不再重跑盤點腳本內部已經跑過的三支腳本,
而那三支原本兼作獨立交叉檢查,拿掉就少一層保護,
所以把少掉的是什麼、風險由誰擋住,明白寫進 Notes,不當作沒發生。
2026-08-31 11:11:12 +08:00

6.3 KiB

name, description
name description
skillset-update Apply one change request across the whole jsc skill set — multiple skills in multiple domains in one pass. Sync every domain repo from the Gitea canonical marketplace while the decision tree asks the change details, apply the change per affected domain via parallel sub agents, re-check against the guidelines checklist until it passes, open a PR per affected repo via jsc-git pr, then deploy and verify per references/deploy-verify.md from a fresh CLI process, and append the change report to wiki SKILLSET_{HASH}. Use when a change spans multiple skills or domains; not for a single skill (use skill-update).

skillset-update — apply one change across the skill set

Single source of guidelines: ../../references/guidelines.md.

Flow

  1. Start tools/sync-domains.sh and the change-details decision tree in parallel — the sync touches no answer the tree needs, and the tree's answers change nothing the sync does, so waiting for one before the other only adds idle time.

    1. Run tools/sync-domains.sh to sync every domain repo of the Gitea canonical marketplace. Exit 0 is the only code that means every repo is present and current; keep the domain<TAB>path rows. Exit 3 means some repos were not updated: reconcile every path named on stderr (commit or stash the dirty tree, or fix the failing pull) and rerun; when the user confirms a dirty tree is intentional local work, record that decision and continue on the local version — never read exit 3 as current. Exit 2 means a domain could not be cloned. Exit 1 means the root could not be derived, gitea.sh was not found, or the canonical marketplace was unreadable; when stderr says the root could not be derived, set JSC_PLUGINS_ROOT to the directory that holds the domain repos and rerun, because under a plugin install the script sits in the CLI's plugin cache and its built-in guess lands there instead of the domain workspace. Resolve 2 and 1 before continuing.
    2. Ask for the change details via the jsc-ask:ask decision tree: what rule or behavior changes, which skills and which domains are affected. Include three required checks before the affected-skill list is final: whether any deterministic input/output flow must move to tools/, whether any detailed flow must run as a sub agent, and whether any wiki or Gitea flow must read inherited environment variables before asking the user. Every option states its impact scope (example: changing a shared flow step touches every skill that calls it). These three are a shaping guardrail asked before any file is touched; keep asking them even when a later step would catch the same problem.

    Completion condition: the domain<TAB>path rows are in hand, and the affected-skill list plus the three checks are agreed with the user.

  2. Apply the change to every affected skill — the modification part MUST run as a sub agent, one sub agent per affected domain repo, and those sub agents run in parallel: each repo's files are independent. Then run tools/sync-skill-manifest.sh {domain-path} directly (no sub agent needed) for each affected domain repo to sync that domain README's 「Skills 目錄」 section and bump the version in all three manifests; these runs are independent per repo and may also go in parallel. Route each exit code: 0 — the README block and all three manifests are synced; 1 — the domain path, skills/, README.md, the JSC-SKILLS markers, a SKILL.md, a manifest, or a manifest version field is missing, so fix the named cause on stderr and rerun; 2 — usage error, the script takes exactly one argument; any other code — the script runs under set -e, so treat it as an environment fault and stop, never as a successful sync. Completion condition: every affected domain repo carries the change, the README sync, and the manifest bump.

  3. Check every item of the guidelines.md audit checklist for each touched skill — one sub agent per affected domain repo, run in parallel. On any failure, return to step 1.2: ask again and fix, until all items pass. Completion condition: every checklist item passes for every touched skill.

  4. Call jsc-git:pr once per affected domain repo to open a Push Request. Completion condition: every affected repo has a PR URL, and all URLs are reported in one table with the format in ../../references/pr-report.md.

  5. Deploy the batch change, verify it runs, then report:

    1. Follow ../../references/deploy-verify.md from section 1 to section 5, once per affected domain repo — the route judgements run in parallel. The batch takes the deploy route only when every affected repo's tools/deploy-route.sh exits 0; a single exit 3 puts the whole batch on the worktree route, because the change reaches the CLIs only when the last repo merges, so name every outstanding release PR. The verification then runs in a fresh CLI process, never in the session that ran the deploy: that session raised the restart gate itself and still holds the old skill bodies. Verify every touched skill's row in tools/list-skills.sh, every tool this change touched, and one minimal prompt per affected domain per checkable CLI — the per-CLI and per-domain prompts run in parallel. Completion condition: every completion condition in deploy-verify.md sections 1 to 5 holds for every affected domain repo.
    2. Write the change report to wiki page SKILLSET_{HASH} — this part MUST run as a sub agent, one sub agent per affected domain repo, run in parallel. Call jsc-gitea:wiki; {HASH} comes from that repo's {owner}/{repo}, and the wiki repo resolves through JSC_WIKI_REPO_SKILLSET first, then JSC_WIKI_REPO. Append a section for this change — date, 「批次更新」, the change request in one line, touched skills, changed files, PR URL, the step 5.1 route verdict and verification result per item — and keep every earlier section. Add each page to SKILLSET_CONTENTS when it is new. When a write fails — no {owner}/{repo} resolves, or jsc-gitea:wiki reports an API error — hand the page name and the unwritten entry back to the user and leave this step open; never close the flow on an unwritten report. Completion condition: every affected repo's page holds the new section plus all earlier sections, and SKILLSET_CONTENTS links them all.