What:新增 references/behaviors.md,一支技能一節,共七支技能。每節五列,記下觸發時機、關鍵步驟、外部呼叫、完成條件、可驗證跡象。新增 tools/check-behaviors.sh,比對 skills/ 與這份清單。skill-new、skill-update、skill-delete、skillset-update 加上同步更新清單的步驟。skill-check 把這支腳本併進第一組稽核。 Why:技能驗證原本沒有基準,稽核只能靠眼睛比對 SKILL.md。十個 domain 每輪都要重做一遍,還會漏掉。行為清單當基準,技能改了、清單沒跟著改,就是漂移。漂移交給程式判定才穩。 How:腳本檢查節數、節名、節序、每節一張表、五個欄位齊全、內容欄非空。退出碼 0 代表相符,1 代表不符,2 代表用法錯誤,3 代表找不到清單或找不到 skills 目錄。domain 名以 plugin.json 的 name 為準,checkout 目錄名只是退路。四支異動技能在同一個 PR 內改清單,並照退出碼分流。 Who:屬於「技能行為清單」這件需求,提供技能驗證的參考基準。
6.8 KiB
6.8 KiB
name, description
| name | description |
|---|---|
| skill-update | Update one existing skill in the jsc skill set. List all skills from the Gitea canonical marketplace (cloning any missing domain repo) and let the user pick one, ask update details via decision tree, apply the change, re-check against the guidelines checklist until it passes, open a PR 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 for modifying a single skill; not for creating (skill-new), not for removing (skill-delete), and not for a change spanning several skills or domains (skillset-update). |
skill-update — update a skill
Single source of guidelines: ../../references/guidelines.md.
Flow
- Run
tools/sync-domains.shto sync every domain repo of the Gitea canonical marketplace. Completion condition: the script exits 0 and prints onedomain<TAB>pathline per marketplace domain — exit 0 is the only code that means every repo is present and current. 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.shwas not found, or the canonical marketplace was unreadable; when stderr says the root could not be derived, setJSC_PLUGINS_ROOTto 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. - Run
tools/list-skills.shand present itsdomain / name / descriptionrows to the user. The tool prints skills, not domains, so read the domain column to prove coverage. Exit 1 means the root could not be derived, the domain list was unreadable, or no skill was found — read stderr, fix the named cause (JSC_PLUGINS_ROOTfor the root case, as in step 1) and rerun; never read it as an empty skill set. Completion condition: the script exits 0 and every domain printed by step 1 appears in at least one row; a domain with no row means its repo is missing or holds no skill — return to step 1 for that domain. - Let the user pick the skill to update. Completion condition: one
{domain}/{name}pair is confirmed. - Ask for update details via the
jsc-ask:askdecision tree (change the goal? the trigger? the flow? move rules down to a hook or a tool?). Every option states its impact scope (example: renaming breaks the existing invocation command). Completion condition: every question has a recorded answer. - Update the skill — the modification part MUST run as a sub agent: modify SKILL.md and related files. In the same pass, update this skill's
## {name}section inreferences/behaviors.mdso its five rows — 觸發時機、關鍵步驟、外部呼叫、完成條件、可驗證跡象 — describe the new behavior. A renamed skill gets its section renamed and moved back into dictionary order. The behavior list ships in this same PR: a behavior change that lands without its section makes the domain's list wrong from the merge onward, and the next audit reports drift this step created. Then runtools/sync-skill-manifest.sh {domain-path}directly (no sub agent needed) to sync the domain README's 「Skills 目錄」 section and bump the version in all three manifests. Route each exit code: 0 — the README block and all three manifests are synced; 1 — the domain path,skills/,README.md, theJSC-SKILLSmarkers, aSKILL.md, a manifest, or a manifestversionfield 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 underset -e, so treat it as an environment fault and stop, never as a successful sync. Completion condition: the skill files carry the change, the skill'sreferences/behaviors.mdsection states the new behavior with all five rows filled, and all three manifests show the same new version. - Check every item of the guidelines.md audit checklist. Run
tools/check-behaviors.sh {domain-path}for the behavior-list item instead of comparing by eye, and route each exit code: 0 — the list matchesskills/and all five rows are filled; 1 — every mismatch is printed on stderr as{檔案}:{技能名}:{說明}, so fix each one and rerun; 2 — usage error, the tool takes exactly one argument; 3 — nothing was checked, becausereferences/behaviors.mdis missing,skills/is missing, or noSKILL.mdwas found, so create the missing file and rerun. Exit 3 is never a pass. On any failure, return to step 4: ask again and fix, until all items pass. Completion condition: every checklist item passes andtools/check-behaviors.sh {domain-path}exits 0. - Call
jsc-git:prto open a Push Request. Completion condition: a PR URL comes back and is reported with the table format in../../references/pr-report.md. - Deploy the update, verify it runs, then report:
- Follow
../../references/deploy-verify.mdfrom section 1 to section 5:tools/deploy-route.sh {domain-path}picks the route, the deploy route or the worktree route runs, and 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 body, so verifying inside it either gets blocked or passes on stale behavior. Verify the updateddescriptionin the skill'stools/list-skills.shrow, every tool this change touched, and one minimal prompt per checkable CLI — the per-CLI prompts run in parallel. Completion condition: every completion condition indeploy-verify.mdsections 1 to 5 holds for this domain repo. - Write the change report to wiki page
SKILLSET_{HASH}— this part MUST run as a sub agent. Calljsc-gitea:wiki;{HASH}comes from the{owner}/{repo}of the changed domain repo, and the wiki repo resolves throughJSC_WIKI_REPO_SKILLSETfirst, thenJSC_WIKI_REPO. Append a section for this change — date, 「更新」, skill name, changed files, PR URL, the step 8.1 route verdict and verification result per item — and keep every earlier section. Add the page toSKILLSET_CONTENTSwhen it is new. When the write fails — no{owner}/{repo}resolves, orjsc-gitea:wikireports 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: the page holds the new section plus all earlier sections, andSKILLSET_CONTENTSlinks it.
- Follow