universal-dev-standards 6.1.0 → 6.1.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.
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  source: ../../CHANGELOG.md
3
- source_version: 6.1.0
4
- translation_version: 6.1.0
5
- last_synced: 2026-07-17
3
+ source_version: 6.1.1
4
+ translation_version: 6.1.1
5
+ last_synced: 2026-07-18
6
6
  status: current
7
7
  ---
8
8
 
@@ -17,6 +17,18 @@ status: current
17
17
 
18
18
  ## [Unreleased]
19
19
 
20
+ ## [6.1.1] - 2026-07-18
21
+
22
+ > **`uds check` 悄悄量错了东西。** 它的落后检查拿你的标准去比 CLI 自己 bundled 的副本、而非 npm——CLI 一旧就吐出倒退、无意义的消息,且结构上永远说不出「你的标准过期了」——还把那条消息埋在逐文件一行的「未变更」底下。
23
+
24
+ ### Fixed
25
+
26
+ - **`uds check` 现在拿你安装的标准比对 npm 上的最新版,而非 CLI 自己 bundled 的副本**(XSPEC-342)。`displayAdoptionStatus` 原本拿 `manifest.upstream.version` 去比**运行这支 CLI 内置的**标准副本。CLI 一旧,那副本就比 npm 旧——于是检查打印出倒退的 `⚠ 有可用更新:6.1.0 → 5.12.1`(叫你「更新」到*更旧*的版本),且结构上永远无法报告你的标准落后。现在改问 npm 最新版;当你的标准落后时,消息改为 **「你安装的标准落后最新版」**,并给出完整两步修复——`npm update -g universal-dev-standards` **然后** `uds update`——因为只更新 CLI 不会动到你项目的 `.standards/`。`--offline` 静默跳过比对,不再退回误导的 bundled 检查。
27
+
28
+ ### Changed
29
+
30
+ - **`uds check` 不再逐文件列出未变更的文件**(XSPEC-342)。它原本对每个跟踪文件打印一行 `✓ …(未变更)`——约占命令输出的 70%(实测 121 → 41 行)——淹没了真正该读的消息,也让输出大到被自动化调用端(pre-commit agent)截断。逐文件「未变更」打印已移除;计数仍保留在一行的完整性摘要,已修改/缺失/未哈希的文件仍逐一列出。
31
+
20
32
  ## [6.1.0] - 2026-07-17
21
33
 
22
34
  > **同一种形状的两个失败,一个在标准里、一个在 CLI 里**:一道检查跑了、返回了、报告成功,却什么都没测到。`verification-evidence` 补上了为它命名的那一层;`uds init` 则不再是它的一个实例。
@@ -36,7 +48,7 @@ status: current
36
48
  - **`verification-evidence` 1.1.0 → 1.2.0 —— 证据有效性**(XSPEC-340)。本标准原本把 `exit_code` 当成事实真相:`trust_rules` 写着"`exit_code ≠ 0` → 验证失败"、`physical_spec.checks` 问的是"`exit_code` 是否为 0(成功)?"、VE-002 只要非零就触发修复循环。**这三处现已全数加上限定条件**,因为一道验证命令可以跑完、可以返回,却什么意义都没有:
37
49
  - **新增 `evidence_validity` 层次与规则 VE-007 – VE-010**:只有在"成功时返回 0"的工具上,`exit_code = 0` 才代表成功(VE-007);在证明查询工具确实执行过之前,"空/未找到/0"不等于不存在(VE-008);存在性检查不得丢弃 stderr(VE-009);pipeline 的退出码不属于其中任何单一阶段(VE-010)。
38
50
  - **新增 `non_evidence_claims`**:"已完成"/"应该可以了"/"我改了代码"/"测试应该会通过"/"命令返回 0"。
