universal-dev-standards 6.14.0-beta.10 → 6.14.0-beta.11

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,7 +1,7 @@
1
1
  ---
2
2
  source: ../../CHANGELOG.md
3
- source_version: 6.14.0-beta.10
4
- translation_version: 6.14.0-beta.10
3
+ source_version: 6.14.0-beta.11
4
+ translation_version: 6.14.0-beta.11
5
5
  last_synced: 2026-10-12
6
6
  status: current
7
7
  ---
@@ -15,7 +15,7 @@ status: current
15
15
 
16
16
  > **语言**: [English](../../README.md) | [繁體中文](../zh-TW/README.md) | 简体中文
17
17
 
18
- **版本**: 6.14.0-beta.10 (Pre-release) | **发布日期**: 2026-10-10 | **授权**: [双重授权](../../LICENSE) (CC BY 4.0 + MIT)
18
+ **版本**: 6.14.0-beta.11 (Pre-release) | **发布日期**: 2026-10-10 | **授权**: [双重授权](../../LICENSE) (CC BY 4.0 + MIT)
19
19
 
20
20
  语言无关、框架无关的软件项目文档标准。通过 AI 原生工作流,确保不同技术栈之间的一致性、质量和可维护性。
21
21
 
@@ -14,7 +14,7 @@ status: current
14
14
  <!-- UDS_SUPPORTED_VERSIONS_START -->
15
15
  | 版本 | 支持状态 |
16
16
  |------|--------|
17
- | 6.14.0-beta.10 | ✅ 预发布版本 |
17
+ | 6.14.0-beta.11 | ✅ 预发布版本 |
18
18
  | 6.13.1 | ✅ 最新正式版 |
19
19
  | < 6.0.0 | ❌ 已终止支持 |
20
20
  <!-- UDS_SUPPORTED_VERSIONS_END -->
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  source: ../../CHANGELOG.md
3
- source_version: 6.14.0-beta.10
4
- translation_version: 6.14.0-beta.10
3
+ source_version: 6.14.0-beta.11
4
+ translation_version: 6.14.0-beta.11
5
5
  last_synced: 2026-10-12
6
6
  status: current
7
7
  ---
@@ -15,7 +15,7 @@ status: current
15
15
 
16
16
  > **語言**: [English](../../README.md) | 繁體中文 | [简体中文](../zh-CN/README.md)
17
17
 
18
- **版本**: 6.14.0-beta.10 (Pre-release) | **發布日期**: 2026-10-10 | **授權**: [雙重授權](../../LICENSE) (CC BY 4.0 + MIT)
18
+ **版本**: 6.14.0-beta.11 (Pre-release) | **發布日期**: 2026-10-10 | **授權**: [雙重授權](../../LICENSE) (CC BY 4.0 + MIT)
19
19
 
20
20
  語言無關、框架無關的軟體專案文件標準。透過 AI 原生工作流,確保不同技術堆疊之間的一致性、品質和可維護性。
21
21
 
@@ -14,7 +14,7 @@ status: current
14
14
  <!-- UDS_SUPPORTED_VERSIONS_START -->
15
15
  | 版本 | 支援狀態 |
16
16
  |------|--------|
17
- | 6.14.0-beta.10 | ✅ 預發布版本 |
17
+ | 6.14.0-beta.11 | ✅ 預發布版本 |
18
18
  | 6.13.1 | ✅ 最新正式版 |
19
19
  | < 6.0.0 | ❌ 已終止支援 |
20
20
  <!-- UDS_SUPPORTED_VERSIONS_END -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "universal-dev-standards",
3
- "version": "6.14.0-beta.10",
3
+ "version": "6.14.0-beta.11",
4
4
  "description": "CLI tool for adopting Universal Development Standards",
