universal-dev-standards 6.14.0-beta.6 → 6.14.0-beta.8

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.
Files changed (99) hide show
  1. package/README.md +13 -3
  2. package/bin/uds.js +30 -6
  3. package/bundled/ai/options/code-review/pr-review.ai.yaml +20 -1
  4. package/bundled/ai/standards/code-review.ai.yaml +15 -2
  5. package/bundled/ai/standards/developer-memory.ai.yaml +12 -2
  6. package/bundled/ai/standards/full-coverage-testing.ai.yaml +44 -6
  7. package/bundled/ai/standards/open-work-tracking.ai.yaml +191 -11
  8. package/bundled/ai/standards/pipeline-security-gates.ai.yaml +48 -3
  9. package/bundled/ai/standards/project-context-memory.ai.yaml +12 -2
  10. package/bundled/core/code-review-checklist.md +20 -2
  11. package/bundled/core/developer-memory.md +12 -2
  12. package/bundled/core/full-coverage-testing.md +44 -4
  13. package/bundled/core/open-work-tracking.md +156 -16
  14. package/bundled/core/pipeline-security-gates.md +63 -0
  15. package/bundled/core/project-context-memory.md +10 -2
  16. package/bundled/locales/zh-CN/CHANGELOG.md +78 -3
  17. package/bundled/locales/zh-CN/README.md +1 -1
  18. package/bundled/locales/zh-CN/SECURITY.md +1 -1
  19. package/bundled/locales/zh-CN/adoption/ADOPTION-GUIDE.md +13 -4
  20. package/bundled/locales/zh-CN/adoption/STATIC-DYNAMIC-GUIDE.md +7 -1
  21. package/bundled/locales/zh-CN/adoption/checklists/enterprise.md +7 -1
  22. package/bundled/locales/zh-CN/adoption/checklists/minimal.md +13 -3
  23. package/bundled/locales/zh-CN/adoption/checklists/recommended.md +7 -1
  24. package/bundled/locales/zh-CN/core/code-review-checklist.md +17 -0
  25. package/bundled/locales/zh-CN/core/developer-memory.md +9 -0
  26. package/bundled/locales/zh-CN/core/full-coverage-testing.md +48 -8
  27. package/bundled/locales/zh-CN/core/pipeline-security-gates.md +64 -4
  28. package/bundled/locales/zh-CN/core/project-context-memory.md +5 -0
  29. package/bundled/locales/zh-CN/docs/AVAILABLE-STANDARDS.md +70 -0
  30. package/bundled/locales/zh-CN/docs/CHEATSHEET.md +4 -3
  31. package/bundled/locales/zh-CN/docs/CLI-INIT-OPTIONS.md +25 -23
  32. package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +13 -11
  33. package/bundled/locales/zh-CN/docs/USAGE-MODES-COMPARISON.md +6 -6
  34. package/bundled/locales/zh-CN/docs/WINDOWS-GUIDE.md +7 -1
  35. package/bundled/locales/zh-CN/docs/user/GETTING-STARTED.md +44 -0
  36. package/bundled/locales/zh-CN/options/code-review/pr-review.md +13 -2
  37. package/bundled/locales/zh-TW/CHANGELOG.md +78 -3
  38. package/bundled/locales/zh-TW/README.md +1 -1
  39. package/bundled/locales/zh-TW/SECURITY.md +1 -1
  40. package/bundled/locales/zh-TW/adoption/ADOPTION-GUIDE.md +13 -4
  41. package/bundled/locales/zh-TW/adoption/STATIC-DYNAMIC-GUIDE.md +7 -1
  42. package/bundled/locales/zh-TW/adoption/checklists/enterprise.md +7 -1
  43. package/bundled/locales/zh-TW/adoption/checklists/minimal.md +13 -3
  44. package/bundled/locales/zh-TW/adoption/checklists/recommended.md +7 -1
  45. package/bundled/locales/zh-TW/core/code-review-checklist.md +17 -0
  46. package/bundled/locales/zh-TW/core/developer-memory.md +9 -0
  47. package/bundled/locales/zh-TW/core/full-coverage-testing.md +48 -8
  48. package/bundled/locales/zh-TW/core/open-work-tracking.md +90 -14
  49. package/bundled/locales/zh-TW/core/pipeline-security-gates.md +64 -4
  50. package/bundled/locales/zh-TW/core/project-context-memory.md +5 -0
  51. package/bundled/locales/zh-TW/docs/AVAILABLE-STANDARDS.md +70 -0
  52. package/bundled/locales/zh-TW/docs/CHEATSHEET.md +4 -3
  53. package/bundled/locales/zh-TW/docs/CLI-INIT-OPTIONS.md +25 -23
  54. package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +13 -11
  55. package/bundled/locales/zh-TW/docs/USAGE-MODES-COMPARISON.md +6 -6
  56. package/bundled/locales/zh-TW/docs/WINDOWS-GUIDE.md +7 -1
  57. package/bundled/locales/zh-TW/docs/user/GETTING-STARTED.md +44 -0
  58. package/bundled/locales/zh-TW/options/code-review/pr-review.md +13 -2
  59. package/bundled/skills/SKILL_NAMING.md +9 -0
  60. package/bundled/templates/gates/check-anti-fake-tests.mjs +305 -5
  61. package/package.json +3 -1
  62. package/src/commands/audit.js +9 -2
  63. package/src/commands/check.js +17 -0
  64. package/src/commands/hitl.js +3 -0
  65. package/src/commands/init.js +41 -21
  66. package/src/commands/list.js +12 -3
  67. package/src/commands/mcp.js +2 -3
  68. package/src/commands/open-work.js +65 -6
  69. package/src/commands/quickstart.js +29 -13
  70. package/src/commands/release.js +41 -17
  71. package/src/commands/skills.js +19 -33
  72. package/src/commands/spec-split.js +28 -16
  73. package/src/commands/spec.js +34 -13
  74. package/src/commands/uninstall.js +2 -2
  75. package/src/commands/update.js +61 -61
  76. package/src/core/open-work-config.js +103 -0
  77. package/src/flows/init-flow.js +10 -0
  78. package/src/hitl/manager.js +4 -2
  79. package/src/i18n/messages.js +240 -63
  80. package/src/installers/skills-installer.js +3 -1
  81. package/src/mcp/__tests__/server.test.js +0 -1
  82. package/src/mcp/server.js +16 -4
  83. package/src/prompts/init.js +148 -13
  84. package/src/reconciler/index.js +42 -5
  85. package/src/uninstallers/skills-uninstaller.js +83 -16
  86. package/src/uninstallers/standards-uninstaller.js +56 -7
  87. package/src/utils/agents-installer.js +10 -17
  88. package/src/utils/available-standards-report.js +144 -0
  89. package/src/utils/available-standards.js +216 -0
  90. package/src/utils/copier.js +5 -4
  91. package/src/utils/friction-detector.js +27 -0
  92. package/src/utils/open-work-tracking.mjs +919 -48
  93. package/src/utils/prompt-closed.js +18 -0
  94. package/src/utils/skill-frontmatter.js +102 -0
  95. package/src/utils/skill-name-collision.js +169 -0
  96. package/src/utils/skills-install-paths.js +114 -0
  97. package/src/utils/skills-installer.js +63 -105
  98. package/src/utils/transient-fs.js +113 -0
  99. package/standards-registry.json +34 -9
