universal-dev-standards 6.14.0-beta.5 → 6.14.0-beta.6
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 +2 -1
- package/bundled/ai/standards/commit-message.ai.yaml +6 -2
- package/bundled/locales/zh-CN/CHANGELOG.md +27 -3
- package/bundled/locales/zh-CN/README.md +1 -1
- package/bundled/locales/zh-CN/SECURITY.md +1 -1
- package/bundled/locales/zh-CN/docs/CHEATSHEET.md +2 -2
- package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +3 -2
- package/bundled/locales/zh-TW/CHANGELOG.md +27 -3
- package/bundled/locales/zh-TW/README.md +1 -1
- package/bundled/locales/zh-TW/SECURITY.md +1 -1
- package/bundled/locales/zh-TW/docs/CHEATSHEET.md +2 -2
- package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +3 -2
- package/package.json +1 -1
- package/src/commands/deps.js +31 -1
- package/src/commands/simulate.js +20 -8
- package/src/commands/skills.js +42 -2
- package/src/commands/spec.js +14 -8
- package/src/commands/update.js +45 -5
- package/src/core/manifest.js +12 -10
- package/src/core/marketplace-sentinel.js +5 -0
- package/src/core/project-config.js +58 -38
- package/src/i18n/messages.js +27 -0
- package/src/reconciler/backup-locations.js +75 -0
- package/src/reconciler/backup-manager.js +29 -45
- package/src/reconciler/index.js +20 -3
- package/src/utils/commit-message-judge.js +137 -0
- package/src/utils/deps-applicability.js +25 -0
- package/src/utils/installed-names-ownership.js +114 -0
- package/src/utils/sdd-header.js +65 -0
- package/src/utils/standard-validator.js +98 -27
- package/src/vibe/micro-spec.js +15 -0
- package/standards-registry.json +7 -7
package/bin/uds.js
CHANGED
|
@@ -204,7 +204,7 @@ program
|
|
|
204
204
|
|
|
205
205
|
program
|
|
206
206
|
.command('simulate')
|
|
207
|
-
.description('Simulate a standard check with input (Predictive Validation)')
|
|
207
|
+
.description('Simulate a standard check with input (Predictive Validation). Exit 0 = passes, 1 = does not comply, 2 = no verdict (cannot simulate; not a pass). Only commit-message defines a simulator today')
|
|
208
208
|
.option('-s, --standard <id>', 'Standard to simulate against')
|
|
209
209
|
.option('-i, --input <string>', 'Input string to test')
|
|
210
210
|
.option('--json', 'Output result in JSON format')
|
|
@@ -279,6 +279,7 @@ program
|
|
|
279
279
|
.option('--path <dir>', 'Directory containing package.json (default: cwd)')
|
|
280
280
|
.option('--json', 'Output raw JSON')
|
|
281
281
|
.option('--concurrency <n>', 'Parallel registry lookups (default: 8)')
|
|
282
|
+
.option('--if-present', 'Exit 0 and say that nothing was checked when there is no package.json or no runtime dependency (default: exit 1)')
|
|
282
283
|
.action(depsCommand);
|
|
283
284
|
|
|
284
285
|
program
|
|
@@ -114,9 +114,13 @@ physical_spec:
|
|
|
114
114
|
validator:
|
|
115
115
|
command: "test -f commitlint.config.js || test -f .commitlintrc.js || test -f .commitlintrc.json"
|
|
116
116
|
rule: "commitlint_config_exists"
|
|
117
|
+
# XSPEC-456 R2: judged by the CLI itself from this file's own rules (header format, the types in
|
|
118
|
+
# options/commit-message, rules scope-lowercase and subject-max-length). It used to pipe the message
|
|
119
|
+
# into `npx commitlint`, which needs the network and a commitlint config, and answered "failed" for a
|
|
120
|
+
# compliant message when the config was missing.
|
|
117
121
|
simulator:
|
|
118
|
-
type:
|
|
119
|
-
|
|
122
|
+
type: builtin
|
|
123
|
+
judge: commit-message
|
|
120
124
|
|
|
121
125
|
enforcement:
|
|
122
126
|
# 🔴 hook_type was "PreCommit" — Claude Code has no such event — and the
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
source: ../../CHANGELOG.md
|
|
3
|
-
source_version: 6.14.0-beta.
|
|
4
|
-
translation_version: 6.14.0-beta.
|
|
5
|
-
last_synced: 2026-10-
|
|
3
|
+
source_version: 6.14.0-beta.6
|
|
4
|
+
translation_version: 6.14.0-beta.6
|
|
5
|
+
last_synced: 2026-10-07
|
|
6
6
|
status: current
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -17,6 +17,30 @@ status: current
|
|
|
17
17
|
|
|
18
18
|
## [Unreleased]
|
|
19
19
|
|
|
20
|
+
## [6.14.0-beta.6] - 2026-10-07
|
|
21
|
+
|
|
22
|
+
> **测试版**——以 `npm install -g universal-dev-standards@beta` 安装。要测什么、如何退回正式版:[docs/PRE-RELEASE.md](../../docs/PRE-RELEASE.md)。
|
|
23
|
+
>
|
|
24
|
+
> **行为改变:**`uds simulate` 对不可模拟的标准以 2 结束(原为 1);`uds update` 会从 manifest 移除 UDS 无法担保的名称;备份移到 `.uds-backups/`;`uds.project.yaml` 内双引号的值按 YAML 解析。
|
|
25
|
+
|
|
26
|
+
> **行为改变:**`uds update` 的备份写到 `.uds-backups/`,不再是项目根目录的 `.uds-backup-*`;`uds simulate` 在无法得出结论时以 2(不是 1)结束,并且 `uds simulate -s commit-message` 改为在进程内判定,不再执行 `npx commitlint`;`uds update` 会把 UDS 无法担保的技能与命令名称从 `manifest.skills.names` / `commands.names` 移除;`uds run` 以 YAML 读取 `uds.project.yaml`(不合法的 YAML 现在会失败,空白后的 `#` 会结束一个值)。
|
|
27
|
+
|
|
28
|
+
### 变更
|
|
29
|
+
|
|
30
|
+
- **行为改变——`uds update` 的备份现在集中在单一文件夹 `.uds-backups/`,不再是项目根目录下每一步一个 `.uds-backup-<时间>/`(XSPEC-456 R7)。** git 本来就看不到旧文件夹(每个都自己隐藏),但索引器、IDE 搜索和 grep 不读 `.gitignore`,把里面你文件的副本算成项目文件。现在每份备份都是 `.uds-backups/<时间>-<NNNN>/`,`.uds-backups/` 带一个内容为 `*` 的 `.gitignore`(不会改你自己的 `.gitignore`)。不读 `.gitignore` 的工具请排除 `.uds-backups`,`uds update` 结束时会提醒。旧版 UDS 留在根目录的备份不会搬动:`--rollback`、连续步骤之间的链、清理与「最近五份」上限会同时看新旧两处,按时间由新到旧。`uds uninstall` 仍然不碰备份。
|
|
31
|
+
|
|
32
|
+
### 修复
|
|
33
|
+
|
|
34
|
+
- **`uds run` 用手写的逐行解析器读 `uds.project.yaml`,行尾注释因此成了命令的一部分(XSPEC-456 R1)。** `test: dotnet test X.csproj # 90 tests pass` 执行时后面多了 `# 90 tests pass`;POSIX shell 会吃掉未加引号的 `#`,`cmd.exe` 不会。现在改以 YAML(js-yaml)读取:空白后的 `#` 结束值、加引号的值保留 `#`、以引号参数结尾的命令保留最后的引号。不合法的 YAML 会报告行号;注意 YAML 的双引号值里反斜线是转义字符,Windows 路径请不加引号或用单引号。
|
|
35
|
+
- **行为改变——`uds simulate` 不再对根本没被判定的东西打印「Simulation Failed」(XSPEC-456 R2)。** `commit-message` 原本是喂给 `npx commitlint`;项目没有 commitlint 配置(没有 package.json 的 .NET 项目)时工具拒绝运行,合规与不合规的消息得到同一个答案,还先下载了工具。现在依标准本身的规则在进程内判定(标头 `<type>(<scope>): <subject>`、已安装选项文件的 type、`scope-lowercase` 与 `subject-max-length` 两条规则),不调用 npx、不联网,输出会列出没检查的项目。退出码:**0** 通过、**1** 不合规、**2** 没有结论(没有定义 simulator、标准未安装、被委派的工具不能用)——最后一种以前是 1,打印「Simulation Failed」。`--json` 带 `status`(`pass` / `fail` / `cannot-simulate`)。被委派的 simulator 命令不再把输入贴进 shell 字符串。命令说明现在写明哪些标准有 simulator(目前只有 `commit-message`)。报告中的「失败却 exit 0」在 macOS 上没有复现,不声称已修。
|
|
36
|
+
- **`uds skills` 在装了 56 个技能时只列 27 个,并写「27 / 30」(XSPEC-456 R3)。** 筛选与分母是 `standards-registry.json` 里手工维护的 30 个名字。现在改为 UDS 发布的技能(含 `SKILL.md` 的文件夹),与 `init`、`update`、`check` 用同一份;manifest 记录的其他 AI 工具的技能也会列出,摘要并说明 `uds check` 为它们跟踪了多少个技能文件。
|
|
37
|
+
- **行为改变——`uds update` 现在会把 UDS 无法担保的名称从 `manifest.skills.names` 与 `manifest.commands.names` 移除(XSPEC-456 R4)。** `update --apply --skills` 移除旧版 CLI 误拷进技能文件夹的 `_shared`、`agents`、`ai`、`tools`、`workflows` 后,`skillHashes` 干净了,名称列表却仍有 61 项(技能只有 56 个)。名称要同时是 UDS 发布的技能或命令,且(安装后)在 manifest 记录的安装位置真的存在才保留;市场安装,以及无法检查磁盘的情况,不动。既有项目在下一次 `uds update` 自动修正,已是最新版的也一样。manifest 中记录名称的四个字段是 `skills.names`、`commands.names`、`skillHashes`、`commandHashes`。
|
|
38
|
+
- **`uds spec list` 把完整的 SDD 规格列成 `draft`、标题为空(XSPEC-456 R5)。** 它把每个文件都当微规格读并填默认值。现在会读 SDD 标头——表格(`| Status | Approved (...) |`)、字段行(`- **Status**: Archived`)或 front matter——读不出来的打印「格式:SDD(状态未解析)」,不填默认值。未改动:`spec show`、`confirm`、`archive` 仍会用微规格模板改写文件。
|
|
39
|
+
|
|
40
|
+
### 新增
|
|
41
|
+
|
|
42
|
+
- **`uds deps --if-present`(XSPEC-456 R6)。** 没有 `package.json`,或包没有声明运行时依赖时,打印不适用、未检查任何东西,并以 0 结束(`--json`:`notApplicable`)。不加开关时行为不变:没有 `package.json` 仍以 1 结束。
|
|
43
|
+
|
|
20
44
|
## [6.14.0-beta.5] - 2026-10-06
|
|
21
45
|
|
|
22
46
|
> **测试版**——以 `npm install -g universal-dev-standards@beta` 安装。要测什么、如何退回正式版:[docs/PRE-RELEASE.md](../../docs/PRE-RELEASE.md)。
|
|
@@ -15,7 +15,7 @@ status: current
|
|
|
15
15
|
|
|
16
16
|
> **语言**: [English](../../README.md) | [繁體中文](../zh-TW/README.md) | 简体中文
|
|
17
17
|
|
|
18
|
-
**版本**: 6.14.0-beta.
|
|
18
|
+
**版本**: 6.14.0-beta.6 (Pre-release) | **发布日期**: 2026-10-07 | **授权**: [双重授权](../../LICENSE) (CC BY 4.0 + MIT)
|
|
19
19
|
|
|
20
20
|
语言无关、框架无关的软件项目文档标准。通过 AI 原生工作流,确保不同技术栈之间的一致性、质量和可维护性。
|
|
21
21
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# UDS 速查表
|
|
2
2
|
|
|
3
|
-
> Quick reference for all UDS features | Last updated: 2026-10-
|
|
3
|
+
> Quick reference for all UDS features | Last updated: 2026-10-07
|
|
4
4
|
|
|
5
5
|
**Language**: [English](../../../docs/user/CHEATSHEET.md) | [繁體中文](../../zh-TW/docs/CHEATSHEET.md) | 简体中文
|
|
6
6
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
| `uds configure` | Alias for "uds config" — Modify project settings |
|
|
18
18
|
| `uds check` | Check file integrity and adoption status (quick validation). For deep health diagnosis, use "uds audit" |
|
|
19
19
|
| `uds lint` | Check spec dependency validity and size against installed specs (specs/*.md) |
|
|
20
|
-
| `uds simulate` | Simulate a standard check with input (Predictive Validation) |
|
|
20
|
+
| `uds simulate` | Simulate a standard check with input (Predictive Validation). Exit 0 = passes, 1 = does not comply, 2 = no verdict (cannot simulate; not a pass). Only commit-message defines a simulator today |
|
|
21
21
|
| `uds fix` | Auto-fix standard violations (Self-Healing) |
|
|
22
22
|
| `uds update` | Update standards to latest version |
|
|
23
23
|
| `uds skills` | List installed Claude Code skills |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# UDS 功能参考手册
|
|
2
2
|
|
|
3
3
|
> Universal Development Standards - 完整功能文档
|
|
4
|
-
> Auto-generated | Last updated: 2026-10-
|
|
4
|
+
> Auto-generated | Last updated: 2026-10-07
|
|
5
5
|
|
|
6
6
|
**Language**: [English](../../../docs/reference/FEATURE-REFERENCE.md) | [繁體中文](../../zh-TW/docs/FEATURE-REFERENCE.md) | 简体中文
|
|
7
7
|
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
|
|
117
117
|
### `uds simulate`
|
|
118
118
|
|
|
119
|
-
**说明**: Simulate a standard check with input (Predictive Validation)
|
|
119
|
+
**说明**: Simulate a standard check with input (Predictive Validation). Exit 0 = passes, 1 = does not comply, 2 = no verdict (cannot simulate; not a pass). Only commit-message defines a simulator today
|
|
120
120
|
|
|
121
121
|
**选项**:
|
|
122
122
|
| Option | 说明 |
|
|
@@ -201,6 +201,7 @@
|
|
|
201
201
|
| `--path` | Directory containing package.json (default: cwd) |
|
|
202
202
|
| `--json` | Output raw JSON |
|
|
203
203
|
| `--concurrency` | Parallel registry lookups (default: 8) |
|
|
204
|
+
| `--if-present` | Exit 0 and say that nothing was checked when there is no package.json or no runtime dependency (default: exit 1) |
|
|
204
205
|
|
|
205
206
|
### `uds uninstall`
|
|
206
207
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
source: ../../CHANGELOG.md
|
|
3
|
-
source_version: 6.14.0-beta.
|
|
4
|
-
translation_version: 6.14.0-beta.
|
|
5
|
-
last_synced: 2026-10-
|
|
3
|
+
source_version: 6.14.0-beta.6
|
|
4
|
+
translation_version: 6.14.0-beta.6
|
|
5
|
+
last_synced: 2026-10-07
|
|
6
6
|
status: current
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -17,6 +17,30 @@ status: current
|
|
|
17
17
|
|
|
18
18
|
## [Unreleased]
|
|
19
19
|
|
|
20
|
+
## [6.14.0-beta.6] - 2026-10-07
|
|
21
|
+
|
|
22
|
+
> **測試版**——以 `npm install -g universal-dev-standards@beta` 安裝。要測什麼、如何退回正式版:[docs/PRE-RELEASE.md](../../docs/PRE-RELEASE.md)。
|
|
23
|
+
>
|
|
24
|
+
> **行為改變:**`uds simulate` 對不可模擬的標準以 2 結束(原為 1);`uds update` 會從 manifest 移除 UDS 無法擔保的名稱;備份移到 `.uds-backups/`;`uds.project.yaml` 內雙引號的值依 YAML 解析。
|
|
25
|
+
|
|
26
|
+
> **行為改變:**`uds update` 的備份寫到 `.uds-backups/`,不再是專案根目錄的 `.uds-backup-*`;`uds simulate` 在無法得出結論時以 2(不是 1)結束,而且 `uds simulate -s commit-message` 改為在程序內判定,不再執行 `npx commitlint`;`uds update` 會把 UDS 無法擔保的技能與命令名稱從 `manifest.skills.names` / `commands.names` 移除;`uds run` 以 YAML 讀取 `uds.project.yaml`(不合法的 YAML 現在會失敗,空白後的 `#` 會結束一個值)。
|
|
27
|
+
|
|
28
|
+
### 變更
|
|
29
|
+
|
|
30
|
+
- **行為改變——`uds update` 的備份現在集中在單一資料夾 `.uds-backups/`,不再是專案根目錄下每一步一個 `.uds-backup-<時間>/`(XSPEC-456 R7)。** git 本來就看不到舊資料夾(每個都自己隱藏),但索引器、IDE 搜尋和 grep 不讀 `.gitignore`,把裡面你檔案的副本算成專案檔案。現在每份備份都是 `.uds-backups/<時間>-<NNNN>/`,`.uds-backups/` 帶一個內容為 `*` 的 `.gitignore`(不會改你自己的 `.gitignore`)。不讀 `.gitignore` 的工具請排除 `.uds-backups`,`uds update` 結束時會提醒。舊版 UDS 留在根目錄的備份不會搬動:`--rollback`、連續步驟之間的串鏈、清理與「最近五份」上限會同時看新舊兩處,依時間由新到舊。`uds uninstall` 仍然不碰備份。
|
|
31
|
+
|
|
32
|
+
### 修正
|
|
33
|
+
|
|
34
|
+
- **`uds run` 用手寫的逐行解析器讀 `uds.project.yaml`,行尾註解因此成了指令的一部分(XSPEC-456 R1)。** `test: dotnet test X.csproj # 90 tests pass` 執行時後面多了 `# 90 tests pass`;POSIX shell 會吃掉未加引號的 `#`,`cmd.exe` 不會。現在改以 YAML(js-yaml)讀取:空白後的 `#` 結束值、加引號的值保留 `#`、以引號參數結尾的指令保留最後的引號。不合法的 YAML 會回報行號;注意 YAML 的雙引號值裡反斜線是跳脫字元,Windows 路徑請不加引號或用單引號。
|
|
35
|
+
- **行為改變——`uds simulate` 不再對根本沒被判定的東西印「Simulation Failed」(XSPEC-456 R2)。** `commit-message` 原本是餵給 `npx commitlint`;專案沒有 commitlint 設定(沒有 package.json 的 .NET 專案)時工具拒絕執行,合規與不合規的訊息得到同一個答案,還先下載了工具。現在依標準本身的規則在程序內判定(標頭 `<type>(<scope>): <subject>`、已安裝選項檔的 type、`scope-lowercase` 與 `subject-max-length` 兩條規則),不呼叫 npx、不連網,輸出會列出沒檢查的項目。結束碼:**0** 通過、**1** 不合規、**2** 沒有結論(沒有定義 simulator、標準未安裝、被委派的工具不能用)——最後一種以前是 1,印「Simulation Failed」。`--json` 帶 `status`(`pass` / `fail` / `cannot-simulate`)。被委派的 simulator 指令不再把輸入貼進 shell 字串。指令說明現在寫明哪些標準有 simulator(目前只有 `commit-message`)。回報中的「失敗卻 exit 0」在 macOS 上沒有重現,不宣稱已修。
|
|
36
|
+
- **`uds skills` 在裝了 56 個技能時只列 27 個,並寫「27 / 30」(XSPEC-456 R3)。** 篩選與分母是 `standards-registry.json` 裡手工維護的 30 個名字。現在改為 UDS 出貨的技能(含 `SKILL.md` 的資料夾),與 `init`、`update`、`check` 用同一份;manifest 記錄的其他 AI 工具的技能也會列出,摘要並說明 `uds check` 為它們追蹤了多少個技能檔案。
|
|
37
|
+
- **行為改變——`uds update` 現在會把 UDS 無法擔保的名稱從 `manifest.skills.names` 與 `manifest.commands.names` 移除(XSPEC-456 R4)。** `update --apply --skills` 移除舊版 CLI 誤拷進技能資料夾的 `_shared`、`agents`、`ai`、`tools`、`workflows` 後,`skillHashes` 乾淨了,名稱清單卻仍有 61 筆(技能只有 56 個)。名稱要同時是 UDS 出貨的技能或命令,且(安裝後)在 manifest 記錄的安裝位置真的存在才保留;市集安裝,以及無法檢查磁碟的情況,不動。既有專案在下一次 `uds update` 自動修正,已是最新版的也一樣。manifest 中記錄名稱的四個欄位是 `skills.names`、`commands.names`、`skillHashes`、`commandHashes`。
|
|
38
|
+
- **`uds spec list` 把完整的 SDD 規格列成 `draft`、標題空白(XSPEC-456 R5)。** 它把每個檔案都當微規格讀並填預設值。現在會讀 SDD 標頭——表格(`| Status | Approved (...) |`)、欄位行(`- **Status**: Archived`)或 front matter——讀不出來的印「格式:SDD(狀態未解析)」,不填預設值。未改動:`spec show`、`confirm`、`archive` 仍會用微規格模板改寫檔案。
|
|
39
|
+
|
|
40
|
+
### 新增
|
|
41
|
+
|
|
42
|
+
- **`uds deps --if-present`(XSPEC-456 R6)。** 沒有 `package.json`,或套件沒有宣告執行期相依時,印出不適用、未檢查任何東西,並以 0 結束(`--json`:`notApplicable`)。不加旗標時行為不變:沒有 `package.json` 仍以 1 結束。
|
|
43
|
+
|
|
20
44
|
## [6.14.0-beta.5] - 2026-10-06
|
|
21
45
|
|
|
22
46
|
> **測試版**——以 `npm install -g universal-dev-standards@beta` 安裝。要測什麼、如何退回正式版:[docs/PRE-RELEASE.md](../../docs/PRE-RELEASE.md)。
|
|
@@ -15,7 +15,7 @@ status: current
|
|
|
15
15
|
|
|
16
16
|
> **語言**: [English](../../README.md) | 繁體中文 | [简体中文](../zh-CN/README.md)
|
|
17
17
|
|
|
18
|
-
**版本**: 6.14.0-beta.
|
|
18
|
+
**版本**: 6.14.0-beta.6 (Pre-release) | **發布日期**: 2026-10-07 | **授權**: [雙重授權](../../LICENSE) (CC BY 4.0 + MIT)
|
|
19
19
|
|
|
20
20
|
語言無關、框架無關的軟體專案文件標準。透過 AI 原生工作流,確保不同技術堆疊之間的一致性、品質和可維護性。
|
|
21
21
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# UDS 速查表
|
|
2
2
|
|
|
3
|
-
> Quick reference for all UDS features | Last updated: 2026-10-
|
|
3
|
+
> Quick reference for all UDS features | Last updated: 2026-10-07
|
|
4
4
|
|
|
5
5
|
**Language**: [English](../../../docs/user/CHEATSHEET.md) | 繁體中文 | [简体中文](../../zh-CN/docs/CHEATSHEET.md)
|
|
6
6
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
| `uds configure` | Alias for "uds config" — Modify project settings |
|
|
18
18
|
| `uds check` | Check file integrity and adoption status (quick validation). For deep health diagnosis, use "uds audit" |
|
|
19
19
|
| `uds lint` | Check spec dependency validity and size against installed specs (specs/*.md) |
|
|
20
|
-
| `uds simulate` | Simulate a standard check with input (Predictive Validation) |
|
|
20
|
+
| `uds simulate` | Simulate a standard check with input (Predictive Validation). Exit 0 = passes, 1 = does not comply, 2 = no verdict (cannot simulate; not a pass). Only commit-message defines a simulator today |
|
|
21
21
|
| `uds fix` | Auto-fix standard violations (Self-Healing) |
|
|
22
22
|
| `uds update` | Update standards to latest version |
|
|
23
23
|
| `uds skills` | List installed Claude Code skills |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# UDS 功能參考手冊
|
|
2
2
|
|
|
3
3
|
> Universal Development Standards - 完整功能文件
|
|
4
|
-
> Auto-generated | Last updated: 2026-10-
|
|
4
|
+
> Auto-generated | Last updated: 2026-10-07
|
|
5
5
|
|
|
6
6
|
**Language**: [English](../../../docs/reference/FEATURE-REFERENCE.md) | 繁體中文 | [简体中文](../../zh-CN/docs/FEATURE-REFERENCE.md)
|
|
7
7
|
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
|
|
117
117
|
### `uds simulate`
|
|
118
118
|
|
|
119
|
-
**說明**: Simulate a standard check with input (Predictive Validation)
|
|
119
|
+
**說明**: Simulate a standard check with input (Predictive Validation). Exit 0 = passes, 1 = does not comply, 2 = no verdict (cannot simulate; not a pass). Only commit-message defines a simulator today
|
|
120
120
|
|
|
121
121
|
**選項**:
|
|
122
122
|
| Option | 說明 |
|
|
@@ -201,6 +201,7 @@
|
|
|
201
201
|
| `--path` | Directory containing package.json (default: cwd) |
|
|
202
202
|
| `--json` | Output raw JSON |
|
|
203
203
|
| `--concurrency` | Parallel registry lookups (default: 8) |
|
|
204
|
+
| `--if-present` | Exit 0 and say that nothing was checked when there is no package.json or no runtime dependency (default: exit 1) |
|
|
204
205
|
|
|
205
206
|
### `uds uninstall`
|
|
206
207
|
|
package/package.json
CHANGED
package/src/commands/deps.js
CHANGED
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
|
|
22
22
|
import chalk from 'chalk';
|
|
23
23
|
import { measureResolutionDrift } from '../utils/dependency-resolution.js';
|
|
24
|
+
import { notApplicableReason } from '../utils/deps-applicability.js';
|
|
25
|
+
import { t } from '../i18n/messages.js';
|
|
24
26
|
|
|
25
27
|
/**
|
|
26
28
|
* Render the human-readable report.
|
|
@@ -162,6 +164,23 @@ export function render(result) {
|
|
|
162
164
|
|
|
163
165
|
export async function depsCommand(options = {}) {
|
|
164
166
|
const root = options.path ?? process.cwd();
|
|
167
|
+
const msg = t().commands.deps || {};
|
|
168
|
+
|
|
169
|
+
// XSPEC-456 R6: `--if-present` is the explicit way to say "this is a shared script and some of the
|
|
170
|
+
// projects it runs in are not Node projects". Without it nothing changes: no package.json is still
|
|
171
|
+
// exit 1, because a check that examined nothing must not be able to show a pass. With it the run says
|
|
172
|
+
// out loud that nothing was checked and exits 0 - the shell `if [ -f package.json ]` that callers
|
|
173
|
+
// otherwise write around this command, made part of the command and made visible.
|
|
174
|
+
const skip = notApplicableReason(root, Boolean(options.ifPresent));
|
|
175
|
+
if (skip === 'no-package-json') {
|
|
176
|
+
const reason = msg.notApplicableNoPackageJson || 'Not applicable: there is no package.json, so nothing was checked';
|
|
177
|
+
if (options.json) {
|
|
178
|
+
console.log(JSON.stringify({ notApplicable: true, examined: 0, reason, root }, null, 2));
|
|
179
|
+
} else {
|
|
180
|
+
console.log(chalk.yellow(reason));
|
|
181
|
+
}
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
165
184
|
|
|
166
185
|
let result;
|
|
167
186
|
try {
|
|
@@ -174,14 +193,25 @@ export async function depsCommand(options = {}) {
|
|
|
174
193
|
return;
|
|
175
194
|
}
|
|
176
195
|
|
|
196
|
+
// A package with no runtime dependencies has nothing to compare. `--if-present` accepts that too (the
|
|
197
|
+
// telemetry SDK publish flow hit exactly this), and says so rather than printing a tick.
|
|
198
|
+
const noRuntimeDeps = Boolean(options.ifPresent) && result.examined === 0 && !result.clean;
|
|
199
|
+
if (noRuntimeDeps) {
|
|
200
|
+
result = { ...result, notApplicable: true };
|
|
201
|
+
}
|
|
202
|
+
|
|
177
203
|
if (options.json) {
|
|
178
204
|
console.log(JSON.stringify(result, null, 2));
|
|
179
205
|
} else {
|
|
180
206
|
console.log(render(result));
|
|
207
|
+
if (noRuntimeDeps) {
|
|
208
|
+
console.log(chalk.yellow(msg.notApplicableNoRuntimeDeps || 'Not applicable: this package declares no runtime dependencies, so nothing was checked'));
|
|
209
|
+
console.log();
|
|
210
|
+
}
|
|
181
211
|
}
|
|
182
212
|
|
|
183
213
|
// Drift and unverifiable both fail. Drift is a real divergence; unverifiable
|
|
184
214
|
// is an unknown, and a check that exits 0 on "I don't know" is a check that
|
|
185
215
|
// reports success for the case it was built to catch.
|
|
186
|
-
if (!result.clean) process.exitCode = 1;
|
|
216
|
+
if (!result.clean && !noRuntimeDeps) process.exitCode = 1;
|
|
187
217
|
}
|
package/src/commands/simulate.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { StandardValidator } from '../utils/standard-validator.js';
|
|
3
3
|
|
|
4
|
+
/** Process exit code per outcome. 2 means no verdict - it is not a pass. */
|
|
5
|
+
export const EXIT_CODES = { pass: 0, fail: 1, 'cannot-simulate': 2 };
|
|
6
|
+
|
|
4
7
|
export async function simulateCommand(options) {
|
|
5
8
|
if (!options.standard) {
|
|
6
9
|
if (options.json) {
|
|
@@ -25,10 +28,13 @@ export async function simulateCommand(options) {
|
|
|
25
28
|
|
|
26
29
|
try {
|
|
27
30
|
const result = await validator.simulate(options.standard, options.input);
|
|
31
|
+
// XSPEC-456 R2: exit 0 only for a pass. 1 = the input does not comply, 2 = no verdict could be reached
|
|
32
|
+
// (the same "cannot decide is not a pass" contract as `uds open-work`).
|
|
33
|
+
const exitCode = EXIT_CODES[result.status] ?? EXIT_CODES['cannot-simulate'];
|
|
28
34
|
|
|
29
35
|
if (options.json) {
|
|
30
36
|
console.log(JSON.stringify(result, null, 2));
|
|
31
|
-
|
|
37
|
+
process.exitCode = exitCode;
|
|
32
38
|
return;
|
|
33
39
|
}
|
|
34
40
|
|
|
@@ -37,25 +43,31 @@ export async function simulateCommand(options) {
|
|
|
37
43
|
console.log(chalk.gray('Input: ' + options.input));
|
|
38
44
|
console.log(chalk.gray('─'.repeat(50)));
|
|
39
45
|
|
|
40
|
-
if (result.
|
|
46
|
+
if (result.status === 'pass') {
|
|
41
47
|
console.log(chalk.green('✓ Simulation Passed'));
|
|
42
48
|
if (result.details) console.log(chalk.gray(result.details));
|
|
49
|
+
} else if (result.status === 'fail') {
|
|
50
|
+
console.log(chalk.red('✗ Simulation Failed: the input does not comply'));
|
|
51
|
+
if (result.details) {
|
|
52
|
+
console.log(chalk.gray('\nDetails:'));
|
|
53
|
+
console.log(chalk.gray(result.details));
|
|
54
|
+
}
|
|
43
55
|
} else {
|
|
44
|
-
console.log(chalk.
|
|
45
|
-
console.log(chalk.
|
|
56
|
+
console.log(chalk.yellow('⚠ Cannot simulate: no verdict was reached, so this is neither a pass nor a fail'));
|
|
57
|
+
console.log(chalk.yellow(` ${result.message}`));
|
|
46
58
|
if (result.details) {
|
|
47
59
|
console.log(chalk.gray('\nDetails:'));
|
|
48
60
|
console.log(chalk.gray(result.details));
|
|
49
61
|
}
|
|
50
|
-
process.exitCode = 1;
|
|
51
62
|
}
|
|
63
|
+
process.exitCode = exitCode;
|
|
52
64
|
} catch (error) {
|
|
53
65
|
if (options.json) {
|
|
54
|
-
console.log(JSON.stringify({ success: false, message: error.message }));
|
|
55
|
-
process.exit(
|
|
66
|
+
console.log(JSON.stringify({ status: 'cannot-simulate', success: false, message: error.message }));
|
|
67
|
+
process.exit(EXIT_CODES['cannot-simulate']);
|
|
56
68
|
}
|
|
57
69
|
console.error(chalk.red(`Error: ${error.message}`));
|
|
58
|
-
process.exit(
|
|
70
|
+
process.exit(EXIT_CODES['cannot-simulate']);
|
|
59
71
|
}
|
|
60
72
|
if (!options.json) console.log();
|
|
61
73
|
}
|
package/src/commands/skills.js
CHANGED
|
@@ -3,6 +3,9 @@ import { existsSync, readdirSync, readFileSync } from 'fs';
|
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import { homedir } from 'os';
|
|
5
5
|
import { getAllSkillNames } from '../utils/registry.js';
|
|
6
|
+
import { getAvailableSkillNames } from '../utils/skills-installer.js';
|
|
7
|
+
import { pruneForeignSkillHashes } from '../utils/skill-hash-ownership.js';
|
|
8
|
+
import { getSkillsDirForAgent, getAgentDisplayName } from '../config/ai-agent-paths.js';
|
|
6
9
|
import { readManifest, isInitialized } from '../utils/copier.js';
|
|
7
10
|
import { t, setLanguage, isLanguageExplicitlySet } from '../i18n/messages.js';
|
|
8
11
|
|
|
@@ -111,8 +114,13 @@ export function skillsCommand() {
|
|
|
111
114
|
console.log(chalk.gray('─'.repeat(50)));
|
|
112
115
|
console.log();
|
|
113
116
|
|
|
114
|
-
//
|
|
115
|
-
|
|
117
|
+
// XSPEC-456 R3: the skills UDS ships are the ones in its skills source tree (what `uds init` and
|
|
118
|
+
// `uds update` install, and what `uds check` verifies). This used to be the `skillFiles` list of
|
|
119
|
+
// standards-registry.json, a hand-kept list that stopped at 30 while UDS ships 56, so a project with
|
|
120
|
+
// all 56 installed read "27 / 30" (27 = the installed ones that happened to be on the stale list).
|
|
121
|
+
// The registry list is only a fallback for a source tree that did not load.
|
|
122
|
+
const shipped = getAvailableSkillNames();
|
|
123
|
+
const knownSkills = shipped.length > 0 ? shipped : getAllSkillNames();
|
|
116
124
|
|
|
117
125
|
// Check different installation locations
|
|
118
126
|
const installations = [];
|
|
@@ -195,6 +203,27 @@ export function skillsCommand() {
|
|
|
195
203
|
}
|
|
196
204
|
}
|
|
197
205
|
|
|
206
|
+
// 4. Other AI tools the manifest says Skills were installed for (Codex, OpenCode, ...). Claude Code's
|
|
207
|
+
// own two locations were handled above.
|
|
208
|
+
const manifestForSkills = isInitialized(projectPath) ? readManifest(projectPath) : null;
|
|
209
|
+
const seenDirs = new Set(installations.map(i => i.path));
|
|
210
|
+
for (const entry of manifestForSkills?.skills?.installations || []) {
|
|
211
|
+
const agent = typeof entry === 'string' ? entry : entry?.agent;
|
|
212
|
+
const level = typeof entry === 'string' ? 'project' : (entry?.level || 'project');
|
|
213
|
+
if (!agent || agent === 'claude-code') continue;
|
|
214
|
+
const dir = getSkillsDirForAgent(agent, level, projectPath);
|
|
215
|
+
if (!dir || seenDirs.has(dir)) continue;
|
|
216
|
+
seenDirs.add(dir);
|
|
217
|
+
const udsSkills = listSkillsInDir(dir).filter(s => knownSkills.includes(s));
|
|
218
|
+
if (udsSkills.length === 0) continue;
|
|
219
|
+
installations.push({
|
|
220
|
+
location: `${getAgentDisplayName(agent)} (${level} level)`,
|
|
221
|
+
path: dir,
|
|
222
|
+
version: manifestForSkills.skills.version || 'unknown',
|
|
223
|
+
skills: udsSkills
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
|
|
198
227
|
// Display results
|
|
199
228
|
if (installations.length === 0) {
|
|
200
229
|
console.log(chalk.yellow(msg.noSkillsInstalled));
|
|
@@ -259,6 +288,17 @@ export function skillsCommand() {
|
|
|
259
288
|
console.log(chalk.gray('─'.repeat(50)));
|
|
260
289
|
console.log(chalk.gray(`${msg.totalUniqueSkills}: ${totalSkills} / ${knownSkills.length}`));
|
|
261
290
|
|
|
291
|
+
// The number `uds check` prints is a count of FILES (a skill is one or more files), so say how the two
|
|
292
|
+
// relate instead of leaving two different numbers side by side. Counted the way `check` counts them.
|
|
293
|
+
if (manifestForSkills?.skillHashes) {
|
|
294
|
+
const tracked = structuredClone(manifestForSkills);
|
|
295
|
+
pruneForeignSkillHashes(tracked, new Set(knownSkills));
|
|
296
|
+
const files = Object.keys(tracked.skillHashes || {}).length;
|
|
297
|
+
if (files > 0 && msg.skillFilesTracked) {
|
|
298
|
+
console.log(chalk.gray(msg.skillFilesTracked.replace('{files}', files)));
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
262
302
|
if (!hasMarketplace && installations.length > 0) {
|
|
263
303
|
console.log();
|
|
264
304
|
console.log(chalk.yellow(msg.recommendation));
|
package/src/commands/spec.js
CHANGED
|
@@ -131,15 +131,21 @@ export async function specListCommand(options = {}) {
|
|
|
131
131
|
return;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
// Display specs as a table
|
|
135
|
-
|
|
134
|
+
// Display specs as a table. A status or type the file does not state is shown as unknown, never as a
|
|
135
|
+
// default (XSPEC-456 R5): an SDD spec whose header could not be read used to be listed as `draft`.
|
|
136
|
+
const unparsed = t('spec.statusUnparsed', 'format: SDD (status not parsed)');
|
|
137
|
+
const statusLabel = (spec) => spec.status ?? unparsed;
|
|
138
|
+
const statusWidth = Math.max(12, ...specs.map((spec) => statusLabel(spec).length + 1));
|
|
139
|
+
const ruleWidth = 70 + (statusWidth - 12);
|
|
140
|
+
|
|
141
|
+
console.log(chalk.gray('─'.repeat(ruleWidth)));
|
|
136
142
|
console.log(
|
|
137
143
|
chalk.bold('ID'.padEnd(35)) +
|
|
138
|
-
chalk.bold('Status'.padEnd(
|
|
144
|
+
chalk.bold('Status'.padEnd(statusWidth)) +
|
|
139
145
|
chalk.bold('Type'.padEnd(10)) +
|
|
140
146
|
chalk.bold('Title')
|
|
141
147
|
);
|
|
142
|
-
console.log(chalk.gray('─'.repeat(
|
|
148
|
+
console.log(chalk.gray('─'.repeat(ruleWidth)));
|
|
143
149
|
|
|
144
150
|
for (const spec of specs) {
|
|
145
151
|
const statusColor = {
|
|
@@ -152,13 +158,13 @@ export async function specListCommand(options = {}) {
|
|
|
152
158
|
|
|
153
159
|
console.log(
|
|
154
160
|
spec.id.slice(0, 34).padEnd(35) +
|
|
155
|
-
statusColor(spec.
|
|
156
|
-
spec.type.padEnd(10) +
|
|
161
|
+
statusColor(statusLabel(spec).padEnd(statusWidth)) +
|
|
162
|
+
(spec.type ?? '-').padEnd(10) +
|
|
157
163
|
spec.title.slice(0, 25)
|
|
158
164
|
);
|
|
159
165
|
}
|
|
160
166
|
|
|
161
|
-
console.log(chalk.gray('─'.repeat(
|
|
167
|
+
console.log(chalk.gray('─'.repeat(ruleWidth)));
|
|
162
168
|
console.log(chalk.gray(`${t('spec.total', 'Total')}: ${specs.length}`));
|
|
163
169
|
}
|
|
164
170
|
|
|
@@ -333,7 +339,7 @@ export function specSearchCommand(query, options = {}) {
|
|
|
333
339
|
|
|
334
340
|
console.log(chalk.bold(`\nFound ${results.length} spec(s) matching "${query}":\n`));
|
|
335
341
|
for (const r of results) {
|
|
336
|
-
const badge = r.source === 'archive' ? chalk.gray('[archived]') : chalk.green(`[${r.status}]`);
|
|
342
|
+
const badge = r.source === 'archive' ? chalk.gray('[archived]') : chalk.green(`[${r.status ?? t('spec.statusUnparsed', 'format: SDD (status not parsed)')}]`);
|
|
337
343
|
console.log(` ${chalk.cyan(r.id)} ${badge} ${r.title}`);
|
|
338
344
|
}
|
|
339
345
|
console.log();
|
package/src/commands/update.js
CHANGED
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
import { checkForUpdates } from '../utils/npm-registry.js';
|
|
28
28
|
import { pruneForeignSkillHashes } from '../utils/skill-hash-ownership.js';
|
|
29
29
|
import { pruneForeignCommandHashes } from '../utils/command-hash-ownership.js';
|
|
30
|
+
import { pruneForeignSkillNames, pruneForeignCommandNames } from '../utils/installed-names-ownership.js';
|
|
30
31
|
import { commandsUpdatedMessage } from '../utils/update-summary.js';
|
|
31
32
|
import { t, setLanguage, isLanguageExplicitlySet } from '../i18n/messages.js';
|
|
32
33
|
import { config } from '../utils/config-manager.js';
|
|
@@ -631,6 +632,11 @@ export async function updateCommand(options) {
|
|
|
631
632
|
// one who has nothing else to trigger the correction).
|
|
632
633
|
const foreignSkillsOnLatest = pruneForeignSkillHashes(manifest);
|
|
633
634
|
const foreignCommandsOnLatest = pruneForeignCommandHashes(manifest);
|
|
635
|
+
// XSPEC-456 R4: and the skill / command NAME lists (same reason).
|
|
636
|
+
const namesOnLatestBefore = (manifest.skills?.names?.length ?? 0) + (manifest.commands?.names?.length ?? 0);
|
|
637
|
+
pruneForeignSkillNames(manifest, projectPath);
|
|
638
|
+
pruneForeignCommandNames(manifest, projectPath);
|
|
639
|
+
const foreignNamesOnLatest = namesOnLatestBefore - (manifest.skills?.names?.length ?? 0) - (manifest.commands?.names?.length ?? 0);
|
|
634
640
|
if (retiredOnLatest.length > 0) {
|
|
635
641
|
console.log();
|
|
636
642
|
console.log(chalk.gray(
|
|
@@ -652,7 +658,14 @@ export async function updateCommand(options) {
|
|
|
652
658
|
` ${(msg.droppedForeignCommandHashes || 'Dropped {count} command record(s) for commands UDS does not ship.').replace('{count}', foreignCommandsOnLatest.length)}`
|
|
653
659
|
));
|
|
654
660
|
}
|
|
655
|
-
if (
|
|
661
|
+
if (foreignNamesOnLatest > 0) {
|
|
662
|
+
console.log();
|
|
663
|
+
console.log(chalk.gray(
|
|
664
|
+
` ${(msg.droppedForeignNames || 'Dropped {count} skill/command name(s) from the manifest that UDS does not ship or that are not installed.').replace('{count}', foreignNamesOnLatest)}`
|
|
665
|
+
));
|
|
666
|
+
}
|
|
667
|
+
if (retiredOnLatest.length > 0 || foreignSkillsOnLatest.length > 0 || foreignCommandsOnLatest.length > 0
|
|
668
|
+
|| foreignNamesOnLatest > 0) {
|
|
656
669
|
writeManifest(manifest, projectPath);
|
|
657
670
|
}
|
|
658
671
|
|
|
@@ -2928,6 +2941,15 @@ async function updateSkillsOnly(projectPath, manifest, options) {
|
|
|
2928
2941
|
// XSPEC-454 R2: and forget the records that were never UDS's (the manifest this merges into
|
|
2929
2942
|
// may come from an installer that hashed the whole skills folder).
|
|
2930
2943
|
pruneForeignSkillHashes(manifest);
|
|
2944
|
+
// XSPEC-456 R4: and the names UDS cannot vouch for (not shipped, or not on disk where installed).
|
|
2945
|
+
const skillNamesBefore = manifest.skills.names.length;
|
|
2946
|
+
pruneForeignSkillNames(manifest, projectPath, { checkDisk: true });
|
|
2947
|
+
const droppedSkillNames = skillNamesBefore - manifest.skills.names.length;
|
|
2948
|
+
if (droppedSkillNames > 0) {
|
|
2949
|
+
console.log(chalk.gray(
|
|
2950
|
+
` ${(msg.droppedForeignNames || 'Dropped {count} skill/command name(s) from the manifest that UDS does not ship or that are not installed.').replace('{count}', droppedSkillNames)}`
|
|
2951
|
+
));
|
|
2952
|
+
}
|
|
2931
2953
|
|
|
2932
2954
|
// 🔴 Re-read before writing. `manifest` was loaded at the top of the update
|
|
2933
2955
|
// command, BEFORE the reconciler ran; the reconciler writes its own copy to
|
|
@@ -3063,6 +3085,15 @@ async function updateCommandsOnly(projectPath, manifest, options) {
|
|
|
3063
3085
|
}
|
|
3064
3086
|
// XSPEC-454 R2: and forget command records for commands UDS does not ship.
|
|
3065
3087
|
pruneForeignCommandHashes(manifest);
|
|
3088
|
+
// XSPEC-456 R4: same for the command names.
|
|
3089
|
+
const commandNamesBefore = manifest.commands.names.length;
|
|
3090
|
+
pruneForeignCommandNames(manifest, projectPath, { checkDisk: true });
|
|
3091
|
+
const droppedCommandNames = commandNamesBefore - manifest.commands.names.length;
|
|
3092
|
+
if (droppedCommandNames > 0) {
|
|
3093
|
+
console.log(chalk.gray(
|
|
3094
|
+
` ${(msg.droppedForeignNames || 'Dropped {count} skill/command name(s) from the manifest that UDS does not ship or that are not installed.').replace('{count}', droppedCommandNames)}`
|
|
3095
|
+
));
|
|
3096
|
+
}
|
|
3066
3097
|
|
|
3067
3098
|
// 🔴 Re-read before writing. `manifest` was loaded at the top of the update
|
|
3068
3099
|
// command, BEFORE the reconciler ran; the reconciler writes its own copy to
|
|
@@ -3498,8 +3529,18 @@ function takeStepBackup(projectPath, label, installations, kind) {
|
|
|
3498
3529
|
/** The step is over (its last manifest write is done): record what it created, and say how to undo it. */
|
|
3499
3530
|
function finishStepBackup(projectPath, backup) {
|
|
3500
3531
|
finalizeBackup(projectPath, backup.backupId);
|
|
3501
|
-
|
|
3532
|
+
printBackupLocation(backup.backupId);
|
|
3533
|
+
}
|
|
3534
|
+
|
|
3535
|
+
/**
|
|
3536
|
+
* Say where the backup is, how to undo, and what to exclude (XSPEC-456 R7). All backups share one folder,
|
|
3537
|
+
* `.uds-backups/`, so a tool that does not read .gitignore (an indexer, IDE search, grep) can be told to
|
|
3538
|
+
* skip a single name.
|
|
3539
|
+
*/
|
|
3540
|
+
function printBackupLocation(backupId) {
|
|
3541
|
+
console.log(chalk.gray(` Backup: ${backupId}`));
|
|
3502
3542
|
console.log(chalk.gray(' Use `uds update --rollback` to undo.'));
|
|
3543
|
+
console.log(chalk.gray(' Tools that do not read .gitignore (indexers, IDE search, grep): exclude `.uds-backups`.'));
|
|
3503
3544
|
}
|
|
3504
3545
|
|
|
3505
3546
|
function cleanupBackupsQuietly(projectPath) {
|
|
@@ -3560,7 +3601,7 @@ async function handleRollback(projectPath) {
|
|
|
3560
3601
|
console.log(chalk.red('Rollback did NOT complete. The project may be in a mixed state:'));
|
|
3561
3602
|
printPaths('✗', result.errors, 30, chalk.red);
|
|
3562
3603
|
console.log(chalk.yellow(' What to do: fix the cause above (permissions, a locked file) and run `uds update --rollback` again —'));
|
|
3563
|
-
console.log(chalk.yellow(' it is safe to repeat. The backups are still in .uds-backup-* if you need to copy files back by hand.'));
|
|
3604
|
+
console.log(chalk.yellow(' it is safe to repeat. The backups are still in .uds-backups/ (and .uds-backup-* if an older UDS made them) if you need to copy files back by hand.'));
|
|
3564
3605
|
}
|
|
3565
3606
|
if ((result.notRestored || []).length > 0) {
|
|
3566
3607
|
console.log(chalk.yellow('Not restored:'));
|
|
@@ -3680,8 +3721,7 @@ async function handleReconcile(projectPath, options, { force }) {
|
|
|
3680
3721
|
}
|
|
3681
3722
|
|
|
3682
3723
|
if (result.execution?.backupId) {
|
|
3683
|
-
|
|
3684
|
-
console.log(chalk.gray(' Use `uds update --rollback` to undo.'));
|
|
3724
|
+
printBackupLocation(result.execution.backupId);
|
|
3685
3725
|
}
|
|
3686
3726
|
|
|
3687
3727
|
if (result.errors.length > 0) {
|