@schnick371/devsteps-shared 0.7.0-next.3 → 0.8.1-next.1

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 (74) hide show
  1. package/dist/core/add.d.ts +2 -3
  2. package/dist/core/add.d.ts.map +1 -1
  3. package/dist/core/add.js +58 -37
  4. package/dist/core/add.js.map +1 -1
  5. package/dist/core/archive.d.ts.map +1 -1
  6. package/dist/core/archive.js +35 -25
  7. package/dist/core/archive.js.map +1 -1
  8. package/dist/core/auto-migrate.d.ts +154 -0
  9. package/dist/core/auto-migrate.d.ts.map +1 -0
  10. package/dist/core/auto-migrate.js +383 -0
  11. package/dist/core/auto-migrate.js.map +1 -0
  12. package/dist/core/auto-migrate.test.d.ts +7 -0
  13. package/dist/core/auto-migrate.test.d.ts.map +1 -0
  14. package/dist/core/auto-migrate.test.js +364 -0
  15. package/dist/core/auto-migrate.test.js.map +1 -0
  16. package/dist/core/index-rebuild.d.ts +75 -0
  17. package/dist/core/index-rebuild.d.ts.map +1 -0
  18. package/dist/core/index-rebuild.js +260 -0
  19. package/dist/core/index-rebuild.js.map +1 -0
  20. package/dist/core/index-rebuild.test.d.ts +8 -0
  21. package/dist/core/index-rebuild.test.d.ts.map +1 -0
  22. package/dist/core/index-rebuild.test.js +582 -0
  23. package/dist/core/index-rebuild.test.js.map +1 -0
  24. package/dist/core/index-refs.d.ts +155 -0
  25. package/dist/core/index-refs.d.ts.map +1 -0
  26. package/dist/core/index-refs.js +442 -0
  27. package/dist/core/index-refs.js.map +1 -0
  28. package/dist/core/index-refs.test.d.ts +7 -0
  29. package/dist/core/index-refs.test.d.ts.map +1 -0
  30. package/dist/core/index-refs.test.js +367 -0
  31. package/dist/core/index-refs.test.js.map +1 -0
  32. package/dist/core/index.d.ts +3 -0
  33. package/dist/core/index.d.ts.map +1 -1
  34. package/dist/core/index.js +6 -0
  35. package/dist/core/index.js.map +1 -1
  36. package/dist/core/list.d.ts +2 -3
  37. package/dist/core/list.d.ts.map +1 -1
  38. package/dist/core/list.js +67 -12
  39. package/dist/core/list.js.map +1 -1
  40. package/dist/core/update.d.ts +1 -2
  41. package/dist/core/update.d.ts.map +1 -1
  42. package/dist/core/update.js +30 -21
  43. package/dist/core/update.js.map +1 -1
  44. package/dist/migration/fix-missing-eisenhower.d.ts +8 -0
  45. package/dist/migration/fix-missing-eisenhower.d.ts.map +1 -0
  46. package/dist/migration/fix-missing-eisenhower.js +58 -0
  47. package/dist/migration/fix-missing-eisenhower.js.map +1 -0
  48. package/dist/migration/remove-priority-field.d.ts +15 -0
  49. package/dist/migration/remove-priority-field.d.ts.map +1 -0
  50. package/dist/migration/remove-priority-field.js +113 -0
  51. package/dist/migration/remove-priority-field.js.map +1 -0
  52. package/dist/schemas/index-refs.schema.d.ts +103 -0
  53. package/dist/schemas/index-refs.schema.d.ts.map +1 -0
  54. package/dist/schemas/index-refs.schema.js +88 -0
  55. package/dist/schemas/index-refs.schema.js.map +1 -0
  56. package/dist/schemas/index.d.ts +7 -22
  57. package/dist/schemas/index.d.ts.map +1 -1
  58. package/dist/schemas/index.js +3 -7
  59. package/dist/schemas/index.js.map +1 -1
  60. package/dist/types/commands.d.ts +2 -5
  61. package/dist/types/commands.d.ts.map +1 -1
  62. package/dist/types/index-refs.types.d.ts +123 -0
  63. package/dist/types/index-refs.types.d.ts.map +1 -0
  64. package/dist/types/index-refs.types.js +71 -0
  65. package/dist/types/index-refs.types.js.map +1 -0
  66. package/dist/types/index.d.ts +2 -1
  67. package/dist/types/index.d.ts.map +1 -1
  68. package/dist/types/index.js +1 -0
  69. package/dist/types/index.js.map +1 -1
  70. package/dist/utils/index.d.ts +6 -0
  71. package/dist/utils/index.d.ts.map +1 -1
  72. package/dist/utils/index.js +26 -8
  73. package/dist/utils/index.js.map +1 -1
  74. package/package.json +1 -1
