specweave 0.21.2 → 0.22.0

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 (598) hide show
  1. package/CLAUDE.md +429 -10
  2. package/README.md +33 -3
  3. package/dist/plugins/specweave-github/lib/CodeValidator.d.ts +101 -0
  4. package/dist/plugins/specweave-github/lib/CodeValidator.d.ts.map +1 -0
  5. package/dist/plugins/specweave-github/lib/CodeValidator.js +219 -0
  6. package/dist/plugins/specweave-github/lib/CodeValidator.js.map +1 -0
  7. package/dist/plugins/specweave-github/lib/IssueStateManager.d.ts +98 -0
  8. package/dist/plugins/specweave-github/lib/IssueStateManager.d.ts.map +1 -0
  9. package/dist/plugins/specweave-github/lib/IssueStateManager.js +146 -0
  10. package/dist/plugins/specweave-github/lib/IssueStateManager.js.map +1 -0
  11. package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.d.ts +182 -0
  12. package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.d.ts.map +1 -0
  13. package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.js +603 -0
  14. package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.js.map +1 -0
  15. package/dist/plugins/specweave-github/lib/types.d.ts +34 -0
  16. package/dist/plugins/specweave-github/lib/types.d.ts.map +1 -1
  17. package/dist/plugins/specweave-github/lib/user-story-issue-builder.d.ts.map +1 -1
  18. package/dist/plugins/specweave-github/lib/user-story-issue-builder.js +6 -0
  19. package/dist/plugins/specweave-github/lib/user-story-issue-builder.js.map +1 -1
  20. package/dist/src/cli/commands/check-hooks.d.ts +11 -0
  21. package/dist/src/cli/commands/check-hooks.d.ts.map +1 -0
  22. package/dist/src/cli/commands/check-hooks.js +144 -0
  23. package/dist/src/cli/commands/check-hooks.js.map +1 -0
  24. package/dist/src/cli/commands/cicd-monitor.js +3 -3
  25. package/dist/src/cli/commands/cicd-monitor.js.map +1 -1
  26. package/dist/src/cli/commands/import-docs.js +2 -2
  27. package/dist/src/cli/commands/import-docs.js.map +1 -1
  28. package/dist/src/cli/commands/init-multiproject.js +4 -4
  29. package/dist/src/cli/commands/init-multiproject.js.map +1 -1
  30. package/dist/src/cli/commands/init.d.ts.map +1 -1
  31. package/dist/src/cli/commands/init.js +60 -5
  32. package/dist/src/cli/commands/init.js.map +1 -1
  33. package/dist/src/cli/commands/migrate-to-multiproject.js +3 -3
  34. package/dist/src/cli/commands/migrate-to-multiproject.js.map +1 -1
  35. package/dist/src/cli/commands/plan/agent-invoker.d.ts +79 -0
  36. package/dist/src/cli/commands/plan/agent-invoker.d.ts.map +1 -0
  37. package/dist/src/cli/commands/plan/agent-invoker.js +383 -0
  38. package/dist/src/cli/commands/plan/agent-invoker.js.map +1 -0
  39. package/dist/src/cli/commands/plan/increment-detector.d.ts +27 -0
  40. package/dist/src/cli/commands/plan/increment-detector.d.ts.map +1 -0
  41. package/dist/src/cli/commands/plan/increment-detector.js +159 -0
  42. package/dist/src/cli/commands/plan/increment-detector.js.map +1 -0
  43. package/dist/src/cli/commands/plan/plan-orchestrator.d.ts +45 -0
  44. package/dist/src/cli/commands/plan/plan-orchestrator.d.ts.map +1 -0
  45. package/dist/src/cli/commands/plan/plan-orchestrator.js +229 -0
  46. package/dist/src/cli/commands/plan/plan-orchestrator.js.map +1 -0
  47. package/dist/src/cli/commands/plan/plan-validator.d.ts +36 -0
  48. package/dist/src/cli/commands/plan/plan-validator.d.ts.map +1 -0
  49. package/dist/src/cli/commands/plan/plan-validator.js +174 -0
  50. package/dist/src/cli/commands/plan/plan-validator.js.map +1 -0
  51. package/dist/src/cli/commands/plan/types.d.ts +170 -0
  52. package/dist/src/cli/commands/plan/types.d.ts.map +1 -0
  53. package/dist/src/cli/commands/plan/types.js +42 -0
  54. package/dist/src/cli/commands/plan/types.js.map +1 -0
  55. package/dist/src/cli/commands/plan-command.d.ts +16 -0
  56. package/dist/src/cli/commands/plan-command.d.ts.map +1 -0
  57. package/dist/src/cli/commands/plan-command.js +127 -0
  58. package/dist/src/cli/commands/plan-command.js.map +1 -0
  59. package/dist/src/cli/commands/switch-project.js +3 -3
  60. package/dist/src/cli/commands/switch-project.js.map +1 -1
  61. package/dist/src/cli/commands/validate-parent-repo.js +1 -1
  62. package/dist/src/cli/commands/validate-parent-repo.js.map +1 -1
  63. package/dist/src/config/ConfigManager.d.ts +69 -0
  64. package/dist/src/config/ConfigManager.d.ts.map +1 -0
  65. package/dist/src/config/ConfigManager.js +130 -0
  66. package/dist/src/config/ConfigManager.js.map +1 -0
  67. package/dist/src/config/types.d.ts +1357 -0
  68. package/dist/src/config/types.d.ts.map +1 -0
  69. package/dist/src/config/types.js +67 -0
  70. package/dist/src/config/types.js.map +1 -0
  71. package/dist/src/core/brownfield/importer.d.ts +1 -1
  72. package/dist/src/core/brownfield/importer.d.ts.map +1 -1
  73. package/dist/src/core/brownfield/importer.js +3 -3
  74. package/dist/src/core/brownfield/importer.js.map +1 -1
  75. package/dist/src/core/cicd/config-loader.d.ts +1 -1
  76. package/dist/src/core/cicd/config-loader.d.ts.map +1 -1
  77. package/dist/src/core/cicd/index.d.ts +6 -6
  78. package/dist/src/core/cicd/index.d.ts.map +1 -1
  79. package/dist/src/core/cicd/index.js +6 -6
  80. package/dist/src/core/cicd/index.js.map +1 -1
  81. package/dist/src/core/cicd/monitor-service.d.ts +3 -3
  82. package/dist/src/core/cicd/monitor-service.d.ts.map +1 -1
  83. package/dist/src/core/cicd/monitor-service.js +3 -3
  84. package/dist/src/core/cicd/monitor-service.js.map +1 -1
  85. package/dist/src/core/cicd/notifier.d.ts +1 -1
  86. package/dist/src/core/cicd/notifier.d.ts.map +1 -1
  87. package/dist/src/core/cicd/state-manager.d.ts +1 -1
  88. package/dist/src/core/cicd/state-manager.d.ts.map +1 -1
  89. package/dist/src/core/cicd/state-manager.js +1 -1
  90. package/dist/src/core/cicd/state-manager.js.map +1 -1
  91. package/dist/src/core/cicd/workflow-monitor.d.ts +1 -1
  92. package/dist/src/core/cicd/workflow-monitor.d.ts.map +1 -1
  93. package/dist/src/core/cicd/workflow-monitor.js +1 -1
  94. package/dist/src/core/cicd/workflow-monitor.js.map +1 -1
  95. package/dist/src/core/cost-tracker.d.ts +2 -2
  96. package/dist/src/core/cost-tracker.d.ts.map +1 -1
  97. package/dist/src/core/cost-tracker.js +1 -1
  98. package/dist/src/core/cost-tracker.js.map +1 -1
  99. package/dist/src/core/hooks/HealthReporter.d.ts +55 -0
  100. package/dist/src/core/hooks/HealthReporter.d.ts.map +1 -0
  101. package/dist/src/core/hooks/HealthReporter.js +268 -0
  102. package/dist/src/core/hooks/HealthReporter.js.map +1 -0
  103. package/dist/src/core/hooks/HookAutoFixer.d.ts +41 -0
  104. package/dist/src/core/hooks/HookAutoFixer.d.ts.map +1 -0
  105. package/dist/src/core/hooks/HookAutoFixer.js +222 -0
  106. package/dist/src/core/hooks/HookAutoFixer.js.map +1 -0
  107. package/dist/src/core/hooks/HookExecutor.d.ts +57 -0
  108. package/dist/src/core/hooks/HookExecutor.d.ts.map +1 -0
  109. package/dist/src/core/hooks/HookExecutor.js +287 -0
  110. package/dist/src/core/hooks/HookExecutor.js.map +1 -0
  111. package/dist/src/core/hooks/HookHealthChecker.d.ts +51 -0
  112. package/dist/src/core/hooks/HookHealthChecker.d.ts.map +1 -0
  113. package/dist/src/core/hooks/HookHealthChecker.js +212 -0
  114. package/dist/src/core/hooks/HookHealthChecker.js.map +1 -0
  115. package/dist/src/core/hooks/HookScanner.d.ts +65 -0
  116. package/dist/src/core/hooks/HookScanner.d.ts.map +1 -0
  117. package/dist/src/core/hooks/HookScanner.js +214 -0
  118. package/dist/src/core/hooks/HookScanner.js.map +1 -0
  119. package/dist/src/core/hooks/types.d.ts +281 -0
  120. package/dist/src/core/hooks/types.d.ts.map +1 -0
  121. package/dist/src/core/hooks/types.js +10 -0
  122. package/dist/src/core/hooks/types.js.map +1 -0
  123. package/dist/src/core/iac/index.d.ts +10 -0
  124. package/dist/src/core/iac/index.d.ts.map +1 -0
  125. package/dist/src/core/iac/index.js +11 -0
  126. package/dist/src/core/iac/index.js.map +1 -0
  127. package/dist/src/core/iac/template-engine.d.ts +77 -0
  128. package/dist/src/core/iac/template-engine.d.ts.map +1 -0
  129. package/dist/src/core/iac/template-engine.js +182 -0
  130. package/dist/src/core/iac/template-engine.js.map +1 -0
  131. package/dist/src/core/increment/ac-status-manager.d.ts +115 -0
  132. package/dist/src/core/increment/ac-status-manager.d.ts.map +1 -0
  133. package/dist/src/core/increment/ac-status-manager.js +343 -0
  134. package/dist/src/core/increment/ac-status-manager.js.map +1 -0
  135. package/dist/src/core/increment/auto-transition-manager.d.ts +60 -0
  136. package/dist/src/core/increment/auto-transition-manager.d.ts.map +1 -0
  137. package/dist/src/core/increment/auto-transition-manager.js +192 -0
  138. package/dist/src/core/increment/auto-transition-manager.js.map +1 -0
  139. package/dist/src/core/increment/limits.d.ts +1 -1
  140. package/dist/src/core/increment/limits.d.ts.map +1 -1
  141. package/dist/src/core/increment/limits.js +2 -2
  142. package/dist/src/core/increment/limits.js.map +1 -1
  143. package/dist/src/core/increment/spec-sync-manager.d.ts +177 -0
  144. package/dist/src/core/increment/spec-sync-manager.d.ts.map +1 -0
  145. package/dist/src/core/increment/spec-sync-manager.js +496 -0
  146. package/dist/src/core/increment/spec-sync-manager.js.map +1 -0
  147. package/dist/src/core/increment/status-auto-transition.d.ts +46 -0
  148. package/dist/src/core/increment/status-auto-transition.d.ts.map +1 -0
  149. package/dist/src/core/increment/status-auto-transition.js +178 -0
  150. package/dist/src/core/increment/status-auto-transition.js.map +1 -0
  151. package/dist/src/core/increment/task-state-manager.d.ts +75 -0
  152. package/dist/src/core/increment/task-state-manager.d.ts.map +1 -0
  153. package/dist/src/core/increment/task-state-manager.js +117 -0
  154. package/dist/src/core/increment/task-state-manager.js.map +1 -0
  155. package/dist/src/core/living-docs/CodeValidator.d.ts +68 -0
  156. package/dist/src/core/living-docs/CodeValidator.d.ts.map +1 -0
  157. package/dist/src/core/living-docs/CodeValidator.js +160 -0
  158. package/dist/src/core/living-docs/CodeValidator.js.map +1 -0
  159. package/dist/src/core/living-docs/CompletionPropagator.d.ts +84 -0
  160. package/dist/src/core/living-docs/CompletionPropagator.d.ts.map +1 -0
  161. package/dist/src/core/living-docs/CompletionPropagator.js +206 -0
  162. package/dist/src/core/living-docs/CompletionPropagator.js.map +1 -0
  163. package/dist/src/core/living-docs/ProjectDetector.d.ts +29 -0
  164. package/dist/src/core/living-docs/ProjectDetector.d.ts.map +1 -0
  165. package/dist/src/core/living-docs/ProjectDetector.js +94 -0
  166. package/dist/src/core/living-docs/ProjectDetector.js.map +1 -0
  167. package/dist/src/core/living-docs/SpecDistributor.d.ts +60 -0
  168. package/dist/src/core/living-docs/SpecDistributor.d.ts.map +1 -0
  169. package/dist/src/core/living-docs/SpecDistributor.js +228 -0
  170. package/dist/src/core/living-docs/SpecDistributor.js.map +1 -0
  171. package/dist/src/core/living-docs/ThreeLayerSyncManager.d.ts +116 -0
  172. package/dist/src/core/living-docs/ThreeLayerSyncManager.d.ts.map +1 -0
  173. package/dist/src/core/living-docs/ThreeLayerSyncManager.js +356 -0
  174. package/dist/src/core/living-docs/ThreeLayerSyncManager.js.map +1 -0
  175. package/dist/src/core/living-docs/hierarchy-mapper.d.ts.map +1 -1
  176. package/dist/src/core/living-docs/hierarchy-mapper.js +2 -1
  177. package/dist/src/core/living-docs/hierarchy-mapper.js.map +1 -1
  178. package/dist/src/core/living-docs/index.d.ts +1 -1
  179. package/dist/src/core/living-docs/index.d.ts.map +1 -1
  180. package/dist/src/core/living-docs/index.js +5 -1
  181. package/dist/src/core/living-docs/index.js.map +1 -1
  182. package/dist/src/core/living-docs/project-detector.d.ts.map +1 -1
  183. package/dist/src/core/living-docs/project-detector.js +38 -0
  184. package/dist/src/core/living-docs/project-detector.js.map +1 -1
  185. package/dist/src/core/living-docs/types.d.ts +70 -300
  186. package/dist/src/core/living-docs/types.d.ts.map +1 -1
  187. package/dist/src/core/living-docs/types.js +2 -10
  188. package/dist/src/core/living-docs/types.js.map +1 -1
  189. package/dist/src/core/project-manager.d.ts +1 -1
  190. package/dist/src/core/project-manager.d.ts.map +1 -1
  191. package/dist/src/core/project-manager.js +2 -2
  192. package/dist/src/core/project-manager.js.map +1 -1
  193. package/dist/src/core/qa/quality-gate-decider.d.ts +1 -1
  194. package/dist/src/core/qa/quality-gate-decider.d.ts.map +1 -1
  195. package/dist/src/core/qa/risk-calculator.d.ts +1 -1
  196. package/dist/src/core/qa/risk-calculator.d.ts.map +1 -1
  197. package/dist/src/core/repo-structure/setup-summary.d.ts +1 -1
  198. package/dist/src/core/repo-structure/setup-summary.d.ts.map +1 -1
  199. package/dist/src/core/rfc-generator-v2.d.ts +1 -1
  200. package/dist/src/core/rfc-generator-v2.d.ts.map +1 -1
  201. package/dist/src/core/rfc-generator-v2.js +1 -1
  202. package/dist/src/core/rfc-generator-v2.js.map +1 -1
  203. package/dist/src/core/serverless/context-detector.d.ts +12 -0
  204. package/dist/src/core/serverless/context-detector.d.ts.map +1 -0
  205. package/dist/src/core/serverless/context-detector.js +213 -0
  206. package/dist/src/core/serverless/context-detector.js.map +1 -0
  207. package/dist/src/core/serverless/cost-comparison.d.ts +73 -0
  208. package/dist/src/core/serverless/cost-comparison.d.ts.map +1 -0
  209. package/dist/src/core/serverless/cost-comparison.js +198 -0
  210. package/dist/src/core/serverless/cost-comparison.js.map +1 -0
  211. package/dist/src/core/serverless/cost-estimator.d.ts +69 -0
  212. package/dist/src/core/serverless/cost-estimator.d.ts.map +1 -0
  213. package/dist/src/core/serverless/cost-estimator.js +127 -0
  214. package/dist/src/core/serverless/cost-estimator.js.map +1 -0
  215. package/dist/src/core/serverless/cost-optimizer.d.ts +57 -0
  216. package/dist/src/core/serverless/cost-optimizer.d.ts.map +1 -0
  217. package/dist/src/core/serverless/cost-optimizer.js +221 -0
  218. package/dist/src/core/serverless/cost-optimizer.js.map +1 -0
  219. package/dist/src/core/serverless/index.d.ts +20 -0
  220. package/dist/src/core/serverless/index.d.ts.map +1 -0
  221. package/dist/src/core/serverless/index.js +26 -0
  222. package/dist/src/core/serverless/index.js.map +1 -0
  223. package/dist/src/core/serverless/learning-path-recommender.d.ts +152 -0
  224. package/dist/src/core/serverless/learning-path-recommender.d.ts.map +1 -0
  225. package/dist/src/core/serverless/learning-path-recommender.js +389 -0
  226. package/dist/src/core/serverless/learning-path-recommender.js.map +1 -0
  227. package/dist/src/core/serverless/platform-data-loader.d.ts +22 -0
  228. package/dist/src/core/serverless/platform-data-loader.d.ts.map +1 -0
  229. package/dist/src/core/serverless/platform-data-loader.js +49 -0
  230. package/dist/src/core/serverless/platform-data-loader.js.map +1 -0
  231. package/dist/src/core/serverless/platform-selector.d.ts +20 -0
  232. package/dist/src/core/serverless/platform-selector.d.ts.map +1 -0
  233. package/dist/src/core/serverless/platform-selector.js +279 -0
  234. package/dist/src/core/serverless/platform-selector.js.map +1 -0
  235. package/dist/src/core/serverless/recommendation-formatter.d.ts +24 -0
  236. package/dist/src/core/serverless/recommendation-formatter.d.ts.map +1 -0
  237. package/dist/src/core/serverless/recommendation-formatter.js +70 -0
  238. package/dist/src/core/serverless/recommendation-formatter.js.map +1 -0
  239. package/dist/src/core/serverless/suitability-analyzer.d.ts +22 -0
  240. package/dist/src/core/serverless/suitability-analyzer.d.ts.map +1 -0
  241. package/dist/src/core/serverless/suitability-analyzer.js +262 -0
  242. package/dist/src/core/serverless/suitability-analyzer.js.map +1 -0
  243. package/dist/src/core/serverless/types.d.ts +96 -0
  244. package/dist/src/core/serverless/types.d.ts.map +1 -0
  245. package/dist/src/core/serverless/types.js +5 -0
  246. package/dist/src/core/serverless/types.js.map +1 -0
  247. package/dist/src/core/sync/bidirectional-engine.d.ts +1 -1
  248. package/dist/src/core/sync/bidirectional-engine.d.ts.map +1 -1
  249. package/dist/src/core/sync/enhanced-content-builder.d.ts +1 -1
  250. package/dist/src/core/sync/enhanced-content-builder.d.ts.map +1 -1
  251. package/dist/src/core/sync/profile-manager.d.ts +1 -1
  252. package/dist/src/core/sync/profile-manager.d.ts.map +1 -1
  253. package/dist/src/core/sync/profile-selector.d.ts +1 -1
  254. package/dist/src/core/sync/profile-selector.d.ts.map +1 -1
  255. package/dist/src/core/sync/profile-selector.js +1 -1
  256. package/dist/src/core/sync/profile-selector.js.map +1 -1
  257. package/dist/src/core/sync/project-context.d.ts +1 -1
  258. package/dist/src/core/sync/project-context.d.ts.map +1 -1
  259. package/dist/src/core/sync/rate-limiter.d.ts +1 -1
  260. package/dist/src/core/sync/rate-limiter.d.ts.map +1 -1
  261. package/dist/src/core/sync/status-sync-engine.d.ts +2 -2
  262. package/dist/src/core/sync/status-sync-engine.d.ts.map +1 -1
  263. package/dist/src/core/sync/status-sync-engine.js +2 -2
  264. package/dist/src/core/sync/status-sync-engine.js.map +1 -1
  265. package/dist/src/core/sync/time-range-selector.d.ts +1 -1
  266. package/dist/src/core/sync/time-range-selector.d.ts.map +1 -1
  267. package/dist/src/core/sync/time-range-selector.js +1 -1
  268. package/dist/src/core/sync/time-range-selector.js.map +1 -1
  269. package/dist/src/core/types/config.d.ts +23 -0
  270. package/dist/src/core/types/config.d.ts.map +1 -1
  271. package/dist/src/core/types/config.js +10 -0
  272. package/dist/src/core/types/config.js.map +1 -1
  273. package/dist/src/core/types/increment-metadata.d.ts +27 -0
  274. package/dist/src/core/types/increment-metadata.d.ts.map +1 -1
  275. package/dist/src/core/types/increment-metadata.js +45 -1
  276. package/dist/src/core/types/increment-metadata.js.map +1 -1
  277. package/dist/src/core/types/sync-profile.d.ts +2 -0
  278. package/dist/src/core/types/sync-profile.d.ts.map +1 -1
  279. package/dist/src/core/types/sync-profile.js.map +1 -1
  280. package/dist/src/core/validation/increment-structure-validator.d.ts +47 -0
  281. package/dist/src/core/validation/increment-structure-validator.d.ts.map +1 -0
  282. package/dist/src/core/validation/increment-structure-validator.js +187 -0
  283. package/dist/src/core/validation/increment-structure-validator.js.map +1 -0
  284. package/dist/src/core/validation/three-file-validator.d.ts +82 -0
  285. package/dist/src/core/validation/three-file-validator.d.ts.map +1 -0
  286. package/dist/src/core/validation/three-file-validator.js +320 -0
  287. package/dist/src/core/validation/three-file-validator.js.map +1 -0
  288. package/dist/src/core/workflow/phase-detector.d.ts +103 -0
  289. package/dist/src/core/workflow/phase-detector.d.ts.map +1 -0
  290. package/dist/src/core/workflow/phase-detector.js +704 -0
  291. package/dist/src/core/workflow/phase-detector.js.map +1 -0
  292. package/dist/src/core/workflow/types.d.ts +153 -0
  293. package/dist/src/core/workflow/types.d.ts.map +1 -0
  294. package/dist/src/core/workflow/types.js +47 -0
  295. package/dist/src/core/workflow/types.js.map +1 -0
  296. package/dist/src/init/ArchitecturePresenter.d.ts +47 -0
  297. package/dist/src/init/ArchitecturePresenter.d.ts.map +1 -0
  298. package/dist/src/init/ArchitecturePresenter.js +180 -0
  299. package/dist/src/init/ArchitecturePresenter.js.map +1 -0
  300. package/dist/src/init/InitFlow.d.ts +37 -0
  301. package/dist/src/init/InitFlow.d.ts.map +1 -0
  302. package/dist/src/init/InitFlow.js +238 -0
  303. package/dist/src/init/InitFlow.js.map +1 -0
  304. package/dist/src/init/architecture/ArchitectureDecisionEngine.d.ts +107 -0
  305. package/dist/src/init/architecture/ArchitectureDecisionEngine.d.ts.map +1 -0
  306. package/dist/src/init/architecture/ArchitectureDecisionEngine.js +405 -0
  307. package/dist/src/init/architecture/ArchitectureDecisionEngine.js.map +1 -0
  308. package/dist/src/init/architecture/CloudCreditsDatabase.d.ts +11 -0
  309. package/dist/src/init/architecture/CloudCreditsDatabase.d.ts.map +1 -0
  310. package/dist/src/init/architecture/CloudCreditsDatabase.js +92 -0
  311. package/dist/src/init/architecture/CloudCreditsDatabase.js.map +1 -0
  312. package/dist/src/init/architecture/CostEstimator.d.ts +52 -0
  313. package/dist/src/init/architecture/CostEstimator.d.ts.map +1 -0
  314. package/dist/src/init/architecture/CostEstimator.js +107 -0
  315. package/dist/src/init/architecture/CostEstimator.js.map +1 -0
  316. package/dist/src/init/architecture/InfrastructureMapper.d.ts +41 -0
  317. package/dist/src/init/architecture/InfrastructureMapper.d.ts.map +1 -0
  318. package/dist/src/init/architecture/InfrastructureMapper.js +140 -0
  319. package/dist/src/init/architecture/InfrastructureMapper.js.map +1 -0
  320. package/dist/src/init/architecture/ProjectGenerator.d.ts +44 -0
  321. package/dist/src/init/architecture/ProjectGenerator.d.ts.map +1 -0
  322. package/dist/src/init/architecture/ProjectGenerator.js +216 -0
  323. package/dist/src/init/architecture/ProjectGenerator.js.map +1 -0
  324. package/dist/src/init/architecture/types.d.ts +251 -0
  325. package/dist/src/init/architecture/types.d.ts.map +1 -0
  326. package/dist/src/init/architecture/types.js +54 -0
  327. package/dist/src/init/architecture/types.js.map +1 -0
  328. package/dist/src/init/compliance/ComplianceDetector.d.ts +17 -0
  329. package/dist/src/init/compliance/ComplianceDetector.d.ts.map +1 -0
  330. package/dist/src/init/compliance/ComplianceDetector.js +64 -0
  331. package/dist/src/init/compliance/ComplianceDetector.js.map +1 -0
  332. package/dist/src/init/compliance/standards-database.d.ts +48 -0
  333. package/dist/src/init/compliance/standards-database.d.ts.map +1 -0
  334. package/dist/src/init/compliance/standards-database.js +506 -0
  335. package/dist/src/init/compliance/standards-database.js.map +1 -0
  336. package/dist/src/init/compliance/types.d.ts +91 -0
  337. package/dist/src/init/compliance/types.d.ts.map +1 -0
  338. package/dist/src/init/compliance/types.js +43 -0
  339. package/dist/src/init/compliance/types.js.map +1 -0
  340. package/dist/src/init/repo/GitHubAPIClient.d.ts +51 -0
  341. package/dist/src/init/repo/GitHubAPIClient.d.ts.map +1 -0
  342. package/dist/src/init/repo/GitHubAPIClient.js +144 -0
  343. package/dist/src/init/repo/GitHubAPIClient.js.map +1 -0
  344. package/dist/src/init/repo/RepositorySelector.d.ts +45 -0
  345. package/dist/src/init/repo/RepositorySelector.d.ts.map +1 -0
  346. package/dist/src/init/repo/RepositorySelector.js +106 -0
  347. package/dist/src/init/repo/RepositorySelector.js.map +1 -0
  348. package/dist/src/init/repo/types.d.ts +95 -0
  349. package/dist/src/init/repo/types.d.ts.map +1 -0
  350. package/dist/src/init/repo/types.js +25 -0
  351. package/dist/src/init/repo/types.js.map +1 -0
  352. package/dist/src/init/research/CompetitorAnalyzer.d.ts +79 -0
  353. package/dist/src/init/research/CompetitorAnalyzer.d.ts.map +1 -0
  354. package/dist/src/init/research/CompetitorAnalyzer.js +265 -0
  355. package/dist/src/init/research/CompetitorAnalyzer.js.map +1 -0
  356. package/dist/src/init/research/MarketDetector.d.ts +62 -0
  357. package/dist/src/init/research/MarketDetector.d.ts.map +1 -0
  358. package/dist/src/init/research/MarketDetector.js +247 -0
  359. package/dist/src/init/research/MarketDetector.js.map +1 -0
  360. package/dist/src/init/research/OpportunityScorer.d.ts +58 -0
  361. package/dist/src/init/research/OpportunityScorer.d.ts.map +1 -0
  362. package/dist/src/init/research/OpportunityScorer.js +194 -0
  363. package/dist/src/init/research/OpportunityScorer.js.map +1 -0
  364. package/dist/src/init/research/QuestionGenerator.d.ts +68 -0
  365. package/dist/src/init/research/QuestionGenerator.d.ts.map +1 -0
  366. package/dist/src/init/research/QuestionGenerator.js +244 -0
  367. package/dist/src/init/research/QuestionGenerator.js.map +1 -0
  368. package/dist/src/init/research/ReportGenerator.d.ts +36 -0
  369. package/dist/src/init/research/ReportGenerator.d.ts.map +1 -0
  370. package/dist/src/init/research/ReportGenerator.js +125 -0
  371. package/dist/src/init/research/ReportGenerator.js.map +1 -0
  372. package/dist/src/init/research/VisionAnalyzer.d.ts +129 -0
  373. package/dist/src/init/research/VisionAnalyzer.d.ts.map +1 -0
  374. package/dist/src/init/research/VisionAnalyzer.js +212 -0
  375. package/dist/src/init/research/VisionAnalyzer.js.map +1 -0
  376. package/dist/src/init/research/keyword-extractor.d.ts +78 -0
  377. package/dist/src/init/research/keyword-extractor.d.ts.map +1 -0
  378. package/dist/src/init/research/keyword-extractor.js +230 -0
  379. package/dist/src/init/research/keyword-extractor.js.map +1 -0
  380. package/dist/src/init/research/src/config/ConfigManager.d.ts +14 -0
  381. package/dist/src/init/research/src/config/ConfigManager.d.ts.map +1 -0
  382. package/dist/src/init/research/src/config/ConfigManager.js +45 -0
  383. package/dist/src/init/research/src/config/ConfigManager.js.map +1 -0
  384. package/dist/src/init/research/src/config/types.d.ts +102 -0
  385. package/dist/src/init/research/src/config/types.d.ts.map +1 -0
  386. package/dist/src/init/research/src/config/types.js +24 -0
  387. package/dist/src/init/research/src/config/types.js.map +1 -0
  388. package/dist/src/init/research/types.d.ts +183 -0
  389. package/dist/src/init/research/types.d.ts.map +1 -0
  390. package/dist/src/init/research/types.js +65 -0
  391. package/dist/src/init/research/types.js.map +1 -0
  392. package/dist/src/init/team/ServerlessSavingsCalculator.d.ts +136 -0
  393. package/dist/src/init/team/ServerlessSavingsCalculator.d.ts.map +1 -0
  394. package/dist/src/init/team/ServerlessSavingsCalculator.js +360 -0
  395. package/dist/src/init/team/ServerlessSavingsCalculator.js.map +1 -0
  396. package/dist/src/init/team/TeamRecommender.d.ts +122 -0
  397. package/dist/src/init/team/TeamRecommender.d.ts.map +1 -0
  398. package/dist/src/init/team/TeamRecommender.js +405 -0
  399. package/dist/src/init/team/TeamRecommender.js.map +1 -0
  400. package/dist/src/init/team/types.d.ts +95 -0
  401. package/dist/src/init/team/types.d.ts.map +1 -0
  402. package/dist/src/init/team/types.js +23 -0
  403. package/dist/src/init/team/types.js.map +1 -0
  404. package/dist/src/integrations/jira/jira-mapper.d.ts +1 -1
  405. package/dist/src/integrations/jira/jira-mapper.d.ts.map +1 -1
  406. package/dist/src/types/cost-tracking.d.ts +1 -1
  407. package/dist/src/types/cost-tracking.d.ts.map +1 -1
  408. package/dist/src/utils/cost-reporter.d.ts +2 -2
  409. package/dist/src/utils/cost-reporter.d.ts.map +1 -1
  410. package/dist/src/utils/docs-preview/config-generator.d.ts +1 -1
  411. package/dist/src/utils/docs-preview/config-generator.d.ts.map +1 -1
  412. package/dist/src/utils/docs-preview/config-generator.js +1 -1
  413. package/dist/src/utils/docs-preview/docusaurus-setup.d.ts +1 -1
  414. package/dist/src/utils/docs-preview/docusaurus-setup.d.ts.map +1 -1
  415. package/dist/src/utils/docs-preview/docusaurus-setup.js +4 -4
  416. package/dist/src/utils/docs-preview/docusaurus-setup.js.map +1 -1
  417. package/dist/src/utils/docs-preview/index.d.ts +6 -6
  418. package/dist/src/utils/docs-preview/index.d.ts.map +1 -1
  419. package/dist/src/utils/docs-preview/index.js +6 -6
  420. package/dist/src/utils/docs-preview/index.js.map +1 -1
  421. package/dist/src/utils/docs-preview/package-installer.d.ts +1 -1
  422. package/dist/src/utils/docs-preview/package-installer.d.ts.map +1 -1
  423. package/dist/src/utils/docs-preview/package-installer.js +1 -1
  424. package/dist/src/utils/docs-preview/package-installer.js.map +1 -1
  425. package/dist/src/utils/docs-preview/server-manager.d.ts +1 -1
  426. package/dist/src/utils/docs-preview/server-manager.d.ts.map +1 -1
  427. package/dist/src/utils/docs-preview/server-manager.js +1 -1
  428. package/dist/src/utils/docs-preview/server-manager.js.map +1 -1
  429. package/dist/src/utils/docs-preview/sidebar-builder.d.ts +1 -1
  430. package/dist/src/utils/docs-preview/sidebar-builder.d.ts.map +1 -1
  431. package/dist/src/utils/generate-skills-index.d.ts +1 -1
  432. package/dist/src/utils/generate-skills-index.js +1 -1
  433. package/dist/src/utils/project-detection.js +1 -1
  434. package/dist/src/utils/project-detection.js.map +1 -1
  435. package/package.json +17 -10
  436. package/plugins/specweave/agents/architect/AGENT.md +605 -0
  437. package/plugins/specweave/agents/infrastructure/AGENT.md +760 -0
  438. package/plugins/specweave/agents/pm/AGENT.md +14 -13
  439. package/plugins/specweave/commands/specweave-check-hooks.md +186 -0
  440. package/plugins/specweave/commands/specweave-plan.md +151 -0
  441. package/plugins/specweave/commands/specweave-sync-acs.md +342 -0
  442. package/plugins/specweave/commands/specweave-validate.md +60 -11
  443. package/plugins/specweave/hooks/lib/update-status-line.sh +8 -4
  444. package/plugins/specweave/hooks/post-increment-change.sh +4 -0
  445. package/plugins/specweave/hooks/post-increment-completion.sh +7 -1
  446. package/plugins/specweave/hooks/post-increment-planning.sh +4 -0
  447. package/plugins/specweave/hooks/post-increment-status-change.sh +4 -0
  448. package/plugins/specweave/hooks/user-prompt-submit.sh +78 -0
  449. package/plugins/specweave/iac-templates/aws-lambda/README.md.hbs +280 -0
  450. package/plugins/specweave/iac-templates/aws-lambda/defaults.json +118 -0
  451. package/plugins/specweave/iac-templates/aws-lambda/environments/dev.defaults.json +46 -0
  452. package/plugins/specweave/iac-templates/aws-lambda/environments/prod.defaults.json +67 -0
  453. package/plugins/specweave/iac-templates/aws-lambda/environments/staging.defaults.json +47 -0
  454. package/plugins/specweave/iac-templates/aws-lambda/main.tf.hbs +241 -0
  455. package/plugins/specweave/iac-templates/aws-lambda/outputs.tf.hbs +61 -0
  456. package/plugins/specweave/iac-templates/aws-lambda/provider.tf.hbs +15 -0
  457. package/plugins/specweave/iac-templates/aws-lambda/variables.tf.hbs +88 -0
  458. package/plugins/specweave/iac-templates/azure-functions/README.md.hbs +315 -0
  459. package/plugins/specweave/iac-templates/azure-functions/defaults.json +65 -0
  460. package/plugins/specweave/iac-templates/azure-functions/environments/dev.defaults.json +30 -0
  461. package/plugins/specweave/iac-templates/azure-functions/environments/prod.defaults.json +34 -0
  462. package/plugins/specweave/iac-templates/azure-functions/environments/staging.defaults.json +31 -0
  463. package/plugins/specweave/iac-templates/azure-functions/iam.tf.hbs +34 -0
  464. package/plugins/specweave/iac-templates/azure-functions/main.tf.hbs +247 -0
  465. package/plugins/specweave/iac-templates/azure-functions/outputs.tf.hbs +72 -0
  466. package/plugins/specweave/iac-templates/azure-functions/provider.tf.hbs +14 -0
  467. package/plugins/specweave/iac-templates/azure-functions/variables.tf.hbs +64 -0
  468. package/plugins/specweave/iac-templates/firebase/README.md.hbs +487 -0
  469. package/plugins/specweave/iac-templates/firebase/defaults.json +55 -0
  470. package/plugins/specweave/iac-templates/firebase/environments/dev.defaults.json +44 -0
  471. package/plugins/specweave/iac-templates/firebase/environments/prod.defaults.json +52 -0
  472. package/plugins/specweave/iac-templates/firebase/environments/staging.defaults.json +43 -0
  473. package/plugins/specweave/iac-templates/firebase/iam.tf.hbs +75 -0
  474. package/plugins/specweave/iac-templates/firebase/main.tf.hbs +297 -0
  475. package/plugins/specweave/iac-templates/firebase/outputs.tf.hbs +67 -0
  476. package/plugins/specweave/iac-templates/firebase/provider.tf.hbs +26 -0
  477. package/plugins/specweave/iac-templates/firebase/variables.tf.hbs +68 -0
  478. package/plugins/specweave/iac-templates/gcp-cloud-functions/README.md.hbs +330 -0
  479. package/plugins/specweave/iac-templates/gcp-cloud-functions/defaults.json +69 -0
  480. package/plugins/specweave/iac-templates/gcp-cloud-functions/environments/dev.defaults.json +33 -0
  481. package/plugins/specweave/iac-templates/gcp-cloud-functions/environments/prod.defaults.json +40 -0
  482. package/plugins/specweave/iac-templates/gcp-cloud-functions/environments/staging.defaults.json +33 -0
  483. package/plugins/specweave/iac-templates/gcp-cloud-functions/iam.tf.hbs +54 -0
  484. package/plugins/specweave/iac-templates/gcp-cloud-functions/main.tf.hbs +211 -0
  485. package/plugins/specweave/iac-templates/gcp-cloud-functions/outputs.tf.hbs +44 -0
  486. package/plugins/specweave/iac-templates/gcp-cloud-functions/provider.tf.hbs +14 -0
  487. package/plugins/specweave/iac-templates/gcp-cloud-functions/variables.tf.hbs +82 -0
  488. package/plugins/specweave/iac-templates/supabase/README.md.hbs +534 -0
  489. package/plugins/specweave/iac-templates/supabase/defaults.json +69 -0
  490. package/plugins/specweave/iac-templates/supabase/environments/dev.defaults.json +55 -0
  491. package/plugins/specweave/iac-templates/supabase/environments/prod.defaults.json +75 -0
  492. package/plugins/specweave/iac-templates/supabase/environments/staging.defaults.json +54 -0
  493. package/plugins/specweave/iac-templates/supabase/iam.tf.hbs +146 -0
  494. package/plugins/specweave/iac-templates/supabase/main.tf.hbs +310 -0
  495. package/plugins/specweave/iac-templates/supabase/outputs.tf.hbs +74 -0
  496. package/plugins/specweave/iac-templates/supabase/provider.tf.hbs +19 -0
  497. package/plugins/specweave/iac-templates/supabase/variables.tf.hbs +78 -0
  498. package/plugins/specweave/knowledge-base/serverless/FRESHNESS.md +69 -0
  499. package/plugins/specweave/knowledge-base/serverless/learning-paths.json +865 -0
  500. package/plugins/specweave/knowledge-base/serverless/platforms/aws-lambda.json +41 -0
  501. package/plugins/specweave/knowledge-base/serverless/platforms/azure-functions.json +41 -0
  502. package/plugins/specweave/knowledge-base/serverless/platforms/firebase.json +46 -0
  503. package/plugins/specweave/knowledge-base/serverless/platforms/gcp-cloud-functions.json +41 -0
  504. package/plugins/specweave/knowledge-base/serverless/platforms/supabase.json +41 -0
  505. package/plugins/specweave/knowledge-base/serverless/schema.json +155 -0
  506. package/plugins/specweave/lib/hooks/auto-transition.js +50 -0
  507. package/plugins/specweave/lib/hooks/auto-transition.ts +84 -0
  508. package/plugins/specweave/lib/hooks/invoke-translator-skill.js +1 -1
  509. package/plugins/specweave/lib/hooks/invoke-translator-skill.ts +1 -1
  510. package/plugins/specweave/lib/hooks/sync-living-docs.js +4 -31
  511. package/plugins/specweave/lib/hooks/{sync-living-docs.ts → sync-living-docs.ts.DISABLED} +9 -48
  512. package/plugins/specweave/lib/hooks/translate-file.js +1 -1
  513. package/plugins/specweave/lib/hooks/translate-file.ts +1 -1
  514. package/plugins/specweave/lib/hooks/update-ac-status.js +24 -75
  515. package/plugins/specweave/lib/hooks/update-ac-status.ts +46 -135
  516. package/plugins/specweave/lib/hooks/update-tasks-md.js +115 -3
  517. package/plugins/specweave/lib/hooks/update-tasks-md.ts +182 -10
  518. package/plugins/specweave/lib/utils/validate-dev-setup.sh +133 -0
  519. package/plugins/specweave/skills/increment-planner/SKILL.md +25 -15
  520. package/plugins/specweave/skills/serverless-recommender/SKILL.md +368 -0
  521. package/plugins/specweave/templates/iac/aws-lambda/templates/iam.tf.hbs +137 -0
  522. package/plugins/specweave/templates/iac/aws-lambda/templates/main.tf.hbs +216 -0
  523. package/plugins/specweave-ado/lib/enhanced-ado-sync.js +170 -0
  524. package/plugins/specweave-github/lib/CodeValidator.js +195 -0
  525. package/plugins/specweave-github/lib/CodeValidator.ts +284 -0
  526. package/plugins/specweave-github/lib/IssueStateManager.js +117 -0
  527. package/plugins/specweave-github/lib/IssueStateManager.ts +231 -0
  528. package/plugins/specweave-github/lib/ThreeLayerSyncManager.js +545 -0
  529. package/plugins/specweave-github/lib/ThreeLayerSyncManager.ts +809 -0
  530. package/plugins/specweave-github/lib/types.ts +38 -0
  531. package/plugins/specweave-github/lib/user-story-issue-builder.js +7 -0
  532. package/plugins/specweave-github/lib/user-story-issue-builder.ts +11 -0
  533. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +1200 -0
  534. package/plugins/specweave-ui/.mcp.json +0 -10
  535. package/plugins/specweave-ui/README.md +26 -26
  536. package/plugins/specweave-ui/skills/browser-automation/SKILL.md +31 -18
  537. package/src/templates/AGENTS.md.template +22 -1
  538. package/src/templates/tasks.md.template +51 -33
  539. package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.d.ts +0 -89
  540. package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.d.ts.map +0 -1
  541. package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.js +0 -226
  542. package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.js.map +0 -1
  543. package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.d.ts +0 -60
  544. package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.d.ts.map +0 -1
  545. package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.js +0 -201
  546. package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.js.map +0 -1
  547. package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.d.ts +0 -42
  548. package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.d.ts.map +0 -1
  549. package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.js +0 -123
  550. package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.js.map +0 -1
  551. package/dist/plugins/specweave/lib/hooks/reflection-config-loader.d.ts +0 -45
  552. package/dist/plugins/specweave/lib/hooks/reflection-config-loader.d.ts.map +0 -1
  553. package/dist/plugins/specweave/lib/hooks/reflection-config-loader.js +0 -132
  554. package/dist/plugins/specweave/lib/hooks/reflection-config-loader.js.map +0 -1
  555. package/dist/plugins/specweave/lib/hooks/reflection-parser.d.ts +0 -33
  556. package/dist/plugins/specweave/lib/hooks/reflection-parser.d.ts.map +0 -1
  557. package/dist/plugins/specweave/lib/hooks/reflection-parser.js +0 -419
  558. package/dist/plugins/specweave/lib/hooks/reflection-parser.js.map +0 -1
  559. package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.d.ts +0 -56
  560. package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.d.ts.map +0 -1
  561. package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.js +0 -239
  562. package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.js.map +0 -1
  563. package/dist/plugins/specweave/lib/hooks/reflection-storage.d.ts +0 -64
  564. package/dist/plugins/specweave/lib/hooks/reflection-storage.d.ts.map +0 -1
  565. package/dist/plugins/specweave/lib/hooks/reflection-storage.js +0 -305
  566. package/dist/plugins/specweave/lib/hooks/reflection-storage.js.map +0 -1
  567. package/dist/plugins/specweave/lib/hooks/run-self-reflection.d.ts +0 -43
  568. package/dist/plugins/specweave/lib/hooks/run-self-reflection.d.ts.map +0 -1
  569. package/dist/plugins/specweave/lib/hooks/run-self-reflection.js +0 -203
  570. package/dist/plugins/specweave/lib/hooks/run-self-reflection.js.map +0 -1
  571. package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts +0 -32
  572. package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts.map +0 -1
  573. package/dist/plugins/specweave/lib/hooks/sync-living-docs.js +0 -405
  574. package/dist/plugins/specweave/lib/hooks/sync-living-docs.js.map +0 -1
  575. package/dist/plugins/specweave/lib/hooks/translate-file.d.ts +0 -59
  576. package/dist/plugins/specweave/lib/hooks/translate-file.d.ts.map +0 -1
  577. package/dist/plugins/specweave/lib/hooks/translate-file.js +0 -350
  578. package/dist/plugins/specweave/lib/hooks/translate-file.js.map +0 -1
  579. package/dist/plugins/specweave/lib/hooks/translate-living-docs.d.ts +0 -13
  580. package/dist/plugins/specweave/lib/hooks/translate-living-docs.d.ts.map +0 -1
  581. package/dist/plugins/specweave/lib/hooks/translate-living-docs.js +0 -175
  582. package/dist/plugins/specweave/lib/hooks/translate-living-docs.js.map +0 -1
  583. package/dist/plugins/specweave/lib/hooks/types/reflection-types.d.ts +0 -164
  584. package/dist/plugins/specweave/lib/hooks/types/reflection-types.d.ts.map +0 -1
  585. package/dist/plugins/specweave/lib/hooks/types/reflection-types.js +0 -73
  586. package/dist/plugins/specweave/lib/hooks/types/reflection-types.js.map +0 -1
  587. package/dist/plugins/specweave/lib/hooks/update-ac-status.d.ts +0 -21
  588. package/dist/plugins/specweave/lib/hooks/update-ac-status.d.ts.map +0 -1
  589. package/dist/plugins/specweave/lib/hooks/update-ac-status.js +0 -162
  590. package/dist/plugins/specweave/lib/hooks/update-ac-status.js.map +0 -1
  591. package/dist/plugins/specweave/lib/hooks/update-tasks-md.d.ts +0 -29
  592. package/dist/plugins/specweave/lib/hooks/update-tasks-md.d.ts.map +0 -1
  593. package/dist/plugins/specweave/lib/hooks/update-tasks-md.js +0 -203
  594. package/dist/plugins/specweave/lib/hooks/update-tasks-md.js.map +0 -1
  595. package/dist/src/core/living-docs/spec-distributor.d.ts +0 -180
  596. package/dist/src/core/living-docs/spec-distributor.d.ts.map +0 -1
  597. package/dist/src/core/living-docs/spec-distributor.js +0 -1840
  598. package/dist/src/core/living-docs/spec-distributor.js.map +0 -1
