universal-dev-standards 6.14.1-beta.1 → 6.14.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.
package/bin/uds.js CHANGED
@@ -238,7 +238,7 @@ program
238
238
  .option('--add-standard <id>', 'With --plan or --apply: also install this standard UDS ships and the project lacks, and record it in the manifest (repeatable; `uds update --plan` lists what is available)', (value, previous) => [...previous, value], [])
239
239
  .option('--claude-target <target>', 'Switch an existing install to a different Claude Code integration target: project (CLAUDE.md) or local (CLAUDE.local.md) — moves the UDS block, keeps your content, no reinstall')
240
240
  .option('--locale <locale>', 'Override locale for skills install (zh-tw, zh-cn, en); also reads .uds/install.yaml + UDS_LOCALE env')
241
- .option('--with-hooks', 'Install the enforcement hooks that are missing from this already-initialized project (re-detects tools; hooks already there and your own hooks are not touched; with --plan, writes nothing; --force also overwrites edited hook scripts)')
241
+ .option('--with-hooks', 'Install the enforcement hooks that are missing from this already-initialized project (re-detects tools; hooks already there and your own hooks are not touched; a hook script that is an unmodified copy from an older UDS is replaced, an edited one is kept; with --plan, writes nothing; --force also overwrites edited hook scripts)')
242
242
  .option('--ai-tool <tools>', 'With --with-hooks: comma-separated tools to install hooks for (claude-code, codex, gemini-cli, antigravity) instead of detecting them')
243
243
  .action(updateCommand);
244
244
 
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  source: ../../CHANGELOG.md
3
- source_version: 6.14.1-beta.1
4
- translation_version: 6.14.1-beta.1
3
+ source_version: 6.14.1
4
+ translation_version: 6.14.1
5
5
  last_synced: 2026-10-30
6
- source_hash: ba57d38f3b74
6
+ source_hash: 27f3513bc034
7
7
  status: current
8
8
  ---
9
9
 
@@ -18,9 +18,25 @@ status: current
18
18
 
19
19
  ## [Unreleased]
20
20
 
21
+ ## [6.14.1] - 2026-10-30
22
+
23
+ > **正式版发布**:包含下方 6.14.1-beta.1 与 beta.2 的所有内容,beta.2 之后没有任何变更。beta.2 已在 Windows、macOS、Linux 完成发布后验收(0 项失败)。**安全修复:**危险命令 hook 现在会真的拦下;已经装过 hook 的项目执行 `uds update --with-hooks` 即可换上修好的脚本(beta.2)。
24
+
25
+ ## [6.14.1-beta.2] - 2026-10-30
26
+
27
+ > **测试版**——以 `npm install -g universal-dev-standards@beta` 安装。要测什么、如何退回正式版:[docs/PRE-RELEASE.md](../../docs/PRE-RELEASE.md)。**在 6.14.1-beta.1 之上的一项修复:** `uds update --with-hooks` 现在会替换旧版 UDS 安装、且没有人改过的 hook 脚本,即使 hook 已经配置好。因此已有危险指令 hook 的项目会拿到会拦截的版本;beta.1 留下的是从不拦截的旧副本,还得你手动复制文件。包含以下 6.14.1-beta.1 的所有内容。
28
+
29
+ ### 修复
30
+
31
+ - **`uds update --with-hooks` 现在会替换旧版 UDS 安装、且没有人改过的 hook 脚本,即使 hook 已经配置好。** 在 6.14.1-beta.1,已经有危险指令 hook 的项目会留着 6.14.0 的 `scripts/hooks/check-dangerous-cmd.mjs`,它以 exit 1 结束、从不拦截:安装器看到 hook 配置“已存在”,打印“已安装、未动”,从不比对旁边的脚本(实测:`uds update --with-hooks`、`uds update --with-hooks --force` 与 `uds update --apply` 都让它原封不动)。现在不论配置是否已存在,每个工具都会比对。与出货版不同的脚本按内容判断:若与历代 UDS 某版出货的内容逐字节相同(忽略换行符,所以 Windows 在 `core.autocrlf` 下的检出仍算),说明没人改过,直接替换,输出会列出每个文件及它来自哪一版;其他任何差异都说明被改过:保留、列出,并说明如何强制。历代内容列在 `cli/src/installers/hook-script-fingerprints.json`,由 `scripts/generate-hook-fingerprints.mjs` 从 git 标签生成(不是手写,也不会被缩减);单元测试在 `scripts/hooks/` 任一脚本的内容不在清单里时失败,所以改了 hook 就无法不更新清单而提交,`scripts/pre-release-check.sh` 的第 29 步另检查每个发版标签。报告依“实际写入”而非“测量结果”。**`--force`:** 搭配 `--with-hooks` 时,现在连被改过的 hook 脚本也会用出货版覆盖,hook 已经安装时也一样(以前只在补装缺少的 hook 时才会),输出会说覆盖了几个;你的修改没有备份。`--with-hooks --plan` 列出将替换或覆盖的项目,且不写任何文件。**`--apply`、单独的 `--force` 与普通的 `uds update` 不管理 hook 脚本,仍然不会替换它们;**当其中一个是过期且未改过的副本时,它们现在会打印一行说明,并指出 `uds update --with-hooks`。**谁会看到差异:** 用 6.14.0 或更早版本安装过 hook、并在这个版本运行 `uds update --with-hooks` 的人:他们没改过的每个 hook 脚本都会被替换(替换的文件有记录,所以 `uds uninstall` 仍会移除)。**如果你改过 hook 脚本**,它会被保留,在你手动合并或使用 `--force` 之前拿不到之后的修复(以危险指令 hook 来说,就是 exit 2 的修复)。
32
+
33
+ ### 测试
34
+
35
+ - **macOS 发布后验收不再丢失步骤输出的结尾(在 6.14.0 与 6.14.1-beta.1 发现)。** `xspec482-init-interactive-manual` 只在 macOS 上红:捕获到的输出在一行中间断掉,没有驱动程序最后打印的 `DRIVE-EXIT=0`,但 `uds init` 其实成功了。`scripts/beta-acceptance/steps.json` 里的验收辅助程序(两个交互式驱动程序与三个小包装)在写出结果后立刻调用 `process.exit()`。标准输出是管道时,Node 在 macOS 上把放不进管道的部分异步写出,`process.exit()` 会把剩下的丢掉;Linux 上同样的写入是同步的,所以同一步在那里是绿的。现在它们等写完才结束(写入的回调,或 `process.exitCode`)。验证:新增一个测试,用真正的驱动程序文本对一个打印 300 KB 的替身、搭配读得很慢的读取端;在 macOS 上,修改前只收到 65,536 字节、没有 `DRIVE-EXIT` 行,修改后收到全部输出。**没有证明的部分:** 真实步骤只打印约 2.8 KB,放得进管道,而且在维护者的 macOS 上修改前后都通过,所以 CI 上输出丢失出自这个原因是合理的判断,不是测到的结果;以本版的发布后验收为准。仅改动测试与验收程序;用户运行的东西没有变。
36
+
21
37
  ## [6.14.1-beta.1] - 2026-10-30
22
38
 
23
- > **测试版**——以 `npm install -g universal-dev-standards@beta` 安装。要测什么、如何退回正式版:[docs/PRE-RELEASE.md](../../docs/PRE-RELEASE.md)。**安全修正:** 危险指令 hook(`scripts/hooks/check-dangerous-cmd.mjs`)侦测到时以 exit 1 回报,而 Claude Code 不把 exit 1 当成拦截,因此 6.14.0 及更早版本从未挡下任何指令(重播 11,617 笔真实 shell 调用,规则命中 26 次,宿主挡下 0 次);现在改以 exit 2 结束,且只判断指令本身。**已经安装这个 hook 的项目会保留旧的脚本副本,直到你把它换掉;见“修复”的第一条。**另修正:提交信息 hook 略过 `git commit -am "..."` 与其他合并短旗标,以及 `uds update --skills --commands` 只运行两者其中之一。包含以下 6.14.0 的所有内容。
39
+ > **测试版**——以 `npm install -g universal-dev-standards@beta` 安装。要测什么、如何退回正式版:[docs/PRE-RELEASE.md](../../docs/PRE-RELEASE.md)。**安全修正:** 危险指令 hook(`scripts/hooks/check-dangerous-cmd.mjs`)侦测到时以 exit 1 回报,而 Claude Code 不把 exit 1 当成拦截,因此 6.14.0 及更早版本从未挡下任何指令(重播 11,617 笔真实 shell 调用,规则命中 26 次,宿主挡下 0 次);现在改以 exit 2 结束,且只判断指令本身。**在这个版本,已经安装这个 hook 的项目会保留旧的脚本副本,直到你手动换掉;6.14.1-beta.2(见上)已修复:`uds update --with-hooks` 会替换它。**另修正:提交信息 hook 略过 `git commit -am "..."` 与其他合并短旗标,以及 `uds update --skills --commands` 只运行两者其中之一。包含以下 6.14.0 的所有内容。
24
40
 
25
41
  ### 新增
26
42
 
@@ -28,7 +44,7 @@ status: current
28
44
 
29
45
  ### 修复
30
46
 