@@ -0,0 +1,113 @@
1
+ /**
2
+ * Retry for transient file-system errors (Windows file locks).
3
+ *
4
+ * Why this exists: on Windows, a file that was written a moment ago can stay locked for a short time
5
+ * while antivirus real-time scanning, the search indexer or a cloud-sync client looks at it. A copy or
6
+ * write onto / from that file then fails with EBUSY (or EPERM / EACCES) even though nothing is wrong,
7
+ * and retrying a moment later succeeds. Before this module, ONE such error made `uds init` roll the
8
+ * whole install back (observed on a Windows CI runner: `EBUSY ... copyfile`).
9
+ *
10
+ * Which errors are retried, and why (this follows what the ecosystem already does):
11
+ * - EBUSY: every platform. rimraf 3 retries EBUSY/ENOTEMPTY/EPERM; Node's own fs.rm `maxRetries`
12
+ * retries EBUSY/EMFILE/ENFILE/ENOTEMPTY/EPERM. Retrying a busy resource for a moment is harmless.
13
+ * - EPERM and EACCES: Windows ONLY. graceful-fs retries rename on EACCES/EPERM/EBUSY, win32 only,
14
+ * because "A/V software can lock the directory, causing this to fail with an EACCES or EPERM".
15
+ * On POSIX the same two codes are real permission errors that a retry cannot fix, so they fail at once.
16
+ *
17
+ * The retry is bounded: at most `maxAttempts` tries, a linear back-off that stops growing at
18
+ * `maxDelayMs`, and a hard ceiling `maxTotalMs` on the time spent. When it is used up, the error says in
19
+ * plain words which file was locked, the likely causes and what to do - not just the bare error code.
20
+ *
21
+ * @module utils/transient-fs
22
+ */
23
+
24
+ import { copyFileSync } from 'fs';
25
+
26
+ /** The retry budget. Worst case about 2.3 s of waiting per file (50+100+...+450 ms). */
27
+ export const RETRY_POLICY = Object.freeze({
28
+ maxAttempts: 10,
29
+ stepMs: 50,
30
+ maxDelayMs: 500,
31
+ maxTotalMs: 5000
32
+ });
33
+
34
+ const ALWAYS_TRANSIENT = new Set(['EBUSY']);
35
+ const WINDOWS_TRANSIENT = new Set(['EPERM', 'EACCES']);
36
+
37
+ /**
38
+ * Is this error one that is worth retrying on this platform?
39
+ * @param {unknown} err
40
+ * @param {string} [platform] - Defaults to the running platform (a parameter so it can be tested anywhere).
41
+ * @returns {boolean}
42
+ */
43
+ export function isTransientFsError(err, platform = process.platform) {
44
+ const code = err && typeof err === 'object' ? err.code : undefined;
45
+ if (typeof code !== 'string') return false;
46
+ if (ALWAYS_TRANSIENT.has(code)) return true;
47
+ return platform === 'win32' && WINDOWS_TRANSIENT.has(code);
48
+ }
49
+
50
+ /** Block the thread for `ms` milliseconds without spinning the CPU. */
51
+ export function sleepSync(ms) {
52
+ if (ms <= 0) return;
53
+ Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
54
+ }
55
+
56
+ /**
57
+ * The error shown when the retry budget is used up: which file, the likely cause, what to do.
58
+ * Keeps the original code and message, so nothing is lost for someone searching the raw text.
59
+ */
60
+ function lockedFileError(err, { path, action }, attempts, elapsedMs) {
61
+ const seconds = (elapsedMs / 1000).toFixed(1);
62
+ const message =
63
+ `Could not ${action} "${path}": the file is locked by another program (${err.code}). ` +
64
+ `UDS tried ${attempts} times over ${seconds} s and the lock did not clear. ` +
65
+ 'Likely causes: antivirus real-time scanning, the Windows search indexer, a cloud-sync client ' +
66
+ '(OneDrive, Dropbox) or an editor that has the file open. ' +
67
+ 'Close whatever is using the file or add the project folder to the antivirus exclusions, then run the command again. ' +
68
+ `(Original error: ${err.message})`;
69
+ const wrapped = new Error(message);
70
+ wrapped.code = err.code;
71
+ wrapped.path = path;
72
+ wrapped.cause = err;
73
+ wrapped.transientRetryExhausted = true;
74
+ return wrapped;
75
+ }
76
+
77
+ /**
78
+ * Run `operation` and retry it while it fails with a transient file-system error.
79
+ *
80
+ * @template T
81
+ * @param {() => T} operation - A synchronous file operation.
82
+ * @param {Object} info
83
+ * @param {string} info.path - The file that is being worked on (named in the final error).
84
+ * @param {string} info.action - Short verb phrase for the final error, e.g. "copy to".
85
+ * @param {Object} [hooks] - Injection points for tests.
86
+ * @param {string} [hooks.platform]
87
+ * @param {(ms:number)=>void} [hooks.sleep]
88
+ * @param {()=>number} [hooks.now]
89
+ * @param {typeof RETRY_POLICY} [hooks.policy]
90
+ * @returns {T}
91
+ */
92
+ export function retryTransientFs(operation, info, hooks = {}) {
93
+ const { platform = process.platform, sleep = sleepSync, now = Date.now, policy = RETRY_POLICY } = hooks;
94
+ const start = now();
95
+ for (let attempt = 1; ; attempt++) {
96
+ try {
97
+ return operation();
98
+ } catch (err) {
99
+ if (!isTransientFsError(err, platform)) throw err;
100
+ const elapsed = now() - start;
101
+ const delay = Math.min(policy.stepMs * attempt, policy.maxDelayMs);
102
+ if (attempt >= policy.maxAttempts || elapsed + delay > policy.maxTotalMs) {
103
+ throw lockedFileError(err, info, attempt, elapsed);
104
+ }
105
+ sleep(delay);
106
+ }
107
+ }
108
+ }
109
+
110
+ /** `fs.copyFileSync` that survives a short-lived file lock. Errors name the destination. */
111
+ export function copyFileSyncRetrying(source, target, hooks) {
112
+ return retryTransientFs(() => copyFileSync(source, target), { path: String(target), action: `copy "${source}" to` }, hooks);
113
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "version": "6.14.0-beta.6",
3
+ "version": "6.14.0-beta.8",
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.6"
61
+ "version": "6.14.0-beta.8"
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.6",
68
+ "version": "6.14.0-beta.8",
69
69
  "note": "Skills are now included in the main repository under skills/"
70
70
  }
