universal-dev-standards 6.14.0-beta.14 → 6.14.0-beta.15
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/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-TW/CHANGELOG.md +3 -3
- package/bundled/locales/zh-TW/README.md +1 -1
- package/bundled/locales/zh-TW/SECURITY.md +1 -1
- package/package.json +1 -1
- package/src/commands/config.js +21 -5
- package/src/commands/init.js +23 -6
- package/src/commands/update.js +10 -5
- package/src/config/ai-agent-paths.js +14 -1
- package/src/core/installed-formats.js +15 -0
- package/src/i18n/messages.js +3 -0
- package/src/installers/manifest-installer.js +1 -1
- package/src/installers/skills-installer.js +1 -1
- package/src/installers/standards-installer.js +3 -1
- package/src/prompts/init.js +9 -5
- package/src/reconciler/actual-state-scanner.js +2 -8
- package/src/reconciler/desired-state-calculator.js +58 -56
- package/src/reconciler/relative-path.js +23 -0
- package/standards-registry.json +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.
|
|
18
|
+
**版本**: 6.14.0-beta.15 (Pre-release) | **发布日期**: 2026-10-10 | **授权**: [双重授权](../../LICENSE) (CC BY 4.0 + MIT)
|
|
19
19
|
|
|
20
20
|
语言无关、框架无关的软件项目文档标准。通过 AI 原生工作流,确保不同技术栈之间的一致性、质量和可维护性。
|
|
21
21
|
|
|
@@ -15,7 +15,7 @@ status: current
|
|
|
15
15
|
|
|
16
16
|
> **語言**: [English](../../README.md) | 繁體中文 | [简体中文](../zh-CN/README.md)
|
|
17
17
|
|
|
18
|
-
**版本**: 6.14.0-beta.
|
|
18
|
+
**版本**: 6.14.0-beta.15 (Pre-release) | **發布日期**: 2026-10-10 | **授權**: [雙重授權](../../LICENSE) (CC BY 4.0 + MIT)
|
|
19
19
|
|
|
20
20
|
語言無關、框架無關的軟體專案文件標準。透過 AI 原生工作流,確保不同技術堆疊之間的一致性、品質和可維護性。
|
|
21
21
|
|
package/package.json
CHANGED
package/src/commands/config.js
CHANGED
|
@@ -40,7 +40,8 @@ import {
|
|
|
40
40
|
} from '../utils/skills-installer.js';
|
|
41
41
|
import {
|
|
42
42
|
getAgentConfig,
|
|
43
|
-
getAgentDisplayName
|
|
43
|
+
getAgentDisplayName,
|
|
44
|
+
hasSkillsLevel
|
|
44
45
|
} from '../config/ai-agent-paths.js';
|
|
45
46
|
import { displayLanguageToLocale } from '../utils/locale.js';
|
|
46
47
|
import {
|
|
@@ -1235,6 +1236,13 @@ async function handleSkillsConfiguration(manifest, projectPath, msgObj, common,
|
|
|
1235
1236
|
const validLocations = ['project', 'user'];
|
|
1236
1237
|
const level = skillsLocation && validLocations.includes(skillsLocation) ? skillsLocation : 'project';
|
|
1237
1238
|
|
|
1239
|
+
// XSPEC-486 R2: a tool with no user-level skills folder (antigravity) cannot be asked for one.
|
|
1240
|
+
if (!hasSkillsLevel(specificTool, level)) {
|
|
1241
|
+
console.log(chalk.yellow(`${getAgentDisplayName(specificTool)} has no ${level}-level skills folder; nothing was installed.`));
|
|
1242
|
+
console.log(chalk.gray(' Use --skills-location project to install its Skills into this project.'));
|
|
1243
|
+
return;
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1238
1246
|
// Install to specified level (defaults to project)
|
|
1239
1247
|
const installations = [{ agent: specificTool, level }];
|
|
1240
1248
|
const spinner = createSpinner(`Installing Skills for ${getAgentDisplayName(specificTool)} (${level} level)...`).start();
|
|
@@ -1368,10 +1376,18 @@ async function handleSkillsConfiguration(manifest, projectPath, msgObj, common,
|
|
|
1368
1376
|
default: 'project'
|
|
1369
1377
|
});
|
|
1370
1378
|
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1379
|
+
// XSPEC-486 R2: at the user level, a tool with no user-level folder is named and left out, not sent to an installer
|
|
1380
|
+
// that has no folder to write into.
|
|
1381
|
+
for (const agent of declinedToolsWithSupport.filter(a => !hasSkillsLevel(a, skillsLevel))) {
|
|
1382
|
+
console.log(chalk.yellow(`${getAgentDisplayName(agent)} has no ${skillsLevel}-level skills folder; nothing was installed for it.`));
|
|
1383
|
+
}
|
|
1384
|
+
const installations = declinedToolsWithSupport
|
|
1385
|
+
.filter(agent => hasSkillsLevel(agent, skillsLevel))
|
|
1386
|
+
.map(agent => ({ agent, level: skillsLevel }));
|
|
1387
|
+
if (installations.length === 0) {
|
|
1388
|
+
console.log(chalk.gray(msgObj.noChanges || 'No changes made'));
|
|
1389
|
+
return;
|
|
1390
|
+
}
|
|
1375
1391
|
|
|
1376
1392
|
// Install Skills
|
|
1377
1393
|
const spinner = createSpinner(msgObj.installingSkills || 'Installing Skills...').start();
|
package/src/commands/init.js
CHANGED
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
getAgentConfig,
|
|
26
26
|
getAgentDisplayName
|
|
27
27
|
} from '../utils/github.js';
|
|
28
|
+
import { hasSkillsLevel } from '../config/ai-agent-paths.js';
|
|
28
29
|
import { displayLanguageToLocale, normalizeRequestedLocale } from '../utils/locale.js';
|
|
29
30
|
import localeUtils from '../utils/locale.js';
|
|
30
31
|
const LOCALE_MAP_FOR_INIT = localeUtils.LOCALE_MAP;
|
|
@@ -215,6 +216,12 @@ export async function initCommand(options) {
|
|
|
215
216
|
`${msg.skillsPathUnknown || 'no verified skills path — nothing was installed for this tool'}`
|
|
216
217
|
));
|
|
217
218
|
}
|
|
219
|
+
for (const tool of config.skillsConfig.skillsNoUserPathTools || []) {
|
|
220
|
+
console.log(chalk.yellow(
|
|
221
|
+
`⚠ ${getAgentDisplayName(tool) || tool}: ` +
|
|
222
|
+
`${msg.skillsNoUserPath || 'has no user-level skills folder (only the project one) — nothing was installed for it at the user level; run again with --skills-location project to install it into this project'}`
|
|
223
|
+
));
|
|
224
|
+
}
|
|
218
225
|
await installSkills(config.skillsConfig, projectPath, msg, skillsResults);
|
|
219
226
|
await installCommands(config.skillsConfig, projectPath, msg, skillsResults);
|
|
220
227
|
|
|
@@ -401,14 +408,14 @@ export async function initCommand(options) {
|
|
|
401
408
|
// A failure here is reported and does not fail the install: the project is complete without it.
|
|
402
409
|
//
|
|
403
410
|
// Only when the whole difference is integration blocks to rewrite (and the manifest to bring forward). A project whose
|
|
404
|
-
// plan holds anything else is left exactly as init wrote it
|
|
405
|
-
//
|
|
406
|
-
//
|
|
411
|
+
// plan holds anything else is left exactly as init wrote it, because an install must never delete, or overwrite, what
|
|
412
|
+
// it has just written. This used to skip every `--format both` project: the plan for it deleted the AI copy of each
|
|
413
|
+
// standard. The reconciler now expects both copies for `both` (XSPEC-483 R1), so those projects reach the step like any other.
|
|
407
414
|
if (config.contentLayout !== 'layered') {
|
|
408
415
|
try {
|
|
409
416
|
const { reconcile, plan: reconcilerPlan } = await import('../reconciler/index.js');
|
|
410
417
|
const preview = await reconcilerPlan(projectPath);
|
|
411
|
-
if (preview.plan.actions.every((a) => a.type === 'migrate_block')) {
|
|
418
|
+
if (preview.plan.actions.every((a) => a.type === 'migrate_block')) { // wire:init-converges-both
|
|
412
419
|
const converged = await reconcile(projectPath, { backup: false }); // wire:init-converges-to-current-format
|
|
413
420
|
if (!converged.success) {
|
|
414
421
|
console.log(chalk.yellow(` ⚠ Could not bring the new project to the current manifest format: ${converged.errors.join('; ')} (\`uds update --apply\` will finish it)`));
|
|
@@ -852,6 +859,7 @@ function buildNonInteractiveConfig(options, detected, projectPath) {
|
|
|
852
859
|
}
|
|
853
860
|
let skillsConfig = {};
|
|
854
861
|
let skillsInstallationsForYes = [];
|
|
862
|
+
let skillsNoUserPathTools = [];
|
|
855
863
|
|
|
856
864
|
if (skillsLocationFlag === 'marketplace') {
|
|
857
865
|
skillsConfig = {
|
|
@@ -885,7 +893,13 @@ function buildNonInteractiveConfig(options, detected, projectPath) {
|
|
|
885
893
|
// path from the table. Without this the config carries only `updateTargets`,
|
|
886
894
|
// `installSkills()` takes its legacy branch, and every tool's skills land in
|
|
887
895
|
// `.claude/skills/` — see the block above for what that measured.
|
|
888
|
-
|
|
896
|
+
// XSPEC-486 R2: at the user level a tool with no user-level folder (antigravity) gets nothing, and the run says so
|
|
897
|
+
// (printed by the caller from `skillsNoUserPathTools`). Not a project install in its place: the adopter asked for
|
|
898
|
+
// the user level, and writing into the project instead would be a guess.
|
|
899
|
+
skillsNoUserPathTools = location === 'user' ? skillsCapableTools.filter(agent => !hasSkillsLevel(agent, 'user')) : [];
|
|
900
|
+
skillsInstallationsForYes = skillsCapableTools
|
|
901
|
+
.filter(agent => !skillsNoUserPathTools.includes(agent))
|
|
902
|
+
.map(agent => ({ agent, level: location }));
|
|
889
903
|
// Nothing detected: name Claude Code's folder explicitly. Leaving the list empty sent the install down
|
|
890
904
|
// the legacy branch of `installSkills()`, which does not take the locale (so `--locale zh-tw` in a
|
|
891
905
|
// project with no tool marker would have installed English and said nothing).
|
|
@@ -897,7 +911,9 @@ function buildNonInteractiveConfig(options, detected, projectPath) {
|
|
|
897
911
|
// guess and is kept. Without this split, `--skills-location project` in an
|
|
898
912
|
// Antigravity-only repo wrote 55 skills into `.claude/skills/`, a directory
|
|
899
913
|
// nothing in that repo reads. Caught by `check:install-paths`, not by me.
|
|
900
|
-
|
|
914
|
+
// The same holds when every skills-capable tool was left out for having no folder at the asked level (XSPEC-486):
|
|
915
|
+
// an empty installation list would send the install down the legacy `.claude/skills/` branch.
|
|
916
|
+
const knowinglyUnsupported = aiToolsNormalized.length > 0 && skillsInstallationsForYes.length === 0;
|
|
901
917
|
|
|
902
918
|
skillsConfig = knowinglyUnsupported
|
|
903
919
|
? {
|
|
@@ -935,6 +951,7 @@ function buildNonInteractiveConfig(options, detected, projectPath) {
|
|
|
935
951
|
|
|
936
952
|
skillsConfig.locale = displayLanguageToLocale(displayLanguage);
|
|
937
953
|
skillsConfig.skillsPathUnknownTools = skippedSkillsTools;
|
|
954
|
+
skillsConfig.skillsNoUserPathTools = skillsNoUserPathTools;
|
|
938
955
|
|
|
939
956
|
// AGENTS.md: default to true in --yes mode unless codex/opencode selected or --no-agents-md
|
|
940
957
|
// When codex/opencode is selected, they already generate AGENTS.md — no need for universal output
|
package/src/commands/update.js
CHANGED
|
@@ -52,6 +52,7 @@ import {
|
|
|
52
52
|
getAgentDisplayName,
|
|
53
53
|
getAgentConfig,
|
|
54
54
|
getSkillsDirForAgent,
|
|
55
|
+
hasSkillsLevel,
|
|
55
56
|
getCommandsDirForAgent
|
|
56
57
|
} from '../config/ai-agent-paths.js';
|
|
57
58
|
import { getMarketplaceSkillsInfo } from '../utils/github.js';
|
|
@@ -2761,7 +2762,7 @@ async function planSkills(projectPath, manifest, options) {
|
|
|
2761
2762
|
for (const inst of installations) {
|
|
2762
2763
|
const info = getInstalledSkillsInfoForAgent(inst.agent, inst.level, projectPath);
|
|
2763
2764
|
const current = info?.version || 'unknown';
|
|
2764
|
-
const dir = getSkillsDirForAgent(inst.agent, inst.level, projectPath);
|
|
2765
|
+
const dir = getSkillsDirForAgent(inst.agent, inst.level, projectPath) ?? '(no such folder)'; // XSPEC-486: null when the tool has no folder at that level
|
|
2765
2766
|
const differing = skillActions.filter((a) => a.details?.metadata?.agent === inst.agent && (a.details?.metadata?.level || 'project') === inst.level);
|
|
2766
2767
|
if (current === latestVersion && differing.length === 0) {
|
|
2767
2768
|
console.log(chalk.gray(` = ${getAgentDisplayName(inst.agent)} (${inst.level}): v${current} — unchanged`));
|
|
@@ -2879,7 +2880,11 @@ async function updateSkillsOnly(projectPath, manifest, options) {
|
|
|
2879
2880
|
return Boolean(config?.supportsSkills && config?.skills);
|
|
2880
2881
|
});
|
|
2881
2882
|
const agents = detectedSkillsTools.length > 0 ? detectedSkillsTools : ['claude-code'];
|
|
2882
|
-
|
|
2883
|
+
// XSPEC-486 R2: a tool with no folder at the recorded level (antigravity has no user-level one) is not given
|
|
2884
|
+
// an installation that has nowhere to go.
|
|
2885
|
+
for (const agent of agents) {
|
|
2886
|
+
if (hasSkillsLevel(agent, legacyLocation)) skillsInstallations.push({ agent, level: legacyLocation });
|
|
2887
|
+
}
|
|
2883
2888
|
} else if (legacyLocation === 'marketplace') {
|
|
2884
2889
|
console.log(chalk.yellow(msg.skillsViaMarketplace || 'Skills installed via Marketplace'));
|
|
2885
2890
|
console.log(chalk.gray(` ${msg.updateViaMarketplace || 'Update through Plugin Marketplace'}`));
|
|
@@ -2952,7 +2957,7 @@ async function updateSkillsOnly(projectPath, manifest, options) {
|
|
|
2952
2957
|
// Build location summary
|
|
2953
2958
|
const locations = fileBasedInstallations.map(inst => {
|
|
2954
2959
|
const displayName = getAgentDisplayName(inst.agent);
|
|
2955
|
-
const dir = getSkillsDirForAgent(inst.agent, inst.level, projectPath);
|
|
2960
|
+
const dir = getSkillsDirForAgent(inst.agent, inst.level, projectPath) ?? '(no such folder)'; // XSPEC-486
|
|
2956
2961
|
return `${displayName}: ${dir}`;
|
|
2957
2962
|
}).join(', ');
|
|
2958
2963
|
|
|
@@ -3426,7 +3431,7 @@ async function promptNewFeatureInstallation(missingSkills, outdatedSkills, missi
|
|
|
3426
3431
|
console.log(chalk.yellow(msg.skillsOutdatedFor || 'Skills updates available for these AI tools:'));
|
|
3427
3432
|
for (const skill of outdatedSkills) {
|
|
3428
3433
|
const levelLabel = skill.level === 'user' ? 'user' : 'project';
|
|
3429
|
-
const pathDisplay = skill.path || getSkillsDirForAgent(skill.agent, skill.level);
|
|
3434
|
+
const pathDisplay = skill.path || getSkillsDirForAgent(skill.agent, skill.level) || '(no such folder)';
|
|
3430
3435
|
console.log(chalk.gray(` • ${skill.displayName} (${levelLabel}: ${pathDisplay})`));
|
|
3431
3436
|
console.log(chalk.gray(` ${skill.currentVersion} → ${skill.latestVersion}`));
|
|
3432
3437
|
}
|
|
@@ -3435,7 +3440,7 @@ async function promptNewFeatureInstallation(missingSkills, outdatedSkills, missi
|
|
|
3435
3440
|
// Build checkbox choices with path info
|
|
3436
3441
|
const updateChoices = outdatedSkills.map(skill => {
|
|
3437
3442
|
const levelLabel = skill.level === 'user' ? 'user' : 'project';
|
|
3438
|
-
const pathDisplay = skill.path || getSkillsDirForAgent(skill.agent, skill.level);
|
|
3443
|
+
const pathDisplay = skill.path || getSkillsDirForAgent(skill.agent, skill.level) || '(no such folder)';
|
|
3439
3444
|
return {
|
|
3440
3445
|
name: `${skill.displayName} ${chalk.gray(`(${levelLabel}: ${pathDisplay}) ${skill.currentVersion} → ${skill.latestVersion}`)}`,
|
|
3441
3446
|
value: skill.agent,
|
|
@@ -354,13 +354,26 @@ export function getSkillsDirForAgent(agent, level = 'user', projectPath = null)
|
|
|
354
354
|
if (!config || !config.skills) return null;
|
|
355
355
|
|
|
356
356
|
if (level === 'user') {
|
|
357
|
-
|
|
357
|
+
// A tool can have no user-level folder (antigravity, on purpose). `null`, never `undefined`: every caller
|
|
358
|
+
// already treats a falsy answer as "no such place" (XSPEC-486 R2).
|
|
359
|
+
return config.skills.user || null; // wire:skills-dir-user-null-not-undefined
|
|
358
360
|
} else if (level === 'project' && projectPath) {
|
|
359
361
|
return join(projectPath, config.skills.project);
|
|
360
362
|
}
|
|
361
363
|
return null;
|
|
362
364
|
}
|
|
363
365
|
|
|
366
|
+
/**
|
|
367
|
+
* Does the agent have a skills folder at this level? A tool may have only a project folder (antigravity: agy
|
|
368
|
+
* knows one skills location, the workspace) - then no user-level skills can be listed, installed or removed.
|
|
369
|
+
* @param {string} agent - Agent identifier
|
|
370
|
+
* @param {string} level - 'user' or 'project'
|
|
371
|
+
* @returns {boolean}
|
|
372
|
+
*/
|
|
373
|
+
export function hasSkillsLevel(agent, level) {
|
|
374
|
+
return Boolean(AI_AGENT_PATHS[agent]?.skills?.[level]);
|
|
375
|
+
}
|
|
376
|
+
|
|
364
377
|
/**
|
|
365
378
|
* Get commands directory path for an agent
|
|
366
379
|
* @param {string} agent - Agent identifier
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which file formats a manifest's `format` setting puts on disk.
|
|
3
|
+
*
|
|
4
|
+
* `both` is not a third kind of file: it is the human copy (.md) and the AI copy (.ai.yaml) of every standard and
|
|
5
|
+
* every option, side by side. The installer copies once per entry of this list, and the reconciler has to expect
|
|
6
|
+
* exactly the same set. When the reconciler read `both` as one format it resolved only the human copy and planned
|
|
7
|
+
* to delete every AI copy the installer had just written (XSPEC-483).
|
|
8
|
+
*
|
|
9
|
+
* @param {string} [format] - 'ai', 'human' or 'both'. Anything else, including a missing value, is read as 'ai'.
|
|
10
|
+
* @returns {string[]} The formats to resolve a source file in: ['ai', 'human'] for 'both', otherwise one entry.
|
|
11
|
+
*/
|
|
12
|
+
export function getInstalledFormats(format) {
|
|
13
|
+
if (format === 'both') return ['ai', 'human'];
|
|
14
|
+
return [format || 'ai'];
|
|
15
|
+
}
|
package/src/i18n/messages.js
CHANGED
|
@@ -1106,6 +1106,7 @@ export const messages = {
|
|
|
1106
1106
|
// Named per detected tool, never per one tool: the install now goes to each
|
|
1107
1107
|
// tool's own path (XSPEC-408 §18.3), so a Claude-only label would be a lie.
|
|
1108
1108
|
skillsPathUnknown: 'no verified skills path for this tool — nothing was installed for it',
|
|
1109
|
+
skillsNoUserPath: 'has no user-level skills folder (only the project one) — nothing was installed for it at the user level; run again with --skills-location project to install it into this project',
|
|
1109
1110
|
installedSkills: 'Installed {count} Skills to {locations}',
|
|
1110
1111
|
installedSkillsWithErrors: 'Installed {count} Skills with {errors} errors',
|
|
1111
1112
|
// P1-CLI-1: locale fallback summary (printed after install when some
|
|
@@ -2507,6 +2508,7 @@ export const messages = {
|
|
|
2507
2508
|
couldNotGenerateAgentsMd: '無法產生 AGENTS.md',
|
|
2508
2509
|
installingSkills: '安裝 Skills 中...',
|
|
2509
2510
|
skillsPathUnknown: '沒有查證過的 skills 路徑,這個工具沒有安裝任何東西',
|
|
2511
|
+
skillsNoUserPath: '沒有使用者層級的 skills 資料夾(只有專案層級)— 沒有為它安裝使用者層級的 skills;要裝進這個專案,請改用 --skills-location project 再執行一次',
|
|
2510
2512
|
installedSkills: '已安裝 {count} 個 Skills 到 {locations}',
|
|
2511
2513
|
installedSkillsWithErrors: '已安裝 {count} 個 Skills,有 {errors} 個錯誤',
|
|
2512
2514
|
// P1-CLI-1:locale fallback 摘要(安裝結束後顯示,列出沒有對應語系變體而退回英文來源的 skill)
|
|
@@ -3568,6 +3570,7 @@ export const messages = {
|
|
|
3568
3570
|
generatedAgentsMd: '已生成 AGENTS.md(通用摘要)',
|
|
3569
3571
|
couldNotGenerateAgentsMd: '无法生成 AGENTS.md',
|
|
3570
3572
|
installingSkills: '正在安装 Claude Code Skills...',
|
|
3573
|
+
skillsNoUserPath: '没有用户级别的 skills 文件夹(只有项目级别)— 没有为它安装用户级别的 skills;要装进这个项目,请改用 --skills-location project 再执行一次',
|
|
3571
3574
|
installedSkills: '已安装 {count} 个 Skills 到 {locations}',
|
|
3572
3575
|
installedSkillsWithErrors: '已安装 {count} 个 Skills,有 {errors} 个错误',
|
|
3573
3576
|
// P1-CLI-1:locale fallback 摘要(安装结束后显示,列出没有对应语种变体而退回英文来源的 skill)
|
|
@@ -94,7 +94,7 @@ export function writeFinalManifest(config, results, projectPath) {
|
|
|
94
94
|
} else if (results.skills?.length > 0) {
|
|
95
95
|
const skillLocations = (config.skillsConfig.skillsInstallations || []).map(inst => {
|
|
96
96
|
const displayName = getAgentDisplayName(inst.agent);
|
|
97
|
-
const dir = getSkillsDirForAgent(inst.agent, inst.level, projectPath);
|
|
97
|
+
const dir = getSkillsDirForAgent(inst.agent, inst.level, projectPath) ?? '(no such folder)'; // XSPEC-486
|
|
98
98
|
return `${displayName}: ${dir}`;
|
|
99
99
|
}).join(' and ');
|
|
100
100
|
console.log(chalk.gray(` ${msg.skillsInstalledTo.replace('{count}', results.skills.length).replace('{locations}', skillLocations)}`));
|
|
@@ -147,7 +147,7 @@ export async function installSkills(skillsConfig, projectPath, messages, results
|
|
|
147
147
|
// Build location summary for display
|
|
148
148
|
const targetLocations = (skillsConfig.skillsInstallations || []).map(inst => {
|
|
149
149
|
const displayName = getAgentDisplayName(inst.agent);
|
|
150
|
-
const dir = getSkillsDirForAgent(inst.agent, inst.level, projectPath);
|
|
150
|
+
const dir = getSkillsDirForAgent(inst.agent, inst.level, projectPath) ?? '(no such folder)'; // XSPEC-486
|
|
151
151
|
return `${displayName} (${dir})`;
|
|
152
152
|
}).join(', ');
|
|
153
153
|
|
|
@@ -11,6 +11,7 @@ import { copyStandard, copyExtension } from '../utils/copier.js';
|
|
|
11
11
|
import { t } from '../i18n/messages.js';
|
|
12
12
|
import { computeFileHash } from '../utils/hasher.js';
|
|
13
13
|
import { MANIFEST_OPTION_BINDINGS } from '../core/constants.js';
|
|
14
|
+
import { getInstalledFormats } from '../core/installed-formats.js';
|
|
14
15
|
|
|
15
16
|
// Extension file mappings
|
|
16
17
|
export const EXTENSION_MAPPINGS = {
|
|
@@ -78,7 +79,8 @@ export async function installStandards(config, projectPath) {
|
|
|
78
79
|
const copySpinner = createSpinner(msg.copyingStandards).start();
|
|
79
80
|
|
|
80
81
|
// Copy standards based on format
|
|
81
|
-
|
|
82
|
+
// The reconciler expects the same list (XSPEC-483), so the two cannot disagree about what `both` installs.
|
|
83
|
+
const formatsToUse = config.format === 'both' ? getInstalledFormats('both') : [config.format];
|
|
82
84
|
|
|
83
85
|
for (const std of standardsToCopy) {
|
|
84
86
|
for (const targetFormat of formatsToUse) {
|
package/src/prompts/init.js
CHANGED
|
@@ -190,11 +190,15 @@ export async function promptSkillsInstallLocation(selectedTools = []) {
|
|
|
190
190
|
const config = getAgentConfig(tool);
|
|
191
191
|
const displayName = getAgentDisplayName(tool);
|
|
192
192
|
|
|
193
|
-
// User level option
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
193
|
+
// User level option - only for a tool whose path table has a user-level skills folder (XSPEC-486 R1).
|
|
194
|
+
// Antigravity has none on purpose (agy knows one skills location, the workspace); offering the choice there
|
|
195
|
+
// called `.replace` on undefined and ended the whole `uds init`.
|
|
196
|
+
if (config.skills.user) { // wire:skills-prompt-user-level-only-if-path
|
|
197
|
+
choices.push({
|
|
198
|
+
name: `${chalk.blue(displayName)} - ${msg.choices.userLevel} ${chalk.gray(`(${config.skills.user.replace(os.homedir(), '~')})`)}`,
|
|
199
|
+
value: `${tool}:user`
|
|
200
|
+
});
|
|
201
|
+
}
|
|
198
202
|
|
|
199
203
|
// Project level option. Pre-selected (XSPEC-468 R1): the project way is the main path, so pressing Enter
|
|
200
204
|
// installs the skills into the project. Deselect everything to skip them (for example, to use the plugin).
|
|
@@ -11,6 +11,7 @@ import { existsSync, readdirSync, readFileSync, statSync } from 'fs';
|
|
|
11
11
|
import { createHash } from 'crypto';
|
|
12
12
|
import { join, relative } from 'path';
|
|
13
13
|
import { readManifest } from '../core/manifest.js';
|
|
14
|
+
import { projectRelative } from './relative-path.js';
|
|
14
15
|
import { computeFileHash, computeIntegrationBlockHash, normalizeLineEndings } from '../utils/hasher.js';
|
|
15
16
|
import { SUPPORTED_AI_TOOLS, UDS_MARKERS } from '../core/constants.js';
|
|
16
17
|
import { locateMarkerBlock, AmbiguousMarkerError } from '../utils/marker-locator.js';
|
|
@@ -600,12 +601,5 @@ function scanDirectoryRecursive(dirPath, callback, baseDir = dirPath) {
|
|
|
600
601
|
* Get relative path from project root.
|
|
601
602
|
*/
|
|
602
603
|
function getRelativePath(projectPath, absPath) {
|
|
603
|
-
|
|
604
|
-
let rel = absPath.slice(projectPath.length);
|
|
605
|
-
if (rel.startsWith('/') || rel.startsWith('\\')) {
|
|
606
|
-
rel = rel.slice(1);
|
|
607
|
-
}
|
|
608
|
-
return rel;
|
|
609
|
-
}
|
|
610
|
-
return absPath;
|
|
604
|
+
return projectRelative(projectPath, absPath); // `/` on every system (XSPEC-486 R4)
|
|
611
605
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
import { join, basename } from 'path';
|
|
11
11
|
import { getAllStandards, getStandardSource, findOption, getOptionSource } from '../utils/registry.js';
|
|
12
|
+
import { getInstalledFormats } from '../core/installed-formats.js';
|
|
12
13
|
import {
|
|
13
14
|
resolveToolKey,
|
|
14
15
|
SUPPORTED_AI_TOOLS,
|
|
@@ -25,6 +26,7 @@ import {
|
|
|
25
26
|
buildAgentsMdSummaryConfig
|
|
26
27
|
} from '../utils/integration-generator.js';
|
|
27
28
|
import { PathResolver } from '../core/paths.js';
|
|
29
|
+
import { projectRelative } from './relative-path.js';
|
|
28
30
|
import { computeFileHash } from '../utils/hasher.js';
|
|
29
31
|
import { createHash } from 'crypto';
|
|
30
32
|
import {
|
|
@@ -106,7 +108,7 @@ export function calculateDesiredState(projectPath, manifest) {
|
|
|
106
108
|
* Calculate expected standard files.
|
|
107
109
|
*/
|
|
108
110
|
function calculateStandards(state, manifest) {
|
|
109
|
-
const
|
|
111
|
+
const formats = getInstalledFormats(manifest.format); // wire:calculator-standards-formats
|
|
110
112
|
const allStandards = getAllStandards();
|
|
111
113
|
|
|
112
114
|
for (const standardId of (manifest.standards || [])) {
|
|
@@ -131,35 +133,39 @@ function calculateStandards(state, manifest) {
|
|
|
131
133
|
|
|
132
134
|
if (!registryEntry) continue;
|
|
133
135
|
|
|
134
|
-
|
|
135
|
-
if (
|
|
136
|
+
// `format: both` installs the human and the AI copy of every standard, so it expects both files. Reading
|
|
137
|
+
// `both` as if it were one format resolved only the human copy and planned to delete every AI copy (XSPEC-483).
|
|
138
|
+
for (const fileFormat of formats) {
|
|
139
|
+
const source = getStandardSource(registryEntry, fileFormat);
|
|
140
|
+
if (!source) continue;
|
|
136
141
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
142
|
+
// Target path in .standards/
|
|
143
|
+
const fileName = basename(source);
|
|
144
|
+
const relativePath = `.standards/${fileName}`;
|
|
140
145
|
|
|
141
|
-
|
|
142
|
-
|
|
146
|
+
// Resolve source to absolute path
|
|
147
|
+
const absSource = PathResolver.getStandardSource(source);
|
|
143
148
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
// Compute hash from source if available
|
|
150
|
+
let hash = null;
|
|
151
|
+
let size = null;
|
|
152
|
+
if (absSource) {
|
|
153
|
+
const hashInfo = computeFileHash(absSource);
|
|
154
|
+
if (hashInfo) {
|
|
155
|
+
hash = hashInfo.hash;
|
|
156
|
+
size = hashInfo.size;
|
|
157
|
+
}
|
|
152
158
|
}
|
|
153
|
-
}
|
|
154
159
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
state.standards.set(relativePath, {
|
|
161
|
+
relativePath,
|
|
162
|
+
hash,
|
|
163
|
+
size,
|
|
164
|
+
category: 'standard',
|
|
165
|
+
sourcePath: absSource,
|
|
166
|
+
metadata: { standardId, format: fileFormat, registryEntry }
|
|
167
|
+
});
|
|
168
|
+
}
|
|
163
169
|
}
|
|
164
170
|
}
|
|
165
171
|
|
|
@@ -180,7 +186,7 @@ function calculateStandards(state, manifest) {
|
|
|
180
186
|
* not into a `<standardId>/<categoryKey>/` tree.
|
|
181
187
|
*/
|
|
182
188
|
function calculateOptions(state, manifest) {
|
|
183
|
-
const
|
|
189
|
+
const formats = getInstalledFormats(manifest.format); // wire:calculator-options-formats
|
|
184
190
|
const allStandards = getAllStandards();
|
|
185
191
|
|
|
186
192
|
if (!manifest.options) return;
|
|
@@ -201,30 +207,33 @@ function calculateOptions(state, manifest) {
|
|
|
201
207
|
const option = findOption(registryEntry, binding.categoryKey, optionId);
|
|
202
208
|
if (!option) continue;
|
|
203
209
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
if (
|
|
215
|
-
|
|
216
|
-
|
|
210
|
+
// As for the standards: `format: both` installs each option in both formats (XSPEC-483).
|
|
211
|
+
for (const fileFormat of formats) {
|
|
212
|
+
const source = getOptionSource(option, fileFormat);
|
|
213
|
+
if (!source) continue;
|
|
214
|
+
|
|
215
|
+
const relativePath = `${OPTIONS_INSTALL_DIR}/${basename(source)}`;
|
|
216
|
+
const absSource = PathResolver.getStandardSource(source);
|
|
217
|
+
|
|
218
|
+
let hash = null;
|
|
219
|
+
let size = null;
|
|
220
|
+
if (absSource) {
|
|
221
|
+
const hashInfo = computeFileHash(absSource);
|
|
222
|
+
if (hashInfo) {
|
|
223
|
+
hash = hashInfo.hash;
|
|
224
|
+
size = hashInfo.size;
|
|
225
|
+
}
|
|
217
226
|
}
|
|
218
|
-
}
|
|
219
227
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
+
state.options.set(relativePath, {
|
|
229
|
+
relativePath,
|
|
230
|
+
hash,
|
|
231
|
+
size,
|
|
232
|
+
category: 'option',
|
|
233
|
+
sourcePath: absSource,
|
|
234
|
+
metadata: { standardId: binding.standardId, categoryKey: binding.categoryKey, optionId, format: fileFormat }
|
|
235
|
+
});
|
|
236
|
+
}
|
|
228
237
|
}
|
|
229
238
|
}
|
|
230
239
|
}
|
|
@@ -564,12 +573,5 @@ function calculateCommands(state, projectPath, manifest) {
|
|
|
564
573
|
* @returns {string}
|
|
565
574
|
*/
|
|
566
575
|
function getRelativePath(projectPath, absPath) {
|
|
567
|
-
|
|
568
|
-
let rel = absPath.slice(projectPath.length);
|
|
569
|
-
if (rel.startsWith('/') || rel.startsWith('\\')) {
|
|
570
|
-
rel = rel.slice(1);
|
|
571
|
-
}
|
|
572
|
-
return rel;
|
|
573
|
-
}
|
|
574
|
-
return absPath;
|
|
576
|
+
return projectRelative(projectPath, absPath); // `/` on every system (XSPEC-486 R4)
|
|
575
577
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project-relative paths as the user sees them (XSPEC-486 R4).
|
|
3
|
+
*
|
|
4
|
+
* The reconciler names every file it plans, writes or fails on by a path relative to the project. The standards rows
|
|
5
|
+
* were already written with `/`; the skill and command rows came from `path.join`, so on Windows they read
|
|
6
|
+
* `.claude\skills\x` next to `.standards/y` in the same plan and error list. One rule for all of them: `/`.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import path from 'path';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @param {string} projectPath - Project root
|
|
13
|
+
* @param {string} absPath - A path under the project (a path outside it is returned as it is: it is not "relative")
|
|
14
|
+
* @param {{ sep: string }} [pathModule] - The path flavour that built `absPath` (a test passes `path.win32`)
|
|
15
|
+
* @returns {string} The path relative to the project, with `/` between the parts
|
|
16
|
+
*/
|
|
17
|
+
export function projectRelative(projectPath, absPath, pathModule = path) {
|
|
18
|
+
if (!absPath.startsWith(projectPath)) return absPath;
|
|
19
|
+
let rel = absPath.slice(projectPath.length);
|
|
20
|
+
if (rel.startsWith('/') || rel.startsWith('\\')) rel = rel.slice(1);
|
|
21
|
+
// Only where `\` is the separator: on POSIX a backslash is a legal character of a file name.
|
|
22
|
+
return pathModule.sep === '\\' ? rel.split('\\').join('/') : rel;
|
|
23
|
+
}
|
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.15",
|
|
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.15"
|
|
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.15",
|
|
69
69
|
"note": "Skills are now included in the main repository under skills/"
|
|
70
70
|
}
|
|
71
71
|
},
|
|
@@ -2336,7 +2336,7 @@
|
|
|
2336
2336
|
"id": "license-compliance",
|
|
2337
2337
|
"name": "License Compliance Standards",
|
|
2338
2338
|
"nameZh": "授權合規標準",
|
|
2339
|
-
"version": "6.14.0-beta.
|
|
2339
|
+
"version": "6.14.0-beta.15",
|
|
2340
2340
|
"source": {
|
|
2341
2341
|
"human": "core/license-compliance.md",
|
|
2342
2342
|
"ai": "ai/standards/license-compliance.ai.yaml"
|
|
@@ -2348,7 +2348,7 @@
|
|
|
2348
2348
|
"id": "verification-oracle",
|
|
2349
2349
|
"name": "Verification Oracle Standards",
|
|
2350
2350
|
"nameZh": "驗證 Oracle 標準",
|
|
2351
|
-
"version": "6.14.0-beta.
|
|
2351
|
+
"version": "6.14.0-beta.15",
|
|
2352
2352
|
"source": {
|
|
2353
2353
|
"human": "core/verification-oracle.md",
|
|
2354
2354
|
"ai": "ai/standards/verification-oracle.ai.yaml"
|
|
@@ -2360,7 +2360,7 @@
|
|
|
2360
2360
|
"id": "model-provenance",
|
|
2361
2361
|
"name": "Model Provenance Policy Standards",
|
|
2362
2362
|
"nameZh": "模型來源政策標準",
|
|
2363
|
-
"version": "6.14.0-beta.
|
|
2363
|
+
"version": "6.14.0-beta.15",
|
|
2364
2364
|
"source": {
|
|
2365
2365
|
"human": "core/model-provenance.md",
|
|
2366
2366
|
"ai": "ai/standards/model-provenance.ai.yaml"
|
|
@@ -2372,7 +2372,7 @@
|
|
|
2372
2372
|
"id": "resource-cost-boundary",
|
|
2373
2373
|
"name": "Resource / Cost Boundary Declaration Standards",
|
|
2374
2374
|
"nameZh": "資源/成本邊界宣告標準",
|
|
2375
|
-
"version": "6.14.0-beta.
|
|
2375
|
+
"version": "6.14.0-beta.15",
|
|
2376
2376
|
"source": {
|
|
2377
2377
|
"human": "core/resource-cost-boundary.md",
|
|
2378
2378
|
"ai": "ai/standards/resource-cost-boundary.ai.yaml"
|