universal-dev-standards 3.5.1-beta.19 → 3.5.1-beta.20

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
@@ -57,6 +57,7 @@ program
57
57
  .description('Modify options for initialized project')
58
58
  .option('-t, --type <type>', 'Option type to configure (format, workflow, merge_strategy, commit_language, test_levels, skills, commands, all)')
59
59
  .option('--ai-tool <tool>', 'Specific AI tool to configure (claude-code, opencode, copilot, etc.) - enables non-interactive mode')
60
+ .option('--skills-location <location>', 'Skills installation location (project, user) for non-interactive mode')
60
61
  .option('-y, --yes', 'Apply changes immediately without prompting')
61
62
  .option('-E, --experimental', 'Enable experimental features (methodology)')
62
63
  .action(configureCommand);
@@ -89,13 +89,26 @@ Use `--ai-tool` option to install Skills/Commands for a specific tool without pr
89
89
  使用 `--ai-tool` 選項為特定工具安裝 Skills/Commands,無需提示:
90
90
 
91
91
  ```bash
92
- # Install Skills for specific tool
92
+ # Install Skills for specific tool (project level, default)
93
93
  uds configure --type skills --ai-tool opencode
94
94
 
95
+ # Install Skills for specific tool (user level)
96
+ uds configure --type skills --ai-tool opencode --skills-location user
97
+
98
+ # Install Skills for specific tool (project level, explicit)
99
+ uds configure --type skills --ai-tool claude-code --skills-location project
100
+
95
101
  # Install Commands for specific tool
96
102
  uds configure --type commands --ai-tool copilot
97
103
  ```
98
104
 
105
+ **Skills location options | Skills 位置選項:**
106
+
107
+ | Option | Path | Description |
108
+ |--------|------|-------------|
109
+ | `project` | `.claude/skills/`, `.opencode/skill/` | Project-specific (default) |
110
+ | `user` | `~/.claude/skills/`, `~/.opencode/skill/` | Shared across all projects |
111
+
99
112
  ## Configuration Types | 設定類型
100
113
 
101
114
  | Type | Description | 說明 |
@@ -189,6 +202,7 @@ CLI 在 `manifest.declinedFeatures` 中追蹤拒絕的 Skills/Commands:
189
202
  |--------|-------------|------|
190
203
  | `--type <type>` | Configuration type | 配置類型 |
191
204
  | `--ai-tool <tool>` | Specific AI tool (non-interactive) | 特定 AI 工具(非互動式)|
205
+ | `--skills-location <loc>` | Skills install location: project, user | Skills 安裝位置 |
192
206
  | `--yes`, `-y` | Skip confirmation prompt | 跳過確認提示 |
193
207
  | `-E`, `--experimental` | Enable experimental features | 啟用實驗性功能 |
194
208
 
@@ -91,70 +91,106 @@ uds update --beta --yes
91
91
 
92
92
  ### Step 4: Check Skills/Commands Status | 步驟 4:檢查 Skills/Commands 狀態
93
93
 
94
- After update completes, the CLI automatically detects missing or outdated Skills/Commands.
94
+ After update completes, check for missing or outdated Skills/Commands using multi-stage AskUserQuestion.
95
95
 
96
- 更新完成後,CLI 會自動偵測缺少或過時的 Skills/Commands。
96
+ 更新完成後,使用多階段 AskUserQuestion 檢查缺少或過時的 Skills/Commands。
97
97
 
98
- **Important:** The CLI uses file-based detection (`getInstalledSkillsInfoForAgent`) to check actual installation status, not just manifest records.
98
+ **Important:** Since AskUserQuestion has limited options (max 4), we use a multi-stage approach to handle different AI tools and installation preferences.
99
99
 
100
- **重要:** CLI 使用檔案實際存在檢測,而非僅讀取 manifest 記錄。
100
+ **重要:** 由於 AskUserQuestion 選項有限(最多 4 個),使用多階段方式處理不同 AI 工具和安裝偏好。
101
101
 
102
- #### Handling Missing Skills | 處理缺少的 Skills
102
+ #### Step 4a: Detect Missing Skills | 步驟 4a:偵測缺少的 Skills
103
103
 
104
- If missing Skills are detected for configured AI tools, CLI shows checkbox selection:
104
+ First, read the manifest to identify configured AI tools and their Skills status:
105
105
 
106
- 如果偵測到已配置 AI 工具缺少 Skills,CLI 會顯示多選介面:
106
+ 首先讀取 manifest 來識別已配置的 AI 工具及其 Skills 狀態:
107
107
 
