specweave 0.34.5 → 0.34.8

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.
Files changed (181) hide show
  1. package/bin/fix-marketplace-errors.sh +55 -7
  2. package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts.map +1 -1
  3. package/dist/plugins/specweave-github/lib/github-feature-sync.js +3 -1
  4. package/dist/plugins/specweave-github/lib/github-feature-sync.js.map +1 -1
  5. package/dist/plugins/specweave-github/lib/github-spec-sync.js +1 -1
  6. package/dist/plugins/specweave-github/lib/github-spec-sync.js.map +1 -1
  7. package/dist/src/cli/commands/import-docs.d.ts +3 -0
  8. package/dist/src/cli/commands/import-docs.d.ts.map +1 -1
  9. package/dist/src/cli/commands/import-docs.js +110 -91
  10. package/dist/src/cli/commands/import-docs.js.map +1 -1
  11. package/dist/src/cli/commands/init.d.ts.map +1 -1
  12. package/dist/src/cli/commands/init.js +16 -7
  13. package/dist/src/cli/commands/init.js.map +1 -1
  14. package/dist/src/cli/commands/living-docs.js +4 -4
  15. package/dist/src/cli/commands/living-docs.js.map +1 -1
  16. package/dist/src/cli/commands/sync-spec-commits.js +1 -1
  17. package/dist/src/cli/commands/sync-spec-commits.js.map +1 -1
  18. package/dist/src/cli/commands/sync-spec-content.js +1 -1
  19. package/dist/src/cli/commands/sync-spec-content.js.map +1 -1
  20. package/dist/src/cli/helpers/github/increment-profile-selector.js +1 -1
  21. package/dist/src/cli/helpers/github/increment-profile-selector.js.map +1 -1
  22. package/dist/src/cli/helpers/github/profile-manager.d.ts +5 -5
  23. package/dist/src/cli/helpers/github/profile-manager.d.ts.map +1 -1
  24. package/dist/src/cli/helpers/github/profile-manager.js +24 -24
  25. package/dist/src/cli/helpers/github/profile-manager.js.map +1 -1
  26. package/dist/src/cli/helpers/init/brownfield-analysis.js +15 -15
  27. package/dist/src/cli/helpers/init/brownfield-analysis.js.map +1 -1
  28. package/dist/src/cli/helpers/init/config-detection.js +1 -1
  29. package/dist/src/cli/helpers/init/config-detection.js.map +1 -1
  30. package/dist/src/cli/helpers/init/living-docs-preflight.js +7 -7
  31. package/dist/src/cli/helpers/init/living-docs-preflight.js.map +1 -1
  32. package/dist/src/cli/helpers/init/plugin-installer.d.ts.map +1 -1
  33. package/dist/src/cli/helpers/init/plugin-installer.js +61 -9
  34. package/dist/src/cli/helpers/init/plugin-installer.js.map +1 -1
  35. package/dist/src/cli/helpers/init/sync-profile-helpers.d.ts.map +1 -1
  36. package/dist/src/cli/helpers/init/sync-profile-helpers.js +2 -4
  37. package/dist/src/cli/helpers/init/sync-profile-helpers.js.map +1 -1
  38. package/dist/src/cli/helpers/issue-tracker/ado-area-selection.d.ts +1 -4
  39. package/dist/src/cli/helpers/issue-tracker/ado-area-selection.d.ts.map +1 -1
  40. package/dist/src/cli/helpers/issue-tracker/ado-area-selection.js +0 -32
  41. package/dist/src/cli/helpers/issue-tracker/ado-area-selection.js.map +1 -1
  42. package/dist/src/cli/helpers/issue-tracker/ado.d.ts.map +1 -1
  43. package/dist/src/cli/helpers/issue-tracker/ado.js +3 -13
  44. package/dist/src/cli/helpers/issue-tracker/ado.js.map +1 -1
  45. package/dist/src/cli/helpers/issue-tracker/index.d.ts.map +1 -1
  46. package/dist/src/cli/helpers/issue-tracker/index.js +0 -1
  47. package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -1
  48. package/dist/src/cli/helpers/issue-tracker/sync-config-writer.d.ts.map +1 -1
  49. package/dist/src/cli/helpers/issue-tracker/sync-config-writer.js +0 -7
  50. package/dist/src/cli/helpers/issue-tracker/sync-config-writer.js.map +1 -1
  51. package/dist/src/cli/helpers/issue-tracker/types.d.ts +1 -5
  52. package/dist/src/cli/helpers/issue-tracker/types.d.ts.map +1 -1
  53. package/dist/src/cli/helpers/issue-tracker/types.js.map +1 -1
  54. package/dist/src/cli/workers/import-worker.js +5 -111
  55. package/dist/src/cli/workers/import-worker.js.map +1 -1
  56. package/dist/src/core/background/types.d.ts +3 -0
  57. package/dist/src/core/background/types.d.ts.map +1 -1
  58. package/dist/src/core/config/types.d.ts +0 -5
  59. package/dist/src/core/config/types.d.ts.map +1 -1
  60. package/dist/src/core/config/types.js.map +1 -1
  61. package/dist/src/core/increment/increment-archiver.d.ts.map +1 -1
  62. package/dist/src/core/increment/increment-archiver.js +0 -6
  63. package/dist/src/core/increment/increment-archiver.js.map +1 -1
  64. package/dist/src/core/increment/increment-utils.d.ts +0 -4
  65. package/dist/src/core/increment/increment-utils.d.ts.map +1 -1
  66. package/dist/src/core/increment/increment-utils.js +0 -6
  67. package/dist/src/core/increment/increment-utils.js.map +1 -1
  68. package/dist/src/core/living-docs/cross-project-sync.d.ts +0 -13
  69. package/dist/src/core/living-docs/cross-project-sync.d.ts.map +1 -1
  70. package/dist/src/core/living-docs/cross-project-sync.js +0 -25
  71. package/dist/src/core/living-docs/cross-project-sync.js.map +1 -1
  72. package/dist/src/core/living-docs/delivery/delivery-generator.d.ts +58 -0
  73. package/dist/src/core/living-docs/delivery/delivery-generator.d.ts.map +1 -0
  74. package/dist/src/core/living-docs/delivery/delivery-generator.js +501 -0
  75. package/dist/src/core/living-docs/delivery/delivery-generator.js.map +1 -0
  76. package/dist/src/core/living-docs/delivery/index.d.ts +8 -0
  77. package/dist/src/core/living-docs/delivery/index.d.ts.map +1 -0
  78. package/dist/src/core/living-docs/delivery/index.js +7 -0
  79. package/dist/src/core/living-docs/delivery/index.js.map +1 -0
  80. package/dist/src/core/living-docs/diagrams/index.d.ts +8 -0
  81. package/dist/src/core/living-docs/diagrams/index.d.ts.map +1 -0
  82. package/dist/src/core/living-docs/diagrams/index.js +7 -0
  83. package/dist/src/core/living-docs/diagrams/index.js.map +1 -0
  84. package/dist/src/core/living-docs/diagrams/mermaid-generator.d.ts +103 -0
  85. package/dist/src/core/living-docs/diagrams/mermaid-generator.d.ts.map +1 -0
  86. package/dist/src/core/living-docs/diagrams/mermaid-generator.js +515 -0
  87. package/dist/src/core/living-docs/diagrams/mermaid-generator.js.map +1 -0
  88. package/dist/src/core/living-docs/enterprise/enterprise-generator.d.ts +85 -0
  89. package/dist/src/core/living-docs/enterprise/enterprise-generator.d.ts.map +1 -0
  90. package/dist/src/core/living-docs/enterprise/enterprise-generator.js +556 -0
  91. package/dist/src/core/living-docs/enterprise/enterprise-generator.js.map +1 -0
  92. package/dist/src/core/living-docs/enterprise/history-analyzer.d.ts +91 -0
  93. package/dist/src/core/living-docs/enterprise/history-analyzer.d.ts.map +1 -0
  94. package/dist/src/core/living-docs/enterprise/history-analyzer.js +321 -0
  95. package/dist/src/core/living-docs/enterprise/history-analyzer.js.map +1 -0
  96. package/dist/src/core/living-docs/enterprise/index.d.ts +18 -0
  97. package/dist/src/core/living-docs/enterprise/index.d.ts.map +1 -0
  98. package/dist/src/core/living-docs/enterprise/index.js +14 -0
  99. package/dist/src/core/living-docs/enterprise/index.js.map +1 -0
  100. package/dist/src/core/living-docs/enterprise/relationship-mapper.d.ts +58 -0
  101. package/dist/src/core/living-docs/enterprise/relationship-mapper.d.ts.map +1 -0
  102. package/dist/src/core/living-docs/enterprise/relationship-mapper.js +227 -0
  103. package/dist/src/core/living-docs/enterprise/relationship-mapper.js.map +1 -0
  104. package/dist/src/core/living-docs/enterprise/spec-loader.d.ts +161 -0
  105. package/dist/src/core/living-docs/enterprise/spec-loader.d.ts.map +1 -0
  106. package/dist/src/core/living-docs/enterprise/spec-loader.js +470 -0
  107. package/dist/src/core/living-docs/enterprise/spec-loader.js.map +1 -0
  108. package/dist/src/core/living-docs/intelligent-analyzer/inconsistency-detector.d.ts +31 -1
  109. package/dist/src/core/living-docs/intelligent-analyzer/inconsistency-detector.d.ts.map +1 -1
  110. package/dist/src/core/living-docs/intelligent-analyzer/inconsistency-detector.js +626 -14
  111. package/dist/src/core/living-docs/intelligent-analyzer/inconsistency-detector.js.map +1 -1
  112. package/dist/src/core/living-docs/intelligent-analyzer/index.d.ts +8 -0
  113. package/dist/src/core/living-docs/intelligent-analyzer/index.d.ts.map +1 -1
  114. package/dist/src/core/living-docs/intelligent-analyzer/index.js +87 -4
  115. package/dist/src/core/living-docs/intelligent-analyzer/index.js.map +1 -1
  116. package/dist/src/core/living-docs/intelligent-analyzer/types.d.ts +3 -1
  117. package/dist/src/core/living-docs/intelligent-analyzer/types.d.ts.map +1 -1
  118. package/dist/src/core/living-docs/living-docs-sync.js +1 -1
  119. package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
  120. package/dist/src/core/living-docs/operations/index.d.ts +8 -0
  121. package/dist/src/core/living-docs/operations/index.d.ts.map +1 -0
  122. package/dist/src/core/living-docs/operations/index.js +7 -0
  123. package/dist/src/core/living-docs/operations/index.js.map +1 -0
  124. package/dist/src/core/living-docs/operations/ops-generator.d.ts +53 -0
  125. package/dist/src/core/living-docs/operations/ops-generator.d.ts.map +1 -0
  126. package/dist/src/core/living-docs/operations/ops-generator.js +462 -0
  127. package/dist/src/core/living-docs/operations/ops-generator.js.map +1 -0
  128. package/dist/src/core/project/project-manager.d.ts +0 -20
  129. package/dist/src/core/project/project-manager.d.ts.map +1 -1
  130. package/dist/src/core/project/project-manager.js +0 -49
  131. package/dist/src/core/project/project-manager.js.map +1 -1
  132. package/dist/src/core/repo-structure/prompt-consolidator.d.ts +0 -8
  133. package/dist/src/core/repo-structure/prompt-consolidator.d.ts.map +1 -1
  134. package/dist/src/core/repo-structure/prompt-consolidator.js +0 -28
  135. package/dist/src/core/repo-structure/prompt-consolidator.js.map +1 -1
  136. package/dist/src/core/sync/profile-manager.d.ts +5 -5
  137. package/dist/src/core/sync/profile-manager.d.ts.map +1 -1
  138. package/dist/src/core/sync/profile-manager.js +17 -17
  139. package/dist/src/core/sync/profile-manager.js.map +1 -1
  140. package/dist/src/core/types/sync-profile.d.ts +3 -20
  141. package/dist/src/core/types/sync-profile.d.ts.map +1 -1
  142. package/dist/src/core/types/sync-profile.js +4 -10
  143. package/dist/src/core/types/sync-profile.js.map +1 -1
  144. package/dist/src/integrations/ado/ado-client-factory.d.ts +2 -2
  145. package/dist/src/integrations/ado/ado-client-factory.js +2 -2
  146. package/dist/src/utils/project-detection.d.ts +16 -16
  147. package/dist/src/utils/project-detection.d.ts.map +1 -1
  148. package/dist/src/utils/project-detection.js +39 -39
  149. package/dist/src/utils/project-detection.js.map +1 -1
  150. package/dist/src/utils/validators/ado-validator.d.ts +0 -5
  151. package/dist/src/utils/validators/ado-validator.d.ts.map +1 -1
  152. package/dist/src/utils/validators/ado-validator.js +0 -23
  153. package/dist/src/utils/validators/ado-validator.js.map +1 -1
  154. package/package.json +1 -1
  155. package/plugins/specweave/commands/living-docs.md +168 -39
  156. package/plugins/specweave-github/lib/github-feature-sync.js +1 -1
  157. package/plugins/specweave-github/lib/github-feature-sync.ts +3 -1
  158. package/plugins/specweave-github/lib/github-spec-sync.js +1 -1
  159. package/plugins/specweave-github/lib/github-spec-sync.ts +1 -1
  160. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.d.ts +0 -45
  161. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.d.ts.map +0 -1
  162. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js +0 -247
  163. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js.map +0 -1
  164. package/dist/src/core/brownfield/analyzer.d.ts +0 -86
  165. package/dist/src/core/brownfield/analyzer.d.ts.map +0 -1
  166. package/dist/src/core/brownfield/analyzer.js +0 -365
  167. package/dist/src/core/brownfield/analyzer.js.map +0 -1
  168. package/dist/src/core/brownfield/importer.d.ts +0 -76
  169. package/dist/src/core/brownfield/importer.d.ts.map +0 -1
  170. package/dist/src/core/brownfield/importer.js +0 -287
  171. package/dist/src/core/brownfield/importer.js.map +0 -1
  172. package/dist/src/utils/env-multi-project-parser.d.ts +0 -237
  173. package/dist/src/utils/env-multi-project-parser.d.ts.map +0 -1
  174. package/dist/src/utils/env-multi-project-parser.js +0 -426
  175. package/dist/src/utils/env-multi-project-parser.js.map +0 -1
  176. package/plugins/specweave-github/lib/github-sync-bidirectional.d.js +0 -0
  177. package/plugins/specweave-github/lib/github-sync-bidirectional.d.ts +0 -36
  178. package/plugins/specweave-github/lib/github-sync-bidirectional.d.ts.map +0 -1
  179. package/plugins/specweave-github/lib/github-sync-bidirectional.js +0 -206
  180. package/plugins/specweave-github/lib/github-sync-bidirectional.js.map +0 -1
  181. package/plugins/specweave-github/lib/github-sync-bidirectional.ts +0 -362
