specweave 0.21.2 → 0.21.3

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 (553) hide show
  1. package/CLAUDE.md +232 -5
  2. package/dist/plugins/specweave-github/lib/IssueStateManager.d.ts +98 -0
  3. package/dist/plugins/specweave-github/lib/IssueStateManager.d.ts.map +1 -0
  4. package/dist/plugins/specweave-github/lib/IssueStateManager.js +146 -0
  5. package/dist/plugins/specweave-github/lib/IssueStateManager.js.map +1 -0
  6. package/dist/plugins/specweave-github/lib/user-story-issue-builder.d.ts.map +1 -1
  7. package/dist/plugins/specweave-github/lib/user-story-issue-builder.js +6 -0
  8. package/dist/plugins/specweave-github/lib/user-story-issue-builder.js.map +1 -1
  9. package/dist/src/cli/commands/check-hooks.d.ts +11 -0
  10. package/dist/src/cli/commands/check-hooks.d.ts.map +1 -0
  11. package/dist/src/cli/commands/check-hooks.js +144 -0
  12. package/dist/src/cli/commands/check-hooks.js.map +1 -0
  13. package/dist/src/cli/commands/cicd-monitor.js +3 -3
  14. package/dist/src/cli/commands/cicd-monitor.js.map +1 -1
  15. package/dist/src/cli/commands/import-docs.js +2 -2
  16. package/dist/src/cli/commands/import-docs.js.map +1 -1
  17. package/dist/src/cli/commands/init-multiproject.js +4 -4
  18. package/dist/src/cli/commands/init-multiproject.js.map +1 -1
  19. package/dist/src/cli/commands/migrate-to-multiproject.js +3 -3
  20. package/dist/src/cli/commands/migrate-to-multiproject.js.map +1 -1
  21. package/dist/src/cli/commands/plan/agent-invoker.d.ts +79 -0
  22. package/dist/src/cli/commands/plan/agent-invoker.d.ts.map +1 -0
  23. package/dist/src/cli/commands/plan/agent-invoker.js +383 -0
  24. package/dist/src/cli/commands/plan/agent-invoker.js.map +1 -0
  25. package/dist/src/cli/commands/plan/increment-detector.d.ts +27 -0
  26. package/dist/src/cli/commands/plan/increment-detector.d.ts.map +1 -0
  27. package/dist/src/cli/commands/plan/increment-detector.js +159 -0
  28. package/dist/src/cli/commands/plan/increment-detector.js.map +1 -0
  29. package/dist/src/cli/commands/plan/plan-orchestrator.d.ts +45 -0
  30. package/dist/src/cli/commands/plan/plan-orchestrator.d.ts.map +1 -0
  31. package/dist/src/cli/commands/plan/plan-orchestrator.js +229 -0
  32. package/dist/src/cli/commands/plan/plan-orchestrator.js.map +1 -0
  33. package/dist/src/cli/commands/plan/plan-validator.d.ts +36 -0
  34. package/dist/src/cli/commands/plan/plan-validator.d.ts.map +1 -0
  35. package/dist/src/cli/commands/plan/plan-validator.js +174 -0
  36. package/dist/src/cli/commands/plan/plan-validator.js.map +1 -0
  37. package/dist/src/cli/commands/plan/types.d.ts +170 -0
  38. package/dist/src/cli/commands/plan/types.d.ts.map +1 -0
  39. package/dist/src/cli/commands/plan/types.js +42 -0
  40. package/dist/src/cli/commands/plan/types.js.map +1 -0
  41. package/dist/src/cli/commands/plan-command.d.ts +16 -0
  42. package/dist/src/cli/commands/plan-command.d.ts.map +1 -0
  43. package/dist/src/cli/commands/plan-command.js +127 -0
  44. package/dist/src/cli/commands/plan-command.js.map +1 -0
  45. package/dist/src/cli/commands/switch-project.js +3 -3
  46. package/dist/src/cli/commands/switch-project.js.map +1 -1
  47. package/dist/src/cli/commands/validate-parent-repo.js +1 -1
  48. package/dist/src/cli/commands/validate-parent-repo.js.map +1 -1
  49. package/dist/src/config/ConfigManager.d.ts +69 -0
  50. package/dist/src/config/ConfigManager.d.ts.map +1 -0
  51. package/dist/src/config/ConfigManager.js +130 -0
  52. package/dist/src/config/ConfigManager.js.map +1 -0
  53. package/dist/src/config/types.d.ts +1357 -0
  54. package/dist/src/config/types.d.ts.map +1 -0
  55. package/dist/src/config/types.js +67 -0
  56. package/dist/src/config/types.js.map +1 -0
  57. package/dist/src/core/brownfield/importer.d.ts +1 -1
  58. package/dist/src/core/brownfield/importer.d.ts.map +1 -1
  59. package/dist/src/core/brownfield/importer.js +3 -3
  60. package/dist/src/core/brownfield/importer.js.map +1 -1
  61. package/dist/src/core/cicd/config-loader.d.ts +1 -1
  62. package/dist/src/core/cicd/config-loader.d.ts.map +1 -1
  63. package/dist/src/core/cicd/index.d.ts +6 -6
  64. package/dist/src/core/cicd/index.d.ts.map +1 -1
  65. package/dist/src/core/cicd/index.js +6 -6
  66. package/dist/src/core/cicd/index.js.map +1 -1
  67. package/dist/src/core/cicd/monitor-service.d.ts +3 -3
  68. package/dist/src/core/cicd/monitor-service.d.ts.map +1 -1
  69. package/dist/src/core/cicd/monitor-service.js +3 -3
  70. package/dist/src/core/cicd/monitor-service.js.map +1 -1
  71. package/dist/src/core/cicd/notifier.d.ts +1 -1
  72. package/dist/src/core/cicd/notifier.d.ts.map +1 -1
  73. package/dist/src/core/cicd/state-manager.d.ts +1 -1
  74. package/dist/src/core/cicd/state-manager.d.ts.map +1 -1
  75. package/dist/src/core/cicd/state-manager.js +1 -1
  76. package/dist/src/core/cicd/state-manager.js.map +1 -1
  77. package/dist/src/core/cicd/workflow-monitor.d.ts +1 -1
  78. package/dist/src/core/cicd/workflow-monitor.d.ts.map +1 -1
  79. package/dist/src/core/cicd/workflow-monitor.js +1 -1
  80. package/dist/src/core/cicd/workflow-monitor.js.map +1 -1
  81. package/dist/src/core/cost-tracker.d.ts +2 -2
  82. package/dist/src/core/cost-tracker.d.ts.map +1 -1
  83. package/dist/src/core/cost-tracker.js +1 -1
  84. package/dist/src/core/cost-tracker.js.map +1 -1
  85. package/dist/src/core/hooks/HealthReporter.d.ts +55 -0
  86. package/dist/src/core/hooks/HealthReporter.d.ts.map +1 -0
  87. package/dist/src/core/hooks/HealthReporter.js +268 -0
  88. package/dist/src/core/hooks/HealthReporter.js.map +1 -0
  89. package/dist/src/core/hooks/HookAutoFixer.d.ts +41 -0
  90. package/dist/src/core/hooks/HookAutoFixer.d.ts.map +1 -0
  91. package/dist/src/core/hooks/HookAutoFixer.js +222 -0
  92. package/dist/src/core/hooks/HookAutoFixer.js.map +1 -0
  93. package/dist/src/core/hooks/HookExecutor.d.ts +57 -0
  94. package/dist/src/core/hooks/HookExecutor.d.ts.map +1 -0
  95. package/dist/src/core/hooks/HookExecutor.js +287 -0
  96. package/dist/src/core/hooks/HookExecutor.js.map +1 -0
  97. package/dist/src/core/hooks/HookHealthChecker.d.ts +51 -0
  98. package/dist/src/core/hooks/HookHealthChecker.d.ts.map +1 -0
  99. package/dist/src/core/hooks/HookHealthChecker.js +212 -0
  100. package/dist/src/core/hooks/HookHealthChecker.js.map +1 -0
  101. package/dist/src/core/hooks/HookScanner.d.ts +65 -0
  102. package/dist/src/core/hooks/HookScanner.d.ts.map +1 -0
  103. package/dist/src/core/hooks/HookScanner.js +214 -0
  104. package/dist/src/core/hooks/HookScanner.js.map +1 -0
  105. package/dist/src/core/hooks/types.d.ts +281 -0
  106. package/dist/src/core/hooks/types.d.ts.map +1 -0
  107. package/dist/src/core/hooks/types.js +10 -0
  108. package/dist/src/core/hooks/types.js.map +1 -0
  109. package/dist/src/core/iac/index.d.ts +10 -0
  110. package/dist/src/core/iac/index.d.ts.map +1 -0
  111. package/dist/src/core/iac/index.js +11 -0
  112. package/dist/src/core/iac/index.js.map +1 -0
  113. package/dist/src/core/iac/template-engine.d.ts +77 -0
  114. package/dist/src/core/iac/template-engine.d.ts.map +1 -0
  115. package/dist/src/core/iac/template-engine.js +182 -0
  116. package/dist/src/core/iac/template-engine.js.map +1 -0
  117. package/dist/src/core/increment/ac-status-manager.d.ts +115 -0
  118. package/dist/src/core/increment/ac-status-manager.d.ts.map +1 -0
  119. package/dist/src/core/increment/ac-status-manager.js +343 -0
  120. package/dist/src/core/increment/ac-status-manager.js.map +1 -0
  121. package/dist/src/core/increment/auto-transition-manager.d.ts +60 -0
  122. package/dist/src/core/increment/auto-transition-manager.d.ts.map +1 -0
  123. package/dist/src/core/increment/auto-transition-manager.js +192 -0
  124. package/dist/src/core/increment/auto-transition-manager.js.map +1 -0
  125. package/dist/src/core/increment/limits.d.ts +1 -1
  126. package/dist/src/core/increment/limits.d.ts.map +1 -1
  127. package/dist/src/core/increment/limits.js +2 -2
  128. package/dist/src/core/increment/limits.js.map +1 -1
  129. package/dist/src/core/increment/spec-sync-manager.d.ts +177 -0
  130. package/dist/src/core/increment/spec-sync-manager.d.ts.map +1 -0
  131. package/dist/src/core/increment/spec-sync-manager.js +496 -0
  132. package/dist/src/core/increment/spec-sync-manager.js.map +1 -0
  133. package/dist/src/core/increment/status-auto-transition.d.ts +46 -0
  134. package/dist/src/core/increment/status-auto-transition.d.ts.map +1 -0
  135. package/dist/src/core/increment/status-auto-transition.js +178 -0
  136. package/dist/src/core/increment/status-auto-transition.js.map +1 -0
  137. package/dist/src/core/increment/task-state-manager.d.ts +75 -0
  138. package/dist/src/core/increment/task-state-manager.d.ts.map +1 -0
  139. package/dist/src/core/increment/task-state-manager.js +117 -0
  140. package/dist/src/core/increment/task-state-manager.js.map +1 -0
  141. package/dist/src/core/living-docs/CodeValidator.d.ts +68 -0
  142. package/dist/src/core/living-docs/CodeValidator.d.ts.map +1 -0
  143. package/dist/src/core/living-docs/CodeValidator.js +160 -0
  144. package/dist/src/core/living-docs/CodeValidator.js.map +1 -0
  145. package/dist/src/core/living-docs/CompletionPropagator.d.ts +84 -0
  146. package/dist/src/core/living-docs/CompletionPropagator.d.ts.map +1 -0
  147. package/dist/src/core/living-docs/CompletionPropagator.js +205 -0
  148. package/dist/src/core/living-docs/CompletionPropagator.js.map +1 -0
  149. package/dist/src/core/living-docs/ProjectDetector.d.ts +29 -0
  150. package/dist/src/core/living-docs/ProjectDetector.d.ts.map +1 -0
  151. package/dist/src/core/living-docs/ProjectDetector.js +94 -0
  152. package/dist/src/core/living-docs/ProjectDetector.js.map +1 -0
  153. package/dist/src/core/living-docs/SpecDistributor.d.ts +55 -0
  154. package/dist/src/core/living-docs/SpecDistributor.d.ts.map +1 -0
  155. package/dist/src/core/living-docs/SpecDistributor.js +216 -0
  156. package/dist/src/core/living-docs/SpecDistributor.js.map +1 -0
  157. package/dist/src/core/living-docs/ThreeLayerSyncManager.d.ts +116 -0
  158. package/dist/src/core/living-docs/ThreeLayerSyncManager.d.ts.map +1 -0
  159. package/dist/src/core/living-docs/ThreeLayerSyncManager.js +356 -0
  160. package/dist/src/core/living-docs/ThreeLayerSyncManager.js.map +1 -0
  161. package/dist/src/core/living-docs/hierarchy-mapper.d.ts.map +1 -1
  162. package/dist/src/core/living-docs/hierarchy-mapper.js +2 -1
  163. package/dist/src/core/living-docs/hierarchy-mapper.js.map +1 -1
  164. package/dist/src/core/living-docs/index.d.ts +1 -1
  165. package/dist/src/core/living-docs/index.d.ts.map +1 -1
  166. package/dist/src/core/living-docs/index.js +5 -1
  167. package/dist/src/core/living-docs/index.js.map +1 -1
  168. package/dist/src/core/living-docs/types.d.ts +70 -300
  169. package/dist/src/core/living-docs/types.d.ts.map +1 -1
  170. package/dist/src/core/living-docs/types.js +2 -10
  171. package/dist/src/core/living-docs/types.js.map +1 -1
  172. package/dist/src/core/project-manager.d.ts +1 -1
  173. package/dist/src/core/project-manager.d.ts.map +1 -1
  174. package/dist/src/core/project-manager.js +2 -2
  175. package/dist/src/core/project-manager.js.map +1 -1
  176. package/dist/src/core/qa/quality-gate-decider.d.ts +1 -1
  177. package/dist/src/core/qa/quality-gate-decider.d.ts.map +1 -1
  178. package/dist/src/core/qa/risk-calculator.d.ts +1 -1
  179. package/dist/src/core/qa/risk-calculator.d.ts.map +1 -1
  180. package/dist/src/core/repo-structure/setup-summary.d.ts +1 -1
  181. package/dist/src/core/repo-structure/setup-summary.d.ts.map +1 -1
  182. package/dist/src/core/rfc-generator-v2.d.ts +1 -1
  183. package/dist/src/core/rfc-generator-v2.d.ts.map +1 -1
  184. package/dist/src/core/rfc-generator-v2.js +1 -1
  185. package/dist/src/core/rfc-generator-v2.js.map +1 -1
  186. package/dist/src/core/serverless/context-detector.d.ts +12 -0
  187. package/dist/src/core/serverless/context-detector.d.ts.map +1 -0
  188. package/dist/src/core/serverless/context-detector.js +213 -0
  189. package/dist/src/core/serverless/context-detector.js.map +1 -0
  190. package/dist/src/core/serverless/cost-comparison.d.ts +73 -0
  191. package/dist/src/core/serverless/cost-comparison.d.ts.map +1 -0
  192. package/dist/src/core/serverless/cost-comparison.js +198 -0
  193. package/dist/src/core/serverless/cost-comparison.js.map +1 -0
  194. package/dist/src/core/serverless/cost-estimator.d.ts +69 -0
  195. package/dist/src/core/serverless/cost-estimator.d.ts.map +1 -0
  196. package/dist/src/core/serverless/cost-estimator.js +127 -0
  197. package/dist/src/core/serverless/cost-estimator.js.map +1 -0
  198. package/dist/src/core/serverless/cost-optimizer.d.ts +57 -0
  199. package/dist/src/core/serverless/cost-optimizer.d.ts.map +1 -0
  200. package/dist/src/core/serverless/cost-optimizer.js +221 -0
  201. package/dist/src/core/serverless/cost-optimizer.js.map +1 -0
  202. package/dist/src/core/serverless/index.d.ts +20 -0
  203. package/dist/src/core/serverless/index.d.ts.map +1 -0
  204. package/dist/src/core/serverless/index.js +26 -0
  205. package/dist/src/core/serverless/index.js.map +1 -0
  206. package/dist/src/core/serverless/learning-path-recommender.d.ts +152 -0
  207. package/dist/src/core/serverless/learning-path-recommender.d.ts.map +1 -0
  208. package/dist/src/core/serverless/learning-path-recommender.js +389 -0
  209. package/dist/src/core/serverless/learning-path-recommender.js.map +1 -0
  210. package/dist/src/core/serverless/platform-data-loader.d.ts +22 -0
  211. package/dist/src/core/serverless/platform-data-loader.d.ts.map +1 -0
  212. package/dist/src/core/serverless/platform-data-loader.js +49 -0
  213. package/dist/src/core/serverless/platform-data-loader.js.map +1 -0
  214. package/dist/src/core/serverless/platform-selector.d.ts +20 -0
  215. package/dist/src/core/serverless/platform-selector.d.ts.map +1 -0
  216. package/dist/src/core/serverless/platform-selector.js +279 -0
  217. package/dist/src/core/serverless/platform-selector.js.map +1 -0
  218. package/dist/src/core/serverless/recommendation-formatter.d.ts +24 -0
  219. package/dist/src/core/serverless/recommendation-formatter.d.ts.map +1 -0
  220. package/dist/src/core/serverless/recommendation-formatter.js +70 -0
  221. package/dist/src/core/serverless/recommendation-formatter.js.map +1 -0
  222. package/dist/src/core/serverless/suitability-analyzer.d.ts +22 -0
  223. package/dist/src/core/serverless/suitability-analyzer.d.ts.map +1 -0
  224. package/dist/src/core/serverless/suitability-analyzer.js +262 -0
  225. package/dist/src/core/serverless/suitability-analyzer.js.map +1 -0
  226. package/dist/src/core/serverless/types.d.ts +96 -0
  227. package/dist/src/core/serverless/types.d.ts.map +1 -0
  228. package/dist/src/core/serverless/types.js +5 -0
  229. package/dist/src/core/serverless/types.js.map +1 -0
  230. package/dist/src/core/sync/bidirectional-engine.d.ts +1 -1
  231. package/dist/src/core/sync/bidirectional-engine.d.ts.map +1 -1
  232. package/dist/src/core/sync/enhanced-content-builder.d.ts +1 -1
  233. package/dist/src/core/sync/enhanced-content-builder.d.ts.map +1 -1
  234. package/dist/src/core/sync/profile-manager.d.ts +1 -1
  235. package/dist/src/core/sync/profile-manager.d.ts.map +1 -1
  236. package/dist/src/core/sync/profile-selector.d.ts +1 -1
  237. package/dist/src/core/sync/profile-selector.d.ts.map +1 -1
  238. package/dist/src/core/sync/profile-selector.js +1 -1
  239. package/dist/src/core/sync/profile-selector.js.map +1 -1
  240. package/dist/src/core/sync/project-context.d.ts +1 -1
  241. package/dist/src/core/sync/project-context.d.ts.map +1 -1
  242. package/dist/src/core/sync/rate-limiter.d.ts +1 -1
  243. package/dist/src/core/sync/rate-limiter.d.ts.map +1 -1
  244. package/dist/src/core/sync/status-sync-engine.d.ts +2 -2
  245. package/dist/src/core/sync/status-sync-engine.d.ts.map +1 -1
  246. package/dist/src/core/sync/status-sync-engine.js +2 -2
  247. package/dist/src/core/sync/status-sync-engine.js.map +1 -1
  248. package/dist/src/core/sync/time-range-selector.d.ts +1 -1
  249. package/dist/src/core/sync/time-range-selector.d.ts.map +1 -1
  250. package/dist/src/core/sync/time-range-selector.js +1 -1
  251. package/dist/src/core/sync/time-range-selector.js.map +1 -1
  252. package/dist/src/core/types/increment-metadata.d.ts +27 -0
  253. package/dist/src/core/types/increment-metadata.d.ts.map +1 -1
  254. package/dist/src/core/types/increment-metadata.js +45 -1
  255. package/dist/src/core/types/increment-metadata.js.map +1 -1
  256. package/dist/src/core/types/sync-profile.d.ts +2 -0
  257. package/dist/src/core/types/sync-profile.d.ts.map +1 -1
  258. package/dist/src/core/types/sync-profile.js.map +1 -1
  259. package/dist/src/core/validation/increment-structure-validator.d.ts +47 -0
  260. package/dist/src/core/validation/increment-structure-validator.d.ts.map +1 -0
  261. package/dist/src/core/validation/increment-structure-validator.js +187 -0
  262. package/dist/src/core/validation/increment-structure-validator.js.map +1 -0
  263. package/dist/src/core/validation/three-file-validator.d.ts +82 -0
  264. package/dist/src/core/validation/three-file-validator.d.ts.map +1 -0
  265. package/dist/src/core/validation/three-file-validator.js +320 -0
  266. package/dist/src/core/validation/three-file-validator.js.map +1 -0
  267. package/dist/src/core/workflow/phase-detector.d.ts +103 -0
  268. package/dist/src/core/workflow/phase-detector.d.ts.map +1 -0
  269. package/dist/src/core/workflow/phase-detector.js +704 -0
  270. package/dist/src/core/workflow/phase-detector.js.map +1 -0
  271. package/dist/src/core/workflow/types.d.ts +153 -0
  272. package/dist/src/core/workflow/types.d.ts.map +1 -0
  273. package/dist/src/core/workflow/types.js +47 -0
  274. package/dist/src/core/workflow/types.js.map +1 -0
  275. package/dist/src/init/InitFlow.d.ts +37 -0
  276. package/dist/src/init/InitFlow.d.ts.map +1 -0
  277. package/dist/src/init/InitFlow.js +209 -0
  278. package/dist/src/init/InitFlow.js.map +1 -0
  279. package/dist/src/init/architecture/ArchitectureDecisionEngine.d.ts +107 -0
  280. package/dist/src/init/architecture/ArchitectureDecisionEngine.d.ts.map +1 -0
  281. package/dist/src/init/architecture/ArchitectureDecisionEngine.js +405 -0
  282. package/dist/src/init/architecture/ArchitectureDecisionEngine.js.map +1 -0
  283. package/dist/src/init/architecture/CloudCreditsDatabase.d.ts +11 -0
  284. package/dist/src/init/architecture/CloudCreditsDatabase.d.ts.map +1 -0
  285. package/dist/src/init/architecture/CloudCreditsDatabase.js +92 -0
  286. package/dist/src/init/architecture/CloudCreditsDatabase.js.map +1 -0
  287. package/dist/src/init/architecture/types.d.ts +251 -0
  288. package/dist/src/init/architecture/types.d.ts.map +1 -0
  289. package/dist/src/init/architecture/types.js +54 -0
  290. package/dist/src/init/architecture/types.js.map +1 -0
  291. package/dist/src/init/compliance/ComplianceDetector.d.ts +17 -0
  292. package/dist/src/init/compliance/ComplianceDetector.d.ts.map +1 -0
  293. package/dist/src/init/compliance/ComplianceDetector.js +64 -0
  294. package/dist/src/init/compliance/ComplianceDetector.js.map +1 -0
  295. package/dist/src/init/compliance/standards-database.d.ts +48 -0
  296. package/dist/src/init/compliance/standards-database.d.ts.map +1 -0
  297. package/dist/src/init/compliance/standards-database.js +506 -0
  298. package/dist/src/init/compliance/standards-database.js.map +1 -0
  299. package/dist/src/init/compliance/types.d.ts +91 -0
  300. package/dist/src/init/compliance/types.d.ts.map +1 -0
  301. package/dist/src/init/compliance/types.js +43 -0
  302. package/dist/src/init/compliance/types.js.map +1 -0
  303. package/dist/src/init/repo/GitHubAPIClient.d.ts +51 -0
  304. package/dist/src/init/repo/GitHubAPIClient.d.ts.map +1 -0
  305. package/dist/src/init/repo/GitHubAPIClient.js +144 -0
  306. package/dist/src/init/repo/GitHubAPIClient.js.map +1 -0
  307. package/dist/src/init/repo/RepositorySelector.d.ts +45 -0
  308. package/dist/src/init/repo/RepositorySelector.d.ts.map +1 -0
  309. package/dist/src/init/repo/RepositorySelector.js +106 -0
  310. package/dist/src/init/repo/RepositorySelector.js.map +1 -0
  311. package/dist/src/init/repo/types.d.ts +95 -0
  312. package/dist/src/init/repo/types.d.ts.map +1 -0
  313. package/dist/src/init/repo/types.js +25 -0
  314. package/dist/src/init/repo/types.js.map +1 -0
  315. package/dist/src/init/research/CompetitorAnalyzer.d.ts +79 -0
  316. package/dist/src/init/research/CompetitorAnalyzer.d.ts.map +1 -0
  317. package/dist/src/init/research/CompetitorAnalyzer.js +265 -0
  318. package/dist/src/init/research/CompetitorAnalyzer.js.map +1 -0
  319. package/dist/src/init/research/MarketDetector.d.ts +62 -0
  320. package/dist/src/init/research/MarketDetector.d.ts.map +1 -0
  321. package/dist/src/init/research/MarketDetector.js +247 -0
  322. package/dist/src/init/research/MarketDetector.js.map +1 -0
  323. package/dist/src/init/research/OpportunityScorer.d.ts +58 -0
  324. package/dist/src/init/research/OpportunityScorer.d.ts.map +1 -0
  325. package/dist/src/init/research/OpportunityScorer.js +194 -0
  326. package/dist/src/init/research/OpportunityScorer.js.map +1 -0
  327. package/dist/src/init/research/QuestionGenerator.d.ts +68 -0
  328. package/dist/src/init/research/QuestionGenerator.d.ts.map +1 -0
  329. package/dist/src/init/research/QuestionGenerator.js +244 -0
  330. package/dist/src/init/research/QuestionGenerator.js.map +1 -0
  331. package/dist/src/init/research/ReportGenerator.d.ts +36 -0
  332. package/dist/src/init/research/ReportGenerator.d.ts.map +1 -0
  333. package/dist/src/init/research/ReportGenerator.js +125 -0
  334. package/dist/src/init/research/ReportGenerator.js.map +1 -0
  335. package/dist/src/init/research/VisionAnalyzer.d.ts +129 -0
  336. package/dist/src/init/research/VisionAnalyzer.d.ts.map +1 -0
  337. package/dist/src/init/research/VisionAnalyzer.js +212 -0
  338. package/dist/src/init/research/VisionAnalyzer.js.map +1 -0
  339. package/dist/src/init/research/keyword-extractor.d.ts +78 -0
  340. package/dist/src/init/research/keyword-extractor.d.ts.map +1 -0
  341. package/dist/src/init/research/keyword-extractor.js +230 -0
  342. package/dist/src/init/research/keyword-extractor.js.map +1 -0
  343. package/dist/src/init/research/src/config/ConfigManager.d.ts +14 -0
  344. package/dist/src/init/research/src/config/ConfigManager.d.ts.map +1 -0
  345. package/dist/src/init/research/src/config/ConfigManager.js +45 -0
  346. package/dist/src/init/research/src/config/ConfigManager.js.map +1 -0
  347. package/dist/src/init/research/src/config/types.d.ts +102 -0
  348. package/dist/src/init/research/src/config/types.d.ts.map +1 -0
  349. package/dist/src/init/research/src/config/types.js +24 -0
  350. package/dist/src/init/research/src/config/types.js.map +1 -0
  351. package/dist/src/init/research/types.d.ts +183 -0
  352. package/dist/src/init/research/types.d.ts.map +1 -0
  353. package/dist/src/init/research/types.js +65 -0
  354. package/dist/src/init/research/types.js.map +1 -0
  355. package/dist/src/init/team/ServerlessSavingsCalculator.d.ts +136 -0
  356. package/dist/src/init/team/ServerlessSavingsCalculator.d.ts.map +1 -0
  357. package/dist/src/init/team/ServerlessSavingsCalculator.js +360 -0
  358. package/dist/src/init/team/ServerlessSavingsCalculator.js.map +1 -0
  359. package/dist/src/init/team/TeamRecommender.d.ts +122 -0
  360. package/dist/src/init/team/TeamRecommender.d.ts.map +1 -0
  361. package/dist/src/init/team/TeamRecommender.js +405 -0
  362. package/dist/src/init/team/TeamRecommender.js.map +1 -0
  363. package/dist/src/init/team/types.d.ts +95 -0
  364. package/dist/src/init/team/types.d.ts.map +1 -0
  365. package/dist/src/init/team/types.js +23 -0
  366. package/dist/src/init/team/types.js.map +1 -0
  367. package/dist/src/integrations/jira/jira-mapper.d.ts +1 -1
  368. package/dist/src/integrations/jira/jira-mapper.d.ts.map +1 -1
  369. package/dist/src/types/cost-tracking.d.ts +1 -1
  370. package/dist/src/types/cost-tracking.d.ts.map +1 -1
  371. package/dist/src/utils/cost-reporter.d.ts +2 -2
  372. package/dist/src/utils/cost-reporter.d.ts.map +1 -1
  373. package/dist/src/utils/docs-preview/config-generator.d.ts +1 -1
  374. package/dist/src/utils/docs-preview/config-generator.d.ts.map +1 -1
  375. package/dist/src/utils/docs-preview/config-generator.js +1 -1
  376. package/dist/src/utils/docs-preview/docusaurus-setup.d.ts +1 -1
  377. package/dist/src/utils/docs-preview/docusaurus-setup.d.ts.map +1 -1
  378. package/dist/src/utils/docs-preview/docusaurus-setup.js +4 -4
  379. package/dist/src/utils/docs-preview/docusaurus-setup.js.map +1 -1
  380. package/dist/src/utils/docs-preview/index.d.ts +6 -6
  381. package/dist/src/utils/docs-preview/index.d.ts.map +1 -1
  382. package/dist/src/utils/docs-preview/index.js +6 -6
  383. package/dist/src/utils/docs-preview/index.js.map +1 -1
  384. package/dist/src/utils/docs-preview/package-installer.d.ts +1 -1
  385. package/dist/src/utils/docs-preview/package-installer.d.ts.map +1 -1
  386. package/dist/src/utils/docs-preview/package-installer.js +1 -1
  387. package/dist/src/utils/docs-preview/package-installer.js.map +1 -1
  388. package/dist/src/utils/docs-preview/server-manager.d.ts +1 -1
  389. package/dist/src/utils/docs-preview/server-manager.d.ts.map +1 -1
  390. package/dist/src/utils/docs-preview/server-manager.js +1 -1
  391. package/dist/src/utils/docs-preview/server-manager.js.map +1 -1
  392. package/dist/src/utils/docs-preview/sidebar-builder.d.ts +1 -1
  393. package/dist/src/utils/docs-preview/sidebar-builder.d.ts.map +1 -1
  394. package/dist/src/utils/generate-skills-index.d.ts +1 -1
  395. package/dist/src/utils/generate-skills-index.js +1 -1
  396. package/dist/src/utils/project-detection.js +1 -1
  397. package/dist/src/utils/project-detection.js.map +1 -1
  398. package/package.json +9 -3
  399. package/plugins/specweave/agents/architect/AGENT.md +605 -0
  400. package/plugins/specweave/agents/infrastructure/AGENT.md +760 -0
  401. package/plugins/specweave/agents/pm/AGENT.md +14 -13
  402. package/plugins/specweave/commands/specweave-check-hooks.md +186 -0
  403. package/plugins/specweave/commands/specweave-plan.md +151 -0
  404. package/plugins/specweave/commands/specweave-sync-acs.md +342 -0
  405. package/plugins/specweave/commands/specweave-validate.md +60 -11
  406. package/plugins/specweave/hooks/lib/update-status-line.sh +8 -4
  407. package/plugins/specweave/hooks/post-increment-change.sh +4 -0
  408. package/plugins/specweave/hooks/post-increment-completion.sh +7 -1
  409. package/plugins/specweave/hooks/post-increment-planning.sh +4 -0
  410. package/plugins/specweave/hooks/post-increment-status-change.sh +4 -0
  411. package/plugins/specweave/hooks/user-prompt-submit.sh +78 -0
  412. package/plugins/specweave/iac-templates/aws-lambda/README.md.hbs +280 -0
  413. package/plugins/specweave/iac-templates/aws-lambda/defaults.json +118 -0
  414. package/plugins/specweave/iac-templates/aws-lambda/environments/dev.defaults.json +46 -0
  415. package/plugins/specweave/iac-templates/aws-lambda/environments/prod.defaults.json +67 -0
  416. package/plugins/specweave/iac-templates/aws-lambda/environments/staging.defaults.json +47 -0
  417. package/plugins/specweave/iac-templates/aws-lambda/main.tf.hbs +241 -0
  418. package/plugins/specweave/iac-templates/aws-lambda/outputs.tf.hbs +61 -0
  419. package/plugins/specweave/iac-templates/aws-lambda/provider.tf.hbs +15 -0
  420. package/plugins/specweave/iac-templates/aws-lambda/variables.tf.hbs +88 -0
  421. package/plugins/specweave/iac-templates/azure-functions/README.md.hbs +315 -0
  422. package/plugins/specweave/iac-templates/azure-functions/defaults.json +65 -0
  423. package/plugins/specweave/iac-templates/azure-functions/environments/dev.defaults.json +30 -0
  424. package/plugins/specweave/iac-templates/azure-functions/environments/prod.defaults.json +34 -0
  425. package/plugins/specweave/iac-templates/azure-functions/environments/staging.defaults.json +31 -0
  426. package/plugins/specweave/iac-templates/azure-functions/iam.tf.hbs +34 -0
  427. package/plugins/specweave/iac-templates/azure-functions/main.tf.hbs +247 -0
  428. package/plugins/specweave/iac-templates/azure-functions/outputs.tf.hbs +72 -0
  429. package/plugins/specweave/iac-templates/azure-functions/provider.tf.hbs +14 -0
  430. package/plugins/specweave/iac-templates/azure-functions/variables.tf.hbs +64 -0
  431. package/plugins/specweave/iac-templates/firebase/README.md.hbs +487 -0
  432. package/plugins/specweave/iac-templates/firebase/defaults.json +55 -0
  433. package/plugins/specweave/iac-templates/firebase/environments/dev.defaults.json +44 -0
  434. package/plugins/specweave/iac-templates/firebase/environments/prod.defaults.json +52 -0
  435. package/plugins/specweave/iac-templates/firebase/environments/staging.defaults.json +43 -0
  436. package/plugins/specweave/iac-templates/firebase/iam.tf.hbs +75 -0
  437. package/plugins/specweave/iac-templates/firebase/main.tf.hbs +297 -0
  438. package/plugins/specweave/iac-templates/firebase/outputs.tf.hbs +67 -0
  439. package/plugins/specweave/iac-templates/firebase/provider.tf.hbs +26 -0
  440. package/plugins/specweave/iac-templates/firebase/variables.tf.hbs +68 -0
  441. package/plugins/specweave/iac-templates/gcp-cloud-functions/README.md.hbs +330 -0
  442. package/plugins/specweave/iac-templates/gcp-cloud-functions/defaults.json +69 -0
  443. package/plugins/specweave/iac-templates/gcp-cloud-functions/environments/dev.defaults.json +33 -0
  444. package/plugins/specweave/iac-templates/gcp-cloud-functions/environments/prod.defaults.json +40 -0
  445. package/plugins/specweave/iac-templates/gcp-cloud-functions/environments/staging.defaults.json +33 -0
  446. package/plugins/specweave/iac-templates/gcp-cloud-functions/iam.tf.hbs +54 -0
  447. package/plugins/specweave/iac-templates/gcp-cloud-functions/main.tf.hbs +211 -0
  448. package/plugins/specweave/iac-templates/gcp-cloud-functions/outputs.tf.hbs +44 -0
  449. package/plugins/specweave/iac-templates/gcp-cloud-functions/provider.tf.hbs +14 -0
  450. package/plugins/specweave/iac-templates/gcp-cloud-functions/variables.tf.hbs +82 -0
  451. package/plugins/specweave/iac-templates/supabase/README.md.hbs +534 -0
  452. package/plugins/specweave/iac-templates/supabase/defaults.json +69 -0
  453. package/plugins/specweave/iac-templates/supabase/environments/dev.defaults.json +55 -0
  454. package/plugins/specweave/iac-templates/supabase/environments/prod.defaults.json +75 -0
  455. package/plugins/specweave/iac-templates/supabase/environments/staging.defaults.json +54 -0
  456. package/plugins/specweave/iac-templates/supabase/iam.tf.hbs +146 -0
  457. package/plugins/specweave/iac-templates/supabase/main.tf.hbs +310 -0
  458. package/plugins/specweave/iac-templates/supabase/outputs.tf.hbs +74 -0
  459. package/plugins/specweave/iac-templates/supabase/provider.tf.hbs +19 -0
  460. package/plugins/specweave/iac-templates/supabase/variables.tf.hbs +78 -0
  461. package/plugins/specweave/knowledge-base/serverless/FRESHNESS.md +69 -0
  462. package/plugins/specweave/knowledge-base/serverless/learning-paths.json +865 -0
  463. package/plugins/specweave/knowledge-base/serverless/platforms/aws-lambda.json +41 -0
  464. package/plugins/specweave/knowledge-base/serverless/platforms/azure-functions.json +41 -0
  465. package/plugins/specweave/knowledge-base/serverless/platforms/firebase.json +46 -0
  466. package/plugins/specweave/knowledge-base/serverless/platforms/gcp-cloud-functions.json +41 -0
  467. package/plugins/specweave/knowledge-base/serverless/platforms/supabase.json +41 -0
  468. package/plugins/specweave/knowledge-base/serverless/schema.json +155 -0
  469. package/plugins/specweave/lib/hooks/auto-transition.js +50 -0
  470. package/plugins/specweave/lib/hooks/auto-transition.ts +84 -0
  471. package/plugins/specweave/lib/hooks/invoke-translator-skill.js +1 -1
  472. package/plugins/specweave/lib/hooks/invoke-translator-skill.ts +1 -1
  473. package/plugins/specweave/lib/hooks/sync-living-docs.js +4 -31
  474. package/plugins/specweave/lib/hooks/{sync-living-docs.ts → sync-living-docs.ts.DISABLED} +9 -48
  475. package/plugins/specweave/lib/hooks/translate-file.js +1 -1
  476. package/plugins/specweave/lib/hooks/translate-file.ts +1 -1
  477. package/plugins/specweave/lib/hooks/update-ac-status.js +24 -75
  478. package/plugins/specweave/lib/hooks/update-ac-status.ts +46 -135
  479. package/plugins/specweave/lib/hooks/update-tasks-md.js +115 -3
  480. package/plugins/specweave/lib/hooks/update-tasks-md.ts +182 -10
  481. package/plugins/specweave/lib/utils/validate-dev-setup.sh +133 -0
  482. package/plugins/specweave/skills/increment-planner/SKILL.md +25 -15
  483. package/plugins/specweave/skills/serverless-recommender/SKILL.md +368 -0
  484. package/plugins/specweave/templates/iac/aws-lambda/templates/iam.tf.hbs +137 -0
  485. package/plugins/specweave/templates/iac/aws-lambda/templates/main.tf.hbs +216 -0
  486. package/plugins/specweave-github/lib/IssueStateManager.js +117 -0
  487. package/plugins/specweave-github/lib/IssueStateManager.ts +231 -0
  488. package/plugins/specweave-github/lib/user-story-issue-builder.js +7 -0
  489. package/plugins/specweave-github/lib/user-story-issue-builder.ts +11 -0
  490. package/plugins/specweave-ui/.mcp.json +0 -10
  491. package/plugins/specweave-ui/README.md +26 -26
  492. package/plugins/specweave-ui/skills/browser-automation/SKILL.md +31 -18
  493. package/src/templates/tasks.md.template +51 -33
  494. package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.d.ts +0 -89
  495. package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.d.ts.map +0 -1
  496. package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.js +0 -226
  497. package/dist/plugins/specweave/lib/hooks/git-diff-analyzer.js.map +0 -1
  498. package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.d.ts +0 -60
  499. package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.d.ts.map +0 -1
  500. package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.js +0 -201
  501. package/dist/plugins/specweave/lib/hooks/invoke-translator-skill.js.map +0 -1
  502. package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.d.ts +0 -42
  503. package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.d.ts.map +0 -1
  504. package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.js +0 -123
  505. package/dist/plugins/specweave/lib/hooks/prepare-reflection-context.js.map +0 -1
  506. package/dist/plugins/specweave/lib/hooks/reflection-config-loader.d.ts +0 -45
  507. package/dist/plugins/specweave/lib/hooks/reflection-config-loader.d.ts.map +0 -1
  508. package/dist/plugins/specweave/lib/hooks/reflection-config-loader.js +0 -132
  509. package/dist/plugins/specweave/lib/hooks/reflection-config-loader.js.map +0 -1
  510. package/dist/plugins/specweave/lib/hooks/reflection-parser.d.ts +0 -33
  511. package/dist/plugins/specweave/lib/hooks/reflection-parser.d.ts.map +0 -1
  512. package/dist/plugins/specweave/lib/hooks/reflection-parser.js +0 -419
  513. package/dist/plugins/specweave/lib/hooks/reflection-parser.js.map +0 -1
  514. package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.d.ts +0 -56
  515. package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.d.ts.map +0 -1
  516. package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.js +0 -239
  517. package/dist/plugins/specweave/lib/hooks/reflection-prompt-builder.js.map +0 -1
  518. package/dist/plugins/specweave/lib/hooks/reflection-storage.d.ts +0 -64
  519. package/dist/plugins/specweave/lib/hooks/reflection-storage.d.ts.map +0 -1
  520. package/dist/plugins/specweave/lib/hooks/reflection-storage.js +0 -305
  521. package/dist/plugins/specweave/lib/hooks/reflection-storage.js.map +0 -1
  522. package/dist/plugins/specweave/lib/hooks/run-self-reflection.d.ts +0 -43
  523. package/dist/plugins/specweave/lib/hooks/run-self-reflection.d.ts.map +0 -1
  524. package/dist/plugins/specweave/lib/hooks/run-self-reflection.js +0 -203
  525. package/dist/plugins/specweave/lib/hooks/run-self-reflection.js.map +0 -1
  526. package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts +0 -32
  527. package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts.map +0 -1
  528. package/dist/plugins/specweave/lib/hooks/sync-living-docs.js +0 -405
  529. package/dist/plugins/specweave/lib/hooks/sync-living-docs.js.map +0 -1
  530. package/dist/plugins/specweave/lib/hooks/translate-file.d.ts +0 -59
  531. package/dist/plugins/specweave/lib/hooks/translate-file.d.ts.map +0 -1
  532. package/dist/plugins/specweave/lib/hooks/translate-file.js +0 -350
  533. package/dist/plugins/specweave/lib/hooks/translate-file.js.map +0 -1
  534. package/dist/plugins/specweave/lib/hooks/translate-living-docs.d.ts +0 -13
  535. package/dist/plugins/specweave/lib/hooks/translate-living-docs.d.ts.map +0 -1
  536. package/dist/plugins/specweave/lib/hooks/translate-living-docs.js +0 -175
  537. package/dist/plugins/specweave/lib/hooks/translate-living-docs.js.map +0 -1
  538. package/dist/plugins/specweave/lib/hooks/types/reflection-types.d.ts +0 -164
  539. package/dist/plugins/specweave/lib/hooks/types/reflection-types.d.ts.map +0 -1
  540. package/dist/plugins/specweave/lib/hooks/types/reflection-types.js +0 -73
  541. package/dist/plugins/specweave/lib/hooks/types/reflection-types.js.map +0 -1
  542. package/dist/plugins/specweave/lib/hooks/update-ac-status.d.ts +0 -21
  543. package/dist/plugins/specweave/lib/hooks/update-ac-status.d.ts.map +0 -1
  544. package/dist/plugins/specweave/lib/hooks/update-ac-status.js +0 -162
  545. package/dist/plugins/specweave/lib/hooks/update-ac-status.js.map +0 -1
  546. package/dist/plugins/specweave/lib/hooks/update-tasks-md.d.ts +0 -29
  547. package/dist/plugins/specweave/lib/hooks/update-tasks-md.d.ts.map +0 -1
  548. package/dist/plugins/specweave/lib/hooks/update-tasks-md.js +0 -203
  549. package/dist/plugins/specweave/lib/hooks/update-tasks-md.js.map +0 -1
  550. package/dist/src/core/living-docs/spec-distributor.d.ts +0 -180
  551. package/dist/src/core/living-docs/spec-distributor.d.ts.map +0 -1
  552. package/dist/src/core/living-docs/spec-distributor.js +0 -1840
  553. package/dist/src/core/living-docs/spec-distributor.js.map +0 -1
