universal-dev-standards 6.14.0-beta.11 → 6.14.0-beta.13
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 +8 -1
- package/bundled/ai/standards/secret-management-standards.ai.yaml +12 -1
- package/bundled/core/secret-management-standards.md +13 -1
- package/bundled/hooks/validate-commit-msg.mjs +52 -9
- package/bundled/locales/zh-CN/CHANGELOG.md +3 -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 +1 -1
- package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +4 -3
- package/bundled/locales/zh-TW/CHANGELOG.md +3 -3
- package/bundled/locales/zh-TW/README.md +1 -1
- package/bundled/locales/zh-TW/SECURITY.md +1 -1
- package/bundled/locales/zh-TW/core/secret-management-standards.md +12 -4
- package/bundled/locales/zh-TW/docs/CHEATSHEET.md +1 -1
- package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +4 -3
- package/package.json +1 -1
- package/src/commands/audit.js +28 -1
- package/src/commands/check.js +72 -3
- package/src/commands/compile.js +37 -4
- package/src/commands/config.js +28 -19
- package/src/commands/init.js +59 -28
- package/src/commands/release-messages.js +228 -0
- package/src/commands/release.js +72 -72
- package/src/commands/spec.js +4 -2
- package/src/commands/update.js +114 -12
- package/src/compilers/claude-code-compiler.js +9 -1
- package/src/i18n/messages.js +96 -0
- package/src/installers/hooks-installer.js +1 -1
- package/src/mcp/server.js +9 -3
- package/src/prompts/init.js +17 -17
- package/src/reconciler/plan-executor.js +63 -5
- package/src/reconciler/recorded-versions.js +49 -0
- package/src/uninstallers/hook-uninstaller.js +9 -1
- package/src/uninstallers/skills-uninstaller.js +10 -3
- package/src/utils/available-standards-report.js +25 -4
- package/src/utils/available-standards.js +13 -3
- package/src/utils/build-manifest.js +1 -1
- package/src/utils/commit-message-judge.js +38 -9
- package/src/utils/friction-detector.js +23 -11
- package/src/utils/git-hooks.js +106 -4
- package/src/utils/integration-generator.js +75 -49
- package/src/utils/legacy-hook-migration.js +121 -2
- package/src/utils/sdd-header.js +11 -0
- package/src/utils/spinner.js +14 -4
- package/src/utils/standard-validator.js +3 -2
- package/standards-registry.json +10 -8
package/src/utils/sdd-header.js
CHANGED
|
@@ -16,6 +16,8 @@ const TABLE_FIELD = (name) => new RegExp(`^\\|\\s*\\**\\s*(?:${name})\\s*\\**\\s
|
|
|
16
16
|
/** ...in a field line: `- **Status**: Archived`, `> **Status**: Stable`, `Status: Draft`. */
|
|
17
17
|
const LINE_FIELD = (name) => new RegExp(`^[\\s>*-]*\\**\\s*(?:${name})\\s*\\**\\s*[:\uFF1A]\\s*\\**\\s*(.+?)\\s*$`, 'i');
|
|
18
18
|
const TABLE_SEPARATOR = /^\|[\s:|-]+\|?\s*$/;
|
|
19
|
+
/** Between two fields on one line: a full-width or half-width bar. */
|
|
20
|
+
const FIELD_SEPARATOR = /\s*[\uFF5C|]\s*/;
|
|
19
21
|
|
|
20
22
|
/** First word of a header value, lower-cased (`Approved (2026-01-01)` -> `approved`); text it cannot split stays as written. */
|
|
21
23
|
function headerWord(value) {
|
|
@@ -51,6 +53,15 @@ export function readSddHeader(content) {
|
|
|
51
53
|
const row = TABLE_FIELD(name).exec(lines[i]);
|
|
52
54
|
// A header row of a table (`| Status | Description |`) is followed by a separator row; a field row is not.
|
|
53
55
|
if (row && !TABLE_SEPARATOR.test(lines[i + 1] || '')) return headerWord(row[1]);
|
|
56
|
+
// XSPEC-475 R8: several fields on one line, separated by a full-width `|` or a half-width `|`
|
|
57
|
+
// (`**規格**: SPEC-002 | **狀態**: Draft(驗收中)`). Each piece is read as a field line of its own. A table row
|
|
58
|
+
// (a line that starts with `|`) was handled above and is never split.
|
|
59
|
+
if (!/^\s*\|/.test(lines[i])) {
|
|
60
|
+
for (const piece of lines[i].split(FIELD_SEPARATOR)) {
|
|
61
|
+
const inPiece = LINE_FIELD(name).exec(piece); // [mutation-anchor:same-line-fields]
|
|
62
|
+
if (inPiece) return headerWord(inPiece[1]);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
54
65
|
const field = LINE_FIELD(name).exec(lines[i]);
|
|
55
66
|
if (field) return headerWord(field[1]);
|
|
56
67
|
}
|
package/src/utils/spinner.js
CHANGED
|
@@ -22,10 +22,20 @@ import ora from 'ora';
|
|
|
22
22
|
* @returns {import('ora').Ora}
|
|
23
23
|
*/
|
|
24
24
|
export function createSpinner(options) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
const base = typeof options === 'string' ? { text: options } : options;
|
|
26
|
+
return ora({ stream: process.stdout, ...base, ...disabledWhenNoWidth(process.stdout) });
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* ora's clear step divides the length of the line by the stream's width to know how many lines to erase. A terminal that
|
|
31
|
+
* reports a width of 0 (a pty opened with no window size, which is what `expect` and some CI runners give a child) makes
|
|
32
|
+
* that Infinity, and the spinner sat in the erase loop at full CPU, so the command never finished (XSPEC-482 R14f).
|
|
33
|
+
* With no usable width there is nothing to animate: the spinner is switched off and prints its plain lines instead.
|
|
34
|
+
* @param {{isTTY?: boolean, columns?: number}} stream
|
|
35
|
+
* @returns {{isEnabled?: boolean}}
|
|
36
|
+
*/
|
|
37
|
+
export function disabledWhenNoWidth(stream) {
|
|
38
|
+
return stream && stream.isTTY && !(stream.columns > 0) ? { isEnabled: false } : {}; // wire:spinner-off-without-width
|
|
29
39
|
}
|
|
30
40
|
|
|
31
41
|
export default createSpinner;
|
|
@@ -4,7 +4,7 @@ import * as yaml from 'js-yaml';
|
|
|
4
4
|
import { exec } from 'child_process';
|
|
5
5
|
import util from 'util';
|
|
6
6
|
import { pathToFileURL } from 'node:url';
|
|
7
|
-
import { readManifest } from './copier.js';
|
|
7
|
+
import { readManifest, getRepoRoot } from './copier.js';
|
|
8
8
|
import { judgeCommitMessage } from './commit-message-judge.js';
|
|
9
9
|
|
|
10
10
|
const execAsync = util.promisify(exec);
|
|
@@ -461,9 +461,10 @@ export class StandardValidator {
|
|
|
461
461
|
const judgeName = simulator.judge
|
|
462
462
|
|| (standardConfig?.standard?.id === 'commit-message' && /commitlint/.test(simulator.command || '') ? 'commit-message' : null);
|
|
463
463
|
if (judgeName === 'commit-message') {
|
|
464
|
-
const outcome = judgeCommitMessage(standardConfig, input, { standardsDir: this.standardsDir });
|
|
464
|
+
const outcome = judgeCommitMessage(standardConfig, input, { standardsDir: this.standardsDir, shippedRoot: getRepoRoot() }); // wire:simulate-shipped-root
|
|
465
465
|
const details = [
|
|
466
466
|
...outcome.findings.map(f => `- ${f}`),
|
|
467
|
+
...outcome.notes.map(n => `Note: ${n}`),
|
|
467
468
|
`Checked: ${outcome.checked.join('; ')}`,
|
|
468
469
|
`Not checked: ${outcome.notChecked.join('; ')}`
|
|
469
470
|
].join('\n');
|
package/standards-registry.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"version": "6.14.0-beta.
|
|
3
|
+
"version": "6.14.0-beta.13",
|
|
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.
|
|
61
|
+
"version": "6.14.0-beta.13"
|
|
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.
|
|
68
|
+
"version": "6.14.0-beta.13",
|
|
69
69
|
"note": "Skills are now included in the main repository under skills/"
|
|
70
70
|
}
|
|
71
71
|
},
|
|
@@ -774,6 +774,7 @@
|
|
|
774
774
|
"ai": "ai/standards/turn-completion-integrity.ai.yaml"
|
|
775
775
|
},
|
|
776
776
|
"category": "core",
|
|
777
|
+
"recommended": true,
|
|
777
778
|
"description": "An agent must not end a turn having stated a next action it did not take; enforced at turn end by a Stop hook, with a per-language corpus that runs in CI"
|
|
778
779
|
},
|
|
779
780
|
{
|
|
@@ -2295,6 +2296,7 @@
|
|
|
2295
2296
|
"ai": "ai/standards/pipeline-security-gates.ai.yaml"
|
|
2296
2297
|
},
|
|
2297
2298
|
"category": "core",
|
|
2299
|
+
"recommended": true,
|
|
2298
2300
|
"description": "Security checkpoints embedded in CI pipeline — SAST, DAST, SCA, secrets scan (including the scanner's own output and failure behaviour) with block/warn/log behavior"
|
|
2299
2301
|
},
|
|
2300
2302
|
{
|
|
@@ -2334,7 +2336,7 @@
|
|
|
2334
2336
|
"id": "license-compliance",
|
|
2335
2337
|
"name": "License Compliance Standards",
|
|
2336
2338
|
"nameZh": "授權合規標準",
|
|
2337
|
-
"version": "6.14.0-beta.
|
|
2339
|
+
"version": "6.14.0-beta.13",
|
|
2338
2340
|
"source": {
|
|
2339
2341
|
"human": "core/license-compliance.md",
|
|
2340
2342
|
"ai": "ai/standards/license-compliance.ai.yaml"
|
|
@@ -2346,7 +2348,7 @@
|
|
|
2346
2348
|
"id": "verification-oracle",
|
|
2347
2349
|
"name": "Verification Oracle Standards",
|
|
2348
2350
|
"nameZh": "驗證 Oracle 標準",
|
|
2349
|
-
"version": "6.14.0-beta.
|
|
2351
|
+
"version": "6.14.0-beta.13",
|
|
2350
2352
|
"source": {
|
|
2351
2353
|
"human": "core/verification-oracle.md",
|
|
2352
2354
|
"ai": "ai/standards/verification-oracle.ai.yaml"
|
|
@@ -2358,7 +2360,7 @@
|
|
|
2358
2360
|
"id": "model-provenance",
|
|
2359
2361
|
"name": "Model Provenance Policy Standards",
|
|
2360
2362
|
"nameZh": "模型來源政策標準",
|
|
2361
|
-
"version": "6.14.0-beta.
|
|
2363
|
+
"version": "6.14.0-beta.13",
|
|
2362
2364
|
"source": {
|
|
2363
2365
|
"human": "core/model-provenance.md",
|
|
2364
2366
|
"ai": "ai/standards/model-provenance.ai.yaml"
|
|
@@ -2370,7 +2372,7 @@
|
|
|
2370
2372
|
"id": "resource-cost-boundary",
|
|
2371
2373
|
"name": "Resource / Cost Boundary Declaration Standards",
|
|
2372
2374
|
"nameZh": "資源/成本邊界宣告標準",
|
|
2373
|
-
"version": "6.14.0-beta.
|
|
2375
|
+
"version": "6.14.0-beta.13",
|
|
2374
2376
|
"source": {
|
|
2375
2377
|
"human": "core/resource-cost-boundary.md",
|
|
2376
2378
|
"ai": "ai/standards/resource-cost-boundary.ai.yaml"
|
|
@@ -2464,7 +2466,7 @@
|
|
|
2464
2466
|
"ai": "ai/standards/secret-management-standards.ai.yaml"
|
|
2465
2467
|
},
|
|
2466
2468
|
"category": "core",
|
|
2467
|
-
"description": "Three secret source tiers (Vault, Cloud KMS, SOPS), rotation policies by credential type, hardcoded secret prevention, and safe injection patterns"
|
|
2469
|
+
"description": "Three secret source tiers (Vault, Cloud KMS, SOPS), rotation policies by credential type, hardcoded secret prevention (scanner rules PSG-1 to PSG-3 of pipeline-security-gates), and safe injection patterns"
|
|
2468
2470
|
},
|
|
2469
2471
|
{
|
|
2470
2472
|
"id": "prd-standards",
|