refactor(code): 接上 shared 共用規範,去除重抄段落並補模型檢查串接
依 todo.md 執行的規範治理專案:action-composite/action-docker/action-node/ image/issues/nuget/review-resolve/sync/target 九個 skill 改為引用 shared 新增的共用 spec(conventional-commit、pull-request、git-push、 git-safety 分支選擇、issue-read、todo-list、ask-user、action-scaffold、 node-src-layout、skill-invocation),移除大量重抄內容(review-resolve/ target 光是 commit/PR/push 三塊就精簡約 175 行);target/issues 補上讀到 帶 model: frontmatter 清單檔時依 /jsc-shared:spec-model 做模型檢查的規則。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+6
-11
@@ -8,12 +8,11 @@ argument-hint: "[<solution-or-project>] [--include-prerelease] [--no-dedupe] [--
|
||||
|
||||
把 C# / .NET repo 內的 NuGet 套件依專案盤點、清理可安全移除的重複參考,然後逐一更新到最新可用版本。每個套件異動後都要驗證專案可以正常編譯;若最新版本失敗,改從目前版本之後的最小可用版本逐版升級,直到第一個編譯失敗版本為止,保留最後一個可編譯版本並記錄失敗點。
|
||||
|
||||
## 共用規範(shared plugin,必要前置)
|
||||
## 共用規範(必要前置)
|
||||
|
||||
執行本 skill 前,先以 Skill 工具載入下列共用規範並全程遵守;**任一載入不到(shared plugin 未安裝)時,先詢問使用者是否安裝 shared plugin(`https://gitea.jsc.idv.tw/plugins/shared.git`),使用者不安裝則直接中斷本 skill**,不得只憑下方一行摘要繼續執行:
|
||||
|
||||
- `/jsc-shared:spec-output`:繁體中文(台灣用語)、UTF-8(不含 BOM)無亂碼(套件 id、檔名、指令、版本號保留原文)。
|
||||
- `/jsc-shared:spec-execution`:自動執行原則(必要決策才中斷)、不臆測/需人工確認。
|
||||
先載入 `/jsc-shared:spec-preflight` 並依其流程處理;載入不到即代表 shared plugin 未安裝,
|
||||
依該 spec 詢問使用者是否安裝 `https://gitea.jsc.idv.tw/plugins/shared.git`,不安裝則中斷本 skill。
|
||||
本 skill 需要的規範:`spec-output`、`spec-execution`、`spec-gitea`
|
||||
|
||||
## 輸出規範(本 skill 特有)
|
||||
|
||||
@@ -133,7 +132,7 @@ argument-hint: "[<solution-or-project>] [--include-prerelease] [--no-dedupe] [--
|
||||
### 5. 特殊檔案與版本管理
|
||||
|
||||
- `packages.lock.json` 存在時,更新套件後允許 lock file 跟著變更;回復失敗更新時也要回復 lock file。
|
||||
- `nuget.config` 有私有 feed 時,不輸出 credential;錯誤訊息若含 token / password 必須遮蔽。
|
||||
- `nuget.config` 有私有 feed 時,不輸出 credential;token / password 的機密保護依 `/jsc-shared:spec-gitea` 執行。
|
||||
- `packages.config` 專案不套用 `dotnet add package` 流程;先回報這是舊格式,使用 `nuget.exe update` 或請使用者確認遷移策略。
|
||||
- 多 target framework 專案以完整目標 build 為準,不只 build 單一 framework。
|
||||
|
||||
@@ -155,8 +154,4 @@ argument-hint: "[<solution-or-project>] [--include-prerelease] [--no-dedupe] [--
|
||||
|
||||
## 呼叫方式
|
||||
|
||||
| 助理 | 呼叫 |
|
||||
| --- | --- |
|
||||
| Claude Code / Antigravity | `/jsc-code:nuget`,或 `/jsc-code:nuget MySolution.sln --include-prerelease` |
|
||||
| Codex | `$nuget`,或 `$nuget src/App/App.csproj --build "dotnet build App.sln -c Release"` |
|
||||
| OpenCode | 描述需求(如「把這個 .NET solution 的 NuGet 都更新到最新,先清掉 ProjectReference 已提供的重複套件,每更新一包就 build」)自動觸發 |
|
||||
依 `/jsc-shared:spec-skill-invocation` 執行,以 `nuget` 作為本 skill 名稱代入其呼叫方式表格。
|
||||
|
||||
Reference in New Issue
Block a user