@@ -1,287 +0,0 @@
1
- /**
2
- * Brownfield Importer - Import External Documentation
3
- *
4
- * Imports brownfield documentation from Notion, Confluence, Wiki, etc.
5
- * Classifies files and copies to appropriate destinations
6
- */
7
- import path from 'path';
8
- import * as fs from '../../utils/fs-native.js';
9
- import { BrownfieldAnalyzer } from './analyzer.js';
10
- import { ProjectManager } from '../project/project-manager.js';
11
- import { ConfigManager } from '../config-manager.js';
12
- export class BrownfieldImporter {
13
- constructor(projectRoot) {
14
- this.projectRoot = projectRoot;
15
- this.analyzer = new BrownfieldAnalyzer();
16
- this.projectManager = new ProjectManager(projectRoot);
17
- this.configManager = new ConfigManager(projectRoot);
18
- }
19
- /**
20
- * Import brownfield docs
21
- *
22
- * @param options - Import options
23
- * @returns ImportReport
24
- */
25
- async import(options) {
26
- console.log(`\n🔍 Analyzing ${options.sourcePath}...`);
27
- // Validate source path
28
- if (!(await fs.pathExists(options.sourcePath))) {
29
- throw new Error(`Source path does not exist: ${options.sourcePath}`);
30
- }
31
- // Validate project exists
32
- const project = this.projectManager.getProjectById(options.project);
33
- if (!project) {
34
- throw new Error(`Project '${options.project}' not found. Create it first with /sw:init-multiproject`);
35
- }
36
- // 1. Analyze files
37
- const analysis = await this.analyzer.analyze(options.sourcePath);
38
- if (analysis.totalFiles === 0) {
39
- throw new Error('No markdown files found in source directory');
40
- }
41
- console.log(`\n📊 Analysis Results:`);
42
- console.log(` Total files: ${analysis.totalFiles}`);
43
- console.log(` - Specs: ${analysis.specs.length} (${(analysis.statistics.specsConfidence * 100).toFixed(0)}% avg confidence)`);
44
- console.log(` - Modules: ${analysis.modules.length} (${(analysis.statistics.modulesConfidence * 100).toFixed(0)}% avg confidence)`);
45
- console.log(` - Team docs: ${analysis.team.length} (${(analysis.statistics.teamConfidence * 100).toFixed(0)}% avg confidence)`);
46
- console.log(` - Legacy: ${analysis.legacy.length}\n`);
47
- // Dry run mode - just show analysis
48
- if (options.dryRun) {
49
- console.log('🔍 Dry run mode - no files will be imported\n');
50
- const report = this.analyzer.generateSummaryReport(analysis);
51
- console.log(report);
52
- return {
53
- totalFiles: analysis.totalFiles,
54
- specsImported: 0,
55
- modulesImported: 0,
56
- teamImported: 0,
57
- legacyImported: 0,
58
- destination: this.projectManager.getLegacyPath(options.source, options.project),
59
- timestamp: new Date().toISOString(),
60
- classifications: {
61
- specs: analysis.specs,
62
- modules: analysis.modules,
63
- team: analysis.team,
64
- legacy: analysis.legacy
65
- }
66
- };
67
- }
68
- // 2. Confirm with user (in real usage, this would be an interactive prompt)
69
- console.log('📦 Importing files...\n');
70
- // 3. Import specs
71
- const specsPath = this.projectManager.getSpecsPath(options.project);
72
- await this.importFiles(analysis.specs, specsPath, options.preserveStructure, options.sourcePath);
73
- console.log(`✅ Imported ${analysis.specs.length} spec(s) to specs/`);
74
- // 4. Import modules
75
- const modulesPath = this.projectManager.getModulesPath(options.project);
76
- await this.importFiles(analysis.modules, modulesPath, options.preserveStructure, options.sourcePath);
77
- console.log(`✅ Imported ${analysis.modules.length} module doc(s) to modules/`);
78
- // 5. Import team docs
79
- const teamPath = this.projectManager.getTeamPath(options.project);
80
- await this.importFiles(analysis.team, teamPath, options.preserveStructure, options.sourcePath);
81
- console.log(`✅ Imported ${analysis.team.length} team doc(s) to team/`);
82
- // 6. Import legacy
83
- const legacyPath = this.projectManager.getLegacyPath(options.source, options.project);
84
- await this.importFiles(analysis.legacy, legacyPath, options.preserveStructure, options.sourcePath);
85
- console.log(`✅ Imported ${analysis.legacy.length} legacy doc(s) to legacy/${options.source}/`);
86
- // 7. Create migration report
87
- const report = {
88
- totalFiles: analysis.totalFiles,
89
- specsImported: analysis.specs.length,
90
- modulesImported: analysis.modules.length,
91
- teamImported: analysis.team.length,
92
- legacyImported: analysis.legacy.length,
93
- destination: this.projectManager.getLegacyPath(options.source, options.project),
94
- timestamp: new Date().toISOString(),
95
- classifications: {
96
- specs: analysis.specs,
97
- modules: analysis.modules,
98
- team: analysis.team,
99
- legacy: analysis.legacy
100
- }
101
- };
102
- await this.createMigrationReport(options, report, analysis);
103
- // 8. Update config
104
- await this.updateConfig(options, report);
105
- console.log('\n✅ Import complete!\n');
106
- console.log(`📄 Migration report: ${path.join(legacyPath, '../README.md')}\n`);
107
- return report;
108
- }
109
- /**
110
- * Import files to destination
111
- *
112
- * @param files - Files to import
113
- * @param destination - Destination directory
114
- * @param preserveStructure - Preserve original folder structure
115
- * @param basePath - Base path for relative path calculation
116
- */
117
- async importFiles(files, destination, preserveStructure = false, basePath) {
118
- await fs.ensureDir(destination);
119
- for (const file of files) {
120
- let destPath;
121
- if (preserveStructure) {
122
- // Preserve folder structure
123
- const relativePath = path.relative(basePath, file.path);
124
- destPath = path.join(destination, relativePath);
125
- // Ensure parent directory exists
126
- await fs.ensureDir(path.dirname(destPath));
127
- }
128
- else {
129
- // Flatten structure - just use filename
130
- const fileName = path.basename(file.path);
131
- destPath = path.join(destination, fileName);
132
- // Handle duplicate filenames
133
- if (await fs.pathExists(destPath)) {
134
- const ext = path.extname(fileName);
135
- const base = path.basename(fileName, ext);
136
- const timestamp = Date.now();
137
- destPath = path.join(destination, `${base}-${timestamp}${ext}`);
138
- }
139
- }
140
- await fs.copy(file.path, destPath);
141
- }
142
- }
143
- /**
144
- * Create migration report in legacy/ folder
145
- *
146
- * @param options - Import options
147
- * @param report - Import report
148
- * @param analysis - Analysis result
149
- */
150
- async createMigrationReport(options, report, analysis) {
151
- const legacyBasePath = this.projectManager.getLegacyPath(undefined, options.project);
152
- const legacyREADME = path.join(legacyBasePath, 'README.md');
153
- // Generate analysis summary
154
- const analysisReport = this.analyzer.generateSummaryReport(analysis);
155
- const content = `# Brownfield Migration Report
156
-
157
- **Source**: ${options.source}
158
- **Source Path**: ${options.sourcePath}
159
- **Imported**: ${report.timestamp}
160
- **Total Files**: ${report.totalFiles}
161
-
162
- ## Import Summary
163
-
164
- - **Specs**: ${report.specsImported} files → \`specs/\`
165
- - **Modules**: ${report.modulesImported} files → \`modules/\`
166
- - **Team Docs**: ${report.teamImported} files → \`team/\`
167
- - **Legacy**: ${report.legacyImported} files → \`legacy/${options.source}/\`
168
-
169
- ## Classification Analysis
170
-
171
- ${analysisReport}
172
-
173
- ## Next Steps
174
-
175
- 1. **Review imported files** for accuracy
176
- 2. **Manually move misclassified files** if needed:
177
- - Use file manager or git to move files between folders
178
- - Update references in other docs if needed
179
- 3. **Update spec numbers** to follow SpecWeave conventions:
180
- - Specs should be numbered: \`spec-001-feature-name.md\`
181
- - Current files may have different naming
182
- 4. **Clean up legacy folder** when migration is complete:
183
- - Move useful docs to appropriate folders
184
- - Delete obsolete or duplicate content
185
- 5. **Update team docs** to match SpecWeave templates:
186
- - See \`team/README.md\` for template guidance
187
-
188
- ## Migration Notes
189
-
190
- ### Structure Preservation
191
- ${options.preserveStructure ?
192
- '✅ Original folder structure preserved' :
193
- '📁 Files flattened to destination folders (no subdirectories)'}
194
-
195
- ### Confidence Scores
196
-
197
- Files were classified with confidence scores (0-100%):
198
- - **70%+**: High confidence (likely correct)
199
- - **50-70%**: Medium confidence (review recommended)
200
- - **30-50%**: Low confidence (likely legacy)
201
- - **<30%**: No match (moved to legacy)
202
-
203
- ### Common Issues
204
-
205
- **Misclassified files?**
206
- - Check confidence scores in analysis above
207
- - Files with low confidence may be in wrong folder
208
- - Manually move files as needed
209
-
210
- **Duplicate content?**
211
- - Compare imported files with existing docs
212
- - Merge duplicates or mark for deletion
213
- - Update cross-references
214
-
215
- **Outdated information?**
216
- - Review dates and version numbers
217
- - Mark obsolete docs for deletion
218
- - Update references to current systems
219
-
220
- ## Source Information
221
-
222
- - **Type**: ${options.source}
223
- - **Source Path**: \`${options.sourcePath}\`
224
- - **Destination**: \`${report.destination}\`
225
- - **Project**: ${options.project}
226
-
227
- ## Import History
228
-
229
- See \`.specweave/config.json\` → \`brownfield.importHistory\` for complete import history.
230
-
231
- ---
232
-
233
- **Generated**: ${new Date().toISOString()}
234
- **Tool**: SpecWeave Brownfield Importer
235
- `;
236
- await fs.writeFile(legacyREADME, content);
237
- }
238
- /**
239
- * Update config with import history
240
- *
241
- * @param options - Import options
242
- * @param report - Import report
243
- */
244
- async updateConfig(options, report) {
245
- const config = this.configManager.load();
246
- if (!config.brownfield) {
247
- config.brownfield = { importHistory: [] };
248
- }
249
- config.brownfield.importHistory.push({
250
- source: options.source,
251
- workspace: path.basename(options.sourcePath),
252
- importedAt: report.timestamp,
253
- project: options.project,
254
- filesImported: report.totalFiles,
255
- destination: report.destination
256
- });
257
- await this.configManager.save(config);
258
- }
259
- /**
260
- * Preview import (dry run)
261
- *
262
- * @param options - Import options
263
- * @returns Analysis result as string
264
- */
265
- async preview(options) {
266
- const dryRunOptions = { ...options, dryRun: true };
267
- const report = await this.import(dryRunOptions);
268
- return this.analyzer.generateSummaryReport({
269
- totalFiles: report.totalFiles,
270
- specs: report.classifications.specs,
271
- modules: report.classifications.modules,
272
- team: report.classifications.team,
273
- legacy: report.classifications.legacy,
274
- statistics: {
275
- specsConfidence: this.calculateAvgConfidence(report.classifications.specs),
276
- modulesConfidence: this.calculateAvgConfidence(report.classifications.modules),
277
- teamConfidence: this.calculateAvgConfidence(report.classifications.team)
278
- }
279
- });
280
- }
281
- calculateAvgConfidence(files) {
282
- if (files.length === 0)
283
- return 0;
284
- return files.reduce((sum, file) => sum + file.confidence, 0) / files.length;
285
- }
286
- }
287
- //# sourceMappingURL=importer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"importer.js","sourceRoot":"","sources":["../../../../src/core/brownfield/importer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,MAAM,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ACV,eAAe,EAAE,IAAI,CAAC,sBAAsB,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC;gBAC1E,iBAAiB,EAAE,IAAI,CAAC,sBAAsB,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC;gBAC9E,cAAc,EAAE,IAAI,CAAC,sBAAsB,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC;aACzE;SACF,CAAC,CAAC;IACL,CAAC;IAEO,sBAAsB,CAAC,KAA2B;QACxD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,CAAC,CAAC;QACjC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;IAC9E,CAAC;CACF"}
@@ -1,237 +0,0 @@
1
- /**
2
- * Environment Multi-Project Parser
3
- *
4
- * @deprecated (v0.34.0+) This module reads configuration from process.env.
5
- * Configuration should come from ConfigManager (config.json) instead.
6
- *
7
- * MIGRATION GUIDE:
8
- * - JIRA_DOMAIN → config.issueTracker.domain (config.json)
9
- * - AZURE_DEVOPS_ORG → config.issueTracker.organization_ado (config.json)
10
- * - AZURE_DEVOPS_PROJECT → config.issueTracker.project (config.json)
11
- * - Keep JIRA_API_TOKEN, JIRA_EMAIL, AZURE_DEVOPS_PAT, GITHUB_TOKEN in .env (secrets)
12
- *
13
- * This module will be removed in v1.0.
14
- *
15
- * Parses comma-separated project lists from .env:
16
- * - JIRA_PROJECT_KEYS=BACKEND,FRONTEND,MOBILE (multiple projects)
17
- * - GITHUB_REPOS=owner/backend-api,owner/frontend-web (multiple repos)
18
- * - AZURE_DEVOPS_PROJECT=myproject (single project only)
19
- * - AZURE_DEVOPS_TEAMS=Frontend,Backend,Mobile (multiple teams within project)
20
- *
21
- * Auto-creates sync profiles for each project/repo.
22
- *
23
- * NOTE: Azure DevOps uses ONE project per organization with multiple teams.
24
- * Multi-project support is for Jira and GitHub only.
25
- */
26
- import { SyncProfile } from '../core/types/sync-profile.js';
27
- export interface JiraProjectConfig {
28
- projectKey: string;
29
- domain: string;
30
- email: string;
31
- apiToken: string;
32
- }
33
- export interface GitHubRepoConfig {
34
- owner: string;
35
- repo: string;
36
- token: string;
37
- }
38
- export interface AdoProjectConfig {
39
- organization: string;
40
- project: string;
41
- pat: string;
42
- }
43
- export interface MultiProjectEnvConfig {
44
- jira: JiraProjectConfig[];
45
- github: GitHubRepoConfig[];
46
- ado: AdoProjectConfig[];
47
- }
48
- /**
49
- * Parse comma-separated list from environment variable
50
- *
51
- * Handles:
52
- * - Comma separation
53
- * - Whitespace trimming
54
- * - Empty values filtering
55
- *
56
- * @example
57
- * parseCommaSeparated("BACKEND, FRONTEND, MOBILE")
58
- * // Returns: ["BACKEND", "FRONTEND", "MOBILE"]
59
- */
60
- export declare function parseCommaSeparated(value: string | undefined): string[];
61
- /**
62
- * Parse JIRA project keys from .env
63
- *
64
- * @deprecated (v0.34.0+) Use ConfigManager for domain configuration.
65
- * JIRA_DOMAIN should be in config.json, not .env
66
- *
67
- * Reads:
68
- * - JIRA_PROJECT_KEYS (comma-separated, NEW format)
69
- * - JIRA_PROJECT_KEY (single, legacy format)
70
- * - JIRA_DOMAIN, JIRA_EMAIL, JIRA_API_TOKEN (shared credentials)
71
- *
72
- * @returns Array of JIRA project configurations
73
- *
74
- * @example
75
- * // .env:
76
- * // JIRA_PROJECT_KEYS=BACKEND,FRONTEND,MOBILE
77
- * // JIRA_DOMAIN=mycompany.atlassian.net
78
- * // JIRA_EMAIL=user@example.com
79
- * // JIRA_API_TOKEN=abc123
80
- *
81
- * parseJiraProjects()
82
- * // Returns: [
83
- * // { projectKey: "BACKEND", domain: "...", email: "...", apiToken: "..." },
84
- * // { projectKey: "FRONTEND", ... },
85
- * // { projectKey: "MOBILE", ... }
86
- * // ]
87
- */
88
- export declare function parseJiraProjects(): JiraProjectConfig[];
89
- /**
90
- * Parse GitHub repositories from .env
91
- *
92
- * Reads:
93
- * - GITHUB_REPOS (comma-separated, format: "owner/repo,owner2/repo2")
94
- * - GITHUB_TOKEN (shared credential)
95
- *
96
- * @returns Array of GitHub repository configurations
97
- *
98
- * @example
99
- * // .env:
100
- * // GITHUB_REPOS=myorg/backend-api,myorg/frontend-web
101
- * // GITHUB_TOKEN=ghp_abc123
102
- *
103
- * parseGitHubRepos()
104
- * // Returns: [
105
- * // { owner: "myorg", repo: "backend-api", token: "..." },
106
- * // { owner: "myorg", repo: "frontend-web", token: "..." }
107
- * // ]
108
- */
109
- export declare function parseGitHubRepos(): GitHubRepoConfig[];
110
- /**
111
- * Parse Azure DevOps project from .env
112
- *
113
- * @deprecated (v0.34.0+) Use ConfigManager for organization/project configuration.
114
- * AZURE_DEVOPS_ORG and AZURE_DEVOPS_PROJECT should be in config.json
115
- *
116
- * NOTE: Azure DevOps supports ONE project per organization with multiple teams.
117
- * For multi-team support, use AZURE_DEVOPS_TEAMS (comma-separated).
118
- *
119
- * Reads:
120
- * - AZURE_DEVOPS_PROJECT (single project, required)
121
- * - AZURE_DEVOPS_ORG (organization)
122
- * - AZURE_DEVOPS_PAT (credential)
123
- * - AZURE_DEVOPS_TEAMS (comma-separated teams, optional)
124
- *
125
- * @returns Array with single ADO project configuration
126
- *
127
- * @example
128
- * // .env:
129
- * // AZURE_DEVOPS_PROJECT=myproject
130
- * // AZURE_DEVOPS_ORG=easychamp
131
- * // AZURE_DEVOPS_PAT=xyz789
132
- * // AZURE_DEVOPS_TEAMS=Frontend,Backend,Mobile
133
- *
134
- * parseAdoProjects()
135
- * // Returns: [
136
- * // { organization: "easychamp", project: "myproject", pat: "..." }
137
- * // ]
138
- */
139
- export declare function parseAdoProjects(): AdoProjectConfig[];
140
- /**
141
- * Parse all multi-project configurations from .env
142
- *
143
- * @returns All detected project configurations
144
- */
145
- export declare function parseMultiProjectEnv(): MultiProjectEnvConfig;
146
- /**
147
- * Generate sync profile ID from project identifier
148
- *
149
- * Format: "{provider}-{project-id}"
150
- *
151
- * @example
152
- * generateProfileId("jira", "BACKEND")
153
- * // Returns: "jira-backend"
154
- *
155
- * @example
156
- * generateProfileId("github", "backend-api")
157
- * // Returns: "github-backend-api"
158
- */
159
- export declare function generateProfileId(provider: string, projectId: string): string;
160
- /**
161
- * Create JIRA sync profile from project configuration
162
- */
163
- export declare function createJiraSyncProfile(config: JiraProjectConfig): {
164
- id: string;
165
- profile: Omit<SyncProfile, 'id'>;
166
- };
167
- /**
168
- * Create GitHub sync profile from repository configuration
169
- */
170
- export declare function createGitHubSyncProfile(config: GitHubRepoConfig): {
171
- id: string;
172
- profile: Omit<SyncProfile, 'id'>;
173
- };
174
- /**
175
- * Create Azure DevOps sync profile from project configuration
176
- *
177
- * NOTE: Creates ONE profile per organization. Teams are managed within the project.
178
- */
179
- export declare function createAdoSyncProfile(config: AdoProjectConfig): {
180
- id: string;
181
- profile: Omit<SyncProfile, 'id'>;
182
- };
183
- /**
184
- * Generate all sync profiles from environment variables
185
- *
186
- * @returns Array of { id, profile } objects ready to be created
187
- *
188
- * @example
189
- * // .env:
190
- * // JIRA_PROJECT_KEYS=BACKEND,FRONTEND
191
- * // GITHUB_REPOS=myorg/backend-api
192
- *
193
- * const profiles = generateSyncProfilesFromEnv();
194
- * // Returns: [
195
- * // { id: "jira-backend", profile: { ... } },
196
- * // { id: "jira-frontend", profile: { ... } },
197
- * // { id: "github-backend-api", profile: { ... } }
198
- * // ]
199
- */
200
- export declare function generateSyncProfilesFromEnv(): Array<{
201
- id: string;
202
- profile: Omit<SyncProfile, 'id'>;
203
- }>;
204
- /**
205
- * Validate JIRA project key format
206
- *
207
- * Rules:
208
- * - 2-10 characters
209
- * - Uppercase letters only
210
- * - No special characters
211
- *
212
- * @example
213
- * validateJiraProjectKey("BACKEND") // → true
214
- * validateJiraProjectKey("backend") // → "Must be uppercase"
215
- * validateJiraProjectKey("BACK") // → true
216
- * validateJiraProjectKey("B") // → "Must be 2-10 characters"
217
- */
218
- export declare function validateJiraProjectKey(key: string): true | string;
219
- /**
220
- * Validate GitHub repo format
221
- *
222
- * Format: "owner/repo"
223
- *
224
- * @example
225
- * validateGitHubRepo("myorg/backend-api") // → true
226
- * validateGitHubRepo("backend-api") // → "Must be owner/repo format"
227
- */
228
- export declare function validateGitHubRepo(repo: string): true | string;
229
- /**
230
- * Validate Azure DevOps project name
231
- *
232
- * @example
233
- * validateAdoProject("backend-api") // → true
234
- * validateAdoProject("") // → "Project name is required"
235
- */
236
- export declare function validateAdoProject(project: string): true | string;
237
- //# sourceMappingURL=env-multi-project-parser.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"env-multi-project-parser.d.ts","sourceRoot":"","sources":["../../../src/utils/env-multi-project-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAM5D,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,iBAAiB,EAAE,CAAC;IAC1B,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,GAAG,EAAE,gBAAgB,EAAE,CAAC;CACzB;AAMD;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,EAAE,CASvE;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