108
- ```
109
- Skills not yet installed for these AI tools:
110
- Claude Code
111
- OpenCode
112
-
113
- ? Select AI tools to install Skills for: (Press <space> to select)
114
- ❯ ◯ Claude Code
115
- ◯ OpenCode
116
- ──────────────
117
- ◯ Skip Skills installation
108
+ ```bash
109
+ # Read manifest to get configured AI tools
110
+ cat .standards/manifest.json
111
+ # Check existing Skills installations
112
+ ls .claude/skills/ 2>/dev/null || echo "Not installed"
113
+ ls .opencode/skill/ 2>/dev/null || echo "Not installed"
118
114
  ```
119
115
 
120
- **After tool selection, prompt for installation level:**
116
+ For each configured AI tool that supports Skills, check if Skills are installed.
121
117
 
122
- | Option | Description |
123
- |--------|-------------|
124
- | **Project level** | Install to `.claude/skills/`, `.opencode/skill/`, etc. |
125
- | **User level** | Install to `~/.claude/skills/`, `~/.opencode/skill/`, etc. |
118
+ #### Step 4b: Ask Skills Installation Preferences | 步驟 4b:詢問 Skills 安裝偏好
126
119
 
127
- #### Handling Outdated Skills | 處理過時的 Skills
120
+ If any configured AI tools are missing Skills, use AskUserQuestion with **multiSelect: true**.
128
121
 
129
- If installed Skills have older version than latest, CLI shows update prompt:
122
+ 如果有已配置的 AI 工具缺少 Skills,使用 AskUserQuestion 並設定 **multiSelect: true**。
130
123
 
131
- 如果已安裝的 Skills 版本比最新版本舊,CLI 會顯示更新提示:
124
+ **Example AskUserQuestion:**
125
+ - Question: "下列 AI 工具尚未安裝 Skills,您想安裝哪些?"
126
+ - Header: "Skills"
127
+ - multiSelect: true
128
+ - Options (based on detected missing tools, max 4):
129
+ - Option 1: "Claude Code" - "安裝 Skills 到 Claude Code"
130
+ - Option 2: "OpenCode" - "安裝 Skills 到 OpenCode"
131
+ - Option 3: "全部跳過" - "目前不安裝任何 Skills"
132
132
 
133
+ **Note:** If user selects "全部跳過", skip to Step 4d.
134
+
135
+ #### Step 4c: Ask Skills Installation Location | 步驟 4c:詢問 Skills 安裝位置
136
+
137
+ If user selected tools in Step 4b, ask for installation location:
138
+
139
+ 如果用戶在步驟 4b 選擇了工具,詢問安裝位置:
140
+
141
+ **Example AskUserQuestion:**
142
+ - Question: "Skills 要安裝到哪個層級?"
143
+ - Header: "位置"
144
+ - multiSelect: false
145
+ - Options:
146
+ - Option 1: "專案層級 (建議)" - "安裝到 .claude/skills/、.opencode/skill/ 等(僅此專案可用)"
147
+ - Option 2: "用戶層級" - "安裝到 ~/.claude/skills/、~/.opencode/skill/ 等(所有專案共用)"
148
+
149
+ **Execute installation for each selected tool:**
150
+
151
+ ```bash
152
+ # For each selected tool, run configure command with --skills-location
153
+ uds configure --type skills --ai-tool claude-code --skills-location project
154
+ uds configure --type skills --ai-tool opencode --skills-location user
133
155
  ```
134
- Skills updates available for these AI tools:
135
- • Claude Code (project: .claude/skills/)
136
- 3.4.0 → 3.5.1
137
-
138
- ? Select AI tools to update Skills for: (Press <space> to select)
139
- ❯ ◉ Claude Code (project) 3.4.0 → 3.5.1
140
- ──────────────
141
- ◯ Skip Skills update
142
- ```
143
156
 
144
- #### Handling Missing Commands | 處理缺少的 Commands
157
+ #### Step 4d: Detect Missing Commands | 步驟 4d:偵測缺少的 Commands
158
+
159
+ Check for configured AI tools that support Commands but don't have them installed:
145
160
 
146
- Similar checkbox selection for Commands:
161
+ 檢查已配置但尚未安裝 Commands AI 工具:
147
162
 
163
+ ```bash
164
+ # Check existing Commands installations
165
+ ls .opencode/commands/ 2>/dev/null || echo "Not installed"
166
+ ls .github/commands/ 2>/dev/null || echo "Not installed"
148
167
  ```