39
- - 有别于 `anti-hallucination`——后者的禁令全都是"不要断言你没查过的事"的变形。这里是相反的失败:**确实查了,而查询工具静默地没有运作**。`core/verification-evidence.md` 收录了十笔真实案例作为证据。
51
+ - 有别于 `anti-hallucination`——后者的禁令全都是"不要断言你没查过的事"的变形。这里是相反的失败:**确实查了,而查询工具静默地没有运作**。`core/verification-evidence.md` 收录了八笔真实案例作为证据。
40
52
  - **`verification-evidence` 的人类文档补上了 v1.1.0 的落差。** v1.1.0 的 `environment_layer` 工作(XSPEC-204)已落地于全部三份 `.ai.yaml`,却**一份 `.md` 都没有更新**(共四份)——人类文档自 2026-05-13 起就一直在错误地描述这个标准。`core/*.md` 现已载明 `environment_layer`、Environment Layers 章节,以及 VE-005 / VE-006。
41
53
  - **`verification-evidence` 新增三个先前只存在于 zh-TW 译文的章节**:非证据的声明(Non-Evidence Claims)、证据类型(Evidence Types)、相关标准(Related Standards)。译文比它的来源更完整;这些章节现已上溯至英文来源,并同时存在于两个语系。
42
54
 
@@ -15,7 +15,7 @@ status: current
15
15
 
16
16
  > **语言**: [English](../../README.md) | [繁體中文](../zh-TW/README.md) | 简体中文
17
17
 
18
- **版本**: 6.1.0 | **发布日期**: 2026-07-17 | **授权**: [双重授权](../../LICENSE) (CC BY 4.0 + MIT)
18
+ **版本**: 6.1.1 | **发布日期**: 2026-07-18 | **授权**: [双重授权](../../LICENSE) (CC BY 4.0 + MIT)
19
19
 
20
20
  语言无关、框架无关的软件项目文档标准。通过 AI 原生工作流,确保不同技术栈之间的一致性、质量和可维护性。
21
21
 
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  source: ../../CHANGELOG.md
3
- source_version: 6.1.0
4
- translation_version: 6.1.0
5
- last_synced: 2026-07-17
3
+ source_version: 6.1.1
4
+ translation_version: 6.1.1
5
+ last_synced: 2026-07-18
6
6
  status: current
7
7
  ---
8
8
 
@@ -17,6 +17,18 @@ status: current
17
17
 
18
18
  ## [Unreleased]
19
19
 
20
+ ## [6.1.1] - 2026-07-18
21
+
22
+ > **`uds check` 悄悄量錯了東西。** 它的落後檢查拿你的標準去比 CLI 自己 bundled 的副本、而非 npm——CLI 一舊就吐出倒退、無意義的訊息,且結構上永遠說不出「你的標準過期了」——還把那則訊息埋在逐檔一行的「未變更」底下。
23
+
24
+ ### Fixed
25
+
26
+ - **`uds check` 現在拿你安裝的標準比對 npm 上的最新版,而非 CLI 自己 bundled 的副本**(XSPEC-342)。`displayAdoptionStatus` 原本拿 `manifest.upstream.version` 去比**跑這支 CLI 內建的**標準副本。CLI 一舊,那副本就比 npm 舊——於是檢查印出倒退的 `⚠ 有可用更新:6.1.0 → 5.12.1`(叫你「更新」到*更舊*的版本),且結構上永遠無法回報你的標準落後。現在改問 npm 最新版;當你的標準落後時,訊息改為 **「你安裝的標準落後最新版」**,並給出完整兩步驟修復——`npm update -g universal-dev-standards` **然後** `uds update`——因為只更新 CLI 不會動到你專案的 `.standards/`。`--offline` 靜默略過比對,不再退回誤導的 bundled 檢查。
27
+
28
+ ### Changed
29
+
30
+ - **`uds check` 不再逐檔列出未變更的檔案**(XSPEC-342)。它原本對每個追蹤檔印一行 `✓ …(未變更)`——約佔指令輸出的 70%(實測 121 → 41 行)——淹沒了真正該讀的訊息,也讓輸出大到被自動化呼叫端(pre-commit agent)截斷。逐檔「未變更」列印已移除;計數仍保留在一行的完整性摘要,已修改/遺失/未雜湊的檔案仍逐一列出。
31
+
20
32
  ## [6.1.0] - 2026-07-17
21
33
 
