universal-dev-standards 6.0.0 → 6.1.0
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/bundled/ai/options/commit-message/bilingual.ai.yaml +19 -1
- package/bundled/ai/standards/checkin-standards.ai.yaml +3 -3
- package/bundled/ai/standards/documentation-writing-standards.ai.yaml +1 -1
- package/bundled/ai/standards/frontend-design-standards.ai.yaml +33 -3
- package/bundled/ai/standards/push-standards.ai.yaml +14 -3
- package/bundled/ai/standards/requirement-engineering.ai.yaml +42 -3
- package/bundled/ai/standards/self-review-protocol.ai.yaml +15 -10
- package/bundled/ai/standards/verification-evidence.ai.yaml +88 -5
- package/bundled/core/checkin-standards.md +3 -3
- package/bundled/core/documentation-writing-standards.md +1 -1
- package/bundled/core/feature-discovery-standards.md +191 -0
- package/bundled/core/frontend-design-standards.md +93 -4
- package/bundled/core/multi-environment-e2e-testing.md +195 -0
- package/bundled/core/push-standards.md +82 -0
- package/bundled/core/requirement-engineering.md +2 -2
- package/bundled/core/self-review-protocol.md +13 -8
- package/bundled/core/verification-evidence.md +170 -10
- package/bundled/locales/COVERAGE.md +27 -21
- package/bundled/locales/zh-CN/CHANGELOG.md +26 -3
- package/bundled/locales/zh-CN/CLAUDE.md +1 -1
- package/bundled/locales/zh-CN/MAINTENANCE.md +42 -661
- package/bundled/locales/zh-CN/README.md +10 -10
- package/bundled/locales/zh-CN/SECURITY.md +2 -2
- package/bundled/locales/zh-CN/ai/options/commit-message/bilingual.ai.yaml +6 -1
- package/bundled/locales/zh-CN/core/browser-compatibility-standards.md +17 -7
- package/bundled/locales/zh-CN/core/cost-budget-test.md +1 -1
- package/bundled/locales/zh-CN/core/cross-flow-regression.md +8 -7
- package/bundled/locales/zh-CN/core/flaky-test-management.md +1 -1
- package/bundled/locales/zh-CN/core/flow-based-testing.md +8 -8
- package/bundled/locales/zh-CN/core/frontend-design-standards.md +1 -1
- package/bundled/locales/zh-CN/core/full-coverage-testing.md +74 -2
- package/bundled/locales/zh-CN/core/license-compliance.md +3 -1
- package/bundled/locales/zh-CN/core/logging-standards.md +83 -7
- package/bundled/locales/zh-CN/core/mock-boundary.md +58 -6
- package/bundled/locales/zh-CN/core/packaging-standards.md +2 -1
- package/bundled/locales/zh-CN/core/pipeline-security-gates.md +24 -4
- package/bundled/locales/zh-CN/core/prompt-regression.md +1 -1
- package/bundled/locales/zh-CN/core/replay-test.md +1 -1
- package/bundled/locales/zh-CN/core/requirement-engineering.md +1 -1
- package/bundled/locales/zh-CN/core/security-testing.md +24 -7
- package/bundled/locales/zh-CN/core/self-review-protocol.md +17 -12
- package/bundled/locales/zh-CN/core/smoke-test.md +1 -1
- package/bundled/locales/zh-CN/core/verification-evidence.md +252 -41
- package/bundled/locales/zh-CN/docs/CHEATSHEET.md +6 -2
- package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +16 -25
- package/bundled/locales/zh-CN/docs/user/GLOSSARY.md +1 -1
- package/bundled/locales/zh-CN/options/commit-message/bilingual.md +10 -3
- package/bundled/locales/zh-CN/skills/brainstorm-assistant/SKILL.md +21 -19
- package/bundled/locales/zh-CN/skills/brainstorm-assistant/guide.md +14 -11
- package/bundled/locales/zh-CN/skills/dev-methodology/guide.md +1 -1
- package/bundled/locales/zh-CN/skills/logging-guide/SKILL.md +29 -6
- package/bundled/locales/zh-CN/skills/spec-derivation/guide.md +1 -1
- package/bundled/locales/zh-TW/CHANGELOG.md +26 -3
- package/bundled/locales/zh-TW/CLAUDE.md +1 -1
- package/bundled/locales/zh-TW/MAINTENANCE.md +32 -8
- package/bundled/locales/zh-TW/README.md +10 -10
- package/bundled/locales/zh-TW/SECURITY.md +2 -2
- package/bundled/locales/zh-TW/ai/options/commit-message/bilingual.ai.yaml +6 -1
- package/bundled/locales/zh-TW/core/cost-budget-test.md +1 -1
- package/bundled/locales/zh-TW/core/flaky-test-management.md +1 -1
- package/bundled/locales/zh-TW/core/flow-based-testing.md +8 -8
- package/bundled/locales/zh-TW/core/frontend-design-standards.md +1 -1
- package/bundled/locales/zh-TW/core/license-compliance.md +3 -1
- package/bundled/locales/zh-TW/core/logging-standards.md +2 -2
- package/bundled/locales/zh-TW/core/mock-boundary.md +1 -1
- package/bundled/locales/zh-TW/core/packaging-standards.md +2 -1
- package/bundled/locales/zh-TW/core/pipeline-security-gates.md +24 -4
- package/bundled/locales/zh-TW/core/prompt-regression.md +1 -1
- package/bundled/locales/zh-TW/core/replay-test.md +1 -1
- package/bundled/locales/zh-TW/core/requirement-engineering.md +1 -1
- package/bundled/locales/zh-TW/core/security-testing.md +24 -7
- package/bundled/locales/zh-TW/core/self-review-protocol.md +16 -11
- package/bundled/locales/zh-TW/core/smoke-test.md +1 -1
- package/bundled/locales/zh-TW/core/verification-evidence.md +260 -31
- package/bundled/locales/zh-TW/docs/CHEATSHEET.md +6 -2
- package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +16 -25
- package/bundled/locales/zh-TW/docs/user/GLOSSARY.md +1 -1
- package/bundled/locales/zh-TW/options/commit-message/bilingual.md +10 -3
- package/bundled/locales/zh-TW/skills/brainstorm-assistant/SKILL.md +21 -19
- package/bundled/locales/zh-TW/skills/brainstorm-assistant/guide.md +14 -11
- package/bundled/locales/zh-TW/skills/dev-methodology/guide.md +1 -1
- package/bundled/locales/zh-TW/skills/logging-guide/SKILL.md +29 -6
- package/bundled/locales/zh-TW/skills/spec-derivation/guide.md +1 -1
- package/bundled/skills/brainstorm-assistant/SKILL.md +22 -20
- package/bundled/skills/brainstorm-assistant/guide.md +10 -7
- package/bundled/skills/spec-driven-dev/SKILL.md +11 -0
- package/package.json +3 -3
- package/src/commands/init.js +58 -17
- package/standards-registry.json +10 -10
package/src/commands/init.js
CHANGED
|
@@ -240,7 +240,7 @@ export async function initCommand(options) {
|
|
|
240
240
|
* - Node.js projects: use husky
|
|
241
241
|
* - Non-Node.js projects: write native .git/hooks/pre-commit
|
|
242
242
|
*/
|
|
243
|
-
async function setupHuskyHook(projectPath) {
|
|
243
|
+
export async function setupHuskyHook(projectPath) {
|
|
244
244
|
const hasGit = existsSync(join(projectPath, '.git'));
|
|
245
245
|
if (!hasGit) return;
|
|
246
246
|
|
|
@@ -249,6 +249,11 @@ async function setupHuskyHook(projectPath) {
|
|
|
249
249
|
if (isNodeProject) {
|
|
250
250
|
console.log(chalk.cyan('Configuring Pre-commit Hook (Husky)...'));
|
|
251
251
|
|
|
252
|
+
// Every edit we make to the adopter's package.json, reported at the end.
|
|
253
|
+
// `uds init` writes ~70 files; a one-line change to package.json is invisible
|
|
254
|
+
// in that diff unless we say it out loud (XSPEC-341 R1).
|
|
255
|
+
const pkgChanges = [];
|
|
256
|
+
|
|
252
257
|
// 1. Install husky if needed
|
|
253
258
|
try {
|
|
254
259
|
const pkgPath = join(projectPath, 'package.json');
|
|
@@ -257,25 +262,54 @@ async function setupHuskyHook(projectPath) {
|
|
|
257
262
|
|
|
258
263
|
if (!hasHusky) {
|
|
259
264
|
console.log(chalk.gray(' Installing husky...'));
|
|
260
|
-
|
|
265
|
+
// stdio: 'pipe' rather than 'ignore' — the error text belongs in the
|
|
266
|
+
// message below, not in /dev/null.
|
|
267
|
+
execSync('npm install --save-dev husky', { stdio: 'pipe', cwd: projectPath });
|
|
268
|
+
pkgChanges.push('devDependencies.husky — added');
|
|
261
269
|
}
|
|
262
270
|
} catch (e) {
|
|
263
271
|
console.log(chalk.yellow(` ⚠ Failed to check/install husky: ${e.message}`));
|
|
264
272
|
return;
|
|
265
273
|
}
|
|
266
274
|
|
|
267
|
-
// 2.
|
|
275
|
+
// 2. Wire husky's `prepare` script ourselves.
|
|
276
|
+
//
|
|
277
|
+
// We deliberately do NOT run `npx husky init` (XSPEC-341 R1). That command is a
|
|
278
|
+
// one-time bootstrap for a NEW project, not an idempotent operation: it sets
|
|
279
|
+
// `"prepare": "husky"` unconditionally, destroying whatever was there. For a
|
|
280
|
+
// published package whose `prepare` is its build step — `"prepare": "tsup"` with
|
|
281
|
+
// no prepack/prepublishOnly and `files: ["dist"]` — that silently breaks the next
|
|
282
|
+
// `npm publish`, and the failure surfaces at release time, far from this command.
|
|
283
|
+
// (It also seeds .husky/pre-commit with `npm test`, a gate the adopter never asked
|
|
284
|
+
// for.) Adopting a standards library must never rewrite the adopter's build.
|
|
268
285
|
const huskyDir = join(projectPath, '.husky');
|
|
269
286
|
try {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
287
|
+
const pkgPath = join(projectPath, 'package.json');
|
|
288
|
+
const raw = readFileSync(pkgPath, 'utf-8');
|
|
289
|
+
const pkg = JSON.parse(raw);
|
|
290
|
+
pkg.scripts = pkg.scripts || {};
|
|
291
|
+
const existing = pkg.scripts.prepare;
|
|
292
|
+
|
|
293
|
+
if (!existing) {
|
|
294
|
+
pkg.scripts.prepare = 'husky';
|
|
295
|
+
pkgChanges.push('scripts.prepare — added: "husky"');
|
|
296
|
+
} else if (!/\bhusky\b/.test(existing)) {
|
|
297
|
+
// Chain, never clobber. The adopter's command runs first and keeps its
|
|
298
|
+
// exit code meaningful.
|
|
299
|
+
pkg.scripts.prepare = `${existing} && husky`;
|
|
300
|
+
pkgChanges.push(`scripts.prepare — "${existing}" → "${pkg.scripts.prepare}"`);
|
|
273
301
|
}
|
|
274
|
-
|
|
275
|
-
|
|
302
|
+
|
|
303
|
+
if (pkg.scripts.prepare !== existing) {
|
|
304
|
+
// Preserve the file's trailing newline convention.
|
|
305
|
+
const indent = raw.match(/^\{\n(\s+)"/)?.[1]?.length ?? 2;
|
|
306
|
+
writeFileSync(pkgPath, JSON.stringify(pkg, null, indent) + (raw.endsWith('\n') ? '\n' : ''), 'utf-8');
|
|
307
|
+
}
|
|
308
|
+
} catch (e) {
|
|
309
|
+
console.log(chalk.yellow(` ⚠ Failed to configure the prepare script: ${e.message}`));
|
|
276
310
|
}
|
|
277
311
|
|
|
278
|
-
// 3. Ensure .husky directory exists
|
|
312
|
+
// 3. Ensure .husky directory exists
|
|
279
313
|
if (!existsSync(huskyDir)) {
|
|
280
314
|
try {
|
|
281
315
|
mkdirSync(huskyDir, { recursive: true });
|
|
@@ -290,16 +324,15 @@ async function setupHuskyHook(projectPath) {
|
|
|
290
324
|
const udsCmd = 'npx uds check';
|
|
291
325
|
|
|
292
326
|
try {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
content = '#!/usr/bin/env sh\n. "$(dirname -- "$0")/_/husky.sh"\n';
|
|
299
|
-
}
|
|
327
|
+
// husky v9 hooks are plain shell scripts: no shebang, no `_/husky.sh` sourcing
|
|
328
|
+
// (that is v8 syntax, deprecated in v9 and removed in v10). We install husky
|
|
329
|
+
// ^9, so a fresh hook must be v9-shaped. Existing files are appended to, never
|
|
330
|
+
// rewritten — their contents are the adopter's, not ours.
|
|
331
|
+
const content = existsSync(preCommitPath) ? readFileSync(preCommitPath, 'utf-8') : '';
|
|
300
332
|
|
|
301
333
|
if (!content.includes('uds check')) {
|
|
302
|
-
|
|
334
|
+
const sep = content && !content.endsWith('\n') ? '\n' : '';
|
|
335
|
+
writeFileSync(preCommitPath, `${content}${sep}\n# UDS Standard Check\n${udsCmd}\n`, 'utf-8');
|
|
303
336
|
try {
|
|
304
337
|
execSync(`chmod +x ${preCommitPath}`);
|
|
305
338
|
} catch {
|
|
@@ -312,6 +345,14 @@ async function setupHuskyHook(projectPath) {
|
|
|
312
345
|
} catch (e) {
|
|
313
346
|
console.log(chalk.red(` ✗ Failed to configure pre-commit hook: ${e.message}`));
|
|
314
347
|
}
|
|
348
|
+
|
|
349
|
+
// 5. Say what we changed in their package.json.
|
|
350
|
+
if (pkgChanges.length > 0) {
|
|
351
|
+
console.log(chalk.cyan(' package.json modified:'));
|
|
352
|
+
for (const change of pkgChanges) {
|
|
353
|
+
console.log(chalk.gray(` • ${change}`));
|
|
354
|
+
}
|
|
355
|
+
}
|
|
315
356
|
} else {
|
|
316
357
|
// Non-Node.js: write native .git/hooks/pre-commit
|
|
317
358
|
console.log(chalk.cyan('Configuring Pre-commit Hook (native git hook)...'));
|
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.
|
|
3
|
+
"version": "6.1.0",
|
|
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.
|
|
61
|
+
"version": "6.1.0"
|
|
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.
|
|
68
|
+
"version": "6.1.0",
|
|
69
69
|
"note": "Skills are now included in the main repository under skills/"
|
|
70
70
|
}
|
|
71
71
|
},
|
|
@@ -1123,7 +1123,7 @@
|
|
|
1123
1123
|
},
|
|
1124
1124
|
"category": "reference",
|
|
1125
1125
|
"skillName": null,
|
|
1126
|
-
"description": "Mandatory self-review pass on large markdown edits (>50 lines) before commit; catches
|
|
1126
|
+
"description": "Mandatory self-review pass on large markdown edits (>50 lines) before commit; catches 7 categories of internal cross-reference inconsistencies (diagram/step mismatch, changelog reference errors, count drift, stale templates, wrong tool references, placeholder vs rule misalignment, language/terminology consistency)"
|
|
1127
1127
|
},
|
|
1128
1128
|
{
|
|
1129
1129
|
"id": "ai-instruction-standards",
|
|
@@ -1742,7 +1742,7 @@
|
|
|
1742
1742
|
},
|
|
1743
1743
|
"category": "skill",
|
|
1744
1744
|
"skillName": null,
|
|
1745
|
-
"description": "Iron Law: no verification evidence = no completion claim. RED-GREEN cycle for bug fixes"
|
|
1745
|
+
"description": "Iron Law: no verification evidence = no completion claim. RED-GREEN cycle for bug fixes. Evidence validity: a tool can fail silently and its output is indistinguishable from a real result"
|
|
1746
1746
|
},
|
|
1747
1747
|
{
|
|
1748
1748
|
"id": "adr-standards",
|
|
@@ -2138,7 +2138,7 @@
|
|
|
2138
2138
|
"name": "Git Push Safety Gates",
|
|
2139
2139
|
"nameZh": "Git Push 安全閘門標準",
|
|
2140
2140
|
"source": {
|
|
2141
|
-
"human": "
|
|
2141
|
+
"human": "core/push-standards.md",
|
|
2142
2142
|
"ai": "ai/standards/push-standards.ai.yaml"
|
|
2143
2143
|
},
|
|
2144
2144
|
"category": "skill",
|
|
@@ -2226,7 +2226,7 @@
|
|
|
2226
2226
|
"id": "license-compliance",
|
|
2227
2227
|
"name": "License Compliance Standards",
|
|
2228
2228
|
"nameZh": "授權合規標準",
|
|
2229
|
-
"version": "6.
|
|
2229
|
+
"version": "6.1.0",
|
|
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.
|
|
2241
|
+
"version": "6.1.0",
|
|
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.
|
|
2253
|
+
"version": "6.1.0",
|
|
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.
|
|
2265
|
+
"version": "6.1.0",
|
|
2266
2266
|
"source": {
|
|
2267
2267
|
"human": "core/resource-cost-boundary.md",
|
|
2268
2268
|
"ai": "ai/standards/resource-cost-boundary.ai.yaml"
|