universal-dev-standards 6.2.4 → 6.2.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 CHANGED
@@ -213,6 +213,7 @@ program
213
213
  .option('--commands', 'Install/update slash commands for configured AI tools')
214
214
  .option('--debug', 'Show debug output for Skills/Commands detection')
215
215
  .option('--plan', 'Show reconciliation plan without executing (like terraform plan)')
216
+ .option('--apply', 'Apply exactly the plan --plan prints (plain `uds update` does not)')
216
217
  .option('--force', 'Force update all files, ignoring hash comparison')
217
218
  .option('--rollback', 'Rollback to the most recent backup')
218
219
  .option('--locale <locale>', 'Override locale for skills install (zh-tw, zh-cn, en); also reads .uds/install.yaml + UDS_LOCALE env')
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  source: ../../CHANGELOG.md
3
- source_version: 6.2.4
4
- translation_version: 6.2.4
3
+ source_version: 6.2.6
4
+ translation_version: 6.2.6
5
5
  last_synced: 2026-07-31
6
6
  status: current
7
7
  ---
@@ -17,6 +17,22 @@ status: current
17
17
 
18
18
  ## [Unreleased]
19
19
 
20
+ ## [6.2.6] - 2026-07-31
21
+
22
+ ### 新增
23
+
24
+ - **`uds update --apply`** —— 应用 `uds update --plan` 打印出的那个计划,一字不差。
25
+
26
+ ### 修复
27
+
28
+ - **`--plan` 叫你去跑一个会忽略计划的命令。** 它打印出「Run `uds update` to apply these changes」,但 `uds update` 根本到不了 reconciler——它走 legacy 路径、更新既有标准,然后为**那件事**报告成功。某次升级它打印出 `✓ 已更新 69 个标准文件`,而上方计划里的 8 个删除、2 个新增一个都没做,那些文件事后仍在磁盘上。**没有任何一步失败**,所以输出与「已应用计划」无从分辨。`--force` 也不是答案:它以 `force: true` 重算,那是一个会重写每个受管文件的更大计划。**如果你过去读完计划后都是跑 `uds update`,那些删除与新增从未被应用**——请重跑 `uds update --plan` 看还有什么未处理。
29
+
30
+ ## [6.2.5] - 2026-07-31
31
+
32
+ ### 修复
33
+
34
+ - **`uds update` 的备份目录可能被提交进你的 repo。** `.uds-backup-<时间戳>/` 会写在项目旁供回滚,而没有任何规则忽略它——于是一次 `git add -A` 就把它扫了进去。这在我们自己的 repo 发生过两次,其中一次把 360 个文件、73,992 行带进了公开 repo。备份现在会忽略自己:创建时就在目录内写一个内容为 `*` 的 `.gitignore`,`git status` 与 `git add -A` 不再看得到它,而**你的** `.gitignore` 不会被修改。旧版本产生的既有备份不会被追溯隐藏——请自行删除或补上规则。
35
+
20
36
  ## [6.2.4] - 2026-07-31
21
37
 
22
38
  ### 修复
@@ -15,7 +15,7 @@ status: current
15
15
 
16
16
  > **语言**: [English](../../README.md) | [繁體中文](../zh-TW/README.md) | 简体中文
17
17
 
18
- **版本**: 6.2.4 | **发布日期**: 2026-07-31 | **授权**: [双重授权](../../LICENSE) (CC BY 4.0 + MIT)
18
+ **版本**: 6.2.6 | **发布日期**: 2026-07-31 | **授权**: [双重授权](../../LICENSE) (CC BY 4.0 + MIT)
19
19
 
20
20
  语言无关、框架无关的软件项目文档标准。通过 AI 原生工作流,确保不同技术栈之间的一致性、质量和可维护性。
21
21
 
@@ -13,7 +13,7 @@ status: current
13
13
  <!-- UDS_SUPPORTED_VERSIONS_START -->
14
14
  | 版本 | 支持状态 |
15
15
  |------|--------|
16
- | 6.2.4 | ✅ 最新正式版 |
16
+ | 6.2.6 | ✅ 最新正式版 |
17
17
  | < 6.0.0 | ❌ 已终止支持 |
