specweave 0.28.32 → 0.28.34

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 (39) hide show
  1. package/dist/plugins/specweave-github/lib/github-client-v2.d.ts +14 -0
  2. package/dist/plugins/specweave-github/lib/github-client-v2.d.ts.map +1 -1
  3. package/dist/plugins/specweave-github/lib/github-client-v2.js +57 -0
  4. package/dist/plugins/specweave-github/lib/github-client-v2.js.map +1 -1
  5. package/dist/src/cli/helpers/init/external-import.js +4 -0
  6. package/dist/src/cli/helpers/init/external-import.js.map +1 -1
  7. package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -1
  8. package/dist/src/core/living-docs/living-docs-sync.js +15 -0
  9. package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
  10. package/dist/src/importers/import-coordinator.d.ts +1 -0
  11. package/dist/src/importers/import-coordinator.d.ts.map +1 -1
  12. package/dist/src/importers/import-coordinator.js +3 -0
  13. package/dist/src/importers/import-coordinator.js.map +1 -1
  14. package/dist/src/living-docs/fs-id-allocator.d.ts +11 -0
  15. package/dist/src/living-docs/fs-id-allocator.d.ts.map +1 -1
  16. package/dist/src/living-docs/fs-id-allocator.js +24 -0
  17. package/dist/src/living-docs/fs-id-allocator.js.map +1 -1
  18. package/dist/src/sync/github-reconciler.d.ts +94 -0
  19. package/dist/src/sync/github-reconciler.d.ts.map +1 -0
  20. package/dist/src/sync/github-reconciler.js +435 -0
  21. package/dist/src/sync/github-reconciler.js.map +1 -0
  22. package/package.json +1 -1
  23. package/plugins/specweave/hooks/hooks.json +10 -0
  24. package/plugins/specweave/hooks/post-increment-status-change.sh +123 -32
  25. package/plugins/specweave/hooks/session-start-reconcile.sh +139 -0
  26. package/plugins/specweave/lib/hooks/close-github-issues-abandoned.js +37 -0
  27. package/plugins/specweave/lib/hooks/close-github-issues-abandoned.ts +59 -0
  28. package/plugins/specweave/lib/hooks/reopen-github-issues.js +37 -0
  29. package/plugins/specweave/lib/hooks/reopen-github-issues.ts +59 -0
  30. package/plugins/specweave/lib/hooks/session-start-reconcile-worker.js +36 -0
  31. package/plugins/specweave/lib/hooks/session-start-reconcile-worker.ts +58 -0
  32. package/plugins/specweave/lib/vendor/sync/github-reconciler.d.ts +94 -0
  33. package/plugins/specweave/lib/vendor/sync/github-reconciler.js +435 -0
  34. package/plugins/specweave/lib/vendor/sync/github-reconciler.js.map +1 -0
  35. package/plugins/specweave-github/commands/specweave-github-reconcile.md +110 -0
  36. package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +24 -0
  37. package/plugins/specweave-github/lib/github-client-v2.js +55 -0
  38. package/plugins/specweave-github/lib/github-client-v2.ts +68 -0
  39. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +36 -0
