universal-dev-standards 3.5.1-beta.12 → 3.5.1-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 CHANGED
@@ -55,7 +55,8 @@ program
55
55
  .command('configure')
56
56
  .alias('config')
57
57
  .description('Modify options for initialized project')
58
- .option('-t, --type <type>', 'Option type to configure (format, workflow, merge_strategy, commit_language, test_levels, all)')
58
+ .option('-t, --type <type>', 'Option type to configure (format, workflow, merge_strategy, commit_language, test_levels, skills, commands, all)')
59
+ .option('--ai-tool <tool>', 'Specific AI tool to configure (claude-code, opencode, copilot, etc.) - enables non-interactive mode')
59
60
  .option('-E, --experimental', 'Enable experimental features (methodology)')
60
61
  .action(configureCommand);
61
62
 
@@ -37,14 +37,40 @@ Use AskUserQuestion with these options:
37
37
  | **Project Level** | Install at .claude/skills/ |
38
38
  | **Skip** | Don't install Skills |
39
39
 
40
- ### Step 3: Execute | 步驟 3:執行
40
+ ### Step 3: Ask AI Tools Selection | 步驟 3:詢問 AI 工具選擇
41
41
 
42
- After collecting answers, execute:
42
+ Use AskUserQuestion with multiSelect to ask which AI tools to install Skills/Commands for:
43
43
 
44
+ 使用 AskUserQuestion(多選)詢問要為哪些 AI 工具安裝 Skills/Commands:
45
+
46
+ | Option | Description |
47
+ |--------|-------------|
48
+ | **Claude Code** | Install Skills for Claude Code |
49
+ | **OpenCode** | Install Skills + Commands for OpenCode |
50
+ | **GitHub Copilot** | Install Skills + Commands for Copilot |
51
+ | **Gemini CLI** | Install Skills + Commands for Gemini CLI |
52
+ | **Skip** | Don't install for any tool |
53
+
54
+ Note: Only show options for tools that are detected in the environment or commonly used.
55
+
56
+ ### Step 4: Execute | 步驟 4:執行
57
+
58
+ After collecting answers, execute initialization and tool-specific installations:
59
+
60
+ 收集答案後,執行初始化和工具特定的安裝:
61
+
62
+ **Initialize standards:**
44
63
  ```bash
45
64
  uds init --level <level> --skills-location <location> --yes
46
65
  ```
47
66
 
67
+ **Install for selected AI tools:**
68
+ ```bash
69
+ # For each selected tool
70
+ uds configure --type skills --ai-tool <tool>
71
+ uds configure --type commands --ai-tool <tool> # if tool supports commands
72
+ ```
73
+
48
74
  Explain the results and next steps to the user.
49
75
 
50
76
  ## Quick Mode | 快速模式
@@ -44,42 +44,35 @@ uds update --beta --yes
44
44
 
45
45
  ### Step 4: Install Skills/Commands | 步驟 4:安裝 Skills/Commands
46
46
 
47
- The CLI automatically handles Skills/Commands installation in Step 4:
47
+ After update completes, check if Skills/Commands need installation.
48
48
 
49
- CLI 會自動處理 Skills/Commands 安裝:
49
+ 更新完成後,檢查是否需要安裝 Skills/Commands
50
50
 
51
- **With `--yes` flag (automatic):**
52
- - All missing Skills/Commands are installed automatically for configured AI tools
53
- - No additional action needed
51
+ **Check installation status:**
54
52
 
55
- 使用 `--yes` 時,會自動為所有設定的 AI 工具安裝缺少的 Skills/Commands。
53
+ 1. Read `.standards/manifest.json` to get `aiTools` list and `skills.installed` status
54
+ 2. Check if Skills are installed for each configured AI tool
55
+ 3. Check if Commands are installed for tools that support them (opencode, copilot, gemini-cli, roo-code)
56
56
 
57
- **Without `--yes` (interactive):**
58
- - CLI shows a checkbox menu to select which AI tools to install for
59
- - All options are checked by default (opt-out behavior)
57
+ **If missing Skills/Commands detected**, use AskUserQuestion:
60
58
 
61
- 不使用 `--yes` 時,CLI 會顯示 checkbox 選單讓用戶選擇要安裝的 AI 工具。
62
-
63
- **Example checkbox interface:**
64
- ```
65
- ? Select AI tools to install Skills for:
66
- ❯◉ Claude Code
67
- ◉ OpenCode
68
- ◉ GitHub Copilot
69
- ──────────────
70
- ◯ Skip Skills installation
71
- ```
59
+ | Option | Description |
60
+ |--------|-------------|
61
+ | **Install All (Recommended)** | Install Skills + Commands for all configured tools |
62
+ | **Skills Only** | Install only Skills |
63
+ | **Commands Only** | Install only Commands |
64
+ | **Skip** | Don't install at this time |
72
65
 