149
- Slash commands not yet installed for these AI tools:
150
- OpenCode .opencode/commands/
151
- GitHub Copilot → .github/commands/
152
-
153
- ? Select AI tools to install Commands for: (Press <space> to select)
154
- OpenCode (.opencode/commands/)
155
- ◉ GitHub Copilot (.github/commands/)
156
- ──────────────
157
- ◯ Skip Commands installation
168
+
169
+ **Note:** Not all AI tools support Commands. Tools that support Commands:
170
+ - OpenCode (.opencode/commands/)
171
+ - GitHub Copilot (.github/commands/)
172
+ - Roo Code (.roo/commands/)
173
+ - Gemini CLI (.gemini/commands/)
174
+
175
+ #### Step 4e: Ask Commands Installation | 步驟 4e:詢問 Commands 安裝
176
+
177
+ If any configured AI tools are missing Commands, use AskUserQuestion:
178
+
179
+ **Example AskUserQuestion:**
180
+ - Question: "下列 AI 工具尚未安裝 Commands,您想安裝哪些?"
181
+ - Header: "Commands"
182
+ - multiSelect: true
183
+ - Options (based on detected missing tools):
184
+ - Option 1: "OpenCode" - "安裝 Commands 到 .opencode/commands/"
185
+ - Option 2: "GitHub Copilot" - "安裝 Commands 到 .github/commands/"
186
+ - Option 3: "全部跳過" - "目前不安裝任何 Commands"
187
+
188
+ **Execute installation for each selected tool:**
189
+
190
+ ```bash
191
+ # For each selected tool, run configure command
192
+ uds configure --type commands --ai-tool opencode
193
+ uds configure --type commands --ai-tool copilot
158
194
  ```
159
195
 
160
196
  #### Declined Features Handling | 拒絕功能處理
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "universal-dev-standards",
3
- "version": "3.5.1-beta.19",
3
+ "version": "3.5.1-beta.20",
4
4
  "description": "CLI tool for adopting Universal Development Standards",
5
5
  "keywords": [
6
6
  "documentation",
@@ -188,7 +188,7 @@ export async function configureCommand(options) {
188
188
 
189
189
  // Handle Skills configuration
190
190
  if (configType === 'skills') {
191
- await handleSkillsConfiguration(manifest, projectPath, msg, common, options.aiTool);
191
+ await handleSkillsConfiguration(manifest, projectPath, msg, common, options.aiTool, options.skillsLocation);
192
192
  process.exit(0);
193
193
  }
194
194
 
@@ -513,8 +513,9 @@ export async function configureCommand(options) {
513
513
  * @param {Object} msg - i18n messages
514
514
  * @param {Object} common - Common i18n messages
515
515
  * @param {string} [specificTool] - Specific AI tool to install (non-interactive mode)
516
+ * @param {string} [skillsLocation] - Skills installation location (project, user) for non-interactive mode
516
517
  */
517
- async function handleSkillsConfiguration(manifest, projectPath, msg, common, specificTool) {
518
+ async function handleSkillsConfiguration(manifest, projectPath, msg, common, specificTool, skillsLocation) {
518
519
  const inquirer = await import('inquirer');
519
520
  const aiTools = manifest.aiTools || [];
520
521
 
@@ -531,9 +532,13 @@ async function handleSkillsConfiguration(manifest, projectPath, msg, common, spe
531
532
  return;
532
533
  }
533
534
 
534
- // Install to project level by default
535
- const installations = [{ agent: specificTool, location: 'project' }];
536
- const spinner = ora(`Installing Skills for ${getAgentDisplayName(specificTool)}...`).start();
535
+ // Validate skillsLocation if provided
536
+ const validLocations = ['project', 'user'];
537
+ const location = skillsLocation && validLocations.includes(skillsLocation) ? skillsLocation : 'project';
538
+
539
+ // Install to specified level (defaults to project)
540
+ const installations = [{ agent: specificTool, location }];
541
+ const spinner = ora(`Installing Skills for ${getAgentDisplayName(specificTool)} (${location} level)...`).start();
537
542
  const result = await installSkillsToMultipleAgents(installations, null, projectPath);
538
543
  spinner.stop();
539
544
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "version": "3.5.1-beta.19",
3
+ "version": "3.5.1-beta.20",
4
4
  "lastUpdated": "2026-01-19",
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.19"
51
+ "version": "3.5.1-beta.20"
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.19",
58
+ "version": "3.5.1-beta.20",
59
59
  "note": "Skills are now included in the main repository under skills/"
60
60
  }
61
61
  },