speccrew 0.6.68 → 0.6.69

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.
@@ -66,6 +66,16 @@
66
66
  const fs = require('fs');
67
67
  const path = require('path');
68
68
 
69
+ // Platform type to tech-stack-mappings category mapping
70
+ const PLATFORM_TYPE_TO_CATEGORY = {
71
+ 'frontend': 'web',
72
+ 'web': 'web',
73
+ 'backend': 'backend',
74
+ 'mobile': 'mobile',
75
+ 'desktop': 'desktop',
76
+ 'api': 'api'
77
+ };
78
+
69
79
  /**
70
80
  * Parse array parameter that supports both JSON format and comma-separated format.
71
81
  * JSON format: '["vue","typescript"]'
@@ -264,12 +274,15 @@ function loadTechStackConfig(platformType, framework, projectRoot) {
264
274
  const configContent = fs.readFileSync(configPath, 'utf8');
265
275
  const config = JSON.parse(configContent);
266
276
 
277
+ // Map platformType to tech-stack-mappings category
278
+ const techCategory = PLATFORM_TYPE_TO_CATEGORY[platformType] || platformType;
279
+
267
280
  // Try exact match first
268
281
  let techConfig = null;
269
282
  if (config.tech_stacks &&
270
- config.tech_stacks[platformType] &&
271
- config.tech_stacks[platformType][framework]) {
272
- techConfig = config.tech_stacks[platformType][framework];
283
+ config.tech_stacks[techCategory] &&
284
+ config.tech_stacks[techCategory][framework]) {
285
+ techConfig = config.tech_stacks[techCategory][framework];
273
286
  }
274
287
 
275
288
  // If not found, try normalized identifier (remove language prefix)
@@ -277,9 +290,9 @@ function loadTechStackConfig(platformType, framework, projectRoot) {
277
290
  const normalizedFramework = normalizeTechIdentifier(framework);
278
291
  if (normalizedFramework !== framework &&
279
292
  config.tech_stacks &&
280
- config.tech_stacks[platformType] &&
281
- config.tech_stacks[platformType][normalizedFramework]) {
282
- techConfig = config.tech_stacks[platformType][normalizedFramework];
293
+ config.tech_stacks[techCategory] &&
294
+ config.tech_stacks[techCategory][normalizedFramework]) {
295
+ techConfig = config.tech_stacks[techCategory][normalizedFramework];
283
296
  console.log(`Using normalized tech identifier: ${framework} → ${normalizedFramework}`);
284
297
  }
285
298
  }
@@ -804,25 +817,28 @@ function main() {
804
817
  const configContent = fs.readFileSync(configPath, 'utf8');
805
818
  const config = JSON.parse(configContent);
806
819
 
820
+ // Map platformType to tech-stack-mappings category
821
+ const techCategory = PLATFORM_TYPE_TO_CATEGORY[platformType] || platformType;
822
+
807
823
  // Load tech-stack-specific exclude_dirs
808
824
  let techExcludeDirs = [];
809
825
  let effectiveTechIdentifier = techIdentifier;
810
826
 
811
827
  // Try exact match first
812
828
  if (config.tech_stacks &&
813
- config.tech_stacks[platformType] &&
814
- config.tech_stacks[platformType][techIdentifier] &&
815
- config.tech_stacks[platformType][techIdentifier].exclude_dirs) {
816
- techExcludeDirs = config.tech_stacks[platformType][techIdentifier].exclude_dirs;
829
+ config.tech_stacks[techCategory] &&
830
+ config.tech_stacks[techCategory][techIdentifier] &&
831
+ config.tech_stacks[techCategory][techIdentifier].exclude_dirs) {
832
+ techExcludeDirs = config.tech_stacks[techCategory][techIdentifier].exclude_dirs;
817
833
  } else {
818
834
  // Try normalized identifier (remove language prefix like "python-fastapi" → "fastapi")
819
835
  const normalizedIdentifier = normalizeTechIdentifier(techIdentifier);
820
836
  if (normalizedIdentifier !== techIdentifier &&
821
837
  config.tech_stacks &&
822
- config.tech_stacks[platformType] &&
823
- config.tech_stacks[platformType][normalizedIdentifier] &&
824
- config.tech_stacks[platformType][normalizedIdentifier].exclude_dirs) {
825
- techExcludeDirs = config.tech_stacks[platformType][normalizedIdentifier].exclude_dirs;
838
+ config.tech_stacks[techCategory] &&
839
+ config.tech_stacks[techCategory][normalizedIdentifier] &&
840
+ config.tech_stacks[techCategory][normalizedIdentifier].exclude_dirs) {
841
+ techExcludeDirs = config.tech_stacks[techCategory][normalizedIdentifier].exclude_dirs;
826
842
  effectiveTechIdentifier = normalizedIdentifier;
827
843
  console.log(`Using normalized tech identifier for exclude_dirs: ${techIdentifier} → ${normalizedIdentifier}`);
828
844
  }
@@ -838,10 +854,10 @@ function main() {
838
854
 
839
855
  // Load tech-stack-specific exclude_file_suffixes
840
856
  if (config.tech_stacks &&
841
- config.tech_stacks[platformType] &&
842
- config.tech_stacks[platformType][effectiveTechIdentifier] &&
843
- config.tech_stacks[platformType][effectiveTechIdentifier].exclude_file_suffixes) {
844
- excludeFileSuffixes = config.tech_stacks[platformType][effectiveTechIdentifier].exclude_file_suffixes;
857
+ config.tech_stacks[techCategory] &&
858
+ config.tech_stacks[techCategory][effectiveTechIdentifier] &&
859
+ config.tech_stacks[techCategory][effectiveTechIdentifier].exclude_file_suffixes) {
860
+ excludeFileSuffixes = config.tech_stacks[techCategory][effectiveTechIdentifier].exclude_file_suffixes;
845
861
  if (excludeFileSuffixes.length > 0) {
846
862
  console.log(`Loaded exclude_file_suffixes from tech-stack-mappings.json: ${excludeFileSuffixes.join(', ')}`);
847
863
  }
@@ -849,10 +865,10 @@ function main() {
849
865
 
850
866
  // Load tech-stack-specific exclude_file_names
851
867
  if (config.tech_stacks &&
852
- config.tech_stacks[platformType] &&
853
- config.tech_stacks[platformType][effectiveTechIdentifier] &&
854
- config.tech_stacks[platformType][effectiveTechIdentifier].exclude_file_names) {
855
- excludeFileNames = config.tech_stacks[platformType][effectiveTechIdentifier].exclude_file_names;
868
+ config.tech_stacks[techCategory] &&
869
+ config.tech_stacks[techCategory][effectiveTechIdentifier] &&
870
+ config.tech_stacks[techCategory][effectiveTechIdentifier].exclude_file_names) {
871
+ excludeFileNames = config.tech_stacks[techCategory][effectiveTechIdentifier].exclude_file_names;
856
872
  if (excludeFileNames.length > 0) {
857
873
  console.log(`Loaded exclude_file_names from tech-stack-mappings.json: ${excludeFileNames.join(', ')}`);
858
874
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speccrew",
3
- "version": "0.6.68",
3
+ "version": "0.6.69",
4
4
  "description": "Spec-Driven Development toolkit for AI-powered IDEs",
5
5
  "author": "charlesmu99",
6
6
  "repository": {