22
34
  > **同一種形狀的兩個失敗,一個在標準裡、一個在 CLI 裡**:一道檢查跑了、回傳了、回報成功,卻什麼都沒量到。`verification-evidence` 補上了為它命名的那一層;`uds init` 則不再是它的一個實例。
@@ -36,7 +48,7 @@ status: current
36
48
  - **`verification-evidence` 1.1.0 → 1.2.0 —— 證據有效性**(XSPEC-340)。本標準原本把 `exit_code` 當成事實真相:`trust_rules` 寫著「`exit_code ≠ 0` → 驗證失敗」、`physical_spec.checks` 問的是「`exit_code` 是否為 0(成功)?」、VE-002 只要非零就觸發修復迴圈。**這三處現已全數加上限定條件**,因為一道驗證指令可以跑完、可以回傳,卻什麼意義都沒有:
37
49
  - **新增 `evidence_validity` 層次與規則 VE-007 – VE-010**:只有在「成功時回傳 0」的工具上,`exit_code = 0` 才代表成功(VE-007);在證明查詢工具確實執行過之前,「空/查無/0」不等於不存在(VE-008);存在性檢查不得丟棄 stderr(VE-009);pipeline 的 exit code 不屬於其中任何單一階段(VE-010)。
38
50
  - **新增 `non_evidence_claims`**:「已完成」/「應該可以了」/「我改了程式碼」/「測試應該會通過」/「指令回傳 0」。
39
- - 有別於 `anti-hallucination`——後者的禁令全都是「不要斷言你沒查過的事」的變形。這裡是相反的失敗:**確實查了,而查詢工具靜默地沒有運作**。`core/verification-evidence.md` 收錄了十筆真實案例作為證據。
51
+ - 有別於 `anti-hallucination`——後者的禁令全都是「不要斷言你沒查過的事」的變形。這裡是相反的失敗:**確實查了,而查詢工具靜默地沒有運作**。`core/verification-evidence.md` 收錄了八筆真實案例作為證據。
40
52
  - **`verification-evidence` 的人類文件補上了 v1.1.0 的落差。** v1.1.0 的 `environment_layer` 工作(XSPEC-204)已落地於全部三份 `.ai.yaml`,卻**一份 `.md` 都沒有更新**(共四份)——人類文件自 2026-05-13 起就一直在錯誤地描述這個標準。`core/*.md` 現已載明 `environment_layer`、Environment Layers 章節,以及 VE-005 / VE-006。
41
53
  - **`verification-evidence` 新增三個先前只存在於 zh-TW 譯文的章節**:非證據的聲明(Non-Evidence Claims)、證據類型(Evidence Types)、相關標準(Related Standards)。譯文比它的來源更完整;這些章節現已上溯至英文來源,並同時存在於兩個語系。
42
54
 
@@ -15,7 +15,7 @@ status: current
15
15
 
16
16
  > **語言**: [English](../../README.md) | 繁體中文 | [简体中文](../zh-CN/README.md)
17
17
 
18
- **版本**: 6.1.0 | **發布日期**: 2026-07-17 | **授權**: [雙重授權](../../LICENSE) (CC BY 4.0 + MIT)
18
+ **版本**: 6.1.1 | **發布日期**: 2026-07-18 | **授權**: [雙重授權](../../LICENSE) (CC BY 4.0 + MIT)
19
19
 
20
20
  語言無關、框架無關的軟體專案文件標準。透過 AI 原生工作流,確保不同技術堆疊之間的一致性、品質和可維護性。
21
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "universal-dev-standards",
3
- "version": "6.1.0",
3
+ "version": "6.1.1",
4
4
  "description": "CLI tool for adopting Universal Development Standards",