@@ -1,33 +0,0 @@
1
- /**
2
- * Reflection Parser
3
- *
4
- * Parses markdown output from reflective-reviewer agent
5
- * Extracts structured data (issues, metrics, lessons learned, etc.)
6
- *
7
- * @module reflection-parser
8
- */
9
- import { ReflectionResult, ReflectionModel } from './types/reflection-types';
10
- /**
11
- * Parse complete reflection result from markdown
12
- * Main parsing function
13
- *
14
- * @param markdown Reflection markdown from reflective-reviewer agent
15
- * @param taskName Task name for result
16
- * @param model Model used for reflection
17
- * @param reflectionTime Time taken in seconds
18
- * @param estimatedCost Estimated cost in USD
19
- * @returns Complete ReflectionResult object
20
- */
21
- export declare function parseReflectionMarkdown(markdown: string, taskName: string, model?: ReflectionModel, reflectionTime?: number, estimatedCost?: number): ReflectionResult;
22
- /**
23
- * Validate parsed reflection result
24
- * Checks for required fields and data quality
25
- *
26
- * @param result Parsed reflection result
27
- * @returns Validation result with errors
28
- */
29
- export declare function validateReflectionResult(result: ReflectionResult): {
30
- valid: boolean;
31
- errors: string[];
32
- };
33
- //# sourceMappingURL=reflection-parser.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reflection-parser.d.ts","sourceRoot":"","sources":["../../../../../plugins/specweave/lib/hooks/reflection-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,gBAAgB,EAMhB,eAAe,EAChB,MAAM,0BAA0B,CAAC;AAoWlC;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,KAAK,GAAE,eAAuC,EAC9C,cAAc,GAAE,MAAU,EAC1B,aAAa,GAAE,MAAU,GACxB,gBAAgB,CAkClB;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,gBAAgB,GAAG;IAClE,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CA+CA"}
@@ -1,419 +0,0 @@
1
- /**
2
- * Reflection Parser
3
- *
4
- * Parses markdown output from reflective-reviewer agent
5
- * Extracts structured data (issues, metrics, lessons learned, etc.)
6
- *
7
- * @module reflection-parser
8
- */
9
- import { IssueSeverity, IssueCategory, ReflectionModel } from './types/reflection-types';
10
- /**
11
- * Extract section content by heading
12
- * @param markdown Markdown content
13
- * @param heading Section heading to find (e.g., "## What Was Accomplished")
14
- * @returns Section content (text after heading until next heading or end)
15
- */
16
- function extractSection(markdown, heading) {
17
- const headingRegex = new RegExp(`^${heading}\\s*$`, 'mi');
18
- const match = markdown.match(headingRegex);
19
- if (!match || match.index === undefined) {
20
- return '';
21
- }
22
- const startIndex = match.index + match[0].length;
23
- const afterHeading = markdown.slice(startIndex);
24
- // Find next heading at same or higher level
25
- const nextHeadingMatch = afterHeading.match(/^#{1,3}\s+/m);
26
- const endIndex = nextHeadingMatch?.index ?? afterHeading.length;
27
- return afterHeading.slice(0, endIndex).trim();
28
- }
29
- /**
30
- * Parse accomplishments from "What Was Accomplished" section
31
- * @param markdown Reflection markdown
32
- * @returns Array of accomplishment strings
33
- */
34
- function parseAccomplishments(markdown) {
35
- const section = extractSection(markdown, '## ✅ What Was Accomplished');
36
- if (!section)
37
- return [];
38
- // Extract bullet points and paragraphs
39
- const lines = section.split('\n').filter(line => line.trim());
40
- const accomplishments = [];
41
- for (const line of lines) {
42
- const trimmed = line.trim();
43
- // Match bullet points (-, *, +) or numbered lists (1., 2.)
44
- if (/^[-*+]\s+/.test(trimmed) || /^\d+\.\s+/.test(trimmed)) {
45
- accomplishments.push(trimmed.replace(/^[-*+\d.]\s+/, '').trim());
46
- }
47
- else if (trimmed.length > 10 && !trimmed.startsWith('#')) {
48
- // Include non-heading paragraphs
49
- accomplishments.push(trimmed);
50
- }
51
- }
52
- return accomplishments;
53
- }
54
- /**
55
- * Parse strengths from "Quality Assessment" section
56
- * @param markdown Reflection markdown
57
- * @returns Array of strength strings
58
- */
59
- function parseStrengths(markdown) {
60
- const section = extractSection(markdown, '### ✅ Strengths');
61
- if (!section)
62
- return [];
63
- const lines = section.split('\n').filter(line => line.trim());
64
- const strengths = [];
65
- for (const line of lines) {
66
- const trimmed = line.trim();
67
- if (trimmed.startsWith('- ✅') || trimmed.startsWith('✅')) {
68
- strengths.push(trimmed.replace(/^[-*+]?\s*✅\s*/, '').trim());
69
- }
70
- }
71
- return strengths;
72
- }
73
- /**
74
- * Parse severity from issue description
75
- * @param text Issue text (e.g., "**CRITICAL (SECURITY)**")
76
- * @returns Issue severity enum or undefined
77
- */
78
- function parseSeverity(text) {
79
- if (/CRITICAL/i.test(text))
80
- return IssueSeverity.CRITICAL;
81
- if (/HIGH/i.test(text))
82
- return IssueSeverity.HIGH;
83
- if (/MEDIUM/i.test(text))
84
- return IssueSeverity.MEDIUM;
85
- if (/LOW/i.test(text))
86
- return IssueSeverity.LOW;
87
- return undefined;
88
- }
89
- /**
90
- * Parse category from issue description
91
- * @param text Issue text (e.g., "**CRITICAL (SECURITY)**")
92
- * @returns Issue category enum or undefined
93
- */
94
- function parseCategory(text) {
95
- if (/SECURITY/i.test(text))
96
- return IssueCategory.SECURITY;
97
- if (/QUALITY/i.test(text))
98
- return IssueCategory.QUALITY;
99
- if (/TESTING/i.test(text))
100
- return IssueCategory.TESTING;
101
- if (/PERFORMANCE/i.test(text))
102
- return IssueCategory.PERFORMANCE;
103
- if (/TECHNICAL[_\s]DEBT/i.test(text))
104
- return IssueCategory.TECHNICAL_DEBT;
105
- return undefined;
106
- }
107
- /**
108
- * Parse location from issue text
109
- * @param text Issue text (may contain **Location**: `path/to/file.ts:123`)
110
- * @returns Location object or undefined
111
- */
112
- function parseLocation(text) {
113
- // Match: **Location**: `path/to/file.ts:123`
114
- const locationMatch = text.match(/\*\*Location\*\*:\s*`([^`]+)`/i);
115
- if (!locationMatch)
116
- return undefined;
117
- const locationStr = locationMatch[1];
118
- const [file, lineStr] = locationStr.split(':');
119
- const line = lineStr ? parseInt(lineStr, 10) : undefined;
120
- return {
121
- file: file.trim(),
122
- line
123
- };
124
- }
125
- /**
126
- * Parse issues from "Issues Identified" section
127
- * @param markdown Reflection markdown
128
- * @returns Array of ReflectionIssue objects
129
- */
130
- function parseIssues(markdown) {
131
- const section = extractSection(markdown, '### ⚠️ Issues Identified');
132
- if (!section)
133
- return [];
134
- const issues = [];
135
- const lines = section.split('\n');
136
- let currentIssue = null;
137
- let currentField = null;
138
- for (const line of lines) {
139
- const trimmed = line.trim();
140
- // Check for severity/category header (e.g., "**CRITICAL (SECURITY)**")
141
- const headerMatch = trimmed.match(/^\*\*(CRITICAL|HIGH|MEDIUM|LOW)\s*\(([^)]+)\)\*\*/i);
142
- if (headerMatch) {
143
- // Save previous issue
144
- if (currentIssue && currentIssue.severity && currentIssue.category && currentIssue.description) {
145
- issues.push(currentIssue);
146
- }
147
- // Start new issue
148
- currentIssue = {
149
- severity: parseSeverity(headerMatch[1]),
150
- category: parseCategory(headerMatch[2]),
151
- description: '',
152
- impact: '',
153
- recommendation: ''
154
- };
155
- currentField = null;
156
- continue;
157
- }
158
- // Check for issue bullet point (❌ or ⚠️)
159
- if ((trimmed.startsWith('- ❌') || trimmed.startsWith('❌') || trimmed.startsWith('- ⚠️')) && currentIssue) {
160
- currentField = 'description';
161
- const descText = trimmed.replace(/^[-*+]?\s*[❌⚠️]\s*/, '').trim();
162
- currentIssue.description = descText;
163
- continue;
164
- }
165
- // Check for Impact field
166
- if (trimmed.startsWith('- **Impact**:') || trimmed.startsWith('**Impact**:')) {
167
- currentField = 'impact';
168
- const impactText = trimmed.replace(/^[-*+]?\s*\*\*Impact\*\*:\s*/, '').trim();
169
- if (currentIssue)
170
- currentIssue.impact = impactText;
171
- continue;
172
- }
173
- // Check for Recommendation field
174
- if (trimmed.startsWith('- **Recommendation**:') || trimmed.startsWith('**Recommendation**:')) {
175
- currentField = 'recommendation';
176
- const recText = trimmed.replace(/^[-*+]?\s*\*\*Recommendation\*\*:\s*/, '').trim();
177
- if (currentIssue)
178
- currentIssue.recommendation = recText;
179
- continue;
180
- }
181
- // Check for Location field
182
- if (trimmed.startsWith('- **Location**:') || trimmed.startsWith('**Location**:')) {
183
- if (currentIssue) {
184
- const location = parseLocation(trimmed);
185
- if (location)
186
- currentIssue.location = location;
187
- }
188
- currentField = null;
189
- continue;
190
- }
191
- // Append continuation lines to current field
192
- if (currentField && currentIssue && trimmed && !trimmed.startsWith('#')) {
193
- const fieldValue = currentIssue[currentField] || '';
194
- currentIssue[currentField] = fieldValue + ' ' + trimmed;
195
- }
196
- }
197
- // Save last issue
198
- if (currentIssue && currentIssue.severity && currentIssue.category && currentIssue.description) {
199
- issues.push(currentIssue);
200
- }
201
- return issues;
202
- }
203
- /**
204
- * Parse recommended actions from "Recommended Follow-Up Actions" section
205
- * @param markdown Reflection markdown
206
- * @returns Recommended actions object with priority levels
207
- */
208
- function parseRecommendedActions(markdown) {
209
- const section = extractSection(markdown, '## 🔧 Recommended Follow-Up Actions');
210
- const actions = {
211
- priority1: [],
212
- priority2: [],
213
- priority3: []
214
- };
215
- if (!section)
216
- return actions;
217
- const lines = section.split('\n');
218
- let currentPriority = null;
219
- for (const line of lines) {
220
- const trimmed = line.trim();
221
- // Check for priority headers
222
- if (/Priority 1|MUST FIX/i.test(trimmed)) {
223
- currentPriority = 'priority1';
224
- continue;
225
- }
226
- if (/Priority 2|SHOULD FIX/i.test(trimmed)) {
227
- currentPriority = 'priority2';
228
- continue;
229
- }
230
- if (/Priority 3|NICE TO HAVE/i.test(trimmed)) {
231
- currentPriority = 'priority3';
232
- continue;
233
- }
234
- // Parse action items (numbered or bulleted)
235
- if (currentPriority && (/^\d+\.\s/.test(trimmed) || /^[-*+]\s/.test(trimmed))) {
236
- const actionText = trimmed.replace(/^(\d+\.|-|\*|\+)\s+/, '').trim();
237
- if (actionText.length > 0) {
238
- actions[currentPriority].push(actionText);
239
- }
240
- }
241
- }
242
- return actions;
243
- }
244
- /**
245
- * Parse lessons learned from "Lessons Learned" section
246
- * @param markdown Reflection markdown
247
- * @returns LessonLearned object
248
- */
249
- function parseLessonsLearned(markdown) {
250
- const section = extractSection(markdown, '## 📚 Lessons Learned');
251
- const lessons = {
252
- whatWentWell: [],
253
- whatCouldImprove: [],
254
- forNextTime: []
255
- };
256
- if (!section)
257
- return lessons;
258
- const lines = section.split('\n');
259
- let currentCategory = null;
260
- for (const line of lines) {
261
- const trimmed = line.trim();
262
- // Check for category headers
263
- if (/What went well/i.test(trimmed)) {
264
- currentCategory = 'whatWentWell';
265
- continue;
266
- }
267
- if (/What could improve/i.test(trimmed)) {
268
- currentCategory = 'whatCouldImprove';
269
- continue;
270
- }
271
- if (/For next time/i.test(trimmed)) {
272
- currentCategory = 'forNextTime';
273
- continue;
274
- }
275
- // Parse bullet points
276
- if (currentCategory && /^[-*+]\s/.test(trimmed)) {
277
- const text = trimmed.replace(/^[-*+]\s+/, '').trim();
278
- if (text.length > 0) {
279
- lessons[currentCategory].push(text);
280
- }
281
- }
282
- }
283
- return lessons;
284
- }
285
- /**
286
- * Parse metrics from "Metrics" section
287
- * @param markdown Reflection markdown
288
- * @returns ReflectionMetrics object
289
- */
290
- function parseMetrics(markdown) {
291
- const section = extractSection(markdown, '## 📊 Metrics');
292
- const metrics = {
293
- codeQuality: 5,
294
- security: 5,
295
- testCoverage: undefined,
296
- technicalDebt: 'MEDIUM',
297
- performance: 'ACCEPTABLE'
298
- };
299
- if (!section)
300
- return metrics;
301
- // Parse Code Quality (1-10)
302
- const qualityMatch = section.match(/Code Quality.*?(\d+)/i);
303
- if (qualityMatch) {
304
- metrics.codeQuality = parseInt(qualityMatch[1], 10);
305
- }
306
- // Parse Security (1-10)
307
- const securityMatch = section.match(/Security.*?(\d+)/i);
308
- if (securityMatch) {
309
- metrics.security = parseInt(securityMatch[1], 10);
310
- }
311
- // Parse Test Coverage (percentage)
312
- const coverageMatch = section.match(/Test Coverage.*?(\d+)%/i);
313
- if (coverageMatch) {
314
- metrics.testCoverage = parseInt(coverageMatch[1], 10);
315
- }
316
- // Parse Technical Debt (LOW/MEDIUM/HIGH)
317
- const debtMatch = section.match(/Technical Debt.*?(LOW|MEDIUM|HIGH)/i);
318
- if (debtMatch) {
319
- metrics.technicalDebt = debtMatch[1].toUpperCase();
320
- }
321
- // Parse Performance (GOOD/ACCEPTABLE/NEEDS WORK)
322
- const perfMatch = section.match(/Performance.*?(GOOD|ACCEPTABLE|NEEDS[\s_]WORK)/i);
323
- if (perfMatch) {
324
- metrics.performance = perfMatch[1].toUpperCase().replace(/[\s_]/g, '_');
325
- }
326
- return metrics;
327
- }
328
- /**
329
- * Parse complete reflection result from markdown
330
- * Main parsing function
331
- *
332
- * @param markdown Reflection markdown from reflective-reviewer agent
333
- * @param taskName Task name for result
334
- * @param model Model used for reflection
335
- * @param reflectionTime Time taken in seconds
336
- * @param estimatedCost Estimated cost in USD
337
- * @returns Complete ReflectionResult object
338
- */
339
- export function parseReflectionMarkdown(markdown, taskName, model = ReflectionModel.HAIKU, reflectionTime = 0, estimatedCost = 0) {
340
- const result = {
341
- taskName,
342
- completed: new Date().toISOString(),
343
- duration: reflectionTime > 0 ? `${reflectionTime}s` : undefined,
344
- filesModified: {
345
- count: 0,
346
- linesAdded: 0,
347
- linesRemoved: 0
348
- },
349
- accomplishments: parseAccomplishments(markdown),
350
- strengths: parseStrengths(markdown),
351
- issues: parseIssues(markdown),
352
- recommendedActions: parseRecommendedActions(markdown),
353
- lessonsLearned: parseLessonsLearned(markdown),
354
- metrics: parseMetrics(markdown),
355
- metadata: {
356
- model,
357
- reflectionTime,
358
- estimatedCost
359
- }
360
- };
361
- // Extract file modification stats from markdown if present
362
- const filesChangedMatch = markdown.match(/\*\*Files Modified\*\*:\s*(\d+)\s*files?,\s*\+(\d+)\s*-(\d+)/i);
363
- if (filesChangedMatch) {
364
- result.filesModified = {
365
- count: parseInt(filesChangedMatch[1], 10),
366
- linesAdded: parseInt(filesChangedMatch[2], 10),
367
- linesRemoved: parseInt(filesChangedMatch[3], 10)
368
- };
369
- }
370
- return result;
371
- }
372
- /**
373
- * Validate parsed reflection result
374
- * Checks for required fields and data quality
375
- *
376
- * @param result Parsed reflection result
377
- * @returns Validation result with errors
378
- */
379
- export function validateReflectionResult(result) {
380
- const errors = [];
381
- // Check required fields
382
- if (!result.taskName) {
383
- errors.push('Missing task name');
384
- }
385
- if (!result.completed) {
386
- errors.push('Missing completion timestamp');
387
- }
388
- // Check for meaningful content
389
- if (result.accomplishments.length === 0 && result.strengths.length === 0) {
390
- errors.push('No accomplishments or strengths identified (reflection too sparse)');
391
- }
392
- // Validate metrics
393
- if (result.metrics.codeQuality < 1 || result.metrics.codeQuality > 10) {
394
- errors.push('Code quality must be 1-10');
395
- }
396
- if (result.metrics.security < 1 || result.metrics.security > 10) {
397
- errors.push('Security must be 1-10');
398
- }
399
- if (result.metrics.testCoverage !== undefined && (result.metrics.testCoverage < 0 || result.metrics.testCoverage > 100)) {
400
- errors.push('Test coverage must be 0-100%');
401
- }
402
- // Validate issues have required fields
403
- for (const issue of result.issues) {
404
- if (!issue.description) {
405
- errors.push('Issue missing description');
406
- }
407
- if (!issue.impact) {
408
- errors.push('Issue missing impact explanation');
409
- }
410
- if (!issue.recommendation) {
411
- errors.push('Issue missing recommendation');
412
- }
413
- }
414
- return {
415
- valid: errors.length === 0,
416
- errors
417
- };
418
- }
419
- //# sourceMappingURL=reflection-parser.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reflection-parser.js","sourceRoot":"","sources":["../../../../../plugins/specweave/lib/hooks/reflection-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAGL,aAAa,EACb,aAAa,EAGb,eAAe,EAChB,MAAM,0BAA0B,CAAC;AAElC;;;;;GAKG;AACH,SAAS,cAAc,CAAC,QAAgB,EAAE,OAAe;IACvD,MAAM,YAAY,GAAG,IAAI,MAAM,CAAC,IAAI,OAAO,OAAO,EAAE,IAAI,CAAC,CAAC;IAC1D,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAE3C,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;QACxC,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACjD,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAEhD,4CAA4C;IAC5C,MAAM,gBAAgB,GAAG,YAAY,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAC3D,MAAM,QAAQ,GAAG,gBAAgB,EAAE,KAAK,IAAI,YAAY,CAAC,MAAM,CAAC;IAEhE,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;AAChD,CAAC;AAED;;;;GAIG;AACH,SAAS,oBAAoB,CAAC,QAAgB;IAC5C,MAAM,OAAO,GAAG,cAAc,CAAC,QAAQ,EAAE,4BAA4B,CAAC,CAAC;IACvE,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IAExB,uCAAuC;IACvC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CA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C;QAClD,CAAC;QACD,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC;YAC1B,MAAM,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IAED,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;QAC1B,MAAM;KACP,CAAC;AACJ,CAAC"}
@@ -1,56 +0,0 @@
1
- /**
2
- * Reflection Prompt Builder
3
- *
4
- * Builds comprehensive prompts for the reflective-reviewer agent
5
- * Includes modified files context, configuration, task information
6
- *
7
- * @module reflection-prompt-builder
8
- */
9
- import { ReflectionConfig, GitDiffInfo } from './types/reflection-types';
10
- /**
11
- * Build the complete reflection prompt
12
- * Main function for creating agent prompts
13
- *
14
- * @param options Prompt options
15
- * @returns Complete markdown-formatted prompt for reflective-reviewer agent
16
- */
17
- export declare function buildReflectionPrompt(options: {
18
- taskId: string;
19
- taskName?: string;
20
- modifiedFiles: GitDiffInfo[];
21
- config: ReflectionConfig;
22
- incrementId?: string;
23
- includeFullDiff?: boolean;
24
- }): string;
25
- /**
26
- * Estimate token count for prompt (rough approximation)
27
- * Used for cost estimation
28
- *
29
- * @param prompt Reflection prompt
30
- * @returns Estimated token count (1 token ≈ 4 characters)
31
- */
32
- export declare function estimatePromptTokens(prompt: string): number;
33
- /**
34
- * Truncate large diffs to fit within token budget
35
- * Preserves most recent changes (bottom of diff)
36
- *
37
- * @param modifiedFiles Array of modified files
38
- * @param maxTokens Maximum tokens to use (default: 8000)
39
- * @returns Truncated array of modified files
40
- */
41
- export declare function truncateModifiedFiles(modifiedFiles: GitDiffInfo[], maxTokens?: number): GitDiffInfo[];
42
- /**
43
- * Build a simplified prompt for very large changes
44
- * Used when full diff exceeds reasonable token budget
45
- *
46
- * @param options Prompt options (same as buildReflectionPrompt)
47
- * @returns Simplified prompt with file list only (no diffs)
48
- */
49
- export declare function buildSimplifiedPrompt(options: {
50
- taskId: string;
51
- taskName?: string;
52
- modifiedFiles: GitDiffInfo[];
53
- config: ReflectionConfig;
54
- incrementId?: string;
55
- }): string;
56
- //# sourceMappingURL=reflection-prompt-builder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reflection-prompt-builder.d.ts","sourceRoot":"","sources":["../../../../../plugins/specweave/lib/hooks/reflection-prompt-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,gBAAgB,EAAmB,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAwI1F;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,WAAW,EAAE,CAAC;IAC7B,MAAM,EAAE,gBAAgB,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,GAAG,MAAM,CAyET;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAG3D;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,WAAW,EAAE,EAC5B,SAAS,GAAE,MAAa,GACvB,WAAW,EAAE,CA2Bf;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,WAAW,EAAE,CAAC;IAC7B,MAAM,EAAE,gBAAgB,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,MAAM,CAMT"}