create-sdd-project 0.9.6 → 0.9.7

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/lib/config.js CHANGED
@@ -103,6 +103,11 @@ const TEMPLATE_AGENTS = [
103
103
  'qa-engineer.md',
104
104
  ];
105
105
 
106
+ // Template-provided command files (for upgrade: detect custom commands)
107
+ const TEMPLATE_COMMANDS = [
108
+ 'review-plan.md',
109
+ ];
110
+
106
111
  module.exports = {
107
112
  DEFAULTS,
108
113
  PROJECT_TYPES,
@@ -114,4 +119,5 @@ module.exports = {
114
119
  FRONTEND_AGENTS,
115
120
  BACKEND_AGENTS,
116
121
  TEMPLATE_AGENTS,
122
+ TEMPLATE_COMMANDS,
117
123
  };
@@ -7,6 +7,7 @@ const {
7
7
  FRONTEND_AGENTS,
8
8
  BACKEND_AGENTS,
9
9
  TEMPLATE_AGENTS,
10
+ TEMPLATE_COMMANDS,
10
11
  } = require('./config');
11
12
  const { adaptAgentContentForProjectType } = require('./adapt-agents');
12
13
  const {
@@ -110,7 +111,7 @@ function collectCustomAgents(dest) {
110
111
  }
111
112
 
112
113
  /**
113
- * Find custom command files (not .gitkeep).
114
+ * Find custom command files (not .gitkeep, not template-owned).
114
115
  * Returns array of { relativePath, content } objects.
115
116
  */
116
117
  function collectCustomCommands(dest) {
@@ -120,6 +121,7 @@ function collectCustomCommands(dest) {
120
121
  const files = fs.readdirSync(commandsDir);
121
122
  for (const file of files) {
122
123
  if (file === '.gitkeep') continue;
124
+ if (TEMPLATE_COMMANDS.includes(file)) continue;
123
125
  customs.push({
124
126
  relativePath: path.join('.claude', 'commands', file),
125
127
  content: fs.readFileSync(path.join(commandsDir, file), 'utf8'),
@@ -239,14 +241,12 @@ function generateUpgrade(config) {
239
241
  const srcSub = path.join(templateToolDir, sub);
240
242
  const destSub = path.join(base, sub);
241
243
  if (fs.existsSync(srcSub)) {
242
- // For .claude/commands, merge: copy new template files without overwriting user's custom commands
244
+ // For .claude/commands, merge: overwrite SDD template commands, preserve user's custom commands
243
245
  if (dir === '.claude' && sub === 'commands') {
244
246
  fs.mkdirSync(destSub, { recursive: true });
245
247
  for (const file of fs.readdirSync(srcSub)) {
246
- const destFile = path.join(destSub, file);
247
- if (!fs.existsSync(destFile)) {
248
- fs.cpSync(path.join(srcSub, file), destFile);
249
- }
248
+ // Always overwrite template-owned files (they may have been updated)
249
+ fs.cpSync(path.join(srcSub, file), path.join(destSub, file));
250
250
  }
251
251
  } else {
252
252
  fs.cpSync(srcSub, destSub, { recursive: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-sdd-project",
3
- "version": "0.9.6",
3
+ "version": "0.9.7",
4
4
  "description": "Create a new SDD DevFlow project with AI-assisted development workflow",
5
5
  "bin": {
6
6
  "create-sdd-project": "bin/cli.js"