5
5
  "keywords": [
6
6
  "documentation",
@@ -44,12 +44,9 @@ import { lintAll as lintI18nAll, partitionFindings as partitionI18nFindings } fr
44
44
  * Display the summary of file integrity status
45
45
  */
46
46
  function displayFileIntegritySummary(fileStatus, msg) {
47
- if (fileStatus.unchanged.length > 0) {
48
- for (const file of fileStatus.unchanged) {
49
- console.log(chalk.green(` ${file} (${msg.unchanged})`));
50
- }
51
- }
52
-
47
+ // XSPEC-342 R4(安靜通過):不再逐檔列印「✓ 未變更」——實測佔 `uds check` 輸出約 70%
48
+ // (121 行中 85 行),把真正該讀的訊息(如標準落後)淹沒,也讓輸出大到被 agent 截斷。
49
+ // 未變更數仍保留在下方 summary 一行;此處只列印「需要注意」的檔(modified/missing/noHash)。
53
50
  if (fileStatus.modified.length > 0) {
54
51
  for (const file of fileStatus.modified) {
55
52
  console.log(chalk.yellow(` ⚠ ${file} (${msg.modified})`));
@@ -221,7 +218,7 @@ function initializeCheckContext(projectPath) {
221
218
  /**
222
219
  * Display standards adoption status and update information
223
220
  */
224
- function displayAdoptionStatus(manifest, msg, common, repoInfo) {
221
+ function displayAdoptionStatus(manifest, msg, common, repoInfo, standardsUpdate) {
225
222
  console.log(chalk.green(msg.standardsInitialized));
226
223
  console.log();
227
224
  console.log(chalk.cyan(msg.adoptionStatus));
@@ -229,9 +226,15 @@ function displayAdoptionStatus(manifest, msg, common, repoInfo) {
229
226
  console.log(chalk.gray(` ${common.version}: ${manifest.upstream.version}`));
230
227
  console.log();
231
228
 
232
- // Check for updates (bundled registry)
233
- if (manifest.upstream.version !== repoInfo.standards.version) {
234
- console.log(chalk.yellow(msg.updateAvailable.replace('{current}', manifest.upstream.version).replace('{latest}', repoInfo.standards.version)));
229
+ // XSPEC-342 R1:判斷「已裝標準」是否落後 **npm 最新版**,而非 CLI 自己 bundled 的副本。
230
+ // 舊 bug:拿 manifest.upstream.version repoInfo.standards.version(=跑這支 CLI 帶的
231
+ // 標準副本)。CLI 一舊,bundled < npm 最新,就會吐出「6.1.0 → 5.12.1」這種倒退訊息,
232
+ // 且永遠說不出「你的標準過期了」。standardsUpdate = checkForUpdates(已裝標準版本):
233
+ // available = 已裝 < npm 最新。離線時為 null → 靜默略過(不誤用 bundled 版本比對)。
234
+ if (standardsUpdate && !standardsUpdate.offline && standardsUpdate.available) {
235
+ console.log(chalk.yellow(msg.updateAvailable
236
+ .replace('{current}', manifest.upstream.version)
237
+ .replace('{latest}', standardsUpdate.latestVersion)));
235
238
  console.log(chalk.gray(` ${msg.runUpdate}`));
236
239
  console.log();
237
240
  }
@@ -308,10 +311,17 @@ export async function checkCommand(options = {}) {
308
311
  console.log(chalk.bold(msg.title));
309
312
  console.log(chalk.gray('─'.repeat(50)));
310
313
 
311
- // Display adoption info
312
- displayAdoptionStatus(manifest, msg, common, repoInfo);
314
+ // XSPEC-342 R1:先問 npm 最新,判斷「已裝標準」是否落後(離線則跳過,不誤用 CLI bundled 版本)。
315
+ // fetchLatestVersion 60s 模組級快取,故此處與下方 checkCliVersion 共兩次呼叫只打一次網路。
316
+ let standardsUpdate = null;
317
+ if (!options.offline) {
318
+ standardsUpdate = await checkForUpdates(manifest.upstream.version, {
319
+ checkBeta: manifest.upstream.version.includes('-')
320
+ });
321
+ }
313
322
 
314
- // Check for CLI updates from npm registry (unless --offline)
323
+ // Display adoption info
324
+ displayAdoptionStatus(manifest, msg, common, repoInfo, standardsUpdate);
315
325
 
316
326
  // Check for CLI updates from npm registry (unless --offline)
317
327
  if (!options.offline) {
@@ -742,8 +742,8 @@ export const messages = {
742
742
  adoptionStatus: 'Adoption Status:',
743
743
  installed: 'Installed',
744
744
  // Update info
745
- updateAvailable: '⚠ Update available: {current} → {latest}',
746
- runUpdate: 'Run `uds update` to update.',
745
+ updateAvailable: '⚠ Your installed standards are behind the latest release: {current} → {latest}',
746
+ runUpdate: 'Update in two steps — (1) npm update -g universal-dev-standards (2) uds update',
747
747
  // File integrity
748
748
  fileIntegrity: 'File Integrity:',
749
749
  hashNotAvailable: 'ℹ Hash information not available (legacy manifest).',
@@ -1974,8 +1974,8 @@ export const messages = {
1974
1974
  adoptionStatus: '採用狀態:',
1975
1975
  installed: '已安裝',
1976
1976
  // Update info
1977
- updateAvailable: '⚠ 有可用更新:{current} → {latest}',
1978
- runUpdate: '執行 `uds update` 進行更新。',
1977
+ updateAvailable: '⚠ 你安裝的標準落後最新版:{current} → {latest}',
1978
+ runUpdate: '兩步驟更新 —(1)npm update -g universal-dev-standards (2)uds update',
1979
1979
  // File integrity
1980
1980
  fileIntegrity: '檔案完整性:',
1981
1981
  hashNotAvailable: 'ℹ 無法取得 hash 資訊(舊版 manifest)。',
@@ -3221,8 +3221,8 @@ export const messages = {
3221
3221
  adoptionStatus: '采用状态:',
3222
3222
  installed: '已安装',
3223
3223
  // Update info
3224
- updateAvailable: '⚠ 有可用更新:{current} → {latest}',
3225
- runUpdate: '执行 `uds update` 进行更新。',
3224
+ updateAvailable: '⚠ 你安装的标准落后最新版:{current} → {latest}',
3225
+ runUpdate: '两步更新 —(1)npm update -g universal-dev-standards (2)uds update',
3226
3226
  // File integrity
3227
3227
  fileIntegrity: '文件完整性:',
3228
3228
  hashNotAvailable: 'ℹ 哈希信息不可用(旧版 manifest)。',
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "version": "6.1.0",
3
+ "version": "6.1.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.1.0"
61
+ "version": "6.1.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.1.0",
68
+ "version": "6.1.1",
69
69
  "note": "Skills are now included in the main repository under skills/"
70
70
  }
71
71
  },
@@ -2226,7 +2226,7 @@
2226
2226
  "id": "license-compliance",
2227
2227
  "name": "License Compliance Standards",
2228
2228
  "nameZh": "授權合規標準",
2229
- "version": "6.1.0",
2229
+ "version": "6.1.1",
2230
2230
  "source": {
2231
2231
  "human": "core/license-compliance.md",
2232
2232
  "ai": "ai/standards/license-compliance.ai.yaml"
@@ -2238,7 +2238,7 @@
2238
2238
  "id": "verification-oracle",
2239
2239
  "name": "Verification Oracle Standards",
2240
2240
  "nameZh": "驗證 Oracle 標準",
2241
- "version": "6.1.0",
2241
+ "version": "6.1.1",
2242
2242
  "source": {
2243
2243
  "human": "core/verification-oracle.md",
2244
2244
  "ai": "ai/standards/verification-oracle.ai.yaml"
@@ -2250,7 +2250,7 @@
2250
2250
  "id": "model-provenance",
2251
2251
  "name": "Model Provenance Policy Standards",
2252
2252
  "nameZh": "模型來源政策標準",
2253
- "version": "6.1.0",
2253
+ "version": "6.1.1",
2254
2254
  "source": {
2255
2255
  "human": "core/model-provenance.md",
2256
2256
  "ai": "ai/standards/model-provenance.ai.yaml"
@@ -2262,7 +2262,7 @@
2262
2262
  "id": "resource-cost-boundary",
2263
2263
  "name": "Resource / Cost Boundary Declaration Standards",
2264
2264
  "nameZh": "資源/成本邊界宣告標準",
2265
- "version": "6.1.0",
2265
+ "version": "6.1.1",
2266
2266
  "source": {
2267
2267
  "human": "core/resource-cost-boundary.md",
2268
2268
  "ai": "ai/standards/resource-cost-boundary.ai.yaml"