@@ -1236,3 +1236,27 @@
1236
1236
  [Wed Nov 26 12:29:21 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1237
1237
  [Wed Nov 26 12:29:21 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1238
1238
  [Wed Nov 26 12:29:21 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1239
+ [Wed Nov 26 16:58:05 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1240
+ [Wed Nov 26 16:58:05 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1241
+ [Wed Nov 26 16:58:05 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1242
+ [Wed Nov 26 16:58:05 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1243
+ [Wed Nov 26 16:58:05 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1244
+ [Wed Nov 26 16:58:05 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1245
+ [Wed Nov 26 17:16:21 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1246
+ [Wed Nov 26 17:16:21 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1247
+ [Wed Nov 26 17:16:21 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1248
+ [Wed Nov 26 17:16:21 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1249
+ [Wed Nov 26 17:16:21 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1250
+ [Wed Nov 26 17:16:21 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1251
+ [Wed Nov 26 17:18:50 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1252
+ [Wed Nov 26 17:18:50 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1253
+ [Wed Nov 26 17:18:51 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1254
+ [Wed Nov 26 17:18:51 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1255
+ [Wed Nov 26 17:18:51 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1256
+ [Wed Nov 26 17:18:51 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1257
+ [Wed Nov 26 17:21:20 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1258
+ [Wed Nov 26 17:21:20 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1259
+ [Wed Nov 26 17:21:20 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1260
+ [Wed Nov 26 17:21:20 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
1261
+ [Wed Nov 26 17:21:20 EST 2025] [GitHub] 🔗 GitHub sync hook fired
1262
+ [Wed Nov 26 17:21:20 EST 2025] [GitHub] ⚠️ sync-spec-content CLI not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-github/hooks/dist/src/cli/commands/sync-spec-content.js, skipping sync
@@ -364,6 +364,29 @@ ${body}`;
364
364
  );
365
365
  }
366
366
  }
367
+ /**
368
+ * Reopen a closed issue (NEW in v0.28.33)
369
+ *
370
+ * Used by GitHub reconciliation when increment is resumed/reopened
371
+ * and the GitHub issue should reflect that state.
372
+ */
373
+ async reopenIssue(issueNumber, comment) {
374
+ if (comment) {
375
+ await this.addComment(issueNumber, comment);
376
+ }
377
+ const result = await execFileNoThrow("gh", [
378
+ "issue",
379
+ "reopen",
380
+ String(issueNumber),
381
+ "--repo",
382
+ this.fullRepo
383
+ ]);
384
+ if (result.exitCode !== 0) {
385
+ throw new Error(
386
+ `Failed to reopen issue #${issueNumber}: ${result.stderr || result.stdout}`
387
+ );
388
+ }
389
+ }
367
390
  /**
368
391
  * Add comment to issue
369
392
  */
@@ -430,6 +453,38 @@ ${body}`;
430
453
  );
431
454
  }
432
455
  }
456
+ /**
457
+ * Search for issues by feature ID and user story pattern (NEW in v0.28.33)
458
+ *
459
+ * Searches for issues with title matching pattern: [FS-XXX][US-YYY]
460
+ * Used by GitHubReconciler to find issues not stored in metadata.json
461
+ */
462
+ async searchIssuesByFeature(featureId, userStoryId) {
463
+ const pattern = userStoryId ? `[${featureId}][${userStoryId}]` : `[${featureId}]`;
464
+ const result = await execFileNoThrow("gh", [
465
+ "issue",
466
+ "list",
467
+ "--repo",
468
+ this.fullRepo,
469
+ "--search",
470
+ `"${pattern}" in:title`,
471
+ "--json",
472
+ "number,title,state,url",
473
+ "--state",
474
+ "all",
475
+ // Include both open and closed
476
+ "--limit",
477
+ "100"
478
+ ]);
479
+ if (result.exitCode !== 0 || !result.stdout) {
480
+ return [];
481
+ }
482
+ try {
483
+ return JSON.parse(result.stdout);
484
+ } catch {
485
+ return [];
486
+ }
487
+ }
433
488
  // ==========================================================================
434
489
  // Time Range Filtering
435
490
  // ==========================================================================
@@ -477,6 +477,32 @@ export class GitHubClientV2 {
477
477
  }
478
478
  }
479
479
 
480
+ /**
481
+ * Reopen a closed issue (NEW in v0.28.33)
482
+ *
483
+ * Used by GitHub reconciliation when increment is resumed/reopened
484
+ * and the GitHub issue should reflect that state.
485
+ */
486
+ async reopenIssue(issueNumber: number, comment?: string): Promise<void> {
487
+ if (comment) {
488
+ await this.addComment(issueNumber, comment);
489
+ }
490
+
491
+ const result = await execFileNoThrow('gh', [
492
+ 'issue',
493
+ 'reopen',
494
+ String(issueNumber),
495
+ '--repo',
496
+ this.fullRepo,
497
+ ]);
498
+
499
+ if (result.exitCode !== 0) {
500
+ throw new Error(
501
+ `Failed to reopen issue #${issueNumber}: ${result.stderr || result.stdout}`
502
+ );
503
+ }
504
+ }
505
+
480
506
  /**
481
507
  * Add comment to issue
482
508
  */
@@ -556,6 +582,48 @@ export class GitHubClientV2 {
556
582
  }
557
583
  }
558
584
 
585
+ /**
586
+ * Search for issues by feature ID and user story pattern (NEW in v0.28.33)
587
+ *
588
+ * Searches for issues with title matching pattern: [FS-XXX][US-YYY]
589
+ * Used by GitHubReconciler to find issues not stored in metadata.json
590
+ */
591
+ async searchIssuesByFeature(
592
+ featureId: string,
593
+ userStoryId?: string
594
+ ): Promise<GitHubIssue[]> {
595
+ // Build search pattern
596
+ // e.g., "[FS-063]" or "[FS-063][US-001]"
597
+ const pattern = userStoryId
598
+ ? `[${featureId}][${userStoryId}]`
599
+ : `[${featureId}]`;
600
+
601
+ const result = await execFileNoThrow('gh', [
602
+ 'issue',
603
+ 'list',
604
+ '--repo',
605
+ this.fullRepo,
606
+ '--search',
607
+ `"${pattern}" in:title`,
608
+ '--json',
609
+ 'number,title,state,url',
610
+ '--state',
611
+ 'all', // Include both open and closed
612
+ '--limit',
613
+ '100',
614
+ ]);
615
+
616
+ if (result.exitCode !== 0 || !result.stdout) {
617
+ return [];
618
+ }
619
+
620
+ try {
621
+ return JSON.parse(result.stdout);
622
+ } catch {
623
+ return [];
624
+ }
625
+ }
626
+
559
627
  // ==========================================================================
560
628
  // Time Range Filtering
561
629
  // ==========================================================================
@@ -1216,3 +1216,39 @@
1216
1216
  [2025-11-26 12:29:21] 🎯 Post-Increment-Completion Hook Triggered
1217
1217
  [2025-11-26 12:29:21] ⚠️ DORA calculator not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-release/hooks/dist/src/metrics/dora-calculator.js
1218
1218
  [2025-11-26 12:29:21] Run: npm run build
1219
+ [2025-11-26 16:58:05] 🎯 Post-Increment-Completion Hook Triggered
1220
+ [2025-11-26 16:58:05] ⚠️ DORA calculator not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-release/hooks/dist/src/metrics/dora-calculator.js
1221
+ [2025-11-26 16:58:05] Run: npm run build
1222
+ [2025-11-26 16:58:05] 🎯 Post-Increment-Completion Hook Triggered
1223
+ [2025-11-26 16:58:05] ⚠️ DORA calculator not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-release/hooks/dist/src/metrics/dora-calculator.js
1224
+ [2025-11-26 16:58:05] Run: npm run build
1225
+ [2025-11-26 16:58:05] 🎯 Post-Increment-Completion Hook Triggered
1226
+ [2025-11-26 16:58:05] ⚠️ DORA calculator not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-release/hooks/dist/src/metrics/dora-calculator.js
1227
+ [2025-11-26 16:58:05] Run: npm run build
1228
+ [2025-11-26 17:16:21] 🎯 Post-Increment-Completion Hook Triggered
1229
+ [2025-11-26 17:16:21] ⚠️ DORA calculator not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-release/hooks/dist/src/metrics/dora-calculator.js
1230
+ [2025-11-26 17:16:21] Run: npm run build
1231
+ [2025-11-26 17:16:21] 🎯 Post-Increment-Completion Hook Triggered
1232
+ [2025-11-26 17:16:21] ⚠️ DORA calculator not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-release/hooks/dist/src/metrics/dora-calculator.js
1233
+ [2025-11-26 17:16:21] Run: npm run build
1234
+ [2025-11-26 17:16:21] 🎯 Post-Increment-Completion Hook Triggered
1235
+ [2025-11-26 17:16:21] ⚠️ DORA calculator not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-release/hooks/dist/src/metrics/dora-calculator.js
1236
+ [2025-11-26 17:16:21] Run: npm run build
1237
+ [2025-11-26 17:18:51] 🎯 Post-Increment-Completion Hook Triggered
1238
+ [2025-11-26 17:18:51] ⚠️ DORA calculator not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-release/hooks/dist/src/metrics/dora-calculator.js
1239
+ [2025-11-26 17:18:51] Run: npm run build
1240
+ [2025-11-26 17:18:51] 🎯 Post-Increment-Completion Hook Triggered
1241
+ [2025-11-26 17:18:51] ⚠️ DORA calculator not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-release/hooks/dist/src/metrics/dora-calculator.js
1242
+ [2025-11-26 17:18:51] Run: npm run build
1243
+ [2025-11-26 17:18:51] 🎯 Post-Increment-Completion Hook Triggered
1244
+ [2025-11-26 17:18:51] ⚠️ DORA calculator not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-release/hooks/dist/src/metrics/dora-calculator.js
1245
+ [2025-11-26 17:18:51] Run: npm run build
1246
+ [2025-11-26 17:21:20] 🎯 Post-Increment-Completion Hook Triggered
1247
+ [2025-11-26 17:21:20] ⚠️ DORA calculator not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-release/hooks/dist/src/metrics/dora-calculator.js
1248
+ [2025-11-26 17:21:20] Run: npm run build
1249
+ [2025-11-26 17:21:20] 🎯 Post-Increment-Completion Hook Triggered
1250
+ [2025-11-26 17:21:20] ⚠️ DORA calculator not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-release/hooks/dist/src/metrics/dora-calculator.js
1251
+ [2025-11-26 17:21:20] Run: npm run build
1252
+ [2025-11-26 17:21:20] 🎯 Post-Increment-Completion Hook Triggered
1253
+ [2025-11-26 17:21:20] ⚠️ DORA calculator not found at /Users/antonabyzov/Projects/github/specweave/plugins/specweave-release/hooks/dist/src/metrics/dora-calculator.js
1254
+ [2025-11-26 17:21:20] Run: npm run build