71
71
  },
@@ -691,6 +691,31 @@
691
691
  "name": "Template",
692
692
  "description": "Document templates for specific purposes. Use as starting point for project documents.",
693
693
  "adoptionMethod": "Copy and customize"
694
+ },
695
+ "core": {
696
+ "name": "Core Standard",
697
+ "description": "Core development standards that apply across projects: governance, agent behavior, observability, workflow discipline. Not installed by uds init.",
698
+ "adoptionMethod": "Install by id with uds update --apply --add-standard"
699
+ },
700
+ "testing": {
701
+ "name": "Testing Standard",
702
+ "description": "Standards for specific kinds of tests and test hygiene: contract, property-based, smoke, replay, flaky-test management and others. Not installed by uds init.",
703
+ "adoptionMethod": "Install by id with uds update --apply --add-standard"
704
+ },
705
+ "security": {
706
+ "name": "Security Standard",
707
+ "description": "Security standards for operations, containers, static analysis and supply-chain attestation. Not installed by uds init.",
708
+ "adoptionMethod": "Install by id with uds update --apply --add-standard"
709
+ },
710
+ "deployment": {
711
+ "name": "Deployment Standard",
712
+ "description": "Standards for what must be known and checked before a release goes out: quality manifest and release readiness gate. Not installed by uds init.",
713
+ "adoptionMethod": "Install by id with uds update --apply --add-standard"
714
+ },
715
+ "operations": {
716
+ "name": "Operations Standard",
717
+ "description": "Standards for running a system after it is released, such as disaster recovery drills. Not installed by uds init.",
718
+ "adoptionMethod": "Install by id with uds update --apply --add-standard"
694
719
  }