18
18
  <!-- UDS_SUPPORTED_VERSIONS_END -->
19
19
 
@@ -1,6 +1,6 @@
1
1
  # UDS 速查表
2
2
 
3
- > Quick reference for all UDS features | Last updated: 2026-07-22
3
+ > Quick reference for all UDS features | Last updated: 2026-07-31
4
4
 
5
5
  **Language**: [English](../../../docs/user/CHEATSHEET.md) | [繁體中文](../../zh-TW/docs/CHEATSHEET.md) | 简体中文
6
6
 
@@ -371,6 +371,7 @@
371
371
  | `pre-release.sh` | Pre-Release Preparation Script |
372
372
  | `setup-husky.mjs` | Cross-platform Husky Setup Script |
373
373
  | `sync-manifest.mjs` | Extract top-level Commander command names register |
374
+ | `watch-model-versions.sh` | Model / tool version watch — XSPEC-357 AC-6.2 |
374
375
 
375
376
  ---
376
377
 
@@ -1,7 +1,7 @@
1
1
  # UDS 功能参考手册
2
2
 
3
3
  > Universal Development Standards - 完整功能文档
4
- > Auto-generated | Last updated: 2026-07-22
4
+ > Auto-generated | Last updated: 2026-07-31
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) (149)
18
- 7. [脚本](#scripts) (57)
18
+ 7. [脚本](#scripts) (58)
19
19
 
20
- **Total Features: 331**
20
+ **Total Features: 332**
21
21
 
22
22
  ---
23
23
 
@@ -108,6 +108,7 @@
108
108
  | `--commands` | Install/update slash commands for configured AI tools |
109
109
  | `--debug` | Show debug output for Skills/Commands detection |
110
110
  | `--plan` | Show reconciliation plan without executing (like terraform plan) |
111
+ | `--apply` | Apply exactly the plan --plan prints (plain `uds update` does not) |
111
112
  | `--force` | Force update all files, ignoring hash comparison |
112
113
  | `--rollback` | Rollback to the most recent backup |
113
114
  | `--locale` | Override locale for skills install (zh-tw, zh-cn, en); also reads .uds/install.yaml + UDS_LOCALE env |
@@ -499,6 +500,7 @@
499
500
  | `pre-release.sh` | Pre-Release Preparation Script |
500
501
  | `setup-husky.mjs` | Cross-platform Husky Setup Script |
501
502
  | `sync-manifest.mjs` | Extract top-level Commander command names registered directly on the |
503
+ | `watch-model-versions.sh` | Model / tool version watch — XSPEC-357 AC-6.2 |
502
504
 
503
505
  ---
504
506
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  source: ../../CHANGELOG.md
3
- source_version: 6.2.4
4
- translation_version: 6.2.4
3
+ source_version: 6.2.6
4
+ translation_version: 6.2.6
5
5
  last_synced: 2026-07-31
6
6
  status: current
7
7
  ---
@@ -17,6 +17,22 @@ status: current
17
17
 
18
18
  ## [Unreleased]
19
19
 
20
+ ## [6.2.6] - 2026-07-31
21
+
22
+ ### 新增
23
+
24
+ - **`uds update --apply`** —— 套用 `uds update --plan` 印出的那個計畫,一字不差。
25
+
26
+ ### 修復
27
+
28
+ - **`--plan` 叫你去跑一個會忽略計畫的指令。** 它印出「Run `uds update` to apply these changes」,但 `uds update` 根本到不了 reconciler——它走 legacy 路徑、更新既有標準,然後為**那件事**回報成功。某次升級它印出 `✓ 已更新 69 個標準檔案`,而上方計畫裡的 8 個刪除、2 個新增一個都沒做,那些檔事後仍在磁碟上。**沒有任何一步失敗**,所以輸出與「已套用計畫」無從分辨。`--force` 也不是答案:它以 `force: true` 重算,那是一個會重寫每個受管檔案的更大計畫。**如果你過去讀完計畫後都是跑 `uds update`,那些刪除與新增從未被套用**——請重跑 `uds update --plan` 看還有什麼未處理。
29
+
30
+ ## [6.2.5] - 2026-07-31
31
+
32
+ ### 修復
33
+
34
+ - **`uds update` 的備份目錄可能被提交進你的 repo。** `.uds-backup-<時間戳>/` 會寫在專案旁供回滾,而沒有任何規則忽略它——於是一次 `git add -A` 就把它掃了進去。這在我們自己的 repo 發生過兩次,其中一次把 360 個檔、73,992 行帶進了公開 repo。備份現在會忽略自己:建立時就在目錄內寫一個內容為 `*` 的 `.gitignore`,`git status` 與 `git add -A` 不再看得到它,而**你的** `.gitignore` 不會被修改。舊版本產生的既有備份不會被追溯隱藏——請自行刪除或補上規則。
35
+
20
36
  ## [6.2.4] - 2026-07-31
21
37
 
22
38
  ### 修復
@@ -15,7 +15,7 @@ status: current
15
15
 
16
16
  > **語言**: [English](../../README.md) | 繁體中文 | [简体中文](../zh-CN/README.md)
17
17
 
18
- **版本**: 6.2.4 | **發布日期**: 2026-07-31 | **授權**: [雙重授權](../../LICENSE) (CC BY 4.0 + MIT)
18
+ **版本**: 6.2.6 | **發布日期**: 2026-07-31 | **授權**: [雙重授權](../../LICENSE) (CC BY 4.0 + MIT)
19
19
 
20
20
  語言無關、框架無關的軟體專案文件標準。透過 AI 原生工作流,確保不同技術堆疊之間的一致性、品質和可維護性。
21
21
 
@@ -13,7 +13,7 @@ status: current
13
13
  <!-- UDS_SUPPORTED_VERSIONS_START -->
14
14
  | 版本 | 支援狀態 |
15
15
  |------|--------|
16
- | 6.2.4 | ✅ 最新正式版 |
16
+ | 6.2.6 | ✅ 最新正式版 |
17
17
  | < 6.0.0 | ❌ 已終止支援 |
18
18
  <!-- UDS_SUPPORTED_VERSIONS_END -->
19
19
 
@@ -1,6 +1,6 @@
1
1
  # UDS 速查表
2
2
 
3
- > Quick reference for all UDS features | Last updated: 2026-07-22
3
+ > Quick reference for all UDS features | Last updated: 2026-07-31
4
4
 
5
5
  **Language**: [English](../../../docs/user/CHEATSHEET.md) | 繁體中文 | [简体中文](../../zh-CN/docs/CHEATSHEET.md)
6
6
 
@@ -371,6 +371,7 @@
371
371
  | `pre-release.sh` | Pre-Release Preparation Script |
372
372
  | `setup-husky.mjs` | Cross-platform Husky Setup Script |
373
373
  | `sync-manifest.mjs` | Extract top-level Commander command names register |
374
+ | `watch-model-versions.sh` | Model / tool version watch — XSPEC-357 AC-6.2 |
374
375
 
375
376
  ---
376
377
 
@@ -1,7 +1,7 @@
1
1
  # UDS 功能參考手冊
2
2
 
3
3
  > Universal Development Standards - 完整功能文件
4
- > Auto-generated | Last updated: 2026-07-22
4
+ > Auto-generated | Last updated: 2026-07-31
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) (149)
18
- 7. [腳本](#scripts) (57)
18
+ 7. [腳本](#scripts) (58)
19
19
 
20
- **Total Features: 331**
20
+ **Total Features: 332**
21
21
 
22
22
  ---
23
23
 
@@ -108,6 +108,7 @@
108
108
  | `--commands` | Install/update slash commands for configured AI tools |
109
109
  | `--debug` | Show debug output for Skills/Commands detection |
110
110
  | `--plan` | Show reconciliation plan without executing (like terraform plan) |
111
+ | `--apply` | Apply exactly the plan --plan prints (plain `uds update` does not) |
111
112
  | `--force` | Force update all files, ignoring hash comparison |
112
113
  | `--rollback` | Rollback to the most recent backup |
113
114
  | `--locale` | Override locale for skills install (zh-tw, zh-cn, en); also reads .uds/install.yaml + UDS_LOCALE env |
@@ -499,6 +500,7 @@
499
500
  | `pre-release.sh` | Pre-Release Preparation Script |
500
501
  | `setup-husky.mjs` | Cross-platform Husky Setup Script |
501
502
  | `sync-manifest.mjs` | Extract top-level Commander command names registered directly on the |
503
+ | `watch-model-versions.sh` | Model / tool version watch — XSPEC-357 AC-6.2 |
502
504
 
503
505
  ---
504
506
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "universal-dev-standards",
3
- "version": "6.2.4",
3
+ "version": "6.2.6",
4
4
  "description": "CLI tool for adopting Universal Development Standards",
5
5
  "keywords": [
6
6
  "documentation",
@@ -374,9 +374,15 @@ export async function updateCommand(options) {
374
374
  return;
375
375
  }
376
376
 
377
+ // Handle --apply option (DSR: execute the plan `--plan` prints)
378
+ if (options.apply) {
379
+ await handleReconcile(projectPath, options, { force: false });
380
+ return;
381
+ }
382
+
377
383
  // Handle --force option (DSR force reconciliation)
378
384
  if (options.force) {
379
- await handleForceReconcile(projectPath, options);
385
+ await handleReconcile(projectPath, options, { force: true });
380
386
  return;
381
387
  }
382
388
 
@@ -2318,21 +2324,40 @@ async function handlePlan(projectPath, options) {
2318
2324
  console.log();
2319
2325
 
2320
2326
  if (result.plan.actions.length > 0) {
2321
- console.log(chalk.gray('Run `uds update` to apply these changes.'));
2322
- console.log(chalk.gray('Run `uds update --force` to force update all files.'));
2327
+ // NOT `uds update`. That runs the legacy path, which never executes this
2328
+ // plan — it refreshes existing standards and reports success for having done
2329
+ // so, which reads exactly like the plan was applied. Upgrading one project it
2330
+ // printed "✓ 69 standards updated" while all 8 deletions and 2 creations in
2331
+ // the plan above were silently skipped; the files were still on disk
2332
+ // afterwards. Nor is `--force` the answer for "apply what I just read": it
2333
+ // recomputes with force:true, a larger plan that rewrites every managed file.
2334
+ console.log(chalk.gray('Run `uds update --apply` to apply exactly these changes.'));
2335
+ console.log(chalk.gray('Run `uds update --force` to rewrite every managed file (a larger plan than the one above).'));
2323
2336
  console.log();
2324
2337
  }
2325
2338
  }
2326
2339
 
2327
2340
  /**
2328
- * Handle --force: run the full reconciler with force mode.
2341
+ * Run the reconciler and apply its plan.
2342
+ *
2343
+ * `force` selects WHICH plan: force mode rewrites every managed file regardless
2344
+ * of hash, so it is a different and larger plan than the one `--plan` prints.
2345
+ * That difference is why `--apply` exists — see handlePlan.
2346
+ *
2347
+ * @param {string} projectPath
2348
+ * @param {Object} options - Command options (uses `yes`)
2349
+ * @param {{ force: boolean }} mode
2329
2350
  */
2330
- async function handleForceReconcile(projectPath, options) {
2331
- console.log(chalk.cyan('Running declarative state reconciliation (force mode)...'));
2351
+ async function handleReconcile(projectPath, options, { force }) {
2352
+ console.log(chalk.cyan(
2353
+ force
2354
+ ? 'Running declarative state reconciliation (force mode)...'
2355
+ : 'Running declarative state reconciliation...'
2356
+ ));
2332
2357
  console.log();
2333
2358
 
2334
2359
  // First show the plan
2335
- const planResult = await reconcilerPlan(projectPath, { force: true });
2360
+ const planResult = await reconcilerPlan(projectPath, { force });
2336
2361
 
2337
2362
  if (planResult.plan.actions.length === 0) {
2338
2363
  console.log(chalk.green('Everything is up to date. No changes needed.'));
@@ -2360,7 +2385,7 @@ async function handleForceReconcile(projectPath, options) {
2360
2385
  const spinner = ora('Applying reconciliation plan...').start();
2361
2386
 
2362
2387
  const result = await reconcile(projectPath, {
2363
- force: true,
2388
+ force,
2364
2389
  backup: true,
2365
2390
  onAction: (action, index, total) => {
2366
2391
  spinner.text = `[${index + 1}/${total}] ${action.type} ${action.path || action.category}`;
@@ -64,6 +64,28 @@ export function createBackup(projectPath, plan) {
64
64
  };
65
65
  }
66
66
 
67
+ // Make the backup invisible to git, from inside itself.
68
+ //
69
+ // WHY THIS IS NOT A LINE IN THE ADOPTER'S .gitignore. We create this directory
70
+ // in someone else's repository; making it disappear is our job, but editing
71
+ // their .gitignore to do it is not — that file is theirs, it may be generated,
72
+ // and a tool appending to it on every update is a worse trade than the problem.
73
+ // A `*` here ignores everything in this directory (this file included, which is
74
+ // fine: git reads .gitignore whether or not it is tracked), so `git status` and
75
+ // `git add -A` never see the backup at all, and nothing outside is touched.
76
+ //
77
+ // WHY IT EXISTS. Nothing ignored these directories, so `git add -A` in two
78
+ // sibling repos committed them: EngramGraph's 0.8.0 release commit took in 5
79
+ // backups — 360 files, 73,992 lines — and dev-platform took one. Both were
80
+ // public. The adopter is not the right place to put this responsibility: they
81
+ // did not create the directory and have no reason to expect it.
82
+ try {
83
+ writeFileSync(join(backupDir, '.gitignore'), '*\n', 'utf8');
84
+ } catch (err) {
85
+ // A backup that git can see still beats no backup — record and carry on.
86
+ errors.push(`Failed to write backup .gitignore: ${err.message}`);
87
+ }
88
+
67
89
  // Backup each file
68
90
  for (const relativePath of filesToBackup) {
69
91
  const sourcePath = join(projectPath, relativePath);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "version": "6.2.4",
3
+ "version": "6.2.6",
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.2.4"
61
+ "version": "6.2.6"
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.2.4",
68
+ "version": "6.2.6",
69
69
  "note": "Skills are now included in the main repository under skills/"
70
70
  }
71
71
  },
@@ -2236,7 +2236,7 @@
2236
2236
  "id": "license-compliance",
2237
2237
  "name": "License Compliance Standards",
2238
2238
  "nameZh": "授權合規標準",
2239
- "version": "6.2.4",
2239
+ "version": "6.2.6",
2240
2240
  "source": {
2241
2241
  "human": "core/license-compliance.md",
2242
2242
  "ai": "ai/standards/license-compliance.ai.yaml"
@@ -2248,7 +2248,7 @@
2248
2248
  "id": "verification-oracle",
2249
2249
  "name": "Verification Oracle Standards",
2250
2250
  "nameZh": "驗證 Oracle 標準",
2251
- "version": "6.2.4",
2251
+ "version": "6.2.6",
2252
2252
  "source": {
2253
2253
  "human": "core/verification-oracle.md",
2254
2254
  "ai": "ai/standards/verification-oracle.ai.yaml"
@@ -2260,7 +2260,7 @@
2260
2260
  "id": "model-provenance",
2261
2261
  "name": "Model Provenance Policy Standards",
2262
2262
  "nameZh": "模型來源政策標準",
2263
- "version": "6.2.4",
2263
+ "version": "6.2.6",
2264
2264
  "source": {
2265
2265
  "human": "core/model-provenance.md",
2266
2266
  "ai": "ai/standards/model-provenance.ai.yaml"
@@ -2272,7 +2272,7 @@
2272
2272
  "id": "resource-cost-boundary",
2273
2273
  "name": "Resource / Cost Boundary Declaration Standards",
2274
2274
  "nameZh": "資源/成本邊界宣告標準",
2275
- "version": "6.2.4",
2275
+ "version": "6.2.6",
2276
2276
  "source": {
2277
2277
  "human": "core/resource-cost-boundary.md",
2278
2278
  "ai": "ai/standards/resource-cost-boundary.ai.yaml"