31
- - **危险指令 hook 现在会拦截,且不再挡下一般的清理指令。** `scripts/hooks/check-dangerous-cmd.mjs`(安全标准的 PreToolUse/Bash hook)从来没有挡下过任何东西:它以 exit 1 结束,而 Claude Code 只在 exit 2 时拦截工具调用,所以指令照常运行。它还拿整段 stdin JSON 来比对,而不是 `tool_input.command`。重播 11,617 笔真实 shell 调用,旧的 `rm -rf /` 规则命中 26 次,其中 25 次是无害的暂存清理(`rm -rf /tmp/x`),而 `rm -fr /` 与 `rm -r -f /` 却漏网。现在 hook 读取 `tool_input.command`(stdin 不是 JSON 时读取原始指令列),以 exit 2 拦截并在 stderr 写出规则名称;`rm` 只在递归且目标正好是 `/`、`/*`、`~`、`~/` 或 `$HOME` 时才拦截,旗标顺序不拘,`sudo` 之后也适用。原本从未命中任何东西的 fork bomb 规则(`()` 是空的 regex 群组)现在会命中;没有点号的 `mkfs`、没有 `if=` 的 `dd of=/dev/…`,以及对 `/` 之下路径的 `chmod -R 777`(以前会误中 `/home/me/x`)改以指令词判断,而不是子字符串。**行为改变:** `rm -rf /home` 与其他根目录之下的路径不再被拦截;它们不是这条规则原本要防的对象。命令行模式(`node check-dangerous-cmd.mjs "<command>"`)现在也以 exit 2 而非 1 结束。 **已经安装这个 hook 的项目不会从 `uds update` 获得修复:** 安装器会保留 `scripts/hooks/` 里已有的 hook 脚本;在这个版本上实测,`uds update --with-hooks`、`uds update --with-hooks --force` 与 `uds update --apply` 都让旧的 `check-dangerous-cmd.mjs` 原封不动(旧副本对 `rm -rf /` 仍以 exit 1 结束)。要获得修复,请把随附的文件复制过去覆盖:`cp "$(npm root -g)/universal-dev-standards/bundled/hooks/check-dangerous-cmd.mjs" scripts/hooks/`。在这个版本上运行 `uds init --with-hooks` 的项目会拿到修复后的脚本。
47
+ - **危险指令 hook 现在会拦截,且不再挡下一般的清理指令。** `scripts/hooks/check-dangerous-cmd.mjs`(安全标准的 PreToolUse/Bash hook)从来没有挡下过任何东西:它以 exit 1 结束,而 Claude Code 只在 exit 2 时拦截工具调用,所以指令照常运行。它还拿整段 stdin JSON 来比对,而不是 `tool_input.command`。重播 11,617 笔真实 shell 调用,旧的 `rm -rf /` 规则命中 26 次,其中 25 次是无害的暂存清理(`rm -rf /tmp/x`),而 `rm -fr /` 与 `rm -r -f /` 却漏网。现在 hook 读取 `tool_input.command`(stdin 不是 JSON 时读取原始指令列),以 exit 2 拦截并在 stderr 写出规则名称;`rm` 只在递归且目标正好是 `/`、`/*`、`~`、`~/` 或 `$HOME` 时才拦截,旗标顺序不拘,`sudo` 之后也适用。原本从未命中任何东西的 fork bomb 规则(`()` 是空的 regex 群组)现在会命中;没有点号的 `mkfs`、没有 `if=` 的 `dd of=/dev/…`,以及对 `/` 之下路径的 `chmod -R 777`(以前会误中 `/home/me/x`)改以指令词判断,而不是子字符串。**行为改变:** `rm -rf /home` 与其他根目录之下的路径不再被拦截;它们不是这条规则原本要防的对象。命令行模式(`node check-dangerous-cmd.mjs "<command>"`)现在也以 exit 2 而非 1 结束。 **在这个版本,已经安装这个 hook 的项目不会从 `uds update` 获得修复:** 安装器会保留 `scripts/hooks/` 里已有的 hook 脚本(实测:`uds update --with-hooks`、`uds update --with-hooks --force` 与 `uds update --apply` 都让旧的 `check-dangerous-cmd.mjs` 原封不动,它对 `rm -rf /` 仍以 exit 1 结束),当时的解法是手动把随附的文件复制过去覆盖。6.14.1-beta.2(见上)已修复这一点。在这个版本上运行 `uds init --with-hooks` 的项目拿到的是修复后的脚本。
32
48
  - **结构化日志 hook 现在会传到模型。** `scripts/hooks/check-logging-standard.mjs`(PostToolUse/Write)原本以 exit 1 结束,Claude Code 视为不拦截的 hook 错误,模型看不到消息;现在改以 exit 2,让 stderr 的建议回馈给模型,且只判断写入的文字(`tool_input.content` 或 `new_string`),不看 payload 的其余部分。Write 已经发生,所以这无法复原任何事。
33
49
  - **提交信息 hook 现在检查 git 在命令行上接收消息的每一种写法,且不再挡下它误读的消息。** `scripts/hooks/validate-commit-msg.mjs`(PreToolUse/Bash hook)原本只在单独的 `-m` 之后找消息,所以 `git commit -am "wip"`(由它添加的进入点测试发现)与其他所有合并短旗标(`-vam`、`-sam`)都不经检查就放行。现在它像 git 一样读取命令:`-m` 出现在短旗标串的任何位置,值附在后面(`-m"msg"`、`-mmsg`、`-am"msg"`)或接在下一个词,`--message=msg`、`--message msg` 与 git 不含糊的缩写(`--mess=msg`),以及串接命令中的每一个 `git commit`(`git commit -m "feat: a" && git commit -m wip` 在第二个被挡下)。多个 `-m` 如 git 一样以空行相连,所以被判断的是第一个,即主旨。同一次重写也修掉两种误挡,成因是在读取引号之前就在 `;`、`&&`、`|` 与换行处切开命令:消息本身含其中之一(`-m "feat: a; b"`),以及 Claude Code 最常写的 `-m "$(cat <<'EOF' ... EOF)"` 形式——它以前被当成垃圾消息 `"$(cat` 挡下,现在改以本文判断。消息文字不在命令行上的提交照旧放行:`-F`、`-C`/`-c`、`--amend --no-edit`、编辑器、`--fixup`/`--squash`(git 自己写 `fixup!` 主旨,`-m` 变成本文),以及由 shell 计算的消息(`-m "$MSG"`、`$(...)`、反引号)。**行为改变:** 以前放行的命令,在消息不是 Conventional Commit 时现在会被挡下:`-am`/`-vam` 风格的提交、`--message`、串接命令的第二个提交,以及 `VAR=value` 之后的提交。
34
50
  - **`uds update --skills --commands` 现在两者都更新;以前只更新一边,对另一边什么也没说(在 6.14.0 的 Windows 11 上发现)。** 两个旗标都带并加 `--apply` 时,只有指令运行:Skills 段落从未出现,manifest 里的 Skills 停在旧版本(一个项目:51 个指令已更新,Skills 仍在 6.11.0),结束码是 0。两个旗标都带但不加 `--apply` 时,只有 Skills 运行,`--commands` 被丢掉。旗标的顺序没有差别。原因:两个步骤各自在完成时结束整个进程,所以另一个永远没开始,且不加 `--apply` 的路径在第一个之后就返回。现在两者都运行,不论旗标顺序都是 Skills 先、指令后,各自印出自己的段落,并以两者中较差的结束码结束(任一边失败即非 0,`--apply` 对帐已记下的失败也一样)。单一范围(只带 `--skills` 或只带 `--commands`)的行为与输出和以前完全相同,`--plan --skills --commands` 本来就会规划两者,没有改变。**谁会看到差异:** 传过两个旗标的人。请再运行一次 `uds update --apply --yes --skills --commands`;经过那次有问题的运行的项目没有损坏,只是它的 Skills(或指令)落后。有一件事这次没有改变:只带单一范围的 `--apply` 在对帐中失败时仍以结束码 0 结束,因为该步骤一向以明确的 0 结束进程。
@@ -15,7 +15,7 @@ status: current
15
15
 
16
16
  > **语言**: [English](../../README.md) | [繁體中文](../zh-TW/README.md) | 简体中文
17
17
 
18
- **版本**: 6.14.1-beta.1 (Pre-release) | **发布日期**: 2026-10-30 | **授权**: [双重授权](../../LICENSE) (CC BY 4.0 + MIT)
18
+ **版本**: 6.14.1 | **发布日期**: 2026-10-30 | **授权**: [双重授权](../../LICENSE) (CC BY 4.0 + MIT)
19
19
 
20
20
  语言无关、框架无关的软件项目文档标准。通过 AI 原生工作流,确保不同技术栈之间的一致性、质量和可维护性。
21
21
 
@@ -3,7 +3,7 @@ source: ../../SECURITY.md
3
3
  source_version: 1.0.0
4
4
  translation_version: 1.0.0
5
5
  last_synced: 2026-10-15
6
- source_hash: 352db63aa759
6
+ source_hash: c59c8f74b4aa
7
7
  status: current
8
8
  ---
9
9
 
@@ -14,8 +14,7 @@ status: current
14
14
  <!-- UDS_SUPPORTED_VERSIONS_START -->
15
15
  | 版本 | 支持状态 |
16
16
  |------|--------|
17
- | 6.14.1-beta.1 | ✅ 预发布版本 |
18
- | 6.14.0 | ✅ 最新正式版 |
17
+ | 6.14.1 | ✅ 最新正式版 |
19
18
  | < 6.0.0 | ❌ 已终止支持 |
20
19
  <!-- UDS_SUPPORTED_VERSIONS_END -->
21
20
 
@@ -1,6 +1,6 @@
1
1
  # UDS 速查表
2
2
 
3
- > Quick reference for all UDS features | Last updated: 2026-10-13
3
+ > Quick reference for all UDS features | Last updated: 2026-10-30
4
4
 
5
5
  **Language**: [English](../../../docs/user/CHEATSHEET.md) | [繁體中文](../../zh-TW/docs/CHEATSHEET.md) | 简体中文
6
6
 
@@ -356,6 +356,7 @@
356
356
  | `check-error-exit.mjs` | 🔴 沒填就是沒設定,而沒設定會 exit 2, |
