sdd-full 1.5.0 → 1.5.2

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.js CHANGED
@@ -6,17 +6,30 @@ const fs = require('fs');
6
6
  const path = require('path');
7
7
 
8
8
  const SDD = {
9
- version: '1.5.0',
9
+ version: '1.5.2',
10
10
  name: 'sdd-full',
11
11
  description: '完整的软件设计开发技能包'
12
12
  };
13
13
 
14
+ let VERBOSE = false;
15
+
16
+ function debug(msg) {
17
+ if (VERBOSE) {
18
+ console.log(`[DEBUG] ${msg}`);
19
+ }
20
+ }
21
+
14
22
  function copyDirectory(src, dest) {
23
+ debug(`copyDirectory: ${src} -> ${dest}`);
24
+
15
25
  if (!fs.existsSync(dest)) {
26
+ debug(`创建目录: ${dest}`);
16
27
  fs.mkdirSync(dest, { recursive: true });
17
28
  }
18
29
 
19
30
  const items = fs.readdirSync(src);
31
+ debug(`源目录内容: ${items.length} 项`);
32
+
20
33
  items.forEach(item => {
21
34
  const srcPath = path.join(src, item);
22
35
  const destPath = path.join(dest, item);
@@ -25,6 +38,7 @@ function copyDirectory(src, dest) {
25
38
  if (stat.isDirectory()) {
26
39
  copyDirectory(srcPath, destPath);
27
40
  } else {
41
+ debug(`复制文件: ${item}`);
28
42
  fs.copyFileSync(srcPath, destPath);
29
43
  }
30
44
  });
@@ -32,6 +46,9 @@ function copyDirectory(src, dest) {
32
46
 
33
47
  function getSkills() {
34
48
  const skillsDir = path.join(__dirname, 'skills');
49
+ debug(`技能目录: ${skillsDir}`);
50
+ debug(`技能目录存在: ${fs.existsSync(skillsDir)}`);
51
+
35
52
  const skills = [];
36
53
 
37
54
  if (fs.existsSync(skillsDir)) {
@@ -50,11 +67,14 @@ function getSkills() {
50
67
  });
51
68
  }
52
69
 
70
+ debug(`找到技能: ${skills.length} 个`);
53
71
  return skills;
54
72
  }
55
73
 
56
74
  function install(targetDir, environment) {
57
75
  const baseDir = targetDir || process.cwd();
76
+ debug(`安装基准目录: ${baseDir}`);
77
+ debug(`环境: ${environment}`);
58
78
 
59
79
  console.log('========================================');
60
80
  console.log(` ${SDD.name} - ${SDD.description}`);
@@ -62,6 +82,8 @@ function install(targetDir, environment) {
62
82
  console.log('========================================');
63
83
 
64
84
  const sourceDir = path.join(__dirname, 'skills');
85
+ debug(`技能源目录: ${sourceDir}`);
86
+ debug(`技能源目录存在: ${fs.existsSync(sourceDir)}`);
65
87
 
66
88
  // 根据环境选择安装目录
67
89
  let dirsToInstall;
@@ -87,16 +109,19 @@ function install(targetDir, environment) {
87
109
 
88
110
  dirsToInstall.forEach(dirInfo => {
89
111
  const destDir = dirInfo.path;
112
+ debug(`安装目标: ${dirInfo.name} -> ${destDir}`);
90
113
 
91
114
  console.log(`\n正在安装到: ${dirInfo.name} (${destDir})`);
92
115
 
93
116
  if (!fs.existsSync(destDir)) {
117
+ debug(`创建目标目录: ${destDir}`);
94
118
  fs.mkdirSync(destDir, { recursive: true });
95
119
  }
96
120
 
97
121
  let count = 0;
98
122
  if (fs.existsSync(sourceDir)) {
99
123
  const items = fs.readdirSync(sourceDir);
124
+ debug(`源目录内容: ${items.join(', ')}`);
100
125
 
101
126
  items.forEach(item => {
102
127
  const srcItem = path.join(sourceDir, item);
@@ -104,9 +129,11 @@ function install(targetDir, environment) {
104
129
  const stat = fs.statSync(srcItem);
105
130
 
106
131
  if (stat.isDirectory()) {
132
+ debug(`复制目录: ${item}`);
107
133
  copyDirectory(srcItem, destItem);
108
134
  count++;
109
135
  } else if (stat.isFile() && item.endsWith('.md')) {
136
+ debug(`复制文件: ${item}`);
110
137
  fs.copyFileSync(srcItem, destItem);
111
138
  }
112
139
  });
@@ -114,6 +141,13 @@ function install(targetDir, environment) {
114
141
 
115
142
  totalCount += count;
116
143
  console.log(` ✅ ${count} 个技能`);
144
+
145
+ // 验证安装结果
146
+ if (fs.existsSync(destDir)) {
147
+ const installedItems = fs.readdirSync(destDir);
148
+ debug(`目标目录内容: ${installedItems.join(', ')}`);
149
+ console.log(` 📁 已安装内容: ${installedItems.length} 项`);
150
+ }
117
151
  });
118
152
 
119
153
  console.log('\n========================================');
@@ -122,6 +156,7 @@ function install(targetDir, environment) {
122
156
  console.log('\n现在您可以在以下环境中使用这些技能:');
123
157
  dirsToInstall.forEach(dirInfo => {
124
158
  console.log(` - ${dirInfo.name}`);
159
+ console.log(` 位置: ${dirInfo.path}`);
125
160
  });
126
161
  console.log('\n🎉 开始使用吧!\n');
127
162
  }
@@ -130,6 +165,15 @@ function install(targetDir, environment) {
130
165
  function main() {
131
166
  const args = process.argv.slice(2);
132
167
 
168
+ // 检查是否启用 verbose
169
+ VERBOSE = args.some(arg => arg === '--verbose' || arg === '-v');
170
+ if (VERBOSE) {
171
+ debug(`Verbose 模式已启用`);
172
+ debug(`工作目录: ${process.cwd()}`);
173
+ debug(`__dirname: ${__dirname}`);
174
+ debug(`命令行参数: ${args.join(', ')}`);
175
+ }
176
+
133
177
  // 检查是否需要显示帮助
134
178
  const showHelp = args.some(arg => arg === '--help' || arg === '-h');
135
179
 
@@ -144,6 +188,7 @@ function main() {
144
188
  console.log(' npx sdd-full all - 安装到所有环境');
145
189
  console.log(' npx sdd-full --help - 显示帮助');
146
190
  console.log(' npx sdd-full --dir ./myproj - 安装到指定目录');
191
+ console.log(' npx sdd-full --verbose - 显示详细调试信息');
147
192
 
148
193
  const skills = getSkills();
149
194
  console.log('\n可用技能:');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdd-full",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "SDD Full - 完整的软件设计开发技能包",
5
5
  "main": "index.js",
6
6
  "bin": "./bin.js",
package/skills/README.md CHANGED
@@ -69,7 +69,27 @@
69
69
  - requesting-code-review - 请求代码审查
70
70
  - receiving-code-review - 接收代码审查
71
71
 
72
+ ## 快速安装
73
+ ### 使用npm包安装(推荐)
74
+ ```bash
75
+ # 默认安装到Trae环境
76
+ npx sdd-full
77
+
78
+ # 安装到Claude Code
79
+ npx sdd-full cc
80
+
81
+ # 安装到所有环境
82
+ npx sdd-full all
83
+
84
+ # 查看帮助
85
+ npx sdd-full --help
86
+
87
+ # 显示详细信息
88
+ npx sdd-full --verbose
89
+ ```
90
+
72
91
  ## 更新日志
73
92
 
93
+ - 2026-05-05: 发布到npm包,新增npx安装方式,支持Trae/Trae-cn/Claude Code多环境安装
74
94
  - 2026-05-04: 更新技能列表,匹配当前实际存在的技能
75
95
  - 2024-05-04: 创建目录索引,整理技能文档
@@ -345,5 +345,6 @@ systematic-debugging → sdd-add → verification-before-completion → quality-
345
345
  ---
346
346
 
347
347
  ## 更新日志
348
+ - v3.0(2026-05-05):发布到npm包,新增npx安装方式,支持Trae/Trae-cn/Claude Code多环境安装
348
349
  - v2.0(2026-05-04):更新技能列表,匹配当前实际存在的技能
349
350
  - v1.0(2024-05-04):初始版本,完整流程定义
@@ -239,6 +239,7 @@
239
239
  ---
240
240
 
241
241
  ## 更新日志
242
+ - v4.0(2026-05-05):发布到npm包,新增npx安装方式,支持Trae/Trae-cn/Claude Code多环境安装
242
243
  - v3.0(2026-05-04):更新技能列表,标记为已完整
243
244
  - v2.0(2024-05-04):重构为个人开发版
244
245
  - v1.0(2024-05-04):初始版本
@@ -220,6 +220,7 @@ A:看「技能决策树.md」文档,按场景快速选择。
220
220
  ---
221
221
 
222
222
  ## 更新日志
223
+ - v4.0(2026-05-05):发布到npm包,新增npx安装方式,支持Trae/Trae-cn/Claude Code多环境安装
223
224
  - v3.0(2026-05-04):更新技能列表,匹配当前实际存在的技能
224
225
  - v2.0(2024-05-04):重构为个人开发版,去掉团队协作内容,完善sdd-code说明
225
226
  - v1.0(2024-05-04):初始版本
@@ -230,6 +230,7 @@ claudeception → mempalace-auto-saver
230
230
  ---
231
231
 
232
232
  ## 更新日志
233
+ - v4.0(2026-05-05):发布到npm包,新增npx安装方式,支持Trae/Trae-cn/Claude Code多环境安装
233
234
  - v3.0(2026-05-04):更新技能列表,匹配当前实际存在的技能
234
235
  - v2.0(2024-05-04):重构为个人开发版,去掉团队协作内容,新增更多技能选项
235
236
  - v1.0(2024-05-04):初始版本