73
- **If CLI cannot prompt (non-TTY environment):**
66
+ **Based on user selection, execute:**
74
67
 
75
- Use AskUserQuestion and then run `uds configure`:
68
+ | Selection | Command |
69
+ |-----------|---------|
70
+ | Install All | `uds configure --type skills --ai-tool <tool>` for each tool, then `uds configure --type commands --ai-tool <tool>` |
71
+ | Skills Only | `uds configure --type skills --ai-tool <tool>` for each tool |
72
+ | Commands Only | `uds configure --type commands --ai-tool <tool>` for each tool |
73
+ | Skip | No action needed |
76
74
 
77
- | User Selection | Action |
78
- |----------------|--------|
79
- | **Install All** | `uds configure --type skills` then `uds configure --type commands` |
80
- | **Skills Only** | `uds configure --type skills` |
81
- | **Commands Only** | `uds configure --type commands` |
82
- | **Skip** | No action needed |
75
+ **Note**: The `--ai-tool` option allows non-interactive installation for specific tools.
83
76
 
84
77
  Explain the results and any next steps to the user.
85
78
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "universal-dev-standards",
3
- "version": "3.5.1-beta.12",
3
+ "version": "3.5.1-beta.13",
4
4
  "description": "CLI tool for adopting Universal Development Standards",
