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,194 @@
1
+ /**
2
+ * Opportunity Score Calculator
3
+ *
4
+ * Calculates market opportunity score (1-10 scale) based on:
5
+ * - Market size estimate
6
+ * - Competition density
7
+ * - Viral potential
8
+ * - Innovation factor
9
+ *
10
+ * **Formula**:
11
+ * score = (marketSize / 10) - (competitionDensity / 2) + viralBonus + innovationBonus
12
+ * Clamped to 1-10 range
13
+ *
14
+ * **Benefits**:
15
+ * - Algorithmic calculation (no LLM needed)
16
+ * - Transparent scoring logic
17
+ * - Deterministic and testable
18
+ */
19
+ /**
20
+ * Market size estimates by category (1-10 scale)
21
+ *
22
+ * Based on general market research and industry reports
23
+ */
24
+ const MARKET_SIZE_ESTIMATES = {
25
+ 'productivity-saas': 8, // Large and growing
26
+ 'healthcare': 10, // Massive market
27
+ 'fintech': 9, // Very large market
28
+ 'e-commerce': 9, // Huge market
29
+ 'education': 8, // Large market
30
+ 'gaming': 7, // Large but competitive
31
+ 'social-network': 6, // Saturated market
32
+ 'enterprise-b2b': 8, // Large market
33
+ 'consumer-b2c': 7, // Moderate market
34
+ 'marketplace': 7, // Good market
35
+ 'iot': 6, // Growing market
36
+ 'blockchain': 5, // Emerging market
37
+ 'ai-ml': 9, // Very large market
38
+ 'unknown': 5 // Default
39
+ };
40
+ /**
41
+ * Competition density estimates by category (1-10 scale)
42
+ *
43
+ * Higher = more competitive
44
+ */
45
+ const COMPETITION_DENSITY = {
46
+ 'productivity-saas': 8, // Very competitive
47
+ 'healthcare': 6, // Moderate (high barriers)
48
+ 'fintech': 7, // High competition
49
+ 'e-commerce': 9, // Extremely competitive
50
+ 'education': 7, // High competition
51
+ 'gaming': 8, // Very competitive
52
+ 'social-network': 10, // Extremely competitive
53
+ 'enterprise-b2b': 6, // Moderate
54
+ 'consumer-b2c': 8, // Very competitive
55
+ 'marketplace': 8, // Very competitive
56
+ 'iot': 5, // Moderate
57
+ 'blockchain': 6, // Moderate (niche)
58
+ 'ai-ml': 7, // High competition
59
+ 'unknown': 5 // Default
60
+ };
61
+ /**
62
+ * Calculate market opportunity score
63
+ *
64
+ * @param marketCategory - Detected market category
65
+ * @param competitorCount - Number of direct competitors identified
66
+ * @param viralPotential - Whether product has viral growth potential
67
+ * @param innovationFactor - Innovation score (0-1) based on uniqueness
68
+ * @returns Opportunity score (1-10) with rationale
69
+ *
70
+ * @example
71
+ * ```typescript
72
+ * const result = calculateOpportunityScore('productivity-saas', 5, true, 0.7);
73
+ * // Returns: { score: 7, rationale: '...' }
74
+ * ```
75
+ */
76
+ export function calculateOpportunityScore(marketCategory, competitorCount, viralPotential, innovationFactor = 0.5) {
77
+ // Get market size and competition for this category
78
+ const marketSize = MARKET_SIZE_ESTIMATES[marketCategory] || 5;
79
+ const competitionBase = COMPETITION_DENSITY[marketCategory] || 5;
80
+ // Adjust competition based on competitor count
81
+ // More competitors = higher competition
82
+ const competitionAdjustment = Math.min(competitorCount * 0.5, 3);
83
+ const competition = Math.min(competitionBase + competitionAdjustment, 10);
84
+ // Calculate base score
85
+ let score = (marketSize / 10) * 10 - (competition / 2);
86
+ // Viral bonus (+2 points)
87
+ const viralBonus = viralPotential ? 2 : 0;
88
+ score += viralBonus;
89
+ // Innovation bonus (0-2 points based on innovation factor)
90
+ const innovationBonus = innovationFactor * 2;
91
+ score += innovationBonus;
92
+ // Clamp to 1-10 range
93
+ score = Math.max(1, Math.min(10, score));
94
+ // Round to 1 decimal place
95
+ score = Math.round(score * 10) / 10;
96
+ // Generate rationale
97
+ const rationale = generateRationale(marketCategory, marketSize, competition, viralPotential, innovationFactor, score);
98
+ return {
99
+ score,
100
+ rationale,
101
+ breakdown: {
102
+ marketSize,
103
+ competition,
104
+ viral: viralBonus,
105
+ innovation: innovationBonus
106
+ }
107
+ };
108
+ }
109
+ /**
110
+ * Generate human-readable rationale for the score
111
+ */
112
+ function generateRationale(category, marketSize, competition, viral, innovation, finalScore) {
113
+ const parts = [];
114
+ // Market size assessment
115
+ if (marketSize >= 8) {
116
+ parts.push('Large market size');
117
+ }
118
+ else if (marketSize >= 6) {
119
+ parts.push('Moderate market size');
120
+ }
121
+ else {
122
+ parts.push('Emerging market');
123
+ }
124
+ // Competition assessment
125
+ if (competition >= 8) {
126
+ parts.push('highly competitive landscape');
127
+ }
128
+ else if (competition >= 6) {
129
+ parts.push('moderate competition');
130
+ }
131
+ else {
132
+ parts.push('low competition');
133
+ }
134
+ // Viral potential
135
+ if (viral) {
136
+ parts.push('viral growth potential');
137
+ }
138
+ // Innovation
139
+ if (innovation >= 0.7) {
140
+ parts.push('high innovation factor');
141
+ }
142
+ else if (innovation >= 0.4) {
143
+ parts.push('moderate innovation');
144
+ }
145
+ // Overall assessment
146
+ let assessment;
147
+ if (finalScore >= 8) {
148
+ assessment = 'Strong opportunity';
149
+ }
150
+ else if (finalScore >= 6) {
151
+ assessment = 'Good opportunity';
152
+ }
153
+ else if (finalScore >= 4) {
154
+ assessment = 'Moderate opportunity';
155
+ }
156
+ else {
157
+ assessment = 'Challenging opportunity';
158
+ }
159
+ return `${assessment}: ${parts.join(', ')}.`;
160
+ }
161
+ /**
162
+ * Estimate innovation factor from keywords and competitors
163
+ *
164
+ * Innovation factor is based on:
165
+ * - Unique keyword combinations
166
+ * - Number of competitors (fewer = more innovative)
167
+ * - Presence of emerging tech keywords
168
+ *
169
+ * @param keywords - Product keywords
170
+ * @param competitorCount - Number of competitors
171
+ * @returns Innovation score (0-1)
172
+ */
173
+ export function estimateInnovationFactor(keywords, competitorCount) {
174
+ let score = 0.5; // Start at moderate
175
+ // Fewer competitors suggests more innovation
176
+ if (competitorCount === 0) {
177
+ score += 0.3;
178
+ }
179
+ else if (competitorCount <= 2) {
180
+ score += 0.2;
181
+ }
182
+ else if (competitorCount <= 5) {
183
+ score += 0.1;
184
+ }
185
+ // Emerging tech keywords boost innovation
186
+ const emergingTech = ['ai', 'machine-learning', 'blockchain', 'crypto', 'web3', 'ar', 'vr'];
187
+ const hasEmergingTech = keywords.some(k => emergingTech.some(tech => k.toLowerCase().includes(tech)));
188
+ if (hasEmergingTech) {
189
+ score += 0.2;
190
+ }
191
+ // Clamp to 0-1
192
+ return Math.max(0, Math.min(1, score));
193
+ }
194
+ //# sourceMappingURL=OpportunityScorer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OpportunityScorer.js","sourceRoot":"","sources":["../../../../src/init/research/OpportunityScorer.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C;IAED,eAAe;IACf,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;AACzC,CAAC"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Adaptive Question Generator
3
+ *
4
+ * Generates context-aware follow-up questions based on product vision,
5
+ * market category, and detected patterns.
6
+ *
7
+ * **Approach**:
8
+ * 1. Analyze vision insights (market, viral potential, etc.)
9
+ * 2. Select relevant question templates
10
+ * 3. Return 2-3 adaptive questions max
11
+ * 4. Prioritize most impactful questions
12
+ *
13
+ * **Benefits**:
14
+ * - Context-aware questioning
15
+ * - Progressive disclosure (not overwhelming)
16
+ * - Deterministic and testable
17
+ */
18
+ import { MarketCategory, Question } from './types.js';
19
+ /**
20
+ * Context for generating questions
21
+ */
22
+ export interface QuestionContext {
23
+ /** Detected market category */
24
+ marketCategory: MarketCategory;
25
+ /** Viral growth potential */
26
+ viralPotential: boolean;
27
+ /** Opportunity score (1-10) */
28
+ opportunityScore: number;
29
+ /** Extracted keywords */
30
+ keywords: string[];
31
+ /** Number of competitors */
32
+ competitorCount: number;
33
+ }
34
+ /**
35
+ * Generate adaptive follow-up questions based on vision insights
36
+ *
37
+ * Selects the most relevant 2-3 questions based on context,
38
+ * sorted by priority.
39
+ *
40
+ * @param context - Question generation context
41
+ * @param maxQuestions - Maximum questions to return (default: 3)
42
+ * @returns Array of adaptive questions
43
+ *
44
+ * @example
45
+ * ```typescript
46
+ * const questions = generateFollowUpQuestions({
47
+ * marketCategory: 'healthcare',
48
+ * viralPotential: false,
49
+ * opportunityScore: 7,
50
+ * keywords: ['health', 'medical', 'patient'],
51
+ * competitorCount: 3
52
+ * });
53
+ * // Returns healthcare-specific compliance and region questions
54
+ * ```
55
+ */
56
+ export declare function generateFollowUpQuestions(context: QuestionContext, maxQuestions?: number): Question[];
57
+ /**
58
+ * Get all potential questions with their priorities (useful for debugging)
59
+ *
60
+ * @param context - Question generation context
61
+ * @returns Array of questions with priorities and conditions
62
+ */
63
+ export declare function analyzeQuestions(context: QuestionContext): Array<{
64
+ question: Question;
65
+ priority: number;
66
+ applicable: boolean;
67
+ }>;
68
+ //# sourceMappingURL=QuestionGenerator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuestionGenerator.d.ts","sourceRoot":"","sources":["../../../../src/init/research/QuestionGenerator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAgBtD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,+BAA+B;IAC/B,cAAc,EAAE,cAAc,CAAC;IAE/B,6BAA6B;IAC7B,cAAc,EAAE,OAAO,CAAC;IAExB,+BAA+B;IAC/B,gBAAgB,EAAE,MAAM,CAAC;IAEzB,yBAAyB;IACzB,QAAQ,EAAE,MAAM,EAAE,CAAC;IAEnB,4BAA4B;IAC5B,eAAe,EAAE,MAAM,CAAC;CACzB;AAmMD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,eAAe,EACxB,YAAY,GAAE,MAAU,GACvB,QAAQ,EAAE,CAeZ;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,KAAK,CAAC;IAChE,QAAQ,EAAE,QAAQ,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC,CAMD"}
@@ -0,0 +1,244 @@
1
+ /**
2
+ * Adaptive Question Generator
3
+ *
4
+ * Generates context-aware follow-up questions based on product vision,
5
+ * market category, and detected patterns.
6
+ *
7
+ * **Approach**:
8
+ * 1. Analyze vision insights (market, viral potential, etc.)
9
+ * 2. Select relevant question templates
10
+ * 3. Return 2-3 adaptive questions max
11
+ * 4. Prioritize most impactful questions
12
+ *
13
+ * **Benefits**:
14
+ * - Context-aware questioning
15
+ * - Progressive disclosure (not overwhelming)
16
+ * - Deterministic and testable
17
+ */
18
+ /**
19
+ * Question templates organized by context
20
+ *
21
+ * Each template has:
22
+ * - Condition: When to ask this question
23
+ * - Generator: How to build the question
24
+ * - Priority: How important this question is
25
+ */
26
+ const QUESTION_TEMPLATES = [
27
+ // Viral Potential → Ask about scaling and growth
28
+ {
29
+ condition: (ctx) => ctx.viralPotential,
30
+ priority: 10,
31
+ generate: () => ({
32
+ question: 'What are your expected user growth targets in the first 6 months?',
33
+ type: 'multiple-choice',
34
+ options: [
35
+ '< 1,000 users (slow growth)',
36
+ '1K - 10K users (moderate growth)',
37
+ '10K - 100K users (viral growth)',
38
+ '100K+ users (explosive growth)'
39
+ ],
40
+ rationale: 'Understanding growth expectations helps recommend scalable architecture (serverless vs traditional).'
41
+ })
42
+ },
43
+ // Viral Potential → Ask about viral mechanisms
44
+ {
45
+ condition: (ctx) => ctx.viralPotential,
46
+ priority: 9,
47
+ generate: () => ({
48
+ question: 'How will users discover and share your product?',
49
+ type: 'multiple-choice',
50
+ options: [
51
+ 'Social sharing (built-in share features)',
52
+ 'Network effects (more users = more value)',
53
+ 'User-generated content',
54
+ 'Referral program',
55
+ 'Paid advertising'
56
+ ],
57
+ rationale: 'Viral mechanisms influence product architecture and feature priorities.'
58
+ })
59
+ },
60
+ // Enterprise/Healthcare → Ask about compliance
61
+ {
62
+ condition: (ctx) => ctx.marketCategory === 'enterprise-b2b' ||
63
+ ctx.marketCategory === 'healthcare',
64
+ priority: 10,
65
+ generate: (ctx) => ({
66
+ question: `Will you handle sensitive data? (${ctx.marketCategory === 'healthcare' ? 'PHI, medical records' : 'confidential business data'})`,
67
+ type: 'multiple-choice',
68
+ options: [
69
+ 'Yes - Healthcare data (PHI)',
70
+ 'Yes - Payment data (PCI)',
71
+ 'Yes - Personal data (GDPR/CCPA)',
72
+ 'Yes - Government data (FedRAMP)',
73
+ 'No sensitive data'
74
+ ],
75
+ rationale: 'Compliance requirements determine architecture, team structure, and costs.'
76
+ })
77
+ },
78
+ // Healthcare specific
79
+ {
80
+ condition: (ctx) => ctx.marketCategory === 'healthcare',
81
+ priority: 9,
82
+ generate: () => ({
83
+ question: 'What regions will your healthcare product operate in?',
84
+ type: 'multiple-choice',
85
+ options: [
86
+ 'United States only (HIPAA)',
87
+ 'European Union (GDPR + local)',
88
+ 'Global (multiple compliance standards)',
89
+ 'Not decided yet'
90
+ ],
91
+ rationale: 'Regional compliance affects team requirements and infrastructure choices.'
92
+ })
93
+ },
94
+ // Fintech specific
95
+ {
96
+ condition: (ctx) => ctx.marketCategory === 'fintech',
97
+ priority: 10,
98
+ generate: () => ({
99
+ question: 'How will you handle payments and financial data?',
100
+ type: 'multiple-choice',
101
+ options: [
102
+ 'Use Stripe/PayPal (outsource PCI compliance)',
103
+ 'Build in-house (full PCI-DSS compliance)',
104
+ 'Hybrid (some in-house, some third-party)',
105
+ 'Not decided yet'
106
+ ],
107
+ rationale: 'Payment handling determines compliance overhead and team requirements.'
108
+ })
109
+ },
110
+ // High competition → Ask about differentiation
111
+ {
112
+ condition: (ctx) => ctx.competitorCount >= 5,
113
+ priority: 8,
114
+ generate: () => ({
115
+ question: 'What makes your product different from existing competitors?',
116
+ type: 'open',
117
+ rationale: 'Understanding differentiation helps identify unique technical requirements.'
118
+ })
119
+ },
120
+ // Low competition → Ask about barriers
121
+ {
122
+ condition: (ctx) => ctx.competitorCount <= 2,
123
+ priority: 7,
124
+ generate: () => ({
125
+ question: 'Why do you think this market is underserved?',
126
+ type: 'open',
127
+ rationale: 'Understanding market gaps helps validate opportunity and identify technical challenges.'
128
+ })
129
+ },
130
+ // B2C/Consumer → Ask about monetization
131
+ {
132
+ condition: (ctx) => ctx.marketCategory === 'consumer-b2c' ||
133
+ ctx.marketCategory === 'social-network',
134
+ priority: 7,
135
+ generate: () => ({
136
+ question: 'How will you monetize your product?',
137
+ type: 'multiple-choice',
138
+ options: [
139
+ 'Freemium (free tier + paid upgrades)',
140
+ 'Subscription (monthly/annual)',
141
+ 'Advertising',
142
+ 'Transaction fees',
143
+ 'Not decided yet'
144
+ ],
145
+ rationale: 'Monetization strategy affects feature priorities and infrastructure needs.'
146
+ })
147
+ },
148
+ // Enterprise → Ask about team size
149
+ {
150
+ condition: (ctx) => ctx.marketCategory === 'enterprise-b2b',
151
+ priority: 8,
152
+ generate: () => ({
153
+ question: 'How large is your target customer organization?',
154
+ type: 'multiple-choice',
155
+ options: [
156
+ 'Small businesses (< 50 employees)',
157
+ 'Mid-market (50-500 employees)',
158
+ 'Enterprise (500-5000 employees)',
159
+ 'Large enterprise (5000+ employees)'
160
+ ],
161
+ rationale: 'Customer size affects feature complexity, compliance needs, and support requirements.'
162
+ })
163
+ },
164
+ // Default → Ask about timeline
165
+ {
166
+ condition: () => true, // Always applicable
167
+ priority: 5,
168
+ generate: () => ({
169
+ question: 'What is your target launch timeline?',
170
+ type: 'multiple-choice',
171
+ options: [
172
+ 'MVP in 1-3 months',
173
+ 'Beta in 3-6 months',
174
+ 'Full launch in 6-12 months',
175
+ 'Longer than 1 year'
176
+ ],
177
+ rationale: 'Timeline affects technology choices and architectural decisions (YAGNI vs future-proof).'
178
+ })
179
+ },
180
+ // Default → Ask about budget
181
+ {
182
+ condition: () => true,
183
+ priority: 6,
184
+ generate: () => ({
185
+ question: 'What is your development approach?',
186
+ type: 'multiple-choice',
187
+ options: [
188
+ 'Bootstrapped (self-funded)',
189
+ 'Pre-seed / Angel funded',
190
+ 'Seed / Series A funded',
191
+ 'Series B+ funded',
192
+ 'Learning project (non-commercial)'
193
+ ],
194
+ rationale: 'Funding stage affects architecture recommendations and cloud credit eligibility.'
195
+ })
196
+ }
197
+ ];
198
+ /**
199
+ * Generate adaptive follow-up questions based on vision insights
200
+ *
201
+ * Selects the most relevant 2-3 questions based on context,
202
+ * sorted by priority.
203
+ *
204
+ * @param context - Question generation context
205
+ * @param maxQuestions - Maximum questions to return (default: 3)
206
+ * @returns Array of adaptive questions
207
+ *
208
+ * @example
209
+ * ```typescript
210
+ * const questions = generateFollowUpQuestions({
211
+ * marketCategory: 'healthcare',
212
+ * viralPotential: false,
213
+ * opportunityScore: 7,
214
+ * keywords: ['health', 'medical', 'patient'],
215
+ * competitorCount: 3
216
+ * });
217
+ * // Returns healthcare-specific compliance and region questions
218
+ * ```
219
+ */
220
+ export function generateFollowUpQuestions(context, maxQuestions = 3) {
221
+ // Filter templates based on conditions
222
+ const applicable = QUESTION_TEMPLATES.filter(template => template.condition(context));
223
+ // Sort by priority (descending)
224
+ applicable.sort((a, b) => b.priority - a.priority);
225
+ // Take top N and generate questions
226
+ const questions = applicable
227
+ .slice(0, maxQuestions)
228
+ .map(template => template.generate(context));
229
+ return questions;
230
+ }
231
+ /**
232
+ * Get all potential questions with their priorities (useful for debugging)
233
+ *
234
+ * @param context - Question generation context
235
+ * @returns Array of questions with priorities and conditions
236
+ */
237
+ export function analyzeQuestions(context) {
238
+ return QUESTION_TEMPLATES.map(template => ({
239
+ question: template.generate(context),
240
+ priority: template.priority,
241
+ applicable: template.condition(context)
242
+ })).sort((a, b) => b.priority - a.priority);
243
+ }
244
+ //# sourceMappingURL=QuestionGenerator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuestionGenerator.js","sourceRoot":"","sources":["../../../../src/init/research/QuestionGenerator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAsCH;;;;;;;GAOG;AACH,MAAM,kBAAkB,GAAuB;IAC7C,iDAAiD;IACjD;QACE,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,cAAc;QACtC,QAAQ,EAAE,EAAE;QACZ,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC;YACf,QAAQ,EAAE,mEAAmE;YAC7E,IAAI,EAAE,iBAAiB;YACvB,OAAO,EAAE;gBACP,6BAA6B;gBAC7B,kCAAkC;gBAClC,iCAAiC;gBACjC,gCAAgC;aACjC;YACD,SAAS,EAAE,sGAAsG;SAClH,CAA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S,CAAC,OAAO,CAAC,CAC5B,CAAC;IAEF,gCAAgC;IAChC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;IAEnD,oCAAoC;IACpC,MAAM,SAAS,GAAG,UAAU;SACzB,KAAK,CAAC,CAAC,EAAE,YAAY,CAAC;SACtB,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IAE/C,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAwB;IAKvD,OAAO,kBAAkB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACzC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC;QACpC,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,UAAU,EAAE,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC;KACxC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;AAC9C,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Market Research Report Generator
3
+ *
4
+ * Generates markdown reports summarizing vision analysis results.
5
+ */
6
+ import type { VisionInsights } from './types.js';
7
+ /**
8
+ * ReportGenerator - Generates market research reports
9
+ *
10
+ * **Usage**:
11
+ * ```typescript
12
+ * await ReportGenerator.generate(insights);
13
+ * // Creates .specweave/reports/market-research.md
14
+ * ```
15
+ */
16
+ export declare class ReportGenerator {
17
+ /**
18
+ * Default report path
19
+ */
20
+ private static readonly REPORT_PATH;
21
+ /**
22
+ * Generate market research report
23
+ *
24
+ * @param insights - Vision insights to include in report
25
+ * @param reportPath - Optional custom report path
26
+ */
27
+ static generate(insights: VisionInsights, reportPath?: string): Promise<void>;
28
+ /**
29
+ * Create markdown content from insights
30
+ *
31
+ * @param insights - Vision insights
32
+ * @returns Markdown string
33
+ */
34
+ private static createMarkdown;
35
+ }
36
+ //# sourceMappingURL=ReportGenerator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReportGenerator.d.ts","sourceRoot":"","sources":["../../../../src/init/research/ReportGenerator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD;;;;;;;;GAQG;AACH,qBAAa,eAAe;IAC1B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAA2C;IAE9E;;;;;OAKG;WACU,QAAQ,CACnB,QAAQ,EAAE,cAAc,EACxB,UAAU,GAAE,MAAoC,GAC/C,OAAO,CAAC,IAAI,CAAC;IAWhB;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;CA+F9B"}