@@ -0,0 +1,214 @@
1
+ /**
2
+ * Hook Scanner
3
+ *
4
+ * Discovers and catalogs all hooks in the project.
5
+ * Scans plugin directories, parses hook metadata, and builds hook registry.
6
+ *
7
+ * Part of increment 0037: Hook Health Check System
8
+ */
9
+ import * as fs from 'fs-extra';
10
+ import * as path from 'path';
11
+ /**
12
+ * Hook Scanner - Discovers hooks in project
13
+ */
14
+ export class HookScanner {
15
+ constructor(config) {
16
+ this.config = config;
17
+ }
18
+ /**
19
+ * Scan project for all hooks
20
+ */
21
+ async scanHooks() {
22
+ const hooks = [];
23
+ for (const pluginDir of this.config.pluginDirs) {
24
+ const hooksDir = path.join(pluginDir, 'hooks');
25
+ if (!fs.existsSync(hooksDir)) {
26
+ continue; // No hooks in this plugin
27
+ }
28
+ const pluginHooks = await this.scanPluginHooks(hooksDir, path.basename(pluginDir));
29
+ hooks.push(...pluginHooks);
30
+ }
31
+ return hooks;
32
+ }
33
+ /**
34
+ * Scan hooks in a specific plugin directory
35
+ */
36
+ async scanPluginHooks(hooksDir, pluginName) {
37
+ const hooks = [];
38
+ const files = fs.readdirSync(hooksDir);
39
+ for (const file of files) {
40
+ const filePath = path.join(hooksDir, file);
41
+ const stat = fs.statSync(filePath);
42
+ if (stat.isDirectory()) {
43
+ // Skip subdirectories (lib/, etc.)
44
+ continue;
45
+ }
46
+ // Only check hook trigger files (.sh or .ts)
47
+ if (!this.isHookFile(file)) {
48
+ continue;
49
+ }
50
+ const hook = await this.parseHookFile(filePath, pluginName);
51
+ if (hook) {
52
+ hooks.push(hook);
53
+ }
54
+ }
55
+ return hooks;
56
+ }
57
+ /**
58
+ * Check if file is a hook trigger file
59
+ */
60
+ isHookFile(filename) {
61
+ // Hook trigger files: *.sh (bash hooks)
62
+ // Exclude lib/ subdirectories
63
+ return filename.endsWith('.sh') && !filename.includes('lib/');
64
+ }
65
+ /**
66
+ * Parse hook file and extract metadata
67
+ */
68
+ async parseHookFile(filePath, pluginName) {
69
+ const filename = path.basename(filePath);
70
+ const hookName = filename.replace(/\.(sh|ts|js)$/, '');
71
+ const trigger = this.extractTrigger(hookName);
72
+ if (!trigger) {
73
+ return null; // Not a recognized hook trigger
74
+ }
75
+ const fileType = this.getFileType(filename);
76
+ const dependencies = await this.extractDependencies(filePath, fileType);
77
+ const critical = this.isCriticalHook(hookName);
78
+ const testable = this.isTestableHook(hookName, fileType);
79
+ return {
80
+ name: hookName,
81
+ plugin: pluginName,
82
+ path: filePath,
83
+ type: fileType,
84
+ dependencies,
85
+ trigger,
86
+ testable,
87
+ critical,
88
+ expectedDuration: this.getExpectedDuration(hookName)
89
+ };
90
+ }
91
+ /**
92
+ * Extract hook trigger from hook name
93
+ */
94
+ extractTrigger(hookName) {
95
+ const triggerMap = {
96
+ 'user-prompt-submit': 'user-prompt-submit',
97
+ 'post-task-completion': 'post-task-completion',
98
+ 'post-increment-change': 'post-increment-change',
99
+ 'pre-tool-use': 'pre-tool-use',
100
+ 'post-write': 'post-write',
101
+ 'post-edit': 'post-edit'
102
+ };
103
+ return triggerMap[hookName] || null;
104
+ }
105
+ /**
106
+ * Get file type from extension
107
+ */
108
+ getFileType(filename) {
109
+ if (filename.endsWith('.sh')) {
110
+ return 'shell';
111
+ }
112
+ else if (filename.endsWith('.ts')) {
113
+ return 'typescript';
114
+ }
115
+ else if (filename.endsWith('.js')) {
116
+ return 'javascript';
117
+ }
118
+ return 'shell'; // Default
119
+ }
120
+ /**
121
+ * Extract dependencies from hook file
122
+ */
123
+ async extractDependencies(filePath, fileType) {
124
+ const content = fs.readFileSync(filePath, 'utf-8');
125
+ const dependencies = [];
126
+ if (fileType === 'shell') {
127
+ // Extract dependencies from bash script
128
+ // Look for node invocations
129
+ const nodeMatches = Array.from(content.matchAll(/node\s+([^\s]+)/g));
130
+ for (const match of nodeMatches) {
131
+ dependencies.push(match[1]);
132
+ }
133
+ }
134
+ else {
135
+ // Extract TypeScript/JavaScript imports
136
+ const importMatches = Array.from(content.matchAll(/import\s+.*\s+from\s+['"](.+?)['"]/g));
137
+ for (const match of importMatches) {
138
+ dependencies.push(match[1]);
139
+ }
140
+ }
141
+ return dependencies;
142
+ }
143
+ /**
144
+ * Determine if hook is critical (failure blocks workflow)
145
+ */
146
+ isCriticalHook(hookName) {
147
+ const criticalHooks = [
148
+ 'post-task-completion', // AC sync, living docs sync
149
+ 'user-prompt-submit' // Input validation
150
+ ];
151
+ return criticalHooks.includes(hookName);
152
+ }
153
+ /**
154
+ * Determine if hook is testable in isolation
155
+ */
156
+ isTestableHook(hookName, fileType) {
157
+ // Shell hooks that call Node.js scripts are testable
158
+ // TypeScript/JavaScript hooks are directly testable
159
+ if (fileType === 'typescript' || fileType === 'javascript') {
160
+ return true;
161
+ }
162
+ // Some bash hooks are wrappers that call Node.js - testable
163
+ const testableShellHooks = [
164
+ 'post-task-completion',
165
+ 'post-increment-change'
166
+ ];
167
+ return testableShellHooks.includes(hookName);
168
+ }
169
+ /**
170
+ * Get expected execution duration for hook (ms)
171
+ */
172
+ getExpectedDuration(hookName) {
173
+ const durationMap = {
174
+ 'update-ac-status': 100, // 100ms
175
+ 'auto-transition': 50, // 50ms
176
+ 'sync-living-docs': 200, // 200ms
177
+ 'translate-living-docs': 150, // 150ms
178
+ 'update-tasks-md': 80, // 80ms
179
+ 'update-status-line': 50, // 50ms
180
+ 'prepare-reflection-context': 60, // 60ms
181
+ 'invoke-translator-skill': 40 // 40ms
182
+ };
183
+ return durationMap[hookName] || 100; // Default 100ms
184
+ }
185
+ /**
186
+ * Find all plugin directories in project
187
+ */
188
+ static async findPluginDirectories(projectRoot) {
189
+ const pluginsDir = path.join(projectRoot, 'plugins');
190
+ if (!fs.existsSync(pluginsDir)) {
191
+ return [];
192
+ }
193
+ const entries = fs.readdirSync(pluginsDir, { withFileTypes: true });
194
+ const pluginDirs = [];
195
+ for (const entry of entries) {
196
+ if (entry.isDirectory()) {
197
+ pluginDirs.push(path.join(pluginsDir, entry.name));
198
+ }
199
+ }
200
+ return pluginDirs;
201
+ }
202
+ /**
203
+ * Create default scanner config
204
+ */
205
+ static async createDefaultConfig(projectRoot) {
206
+ const pluginDirs = await this.findPluginDirectories(projectRoot);
207
+ return {
208
+ projectRoot,
209
+ pluginDirs,
210
+ includeNonTestable: true
211
+ };
212
+ }
213
+ }
214
+ //# sourceMappingURL=HookScanner.js.map
@@ -0,0 +1 @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
+ * Type definitions for the hook health monitoring system.
5
+ * Supports detection, validation, and auto-fixing of hook failures.
6
+ *
7
+ * Part of increment 0037: Hook Health Check System
8
+ */
9
+ /**
10
+ * Trigger event that causes a hook to execute
11
+ */
12
+ export type HookTrigger = 'user-prompt-submit' | 'post-task-completion' | 'post-increment-change' | 'pre-tool-use' | 'post-write' | 'post-edit';
13
+ /**
14
+ * Hook file type
15
+ */
16
+ export type HookType = 'shell' | 'typescript' | 'javascript';
17
+ /**
18
+ * Hook definition discovered by scanner
19
+ */
20
+ export interface HookDefinition {
21
+ /** Hook name (e.g., "update-ac-status") */
22
+ name: string;
23
+ /** Plugin that owns this hook (e.g., "specweave") */
24
+ plugin: string;
25
+ /** Absolute path to hook file */
26
+ path: string;
27
+ /** File type */
28
+ type: HookType;
29
+ /** Imported modules/dependencies */
30
+ dependencies: string[];
31
+ /** Trigger event */
32
+ trigger: HookTrigger;
33
+ /** Can be tested in isolation */
34
+ testable: boolean;
35
+ /** Failure blocks workflow (critical hooks) */
36
+ critical: boolean;
37
+ /** Expected execution time (ms) */
38
+ expectedDuration?: number;
39
+ }
40
+ /**
41
+ * Error detected during hook execution
42
+ */
43
+ export interface HookError {
44
+ /** Error type */
45
+ type: 'import' | 'runtime' | 'timeout' | 'validation' | 'syntax';
46
+ /** Error message */
47
+ message: string;
48
+ /** Stack trace (if available) */
49
+ stack?: string;
50
+ /** Auto-fix suggestion */
51
+ suggestion?: string;
52
+ /** Can be auto-fixed */
53
+ fixable: boolean;
54
+ /** Line number where error occurred */
55
+ line?: number;
56
+ /** Column number where error occurred */
57
+ column?: number;
58
+ }
59
+ /**
60
+ * Warning detected during hook execution
61
+ */
62
+ export interface HookWarning {
63
+ /** Warning type */
64
+ type: 'performance' | 'deprecation' | 'best-practice' | 'security';
65
+ /** Warning message */
66
+ message: string;
67
+ /** Severity level */
68
+ severity: 'low' | 'medium' | 'high';
69
+ /** Recommendation to address warning */
70
+ recommendation?: string;
71
+ }
72
+ /**
73
+ * Result of executing a single hook
74
+ */
75
+ export interface HookExecutionResult {
76
+ /** Hook name */
77
+ hook: string;
78
+ /** Plugin name */
79
+ plugin: string;
80
+ /** Hook passed health check */
81
+ success: boolean;
82
+ /** Process exit code */
83
+ exitCode: number;
84
+ /** Standard output */
85
+ stdout: string;
86
+ /** Standard error */
87
+ stderr: string;
88
+ /** Execution time in milliseconds */
89
+ executionTime: number;
90
+ /** Detected errors */
91
+ errors: HookError[];
92
+ /** Detected warnings */
93
+ warnings: HookWarning[];
94
+ /** Execution timestamp */
95
+ timestamp: string;
96
+ /** Performance threshold exceeded */
97
+ performanceIssue: boolean;
98
+ /** Expected vs actual duration */
99
+ performanceRatio?: number;
100
+ }
101
+ /**
102
+ * Overall health check result
103
+ */
104
+ export interface HealthCheckResult {
105
+ /** Check timestamp */
106
+ timestamp: string;
107
+ /** Total hooks checked */
108
+ totalHooks: number;
109
+ /** Hooks that passed */
110
+ passedHooks: number;
111
+ /** Hooks that failed */
112
+ failedHooks: number;
113
+ /** Critical hook failures */
114
+ criticalFailures: number;
115
+ /** Overall health status */
116
+ overallHealth: 'healthy' | 'degraded' | 'unhealthy';
117
+ /** Individual hook results */
118
+ results: HookExecutionResult[];
119
+ /** Summary and recommendations */
120
+ summary: HealthSummary;
121
+ /** Total execution time */
122
+ totalExecutionTime: number;
123
+ /** Project root path */
124
+ projectRoot: string;
125
+ }
126
+ /**
127
+ * Health check summary with recommendations
128
+ */
129
+ export interface HealthSummary {
130
+ /** Pass/warn/fail status */
131
+ status: 'pass' | 'warn' | 'fail';
132
+ /** Summary message */
133
+ message: string;
134
+ /** Actionable recommendations */
135
+ recommendations: string[];
136
+ /** Number of auto-fixable issues */
137
+ fixableIssues: number;
138
+ /** Number of issues requiring manual intervention */
139
+ manualIssues: number;
140
+ /** Hooks with performance issues */
141
+ slowHooks: string[];
142
+ /** Critical hooks that failed */
143
+ criticalHooksFailed: string[];
144
+ }
145
+ /**
146
+ * Auto-fix result
147
+ */
148
+ export interface FixResult {
149
+ /** Hook that was fixed */
150
+ hook: string;
151
+ /** Fix was successful */
152
+ success: boolean;
153
+ /** Type of fix applied */
154
+ fixType: 'import' | 'static-method' | 'timeout' | 'dependency';
155
+ /** Fix description */
156
+ description: string;
157
+ /** Files modified */
158
+ filesModified: string[];
159
+ /** Error if fix failed */
160
+ error?: string;
161
+ /** Verification after fix */
162
+ verification?: HookExecutionResult;
163
+ }
164
+ /**
165
+ * Auto-fix batch result
166
+ */
167
+ export interface BatchFixResult {
168
+ /** Total fixes attempted */
169
+ totalFixes: number;
170
+ /** Successful fixes */
171
+ successfulFixes: number;
172
+ /** Failed fixes */
173
+ failedFixes: number;
174
+ /** Individual fix results */
175
+ results: FixResult[];
176
+ /** Hooks that require manual intervention */
177
+ manualFixRequired: string[];
178
+ /** Overall success */
179
+ success: boolean;
180
+ }
181
+ /**
182
+ * Hook health check configuration
183
+ */
184
+ export interface HealthCheckConfig {
185
+ /** Project root directory */
186
+ projectRoot: string;
187
+ /** Timeout for hook execution (ms) */
188
+ timeout: number;
189
+ /** Run auto-fix for detected issues */
190
+ autoFix: boolean;
191
+ /** Verbose output */
192
+ verbose: boolean;
193
+ /** Check only critical hooks */
194
+ criticalOnly: boolean;
195
+ /** Specific hooks to check (empty = all) */
196
+ hooksToCheck: string[];
197
+ /** Performance threshold ratio (actual/expected) */
198
+ performanceThreshold: number;
199
+ /** Fail on warnings */
200
+ failOnWarnings: boolean;
201
+ }
202
+ /**
203
+ * Health report format
204
+ */
205
+ export type ReportFormat = 'console' | 'markdown' | 'json' | 'junit';
206
+ /**
207
+ * Health report options
208
+ */
209
+ export interface ReportOptions {
210
+ /** Output format */
211
+ format: ReportFormat;
212
+ /** Output file path (null = stdout) */
213
+ outputPath?: string;
214
+ /** Include full details */
215
+ detailed: boolean;
216
+ /** Color output for console */
217
+ color: boolean;
218
+ /** Show only failures */
219
+ failuresOnly: boolean;
220
+ }
221
+ /**
222
+ * Scanner configuration
223
+ */
224
+ export interface ScannerConfig {
225
+ /** Project root */
226
+ projectRoot: string;
227
+ /** Plugin directories to scan */
228
+ pluginDirs: string[];
229
+ /** Include non-testable hooks */
230
+ includeNonTestable: boolean;
231
+ }
232
+ /**
233
+ * Executor configuration
234
+ */
235
+ export interface ExecutorConfig {
236
+ /** Execution timeout (ms) */
237
+ timeout: number;
238
+ /** Capture stdout */
239
+ captureStdout: boolean;
240
+ /** Capture stderr */
241
+ captureStderr: boolean;
242
+ /** Test increment ID to use */
243
+ testIncrementId: string;
244
+ /** Test input data */
245
+ testInput?: any;
246
+ }
247
+ /**
248
+ * Import error details
249
+ */
250
+ export interface ImportErrorDetails {
251
+ /** Missing module path */
252
+ modulePath: string;
253
+ /** Importing file */
254
+ importingFile: string;
255
+ /** Import statement line */
256
+ importStatement: string;
257
+ /** Has .js extension */
258
+ hasExtension: boolean;
259
+ /** Suggested fix */
260
+ suggestedPath: string;
261
+ /** Fix confidence */
262
+ fixConfidence: 'high' | 'medium' | 'low';
263
+ }
264
+ /**
265
+ * Performance analysis result
266
+ */
267
+ export interface PerformanceAnalysis {
268
+ /** Hook name */
269
+ hook: string;
270
+ /** Actual execution time (ms) */
271
+ actualTime: number;
272
+ /** Expected execution time (ms) */
273
+ expectedTime: number;
274
+ /** Performance ratio (actual/expected) */
275
+ ratio: number;
276
+ /** Exceeds threshold */
277
+ exceedsThreshold: boolean;
278
+ /** Performance recommendation */
279
+ recommendation?: string;
280
+ }
281
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/core/hooks/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,MAAM,WAAW,GACnB,oBAAoB,GACpB,sBAAsB,GACtB,uBAAuB,GACvB,cAAc,GACd,YAAY,GACZ,WAAW,CAAC;AAEhB;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,YAAY,GAAG,YAAY,CAAC;AAE7D;;GAEG;AACH,MA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AY,EAAE,OAAO,CAAC;IAEtB,oBAAoB;IACpB,aAAa,EAAE,MAAM,CAAC;IAEtB,qBAAqB;IACrB,aAAa,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAC;IAEb,iCAAiC;IACjC,UAAU,EAAE,MAAM,CAAC;IAEnB,mCAAmC;IACnC,YAAY,EAAE,MAAM,CAAC;IAErB,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IAEd,wBAAwB;IACxB,gBAAgB,EAAE,OAAO,CAAC;IAE1B,iCAAiC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Hook Health Check Types
3
+ *
4
+ * Type definitions for the hook health monitoring system.
5
+ * Supports detection, validation, and auto-fixing of hook failures.
6
+ *
7
+ * Part of increment 0037: Hook Health Check System
8
+ */
9
+ export {};
10
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/core/hooks/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Infrastructure as Code (IaC) Generation - Barrel Exports
3
+ *
4
+ * This module provides Terraform template generation capabilities for serverless platforms:
5
+ * - Handlebars template engine
6
+ * - Multi-platform support (AWS Lambda, Azure Functions, GCP, Firebase, Supabase)
7
+ * - Environment-specific configuration (dev, staging, prod)
8
+ */
9
+ export * from './template-engine.js';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/iac/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Infrastructure as Code (IaC) Generation - Barrel Exports
3
+ *
4
+ * This module provides Terraform template generation capabilities for serverless platforms:
5
+ * - Handlebars template engine
6
+ * - Multi-platform support (AWS Lambda, Azure Functions, GCP, Firebase, Supabase)
7
+ * - Environment-specific configuration (dev, staging, prod)
8
+ */
9
+ // Template engine
10
+ export * from './template-engine.js';
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/iac/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,kBAAkB;AAClB,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Terraform Template Engine
3
+ *
4
+ * Renders Terraform templates using Handlebars with platform-specific variables.
5
+ */
6
+ export interface TemplateVariables {
7
+ projectName?: string;
8
+ projectDescription?: string;
9
+ environment?: 'dev' | 'staging' | 'prod';
10
+ provider?: 'aws' | 'azure' | 'gcp' | 'firebase' | 'supabase';
11
+ region?: string;
12
+ functionName?: string;
13
+ runtime?: string;
14
+ handler?: string;
15
+ memorySize?: number;
16
+ timeout?: number;
17
+ databaseName?: string;
18
+ databaseType?: 'dynamodb' | 'cosmosdb' | 'firestore' | 'postgresql';
19
+ apiName?: string;
20
+ apiStageName?: string;
21
+ authEnabled?: boolean;
22
+ authProvider?: string;
23
+ monitoringEnabled?: boolean;
24
+ [key: string]: any;
25
+ }
26
+ export interface TemplateRenderResult {
27
+ mainTf: string;
28
+ variablesTf: string;
29
+ outputsTf: string;
30
+ providerTf?: string;
31
+ readmeMd?: string;
32
+ }
33
+ /**
34
+ * Template Engine for generating Terraform configurations
35
+ */
36
+ export declare class TerraformTemplateEngine {
37
+ private handlebars;
38
+ private templateCache;
39
+ constructor();
40
+ /**
41
+ * Register custom Handlebars helpers
42
+ */
43
+ private registerHelpers;
44
+ /**
45
+ * Load and compile a template from file
46
+ */
47
+ loadTemplate(templatePath: string): HandlebarsTemplateDelegate;
48
+ /**
49
+ * Load template from string
50
+ */
51
+ loadTemplateString(templateContent: string): HandlebarsTemplateDelegate;
52
+ /**
53
+ * Register a partial template
54
+ */
55
+ registerPartial(name: string, templatePath: string): void;
56
+ /**
57
+ * Render a single template file
58
+ */
59
+ renderTemplate(templatePath: string, variables: TemplateVariables): string;
60
+ /**
61
+ * Render complete Terraform configuration from template directory
62
+ */
63
+ renderTerraformConfig(templateDir: string, variables: TemplateVariables): TemplateRenderResult;
64
+ /**
65
+ * Write rendered Terraform configuration to output directory
66
+ */
67
+ writeTerraformConfig(outputDir: string, config: TemplateRenderResult): void;
68
+ /**
69
+ * Clear template cache
70
+ */
71
+ clearCache(): void;
72
+ }
73
+ /**
74
+ * Create a new template engine instance
75
+ */
76
+ export declare function createTemplateEngine(): TerraformTemplateEngine;
77
+ //# sourceMappingURL=template-engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template-engine.d.ts","sourceRoot":"","sources":["../../../../src/core/iac/template-engine.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,MAAM,WAAW,iBAAiB;IAEhC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC;IAGzC,QAAQ,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,KAAK,GAAG,UAAU,GAAG,UAAU,CAAC;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,YAAY,CAAC;IAGpE,OAAO,CAAC,EAAE,MAAM,CAAC;IACj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