695
720
  },
696
721
  "standards": [
@@ -1813,7 +1838,7 @@
1813
1838
  },
1814
1839
  "category": "reference",
1815
1840
  "skillName": null,
1816
- "description": "Downstream of deferred-item-exit: once an item has an exit, its carrier must stay trustworthy. Capture costs no more than two fields; a waiting item records its release condition; derivable fields are generated, not hand-written; a coverage figure states what it could not see; a checkpoint at turn end reports open work but never blocks; goal and progress live in different carriers, an edit to the goal leaves a record, and a next action names a file, test, command or requirement"
1841
+ "description": "Downstream of deferred-item-exit: once an item has an exit, its carrier must stay trustworthy. Capture costs no more than two fields; a waiting item records its release condition; derivable fields are generated, not hand-written; a coverage figure states what it could not see; a checkpoint at turn end reports open work but never blocks; goal and progress live in different carriers, an edit to the goal leaves a record, a next action names a file, test, command or requirement, a waiting item says whether it was asked yet, a fact nobody can derive may be hand-written only with a stamp, an honest unknown and a visible age, a wait may name an object in another project by its logical name, with a project this machine cannot see counted apart, and an item that was asked and is awaiting a reply is judged by when it was asked and what it waits for, not by what its next step names"
1817
1842
  },
