specweave 0.7.1 → 0.8.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.
Files changed (137) hide show
  1. package/CLAUDE.md +307 -11
  2. package/README.md +41 -3
  3. package/bin/specweave.js +0 -27
  4. package/dist/cli/commands/import-docs.d.ts +21 -0
  5. package/dist/cli/commands/import-docs.d.ts.map +1 -0
  6. package/dist/cli/commands/import-docs.js +146 -0
  7. package/dist/cli/commands/import-docs.js.map +1 -0
  8. package/dist/cli/commands/init-multiproject.d.ts +11 -0
  9. package/dist/cli/commands/init-multiproject.d.ts.map +1 -0
  10. package/dist/cli/commands/init-multiproject.js +202 -0
  11. package/dist/cli/commands/init-multiproject.js.map +1 -0
  12. package/dist/cli/commands/init.d.ts.map +1 -1
  13. package/dist/cli/commands/init.js +4 -93
  14. package/dist/cli/commands/init.js.map +1 -1
  15. package/dist/cli/commands/migrate-to-multiproject.d.ts +37 -0
  16. package/dist/cli/commands/migrate-to-multiproject.d.ts.map +1 -0
  17. package/dist/cli/commands/migrate-to-multiproject.js +189 -0
  18. package/dist/cli/commands/migrate-to-multiproject.js.map +1 -0
  19. package/dist/cli/commands/migrate-to-profiles.d.ts +25 -0
  20. package/dist/cli/commands/migrate-to-profiles.d.ts.map +1 -0
  21. package/dist/cli/commands/migrate-to-profiles.js +350 -0
  22. package/dist/cli/commands/migrate-to-profiles.js.map +1 -0
  23. package/dist/cli/commands/switch-project.d.ts +13 -0
  24. package/dist/cli/commands/switch-project.d.ts.map +1 -0
  25. package/dist/cli/commands/switch-project.js +91 -0
  26. package/dist/cli/commands/switch-project.js.map +1 -0
  27. package/dist/cli/helpers/issue-tracker/index.js +4 -4
  28. package/dist/cli/helpers/issue-tracker/index.js.map +1 -1
  29. package/dist/cli/helpers/issue-tracker/utils.d.ts +6 -3
  30. package/dist/cli/helpers/issue-tracker/utils.d.ts.map +1 -1
  31. package/dist/cli/helpers/issue-tracker/utils.js +9 -7
  32. package/dist/cli/helpers/issue-tracker/utils.js.map +1 -1
  33. package/dist/core/brownfield/analyzer.d.ts +86 -0
  34. package/dist/core/brownfield/analyzer.d.ts.map +1 -0
  35. package/dist/core/brownfield/analyzer.js +365 -0
  36. package/dist/core/brownfield/analyzer.js.map +1 -0
  37. package/dist/core/brownfield/importer.d.ts +76 -0
  38. package/dist/core/brownfield/importer.d.ts.map +1 -0
  39. package/dist/core/brownfield/importer.js +287 -0
  40. package/dist/core/brownfield/importer.js.map +1 -0
  41. package/dist/core/config-manager.d.ts +47 -0
  42. package/dist/core/config-manager.d.ts.map +1 -0
  43. package/dist/core/config-manager.js +136 -0
  44. package/dist/core/config-manager.js.map +1 -0
  45. package/dist/core/project-manager.d.ts +127 -0
  46. package/dist/core/project-manager.d.ts.map +1 -0
  47. package/dist/core/project-manager.js +524 -0
  48. package/dist/core/project-manager.js.map +1 -0
  49. package/dist/core/sync/profile-manager.d.ts +72 -0
  50. package/dist/core/sync/profile-manager.d.ts.map +1 -0
  51. package/dist/core/sync/profile-manager.js +338 -0
  52. package/dist/core/sync/profile-manager.js.map +1 -0
  53. package/dist/core/sync/profile-selector.d.ts +52 -0
  54. package/dist/core/sync/profile-selector.d.ts.map +1 -0
  55. package/dist/core/sync/profile-selector.js +179 -0
  56. package/dist/core/sync/profile-selector.js.map +1 -0
  57. package/dist/core/sync/project-context.d.ts +81 -0
  58. package/dist/core/sync/project-context.d.ts.map +1 -0
  59. package/dist/core/sync/project-context.js +354 -0
  60. package/dist/core/sync/project-context.js.map +1 -0
  61. package/dist/core/sync/rate-limiter.d.ts +116 -0
  62. package/dist/core/sync/rate-limiter.d.ts.map +1 -0
  63. package/dist/core/sync/rate-limiter.js +308 -0
  64. package/dist/core/sync/rate-limiter.js.map +1 -0
  65. package/dist/core/sync/time-range-selector.d.ts +48 -0
  66. package/dist/core/sync/time-range-selector.d.ts.map +1 -0
  67. package/dist/core/sync/time-range-selector.js +224 -0
  68. package/dist/core/sync/time-range-selector.js.map +1 -0
  69. package/dist/core/types/config.d.ts +4 -0
  70. package/dist/core/types/config.d.ts.map +1 -1
  71. package/dist/core/types/config.js.map +1 -1
  72. package/dist/core/types/sync-profile.d.ts +205 -0
  73. package/dist/core/types/sync-profile.d.ts.map +1 -0
  74. package/dist/core/types/sync-profile.js +8 -0
  75. package/dist/core/types/sync-profile.js.map +1 -0
  76. package/dist/utils/project-detection.d.ts +141 -0
  77. package/dist/utils/project-detection.d.ts.map +1 -0
  78. package/dist/utils/project-detection.js +321 -0
  79. package/dist/utils/project-detection.js.map +1 -0
  80. package/package.json +2 -1
  81. package/plugins/specweave/agents/pm/AGENT.md +7 -4
  82. package/plugins/specweave/commands/specweave-abandon.md +17 -17
  83. package/plugins/specweave/commands/specweave-check-tests.md +14 -14
  84. package/plugins/specweave/commands/specweave-costs.md +1 -1
  85. package/plugins/specweave/commands/specweave-do.md +12 -12
  86. package/plugins/specweave/commands/specweave-done.md +28 -15
  87. package/plugins/specweave/commands/specweave-import-docs.md +212 -0
  88. package/plugins/specweave/commands/specweave-increment.md +10 -10
  89. package/plugins/specweave/commands/specweave-init-multiproject.md +146 -0
  90. package/plugins/specweave/commands/specweave-next.md +16 -16
  91. package/plugins/specweave/commands/specweave-pause.md +17 -17
  92. package/plugins/specweave/commands/specweave-progress.md +10 -10
  93. package/plugins/specweave/commands/specweave-qa.md +11 -11
  94. package/plugins/specweave/commands/specweave-resume.md +22 -22
  95. package/plugins/specweave/commands/specweave-status.md +18 -18
  96. package/plugins/specweave/commands/specweave-switch-project.md +168 -0
  97. package/plugins/specweave/commands/specweave-sync-docs.md +1 -1
  98. package/plugins/specweave/commands/specweave-sync-tasks.md +9 -9
  99. package/plugins/specweave/commands/specweave-tdd-cycle.md +7 -0
  100. package/plugins/specweave/commands/specweave-tdd-green.md +7 -0
  101. package/plugins/specweave/commands/specweave-tdd-red.md +7 -0
  102. package/plugins/specweave/commands/specweave-tdd-refactor.md +7 -0
  103. package/plugins/specweave/commands/specweave-translate.md +1 -1
  104. package/plugins/specweave/commands/specweave-update-scope.md +8 -8
  105. package/plugins/specweave/commands/specweave-validate.md +18 -20
  106. package/plugins/specweave/commands/specweave.md +5 -5
  107. package/plugins/specweave/skills/SKILLS-INDEX.md +1 -1
  108. package/plugins/specweave/skills/increment-planner/SKILL.md +40 -4
  109. package/plugins/specweave/skills/increment-quality-judge/SKILL.md +5 -5
  110. package/plugins/specweave/skills/increment-quality-judge-v2/SKILL.md +5 -5
  111. package/plugins/specweave/skills/specweave-detector/SKILL.md +3 -3
  112. package/plugins/specweave-ado/commands/{close-workitem.md → specweave-ado-close-workitem.md} +1 -1
  113. package/plugins/specweave-ado/commands/{create-workitem.md → specweave-ado-create-workitem.md} +1 -1
  114. package/plugins/specweave-ado/commands/{status.md → specweave-ado-status.md} +1 -1
  115. package/plugins/specweave-ado/commands/{sync.md → specweave-ado-sync.md} +1 -1
  116. package/plugins/specweave-ado/lib/ado-client-v2.ts +547 -0
  117. package/plugins/specweave-github/commands/{close-issue.md → specweave-github-close-issue.md} +1 -1
  118. package/plugins/specweave-github/commands/{create-issue.md → specweave-github-create-issue.md} +1 -1
  119. package/plugins/specweave-github/commands/{status.md → specweave-github-status.md} +1 -1
  120. package/plugins/specweave-github/commands/{sync-tasks.md → specweave-github-sync-tasks.md} +1 -1
  121. package/plugins/specweave-github/commands/specweave-github-sync.md +568 -0
  122. package/plugins/specweave-github/lib/github-client-v2.ts +555 -0
  123. package/plugins/specweave-infrastructure/commands/{monitor-setup.md → specweave-infrastructure-monitor-setup.md} +1 -1
  124. package/plugins/specweave-infrastructure/commands/{slo-implement.md → specweave-infrastructure-slo-implement.md} +1 -1
  125. package/plugins/specweave-jira/commands/{sync.md → specweave-jira-sync.md} +1 -1
  126. package/plugins/specweave-jira/lib/jira-client-v2.ts +529 -0
  127. package/plugins/specweave-ml/commands/{ml-deploy.md → specweave-ml-deploy.md} +1 -1
  128. package/plugins/specweave-ml/commands/{ml-evaluate.md → specweave-ml-evaluate.md} +1 -1
  129. package/plugins/specweave-ml/commands/{ml-explain.md → specweave-ml-explain.md} +1 -1
  130. package/plugins/specweave-ml/commands/{ml-pipeline.md → specweave-ml-pipeline.md} +1 -1
  131. package/src/templates/AGENTS.md.template +1 -0
  132. package/src/templates/CLAUDE.md.template +1 -0
  133. package/plugins/specweave/hooks/post-increment-plugin-detect.sh +0 -142
  134. package/plugins/specweave/hooks/pre-task-plugin-detect.sh +0 -96
  135. package/plugins/specweave/skills/plugin-detector/SKILL.md +0 -324
  136. package/plugins/specweave-github/commands/sync.md +0 -443
  137. /package/plugins/specweave/{commands/README.md → COMMANDS.md} +0 -0