5
5
  "keywords": [
6
6
  "documentation",
@@ -6,7 +6,7 @@
6
6
  import chalk from 'chalk';
7
7
  import { execSync } from 'child_process';
8
8
  import { resolveCommand } from '../core/command-router.js';
9
- import { droppedYamlComment } from '../core/project-config.js';
9
+ import { truncatedYamlValueLine } from '../core/project-config.js';
10
10
 
11
11
  const KNOWN_INTENTS = ['test', 'lint', 'build', 'security'];
12
12
 
@@ -63,12 +63,13 @@ export async function runIntentCommand(intent, options = {}) {
63
63
  console.log(chalk.gray(`$ ${resolved.command}`));
64
64
  console.log();
65
65
 
66
- // XSPEC-475 R5(c): YAML ends an unquoted value at a space followed by `#`. Say so before running, in a dry run and a
67
- // real run alike, so a command cut short is seen instead of discovered from its error.
68
- const dropped = resolved.source === 'uds.project.yaml' ? droppedYamlComment(projectPath, intent, resolved.command) : null; // wire:run-dropped-comment
69
- if (dropped) {
70
- console.log(chalk.yellow(`⚠ uds.project.yaml 的 ${intent} 指令中,空白加 # 之後的文字被 YAML 當成註解丟掉了:${dropped}`));
71
- console.log(chalk.yellow(' 如果那一段是指令的一部分,請把整個值用引號包起來(例如 \'...\' 或 "...");如果只是註解,可以忽略這則警告。'));
66
+ // XSPEC-475 R5(c): YAML ends an unquoted value at a space followed by `#`. When that leaves a command with an unclosed
67
+ // quote, say so before running, in a dry run and a real run alike, so a command cut short is seen instead of discovered
68
+ // from its error. A command that ends in a plain comment is complete and is not reported.
69
+ const cutLine = resolved.source === 'uds.project.yaml' ? truncatedYamlValueLine(projectPath, intent, resolved.command) : null; // wire:run-truncated-value
70
+ if (cutLine) {
71
+ console.log(chalk.yellow(`⚠ uds.project.yaml 第 ${cutLine} 行:${intent} 的值在「空白加 #」處被 YAML 截斷,留下的指令引號不成對。`));
72
+ console.log(chalk.yellow(' 請用引號包住整個值(例如 \'...\' 或 "..."),讓 # 留在指令裡。'));
72
73
  console.log();
73
74
  }
74
75
 
@@ -99,35 +99,56 @@ function validateConfig(config, filePath) {
99
99
  }
100
100
 
101
101
  /**
102
- * The text YAML dropped from an unquoted `commands:` / `custom:` value because it follows a space and a `#` (YAML reads
103
- * that as the start of a comment), or null when nothing was dropped. XSPEC-475 R5(c).
102
+ * True when `text` ends inside an open quote, reading it the way a shell does: a `'` inside `"..."` (and a `"` inside
103
+ * `'...'`) is plain text, and a backslash escapes the next character outside single quotes.
104
+ */
105
+ function endsInsideQuote(text) {
106
+ let open = null;
107
+ for (let i = 0; i < text.length; i++) {
108
+ const ch = text[i];
109
+ if (open === null) {
110
+ if (ch === '\\') i++;
111
+ else if (ch === '"' || ch === "'") open = ch;
112
+ } else if (open === '"' && ch === '\\') {
113
+ i++;
114
+ } else if (ch === open) {
115
+ open = null;
116
+ }
117
+ }
118
+ return open !== null;
119
+ }
120
+
121
+ /**
122
+ * The 1-based line of uds.project.yaml whose command YAML cut short in the middle of a quote, or null. XSPEC-475 R5(c).
104
123
  *
105
- * `build: node -p "'quoted # kept'"` is a valid plain YAML value that ends at `node -p "'quoted`: the shell would have
106
- * kept the `#`, YAML does not. CHANGELOG 6.14.0 says so, but nothing said it at the moment it happened. A trailing
107
- * comment (`test: dotnet test # 90 tests pass`) is also dropped; the two look the same in the file, so both are reported
108
- * and the person decides.
124
+ * YAML ends an unquoted value at a space followed by `#`. `build: node -p "'quoted # kept'"` therefore becomes
125
+ * `node -p "'quoted`: the shell would have kept the `#`, YAML does not, and what is left has an unclosed quote - a command
126
+ * that cannot be what the author meant. A genuine trailing comment (`test: dotnet test X.csproj # 90 tests pass`) leaves a
127
+ * complete command and is the supported way to comment, so it is NOT reported. Only the cut-short case is, and the text YAML
128
+ * dropped is not repeated (it may be a comment the person wants kept out of the output).
109
129
  *
110
130
  * Only a plain (unquoted) scalar on one line is looked at, and only when the value YAML produced is exactly the text
111
131
  * before the `#` - so a line this cannot match up with the parsed value is never reported.
112
132
  * @param {string} projectPath
113
133
  * @param {string} intent
114
134
  * @param {string} command - the value YAML produced for `intent`
115
- * @returns {string|null} the dropped text, starting at the `#`
135
+ * @returns {number|null}
116
136
  */
117
- export function droppedYamlComment(projectPath, intent, command) {
137
+ export function truncatedYamlValueLine(projectPath, intent, command) {
118
138
  const configPath = join(projectPath, CONFIG_FILENAME);
119
139
  if (!existsSync(configPath)) return null;
120
140
  const escaped = intent.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
121
141
  const line = new RegExp(`^[ \\t]+${escaped}[ \\t]*:[ \\t]+(.*)$`);
122
- for (const text of readFileSync(configPath, 'utf8').split(/\r?\n/)) {
123
- const m = line.exec(text);
142
+ const lines = readFileSync(configPath, 'utf8').split(/\r?\n/);
143
+ for (let n = 0; n < lines.length; n++) {
144
+ const m = line.exec(lines[n]);
124
145
  if (!m) continue;
125
146
  const value = m[1].trim();
126
147
  if (/^["'|>[{&*!]/.test(value)) continue; // quoted, block, flow or anchored: not a plain scalar
127
148
  const at = value.search(/\s#/);
128
149
  if (at < 0) continue;
129
150
  if (value.slice(0, at).trim() !== command) continue; // not the line YAML read this value from
130
- return value.slice(at).trim(); // [mutation-anchor:dropped-comment]
151
+ return endsInsideQuote(command) ? n + 1 : null; // [mutation-anchor:cut-inside-quote]
131
152
  }
132
153
  return null;
133
154
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "version": "6.14.0-beta.10",
3
+ "version": "6.14.0-beta.11",
4
4
  "lastUpdated": "2026-05-13",
5
5
  "description": "Standards registry for universal-dev-standards with integrated skills and AI-optimized formats",
6
6
  "formats": {
@@ -58,14 +58,14 @@
58
58
  "standards": {
59
59
  "name": "universal-dev-standards",
60
60
  "url": "https://github.com/AsiaOstrich/universal-dev-standards",
61
- "version": "6.14.0-beta.10"
61
+ "version": "6.14.0-beta.11"
62
62
  },
63
63
  "skills": {
64
64
  "name": "universal-dev-standards",
65
65
  "url": "https://github.com/AsiaOstrich/universal-dev-standards",
66
66
  "localPath": "skills",
67
67
  "rawUrl": "https://raw.githubusercontent.com/AsiaOstrich/universal-dev-standards/main/skills",
68
- "version": "6.14.0-beta.10",
68
+ "version": "6.14.0-beta.11",
69
69
  "note": "Skills are now included in the main repository under skills/"
70
70
  }
71
71
  },
@@ -2334,7 +2334,7 @@
2334
2334
  "id": "license-compliance",
2335
2335
  "name": "License Compliance Standards",
2336
2336
  "nameZh": "授權合規標準",
2337
- "version": "6.14.0-beta.10",
2337
+ "version": "6.14.0-beta.11",
2338
2338
  "source": {
2339
2339
  "human": "core/license-compliance.md",
2340
2340
  "ai": "ai/standards/license-compliance.ai.yaml"
@@ -2346,7 +2346,7 @@
2346
2346
  "id": "verification-oracle",
2347
2347
  "name": "Verification Oracle Standards",
2348
2348
  "nameZh": "驗證 Oracle 標準",
2349
- "version": "6.14.0-beta.10",
2349
+ "version": "6.14.0-beta.11",
2350
2350
  "source": {
2351
2351
  "human": "core/verification-oracle.md",
2352
2352
  "ai": "ai/standards/verification-oracle.ai.yaml"
@@ -2358,7 +2358,7 @@
2358
2358
  "id": "model-provenance",
2359
2359
  "name": "Model Provenance Policy Standards",
2360
2360
  "nameZh": "模型來源政策標準",
2361
- "version": "6.14.0-beta.10",
2361
+ "version": "6.14.0-beta.11",
2362
2362
  "source": {
2363
2363
  "human": "core/model-provenance.md",
2364
2364
  "ai": "ai/standards/model-provenance.ai.yaml"
@@ -2370,7 +2370,7 @@
2370
2370
  "id": "resource-cost-boundary",
2371
2371
  "name": "Resource / Cost Boundary Declaration Standards",
2372
2372
  "nameZh": "資源/成本邊界宣告標準",
2373
- "version": "6.14.0-beta.10",
2373
+ "version": "6.14.0-beta.11",
2374
2374
  "source": {
2375
2375
  "human": "core/resource-cost-boundary.md",
2376
2376
  "ai": "ai/standards/resource-cost-boundary.ai.yaml"