universal-dev-standards 6.14.0 → 6.14.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,7 @@ status: current
14
14
  <!-- UDS_SUPPORTED_VERSIONS_START -->
15
15
  | 版本 | 支援狀態 |
16
16
  |------|--------|
17
+ | 6.14.1-beta.1 | ✅ 預發布版本 |
17
18
  | 6.14.0 | ✅ 最新正式版 |
18
19
  | < 6.0.0 | ❌ 已終止支援 |
19
20
  <!-- UDS_SUPPORTED_VERSIONS_END -->
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  source: ../../../core/mock-boundary.md
3
- source_version: 1.1.0
4
- translation_version: 1.1.0
5
- last_synced: 2026-07-01
6
- source_hash: fe4715991a4c
3
+ source_version: 1.3.0
4
+ translation_version: 1.3.0
5
+ last_synced: 2026-10-28
6
+ source_hash: b95f3da59a8e
7
7
  status: current
8
8
  ---
9
9
 
@@ -11,8 +11,8 @@ status: current
11
11
 
12
12
  > **Language**: [English](../../../core/mock-boundary.md) | 繁體中文
13
13
 
14
- **版本**: 1.1.0
15
- **最後更新**: 2026-07-01
14
+ **版本**: 1.3.0
15
+ **最後更新**: 2026-10-28
16
16
  **適用範圍**: 所有具備單元測試與整合測試的軟體專案
17
17
  **Scope**: universal
18
18
  **產業標準**: ISTQB Foundation(Test Doubles), xUnit Patterns(Gerard Meszaros)