@@ -0,0 +1,189 @@
1
+ /**
2
+ * Auto-Migration: Single Project → Multi-Project Structure
3
+ *
4
+ * Automatically migrates existing specs/ to projects/{detected-id}/specs/
5
+ * Auto-detects project ID from git remote or sync config
6
+ * Transparent to users - no behavior changes, just new structure
7
+ */
8
+ import path from 'path';
9
+ import fs from 'fs-extra';
10
+ import { ProjectManager } from '../../core/project-manager';
11
+ import { ConfigManager } from '../../core/config-manager';
12
+ import { autoDetectProjectIdSync, formatProjectName } from '../../utils/project-detection';
13
+ /**
14
+ * Auto-migrate from single project to multi-project structure
15
+ *
16
+ * @param projectRoot - Project root directory
17
+ * @returns MigrationResult
18
+ */
19
+ export async function autoMigrateSingleToMulti(projectRoot) {
20
+ console.log('🔄 Auto-migrating to multi-project structure...\n');
21
+ const result = {
22
+ success: false,
23
+ migratedSpecsCount: 0,
24
+ backupCreated: false,
25
+ errors: [],
26
+ warnings: []
27
+ };
28
+ try {
29
+ const configManager = new ConfigManager(projectRoot);
30
+ const config = configManager.load();
31
+ // Auto-detect project ID (git remote, sync config, or "default")
32
+ const projectId = autoDetectProjectIdSync(projectRoot);
33
+ console.log(`📝 Detected project: ${projectId}`);
34
+ // Check if already migrated
35
+ if (config.multiProject?.enabled) {
36
+ console.log('✅ Already using multi-project structure (enabled)');
37
+ result.success = true;
38
+ return result;
39
+ }
40
+ // Check if projects/{projectId}/ already exists (migration already done, just not enabled)
41
+ const projectPath = path.join(projectRoot, `.specweave/docs/internal/projects/${projectId}`);
42
+ if (await fs.pathExists(projectPath)) {
43
+ console.log(`✅ Already using multi-project structure (projects/${projectId}/ exists)`);
44
+ // Update config to reflect reality
45
+ if (!config.multiProject) {
46
+ config.multiProject = {
47
+ enabled: false,
48
+ activeProject: projectId,
49
+ projects: [{
50
+ id: projectId,
51
+ name: config.project?.name || formatProjectName(projectId),
52
+ description: config.project?.description || `${formatProjectName(projectId)} project`,
53
+ techStack: config.project?.techStack || [],
54
+ team: config.project?.team || 'Engineering Team'
55
+ }]
56
+ };
57
+ await configManager.save(config);
58
+ console.log('📝 Updated config to reflect multi-project structure');
59
+ }
60
+ result.success = true;
61
+ return result;
62
+ }
63
+ // 1. Backup current config
64
+ const backupPath = path.join(projectRoot, `.specweave/config.backup.${Date.now()}.json`);
65
+ try {
66
+ await fs.writeJson(backupPath, config, { spaces: 2 });
67
+ console.log(`📦 Backed up config to: ${path.basename(backupPath)}`);
68
+ result.backupCreated = true;
69
+ result.backupPath = backupPath;
70
+ }
71
+ catch (error) {
72
+ result.warnings.push(`Failed to create backup: ${error instanceof Error ? error.message : String(error)}`);
73
+ }
74
+ // 2. Check if old specs/ folder exists
75
+ const oldSpecsPath = path.join(projectRoot, '.specweave/docs/internal/specs');
76
+ const hasOldSpecs = await fs.pathExists(oldSpecsPath);
77
+ // 3. Create project structure with auto-detected ID
78
+ const projectManager = new ProjectManager(projectRoot);
79
+ // Ensure multiProject section exists
80
+ if (!config.multiProject) {
81
+ config.multiProject = {
82
+ enabled: false, // Still single project, just using new structure
83
+ activeProject: projectId,
84
+ projects: [{
85
+ id: projectId,
86
+ name: config.project?.name || formatProjectName(projectId),
87
+ description: config.project?.description || `${formatProjectName(projectId)} project`,
88
+ techStack: config.project?.techStack || [],
89
+ team: config.project?.team || 'Engineering Team'
90
+ }]
91
+ };
92
+ }
93
+ // Save config before creating structure (so ProjectManager can read it)
94
+ await configManager.save(config);
95
+ // Create structure
96
+ await projectManager.createProjectStructure(projectId);
97
+ console.log(`📁 Created projects/${projectId}/ structure`);
98
+ // 4. Migrate old specs if they exist
99
+ if (hasOldSpecs) {
100
+ const newSpecsPath = path.join(projectRoot, `.specweave/docs/internal/projects/${projectId}/specs`);
101
+ try {
102
+ const entries = await fs.readdir(oldSpecsPath, { withFileTypes: true });
103
+ let migratedCount = 0;
104
+ for (const entry of entries) {
105
+ if (entry.isFile() && entry.name.endsWith('.md')) {
106
+ const sourcePath = path.join(oldSpecsPath, entry.name);
107
+ const destPath = path.join(newSpecsPath, entry.name);
108
+ await fs.copy(sourcePath, destPath);
109
+ migratedCount++;
110
+ }
111
+ }
112
+ result.migratedSpecsCount = migratedCount;
113
+ console.log(`📋 Migrated ${migratedCount} spec(s) to projects/${projectId}/specs/`);
114
+ // Rename old folder (preserve as backup)
115
+ const oldSpecsBackupPath = path.join(projectRoot, '.specweave/docs/internal/specs.old');
116
+ await fs.move(oldSpecsPath, oldSpecsBackupPath, { overwrite: true });
117
+ console.log('📦 Renamed old specs/ to specs.old/ (backup)');
118
+ }
119
+ catch (error) {
120
+ result.errors.push(`Failed to migrate specs: ${error instanceof Error ? error.message : String(error)}`);
121
+ }
122
+ }
123
+ else {
124
+ console.log('ℹ️ No existing specs/ folder to migrate');
125
+ }
126
+ console.log(`\n✅ Migration complete! Using projects/${projectId}/ structure`);
127
+ console.log('💡 Run /specweave:init-multiproject to enable multi-project mode\n');
128
+ result.success = result.errors.length === 0;
129
+ return result;
130
+ }
131
+ catch (error) {
132
+ result.errors.push(`Migration failed: ${error instanceof Error ? error.message : String(error)}`);
133
+ result.success = false;
134
+ return result;
135
+ }
136
+ }
137
+ /**
138
+ * Check if migration is needed
139
+ *
140
+ * @param projectRoot - Project root directory
141
+ * @returns true if migration needed
142
+ */
143
+ export async function isMigrationNeeded(projectRoot) {
144
+ // Auto-detect project ID
145
+ const projectId = autoDetectProjectIdSync(projectRoot, { silent: true });
146
+ // Check if projects/{projectId}/ exists
147
+ const projectPath = path.join(projectRoot, `.specweave/docs/internal/projects/${projectId}`);
148
+ if (await fs.pathExists(projectPath)) {
149
+ return false; // Already migrated
150
+ }
151
+ // Check if old specs/ exists
152
+ const oldSpecsPath = path.join(projectRoot, '.specweave/docs/internal/specs');
153
+ return await fs.pathExists(oldSpecsPath);
154
+ }
155
+ /**
156
+ * Rollback migration (restore from backup)
157
+ *
158
+ * @param projectRoot - Project root directory
159
+ * @param backupPath - Path to backup file
160
+ */
161
+ export async function rollbackMigration(projectRoot, backupPath) {
162
+ console.log('🔄 Rolling back migration...\n');
163
+ try {
164
+ // Restore config from backup
165
+ const backup = await fs.readJson(backupPath);
166
+ const configPath = path.join(projectRoot, '.specweave/config.json');
167
+ await fs.writeJson(configPath, backup, { spaces: 2 });
168
+ console.log('✅ Restored config from backup');
169
+ // Remove projects/default/ if it exists
170
+ const defaultProjectPath = path.join(projectRoot, '.specweave/docs/internal/projects/default');
171
+ if (await fs.pathExists(defaultProjectPath)) {
172
+ await fs.remove(defaultProjectPath);
173
+ console.log('🗑️ Removed projects/default/');
174
+ }
175
+ // Restore specs.old/ to specs/
176
+ const oldSpecsBackupPath = path.join(projectRoot, '.specweave/docs/internal/specs.old');
177
+ const specsPath = path.join(projectRoot, '.specweave/docs/internal/specs');
178
+ if (await fs.pathExists(oldSpecsBackupPath)) {
179
+ await fs.move(oldSpecsBackupPath, specsPath, { overwrite: true });
180
+ console.log('✅ Restored specs/ from specs.old/');
181
+ }
182
+ console.log('\n✅ Rollback complete!');
183
+ }
184
+ catch (error) {
185
+ console.error(`❌ Rollback failed: ${error instanceof Error ? error.message : String(error)}`);
186
+ throw error;
187
+ }
188
+ }
189
+ //# sourceMappingURL=migrate-to-multiproject.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate-to-multiproject.js","sourceRoot":"","sources":["../../../src/cli/commands/migrate-to-multiproject.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,O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AC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC9F,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Migration Script: Single-Project → Multi-Project Profiles
3
+ *
4
+ * Converts old configuration format (single project per provider in .env)
5
+ * to new profile-based format (multiple projects in config.json + .env).
6
+ *
7
+ * Supports:
8
+ * - GitHub (.env: GITHUB_TOKEN)
9
+ * - JIRA (.env: JIRA_API_TOKEN, JIRA_EMAIL, JIRA_DOMAIN, JIRA_PROJECT_KEY)
10
+ * - Azure DevOps (.env: AZURE_DEVOPS_PAT, AZURE_DEVOPS_ORG, AZURE_DEVOPS_PROJECT)
11
+ */
12
+ export declare function migrateToProfiles(projectRoot: string, options?: MigrationOptions): Promise<MigrationResult>;
13
+ export interface MigrationOptions {
14
+ backupOldConfig?: boolean;
15
+ dryRun?: boolean;
16
+ verbose?: boolean;
17
+ }
18
+ export interface MigrationResult {
19
+ success: boolean;
20
+ profilesCreated: string[];
21
+ projectsCreated: string[];
22
+ warnings: string[];
23
+ errors: string[];
24
+ }
25
+ //# sourceMappingURL=migrate-to-profiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate-to-profiles.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/migrate-to-profiles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAYH,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,eAAe,CAAC,CA0K1B;AA6ND,MAAM,WAAW,gBAAgB;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB"}
@@ -0,0 +1,350 @@
1
+ /**
2
+ * Migration Script: Single-Project → Multi-Project Profiles
3
+ *
4
+ * Converts old configuration format (single project per provider in .env)
5
+ * to new profile-based format (multiple projects in config.json + .env).
6
+ *
7
+ * Supports:
8
+ * - GitHub (.env: GITHUB_TOKEN)
9
+ * - JIRA (.env: JIRA_API_TOKEN, JIRA_EMAIL, JIRA_DOMAIN, JIRA_PROJECT_KEY)
10
+ * - Azure DevOps (.env: AZURE_DEVOPS_PAT, AZURE_DEVOPS_ORG, AZURE_DEVOPS_PROJECT)
11
+ */
12
+ import * as fs from 'fs-extra';
13
+ import * as path from 'path';
14
+ import { ProfileManager } from '../../core/sync/profile-manager';
15
+ import { ProjectContextManager } from '../../core/sync/project-context';
16
+ // ============================================================================
17
+ // Migration Script
18
+ // ============================================================================
19
+ export async function migrateToProfiles(projectRoot, options = {}) {
20
+ const { backupOldConfig = true, dryRun = false, verbose = false, } = options;
21
+ const result = {
22
+ success: false,
23
+ profilesCreated: [],
24
+ projectsCreated: [],
25
+ warnings: [],
26
+ errors: [],
27
+ };
28
+ try {
29
+ // Step 1: Detect old configuration
30
+ const oldConfig = await detectOldConfiguration(projectRoot);
31
+ if (!oldConfig.detected) {
32
+ result.warnings.push('No old configuration detected. Already using profiles?');
33
+ result.success = true;
34
+ return result;
35
+ }
36
+ if (verbose) {
37
+ console.log('🔍 Detected old configuration:');
38
+ console.log(` GitHub: ${oldConfig.github ? 'Yes' : 'No'}`);
39
+ console.log(` JIRA: ${oldConfig.jira ? 'Yes' : 'No'}`);
40
+ console.log(` Azure DevOps: ${oldConfig.ado ? 'Yes' : 'No'}`);
41
+ console.log('');
42
+ }
43
+ // Step 2: Backup old configuration
44
+ if (backupOldConfig && !dryRun) {
45
+ await backupConfiguration(projectRoot);
46
+ if (verbose) {
47
+ console.log('✅ Backed up old configuration to .specweave/config.json.backup');
48
+ console.log('');
49
+ }
50
+ }
51
+ // Step 3: Create managers
52
+ const profileMgr = new ProfileManager(projectRoot);
53
+ const projectMgr = new ProjectContextManager(projectRoot);
54
+ await profileMgr.load();
55
+ await projectMgr.load();
56
+ // Step 4: Migrate GitHub profile
57
+ if (oldConfig.github) {
58
+ try {
59
+ const profile = createGitHubProfile(oldConfig.github);
60
+ if (!dryRun) {
61
+ await profileMgr.createProfile('default-github', profile);
62
+ }
63
+ result.profilesCreated.push('default-github');
64
+ if (verbose) {
65
+ console.log('✅ Created GitHub profile: default-github');
66
+ console.log(` Repository: ${oldConfig.github.owner}/${oldConfig.github.repo}`);
67
+ console.log('');
68
+ }
69
+ }
70
+ catch (error) {
71
+ result.errors.push(`GitHub migration failed: ${error.message}`);
72
+ }
73
+ }
74
+ // Step 5: Migrate JIRA profile
75
+ if (oldConfig.jira) {
76
+ try {
77
+ const profile = createJiraProfile(oldConfig.jira);
78
+ if (!dryRun) {
79
+ await profileMgr.createProfile('default-jira', profile);
80
+ }
81
+ result.profilesCreated.push('default-jira');
82
+ if (verbose) {
83
+ console.log('✅ Created JIRA profile: default-jira');
84
+ console.log(` Project: ${oldConfig.jira.domain} (${oldConfig.jira.projectKey})`);
85
+ console.log('');
86
+ }
87
+ }
88
+ catch (error) {
89
+ result.errors.push(`JIRA migration failed: ${error.message}`);
90
+ }
91
+ }
92
+ // Step 6: Migrate Azure DevOps profile
93
+ if (oldConfig.ado) {
94
+ try {
95
+ const profile = createAdoProfile(oldConfig.ado);
96
+ if (!dryRun) {
97
+ await profileMgr.createProfile('default-ado', profile);
98
+ }
99
+ result.profilesCreated.push('default-ado');
100
+ if (verbose) {
101
+ console.log('✅ Created Azure DevOps profile: default-ado');
102
+ console.log(` Project: ${oldConfig.ado.organization}/${oldConfig.ado.project}`);
103
+ console.log('');
104
+ }
105
+ }
106
+ catch (error) {
107
+ result.errors.push(`Azure DevOps migration failed: ${error.message}`);
108
+ }
109
+ }
110
+ // Step 7: Create default project context
111
+ if (result.profilesCreated.length > 0) {
112
+ try {
113
+ const projectId = 'default';
114
+ const projectName = await detectProjectName(projectRoot);
115
+ if (!dryRun) {
116
+ await projectMgr.createProject(projectId, {
117
+ name: projectName,
118
+ description: 'Default project (auto-migrated)',
119
+ keywords: [projectName.toLowerCase(), 'default'],
120
+ defaultSyncProfile: result.profilesCreated[0], // Use first created profile
121
+ specsFolder: `.specweave/docs/internal/specs/${projectId}`,
122
+ });
123
+ }
124
+ result.projectsCreated.push(projectId);
125
+ if (verbose) {
126
+ console.log('✅ Created default project context');
127
+ console.log(` Name: ${projectName}`);
128
+ console.log(` Default profile: ${result.profilesCreated[0]}`);
129
+ console.log('');
130
+ }
131
+ }
132
+ catch (error) {
133
+ result.warnings.push(`Project context creation failed: ${error.message}`);
134
+ }
135
+ }
136
+ // Step 8: Clean up old config entries (remove provider-specific settings from config.json)
137
+ if (!dryRun) {
138
+ await cleanupOldConfig(projectRoot);
139
+ }
140
+ result.success = result.errors.length === 0;
141
+ // Final summary
142
+ if (verbose) {
143
+ console.log('📊 Migration Summary:');
144
+ console.log(` Profiles created: ${result.profilesCreated.length}`);
145
+ console.log(` Projects created: ${result.projectsCreated.length}`);
146
+ console.log(` Warnings: ${result.warnings.length}`);
147
+ console.log(` Errors: ${result.errors.length}`);
148
+ console.log('');
149
+ if (result.success) {
150
+ console.log('✅ Migration completed successfully!');
151
+ console.log('');
152
+ console.log('Next steps:');
153
+ console.log(' 1. Review profiles: /specweave:sync-profile list');
154
+ console.log(' 2. Test sync: Use updated sync commands');
155
+ console.log(' 3. Keep backup: .specweave/config.json.backup (until confirmed working)');
156
+ }
157
+ else {
158
+ console.log('⚠️ Migration completed with errors:');
159
+ result.errors.forEach((err) => console.log(` • ${err}`));
160
+ }
161
+ }
162
+ return result;
163
+ }
164
+ catch (error) {
165
+ result.errors.push(`Migration failed: ${error.message}`);
166
+ result.success = false;
167
+ return result;
168
+ }
169
+ }
170
+ // ============================================================================
171
+ // Detection
172
+ // ============================================================================
173
+ async function detectOldConfiguration(projectRoot) {
174
+ const envPath = path.join(projectRoot, '.env');
175
+ const config = {
176
+ detected: false,
177
+ };
178
+ try {
179
+ // Read .env file
180
+ const envContent = await fs.readFile(envPath, 'utf-8');
181
+ const envVars = parseEnv(envContent);
182
+ // Detect GitHub configuration
183
+ if (envVars.GITHUB_TOKEN) {
184
+ const repoInfo = await detectGitHubRepo(projectRoot);
185
+ if (repoInfo) {
186
+ config.github = repoInfo;
187
+ config.detected = true;
188
+ }
189
+ }
190
+ // Detect JIRA configuration
191
+ if (envVars.JIRA_API_TOKEN && envVars.JIRA_EMAIL) {
192
+ if (envVars.JIRA_DOMAIN && envVars.JIRA_PROJECT_KEY) {
193
+ config.jira = {
194
+ domain: envVars.JIRA_DOMAIN,
195
+ projectKey: envVars.JIRA_PROJECT_KEY,
196
+ };
197
+ config.detected = true;
198
+ }
199
+ }
200
+ // Detect Azure DevOps configuration
201
+ if (envVars.AZURE_DEVOPS_PAT) {
202
+ if (envVars.AZURE_DEVOPS_ORG && envVars.AZURE_DEVOPS_PROJECT) {
203
+ config.ado = {
204
+ organization: envVars.AZURE_DEVOPS_ORG,
205
+ project: envVars.AZURE_DEVOPS_PROJECT,
206
+ };
207
+ config.detected = true;
208
+ }
209
+ }
210
+ return config;
211
+ }
212
+ catch (error) {
213
+ // .env doesn't exist or unreadable
214
+ return config;
215
+ }
216
+ }
217
+ async function detectGitHubRepo(projectRoot) {
218
+ try {
219
+ const { execFileNoThrow } = require('../../utils/execFileNoThrow.js');
220
+ const result = await execFileNoThrow('git', ['remote', 'get-url', 'origin'], {
221
+ cwd: projectRoot,
222
+ });
223
+ if (result.status !== 0) {
224
+ return null;
225
+ }
226
+ const remote = result.stdout.trim();
227
+ const match = remote.match(/github\.com[:/](.+)\/(.+?)(?:\.git)?$/);
228
+ if (!match) {
229
+ return null;
230
+ }
231
+ return {
232
+ owner: match[1],
233
+ repo: match[2],
234
+ };
235
+ }
236
+ catch {
237
+ return null;
238
+ }
239
+ }
240
+ async function detectProjectName(projectRoot) {
241
+ try {
242
+ // Try package.json
243
+ const pkgPath = path.join(projectRoot, 'package.json');
244
+ if (await fs.pathExists(pkgPath)) {
245
+ const pkg = await fs.readJSON(pkgPath);
246
+ if (pkg.name) {
247
+ return pkg.name;
248
+ }
249
+ }
250
+ // Fallback to directory name
251
+ return path.basename(projectRoot);
252
+ }
253
+ catch {
254
+ return path.basename(projectRoot);
255
+ }
256
+ }
257
+ function parseEnv(content) {
258
+ const vars = {};
259
+ for (const line of content.split('\n')) {
260
+ const trimmed = line.trim();
261
+ // Skip comments and empty lines
262
+ if (!trimmed || trimmed.startsWith('#')) {
263
+ continue;
264
+ }
265
+ // Parse KEY=VALUE
266
+ const match = trimmed.match(/^([A-Z_]+)=(.+)$/);
267
+ if (match) {
268
+ vars[match[1]] = match[2];
269
+ }
270
+ }
271
+ return vars;
272
+ }
273
+ // ============================================================================
274
+ // Profile Creation
275
+ // ============================================================================
276
+ function createGitHubProfile(config) {
277
+ return {
278
+ provider: 'github',
279
+ displayName: `${config.owner}/${config.repo}`,
280
+ description: 'Auto-migrated from old configuration',
281
+ config: {
282
+ owner: config.owner,
283
+ repo: config.repo,
284
+ },
285
+ timeRange: {
286
+ default: '1M',
287
+ max: '6M',
288
+ },
289
+ rateLimits: {
290
+ maxItemsPerSync: 500,
291
+ warnThreshold: 100,
292
+ },
293
+ };
294
+ }
295
+ function createJiraProfile(config) {
296
+ return {
297
+ provider: 'jira',
298
+ displayName: `${config.domain} (${config.projectKey})`,
299
+ description: 'Auto-migrated from old configuration',
300
+ config: {
301
+ domain: config.domain,
302
+ projectKey: config.projectKey,
303
+ issueType: 'Epic',
304
+ },
305
+ timeRange: {
306
+ default: '1M',
307
+ max: '3M',
308
+ },
309
+ rateLimits: {
310
+ maxItemsPerSync: 200,
311
+ warnThreshold: 50,
312
+ },
313
+ };
314
+ }
315
+ function createAdoProfile(config) {
316
+ return {
317
+ provider: 'ado',
318
+ displayName: `${config.organization}/${config.project}`,
319
+ description: 'Auto-migrated from old configuration',
320
+ config: {
321
+ organization: config.organization,
322
+ project: config.project,
323
+ workItemType: 'Epic',
324
+ },
325
+ timeRange: {
326
+ default: '1M',
327
+ max: '1Y',
328
+ },
329
+ rateLimits: {
330
+ maxItemsPerSync: 500,
331
+ warnThreshold: 100,
332
+ },
333
+ };
334
+ }
335
+ // ============================================================================
336
+ // Backup & Cleanup
337
+ // ============================================================================
338
+ async function backupConfiguration(projectRoot) {
339
+ const configPath = path.join(projectRoot, '.specweave', 'config.json');
340
+ const backupPath = path.join(projectRoot, '.specweave', 'config.json.backup');
341
+ if (await fs.pathExists(configPath)) {
342
+ await fs.copy(configPath, backupPath);
343
+ }
344
+ }
345
+ async function cleanupOldConfig(projectRoot) {
346
+ // Remove old provider-specific settings from config.json (if any existed)
347
+ // For now, no cleanup needed since old config was in .env only
348
+ // Keep .env variables for credentials (they're still needed)
349
+ }
350
+ //# sourceMappingURL=migrate-to-profiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate-to-profiles.js","sourceRoot":"","sources":["../../../src/cli/commands/migrate-to-profiles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAGxE,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,WAAmB,EACnB,UAA4B,EAAE;IAE9B,MAAM,EACJ,eAAe,GAAG,IAAI,EACtB,MAAM,GAAG,KAAK,EACd,OAAO,GAAG,KAAK,GAChB,GAAG,OAAO,CAAC;IAEZ,MAAM,MAAM,GAAoB;QAC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AU,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;IAE9E,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACpC,MAAM,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACxC,CAAC;AACH,CAAC;AAED,KAAK,UAAU,gBAAgB,CAAC,WAAmB;IACjD,0EAA0E;IAC1E,+DAA+D;IAC/D,6DAA6D;AAC/D,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * CLI Command: /specweave:switch-project
3
+ *
4
+ * Switch active project for increment planning
5
+ */
6
+ export declare function switchProject(projectRoot: string, projectId?: string): Promise<void>;
7
+ /**
8
+ * Get current active project
9
+ *
10
+ * @param projectRoot - Project root directory
11
+ */
12
+ export declare function getCurrentProject(projectRoot: string): Promise<void>;
13
+ //# sourceMappingURL=switch-project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch-project.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/switch-project.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,wBAAsB,aAAa,CACjC,WAAW,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CA4Df;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA4B1E"}