357
357
  | `check-external-references.mjs` | External Reference Checker (SPEC-SELFDIAG-001 REQ- |
358
358
  | `check-home-untouched.mjs` | check-home-untouched — did this run write anywhere |
359
+ | `check-hook-entry-tests.mjs` | / |
359
360
  | `check-open-work-tracking.mjs` | Open-work-tracking reference checks for OWT-017 to |
360
361
  | `check-orphan-specs.ps1` | Check Orphan Specs |
361
362
  | `check-orphan-specs.sh` | Orphan Spec Detection Script |
@@ -386,6 +387,7 @@
386
387
  | `fix-manifest-paths.sh` | Manifest Path Fixer |
387
388
  | `generate-adoption-skills.mjs` | Self-Adoption Skill Copy Generator and Drift Gate |
388
389
  | `generate-docs.mjs` | Look up the release date for `version` from CHANGE |
390
+ | `generate-hook-fingerprints.mjs` | Generate the table of hook script contents UDS has |
389
391
  | `generate-llms-txt.mjs` | llms.txt Generator and Drift Gate — XSPEC-385 |
390
392
  | `generate-locale-coverage.mjs` | Locale Coverage Generator |
391
393
  | `generate-version-manifest.mjs` | Generate Version Manifest (SPEC-SELFDIAG-001 REQ-9 |
@@ -1,7 +1,7 @@
1
1
  # UDS 功能参考手册
2
2
 
3
3
  > Universal Development Standards - 完整功能文档
4
- > Auto-generated | Last updated: 2026-10-13
4
+ > Auto-generated | Last updated: 2026-10-30
5
5
 
6
6
  **Language**: [English](../../../docs/reference/FEATURE-REFERENCE.md) | [繁體中文](../../zh-TW/docs/FEATURE-REFERENCE.md) | 简体中文
7
7
 
@@ -15,9 +15,9 @@
15
15
  4. [代理](#agents) (5)
16
16
  5. [工作流程](#workflows) (5)
17
17
  6. [核心规范](#core-standards) (153)
18
- 7. [脚本](#scripts) (66)
18
+ 7. [脚本](#scripts) (68)
19
19
 
20
- **Total Features: 360**
20
+ **Total Features: 362**
21
21
 
22
22
  ---
23
23
 
@@ -160,7 +160,7 @@
160
160
  | `--add-standard` | With --plan or --apply: also install this standard UDS ships and the project lacks, and record it in the manifest (repeatable; `uds update --plan` lists what is available) |
161
161
  | `--claude-target` | Switch an existing install to a different Claude Code integration target: project (CLAUDE.md) or local (CLAUDE.local.md) — moves the UDS block, keeps your content, no reinstall |
162
162
  | `--locale` | Override locale for skills install (zh-tw, zh-cn, en); also reads .uds/install.yaml + UDS_LOCALE env |
163
- | `--with-hooks` | Install the enforcement hooks that are missing from this already-initialized project (re-detects tools; hooks already there and your own hooks are not touched; with --plan, writes nothing; --force also overwrites edited hook scripts) |
163
+ | `--with-hooks` | Install the enforcement hooks that are missing from this already-initialized project (re-detects tools; hooks already there and your own hooks are not touched; a hook script that is an unmodified copy from an older UDS is replaced, an edited one is kept; with --plan, writes nothing; --force also overwrites edited hook scripts) |
164
164
  | `--ai-tool` | With --with-hooks: comma-separated tools to install hooks for (claude-code, codex, gemini-cli, antigravity) instead of detecting them |
165
165
 
166
166
  ### `uds skills`
@@ -520,7 +520,7 @@
520
520
  | `license-compliance` | 2.1.0 | **Status**: Active | **Updated**: 2026-05-16 | |
521
521
  | `llm-output-validation` | - | |
522
522
  | `logging-standards` | 1.4.0 | |
523
- | `mock-boundary` | 1.1.0 | This document defines rules for what can and cannot be mocked in tests. Its goal |
523
+ | `mock-boundary` | 1.3.0 | This document defines rules for what can and cannot be mocked in tests. Its goal |
524
524
  | `model-provenance` | 1.0.0 | **Status**: Active | **Updated**: 2026-06-17 | |
525
525
  | `model-selection` | 2.1.0 | Define how to choose **which model** and **how deeply it should think** — two in |
526
526
  | `multi-environment-e2e-testing` | 1.0.0 | **Status**: Active | **Updated**: 2026-05-13 | |
@@ -585,7 +585,7 @@
585
585
  | `timeout-standards` | - | |
586
586
  | `token-budget` | - | |
587
587
  | `translation-lifecycle-standards` | 1.0.1 | Translation lifecycle standards: MISSING vs OUTDATED distinction, semver-aware s |
588
- | `turn-completion-integrity` | 1.5.0 | An agent writes *"I'll do X next"* and then ends the turn without doing X. |
588
+ | `turn-completion-integrity` | 1.5.1 | An agent writes *"I'll do X next"* and then ends the turn without doing X. |
589
589
  | `user-journey-testing` | - | |
590
590
  | `user-story-mapping` | 1.0.0 | **Status**: Active | **Updated**: 2026-06-17 | |
591
591
  | `verification-evidence` | 1.3.0 | Establish an "Iron Law" that no task can be claimed as complete without verifica |
@@ -623,6 +623,7 @@
623
623
  | `check-error-exit.mjs` | 🔴 沒填就是沒設定,而沒設定會 exit 2, |
624
624
  | `check-external-references.mjs` | External Reference Checker (SPEC-SELFDIAG-001 REQ-5, AC-7) |
625
625
  | `check-home-untouched.mjs` | check-home-untouched — did this run write anywhere UDS writes under HOME? |
626
+ | `check-hook-entry-tests.mjs` | / |
626
627
  | `check-open-work-tracking.mjs` | Open-work-tracking reference checks for OWT-017 to OWT-028 — repo entry point. |
627
628
  | `check-orphan-specs.ps1` | Check Orphan Specs |
628
629
  | `check-orphan-specs.sh` | Orphan Spec Detection Script |
@@ -653,6 +654,7 @@
653
654
  | `fix-manifest-paths.sh` | Manifest Path Fixer |
654
655
  | `generate-adoption-skills.mjs` | Self-Adoption Skill Copy Generator and Drift Gate — XSPEC-385 |
655
656
  | `generate-docs.mjs` | Look up the release date for `version` from CHANGELOG.md's own |
657
+ | `generate-hook-fingerprints.mjs` | Generate the table of hook script contents UDS has shipped (for telling an old UDS copy from an edit). |
656
658
  | `generate-llms-txt.mjs` | llms.txt Generator and Drift Gate — XSPEC-385 |
657
659
  | `generate-locale-coverage.mjs` | Locale Coverage Generator |
658
660
  | `generate-version-manifest.mjs` | Generate Version Manifest (SPEC-SELFDIAG-001 REQ-9, AC-14) |
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  source: ../../CHANGELOG.md
3
- source_version: 6.14.1-beta.1
4
- translation_version: 6.14.1-beta.1
3
+ source_version: 6.14.1
4
+ translation_version: 6.14.1
5
5
  last_synced: 2026-10-30
6
- source_hash: ba57d38f3b74
6
+ source_hash: 27f3513bc034
7
7
  status: current
8
8
  ---
9
9
 
@@ -18,9 +18,25 @@ status: current
18
18
 
19
19
  ## [Unreleased]
20
20
 
21
+ ## [6.14.1] - 2026-10-30
22
+
23
+ > **正式版發布**:包含下方 6.14.1-beta.1 與 beta.2 的所有內容,beta.2 之後沒有任何變更。beta.2 已在 Windows、macOS、Linux 完成發布後驗收(0 項失敗)。**安全修正:**危險指令 hook 現在會真的擋下;已經裝過 hook 的專案執行 `uds update --with-hooks` 即可換上修好的腳本(beta.2)。
24
+
25
+ ## [6.14.1-beta.2] - 2026-10-30
26
+
27
+ > **測試版**——以 `npm install -g universal-dev-standards@beta` 安裝。要測什麼、如何退回正式版:[docs/PRE-RELEASE.md](../../docs/PRE-RELEASE.md)。**在 6.14.1-beta.1 之上的一項修正:** `uds update --with-hooks` 現在會替換舊版 UDS 安裝、且沒有人改過的 hook 腳本,即使 hook 已經設定好。因此已有危險指令 hook 的專案會拿到會攔截的版本;beta.1 留下的是從不攔截的舊副本,還得你手動複製檔案。包含以下 6.14.1-beta.1 的所有內容。
28
+
29
+ ### 修正
30
+
31
+ - **`uds update --with-hooks` 現在會替換舊版 UDS 安裝、且沒有人改過的 hook 腳本,即使 hook 已經設定好。** 在 6.14.1-beta.1,已經有危險指令 hook 的專案會留著 6.14.0 的 `scripts/hooks/check-dangerous-cmd.mjs`,它以 exit 1 結束、從不攔截:安裝器看到 hook 設定「已存在」,印出「已安裝、未動」,從不比對旁邊的腳本(實測:`uds update --with-hooks`、`uds update --with-hooks --force` 與 `uds update --apply` 都讓它原封不動)。現在不論設定是否已存在,每個工具都會比對。與出貨版不同的腳本依內容判斷:若與歷代 UDS 某版出貨的內容逐位元相同(忽略換行字元,所以 Windows 在 `core.autocrlf` 下的檢出仍算),表示沒人改過,直接替換,輸出會列出每個檔案與它來自哪一版;其他任何差異都表示被改過:保留、列出,並說明如何強制。歷代內容列在 `cli/src/installers/hook-script-fingerprints.json`,由 `scripts/generate-hook-fingerprints.mjs` 從 git 標籤產生(不是手寫,也不會被縮減);單元測試在 `scripts/hooks/` 任一腳本的內容不在清單裡時失敗,所以改了 hook 就無法不更新清單而提交,`scripts/pre-release-check.sh` 的第 29 步另檢查每個發版標籤。回報依「實際寫入」而非「量測結果」。**`--force`:** 搭配 `--with-hooks` 時,現在連被改過的 hook 腳本也會用出貨版覆蓋,hook 已經安裝時也一樣(以前只在補裝缺少的 hook 時才會),輸出會說覆蓋了幾個;你的修改沒有備份。`--with-hooks --plan` 列出將替換或覆蓋的項目,且不寫任何檔。**`--apply`、單獨的 `--force` 與一般的 `uds update` 不管理 hook 腳本,仍然不會替換它們;**當其中一個是過期且未改過的副本時,它們現在會印一行說明,並指出 `uds update --with-hooks`。**誰會看到差異:** 用 6.14.0 或更早版本安裝過 hook、並在這個版本執行 `uds update --with-hooks` 的人:他們沒改過的每個 hook 腳本都會被替換(替換的檔案有記錄,所以 `uds uninstall` 仍會移除)。**如果你改過 hook 腳本**,它會被保留,在你手動合併或使用 `--force` 之前拿不到之後的修正(以危險指令 hook 來說,就是 exit 2 的修正)。
32
+
33
+ ### 測試
34
+
35
+ - **macOS 發佈後驗收不再丟失步驟輸出的結尾(在 6.14.0 與 6.14.1-beta.1 發現)。** `xspec482-init-interactive-manual` 只在 macOS 上紅:擷取到的輸出在一行中間斷掉,沒有驅動程式最後印的 `DRIVE-EXIT=0`,但 `uds init` 其實成功了。`scripts/beta-acceptance/steps.json` 裡的驗收輔助程式(兩支互動式驅動程式與三支小包裝)在寫出結果後立刻呼叫 `process.exit()`。標準輸出是管線時,Node 在 macOS 上把放不進管線的部分非同步寫出,`process.exit()` 會把剩下的丟掉;Linux 上同樣的寫入是同步的,所以同一步在那裡是綠的。現在它們等寫完才結束(寫入的回呼,或 `process.exitCode`)。驗證:新增一支測試,用真正的驅動程式文字對一個印 300 KB 的替身、搭配讀得很慢的讀取端;在 macOS 上,修改前只收到 65,536 位元組、沒有 `DRIVE-EXIT` 行,修改後收到全部輸出。**沒有證明的部分:** 真實步驟只印約 2.8 KB,放得進管線,而且在維護者的 macOS 上修改前後都通過,所以 CI 上輸出遺失出自這個原因是合理的判讀,不是量到的結果;以本版的發佈後驗收為準。僅動測試與驗收程式;使用者執行的東西沒有變。
36
+
21
37
  ## [6.14.1-beta.1] - 2026-10-30
22
38
 
23
- > **測試版**——以 `npm install -g universal-dev-standards@beta` 安裝。要測什麼、如何退回正式版:[docs/PRE-RELEASE.md](../../docs/PRE-RELEASE.md)。**安全修正:** 危險指令 hook(`scripts/hooks/check-dangerous-cmd.mjs`)偵測到時以 exit 1 回報,而 Claude Code 不把 exit 1 當成攔截,因此 6.14.0 及更早版本從未擋下任何指令(重播 11,617 筆真實 shell 呼叫,規則命中 26 次,宿主擋下 0 次);現在改以 exit 2 結束,且只判斷指令本身。**已經安裝這個 hook 的專案會保留舊的腳本副本,直到你把它換掉;見「修正」的第一條。**另修正:提交訊息 hook 略過 `git commit -am "..."` 與其他合併短旗標,以及 `uds update --skills --commands` 只執行兩者其中之一。包含以下 6.14.0 的所有內容。
39
+ > **測試版**——以 `npm install -g universal-dev-standards@beta` 安裝。要測什麼、如何退回正式版:[docs/PRE-RELEASE.md](../../docs/PRE-RELEASE.md)。**安全修正:** 危險指令 hook(`scripts/hooks/check-dangerous-cmd.mjs`)偵測到時以 exit 1 回報,而 Claude Code 不把 exit 1 當成攔截,因此 6.14.0 及更早版本從未擋下任何指令(重播 11,617 筆真實 shell 呼叫,規則命中 26 次,宿主擋下 0 次);現在改以 exit 2 結束,且只判斷指令本身。**在這個版本,已經安裝這個 hook 的專案會保留舊的腳本副本,直到你手動換掉;6.14.1-beta.2(見上)已修正:`uds update --with-hooks` 會替換它。**另修正:提交訊息 hook 略過 `git commit -am "..."` 與其他合併短旗標,以及 `uds update --skills --commands` 只執行兩者其中之一。包含以下 6.14.0 的所有內容。
24
40
 
25
41
  ### 新增
26
42
 
@@ -28,7 +44,7 @@ status: current
28
44
 
29
45
  ### 修正
30
46
 
31
- - **危險指令 hook 現在會攔截,且不再擋下一般的清理指令。** `scripts/hooks/check-dangerous-cmd.mjs`(安全標準的 PreToolUse/Bash hook)從來沒有擋下過任何東西:它以 exit 1 結束,而 Claude Code 只在 exit 2 時攔截工具呼叫,所以指令照常執行。它還拿整段 stdin JSON 來比對,而不是 `tool_input.command`。重播 11,617 筆真實 shell 呼叫,舊的 `rm -rf /` 規則命中 26 次,其中 25 次是無害的暫存清理(`rm -rf /tmp/x`),而 `rm -fr /` 與 `rm -r -f /` 卻漏網。現在 hook 讀取 `tool_input.command`(stdin 不是 JSON 時讀取原始指令列),以 exit 2 攔截並在 stderr 寫出規則名稱;`rm` 只在遞迴且目標正好是 `/`、`/*`、`~`、`~/` 或 `$HOME` 時才攔截,旗標順序不拘,`sudo` 之後也適用。原本從未命中任何東西的 fork bomb 規則(`()` 是空的 regex 群組)現在會命中;沒有點號的 `mkfs`、沒有 `if=` 的 `dd of=/dev/…`,以及對 `/` 之下路徑的 `chmod -R 777`(以前會誤中 `/home/me/x`)改以指令詞判斷,而不是子字串。**行為改變:** `rm -rf /home` 與其他根目錄之下的路徑不再被攔截;它們不是這條規則原本要防的對象。命令列模式(`node check-dangerous-cmd.mjs "<command>"`)現在也以 exit 2 而非 1 結束。 **已經安裝這個 hook 的專案不會從 `uds update` 取得修正:** 安裝器會保留 `scripts/hooks/` 裡已有的 hook 腳本;在這個版本上實測,`uds update --with-hooks`、`uds update --with-hooks --force` 與 `uds update --apply` 都讓舊的 `check-dangerous-cmd.mjs` 原封不動(舊副本對 `rm -rf /` 仍以 exit 1 結束)。要取得修正,請把隨附的檔案複製過去覆蓋:`cp "$(npm root -g)/universal-dev-standards/bundled/hooks/check-dangerous-cmd.mjs" scripts/hooks/`。在這個版本上執行 `uds init --with-hooks` 的專案會拿到修正後的腳本。
47
+ - **危險指令 hook 現在會攔截,且不再擋下一般的清理指令。** `scripts/hooks/check-dangerous-cmd.mjs`(安全標準的 PreToolUse/Bash hook)從來沒有擋下過任何東西:它以 exit 1 結束,而 Claude Code 只在 exit 2 時攔截工具呼叫,所以指令照常執行。它還拿整段 stdin JSON 來比對,而不是 `tool_input.command`。重播 11,617 筆真實 shell 呼叫,舊的 `rm -rf /` 規則命中 26 次,其中 25 次是無害的暫存清理(`rm -rf /tmp/x`),而 `rm -fr /` 與 `rm -r -f /` 卻漏網。現在 hook 讀取 `tool_input.command`(stdin 不是 JSON 時讀取原始指令列),以 exit 2 攔截並在 stderr 寫出規則名稱;`rm` 只在遞迴且目標正好是 `/`、`/*`、`~`、`~/` 或 `$HOME` 時才攔截,旗標順序不拘,`sudo` 之後也適用。原本從未命中任何東西的 fork bomb 規則(`()` 是空的 regex 群組)現在會命中;沒有點號的 `mkfs`、沒有 `if=` 的 `dd of=/dev/…`,以及對 `/` 之下路徑的 `chmod -R 777`(以前會誤中 `/home/me/x`)改以指令詞判斷,而不是子字串。**行為改變:** `rm -rf /home` 與其他根目錄之下的路徑不再被攔截;它們不是這條規則原本要防的對象。命令列模式(`node check-dangerous-cmd.mjs "<command>"`)現在也以 exit 2 而非 1 結束。 **在這個版本,已經安裝這個 hook 的專案不會從 `uds update` 取得修正:** 安裝器會保留 `scripts/hooks/` 裡已有的 hook 腳本(實測:`uds update --with-hooks`、`uds update --with-hooks --force` 與 `uds update --apply` 都讓舊的 `check-dangerous-cmd.mjs` 原封不動,它對 `rm -rf /` 仍以 exit 1 結束),當時的解法是手動把隨附的檔案複製過去覆蓋。6.14.1-beta.2(見上)已修正這一點。在這個版本上執行 `uds init --with-hooks` 的專案拿到的是修正後的腳本。
32
48
  - **結構化日誌 hook 現在會傳到模型。** `scripts/hooks/check-logging-standard.mjs`(PostToolUse/Write)原本以 exit 1 結束,Claude Code 視為不攔截的 hook 錯誤,模型看不到訊息;現在改以 exit 2,讓 stderr 的建議回饋給模型,且只判斷寫入的文字(`tool_input.content` 或 `new_string`),不看 payload 的其餘部分。Write 已經發生,所以這無法復原任何事。
33
49
  - **提交訊息 hook 現在檢查 git 在命令列上接收訊息的每一種寫法,且不再擋下它誤讀的訊息。** `scripts/hooks/validate-commit-msg.mjs`(PreToolUse/Bash hook)原本只在單獨的 `-m` 之後找訊息,所以 `git commit -am "wip"`(由它新增的進入點測試發現)與其他所有合併短旗標(`-vam`、`-sam`)都不經檢查就放行。現在它像 git 一樣讀取命令:`-m` 出現在短旗標串的任何位置,值附在後面(`-m"msg"`、`-mmsg`、`-am"msg"`)或接在下一個詞,`--message=msg`、`--message msg` 與 git 不含糊的縮寫(`--mess=msg`),以及串接命令中的每一個 `git commit`(`git commit -m "feat: a" && git commit -m wip` 在第二個被擋下)。多個 `-m` 如 git 一樣以空行相連,所以被判斷的是第一個,即主旨。同一次重寫也修掉兩種誤擋,成因是在讀取引號之前就在 `;`、`&&`、`|` 與換行處切開命令:訊息本身含其中之一(`-m "feat: a; b"`),以及 Claude Code 最常寫的 `-m "$(cat <<'EOF' ... EOF)"` 形式——它以前被當成垃圾訊息 `"$(cat` 擋下,現在改以本文判斷。訊息文字不在命令列上的提交照舊放行:`-F`、`-C`/`-c`、`--amend --no-edit`、編輯器、`--fixup`/`--squash`(git 自己寫 `fixup!` 主旨,`-m` 變成本文),以及由 shell 計算的訊息(`-m "$MSG"`、`$(...)`、反引號)。**行為改變:** 以前放行的命令,在訊息不是 Conventional Commit 時現在會被擋下:`-am`/`-vam` 風格的提交、`--message`、串接命令的第二個提交,以及 `VAR=value` 之後的提交。
34
50
  - **`uds update --skills --commands` 現在兩者都更新;以前只更新一邊,對另一邊什麼也沒說(在 6.14.0 的 Windows 11 上發現)。** 兩個旗標都帶並加 `--apply` 時,只有指令執行:Skills 段落從未出現,manifest 裡的 Skills 停在舊版本(一個專案:51 個指令已更新,Skills 仍在 6.11.0),結束碼是 0。兩個旗標都帶但不加 `--apply` 時,只有 Skills 執行,`--commands` 被丟掉。旗標的順序沒有差別。原因:兩個步驟各自在完成時結束整個程序,所以另一個永遠沒開始,且不加 `--apply` 的路徑在第一個之後就返回。現在兩者都執行,不論旗標順序都是 Skills 先、指令後,各自印出自己的段落,並以兩者中較差的結束碼結束(任一邊失敗即非 0,`--apply` 對帳已記下的失敗也一樣)。單一範圍(只帶 `--skills` 或只帶 `--commands`)的行為與輸出和以前完全相同,`--plan --skills --commands` 本來就會規劃兩者,沒有改變。**誰會看到差異:** 傳過兩個旗標的人。請再執行一次 `uds update --apply --yes --skills --commands`;經過那次有問題的執行的專案沒有損壞,只是它的 Skills(或指令)落後。有一件事這次沒有改變:只帶單一範圍的 `--apply` 在對帳中失敗時仍以結束碼 0 結束,因為該步驟一向以明確的 0 結束程序。
@@ -15,7 +15,7 @@ status: current
15
15
 
16
16
  > **語言**: [English](../../README.md) | 繁體中文 | [简体中文](../zh-CN/README.md)
17
17
 
18
- **版本**: 6.14.1-beta.1 (Pre-release) | **發布日期**: 2026-10-30 | **授權**: [雙重授權](../../LICENSE) (CC BY 4.0 + MIT)
18
+ **版本**: 6.14.1 | **發布日期**: 2026-10-30 | **授權**: [雙重授權](../../LICENSE) (CC BY 4.0 + MIT)
19
19
 
20
20
  語言無關、框架無關的軟體專案文件標準。透過 AI 原生工作流,確保不同技術堆疊之間的一致性、品質和可維護性。
21
21
 
@@ -3,7 +3,7 @@ source: ../../SECURITY.md
3
3
  source_version: 1.0.0
4
4
  translation_version: 1.0.0
5
5
  last_synced: 2026-10-15
6
- source_hash: 352db63aa759
6
+ source_hash: c59c8f74b4aa
7
7
  status: current
8
8
  ---
9
9
 
@@ -14,8 +14,7 @@ status: current
14
14
  <!-- UDS_SUPPORTED_VERSIONS_START -->
15
15
  | 版本 | 支援狀態 |
16
16
  |------|--------|
17
- | 6.14.1-beta.1 | ✅ 預發布版本 |
18
- | 6.14.0 | ✅ 最新正式版 |
17
+ | 6.14.1 | ✅ 最新正式版 |
19
18
  | < 6.0.0 | ❌ 已終止支援 |
20
19
  <!-- UDS_SUPPORTED_VERSIONS_END -->
21
20
 
@@ -1,6 +1,6 @@
1
1
  # UDS 速查表
2
2
 
3
- > Quick reference for all UDS features | Last updated: 2026-10-13
3
+ > Quick reference for all UDS features | Last updated: 2026-10-30
4
4
 
5
5
  **Language**: [English](../../../docs/user/CHEATSHEET.md) | 繁體中文 | [简体中文](../../zh-CN/docs/CHEATSHEET.md)
6
6
 
@@ -356,6 +356,7 @@
356
356
  | `check-error-exit.mjs` | 🔴 沒填就是沒設定,而沒設定會 exit 2, |
357
357
  | `check-external-references.mjs` | External Reference Checker (SPEC-SELFDIAG-001 REQ- |
358
358
  | `check-home-untouched.mjs` | check-home-untouched — did this run write anywhere |
359
+ | `check-hook-entry-tests.mjs` | / |
359
360
  | `check-open-work-tracking.mjs` | Open-work-tracking reference checks for OWT-017 to |
360
361
  | `check-orphan-specs.ps1` | Check Orphan Specs |
361
362
  | `check-orphan-specs.sh` | Orphan Spec Detection Script |
@@ -386,6 +387,7 @@
386
387
  | `fix-manifest-paths.sh` | Manifest Path Fixer |
387
388
  | `generate-adoption-skills.mjs` | Self-Adoption Skill Copy Generator and Drift Gate |
388
389
  | `generate-docs.mjs` | Look up the release date for `version` from CHANGE |
390
+ | `generate-hook-fingerprints.mjs` | Generate the table of hook script contents UDS has |
389
391
  | `generate-llms-txt.mjs` | llms.txt Generator and Drift Gate — XSPEC-385 |
390
392
  | `generate-locale-coverage.mjs` | Locale Coverage Generator |
391
393
  | `generate-version-manifest.mjs` | Generate Version Manifest (SPEC-SELFDIAG-001 REQ-9 |
@@ -1,7 +1,7 @@
1
1
  # UDS 功能參考手冊
2
2
 
3
3
  > Universal Development Standards - 完整功能文件
4
- > Auto-generated | Last updated: 2026-10-13
4
+ > Auto-generated | Last updated: 2026-10-30
5
5
 
6
6
  **Language**: [English](../../../docs/reference/FEATURE-REFERENCE.md) | 繁體中文 | [简体中文](../../zh-CN/docs/FEATURE-REFERENCE.md)
7
7
 
@@ -15,9 +15,9 @@
15
15
  4. [代理](#agents) (5)
16
16
  5. [工作流程](#workflows) (5)
17
17
  6. [核心規範](#core-standards) (153)
18
- 7. [腳本](#scripts) (66)
18
+ 7. [腳本](#scripts) (68)
19
19
 
20
- **Total Features: 360**
20
+ **Total Features: 362**
21
21
 
22
22
  ---
23
23
 
@@ -160,7 +160,7 @@
160
160
  | `--add-standard` | With --plan or --apply: also install this standard UDS ships and the project lacks, and record it in the manifest (repeatable; `uds update --plan` lists what is available) |
161
161
  | `--claude-target` | Switch an existing install to a different Claude Code integration target: project (CLAUDE.md) or local (CLAUDE.local.md) — moves the UDS block, keeps your content, no reinstall |
162
162
  | `--locale` | Override locale for skills install (zh-tw, zh-cn, en); also reads .uds/install.yaml + UDS_LOCALE env |
163
- | `--with-hooks` | Install the enforcement hooks that are missing from this already-initialized project (re-detects tools; hooks already there and your own hooks are not touched; with --plan, writes nothing; --force also overwrites edited hook scripts) |
163
+ | `--with-hooks` | Install the enforcement hooks that are missing from this already-initialized project (re-detects tools; hooks already there and your own hooks are not touched; a hook script that is an unmodified copy from an older UDS is replaced, an edited one is kept; with --plan, writes nothing; --force also overwrites edited hook scripts) |
164
164
  | `--ai-tool` | With --with-hooks: comma-separated tools to install hooks for (claude-code, codex, gemini-cli, antigravity) instead of detecting them |
165
165
 
166
166
  ### `uds skills`
@@ -520,7 +520,7 @@
520
520
  | `license-compliance` | 2.1.0 | **Status**: Active | **Updated**: 2026-05-16 | |
521
521
  | `llm-output-validation` | - | |
522
522
  | `logging-standards` | 1.4.0 | |
523
- | `mock-boundary` | 1.1.0 | This document defines rules for what can and cannot be mocked in tests. Its goal |
523
+ | `mock-boundary` | 1.3.0 | This document defines rules for what can and cannot be mocked in tests. Its goal |
524
524
  | `model-provenance` | 1.0.0 | **Status**: Active | **Updated**: 2026-06-17 | |
525
525
  | `model-selection` | 2.1.0 | Define how to choose **which model** and **how deeply it should think** — two in |
526
526
  | `multi-environment-e2e-testing` | 1.0.0 | **Status**: Active | **Updated**: 2026-05-13 | |
@@ -585,7 +585,7 @@
585
585
  | `timeout-standards` | - | |
586
586
  | `token-budget` | - | |
587
587
  | `translation-lifecycle-standards` | 1.0.1 | Translation lifecycle standards: MISSING vs OUTDATED distinction, semver-aware s |
588
- | `turn-completion-integrity` | 1.5.0 | An agent writes *"I'll do X next"* and then ends the turn without doing X. |
588
+ | `turn-completion-integrity` | 1.5.1 | An agent writes *"I'll do X next"* and then ends the turn without doing X. |
589
589
  | `user-journey-testing` | - | |
590
590
  | `user-story-mapping` | 1.0.0 | **Status**: Active | **Updated**: 2026-06-17 | |
591
591
  | `verification-evidence` | 1.3.0 | Establish an "Iron Law" that no task can be claimed as complete without verifica |
@@ -623,6 +623,7 @@
623
623
  | `check-error-exit.mjs` | 🔴 沒填就是沒設定,而沒設定會 exit 2, |
624
624
  | `check-external-references.mjs` | External Reference Checker (SPEC-SELFDIAG-001 REQ-5, AC-7) |
625
625
  | `check-home-untouched.mjs` | check-home-untouched — did this run write anywhere UDS writes under HOME? |
626
+ | `check-hook-entry-tests.mjs` | / |
626
627
  | `check-open-work-tracking.mjs` | Open-work-tracking reference checks for OWT-017 to OWT-028 — repo entry point. |
627
628
  | `check-orphan-specs.ps1` | Check Orphan Specs |
628
629
  | `check-orphan-specs.sh` | Orphan Spec Detection Script |
@@ -653,6 +654,7 @@
653
654
  | `fix-manifest-paths.sh` | Manifest Path Fixer |
654
655
  | `generate-adoption-skills.mjs` | Self-Adoption Skill Copy Generator and Drift Gate — XSPEC-385 |
655
656
  | `generate-docs.mjs` | Look up the release date for `version` from CHANGELOG.md's own |
657
+ | `generate-hook-fingerprints.mjs` | Generate the table of hook script contents UDS has shipped (for telling an old UDS copy from an edit). |
656
658
  | `generate-llms-txt.mjs` | llms.txt Generator and Drift Gate — XSPEC-385 |
657
659
  | `generate-locale-coverage.mjs` | Locale Coverage Generator |
658
660
  | `generate-version-manifest.mjs` | Generate Version Manifest (SPEC-SELFDIAG-001 REQ-9, AC-14) |
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "universal-dev-standards",
3
- "version": "6.14.0",
3
+ "version": "6.14.1",
4
4
  "description": "Skills for development standards: commit messages, code review, testing, documentation, and more, covering the full development lifecycle.",
5
5
  "author": {
6
6
  "name": "AsiaOstrich",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "universal-dev-standards",
3
- "version": "6.14.1-beta.1",
3
+ "version": "6.14.1",
4
4
  "description": "CLI tool for adopting Universal Development Standards",
5
5
  "keywords": [
6
6
  "documentation",
@@ -58,7 +58,7 @@ import {
58
58
  import { getMarketplaceSkillsInfo } from '../utils/github.js';
59
59
  import { printSkillNameCollisionWarning } from '../utils/skill-name-collision.js';
60
60
  import { detectAITools } from '../utils/detector.js';
61
- import { HOOK_CAPABLE_TOOLS, resolveHookTools, installMissingHooks } from '../installers/hooks-installer.js';
61
+ import { HOOK_CAPABLE_TOOLS, resolveHookTools, installMissingHooks, staleHookScripts } from '../installers/hooks-installer.js';
62
62
  import { persistRecorder, mergeRecorderInto, newRecorder } from '../core/install-records.js';
63
63
  import { installGateScripts, gateStandardInstalled, GATE_SCRIPTS } from '../utils/gate-scripts.js';
64
64
  import { migrateLegacyHuskyHook, migrateHuskyBlockWithoutCi, migrateOlderNativeHook } from '../utils/legacy-hook-migration.js';
@@ -431,6 +431,19 @@ export async function updateCommand(options) {
431
431
  console.log(chalk.bold(msg.title));
432
432
  console.log(chalk.gray('─'.repeat(50)));
433
433
 
434
+ // Hook scripts are not part of what this command (or --apply, --force, --plan) reconciles; only
435
+ // `--with-hooks` replaces them. Say so when one is out of date, because the symptom of an old
436
+ // script is a hook that quietly does not do what the new version does (6.14.1-beta.1: the
437
+ // dangerous-command hook that never blocked).
438
+ if (!options.withHooks && !options.rollback) {
439
+ const stale = staleHookScripts(projectPath);
440
+ if (stale.length) {
441
+ console.log(chalk.yellow(` ! ${stale.length} hook script(s) in scripts/hooks/ are unmodified copies of an older UDS and are NOT updated by this command: ${stale.slice(0, 5).map((x) => x.path).join(', ')}${stale.length > 5 ? ', ...' : ''}`));
442
+ console.log(chalk.gray(' Replace them with: uds update --with-hooks (add --plan first to see what changes)'));
443
+ console.log();
444
+ }
445
+ }
446
+
434
447
  // XSPEC-458 R3: `--add-standard <id>` (repeatable) picks standards UDS ships and this project lacks.
435
448
  // Judged here, before any mode runs, so an unknown id stops everything instead of being skipped.
436
449
  const addStandardIds = [].concat(options.addStandard || []);
@@ -2053,9 +2066,27 @@ export async function updateHooksOnly(projectPath, manifest, options = {}) {
2053
2066
  else if (r.outcome === 'unchanged') console.log(chalk.gray(` · ${r.tool}: already installed, not touched — ${rel}`));
2054
2067
  else { failed = true; console.log(chalk.yellow(` ⚠ ${r.tool}: not installed — ${r.why}`)); }
2055
2068
  }
2056
- const installedAny = results.some((r) => r.outcome === 'installed' || r.outcome === 'would-install');
2057
- if (installedAny && scripts.kept.length) {
2058
- console.log(chalk.yellow(` ! ${scripts.kept.length} hook script(s) in scripts/hooks/ differ from this UDS version and were kept: ${scripts.kept.slice(0, 5).join(', ')}${scripts.kept.length > 5 ? ', ...' : ''}`));
2069
+ // Scripts are judged apart from the hook config: a config that is already there says nothing about
2070
+ // whether the script beside it is current (6.14.1-beta.1 shipped a security fix to exactly such a script).
2071
+ const fmt = (list) => `${list.slice(0, 5).join(', ')}${list.length > 5 ? ', ...' : ''}`;
2072
+ // A plan reports what is measured; a real run reports only what the installer says it WROTE
2073
+ // (`replaced`), never what it measured — so a refresh that did nothing cannot print "replaced".
2074
+ const sinceOf = new Map((scripts.stale ?? []).map((x) => [x.path, x.since]));
2075
+ const stale = (options.plan ? (scripts.stale ?? []).map((x) => x.path) : (scripts.replaced ?? []));
2076
+ if (stale.length) {
2077
+ const named = fmt(stale.map((p) => `${p} (unmodified copy from UDS ${sinceOf.get(p)})`));
2078
+ if (options.plan) console.log(chalk.cyan(` + would replace ${stale.length} out-of-date hook script(s) in scripts/hooks/: ${named}`));
2079
+ else console.log(chalk.green(` ✓ replaced ${stale.length} out-of-date hook script(s) in scripts/hooks/: ${named}`));
2080
+ }
2081
+ const overwritten = options.plan ? (options.force ? scripts.kept : []) : (scripts.overwritten ?? []);
2082
+ if (overwritten.length) {
2083
+ if (options.plan) console.log(chalk.cyan(` + --force would overwrite ${overwritten.length} edited hook script(s): ${fmt(overwritten)}`));
2084
+ else console.log(chalk.yellow(` ! --force: overwrote ${overwritten.length} edited hook script(s) with the shipped version: ${fmt(overwritten)}`));
2085
+ }
2086
+ const kept = options.plan && options.force ? [] : scripts.kept;
2087
+ if (kept.length) {
2088
+ console.log(chalk.yellow(` ! ${kept.length} hook script(s) in scripts/hooks/ differ from this UDS version and ${options.plan ? 'would be' : 'were'} kept: ${fmt(kept)}`));
2089
+ console.log(chalk.gray(' They match no copy UDS ever shipped, so they look edited (or are not UDS\'s). An edited script does not receive fixes made to the shipped one.'));
2059
2090
  console.log(chalk.gray(' Add --force to overwrite them with the shipped versions.'));
2060
2091
  }
2061
2092
  if (results.some((r) => r.tool === 'antigravity' && r.outcome === 'installed')) {
@@ -2064,7 +2095,7 @@ export async function updateHooksOnly(projectPath, manifest, options = {}) {
2064
2095
  if (results.some((r) => r.tool === 'codex' && r.outcome === 'installed')) {
2065
2096
  console.log(chalk.yellow(' ⚠ Codex will not run it until you trust it: open Codex in this project, trust the project, then run /hooks and trust this hook.'));
2066
2097
  }
2067
- if (!results.some((r) => r.outcome === 'installed' || r.outcome === 'would-install')) {
2098
+ if (!results.some((r) => r.outcome === 'installed' || r.outcome === 'would-install') && !stale.length && !overwritten.length) {
2068
2099
  console.log(chalk.gray(' Nothing to add.'));
2069
2100
  }
2070
2101
  console.log();
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Which hook-script contents did UDS itself ship in the past?
3
+ *
4
+ * `uds update --with-hooks` must tell two different things apart when a script in
5
+ * `<project>/scripts/hooks/` differs from the version in this package:
6
+ *
7
+ * - an OLD UDS copy nobody touched -> safe to replace with the new one
8
+ * - a copy the adopter EDITED -> must be kept (it may carry their changes)
9
+ *
10
+ * A byte-for-byte match against a script some earlier UDS release shipped is the only
11
+ * evidence of the first kind. The table lives in `hook-script-fingerprints.json`,
12
+ * produced from the git tags by `scripts/generate-hook-fingerprints.mjs` — never typed
13
+ * by hand — and `tests/unit/hooks/hook-script-fingerprints.test.js` fails the moment a
14
+ * script under `scripts/hooks/` has a content the table does not know.
15
+ *
16
+ * Keyed by path as well as by hash: a file shipped under one name does not make the
17
+ * same bytes "UDS's" under another.
18
+ *
19
+ * Node built-ins only. The generator in the repo root imports this file, and the CI
20
+ * jobs that run root scripts install no packages (see
21
+ * tests/e2e/root-scripts-need-no-cli-packages.test.js).
22
+ *
23
+ * @module installers/hook-script-fingerprint
24
+ */
25
+
26
+ import { createHash } from 'node:crypto';
27
+ import { readFileSync } from 'node:fs';
28
+ import { dirname, join } from 'node:path';
29
+ import { fileURLToPath } from 'node:url';
30
+
31
+ export const FINGERPRINT_FILE = join(dirname(fileURLToPath(import.meta.url)), 'hook-script-fingerprints.json');
32
+
33
+ /**
34
+ * sha256 of the script with CRLF folded to LF.
35
+ *
36
+ * A project that commits `scripts/hooks/` on Windows with `core.autocrlf=true` has the
37
+ * same script with different line endings; that is not an edit. Folding is done on a
38
+ * latin1 view so no byte is reinterpreted.
39
+ *
40
+ * @param {Buffer} buf
41
+ * @returns {string} 64 hex chars
42
+ */
43
+ export function hashHookScript(buf) {
44
+ const folded = Buffer.from(buf.toString('latin1').replace(/\r\n/g, '\n'), 'latin1');
45
+ return createHash('sha256').update(folded).digest('hex');
46
+ }
47
+
48
+ /**
49
+ * @returns {{ scripts: Record<string, Record<string, string>> }} path -> { sha256 -> first release that shipped it }
50
+ */
51
+ export function loadFingerprints(file = FINGERPRINT_FILE) {
52
+ const parsed = JSON.parse(readFileSync(file, 'utf-8'));
53
+ return { scripts: parsed.scripts ?? {} };
54
+ }
55
+
56
+ /**
57
+ * Is `buf` exactly a copy of `relPath` that an earlier UDS shipped?
58
+ *
59
+ * @param {string} relPath path under scripts/hooks, with `/` separators
60
+ * @param {Buffer} buf the project's copy
61
+ * @param {{ scripts: Record<string, Record<string, string>> }} [table]
62
+ * @returns {{ since: string } | null} `since` = first release that shipped this content
63
+ */
64
+ export function shippedBefore(relPath, buf, table = loadFingerprints()) {
65
+ const known = table.scripts[relPath];
66
+ if (!known) return null;
67
+ const since = known[hashHookScript(buf)];
68
+ return since ? { since } : null;
69
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "_about": "Generated by scripts/generate-hook-fingerprints.mjs from git tags. Do not edit by hand. Append-only: sha256 of each hook script content UDS has shipped (CRLF folded to LF), with the first release that carried it.",
3
+ "scripts": {
4
+ "check-dangerous-cmd.js": {
5
+ "7cc865f4dd09c88899b939e170b953ee97d5aa3e0502769e47b7f8732f30bddb": "v5.1.0-beta.5"
6
+ },
7
+ "check-dangerous-cmd.mjs": {
8
+ "b18d6eb63c073679ce599821ebd0d95b7f276ca8fbcf60dc2d961e5b053ad053": "v6.9.0",
9
+ "0813a859c5b26cb7d13fab5d9dec9212c9fb946aeb9d2d0595b817fd21e08ae8": "v6.14.1-beta.1"
10
+ },
11
+ "check-logging-standard.js": {
12
+ "435b7d937da791499924ef64f6de601e90a442b3a1e10783925cfafe5de4b7ab": "v5.1.0-beta.5"
13
+ },
14
+ "check-logging-standard.mjs": {
15
+ "af5f3f7efa7d9f0ffa199b76c823772473c9d26743e02169373e9f09839ca3bd": "v6.9.0",
16
+ "d7cef4d1c10a919884baf1e5825e92a14b22ca0ebb13c9a758e297ff6046fa2d": "v6.14.1-beta.1"
17
+ },
18
+ "check-turn-completion-agy.mjs": {
19
+ "082e1e7493d00be881c6ec15155883494bbc1aa24f99845ec25a2daf48e82579": "v6.14.0-beta.1"
20
+ },
21
+ "check-turn-completion-codex.mjs": {
22
+ "ec6ba6bb181304b925b76b65a11c37380a24c787c8954a66692522bfc1d5e6db": "v6.13.0-beta.1",
23
+ "503657443b6d069d77ac9a57e170ee75289d7ee763833847f1d523013dadba0f": "v6.13.0-beta.2"
24
+ },
25
+ "check-turn-completion-gemini.mjs": {
26
+ "6dd7455613516966ed233b9c2000ec25394dfc7bacb3d307bc0c4418539f11d8": "v6.13.0-beta.1"
27
+ },
28
+ "check-turn-completion.mjs": {
29
+ "05cb5afdf104a32049c45e663a95e5294889a14421aff1a7ff3b45fd6451e355": "v6.9.0",
30
+ "acb8a858a1266342c6b5e6c81870ea545024774b9f2548a153ce7f9eca77918c": "v6.13.0-beta.1",
31
+ "789a530867920d14432da95da2db64753eee730785711fd85668dd3758694933": "v6.13.0-beta.5"
32
+ },
33
+ "inject-standards.js": {
34
+ "1403a37dd8de000a56efc2ee7365d2961ad2d996c661c8fcdffc12fcb0344f93": "v5.0.0-rc.6",
35
+ "ef0eec1d99f9287c15f6cf47f37a22dc4238a401d05c2ae6fbc9cda437ec18b4": "v5.1.0-beta.4",
36
+ "c8c5bf56dacb341efe0fdf1d2e084b015ac30ec374767ebee3354350b500e939": "v5.1.0-beta.5",
37
+ "fdd5f30fc1352e9b89da9d6a6a5de1b2c18efbac27f970ef1a78a01a80a1168b": "v6.0.0"
38
+ },
39
+ "inject-standards.mjs": {
40
+ "fdd5f30fc1352e9b89da9d6a6a5de1b2c18efbac27f970ef1a78a01a80a1168b": "v6.9.0"
41
+ },
42
+ "telemetry-wrapper.js": {
43
+ "cfa203e3552d9d03b5bc183bb8298aa21f1affca9b25059a1ff06ad59178f538": "v5.1.0-beta.5"
44
+ },
45
+ "telemetry-wrapper.mjs": {
46
+ "cfa203e3552d9d03b5bc183bb8298aa21f1affca9b25059a1ff06ad59178f538": "v6.9.0"
47
+ },
48
+ "turn-completion/detect.mjs": {
49
+ "40e084f6863165b8e200abf18381ffe15dc33d7d5de68b3d7d0761c32890159b": "v6.9.0"
50
+ },
51
+ "turn-completion/engine.mjs": {
52
+ "ab8c6a5ca864b4b38d347f8bd5d5b476a125c98371c16712a8db757078a7bbd8": "v6.13.0-beta.1",
53
+ "1ad9aa9faa9f81c0fd2eae5c426d226fc1cac5d872245f875ae847ac1b16e33d": "v6.13.0-beta.4"
54
+ },
55
+ "turn-completion/locales/en.mjs": {
56
+ "be2baa01821958d4207c57a43b162740e808f482112ceebff54867d6adec6552": "v6.9.0",
57
+ "00534557520151bc2406a3dbba7361884318005a9cbf4c7cdccd590dfcfe177b": "v6.13.0-beta.1",
58
+ "12c4cb76ee77f8a9c3aa41518469baeb386f0dfaf3cf30de30c7bb8fe9549d56": "v6.13.0-beta.2",
59
+ "eb2a730340189d9fdeccc7b387cd2347ace46ab7f277d93370f1243636df8e00": "v6.14.0-beta.2"
60
+ },
61
+ "turn-completion/locales/zh-TW.mjs": {
62
+ "f5a7025642b62b12f7adbe75fa76b88b0d539b7cb88978b7aca03d5aad036609": "v6.9.0",
63
+ "9d93e7c9a1e61163e718bbc041b8f0956890fec78c7dce8da024a1d9b107d4ea": "v6.13.0-beta.1",
64
+ "712c6a59fadc70c1309513eba8cab6dad3447caebb1e9f696c261f3a686fce54": "v6.13.0-beta.2",
65
+ "b7e756a475403accf6b96f1a534d9334c38ced082b328ee751f52a1a22ed95b4": "v6.14.0-beta.2"
66
+ },
67
+ "validate-commit-msg.js": {
68
+ "e90182ee437da8f6f0420b341b06b8e546873a98ed09ecffd18ad6ac35fcef0e": "v5.1.0-beta.5"
69
+ },
70
+ "validate-commit-msg.mjs": {
71
+ "aca50fbdcd903d06eecf76abf4e213561e38fffde7b7617947f08e9b26e9d4d1": "v6.9.0",
72
+ "7afdaaddaf990f21ac607c67ed0798f536d69c3145c6bf4ff3dd813031dcf026": "v6.14.0-beta.13",
73
+ "bb5af4bdf49bb49d36951a5537fae894d4891146c159eed572e31cd527a9388e": "v6.14.1-beta.1"
74
+ }
75
+ }
76
+ }
@@ -38,6 +38,7 @@ import { execFileSync } from 'child_process';
38
38
  import { load as parseYaml } from 'js-yaml';
39
39
  import { detectAITools } from '../utils/detector.js';
40
40
  import { newRecorder, mkdirTracked, recordFile, RECORD_KINDS } from '../core/install-records.js';
41
+ import { shippedBefore, loadFingerprints } from './hook-script-fingerprint.js';
41
42
 
42
43
  const __dirname = dirname(fileURLToPath(import.meta.url));
43
44
 
@@ -564,18 +565,37 @@ export function hookStatus(projectPath, tool) {
564
565
  return { status: 'blocked', path: '', why: `no hook installer for ${tool}` };
565
566
  }
566
567
 
567
- /** Hook scripts UDS ships vs what the project already has: how many are new, identical, or edited. */
568
+ /**
569
+ * Hook scripts UDS ships vs what the project already has, measured before anything is copied.
570
+ *
571
+ * added not in the project yet
572
+ * identical byte-for-byte the shipped one
573
+ * stale differs, but is exactly a copy some EARLIER UDS shipped (nobody edited it):
574
+ * [{ path, since }] — safe to replace
575
+ * kept differs and matches nothing UDS ever shipped, so it was edited (or is not ours):
576
+ * [path] — left alone unless `--force`
577
+ *
578
+ * 🔴 Why `stale` exists (2026-10-29): this used to be a single "differs -> kept" bucket, and it was
579
+ * only consulted when a hook config had to be written. A project whose config was already present
580
+ * never reached the copy at all, so the 6.14.1-beta.1 fix to check-dangerous-cmd.mjs (exit 2
581
+ * instead of a non-blocking exit 1) never arrived by any `uds update` form. "Differs" alone cannot
582
+ * separate an old UDS copy from an adopter's edit; only a match against what UDS shipped can.
583
+ */
568
584
  function scriptDiff(projectPath) {
569
585
  const src = hooksSourceDir();
570
- const out = { added: 0, identical: 0, kept: [] };
586
+ const out = { added: 0, identical: 0, stale: [], kept: [] };
571
587
  if (!src) return out;
588
+ const table = loadFingerprints();
572
589
  const walk = (dir, rel = '') => {
573
590
  for (const e of readdirSync(dir, { withFileTypes: true })) {
574
591
  const r = rel ? `${rel}/${e.name}` : e.name;
575
592
  if (e.isDirectory()) { walk(join(dir, e.name), r); continue; }
576
593
  const dest = join(projectPath, 'scripts', 'hooks', r);
577
- if (!existsSync(dest)) out.added++;
578
- else if (readFileSync(dest).equals(readFileSync(join(dir, e.name)))) out.identical++;
594
+ if (!existsSync(dest)) { out.added++; continue; }
595
+ const have = readFileSync(dest);
596
+ if (have.equals(readFileSync(join(dir, e.name)))) { out.identical++; continue; }
597
+ const old = shippedBefore(r, have, table);
598
+ if (old) out.stale.push({ path: r, since: old.since });
579
599
  else out.kept.push(r);
580
600
  }
581
601
  };
@@ -583,6 +603,50 @@ function scriptDiff(projectPath) {
583
603
  return out;
584
604
  }
585
605
 
606
+ /**
607
+ * Put the shipped version of a script that is already in the project, whatever the hook
608
+ * config looks like. Runs for a tool whose config is `present` too — that is the point.
609
+ *
610
+ * stale scripts (an unmodified older UDS copy) -> always replaced
611
+ * kept scripts (edited) -> replaced only with `force`
612
+ *
613
+ * Mutates `scripts` so the caller reports what actually happened: replaced / overwritten are
614
+ * the paths written, and `kept` is what is still left alone.
615
+ */
616
+ function refreshScripts(projectPath, scripts, { recorder, force = false } = {}) {
617
+ const src = hooksSourceDir();
618
+ if (!src) return;
619
+ const write = (rel) => {
620
+ const dest = join(projectPath, 'scripts', 'hooks', rel);
621
+ copyFileSync(join(src, rel), dest);
622
+ recordFile(recorder, projectPath, relative(projectPath, dest), RECORD_KINDS.HOOK_SCRIPT);
623
+ };
624
+ scripts.replaced = scripts.stale.map((s) => s.path);
625
+ for (const rel of scripts.replaced) write(rel);
626
+ scripts.overwritten = [];
627
+ if (force) {
628
+ scripts.overwritten = scripts.kept;
629
+ scripts.kept = [];
630
+ for (const rel of scripts.overwritten) write(rel);
631
+ }
632
+ }
633
+
634
+ /**
635
+ * Scripts in the project that are unmodified copies of an EARLIER UDS version. Read-only.
636
+ * Lets the other `uds update` forms (which do not manage hook scripts) say so instead of
637
+ * leaving the adopter to find out from a hook that never fires.
638
+ *
639
+ * @returns {Array<{ path: string, since: string }>}
640
+ */
641
+ export function staleHookScripts(projectPath) {
642
+ // Advisory only: a notice about scripts must never be the reason `uds update` itself fails.
643
+ try {
644
+ return scriptDiff(projectPath).stale;
645
+ } catch {
646
+ return [];
647
+ }
648
+ }
649
+
586
650
  const INSTALLERS = {
587
651
  'claude-code': (p, o) => installHooks(p, o),
588
652
  codex: (p, o) => installCodexHooks(p, o),
@@ -597,13 +661,18 @@ const INSTALLERS = {
597
661
  * - The adopter's own hooks are never touched: every installer merges (Claude,
598
662
  * Codex, Gemini) or writes only under the key UDS owns (agy).
599
663
  * - A hook script the project already has and that differs from this version is
600
- * KEPT unless `overwriteScripts` — it may have been edited. It is reported.
664
+ * REPLACED when it is exactly a copy an earlier UDS shipped (nobody edited it; see
665
+ * hook-script-fingerprint.js), and KEPT otherwise unless `overwriteScripts` — it may
666
+ * have been edited. This holds whether or not the tool's hook config is already
667
+ * present: "the config is there" says nothing about the script beside it.
601
668
  * - `plan: true` reads and reports, and writes nothing.
602
669
  *
603
670
  * @param {string} projectPath
604
671
  * @param {string[]} tools
605
672
  * @param {{ plan?: boolean, overwriteScripts?: boolean }} [opts]
606
- * @returns {{ results: Array<{tool:string, outcome:'installed'|'unchanged'|'would-install'|'blocked'|'failed', path:string, why?:string, repaired?:boolean}>, scripts: {added:number, identical:number, kept:string[]}, artifacts: object }}
673
+ * @returns {{ results: Array<{tool:string, outcome:'installed'|'unchanged'|'would-install'|'blocked'|'failed', path:string, why?:string, repaired?:boolean}>, scripts: {added:number, identical:number, stale:Array<{path:string, since:string}>, kept:string[], replaced?:string[], overwritten?:string[]}, artifacts: object }}
674
+ * `scripts.stale` / `scripts.kept` are measured before anything is written; with `plan` they are
675
+ * what WOULD be replaced / kept. Without `plan`, `replaced` / `overwritten` are what was written.
607
676
  * `artifacts` is the recorder of what this call wrote (see core/install-records.js);
608
677
  * the caller persists it into the manifest so `uds uninstall` can remove exactly that.
609
678
  */
@@ -620,5 +689,9 @@ export function installMissingHooks(projectPath, tools, { plan = false, overwrit
620
689
  if (r.installed) results.push({ tool, outcome: 'installed', path: r.settingsPath ?? st.path, repaired: st.status === 'stale' });
621
690
  else results.push({ tool, outcome: 'failed', path: r.settingsPath ?? st.path, why: r.reason ?? 'no standard produced a usable hook' });
622
691
  }
692
+ // The hook config being present (or absent) decides nothing about the scripts. Without this
693
+ // step an up-to-date config left an out-of-date, vulnerable script in place and reported
694
+ // "already installed, not touched".
695
+ if (!plan) refreshScripts(projectPath, scripts, { recorder, force: overwriteScripts });
623
696
  return { results, scripts, artifacts: recorder };
624
697
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "version": "6.14.1-beta.1",
3
+ "version": "6.14.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.1-beta.1"
61
+ "version": "6.14.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.1-beta.1",
68
+ "version": "6.14.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.1-beta.1",
2339
+ "version": "6.14.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.1-beta.1",
2351
+ "version": "6.14.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.1-beta.1",
2363
+ "version": "6.14.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.1-beta.1",
2375
+ "version": "6.14.1",
2376
2376
  "source": {
2377
2377
  "human": "core/resource-cost-boundary.md",
2378
2378
  "ai": "ai/standards/resource-cost-boundary.ai.yaml"