specweave 0.28.68 → 0.29.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 (318) hide show
  1. package/CLAUDE.md +3 -2
  2. package/README.md +19 -2
  3. package/dist/src/cli/commands/discrepancies.d.ts +89 -0
  4. package/dist/src/cli/commands/discrepancies.d.ts.map +1 -0
  5. package/dist/src/cli/commands/discrepancies.js +385 -0
  6. package/dist/src/cli/commands/discrepancies.js.map +1 -0
  7. package/dist/src/cli/commands/notifications.d.ts +70 -0
  8. package/dist/src/cli/commands/notifications.d.ts.map +1 -0
  9. package/dist/src/cli/commands/notifications.js +236 -0
  10. package/dist/src/cli/commands/notifications.js.map +1 -0
  11. package/dist/src/cli/commands/sync-logs.d.ts +54 -0
  12. package/dist/src/cli/commands/sync-logs.d.ts.map +1 -0
  13. package/dist/src/cli/commands/sync-logs.js +240 -0
  14. package/dist/src/cli/commands/sync-logs.js.map +1 -0
  15. package/dist/src/cli/commands/sync-monitor.d.ts +42 -0
  16. package/dist/src/cli/commands/sync-monitor.d.ts.map +1 -0
  17. package/dist/src/cli/commands/sync-monitor.js +191 -0
  18. package/dist/src/cli/commands/sync-monitor.js.map +1 -0
  19. package/dist/src/cli/helpers/init/brownfield-analysis.d.ts +45 -0
  20. package/dist/src/cli/helpers/init/brownfield-analysis.d.ts.map +1 -0
  21. package/dist/src/cli/helpers/init/brownfield-analysis.js +431 -0
  22. package/dist/src/cli/helpers/init/brownfield-analysis.js.map +1 -0
  23. package/dist/src/cli/helpers/init/index.d.ts +1 -0
  24. package/dist/src/cli/helpers/init/index.d.ts.map +1 -1
  25. package/dist/src/cli/helpers/init/index.js +2 -0
  26. package/dist/src/cli/helpers/init/index.js.map +1 -1
  27. package/dist/src/cli/workers/brownfield-worker.d.ts +66 -0
  28. package/dist/src/cli/workers/brownfield-worker.d.ts.map +1 -0
  29. package/dist/src/cli/workers/brownfield-worker.js +417 -0
  30. package/dist/src/cli/workers/brownfield-worker.js.map +1 -0
  31. package/dist/src/core/background/brownfield-launcher.d.ts +86 -0
  32. package/dist/src/core/background/brownfield-launcher.d.ts.map +1 -0
  33. package/dist/src/core/background/brownfield-launcher.js +295 -0
  34. package/dist/src/core/background/brownfield-launcher.js.map +1 -0
  35. package/dist/src/core/background/index.d.ts +2 -0
  36. package/dist/src/core/background/index.d.ts.map +1 -1
  37. package/dist/src/core/background/index.js +2 -0
  38. package/dist/src/core/background/index.js.map +1 -1
  39. package/dist/src/core/background/types.d.ts +23 -2
  40. package/dist/src/core/background/types.d.ts.map +1 -1
  41. package/dist/src/core/config/index.d.ts +1 -0
  42. package/dist/src/core/config/index.d.ts.map +1 -1
  43. package/dist/src/core/config/index.js +1 -0
  44. package/dist/src/core/config/index.js.map +1 -1
  45. package/dist/src/core/config/types.d.ts +6 -0
  46. package/dist/src/core/config/types.d.ts.map +1 -1
  47. package/dist/src/core/config/types.js.map +1 -1
  48. package/dist/src/core/dashboard/dashboard-data.d.ts +156 -0
  49. package/dist/src/core/dashboard/dashboard-data.d.ts.map +1 -0
  50. package/dist/src/core/dashboard/dashboard-data.js +191 -0
  51. package/dist/src/core/dashboard/dashboard-data.js.map +1 -0
  52. package/dist/src/core/dashboard/index.d.ts +9 -0
  53. package/dist/src/core/dashboard/index.d.ts.map +1 -0
  54. package/dist/src/core/dashboard/index.js +9 -0
  55. package/dist/src/core/dashboard/index.js.map +1 -0
  56. package/dist/src/core/discrepancy/analyzers/api-route-analyzer.d.ts +77 -0
  57. package/dist/src/core/discrepancy/analyzers/api-route-analyzer.d.ts.map +1 -0
  58. package/dist/src/core/discrepancy/analyzers/api-route-analyzer.js +286 -0
  59. package/dist/src/core/discrepancy/analyzers/api-route-analyzer.js.map +1 -0
  60. package/dist/src/core/discrepancy/analyzers/index.d.ts +8 -0
  61. package/dist/src/core/discrepancy/analyzers/index.d.ts.map +1 -0
  62. package/dist/src/core/discrepancy/analyzers/index.js +8 -0
  63. package/dist/src/core/discrepancy/analyzers/index.js.map +1 -0
  64. package/dist/src/core/discrepancy/analyzers/typescript-analyzer.d.ts +96 -0
  65. package/dist/src/core/discrepancy/analyzers/typescript-analyzer.d.ts.map +1 -0
  66. package/dist/src/core/discrepancy/analyzers/typescript-analyzer.js +247 -0
  67. package/dist/src/core/discrepancy/analyzers/typescript-analyzer.js.map +1 -0
  68. package/dist/src/core/discrepancy/brownfield-manager.d.ts +88 -0
  69. package/dist/src/core/discrepancy/brownfield-manager.d.ts.map +1 -0
  70. package/dist/src/core/discrepancy/brownfield-manager.js +520 -0
  71. package/dist/src/core/discrepancy/brownfield-manager.js.map +1 -0
  72. package/dist/src/core/discrepancy/brownfield-types.d.ts +174 -0
  73. package/dist/src/core/discrepancy/brownfield-types.d.ts.map +1 -0
  74. package/dist/src/core/discrepancy/brownfield-types.js +11 -0
  75. package/dist/src/core/discrepancy/brownfield-types.js.map +1 -0
  76. package/dist/src/core/discrepancy/detector.d.ts +92 -0
  77. package/dist/src/core/discrepancy/detector.d.ts.map +1 -0
  78. package/dist/src/core/discrepancy/detector.js +346 -0
  79. package/dist/src/core/discrepancy/detector.js.map +1 -0
  80. package/dist/src/core/discrepancy/increment-generator.d.ts +51 -0
  81. package/dist/src/core/discrepancy/increment-generator.d.ts.map +1 -0
  82. package/dist/src/core/discrepancy/increment-generator.js +234 -0
  83. package/dist/src/core/discrepancy/increment-generator.js.map +1 -0
  84. package/dist/src/core/discrepancy/index.d.ts +18 -0
  85. package/dist/src/core/discrepancy/index.d.ts.map +1 -0
  86. package/dist/src/core/discrepancy/index.js +24 -0
  87. package/dist/src/core/discrepancy/index.js.map +1 -0
  88. package/dist/src/core/discrepancy/severity-classifier.d.ts +81 -0
  89. package/dist/src/core/discrepancy/severity-classifier.d.ts.map +1 -0
  90. package/dist/src/core/discrepancy/severity-classifier.js +289 -0
  91. package/dist/src/core/discrepancy/severity-classifier.js.map +1 -0
  92. package/dist/src/core/discrepancy/spec-parser.d.ts +74 -0
  93. package/dist/src/core/discrepancy/spec-parser.d.ts.map +1 -0
  94. package/dist/src/core/discrepancy/spec-parser.js +213 -0
  95. package/dist/src/core/discrepancy/spec-parser.js.map +1 -0
  96. package/dist/src/core/discrepancy/update-recommender.d.ts +77 -0
  97. package/dist/src/core/discrepancy/update-recommender.d.ts.map +1 -0
  98. package/dist/src/core/discrepancy/update-recommender.js +323 -0
  99. package/dist/src/core/discrepancy/update-recommender.js.map +1 -0
  100. package/dist/src/core/living-docs/living-docs-sync.d.ts +13 -16
  101. package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -1
  102. package/dist/src/core/living-docs/living-docs-sync.js +31 -112
  103. package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
  104. package/dist/src/core/logs/index.d.ts +10 -0
  105. package/dist/src/core/logs/index.d.ts.map +1 -0
  106. package/dist/src/core/logs/index.js +10 -0
  107. package/dist/src/core/logs/index.js.map +1 -0
  108. package/dist/src/core/logs/log-aggregator.d.ts +130 -0
  109. package/dist/src/core/logs/log-aggregator.d.ts.map +1 -0
  110. package/dist/src/core/logs/log-aggregator.js +206 -0
  111. package/dist/src/core/logs/log-aggregator.js.map +1 -0
  112. package/dist/src/core/logs/log-exporter.d.ts +81 -0
  113. package/dist/src/core/logs/log-exporter.d.ts.map +1 -0
  114. package/dist/src/core/logs/log-exporter.js +141 -0
  115. package/dist/src/core/logs/log-exporter.js.map +1 -0
  116. package/dist/src/core/notifications/command-integration.d.ts +82 -0
  117. package/dist/src/core/notifications/command-integration.d.ts.map +1 -0
  118. package/dist/src/core/notifications/command-integration.js +80 -0
  119. package/dist/src/core/notifications/command-integration.js.map +1 -0
  120. package/dist/src/core/notifications/index.d.ts +12 -0
  121. package/dist/src/core/notifications/index.d.ts.map +1 -0
  122. package/dist/src/core/notifications/index.js +12 -0
  123. package/dist/src/core/notifications/index.js.map +1 -0
  124. package/dist/src/core/notifications/notification-display.d.ts +70 -0
  125. package/dist/src/core/notifications/notification-display.d.ts.map +1 -0
  126. package/dist/src/core/notifications/notification-display.js +177 -0
  127. package/dist/src/core/notifications/notification-display.js.map +1 -0
  128. package/dist/src/core/notifications/notification-manager.d.ts +126 -0
  129. package/dist/src/core/notifications/notification-manager.d.ts.map +1 -0
  130. package/dist/src/core/notifications/notification-manager.js +287 -0
  131. package/dist/src/core/notifications/notification-manager.js.map +1 -0
  132. package/dist/src/core/notifications/notification-types.d.ts +159 -0
  133. package/dist/src/core/notifications/notification-types.d.ts.map +1 -0
  134. package/dist/src/core/notifications/notification-types.js +93 -0
  135. package/dist/src/core/notifications/notification-types.js.map +1 -0
  136. package/dist/src/core/scheduler/index.d.ts +11 -0
  137. package/dist/src/core/scheduler/index.d.ts.map +1 -0
  138. package/dist/src/core/scheduler/index.js +11 -0
  139. package/dist/src/core/scheduler/index.js.map +1 -0
  140. package/dist/src/core/scheduler/job-scheduler.d.ts +179 -0
  141. package/dist/src/core/scheduler/job-scheduler.d.ts.map +1 -0
  142. package/dist/src/core/scheduler/job-scheduler.js +282 -0
  143. package/dist/src/core/scheduler/job-scheduler.js.map +1 -0
  144. package/dist/src/core/scheduler/schedule-persistence.d.ts +83 -0
  145. package/dist/src/core/scheduler/schedule-persistence.d.ts.map +1 -0
  146. package/dist/src/core/scheduler/schedule-persistence.js +180 -0
  147. package/dist/src/core/scheduler/schedule-persistence.js.map +1 -0
  148. package/dist/src/core/scheduler/scheduled-job.d.ts +188 -0
  149. package/dist/src/core/scheduler/scheduled-job.d.ts.map +1 -0
  150. package/dist/src/core/scheduler/scheduled-job.js +182 -0
  151. package/dist/src/core/scheduler/scheduled-job.js.map +1 -0
  152. package/dist/src/core/sync/permission-enforcer.d.ts +206 -0
  153. package/dist/src/core/sync/permission-enforcer.d.ts.map +1 -0
  154. package/dist/src/core/sync/permission-enforcer.js +268 -0
  155. package/dist/src/core/sync/permission-enforcer.js.map +1 -0
  156. package/dist/src/core/sync/sync-audit-logger.d.ts +217 -0
  157. package/dist/src/core/sync/sync-audit-logger.d.ts.map +1 -0
  158. package/dist/src/core/sync/sync-audit-logger.js +327 -0
  159. package/dist/src/core/sync/sync-audit-logger.js.map +1 -0
  160. package/dist/src/core/sync/sync-interceptor.d.ts +190 -0
  161. package/dist/src/core/sync/sync-interceptor.d.ts.map +1 -0
  162. package/dist/src/core/sync/sync-interceptor.js +224 -0
  163. package/dist/src/core/sync/sync-interceptor.js.map +1 -0
  164. package/dist/src/core/types/increment-metadata.d.ts +5 -2
  165. package/dist/src/core/types/increment-metadata.d.ts.map +1 -1
  166. package/dist/src/core/types/sync-config.d.ts +267 -0
  167. package/dist/src/core/types/sync-config.d.ts.map +1 -0
  168. package/dist/src/core/types/sync-config.js +304 -0
  169. package/dist/src/core/types/sync-config.js.map +1 -0
  170. package/dist/src/hooks/index.d.ts +11 -0
  171. package/dist/src/hooks/index.d.ts.map +1 -0
  172. package/dist/src/hooks/index.js +11 -0
  173. package/dist/src/hooks/index.js.map +1 -0
  174. package/dist/src/hooks/platform.d.ts +125 -0
  175. package/dist/src/hooks/platform.d.ts.map +1 -0
  176. package/dist/src/hooks/platform.js +325 -0
  177. package/dist/src/hooks/platform.js.map +1 -0
  178. package/dist/src/hooks/processor.d.ts +20 -0
  179. package/dist/src/hooks/processor.d.ts.map +1 -0
  180. package/dist/src/hooks/processor.js +317 -0
  181. package/dist/src/hooks/processor.js.map +1 -0
  182. package/dist/src/hooks/scheduler-startup.d.ts +19 -0
  183. package/dist/src/hooks/scheduler-startup.d.ts.map +1 -0
  184. package/dist/src/hooks/scheduler-startup.js +92 -0
  185. package/dist/src/hooks/scheduler-startup.js.map +1 -0
  186. package/dist/src/hooks/session-start.d.ts +16 -0
  187. package/dist/src/hooks/session-start.d.ts.map +1 -0
  188. package/dist/src/hooks/session-start.js +92 -0
  189. package/dist/src/hooks/session-start.js.map +1 -0
  190. package/dist/src/importers/duplicate-detector.d.ts +13 -2
  191. package/dist/src/importers/duplicate-detector.d.ts.map +1 -1
  192. package/dist/src/importers/duplicate-detector.js +21 -2
  193. package/dist/src/importers/duplicate-detector.js.map +1 -1
  194. package/dist/src/importers/item-converter.d.ts +41 -2
  195. package/dist/src/importers/item-converter.d.ts.map +1 -1
  196. package/dist/src/importers/item-converter.js +225 -38
  197. package/dist/src/importers/item-converter.js.map +1 -1
  198. package/dist/src/living-docs/fs-id-allocator.d.ts +7 -0
  199. package/dist/src/living-docs/fs-id-allocator.d.ts.map +1 -1
  200. package/dist/src/living-docs/fs-id-allocator.js +30 -4
  201. package/dist/src/living-docs/fs-id-allocator.js.map +1 -1
  202. package/dist/src/sync/ado-sync-wrapper.d.ts +137 -0
  203. package/dist/src/sync/ado-sync-wrapper.d.ts.map +1 -0
  204. package/dist/src/sync/ado-sync-wrapper.js +148 -0
  205. package/dist/src/sync/ado-sync-wrapper.js.map +1 -0
  206. package/dist/src/sync/github-sync-wrapper.d.ts +195 -0
  207. package/dist/src/sync/github-sync-wrapper.d.ts.map +1 -0
  208. package/dist/src/sync/github-sync-wrapper.js +220 -0
  209. package/dist/src/sync/github-sync-wrapper.js.map +1 -0
  210. package/dist/src/sync/jira-sync-wrapper.d.ts +155 -0
  211. package/dist/src/sync/jira-sync-wrapper.d.ts.map +1 -0
  212. package/dist/src/sync/jira-sync-wrapper.js +175 -0
  213. package/dist/src/sync/jira-sync-wrapper.js.map +1 -0
  214. package/dist/src/utils/feature-id-derivation.d.ts +58 -0
  215. package/dist/src/utils/feature-id-derivation.d.ts.map +1 -0
  216. package/dist/src/utils/feature-id-derivation.js +77 -0
  217. package/dist/src/utils/feature-id-derivation.js.map +1 -0
  218. package/package.json +3 -1
  219. package/plugins/specweave/commands/specweave-discrepancies.md +141 -0
  220. package/plugins/specweave/commands/specweave-discrepancy-to-increment.md +160 -0
  221. package/plugins/specweave/commands/specweave-jobs.md +45 -2
  222. package/plugins/specweave/commands/specweave-notifications.md +92 -0
  223. package/plugins/specweave/commands/specweave-sync-logs.md +131 -0
  224. package/plugins/specweave/commands/specweave-sync-monitor.md +57 -0
  225. package/plugins/specweave/hooks/hooks.json +3 -3
  226. package/plugins/specweave/hooks/lib/scheduler-startup.sh +72 -0
  227. package/plugins/specweave/hooks/universal/dispatcher.mjs +246 -0
  228. package/plugins/specweave/hooks/universal/session-start.cmd +16 -0
  229. package/plugins/specweave/hooks/universal/session-start.ps1 +16 -0
  230. package/plugins/specweave/hooks/v2/dispatchers/session-start.sh +14 -5
  231. package/plugins/specweave/lib/vendor/core/types/increment-metadata.d.ts +5 -2
  232. package/plugins/specweave/skills/discrepancy-viewer.md +154 -0
  233. package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +46 -0
  234. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +69 -0
  235. package/dist/plugins/specweave-github/lib/enhanced-github-sync.d.ts +0 -26
  236. package/dist/plugins/specweave-github/lib/enhanced-github-sync.d.ts.map +0 -1
  237. package/dist/plugins/specweave-github/lib/enhanced-github-sync.js +0 -249
  238. package/dist/plugins/specweave-github/lib/enhanced-github-sync.js.map +0 -1
  239. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts +0 -28
  240. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts.map +0 -1
  241. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js +0 -156
  242. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js.map +0 -1
  243. package/dist/src/core/sync/bidirectional-engine.d.ts +0 -119
  244. package/dist/src/core/sync/bidirectional-engine.d.ts.map +0 -1
  245. package/dist/src/core/sync/bidirectional-engine.js +0 -359
  246. package/dist/src/core/sync/bidirectional-engine.js.map +0 -1
  247. package/dist/src/core/sync/conflict-resolver.d.ts +0 -66
  248. package/dist/src/core/sync/conflict-resolver.d.ts.map +0 -1
  249. package/dist/src/core/sync/conflict-resolver.js +0 -108
  250. package/dist/src/core/sync/conflict-resolver.js.map +0 -1
  251. package/dist/src/core/sync/enhanced-content-builder.d.ts +0 -55
  252. package/dist/src/core/sync/enhanced-content-builder.d.ts.map +0 -1
  253. package/dist/src/core/sync/enhanced-content-builder.js +0 -203
  254. package/dist/src/core/sync/enhanced-content-builder.js.map +0 -1
  255. package/dist/src/core/sync/folder-mapper.d.ts +0 -71
  256. package/dist/src/core/sync/folder-mapper.d.ts.map +0 -1
  257. package/dist/src/core/sync/folder-mapper.js +0 -203
  258. package/dist/src/core/sync/folder-mapper.js.map +0 -1
  259. package/dist/src/core/sync/label-detector.d.ts +0 -66
  260. package/dist/src/core/sync/label-detector.d.ts.map +0 -1
  261. package/dist/src/core/sync/label-detector.js +0 -224
  262. package/dist/src/core/sync/label-detector.js.map +0 -1
  263. package/dist/src/core/sync/performance-optimizer.d.ts +0 -153
  264. package/dist/src/core/sync/performance-optimizer.d.ts.map +0 -1
  265. package/dist/src/core/sync/performance-optimizer.js +0 -220
  266. package/dist/src/core/sync/performance-optimizer.js.map +0 -1
  267. package/dist/src/core/sync/profile-selector.d.ts +0 -52
  268. package/dist/src/core/sync/profile-selector.d.ts.map +0 -1
  269. package/dist/src/core/sync/profile-selector.js +0 -179
  270. package/dist/src/core/sync/profile-selector.js.map +0 -1
  271. package/dist/src/core/sync/profile-validator.d.ts +0 -52
  272. package/dist/src/core/sync/profile-validator.d.ts.map +0 -1
  273. package/dist/src/core/sync/profile-validator.js +0 -170
  274. package/dist/src/core/sync/profile-validator.js.map +0 -1
  275. package/dist/src/core/sync/rate-limiter.d.ts +0 -116
  276. package/dist/src/core/sync/rate-limiter.d.ts.map +0 -1
  277. package/dist/src/core/sync/rate-limiter.js +0 -308
  278. package/dist/src/core/sync/rate-limiter.js.map +0 -1
  279. package/dist/src/core/sync/retry-handler.d.ts +0 -98
  280. package/dist/src/core/sync/retry-handler.d.ts.map +0 -1
  281. package/dist/src/core/sync/retry-handler.js +0 -196
  282. package/dist/src/core/sync/retry-handler.js.map +0 -1
  283. package/dist/src/core/sync/retry-logic.d.ts +0 -64
  284. package/dist/src/core/sync/retry-logic.d.ts.map +0 -1
  285. package/dist/src/core/sync/retry-logic.js +0 -165
  286. package/dist/src/core/sync/retry-logic.js.map +0 -1
  287. package/dist/src/core/sync/status-cache.d.ts +0 -91
  288. package/dist/src/core/sync/status-cache.d.ts.map +0 -1
  289. package/dist/src/core/sync/status-cache.js +0 -140
  290. package/dist/src/core/sync/status-cache.js.map +0 -1
  291. package/dist/src/core/sync/status-mapper.d.ts +0 -69
  292. package/dist/src/core/sync/status-mapper.d.ts.map +0 -1
  293. package/dist/src/core/sync/status-mapper.js +0 -90
  294. package/dist/src/core/sync/status-mapper.js.map +0 -1
  295. package/dist/src/core/sync/status-sync-engine.d.ts +0 -162
  296. package/dist/src/core/sync/status-sync-engine.d.ts.map +0 -1
  297. package/dist/src/core/sync/status-sync-engine.js +0 -347
  298. package/dist/src/core/sync/status-sync-engine.js.map +0 -1
  299. package/dist/src/core/sync/sync-event-logger.d.ts +0 -113
  300. package/dist/src/core/sync/sync-event-logger.d.ts.map +0 -1
  301. package/dist/src/core/sync/sync-event-logger.js +0 -141
  302. package/dist/src/core/sync/sync-event-logger.js.map +0 -1
  303. package/dist/src/core/sync/time-range-selector.d.ts +0 -48
  304. package/dist/src/core/sync/time-range-selector.d.ts.map +0 -1
  305. package/dist/src/core/sync/time-range-selector.js +0 -224
  306. package/dist/src/core/sync/time-range-selector.js.map +0 -1
  307. package/dist/src/core/sync/types.d.ts +0 -52
  308. package/dist/src/core/sync/types.d.ts.map +0 -1
  309. package/dist/src/core/sync/types.js +0 -5
  310. package/dist/src/core/sync/types.js.map +0 -1
  311. package/dist/src/core/sync/workflow-detector.d.ts +0 -95
  312. package/dist/src/core/sync/workflow-detector.d.ts.map +0 -1
  313. package/dist/src/core/sync/workflow-detector.js +0 -175
  314. package/dist/src/core/sync/workflow-detector.js.map +0 -1
  315. package/plugins/specweave-github/lib/enhanced-github-sync.js +0 -220
  316. package/plugins/specweave-github/lib/enhanced-github-sync.ts +0 -322
  317. package/plugins/specweave-jira/lib/enhanced-jira-sync.js +0 -134
  318. package/plugins/specweave-jira/lib/enhanced-jira-sync.ts +0 -196