@@ -110,6 +110,67 @@ class DeterministicDispatcher implements BackgroundDispatcher {
110
110
 
111
111
  ---
112
112
 
113
+ ## 攔截型 Hook:測宿主的入口,不是測比對函式
114
+
115
+ **hook** 是 AI 宿主(Claude Code、Codex、Gemini CLI、Antigravity CLI 等)在生命週期事件上執行的腳本。有些 hook 能**擋下**宿主原本要做的事:拒絕一次工具呼叫、拒絕一則提示、不讓一個回合結束。對這類 hook,空心測試根本不需要任何 mock——測試只是從來沒碰到宿主會呼叫的入口。
116
+
117
+ hook 有兩層。**判斷層**決定這條指令危不危險;**接線層**讀宿主送來的 stdin 資料,並用宿主會讀的訊號回答(結束碼,或標準輸出的 JSON)。匯入判斷函式的單元測試只練到第一層,而宿主讀的是第二層。結束碼錯、欄位名稱讀錯、輸出格式宿主不認,這些都不會讓那支測試變紅。
118
+
119
+ ### 反例:UDS 自己的危險指令 hook,擋下 0/26
120
+
121
+ `scripts/hooks/check-dangerous-cmd.mjs` 是 PreToolUse hook。偵測到危險指令時它 `exit 1`。Claude Code 只有 `exit 2` 才擋下工具呼叫;其他非 0 結束碼都是不阻擋的 hook 錯誤,指令照樣執行。它的測試匯入比對函式(`isDangerousCommand()`)直接呼叫,所以綠了好幾個月。
122
+
123
+ 重播 11,617 次真實 shell 呼叫(2026-10-27),規則 `rm -rf /` 命中 26 次,宿主擋下 **0** 次。26 次中有 25 次是無害的暫存清理,例如 `rm -rf /tmp/x`;沒有任何一次是真的要清空根目錄。同一個規則還漏掉 `rm -fr /` 與 `rm -r -f /`。修正與入口測試在 PR #281 出貨。
124
+
125
+ ### 規則
126
+
127
+ **H1(MUST)**:能擋下工具呼叫、提示或回合的 hook,至少要有一支測試同時做到下列三件事:
128
+
129
+ 1. **另起行程執行 hook**,用宿主設定檔裡執行它的同一個指令。啟動腳本算數;匯入不算。
130
+ 2. **在 stdin 送入宿主自己的資料**,欄位名稱用該宿主的(見下表:Claude Code 送 `tool_name`/`tool_input`,Antigravity 送 `toolCall`)。照作者想像的宿主格式做出來的資料什麼也證明不了。
131
+ 3. **斷言宿主據以判斷的訊號**:確切的結束碼,或宿主在標準輸出解析的 JSON。「非 0」「有錯誤結束」「stderr 含某個字」都不算:exit 1 是非 0,卻在 Claude Code 上什麼也沒擋。
132
+
133
+ 匯入並呼叫內部函式的測試可以存在,對判斷層也有用,但**不計入** H1。
134
+
135
+ **H2(SHOULD)**:擋下的案例旁邊,用同樣方式跑一個放行的案例,並斷言宿主的放行訊號(例如 exit 0 且標準輸出為空)。一個什麼都擋的 hook 可以通過只測擋下的測試。
136
+
137
+ **H3(SHOULD)**:切斷檢查——把 hook 的擋下訊號改掉(例如 `exit 2` 改成 `exit 1`),確認入口測試變紅。維持綠色,代表那支測試沒在守接線。
138
+
139
+ H1 也適用於「唯一作用是讓宿主讀到它的訊號」的 hook,例如用 exit 2 把 stderr 送到模型面前的 PostToolUse hook。工具已經跑完、無法撤銷,但錯的結束碼一樣會讓這支 hook 無聲無息。
140
+
141
+ ### 各宿主把什麼當成「已擋下」
142
+
143
+ 2026-10-28 取自各宿主自己的官方文件。宿主會改這些約定;採信某一格之前請重查出處。格子寫「未查到」,是讀過該頁而頁面沒寫,不等於「沒有」。
144
+
145
+ | 宿主 | 事件 | 擋下 | 不擋下 | 出處 |
146
+ |---|---|---|---|---|
147
+ | Claude Code | PreToolUse | exit **2**(stderr 是理由);或 exit 0 並在 stdout 輸出 `{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"..."}}` | 其他任何結束碼,**包含 1**,都是不阻擋的 hook 錯誤,動作照常進行;無效的 JSON 同理。文件寫明的例外:設定了 `onFailure: "block"` 的 hook,失敗時會擋下 | code.claude.com/docs/en/hooks:Exit code output、Exit code 2、Other exit codes、Decision control |
148
+ | Claude Code | UserPromptSubmit | exit **2**(提示不會送到模型);或 exit 0 並在 stdout 輸出 `{"decision":"block","reason":"..."}` | 其他任何結束碼(同樣有 `onFailure: "block"` 的例外) | 同頁,Exit code 2 behavior per event |
149
+ | Claude Code | PostToolUse | 不能擋:工具已經執行。exit 2 只會把 stderr 顯示給模型 | 以擋下而言,任何結束碼都不行 | 同頁,Exit code 2 behavior per event |
150
+ | Codex | PreToolUse | exit **2** 並把理由寫到 stderr;或 stdout 輸出 `{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"..."}}`;舊式 `{"decision":"block","reason":"..."}` 也接受 | stdout 的純文字會被忽略;`permissionDecision:"ask"`、`continue:false`、`stopReason`、`suppressOutput` 尚不支援,該次 hook 執行被標為失敗而工具呼叫繼續;其他非 0 結束碼:未查到 | developers.openai.com/codex/hooks,PreToolUse |
151
+ | Codex | UserPromptSubmit | exit **2** 並把理由寫到 stderr;或 stdout 輸出 `{"decision":"block","reason":"..."}` | stdout 純文字會被當成額外脈絡;其他非 0 結束碼:未查到 | 同頁,UserPromptSubmit |
152
+ | Codex | PermissionRequest | stdout 輸出 `{"hookSpecificOutput":{"decision":{"behavior":"deny","message":"..."}}}`;任一 `deny` 即勝出 | 此事件的 exit 2:未查到;stdout 純文字會被忽略 | 同頁,PermissionRequest |
153
+ | Gemini CLI(舊版) | BeforeTool | exit **2**(stderr 是送給 agent 的理由);或 exit 0 並在 stdout 輸出 `{"decision":"deny","reason":"..."}`(`"block"` 是別名)。文件把 JSON 形式列為優先路徑 | 其他任何結束碼只是警告,CLI 繼續 | geminicli.com/docs/hooks/reference,Global hook mechanics 與 BeforeTool |
154
+ | Gemini CLI(舊版) | BeforeAgent、BeforeModel | exit **2** 中止該回合(BeforeAgent 還會把提示從脈絡抹除;BeforeModel 跳過 LLM 呼叫);或 `decision:"deny"` | 同上 | 同頁 |
155
+ | Antigravity CLI(`agy`) | PreToolUse | exit 0 並在 stdout 輸出 `{"decision":"deny","reason":"..."}`(「Hard blocks execution immediately」)。`decision` 欄位必填,其他值為 `allow`、`auto_approve`、`ask`、`force_ask`、`deny_unless_prior_grant`。stdin 帶的是 `toolCall.name` 與 `toolCall.args`,不是 Claude Code 的欄位名 | 結束碼語意:未查到(官方頁面沒寫)。不要假設 Claude Code 的 exit 2 適用。第三方文章宣稱任何非 0 都視為拒絕;那不是官方說法,此處不採用 | antigravity.google/docs/hooks,Input and output contract,PreToolUse |
156
+ | Cursor 與其他宿主 | 任何 | 未查到(本版未調查) | 未查到 | 無 |
157
+
158
+ Stop 類事件(Claude Code 與 Codex 的 Stop、Gemini CLI 的 AfterAgent、Antigravity 的 Stop)**不在這裡重複**。它們的擋下約定寫在 [turn-completion-integrity](turn-completion-integrity.md) 的「支援的執行環境」表,那是唯一寫下它們的地方。該表也記錄了一個 Antigravity hook 失敗後被靜默放行的案例,與本節要防的接線失敗是同一型。
159
+
160
+ ### 重播驗證的是接線,不是規則
161
+
162
+ 把錄下的真實呼叫重播給 hook(例如用 rules-to-guards)是檢查接線的有力方法。但它有一個每次回報結果時都必須講明的限制:若同一份規則清單同時決定「該擋」與「不該擋」,重播只證明 hook 照它的規則運作,**不證明規則本身是對的**。
163
+
164
+ 0/26 之所以量得出來,是因為宿主的約定(exit 2 才擋)是 hook 之外的事實。至於「哪些指令值得擋」,手上只有 hook 自己的比對式:26 次命中都與它一致,真正的危險 0 次,而它沒涵蓋的 `rm -fr /` 永遠不會在重播裡顯示為漏掉,因為答案來源與 hook 共用同一個盲點。
165
+
166
+ 所以重播的結果只能報「接線正確」或「接線錯誤」,不要由它得出「規則正確」。要對規則下結論,請去讀實際命中的指令,或另備一份不看 hook 比對式寫成的獨立答案(見 [verification-oracle](verification-oracle.md))。
167
+
168
+ ### UDS 的執行方式
169
+
170
+ UDS 在 CI 對自己出貨的 hook 檢查這條規則:`node scripts/check-hook-entry-tests.mjs`(npm 指令 `check:hook-entry-tests`),出貨的、能擋下的 hook 若沒有「啟動它、送 stdin、斷言宿主訊號」的測試就判失敗。它是靜態文字分析:只證明「形狀對的測試存在」,不證明 hook 退化時那支測試會變紅——那是 H3 的工作。
171
+
172
+ ---
173
+
113
174
  ## 空心測試偵測
114
175
 
115
176
  提交測試檔之前,請檢查:
@@ -118,6 +179,7 @@ class DeterministicDispatcher implements BackgroundDispatcher {
118
179
  2. **所有斷言都是 `.toHaveBeenCalled()` 系列** → 加入輸出值斷言
119
180
  3. **Mock 路徑與受測對象目錄相同** → 自我引用 mock;移除之
120
181
  4. **Mock 設定行數多於斷言行數** → 很可能是空心測試
182
+ 5. **攔截型 hook 的測試只匯入並呼叫它的函式** → 補一支啟動 hook 並斷言宿主訊號的入口測試(見「攔截型 Hook」)
121
183
 
122
184
  ---
123
185
 
@@ -128,6 +190,7 @@ class DeterministicDispatcher implements BackgroundDispatcher {
128
190
  - **Orphan Mock**:跨模組 mock 卻沒有對應的整合測試
129
191
  - **Security Bypass Mock**:auth/權限邏輯被換成直接放行的 stub
130
192
  - **Database Mock Cascade**:DB 回傳寫死的資料,隱藏真實查詢錯誤
193
+ - **Matcher-Only Hook Test**:攔截型 hook 的測試只匯入並呼叫其判斷函式,從未照宿主的方式執行 hook。hook 什麼也沒擋,測試卻是綠的(UDS 自己的 0/26)
131
194
  - **Poll/Sleep for Background Result**:用 sleep 或 poll 等待 fire-and-forget 背景工作完成。race 依然存在——timeout 只是多數時候把它遮住,同時拖慢整套測試;在共用 runner 上更會把 flakiness 洩漏進其他 MR 的 CI。改注入 deterministic runner 並 await 被追蹤的 task。
132
195
 
133
196
  ---
@@ -142,6 +205,8 @@ class DeterministicDispatcher implements BackgroundDispatcher {
142
205
  | 禁止 mock 安全機制 | 測試涉及 auth/權限 | 使用真實測試使用者 + 真實 token |
143
206
  | 空心審查 | Mock 數量 ≥ import 數量 | 加入輸出值斷言 |
144
207
  | 背景工作禁止 poll/sleep | 測試斷言某個 fire-and-forget 副作用 | 注入 deterministic runner;await 被追蹤的 task |
208
+ | 攔截型 hook 要有宿主入口測試 | hook 能擋下工具呼叫、提示或回合 | 啟動它、在 stdin 送宿主的資料、斷言宿主據以判斷的結束碼或 stdout JSON |
209
+ | 重播只證明接線 | 回報把真實呼叫重播給 hook 的結果 | 報「接線正確」;除非規則另以獨立答案核對過,否則不報「規則正確」 |
145
210
 
146
211
  ---
147
212
 
@@ -150,6 +215,8 @@ class DeterministicDispatcher implements BackgroundDispatcher {
150
215
  - **testing**:Mock 邊界規則適用於測試金字塔的所有測試層級
151
216
  - **test-completeness-dimensions**:維度 8(AI 測試品質)引用了這些規則
152
217
  - **flow-based-testing**:Flow 測試必須遵循 mock 邊界規則
218
+ - **turn-completion-integrity**:Stop 類事件的擋下約定寫在那裡;工具與提示事件的寫在本標準,兩邊都不重複對方
219
+ - **verification-oracle**:用來判斷 hook 規則對不對的答案來源,不得由 hook 自己的比對式推出
153
220
 
154
221
  ---
155
222
 
@@ -159,3 +226,4 @@ class DeterministicDispatcher implements BackgroundDispatcher {
159
226
  |------|------|------|
160
227
  | 1.0.0 | 2026-05-04 | 初始標準:空心測試問題、可/不可 Mock 表格、偵測、反模式、規則摘要 |
161
228
  | 1.1.0 | 2026-07-01 | 新增可注入的背景執行作為 seam(平行於 clock injection):可 Mock 表列、`可注入的背景執行` 章節、`Poll/Sleep for Background Result` 反模式,以及背景工作禁止 poll/sleep 規則(issue #143) |
229
+ | 1.3.0 | 2026-10-28 | 新增《攔截型 Hook:測宿主的入口,不是測比對函式》:H1 MUST(啟動 hook、送宿主的 stdin 資料、斷言宿主據以判斷的訊號)、H2/H3 SHOULD、各宿主擋下訊號對照表,以及「重播驗證接線、不驗證規則」的註記,並以 UDS 自己的 0/26 為反例。版本號與 `mock-boundary.ai.yaml` 對齊——該檔先前把「背景執行」那次新增記為 1.2.0,本檔記為 1.1.0 |
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  source: ../../../core/turn-completion-integrity.md
3
- source_version: 1.5.0
4
- translation_version: 1.5.0
5
- last_synced: 2026-09-29
6
- source_hash: 08579653d9a4
3
+ source_version: 1.5.1
4
+ translation_version: 1.5.1
5
+ last_synced: 2026-10-28
6
+ source_hash: 46c790f970d3
7
7
  status: current
8
8
  ---
9
9
 
@@ -11,8 +11,8 @@ status: current
11
11
 
12
12
  > **Language**: [English](../../../core/turn-completion-integrity.md) | 繁體中文
13
13
 
14
- **版本**: 1.5.0
15
- **最後更新**: 2026-09-29
14
+ **版本**: 1.5.1
15
+ **最後更新**: 2026-10-28
16
16
  **適用範圍**: 任何由 agent 結束回合、把控制權交還給人的執行環境
17
17
  **Scope**: universal
18
18
  **產業標準**: 不宣稱任何來源——由實際觀察到的失敗歸納,見「證據」
@@ -153,6 +153,8 @@ agent 寫下「我接著做 X」,然後結束回合,而 X 沒有做。
153
153
  | Gemini CLI(過時) | AfterAgent | `.gemini/settings.json` | stdout 印 `{"decision":"deny","reason":...}`,exit 0——官方文件標記為優先於 exit code 2 的做法 |
154
154
  | Antigravity CLI(`agy`) | Stop | `.agents/hooks.json` | stdout 印 `{"decision":"continue","reason":...}`,exit 0;`{}` 即放行 |
155
155
 
156
+ 這張表只涵蓋 Stop 類事件。宿主對「擋下工具呼叫或提示」的事件(PreToolUse、UserPromptSubmit、BeforeTool)所讀的訊號,寫在 [mock-boundary](mock-boundary.md) 的「各宿主把什麼當成「已擋下」」表——那是唯一寫下它們的地方,連同「擋下型 hook 必須照宿主的方式執行來測」的規則,本處不重複。
157
+
156
158
  在 Codex 上,接上了不等於會執行。Codex 會略過專案層級的 hook,直到專案被信任、**而且**
157
159
  這一支 hook 的定義在互動式 Codex 工作階段裡透過 `/hooks` 被信任為止;信任紀錄綁在定義的
158
160
  雜湊值上,定義一改就要重新信任。在 `codex exec` 底下,未被信任的 hook 會被略過,而且完全
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "universal-dev-standards",
3
- "version": "6.14.0",
3
+ "version": "6.14.1-beta.1",
4
4
  "description": "CLI tool for adopting Universal Development Standards",
5
5
  "keywords": [
6
6
  "documentation",
@@ -551,20 +551,15 @@ export async function updateCommand(options) {
551
551
  return;
552
552
  }
553
553
  await handleReconcile(projectPath, options, { force: !!options.force, addStandards });
554
- // These exit the process on completion, so run Skills last.
555
- if (scopedToCommands) await updateCommandsOnly(projectPath, manifest, options);
556
- if (scopedToSkills) await updateSkillsOnly(projectPath, manifest, options);
554
+ // A single scope exits the process on completion; two are chained and exit once.
555
+ await runScopes(projectPath, manifest, options, { skills: scopedToSkills, commands: scopedToCommands });
557
556
  return;
558
557
  }
559
558
 
560
- // Scope without a mode: the original shortcuts.
561
- if (scopedToSkills) {
562
- await updateSkillsOnly(projectPath, manifest, options);
563
- return;
564
- }
565
-
566
- if (scopedToCommands) {
567
- await updateCommandsOnly(projectPath, manifest, options);
559
+ // Scope without a mode: the original shortcuts. Both flags mean both scopes —
560
+ // neither may be dropped for the other (the 6.14.0 bug).
561
+ if (scopedToSkills || scopedToCommands) {
562
+ await runScopes(projectPath, manifest, options, { skills: scopedToSkills, commands: scopedToCommands });
568
563
  return;
569
564
  }
570
565
 
@@ -2835,7 +2830,45 @@ async function skillActionsOf(projectPath) {
2835
2830
  return plan.actions.filter((a) => a.category === 'skill');
2836
2831
  }
2837
2832
 
2838
- async function updateSkillsOnly(projectPath, manifest, options) {
2833
+ /**
2834
+ * How one scope step (Skills or commands) ends.
2835
+ *
2836
+ * Alone, it ends the process, as it always did. When `--skills` and `--commands` come
2837
+ * together the other scope still has to run, so it hands its exit code back instead and
2838
+ * {@link runScopes} ends the process once, with the worse code of the two.
2839
+ * (Found 2026-10-27 on Windows: `--skills --commands` ran one scope, exited 0 and said
2840
+ * nothing about the other. The same two axes XSPEC-372 R1/R2 separated, one level down.)
2841
+ * @param {number} code - 0 on success, non-zero on failure
2842
+ * @param {boolean} chained - true when another scope runs after this one
2843
+ * @returns {number} the code, so a caller can `return endScope(...)`
2844
+ */
2845
+ function endScope(code, chained) {
2846
+ if (!chained) process.exit(code);
2847
+ return code;
2848
+ }
2849
+
2850
+ /**
2851
+ * Run the scope steps the flags name. One scope runs exactly as before (it exits the
2852
+ * process itself). Both run in a fixed order, each printing its own section, and the
2853
+ * process ends with the worst code: any failure is non-zero, and so is a failure the
2854
+ * reconciler already recorded in `process.exitCode` (`--apply`).
2855
+ * @param {string} projectPath
2856
+ * @param {Object} manifest
2857
+ * @param {Object} options
2858
+ * @param {{skills: boolean, commands: boolean}} scopes
2859
+ */
2860
+ async function runScopes(projectPath, manifest, options, { skills, commands }) {
2861
+ if (skills && commands) {
2862
+ const skillsCode = await updateSkillsOnly(projectPath, manifest, options, { chained: true });
2863
+ const commandsCode = await updateCommandsOnly(projectPath, manifest, options, { chained: true });
2864
+ process.exit(Math.max(skillsCode, commandsCode, Number(process.exitCode) || 0));
2865
+ return;
2866
+ }
2867
+ if (skills) await updateSkillsOnly(projectPath, manifest, options);
2868
+ if (commands) await updateCommandsOnly(projectPath, manifest, options);
2869
+ }
2870
+
2871
+ async function updateSkillsOnly(projectPath, manifest, options, { chained = false } = {}) {
2839
2872
  const msg = t().commands.update;
2840
2873
  const repoInfo = getRepositoryInfo();
2841
2874
  const latestVersion = repoInfo.skills.version;
@@ -2897,8 +2930,7 @@ async function updateSkillsOnly(projectPath, manifest, options) {
2897
2930
  console.log(chalk.yellow(msg.skillsViaMarketplace || 'Skills installed via Marketplace'));
2898
2931
  console.log(chalk.gray(` ${msg.updateViaMarketplace || 'Update through Plugin Marketplace'}`));
2899
2932
  console.log();
2900
- process.exit(0);
2901
- return;
2933
+ return endScope(0, chained);
2902
2934
  }
2903
2935
  }
2904
2936
  }
@@ -2907,8 +2939,7 @@ async function updateSkillsOnly(projectPath, manifest, options) {
2907
2939
  console.log(chalk.yellow(msg.noSkillsInstalled || 'No Skills installations found'));
2908
2940
  console.log(chalk.gray(` ${msg.runInitToInstall || 'Run uds init to install Skills'}`));
2909
2941
  console.log();
2910
- process.exit(0);
2911
- return;
2942
+ return endScope(0, chained);
2912
2943
  }
2913
2944
 
2914
2945
  // Show current status
@@ -2938,8 +2969,7 @@ async function updateSkillsOnly(projectPath, manifest, options) {
2938
2969
  if (fileBasedInstallations.length === 0) {
2939
2970
  console.log(chalk.green(msg.allSkillsUpToDate || 'All Skills are up to date'));
2940
2971
  console.log();
2941
- process.exit(0);
2942
- return;
2972
+ return endScope(0, chained);
2943
2973
  }
2944
2974
 
2945
2975
  // XSPEC-454 R1: this step writes outside the reconciler, so it takes its own rollback point — the skill
@@ -2948,8 +2978,7 @@ async function updateSkillsOnly(projectPath, manifest, options) {
2948
2978
  // No backup, no write: an install that cannot be undone must not start.
2949
2979
  const skillsBackup = takeStepBackup(projectPath, 'skills', fileBasedInstallations, 'skills');
2950
2980
  if (!skillsBackup.ok) {
2951
- process.exit(1);
2952
- return;
2981
+ return endScope(1, chained);
2953
2982
  }
2954
2983
 
2955
2984
  const spinner = createSpinner(msg.installingSkills || 'Installing Skills...').start();
@@ -3036,7 +3065,7 @@ async function updateSkillsOnly(projectPath, manifest, options) {
3036
3065
  // XSPEC-465 R1: a personal skill with the same name as one of the UDS skills just written wins silently.
3037
3066
  // Information only: it does not change what was installed or the exit code.
3038
3067
  printSkillNameCollisionWarning(projectPath);
3039
- process.exit(0);
3068
+ return endScope(0, chained);
3040
3069
  }
3041
3070
 
3042
3071
  /**
@@ -3045,7 +3074,7 @@ async function updateSkillsOnly(projectPath, manifest, options) {
3045
3074
  * @param {Object} manifest - Manifest object
3046
3075
  * @param {Object} [options] - CLI options (forwarded for locale resolution)
3047
3076
  */
3048
- async function updateCommandsOnly(projectPath, manifest, options) {
3077
+ async function updateCommandsOnly(projectPath, manifest, options, { chained = false } = {}) {
3049
3078
  const msg = t().commands.update;
3050
3079
 
3051
3080
  console.log(chalk.cyan(msg.updatingCommandsOnly || 'Updating slash commands for all AI Agents...'));
@@ -3072,8 +3101,7 @@ async function updateCommandsOnly(projectPath, manifest, options) {
3072
3101
  console.log(chalk.yellow(msg.noCommandsInstalled || 'No slash commands installations found'));
3073
3102
  console.log(chalk.gray(` ${msg.runInitToInstall || 'Run uds init to install commands'}`));
3074
3103
  console.log();
3075
- process.exit(0);
3076
- return;
3104
+ return endScope(0, chained);
3077
3105
  }
3078
3106
 
3079
3107
  // Show current status
@@ -3095,8 +3123,7 @@ async function updateCommandsOnly(projectPath, manifest, options) {
3095
3123
  // XSPEC-454 R1: same as the Skills step — a rollback point first, and no write without one.
3096
3124
  const commandsBackup = takeStepBackup(projectPath, 'commands', commandsInstallations, 'commands');
3097
3125
  if (!commandsBackup.ok) {
3098
- process.exit(1);
3099
- return;
3126
+ return endScope(1, chained);
3100
3127
  }
3101
3128
 
3102
3129
  const spinner = createSpinner(msg.installingCommands || 'Installing commands...').start();
@@ -3182,7 +3209,7 @@ async function updateCommandsOnly(projectPath, manifest, options) {
3182
3209
  finishStepBackup(projectPath, commandsBackup);
3183
3210
 
3184
3211
  console.log();
3185
- process.exit(0);
3212
+ return endScope(0, chained);
3186
3213
  }
3187
3214
 
3188
3215
  /**
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "version": "6.14.0",
3
+ "version": "6.14.1-beta.1",
4
4
  "lastUpdated": "2026-05-13",
5
5
  "description": "Standards registry for universal-dev-standards with integrated skills and AI-optimized formats",
6
6
  "formats": {
@@ -58,14 +58,14 @@
58
58
  "standards": {
59
59
  "name": "universal-dev-standards",
60
60
  "url": "https://github.com/AsiaOstrich/universal-dev-standards",
61
- "version": "6.14.0"
61
+ "version": "6.14.1-beta.1"
62
62
  },
63
63
  "skills": {
64
64
  "name": "universal-dev-standards",
65
65
  "url": "https://github.com/AsiaOstrich/universal-dev-standards",
66
66
  "localPath": "skills",
67
67
  "rawUrl": "https://raw.githubusercontent.com/AsiaOstrich/universal-dev-standards/main/skills",
68
- "version": "6.14.0",
68
+ "version": "6.14.1-beta.1",
69
69
  "note": "Skills are now included in the main repository under skills/"
70
70
  }
71
71
  },
@@ -2336,7 +2336,7 @@
2336
2336
  "id": "license-compliance",
2337
2337
  "name": "License Compliance Standards",
2338
2338
  "nameZh": "授權合規標準",
2339
- "version": "6.14.0",
2339
+ "version": "6.14.1-beta.1",
2340
2340
  "source": {
2341
2341
  "human": "core/license-compliance.md",
2342
2342
  "ai": "ai/standards/license-compliance.ai.yaml"
@@ -2348,7 +2348,7 @@
2348
2348
  "id": "verification-oracle",
2349
2349
  "name": "Verification Oracle Standards",
2350
2350
  "nameZh": "驗證 Oracle 標準",
2351
- "version": "6.14.0",
2351
+ "version": "6.14.1-beta.1",
2352
2352
  "source": {
2353
2353
  "human": "core/verification-oracle.md",
2354
2354
  "ai": "ai/standards/verification-oracle.ai.yaml"
@@ -2360,7 +2360,7 @@
2360
2360
  "id": "model-provenance",
2361
2361
  "name": "Model Provenance Policy Standards",
2362
2362
  "nameZh": "模型來源政策標準",
2363
- "version": "6.14.0",
2363
+ "version": "6.14.1-beta.1",
2364
2364
  "source": {
2365
2365
  "human": "core/model-provenance.md",
2366
2366
  "ai": "ai/standards/model-provenance.ai.yaml"
@@ -2372,7 +2372,7 @@
2372
2372
  "id": "resource-cost-boundary",
2373
2373
  "name": "Resource / Cost Boundary Declaration Standards",
2374
2374
  "nameZh": "資源/成本邊界宣告標準",
2375
- "version": "6.14.0",
2375
+ "version": "6.14.1-beta.1",
2376
2376
  "source": {
2377
2377
  "human": "core/resource-cost-boundary.md",
2378
2378
  "ai": "ai/standards/resource-cost-boundary.ai.yaml"