5
5
  "keywords": [
6
6
  "documentation",
@@ -186,13 +186,13 @@ export async function configureCommand(options) {
186
186
 
187
187
  // Handle Skills configuration
188
188
  if (configType === 'skills') {
189
- await handleSkillsConfiguration(manifest, projectPath, msg, common);
189
+ await handleSkillsConfiguration(manifest, projectPath, msg, common, options.aiTool);
190
190
  process.exit(0);
191
191
  }
192
192
 
193
193
  // Handle Commands configuration
194
194
  if (configType === 'commands') {
195
- await handleCommandsConfiguration(manifest, projectPath, msg, common);
195
+ await handleCommandsConfiguration(manifest, projectPath, msg, common, options.aiTool);
196
196
  process.exit(0);
197
197
  }
198
198
 
@@ -448,11 +448,55 @@ export async function configureCommand(options) {
448
448
 
449
449
  /**
450
450
  * Handle Skills configuration
451
+ * @param {Object} manifest - Project manifest
452
+ * @param {string} projectPath - Project path
453
+ * @param {Object} msg - i18n messages
454
+ * @param {Object} common - Common i18n messages
455
+ * @param {string} [specificTool] - Specific AI tool to install (non-interactive mode)
451
456
  */
452
- async function handleSkillsConfiguration(manifest, projectPath, msg, common) {
457
+ async function handleSkillsConfiguration(manifest, projectPath, msg, common, specificTool) {
453
458
  const inquirer = await import('inquirer');
454
459
  const aiTools = manifest.aiTools || [];
455
460
 
461
+ // Non-interactive mode: install for specific tool
462
+ if (specificTool) {
463
+ const config = getAgentConfig(specificTool);
464
+ if (!config) {
465
+ console.log(chalk.red(`Unknown AI tool: ${specificTool}`));
466
+ console.log(chalk.gray(' Available tools: claude-code, opencode, copilot, gemini-cli, roo-code, cursor, windsurf, cline, codex'));
467
+ return;
468
+ }
469
+ if (!config.supportsSkills) {
470
+ console.log(chalk.yellow(`${getAgentDisplayName(specificTool)} does not support Skills`));
471
+ return;
472
+ }
473
+
474
+ // Install to project level by default
475
+ const installations = [{ agent: specificTool, location: 'project' }];
476
+ const spinner = ora(`Installing Skills for ${getAgentDisplayName(specificTool)}...`).start();
477
+ const result = await installSkillsToMultipleAgents(installations, null, projectPath);
478
+ spinner.stop();
479
+
480
+ if (result.success) {
481
+ console.log(chalk.green(`Skills installed for ${getAgentDisplayName(specificTool)}`));
482
+ } else {
483
+ console.log(chalk.yellow('Skills installation completed with issues'));
484
+ }
485
+
486
+ // Update manifest
487
+ manifest.skills = manifest.skills || {};
488
+ manifest.skills.installations = manifest.skills.installations || [];
489
+ const existing = manifest.skills.installations.findIndex(i => i.agent === specificTool);
490
+ if (existing >= 0) {
491
+ manifest.skills.installations[existing] = installations[0];
492
+ } else {
493
+ manifest.skills.installations.push(installations[0]);
494
+ }
495
+ writeManifest(manifest, projectPath);
496
+ return;
497
+ }
498
+
499
+ // Interactive mode
456
500
  if (aiTools.length === 0) {
457
501
  console.log(chalk.yellow(msg.noAiToolsConfigured || 'No AI tools configured'));
458
502
  console.log(chalk.gray(` ${msg.addAiToolsFirst || 'Add AI tools first with: uds configure --type ai_tools'}`));
@@ -532,15 +576,55 @@ async function handleSkillsConfiguration(manifest, projectPath, msg, common) {
532
576
 
533
577
  /**
534
578
  * Handle Commands configuration
579
+ * @param {Object} manifest - Project manifest
580
+ * @param {string} projectPath - Project path
581
+ * @param {Object} msg - i18n messages
582
+ * @param {Object} common - Common i18n messages
583
+ * @param {string} [specificTool] - Specific AI tool to install (non-interactive mode)
535
584
  */
536
- async function handleCommandsConfiguration(manifest, projectPath, msg, common) {
585
+ async function handleCommandsConfiguration(manifest, projectPath, msg, common, specificTool) {
537
586
  const inquirer = await import('inquirer');
538
587
  const aiTools = manifest.aiTools || [];
539
588
 
589
+ // Non-interactive mode: install for specific tool
590
+ if (specificTool) {
591
+ const config = getAgentConfig(specificTool);
592
+ if (!config) {
593
+ console.log(chalk.red(`Unknown AI tool: ${specificTool}`));
594
+ console.log(chalk.gray(' Available tools: claude-code, opencode, copilot, gemini-cli, roo-code'));
595
+ return;
596
+ }
597
+ if (!config.supportsCommands) {
598
+ console.log(chalk.yellow(`${getAgentDisplayName(specificTool)} does not support Commands`));
599
+ console.log(chalk.gray(' Tools that support commands: OpenCode, Copilot, Roo Code, Gemini CLI'));
600
+ return;
601
+ }
602
+
603
+ const spinner = ora(`Installing Commands for ${getAgentDisplayName(specificTool)}...`).start();
604
+ const result = await installCommandsToMultipleAgents([specificTool], null, projectPath);
605
+ spinner.stop();
606
+
607
+ if (result.success) {
608
+ console.log(chalk.green(`Commands installed for ${getAgentDisplayName(specificTool)}`));
609
+ } else {
610
+ console.log(chalk.yellow('Commands installation completed with issues'));
611
+ }
612
+
613
+ // Update manifest
614
+ manifest.commands = manifest.commands || {};
615
+ manifest.commands.installations = manifest.commands.installations || [];
616
+ if (!manifest.commands.installations.includes(specificTool)) {
617
+ manifest.commands.installations.push(specificTool);
618
+ }
619
+ writeManifest(manifest, projectPath);
620
+ return;
621
+ }
622
+
623
+ // Interactive mode
540
624
  // Filter tools that support commands
541
625
  const commandSupportedTools = aiTools.filter(tool => {
542
626
  const config = getAgentConfig(tool);
543
- return config?.commands !== null;
627
+ return config?.supportsCommands;
544
628
  });
545
629
 
546
630
  if (commandSupportedTools.length === 0) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "version": "3.5.1-beta.12",
3
+ "version": "3.5.1-beta.13",
4
4
  "lastUpdated": "2026-01-15",
5
5
  "description": "Standards registry for universal-dev-standards with integrated skills and AI-optimized formats",
6
6
  "formats": {
@@ -48,14 +48,14 @@
48
48
  "standards": {
49
49
  "name": "universal-dev-standards",
50
50
  "url": "https://github.com/AsiaOstrich/universal-dev-standards",
51
- "version": "3.5.1-beta.12"
51
+ "version": "3.5.1-beta.13"
52
52
  },
53
53
  "skills": {
54
54
  "name": "universal-dev-standards",
55
55
  "url": "https://github.com/AsiaOstrich/universal-dev-standards",
56
56
  "localPath": "skills/claude-code",
57
57
  "rawUrl": "https://raw.githubusercontent.com/AsiaOstrich/universal-dev-standards/main/skills/claude-code",
58
- "version": "3.5.1-beta.12",
58
+ "version": "3.5.1-beta.13",
59
59
  "note": "Skills are now included in the main repository under skills/"
60
60
  }
61
61
  },