@@ -1,220 +0,0 @@
1
- /**
2
- * Performance Optimizer for Status Sync
3
- *
4
- * Implements caching, batching, and optimization strategies to ensure
5
- * status sync operations complete within performance targets:
6
- * - Status sync: <2 seconds
7
- * - Conflict detection: <1 second
8
- * - Bulk sync (10 items): <5 seconds
9
- *
10
- * @module performance-optimizer
11
- */
12
- /**
13
- * Performance Optimizer
14
- *
15
- * Provides caching and optimization for status sync operations.
16
- */
17
- export class PerformanceOptimizer {
18
- constructor() {
19
- this.cache = new Map();
20
- this.DEFAULT_TTL_MS = 5 * 60 * 1000; // 5 minutes
21
- this.metrics = [];
22
- }
23
- /**
24
- * Get cached value if available and not expired
25
- *
26
- * @param key - Cache key
27
- * @returns Cached value or null if not found/expired
28
- */
29
- get(key) {
30
- const entry = this.cache.get(key);
31
- if (!entry) {
32
- return null;
33
- }
34
- // Check expiration
35
- if (Date.now() > entry.expiresAt) {
36
- this.cache.delete(key);
37
- return null;
38
- }
39
- return entry.value;
40
- }
41
- /**
42
- * Set cache value with TTL
43
- *
44
- * @param key - Cache key
45
- * @param value - Value to cache
46
- * @param ttlMs - Time to live in milliseconds (default: 5 minutes)
47
- */
48
- set(key, value, ttlMs = this.DEFAULT_TTL_MS) {
49
- this.cache.set(key, {
50
- value,
51
- expiresAt: Date.now() + ttlMs
52
- });
53
- }
54
- /**
55
- * Clear specific cache entry
56
- *
57
- * @param key - Cache key
58
- */
59
- clear(key) {
60
- this.cache.delete(key);
61
- }
62
- /**
63
- * Clear all cache entries
64
- */
65
- clearAll() {
66
- this.cache.clear();
67
- }
68
- /**
69
- * Clear expired cache entries
70
- */
71
- clearExpired() {
72
- const now = Date.now();
73
- for (const [key, entry] of this.cache.entries()) {
74
- if (now > entry.expiresAt) {
75
- this.cache.delete(key);
76
- }
77
- }
78
- }
79
- /**
80
- * Get cache statistics
81
- */
82
- getCacheStats() {
83
- const totalRequests = this.metrics.reduce((sum, m) => sum + m.cacheHits + m.cacheMisses, 0);
84
- const totalHits = this.metrics.reduce((sum, m) => sum + m.cacheHits, 0);
85
- return {
86
- size: this.cache.size,
87
- keys: Array.from(this.cache.keys()),
88
- hitRate: totalRequests > 0 ? totalHits / totalRequests : 0
89
- };
90
- }
91
- /**
92
- * Record performance metric
93
- *
94
- * @param metric - Performance metric
95
- */
96
- recordMetric(metric) {
97
- this.metrics.push(metric);
98
- // Keep only last 100 metrics
99
- if (this.metrics.length > 100) {
100
- this.metrics.shift();
101
- }
102
- }
103
- /**
104
- * Get performance metrics
105
- *
106
- * @param operationType - Filter by operation type
107
- * @returns Performance metrics
108
- */
109
- getMetrics(operationType) {
110
- if (!operationType) {
111
- return [...this.metrics];
112
- }
113
- return this.metrics.filter(m => m.operationType === operationType);
114
- }
115
- /**
116
- * Get average duration for operation type
117
- *
118
- * @param operationType - Operation type
119
- * @returns Average duration in milliseconds
120
- */
121
- getAverageDuration(operationType) {
122
- const metrics = this.getMetrics(operationType);
123
- if (metrics.length === 0) {
124
- return 0;
125
- }
126
- const sum = metrics.reduce((total, m) => total + m.duration, 0);
127
- return sum / metrics.length;
128
- }
129
- /**
130
- * Check if performance targets are met
131
- *
132
- * Performance targets:
133
- * - status-sync: <2000ms
134
- * - conflict-detection: <1000ms
135
- * - bulk-sync (10 items): <5000ms
136
- *
137
- * @returns Performance target status
138
- */
139
- checkPerformanceTargets() {
140
- const statusSyncAvg = this.getAverageDuration('status-sync');
141
- const conflictAvg = this.getAverageDuration('conflict-detection');
142
- const bulkSyncAvg = this.getAverageDuration('bulk-sync');
143
- return {
144
- statusSync: {
145
- target: 2000,
146
- actual: statusSyncAvg,
147
- met: statusSyncAvg < 2000 || statusSyncAvg === 0
148
- },
149
- conflictDetection: {
150
- target: 1000,
151
- actual: conflictAvg,
152
- met: conflictAvg < 1000 || conflictAvg === 0
153
- },
154
- bulkSync: {
155
- target: 5000,
156
- actual: bulkSyncAvg,
157
- met: bulkSyncAvg < 5000 || bulkSyncAvg === 0
158
- }
159
- };
160
- }
161
- /**
162
- * Generate cache key for external status
163
- *
164
- * @param tool - External tool
165
- * @param identifier - Issue/item identifier
166
- * @returns Cache key
167
- */
168
- static generateStatusCacheKey(tool, identifier) {
169
- return `status:${tool}:${identifier}`;
170
- }
171
- /**
172
- * Generate cache key for workflow
173
- *
174
- * @param tool - External tool
175
- * @param project - Project identifier
176
- * @returns Cache key
177
- */
178
- static generateWorkflowCacheKey(tool, project) {
179
- return `workflow:${tool}:${project}`;
180
- }
181
- /**
182
- * Batch process with delay
183
- *
184
- * Processes items in batches with configurable delay between batches
185
- * to avoid rate limiting and improve throughput.
186
- *
187
- * @param items - Items to process
188
- * @param processor - Async function to process each item
189
- * @param batchSize - Batch size (default: 5)
190
- * @param delayMs - Delay between batches in milliseconds (default: 1000)
191
- * @returns Array of results
192
- */
193
- static async batchProcess(items, processor, batchSize = 5, delayMs = 1000) {
194
- const results = [];
195
- for (let i = 0; i < items.length; i += batchSize) {
196
- const batch = items.slice(i, i + batchSize);
197
- // Process batch in parallel
198
- const batchResults = await Promise.all(batch.map(item => processor(item)));
199
- results.push(...batchResults);
200
- // Add delay between batches (except for last batch)
201
- if (i + batchSize < items.length) {
202
- await new Promise(resolve => setTimeout(resolve, delayMs));
203
- }
204
- }
205
- return results;
206
- }
207
- /**
208
- * Measure execution time of an async function
209
- *
210
- * @param operation - Async operation to measure
211
- * @returns Tuple of [result, duration in ms]
212
- */
213
- static async measureTime(operation) {
214
- const startTime = Date.now();
215
- const result = await operation();
216
- const duration = Date.now() - startTime;
217
- return [result, duration];
218
- }
219
- }
220
- //# sourceMappingURL=performance-optimizer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"performance-optimizer.js","sourceRoot":"","sources":["../../../../src/core/sync/performance-optimizer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAsBH;;;;GAIG;AACH,MAAM,OAAO,oBAAoB;IAAjC;QACU,UAAK,GAAiC,IAAI,GAAG,EAAE,CAAC;QACvC,mBAAc,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,YAAY;QACrD,YAAO,GAAyB,EAAE,C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;;;;;OAWG;IACH,MAAM,CAAC,KAAK,CAAC,YAAY,CACvB,KAAU,EACV,SAAkC,EAClC,YAAoB,CAAC,EACrB,UAAkB,IAAI;QAEtB,MAAM,OAAO,GAAQ,EAAE,CAAC;QAExB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,SAAS,EAAE,CAAC;YACjD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC;YAE5C,4BAA4B;YAC5B,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,GAAG,CACpC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CACnC,CAAC;YAEF,OAAO,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,CAAC;YAE9B,oDAAoD;YACpD,IAAI,CAAC,GAAG,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;gBACjC,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;YAC7D,CAAC;QACH,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,KAAK,CAAC,WAAW,CAAI,SAA2B;QACrD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC7B,MAAM,MAAM,GAAG,MAAM,SAAS,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;QAExC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC5B,CAAC;CACF"}
@@ -1,52 +0,0 @@
1
- /**
2
- * Interactive Profile Selector
3
- *
4
- * Rich CLI interface for selecting sync profiles with:
5
- * - Profile listing by provider
6
- * - Profile details and metadata
7
- * - Smart filtering and search
8
- * - Create new profile option
9
- */
10
- import { SyncProfile, SyncProvider } from '../types/sync-profile.js';
11
- export declare class ProfileSelector {
12
- private profileManager;
13
- constructor(projectRoot: string);
14
- /**
15
- * Display all profiles grouped by provider
16
- */
17
- displayAllProfiles(): Promise<{
18
- profiles: Record<string, SyncProfile>;
19
- activeProfileId: string | null;
20
- byProvider: Record<SyncProvider, ProfileOption[]>;
21
- }>;
22
- /**
23
- * Display profiles for a specific provider
24
- */
25
- displayProfilesByProvider(provider: SyncProvider): Promise<ProfileOption[]>;
26
- /**
27
- * Format profile option for display
28
- */
29
- formatOption(option: ProfileOption, index: number): string[];
30
- /**
31
- * Format profile list header
32
- */
33
- formatHeader(provider?: SyncProvider): string[];
34
- /**
35
- * Format "no profiles" message
36
- */
37
- formatNoProfiles(provider?: SyncProvider): string[];
38
- /**
39
- * Display profile stats
40
- */
41
- displayStats(): Promise<string[]>;
42
- private formatProfileDetails;
43
- private getProviderIcon;
44
- private getProviderDisplayName;
45
- }
46
- export interface ProfileOption {
47
- id: string;
48
- profile: SyncProfile;
49
- isActive: boolean;
50
- details: string;
51
- }
52
- //# sourceMappingURL=profile-selector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile-selector.d.ts","sourceRoot":"","sources":["../../../../src/core/sync/profile-selector.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAMrE,qBAAa,eAAe;IAC1B,OAAO,CAAC,cAAc,CAAiB;gBAE3B,WAAW,EAAE,MAAM;IAQ/B;;OAEG;IACG,kBAAkB,IAAI,OAAO,CAAC;QAClC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QACtC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;QAC/B,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,aAAa,EAAE,CAAC,CAAC;KACnD,CAAC;IA4BF;;OAEG;IACG,yBAAyB,CAC7B,QAAQ,EAAE,YAAY,GACrB,OAAO,CAAC,aAAa,EAAE,CAAC;IAkB3B;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE;IAgC5D;;OAEG;IACH,YAAY,CAAC,QAAQ,CAAC,EAAE,YAAY,GAAG,MAAM,EAAE;IAc/C;;OAEG;IACH,gBAAgB,CAAC,QAAQ,CAAC,EAAE,YAAY,GAAG,MAAM,EAAE;IAiBnD;;OAEG;IACG,YAAY,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAgCvC,OAAO,CAAC,oBAAoB;IAsB5B,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,sBAAsB;CAQ/B;AAMD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -1,179 +0,0 @@
1
- /**
2
- * Interactive Profile Selector
3
- *
4
- * Rich CLI interface for selecting sync profiles with:
5
- * - Profile listing by provider
6
- * - Profile details and metadata
7
- * - Smart filtering and search
8
- * - Create new profile option
9
- */
10
- import { ProfileManager } from './profile-manager.js';
11
- // ============================================================================
12
- // Profile Selector
13
- // ============================================================================
14
- export class ProfileSelector {
15
- constructor(projectRoot) {
16
- this.profileManager = new ProfileManager(projectRoot);
17
- }
18
- // ==========================================================================
19
- // Interactive Selection
20
- // ==========================================================================
21
- /**
22
- * Display all profiles grouped by provider
23
- */
24
- async displayAllProfiles() {
25
- const allProfiles = await this.profileManager.getAllProfiles();
26
- const activeProfile = await this.profileManager.getActiveProfile();
27
- const byProvider = {
28
- github: [],
29
- jira: [],
30
- ado: [],
31
- };
32
- for (const [id, profile] of Object.entries(allProfiles)) {
33
- const option = {
34
- id,
35
- profile,
36
- isActive: activeProfile?.id === id,
37
- details: this.formatProfileDetails(profile),
38
- };
39
- byProvider[profile.provider].push(option);
40
- }
41
- return {
42
- profiles: allProfiles,
43
- activeProfileId: activeProfile?.id || null,
44
- byProvider,
45
- };
46
- }
47
- /**
48
- * Display profiles for a specific provider
49
- */
50
- async displayProfilesByProvider(provider) {
51
- const profiles = await this.profileManager.getProfilesByProvider(provider);
52
- const activeProfile = await this.profileManager.getActiveProfile();
53
- const options = [];
54
- for (const [id, profile] of Object.entries(profiles)) {
55
- options.push({
56
- id,
57
- profile,
58
- isActive: activeProfile?.id === id,
59
- details: this.formatProfileDetails(profile),
60
- });
61
- }
62
- return options;
63
- }
64
- /**
65
- * Format profile option for display
66
- */
67
- formatOption(option, index) {
68
- const lines = [];
69
- // Profile name
70
- const activeTag = option.isActive ? ' (active)' : '';
71
- lines.push(` ${index + 1}. ${option.profile.displayName}${activeTag}`);
72
- // Configuration details
73
- lines.push(` └─ ${this.getProviderIcon(option.profile.provider)} ${option.details}`);
74
- // Description (if present)
75
- if (option.profile.description) {
76
- lines.push(` └─ ${option.profile.description}`);
77
- }
78
- // Time range defaults
79
- lines.push(` └─ Default time range: ${option.profile.timeRange.default} (max: ${option.profile.timeRange.max})`);
80
- // Project context (if present)
81
- if (option.profile.projectContext) {
82
- lines.push(` └─ Project: ${option.profile.projectContext.name}`);
83
- }
84
- return lines;
85
- }
86
- /**
87
- * Format profile list header
88
- */
89
- formatHeader(provider) {
90
- const lines = [];
91
- if (provider) {
92
- lines.push(`🔗 ${this.getProviderDisplayName(provider)} Profiles:`);
93
- }
94
- else {
95
- lines.push('🔗 Available Sync Profiles:');
96
- }
97
- lines.push('');
98
- return lines;
99
- }
100
- /**
101
- * Format "no profiles" message
102
- */
103
- formatNoProfiles(provider) {
104
- const lines = [];
105
- if (provider) {
106
- lines.push(`No ${this.getProviderDisplayName(provider)} profiles configured yet.`);
107
- }
108
- else {
109
- lines.push('No sync profiles configured yet.');
110
- }
111
- lines.push('');
112
- lines.push('Create your first profile:');
113
- lines.push(' /specweave:sync-profile create');
114
- lines.push('');
115
- return lines;
116
- }
117
- /**
118
- * Display profile stats
119
- */
120
- async displayStats() {
121
- const stats = await this.profileManager.getStats();
122
- const lines = [];
123
- lines.push('📊 Profile Statistics:');
124
- lines.push('');
125
- lines.push(` Total profiles: ${stats.totalProfiles}`);
126
- if (stats.totalProfiles > 0) {
127
- lines.push('');
128
- lines.push(' By provider:');
129
- for (const [provider, count] of Object.entries(stats.byProvider)) {
130
- if (count > 0) {
131
- lines.push(` ├─ ${this.getProviderIcon(provider)} ${this.getProviderDisplayName(provider)}: ${count}`);
132
- }
133
- }
134
- }
135
- if (stats.activeProfile) {
136
- lines.push('');
137
- lines.push(` Active profile: ${stats.activeProfile}`);
138
- }
139
- return lines;
140
- }
141
- // ==========================================================================
142
- // Profile Details Formatting
143
- // ==========================================================================
144
- formatProfileDetails(profile) {
145
- switch (profile.provider) {
146
- case 'github': {
147
- const config = profile.config;
148
- return `GitHub: ${config.owner}/${config.repo}`;
149
- }
150
- case 'jira': {
151
- const config = profile.config;
152
- return `JIRA: ${config.domain} (${config.projectKey})`;
153
- }
154
- case 'ado': {
155
- const config = profile.config;
156
- return `Azure DevOps: ${config.organization}/${config.project}`;
157
- }
158
- default:
159
- return 'Unknown provider';
160
- }
161
- }
162
- getProviderIcon(provider) {
163
- const icons = {
164
- github: '🐙',
165
- jira: '📋',
166
- ado: '⚡',
167
- };
168
- return icons[provider] || '🔗';
169
- }
170
- getProviderDisplayName(provider) {
171
- const names = {
172
- github: 'GitHub',
173
- jira: 'JIRA',
174
- ado: 'Azure DevOps',
175
- };
176
- return names[provider] || provider;
177
- }
178
- }
179
- //# sourceMappingURL=profile-selector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile-selector.js","sourceRoot":"","sources":["../../../../src/core/sync/profile-selector.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,+EAA+E;AAC/E,mBAAmB;AACnB,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AAK,KAAK,CAAC,CAAC,CAAC;gBACX,MAAM,MAAM,GAAG,OAAO,CAAC,MAAa,CAAC;gBACrC,OAAO,iBAAiB,MAAM,CAAC,YAAY,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YAClE,CAAC;YAED;gBACE,OAAO,kBAAkB,CAAC;QAC9B,CAAC;IACH,CAAC;IAEO,eAAe,CAAC,QAA+B;QACrD,MAAM,KAAK,GAA2B;YACpC,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,IAAI;YACV,GAAG,EAAE,GAAG;SACT,CAAC;QACF,OAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC;IACjC,CAAC;IAEO,sBAAsB,CAAC,QAA+B;QAC5D,MAAM,KAAK,GAA2B;YACpC,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,MAAM;YACZ,GAAG,EAAE,cAAc;SACpB,CAAC;QACF,OAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC;IACrC,CAAC;CACF"}
@@ -1,52 +0,0 @@
1
- /**
2
- * Sync Profile Validator
3
- *
4
- * Validates sync profile configurations for multi-team support
5
- */
6
- import { SyncProfile, AdoConfig, JiraConfig, GitHubConfig, ProfileValidationResult } from '../types/sync-profile.js';
7
- /**
8
- * Validate Jira profile configuration
9
- *
10
- * Rules:
11
- * - Strategy is required
12
- * - project-per-team: requires projects[] array
13
- * - shared-project-with-components: requires projectKey + components[]
14
- * - Cannot mix strategies (no projects[] with shared-project)
15
- *
16
- * @param config - Jira configuration
17
- * @returns Validation result with errors/warnings
18
- */
19
- export declare function validateJiraConfig(config: JiraConfig): ProfileValidationResult;
20
- /**
21
- * Validate Azure DevOps profile configuration
22
- *
23
- * Rules:
24
- * - organization and project are required
25
- * - teams[] array is optional (single project if not provided)
26
- * - Team names cannot be empty
27
- * - areaPaths map must match teams if both provided
28
- *
29
- * @param config - ADO configuration
30
- * @returns Validation result with errors/warnings
31
- */
32
- export declare function validateAdoConfig(config: AdoConfig): ProfileValidationResult;
33
- /**
34
- * Validate GitHub profile configuration
35
- *
36
- * Rules:
37
- * - owner and repo are required
38
- *
39
- * @param config - GitHub configuration
40
- * @returns Validation result with errors/warnings
41
- */
42
- export declare function validateGitHubConfig(config: GitHubConfig): ProfileValidationResult;
43
- /**
44
- * Validate sync profile
45
- *
46
- * Validates entire profile including provider-specific config
47
- *
48
- * @param profile - Sync profile to validate
49
- * @returns Validation result with errors/warnings
50
- */
51
- export declare function validateSyncProfile(profile: SyncProfile): ProfileValidationResult;
52
- //# sourceMappingURL=profile-validator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile-validator.d.ts","sourceRoot":"","sources":["../../../../src/core/sync/profile-validator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,WAAW,EACX,SAAS,EACT,UAAU,EACV,YAAY,EACZ,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAElC;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,uBAAuB,CAyC9E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,uBAAuB,CAmD5E;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,uBAAuB,CAiBlF;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,WAAW,GAAG,uBAAuB,CAwCjF"}