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>
2.4 KiB
2.4 KiB
name, description
| name | description |
|---|---|
| repo-sync | Batch-sync all readable repos of a chosen Gitea owner into the working directory. List owners, let the user pick, then clone or update each repo through tools/repo-sync.sh; a repo reported dirty goes to jsc-git:pr against the base branch that same script reports. Use for workspace bootstrap or bulk refresh; not for a single repo. |
repo-sync — batch-sync repositories
Steps
- Before calling
tools/gitea.sh, resolveGITEA_HOSTandGITEA_TOKENfrom the current shell environment (also checktea login listfor a usable login token whenGITEA_TOKENis unset). IfGITEA_HOSTis unresolvable, orGITEA_TOKENis unset and no tea login token exists either, ask the user for the missing value per thejsc-ask:askrules before proceeding to anytools/gitea.shcall. Done whenGITEA_HOSTholds a value and eitherGITEA_TOKENor a tea login token is available. - Run
tools/gitea.sh ownersto list every{owner}the user can read. Done when the command has printed at least one{owner}. - Ask the user which
{owner}to sync, per thejsc-ask:askrules. Every option states the owner's repo count and impact scope. Done when the user has named exactly one{owner}from that list. - Run
tools/gitea.sh repos {owner}to list every readable{repo}under that owner. Done when the command has printed the full{owner}/{repo}list for the chosen owner. - Sync each
{repo}one by one. This step MUST run as a sub agent (one sub agent per repo):- Run
tools/repo-sync.sh {owner}/{repo}. The script owns the clone-versus-pull decision and the base-branch precedence, so run nogit clone,git checkoutorgit pullby hand, and derive no branch name yourself. Route on its single line of output:clonedorupdated→ this repo is done;dirty {branch}→ go to substep 2;failed {reason}→ record that reason and stop this repo. Done when exactly one of those four outcomes is recorded for this repo. dirty {branch}→ calljsc-git:prwith{branch}from that same output line as the base, passed through verbatim. It commits, branches, pushes and opens the PR itself, so add none of those steps. Done whenjsc-git:prreturns the PR URL.
- Run
- Report the sync result for every repo: cloned, updated, PR URL, or the failure reason. Done when every
{repo}from step 4 carries one of those four results.