@@ -0,0 +1,383 @@
1
+ /**
2
+ * Auto-Migration Module
3
+ *
4
+ * Provides auto-detection and migration for external DevSteps projects.
5
+ * Safely migrates from legacy index.json to refs-style distributed index.
6
+ *
7
+ * Safe to call repeatedly - only migrates once.
8
+ *
9
+ * @see STORY-073 External Project Migration Auto-Detection
10
+ * @see EPIC-018 Index Architecture Refactoring
11
+ */
12
+ import { existsSync, readFileSync, writeFileSync, renameSync, mkdirSync, readdirSync, rmdirSync } from 'node:fs';
13
+ import { join } from 'node:path';
14
+ import { hasLegacyIndex, hasRefsStyleIndex, loadLegacyIndex, initializeRefsStyleIndex, addItemToIndex, loadAllIndexes, getIndexPaths, } from './index-refs.js';
15
+ /**
16
+ * Helper: Get type folder name
17
+ */
18
+ function getTypeFolder(type) {
19
+ const map = {
20
+ epic: 'epics',
21
+ story: 'stories',
22
+ task: 'tasks',
23
+ bug: 'bugs',
24
+ spike: 'spikes',
25
+ test: 'tests',
26
+ feature: 'features',
27
+ requirement: 'requirements',
28
+ };
29
+ return map[type] || 'tasks';
30
+ }
31
+ /**
32
+ * Check if migration is needed
33
+ *
34
+ * Migration is needed when:
35
+ * - Legacy index.json exists
36
+ * - Refs-style index/ doesn't exist
37
+ *
38
+ * @param devstepsDir Path to .devsteps directory
39
+ * @returns Migration check result with details
40
+ *
41
+ * @example
42
+ * ```typescript
43
+ * const result = checkMigrationNeeded('/path/to/.devsteps');
44
+ * if (result.needed) {
45
+ * console.log(result.message);
46
+ * await ensureIndexMigrated('/path/to/.devsteps');
47
+ * }
48
+ * ```
49
+ */
50
+ export function checkMigrationNeeded(devstepsDir) {
51
+ if (!existsSync(devstepsDir)) {
52
+ return {
53
+ needed: false,
54
+ hasLegacy: false,
55
+ hasRefs: false,
56
+ message: 'Not a DevSteps project (no .devsteps directory)',
57
+ };
58
+ }
59
+ const hasLegacy = hasLegacyIndex(devstepsDir);
60
+ const hasRefs = hasRefsStyleIndex(devstepsDir);
61
+ // Already migrated
62
+ if (!hasLegacy && hasRefs) {
63
+ return {
64
+ needed: false,
65
+ hasLegacy: false,
66
+ hasRefs: true,
67
+ message: 'Project already using refs-style index ✓',
68
+ };
69
+ }
70
+ // Both exist - error state (migration partially completed?)
71
+ if (hasLegacy && hasRefs) {
72
+ return {
73
+ needed: false,
74
+ hasLegacy: true,
75
+ hasRefs: true,
76
+ message: 'Both index formats exist - manual intervention required',
77
+ };
78
+ }
79
+ // No index at all - new project
80
+ if (!hasLegacy && !hasRefs) {
81
+ return {
82
+ needed: false,
83
+ hasLegacy: false,
84
+ hasRefs: false,
85
+ message: 'No index found - new project or not initialized',
86
+ };
87
+ }
88
+ // Migration needed
89
+ let itemCount;
90
+ try {
91
+ const legacy = loadLegacyIndex(devstepsDir);
92
+ itemCount = legacy.items.length;
93
+ }
94
+ catch (error) {
95
+ // Ignore - legacy index might be corrupted
96
+ }
97
+ return {
98
+ needed: true,
99
+ hasLegacy: true,
100
+ hasRefs: false,
101
+ itemCount,
102
+ message: `Migration needed: ${itemCount ?? 'unknown'} items to migrate`,
103
+ };
104
+ }
105
+ /**
106
+ * Perform index migration (internal implementation)
107
+ *
108
+ * This is the core migration logic without console output.
109
+ * Use ensureIndexMigrated() for auto-migration with user feedback.
110
+ *
111
+ * @param devstepsDir Path to .devsteps directory
112
+ * @param options Migration options
113
+ * @returns Migration statistics
114
+ * @throws Error if migration fails or preconditions not met
115
+ * @internal
116
+ */
117
+ export async function performMigration(devstepsDir, options = {}) {
118
+ const { skipBackup = false } = options;
119
+ const paths = getIndexPaths(devstepsDir);
120
+ // Pre-flight checks
121
+ if (!existsSync(devstepsDir)) {
122
+ throw new Error('.devsteps directory not found. Is this a DevSteps project?');
123
+ }
124
+ if (!hasLegacyIndex(devstepsDir)) {
125
+ throw new Error('No index.json found. Nothing to migrate.');
126
+ }
127
+ if (hasRefsStyleIndex(devstepsDir)) {
128
+ throw new Error('Refs-style index already exists. Aborting to prevent data loss.');
129
+ }
130
+ const stats = {
131
+ totalItems: 0,
132
+ byType: {},
133
+ byStatus: {},
134
+ byPriority: {},
135
+ };
136
+ // Backup old index
137
+ const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
138
+ if (!skipBackup) {
139
+ const backupPath = `${paths.legacy}.backup-${timestamp}`;
140
+ const indexContent = readFileSync(paths.legacy, 'utf-8');
141
+ writeFileSync(backupPath, indexContent);
142
+ stats.backupPath = backupPath;
143
+ }
144
+ // Load and validate old index
145
+ const indexContent = readFileSync(paths.legacy, 'utf-8');
146
+ const legacyIndex = JSON.parse(indexContent);
147
+ const itemCount = legacyIndex.items.length;
148
+ // Initialize new index structure
149
+ initializeRefsStyleIndex(devstepsDir, legacyIndex.counters || {});
150
+ // Migrate items
151
+ for (const item of legacyIndex.items) {
152
+ // Load full metadata for each item to get eisenhower quadrant
153
+ const typeFolder = getTypeFolder(item.type);
154
+ const metadataPath = join(devstepsDir, typeFolder, `${item.id}.json`);
155
+ if (!existsSync(metadataPath)) {
156
+ // Skip items with missing metadata
157
+ continue;
158
+ }
159
+ const metadata = JSON.parse(readFileSync(metadataPath, 'utf-8'));
160
+ addItemToIndex(devstepsDir, metadata);
161
+ stats.totalItems++;
162
+ stats.byType[item.type] = (stats.byType[item.type] || 0) + 1;
163
+ stats.byStatus[item.status] = (stats.byStatus[item.status] || 0) + 1;
164
+ stats.byPriority[metadata.eisenhower] = (stats.byPriority[metadata.eisenhower] || 0) + 1;
165
+ }
166
+ // Verify migration
167
+ const newIndexes = loadAllIndexes(devstepsDir);
168
+ // Count items in new index
169
+ let newItemCount = 0;
170
+ for (const items of newIndexes.byType.values()) {
171
+ newItemCount += items.length;
172
+ }
173
+ if (newItemCount !== stats.totalItems) {
174
+ throw new Error(`Item count mismatch! Migrated: ${stats.totalItems}, Verified: ${newItemCount}`);
175
+ }
176
+ // Check for duplicates
177
+ const allIds = new Set();
178
+ for (const items of newIndexes.byType.values()) {
179
+ for (const id of items) {
180
+ if (allIds.has(id)) {
181
+ throw new Error(`Duplicate item detected: ${id}`);
182
+ }
183
+ allIds.add(id);
184
+ }
185
+ }
186
+ // Archive old index
187
+ const archivePath = `${paths.legacy}.archived-${timestamp}`;
188
+ renameSync(paths.legacy, archivePath);
189
+ stats.archivePath = archivePath;
190
+ return stats;
191
+ }
192
+ /**
193
+ * Get user-friendly status message
194
+ *
195
+ * @param devstepsDir Path to .devsteps directory
196
+ * @returns Human-readable status message
197
+ *
198
+ * @example
199
+ * ```typescript
200
+ * console.log(getMigrationStatusMessage('/path/to/.devsteps'));
201
+ * // Output: "📦 DevSteps project using refs-style index ✓"
202
+ * ```
203
+ */
204
+ export function getMigrationStatusMessage(devstepsDir) {
205
+ const result = checkMigrationNeeded(devstepsDir);
206
+ if (!existsSync(devstepsDir)) {
207
+ return '❌ Not a DevSteps project';
208
+ }
209
+ if (result.needed) {
210
+ const count = result.itemCount ?? 'unknown';
211
+ return `🔄 Migration available: ${count} items can be migrated to refs-style index`;
212
+ }
213
+ if (result.hasRefs) {
214
+ return '✅ Project using refs-style index';
215
+ }
216
+ if (result.hasLegacy && result.hasRefs) {
217
+ return '⚠️ Both index formats detected - manual cleanup needed';
218
+ }
219
+ return '📦 DevSteps project (no index yet)';
220
+ }
221
+ /**
222
+ * Automatically migrate if needed
223
+ *
224
+ * Safe to call repeatedly - only migrates once.
225
+ * Checks if migration is needed and runs it if necessary.
226
+ *
227
+ * @param devstepsDir Path to .devsteps directory
228
+ * @param options Migration options
229
+ * @returns True if migration was performed, false if not needed
230
+ * @throws Error if migration fails
231
+ *
232
+ * @example
233
+ * ```typescript
234
+ * // Auto-migrate with user feedback
235
+ * const migrated = await ensureIndexMigrated('/path/to/.devsteps');
236
+ * if (migrated) {
237
+ * console.log('✨ Migration complete!');
238
+ * }
239
+ *
240
+ * // Silent auto-migration (for background tasks)
241
+ * await ensureIndexMigrated('/path/to/.devsteps', { silent: true });
242
+ *
243
+ * // Dry-run (check only)
244
+ * const needed = await ensureIndexMigrated('/path/to/.devsteps', { dryRun: true });
245
+ * ```
246
+ */
247
+ export async function ensureIndexMigrated(devstepsDir, options = {}) {
248
+ const { silent = false, dryRun = false } = options;
249
+ // Check if migration needed
250
+ const check = checkMigrationNeeded(devstepsDir);
251
+ if (!check.needed) {
252
+ if (!silent && check.hasRefs) {
253
+ console.log('✅ Project already using refs-style index');
254
+ }
255
+ return false;
256
+ }
257
+ // Dry-run mode - just report
258
+ if (dryRun) {
259
+ if (!silent) {
260
+ console.log('🔍 Migration Check (Dry-Run)');
261
+ console.log(` Legacy index.json: ${check.hasLegacy ? '✓' : '✗'}`);
262
+ console.log(` Refs-style index: ${check.hasRefs ? '✓' : '✗'}`);
263
+ console.log(` Items to migrate: ${check.itemCount ?? 'unknown'}`);
264
+ console.log('\n✅ Migration would proceed');
265
+ }
266
+ return true;
267
+ }
268
+ // Run migration
269
+ if (!silent) {
270
+ console.log('📦 DevSteps Project Detected');
271
+ console.log(`🔍 Legacy index.json found (${check.itemCount ?? 'unknown'} items)`);
272
+ console.log('🆕 Refs-style index not found');
273
+ console.log('🔄 Auto-migrating...\n');
274
+ }
275
+ try {
276
+ // Run migration
277
+ const stats = await performMigration(devstepsDir, options);
278
+ if (!silent) {
279
+ if (stats.backupPath) {
280
+ console.log(` ✅ Backed up to: ${stats.backupPath}`);
281
+ }
282
+ console.log(` ✅ Verified: ${stats.totalItems} items migrated`);
283
+ console.log('✨ Migration complete!\n');
284
+ }
285
+ return true;
286
+ }
287
+ catch (error) {
288
+ if (!silent) {
289
+ console.error('❌ Migration failed:', error instanceof Error ? error.message : String(error));
290
+ }
291
+ throw error;
292
+ }
293
+ }
294
+ /**
295
+ * Check if items/ directory migration is needed
296
+ *
297
+ * Returns true if using flat structure (epics/, stories/)
298
+ * instead of nested structure (items/epics/, items/stories/)
299
+ */
300
+ export function needsItemsDirectoryMigration(devstepsDir) {
301
+ // Check if old flat structure exists
302
+ const hasOldStructure = existsSync(join(devstepsDir, 'epics')) ||
303
+ existsSync(join(devstepsDir, 'stories')) ||
304
+ existsSync(join(devstepsDir, 'tasks'));
305
+ // Check if new items/ structure exists
306
+ const hasNewStructure = existsSync(join(devstepsDir, 'items'));
307
+ // Need migration if old exists and new doesn't
308
+ return hasOldStructure && !hasNewStructure;
309
+ }
310
+ /**
311
+ * Migrate from flat directory structure to items/ subdirectory
312
+ *
313
+ * Moves files from:
314
+ * .devsteps/epics/EPIC-001.json → .devsteps/items/epics/EPIC-001.json
315
+ * .devsteps/stories/... → .devsteps/items/stories/...
316
+ *
317
+ * @param devstepsDir Path to .devsteps directory
318
+ * @param options Migration options
319
+ * @returns Migration statistics
320
+ */
321
+ export function migrateItemsDirectory(devstepsDir, options = {}) {
322
+ const { silent = false } = options;
323
+ if (!silent) {
324
+ console.log('📂 Migrating to items/ directory structure...');
325
+ }
326
+ const oldDirs = ['epics', 'stories', 'tasks', 'bugs', 'spikes', 'tests', 'requirements', 'features'];
327
+ const stats = { moved: 0, types: {} };
328
+ // Create items/ directory
329
+ const itemsDir = join(devstepsDir, 'items');
330
+ if (!existsSync(itemsDir)) {
331
+ mkdirSync(itemsDir, { recursive: true });
332
+ }
333
+ // Move each type directory
334
+ for (const dirName of oldDirs) {
335
+ const oldPath = join(devstepsDir, dirName);
336
+ const newPath = join(itemsDir, dirName);
337
+ if (!existsSync(oldPath))
338
+ continue;
339
+ // Create new subdirectory
340
+ mkdirSync(newPath, { recursive: true });
341
+ // Move all files
342
+ const files = readdirSync(oldPath);
343
+ let count = 0;
344
+ for (const file of files) {
345
+ const srcPath = join(oldPath, file);
346
+ const dstPath = join(newPath, file);
347
+ // Use renameSync for atomic move
348
+ renameSync(srcPath, dstPath);
349
+ count++;
350
+ }
351
+ stats.types[dirName] = count;
352
+ stats.moved += count;
353
+ // Remove old empty directory (best effort)
354
+ try {
355
+ rmdirSync(oldPath);
356
+ }
357
+ catch {
358
+ // Directory not empty or other error - ignore
359
+ }
360
+ }
361
+ if (!silent) {
362
+ console.log(` ✅ Moved ${stats.moved} files to items/ subdirectories`);
363
+ }
364
+ return stats;
365
+ }
366
+ /**
367
+ * Ensure index is migrated AND items are in correct directory structure
368
+ *
369
+ * Combines both migrations:
370
+ * 1. Legacy index.json → refs-style index/ (if needed)
371
+ * 2. Flat structure → items/ subdirectory (if needed)
372
+ *
373
+ * Safe to call on every operation - only migrates when needed.
374
+ */
375
+ export async function ensureFullMigration(devstepsDir, options = {}) {
376
+ // Step 1: Index migration (legacy → refs-style)
377
+ await ensureIndexMigrated(devstepsDir, options);
378
+ // Step 2: Directory structure migration (flat → items/)
379
+ if (needsItemsDirectoryMigration(devstepsDir)) {
380
+ migrateItemsDirectory(devstepsDir, options);
381
+ }
382
+ }
383
+ //# sourceMappingURL=auto-migrate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-migrate.js","sourceRoot":"","sources":["../../src/core/auto-migrate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAgB,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/H,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACN,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,wBAAwB,EACxB,cAAc,EACd,cAAc,EACd,aAAa,GACb,MAAM,iBAAiB,CAAC;AAkDzB;;GAEG;AACH,SAAS,aAAa,CAAC,IAAY;IAClC,MAAM,GAAG,GAA2B;QACnC,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,OAAO;QACb,GAAG,EAAE,MAAM;QACX,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,UAAU;QACnB,WAAW,EAAE,cAAc;KAC3B,CAAC;IACF,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC;AAC7B,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,oBAAoB,CAAC,WAAmB;IACvD,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAC9B,OAAO;YACN,MAAM,EAAE,KAAK;YACb,SAAS,EAAE,KAAK;YAChB,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 * Unit Tests for Auto-Migration Module
3
+ *
4
+ * @see STORY-073 External Project Migration Auto-Detection
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=auto-migrate.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-migrate.test.d.ts","sourceRoot":"","sources":["../../src/core/auto-migrate.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}