1818
1843
  {
1819
1844
  "id": "verification-evidence",
@@ -2270,7 +2295,7 @@
2270
2295
  "ai": "ai/standards/pipeline-security-gates.ai.yaml"
2271
2296
  },
2272
2297
  "category": "core",
2273
- "description": "Security checkpoints embedded in CI pipeline — SAST, DAST, SCA, secrets scan with block/warn/log behavior"
2298
+ "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"
2274
2299
  },
2275
2300
  {
2276
2301
  "id": "slo-sli",
@@ -2309,7 +2334,7 @@
2309
2334
  "id": "license-compliance",
2310
2335
  "name": "License Compliance Standards",
2311
2336
  "nameZh": "授權合規標準",
2312
- "version": "6.14.0-beta.6",
2337
+ "version": "6.14.0-beta.8",
2313
2338
  "source": {
2314
2339
  "human": "core/license-compliance.md",
2315
2340
  "ai": "ai/standards/license-compliance.ai.yaml"
@@ -2321,7 +2346,7 @@
2321
2346
  "id": "verification-oracle",
2322
2347
  "name": "Verification Oracle Standards",
2323
2348
  "nameZh": "驗證 Oracle 標準",
2324
- "version": "6.14.0-beta.6",
2349
+ "version": "6.14.0-beta.8",
2325
2350
  "source": {
2326
2351
  "human": "core/verification-oracle.md",
2327
2352
  "ai": "ai/standards/verification-oracle.ai.yaml"
@@ -2333,7 +2358,7 @@
2333
2358
  "id": "model-provenance",
2334
2359
  "name": "Model Provenance Policy Standards",
2335
2360
  "nameZh": "模型來源政策標準",
2336
- "version": "6.14.0-beta.6",
2361
+ "version": "6.14.0-beta.8",
2337
2362
  "source": {
2338
2363
  "human": "core/model-provenance.md",
2339
2364
  "ai": "ai/standards/model-provenance.ai.yaml"
@@ -2345,7 +2370,7 @@
2345
2370
  "id": "resource-cost-boundary",
2346
2371
  "name": "Resource / Cost Boundary Declaration Standards",
2347
2372
  "nameZh": "資源/成本邊界宣告標準",
2348
- "version": "6.14.0-beta.6",
2373
+ "version": "6.14.0-beta.8",
2349
2374
  "source": {
2350
2375
  "human": "core/resource-cost-boundary.md",
2351
2376
  "ai": "ai/standards/resource-cost-boundary.ai.yaml"