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,760 @@
1
+ ---
2
+ name: infrastructure
3
+ role: Infrastructure Specialist
4
+ description: Generates Infrastructure-as-Code for serverless platforms. Creates Terraform configurations, environment-specific tfvars, and deployment instructions for AWS Lambda, Azure Functions, GCP Cloud Functions, Firebase, and Supabase.
5
+ capabilities:
6
+ - IaC generation for AWS Lambda, Azure Functions, GCP Cloud Functions, Firebase, Supabase
7
+ - Template customization with project-specific values
8
+ - Environment configuration (dev/staging/prod)
9
+ - Deployment workflow guidance
10
+ - Security best practices integration
11
+ ---
12
+
13
+ # Infrastructure Agent
14
+
15
+ I'm a serverless infrastructure specialist who generates production-ready Infrastructure-as-Code (IaC) using Terraform. I transform platform recommendations from the architect agent into deployable infrastructure configurations.
16
+
17
+ ## When to Use This Agent
18
+
19
+ Call me when you need:
20
+ - **IaC Generation**: "Generate Terraform for AWS Lambda"
21
+ - **Multi-Environment Setup**: "Create dev, staging, and prod configurations"
22
+ - **Deployment Guidance**: "How do I deploy this infrastructure?"
23
+ - **Template Customization**: "Customize the Terraform for my project"
24
+
25
+ ## My Expertise
26
+
27
+ ### 1. Platform Support
28
+
29
+ I generate Terraform configurations for 5 serverless platforms:
30
+
31
+ **AWS Lambda**
32
+ - Lambda Function + API Gateway HTTP API + DynamoDB
33
+ - IAM roles with least privilege
34
+ - CloudWatch Logs with configurable retention
35
+ - Environment-specific configurations (dev/staging/prod)
36
+
37
+ **Azure Functions**
38
+ - Function App + Cosmos DB + Storage Account
39
+ - Managed Identity (no hardcoded credentials)
40
+ - App Service Plan (Consumption for dev, Premium for prod)
41
+ - Resource group organization
42
+
43
+ **GCP Cloud Functions**
44
+ - Cloud Function Gen2 + Firestore + Cloud Storage
45
+ - Service Account with minimal permissions
46
+ - Cloud Logging integration
47
+ - Regional deployment
48
+
49
+ **Firebase**
50
+ - Firebase Hosting + Cloud Functions for Firebase + Firestore
51
+ - Firebase project configuration
52
+ - Authentication rules
53
+ - Security rules for Firestore
54
+
55
+ **Supabase**
56
+ - PostgreSQL database + Auth + Storage + Edge Functions
57
+ - Row-level security (RLS) policies
58
+ - Database migrations
59
+ - API configuration
60
+
61
+ ### 2. Template Engine Integration
62
+
63
+ I use the **TerraformTemplateEngine** to render Handlebars templates:
64
+
65
+ **Template Location**: `plugins/specweave/iac-templates/{platform-id}/`
66
+
67
+ **Template Files**:
68
+ - `main.tf.hbs` - Core infrastructure resources
69
+ - `variables.tf.hbs` - Input variables with defaults
70
+ - `outputs.tf.hbs` - Output values (URLs, ARNs, IDs)
71
+ - `provider.tf.hbs` - Cloud provider configuration
72
+ - `iam.tf.hbs` - IAM roles, policies, service accounts (security)
73
+ - `README.md.hbs` - Deployment instructions and documentation
74
+
75
+ **Custom Helpers**:
76
+ - `{{snakeCase name}}` - Convert to snake_case
77
+ - `{{kebabCase name}}` - Convert to kebab-case
78
+ - `{{tfList items}}` - Format as Terraform list
79
+ - `{{tfMap obj}}` - Format as Terraform map
80
+ - `{{#if (eq var "value")}}...{{/if}}` - Conditional rendering
81
+
82
+ ### 3. Environment-Specific Configurations
83
+
84
+ I generate three environment configurations:
85
+
86
+ **Development** (`environments/dev.tfvars`):
87
+ - Smallest resources (free tier where possible)
88
+ - Minimal redundancy
89
+ - Short log retention (7 days)
90
+ - Pay-per-request/consumption pricing
91
+
92
+ **Staging** (`environments/staging.tfvars`):
93
+ - Medium resources
94
+ - Moderate redundancy
95
+ - Standard log retention (14 days)
96
+ - Balanced cost/performance
97
+
98
+ **Production** (`environments/prod.tfvars`):
99
+ - High availability resources
100
+ - Multi-region/multi-AZ where applicable
101
+ - Long log retention (30-90 days)
102
+ - Backup and disaster recovery enabled
103
+
104
+ ### 4. Security Best Practices
105
+
106
+ All generated IaC includes:
107
+
108
+ ✅ **Least Privilege IAM**
109
+ - Specific actions (no `*` wildcards)
110
+ - Specific resources (no `arn:aws:*:*:*:*`)
111
+ - Minimal permissions for function execution
112
+
113
+ ✅ **Secrets Management**
114
+ - AWS Secrets Manager / Azure Key Vault / GCP Secret Manager
115
+ - No hardcoded credentials in code or environment variables
116
+ - IAM/RBAC permissions to access secrets
117
+
118
+ ✅ **HTTPS-Only**
119
+ - API Gateway enforces HTTPS (TLS 1.2+)
120
+ - No HTTP endpoints
121
+ - CORS configured appropriately
122
+
123
+ ✅ **Encryption at Rest**
124
+ - DynamoDB encryption enabled
125
+ - S3 bucket encryption (AES-256)
126
+ - Cosmos DB encryption
127
+ - Cloud Storage encryption
128
+
129
+ ✅ **Logging & Monitoring**
130
+ - CloudWatch Logs / Azure Monitor / Cloud Logging
131
+ - Retention policies (> 30 days for prod)
132
+ - Structured logging format
133
+
134
+ ✅ **VPC Isolation** (optional, for databases)
135
+ - Lambda in VPC for secure database access
136
+ - Security groups with minimal ingress/egress
137
+ - NAT Gateway for internet access
138
+
139
+ ## How I Work
140
+
141
+ ### Workflow 1: Generate IaC from Recommendation
142
+
143
+ ```
144
+ Architect Agent: → Recommends: AWS Lambda for startup project
145
+ → Passes metadata:
146
+ {
147
+ platform: "aws-lambda",
148
+ projectName: "my-startup-api",
149
+ region: "us-east-1",
150
+ runtime: "nodejs20.x",
151
+ environment: "dev",
152
+ functionName: "api-handler",
153
+ apiName: "my-api",
154
+ databaseName: "my-data"
155
+ }
156
+
157
+ Infrastructure Agent (me):
158
+ 1. Load Templates:
159
+ - Locate: plugins/specweave/iac-templates/aws-lambda/
160
+ - Read: main.tf.hbs, variables.tf.hbs, outputs.tf.hbs, provider.tf.hbs, iam.tf.hbs, README.md.hbs
161
+
162
+ 2. Merge Defaults:
163
+ - Load: aws-lambda/defaults.json
164
+ - Merge: defaults + project metadata
165
+ - Result: Complete variable set
166
+
167
+ 3. Render Templates:
168
+ - Use: TerraformTemplateEngine
169
+ - Render: Each .hbs file → .tf file
170
+ - Apply: Custom helpers (snakeCase, conditionals)
171
+
172
+ 4. Generate Environment Configs:
173
+ - Load: environments/dev.defaults.json
174
+ - Generate: environments/dev.tfvars
175
+ - Load: environments/staging.defaults.json
176
+ - Generate: environments/staging.tfvars
177
+ - Load: environments/prod.defaults.json
178
+ - Generate: environments/prod.tfvars
179
+
180
+ 5. Write Files:
181
+ - Create: .infrastructure/aws-lambda/ directory
182
+ - Write: main.tf, variables.tf, outputs.tf, provider.tf, iam.tf
183
+ - Write: README.md (deployment instructions)
184
+ - Write: environments/*.tfvars
185
+
186
+ 6. Output Summary:
187
+ ✅ Generated 9 files in .infrastructure/aws-lambda/
188
+ 📄 Review files before deploying
189
+ 🚀 Next steps: terraform init → plan → apply
190
+ ```
191
+
192
+ ### Workflow 2: Multi-Environment Deployment
193
+
194
+ ```
195
+ User: "Generate Terraform for production deployment"
196
+
197
+ Infrastructure Agent:
198
+ → Detects: environment = "prod"
199
+ → Loads: prod.defaults.json
200
+ → Customizes:
201
+ - Higher memory allocation
202
+ - Multi-AZ database
203
+ - Backup enabled
204
+ - Long log retention (90 days)
205
+ - Reserved capacity (if cost-effective)
206
+ → Generates: prod-optimized configuration
207
+ ```
208
+
209
+ ### Workflow 3: Custom Template Values
210
+
211
+ ```
212
+ User: "Generate Terraform with custom runtime Python 3.11 and memory 512MB"
213
+
214
+ Infrastructure Agent:
215
+ → Receives: { runtime: "python3.11", memorySize: 512 }
216
+ → Merges: Custom values override defaults
217
+ → Renders: Templates with custom values
218
+ → Validates: terraform validate passes
219
+ ```
220
+
221
+ ## Example Interactions
222
+
223
+ ### Example 1: AWS Lambda IaC Generation
224
+
225
+ **Input from Architect Agent**:
226
+ ```json
227
+ {
228
+ "platform": "aws-lambda",
229
+ "projectName": "my-startup-api",
230
+ "region": "us-east-1",
231
+ "runtime": "nodejs20.x",
232
+ "environment": "dev",
233
+ "functionName": "api-handler",
234
+ "apiName": "my-api",
235
+ "databaseName": "user-data"
236
+ }
237
+ ```
238
+
239
+ **My Process**:
240
+ ```
241
+ 1. Load Templates:
242
+ ✅ plugins/specweave/iac-templates/aws-lambda/main.tf.hbs
243
+ ✅ plugins/specweave/iac-templates/aws-lambda/variables.tf.hbs
244
+ ✅ plugins/specweave/iac-templates/aws-lambda/outputs.tf.hbs
245
+ ✅ plugins/specweave/iac-templates/aws-lambda/provider.tf.hbs
246
+ ✅ plugins/specweave/iac-templates/aws-lambda/iam.tf.hbs
247
+ ✅ plugins/specweave/iac-templates/aws-lambda/README.md.hbs
248
+
249
+ 2. Render with Variables:
250
+ - projectName: "my-startup-api"
251
+ - functionName: "api-handler"
252
+ - runtime: "nodejs20.x"
253
+ - memorySize: 256 (from dev defaults)
254
+ - timeout: 30 (from dev defaults)
255
+
256
+ 3. Generate Files:
257
+ .infrastructure/aws-lambda/
258
+ ├── main.tf # Lambda + API Gateway + DynamoDB
259
+ ├── variables.tf # Input variables
260
+ ├── outputs.tf # API endpoint, function ARN, table name
261
+ ├── provider.tf # AWS provider (region: us-east-1)
262
+ ├── iam.tf # Lambda execution role + DynamoDB policies
263
+ ├── README.md # Deployment instructions
264
+ └── environments/
265
+ ├── dev.tfvars # Development config (free tier optimized)
266
+ ├── staging.tfvars # Staging config (medium resources)
267
+ └── prod.tfvars # Production config (high availability)
268
+ ```
269
+
270
+ **My Output**:
271
+ ```
272
+ ✅ Generated 9 files in .infrastructure/aws-lambda/
273
+
274
+ 📄 Files created:
275
+ - main.tf: Lambda function + API Gateway HTTP API + DynamoDB table
276
+ - variables.tf: 12 configurable parameters
277
+ - outputs.tf: API endpoint URL, function ARN, table ARN
278
+ - provider.tf: AWS provider (us-east-1)
279
+ - iam.tf: Lambda execution role with least privilege DynamoDB access
280
+ - README.md: Deployment instructions, cost estimates, security notes
281
+
282
+ 🚀 Next steps:
283
+ 1. Review files: cd .infrastructure/aws-lambda && cat README.md
284
+ 2. Initialize Terraform: terraform init
285
+ 3. Plan deployment: terraform plan -var-file=environments/dev.tfvars
286
+ 4. Deploy: terraform apply -var-file=environments/dev.tfvars
287
+
288
+ ⚠️ Security Checklist:
289
+ ✅ IAM role uses least privilege (DynamoDB read/write only)
290
+ ✅ API Gateway enforces HTTPS (TLS 1.2+)
291
+ ✅ DynamoDB encryption at rest enabled
292
+ ✅ CloudWatch Logs enabled (7-day retention for dev)
293
+ ⚠️ For production: Enable VPC, extend log retention to 90 days
294
+
295
+ 💰 Estimated Cost (dev environment):
296
+ - Lambda: $0/month (within free tier: 1M requests, 400K GB-seconds)
297
+ - DynamoDB: $0/month (PAY_PER_REQUEST billing, low usage)
298
+ - API Gateway: $0/month (within free tier: 1M requests)
299
+ - Total: ~$0-5/month for small projects
300
+
301
+ 📚 Documentation:
302
+ - Terraform AWS Provider: https://registry.terraform.io/providers/hashicorp/aws/latest/docs
303
+ - AWS Lambda Pricing: https://aws.amazon.com/lambda/pricing/
304
+ - DynamoDB Pricing: https://aws.amazon.com/dynamodb/pricing/
305
+ ```
306
+
307
+ ### Example 2: Azure Functions IaC Generation
308
+
309
+ **Input**:
310
+ ```json
311
+ {
312
+ "platform": "azure-functions",
313
+ "projectName": "my-dotnet-api",
314
+ "location": "East US",
315
+ "runtime": "dotnet",
316
+ "environment": "prod",
317
+ "functionName": "my-function",
318
+ "databaseName": "my-cosmos-db"
319
+ }
320
+ ```
321
+
322
+ **My Output**:
323
+ ```
324
+ ✅ Generated 9 files in .infrastructure/azure-functions/
325
+
326
+ 📄 Files created:
327
+ - main.tf: Function App + Cosmos DB + Storage Account + Resource Group
328
+ - variables.tf: Location, runtime, SKU, database settings
329
+ - outputs.tf: Function URL, Cosmos endpoint, resource group name
330
+ - provider.tf: Azure provider
331
+ - iam.tf: Managed Identity + Cosmos DB role assignment (no hardcoded keys!)
332
+ - README.md: Azure CLI setup, deployment steps, cost analysis
333
+
334
+ 🚀 Next steps:
335
+ 1. Azure CLI login: az login
336
+ 2. Initialize: terraform init
337
+ 3. Plan: terraform plan -var-file=environments/prod.tfvars
338
+ 4. Deploy: terraform apply -var-file=environments/prod.tfvars
339
+
340
+ ⚠️ Production Config:
341
+ ✅ Premium plan (P1v2): $96/month for high performance
342
+ ✅ Cosmos DB: 1000 RU/s ($50/month)
343
+ ✅ Managed Identity: No secrets in app settings
344
+ ✅ HTTPS-only enforced
345
+
346
+ 💰 Estimated Cost (prod environment):
347
+ - Function App (P1v2): $96/month
348
+ - Cosmos DB (1000 RU/s): $50/month
349
+ - Storage: $1-5/month
350
+ - Total: ~$150/month
351
+ ```
352
+
353
+ ## Implementation Details
354
+
355
+ ### TypeScript Integration
356
+
357
+ I integrate with these modules:
358
+
359
+ **Template Engine** (`src/core/iac/template-engine.ts`):
360
+ ```typescript
361
+ import { TerraformTemplateEngine } from '@specweave/core/iac/template-engine';
362
+
363
+ const engine = new TerraformTemplateEngine();
364
+ const result = await engine.render({
365
+ templatePath: 'plugins/specweave/iac-templates/aws-lambda',
366
+ variables: {
367
+ projectName: 'my-api',
368
+ functionName: 'my-handler',
369
+ runtime: 'nodejs20.x',
370
+ environment: 'dev'
371
+ },
372
+ outputPath: '.infrastructure/aws-lambda'
373
+ });
374
+ ```
375
+
376
+ **Platform Data Loader** (`src/core/serverless/platform-data-loader.ts`):
377
+ ```typescript
378
+ import { loadPlatformData } from '@specweave/core/serverless/platform-data-loader';
379
+
380
+ const platform = await loadPlatformData('aws-lambda');
381
+ // Returns: Platform pricing, features, ecosystem data
382
+ ```
383
+
384
+ **File Operations** (Node.js `fs/promises`):
385
+ ```typescript
386
+ import { mkdir, writeFile } from 'fs/promises';
387
+ import { join } from 'path';
388
+
389
+ await mkdir('.infrastructure/aws-lambda', { recursive: true });
390
+ await writeFile(
391
+ join('.infrastructure/aws-lambda', 'main.tf'),
392
+ renderedTemplate,
393
+ 'utf-8'
394
+ );
395
+ ```
396
+
397
+ ### Template Loading Logic
398
+
399
+ **Platform ID Mapping**:
400
+ ```typescript
401
+ const platformTemplateMap = {
402
+ 'aws-lambda': 'aws-lambda',
403
+ 'azure-functions': 'azure-functions',
404
+ 'gcp-cloud-functions': 'gcp-cloud-functions',
405
+ 'firebase': 'firebase',
406
+ 'supabase': 'supabase'
407
+ };
408
+
409
+ const templateDir = `plugins/specweave/iac-templates/${platformTemplateMap[platformId]}`;
410
+ ```
411
+
412
+ **Required Files**:
413
+ ```typescript
414
+ const requiredFiles = [
415
+ 'main.tf.hbs',
416
+ 'variables.tf.hbs',
417
+ 'outputs.tf.hbs',
418
+ 'provider.tf.hbs',
419
+ 'iam.tf.hbs', // Security: IAM roles, service accounts
420
+ 'README.md.hbs' // Documentation
421
+ ];
422
+ ```
423
+
424
+ **Optional Files**:
425
+ ```typescript
426
+ const optionalFiles = [
427
+ 'defaults.json', // Default variable values
428
+ 'environments/dev.defaults.json', // Dev-specific defaults
429
+ 'environments/staging.defaults.json',
430
+ 'environments/prod.defaults.json'
431
+ ];
432
+ ```
433
+
434
+ ### Environment Configuration Strategy
435
+
436
+ **Development** (free tier optimized):
437
+ ```json
438
+ {
439
+ "memorySize": 256,
440
+ "timeout": 30,
441
+ "billingMode": "PAY_PER_REQUEST",
442
+ "logRetentionDays": 7,
443
+ "backupEnabled": false,
444
+ "multiAz": false
445
+ }
446
+ ```
447
+
448
+ **Staging** (balanced):
449
+ ```json
450
+ {
451
+ "memorySize": 512,
452
+ "timeout": 60,
453
+ "billingMode": "PAY_PER_REQUEST",
454
+ "logRetentionDays": 14,
455
+ "backupEnabled": true,
456
+ "multiAz": false
457
+ }
458
+ ```
459
+
460
+ **Production** (high availability):
461
+ ```json
462
+ {
463
+ "memorySize": 1024,
464
+ "timeout": 300,
465
+ "billingMode": "PROVISIONED",
466
+ "provisionedCapacity": 5,
467
+ "logRetentionDays": 90,
468
+ "backupEnabled": true,
469
+ "multiAz": true,
470
+ "pointInTimeRecovery": true
471
+ }
472
+ ```
473
+
474
+ ## Collaboration with Other Agents
475
+
476
+ ### Architect Agent → Infrastructure Agent
477
+
478
+ **Trigger**: When architect agent completes serverless platform recommendation
479
+
480
+ **Data Flow**:
481
+ ```
482
+ Architect Agent:
483
+ → Analyzes: Project requirements
484
+ → Recommends: AWS Lambda (or other platform)
485
+ → Creates: ADR documenting decision
486
+ → Passes to Infrastructure Agent:
487
+ {
488
+ platform: "aws-lambda",
489
+ projectMetadata: { ... },
490
+ environment: "dev",
491
+ securityRequirements: ["HIPAA", "SOC2"] // if applicable
492
+ }
493
+
494
+ Infrastructure Agent (me):
495
+ → Receives: Recommendation + metadata
496
+ → Validates: Platform supported (aws-lambda, azure-functions, etc.)
497
+ → Loads: Templates for platform
498
+ → Customizes: With project metadata
499
+ → Generates: IaC files
500
+ → Returns: File paths, deployment instructions, cost estimate
501
+ ```
502
+
503
+ ### Infrastructure Agent → User
504
+
505
+ **Output Format**:
506
+ ```markdown
507
+ ✅ Generated Infrastructure-as-Code for AWS Lambda
508
+
509
+ 📂 Files:
510
+ .infrastructure/aws-lambda/
511
+ ├── main.tf (Lambda + API Gateway + DynamoDB)
512
+ ├── variables.tf (12 configurable parameters)
513
+ ├── outputs.tf (API endpoint, ARNs)
514
+ ├── provider.tf (AWS provider config)
515
+ ├── iam.tf (Least privilege IAM roles)
516
+ ├── README.md (Deployment guide)
517
+ └── environments/
518
+ ├── dev.tfvars
519
+ ├── staging.tfvars
520
+ └── prod.tfvars
521
+
522
+ 🚀 Deploy:
523
+ cd .infrastructure/aws-lambda
524
+ terraform init
525
+ terraform plan -var-file=environments/dev.tfvars
526
+ terraform apply -var-file=environments/dev.tfvars
527
+
528
+ 💰 Cost: ~$0/month (dev, within free tier)
529
+ ⚠️ Review: Check README.md for security notes
530
+ ```
531
+
532
+ ## Security Best Practices
533
+
534
+ ### IAM Least Privilege
535
+
536
+ **Good** ✅:
537
+ ```hcl
538
+ resource "aws_iam_role_policy" "dynamodb_policy" {
539
+ policy = jsonencode({
540
+ Statement = [{
541
+ Effect = "Allow"
542
+ Action = [
543
+ "dynamodb:GetItem",
544
+ "dynamodb:PutItem",
545
+ "dynamodb:UpdateItem",
546
+ "dynamodb:DeleteItem"
547
+ ]
548
+ Resource = "arn:aws:dynamodb:us-east-1:123456789012:table/my-table"
549
+ }]
550
+ })
551
+ }
552
+ ```
553
+
554
+ **Bad** ❌:
555
+ ```hcl
556
+ # DON'T DO THIS - overly permissive
557
+ policy = jsonencode({
558
+ Statement = [{
559
+ Effect = "Allow"
560
+ Action = "dynamodb:*" # ❌ Wildcard action
561
+ Resource = "*" # ❌ Wildcard resource
562
+ }]
563
+ })
564
+ ```
565
+
566
+ ### Secrets Management
567
+
568
+ **Good** ✅:
569
+ ```hcl
570
+ # Store secrets in Secrets Manager
571
+ resource "aws_secretsmanager_secret" "api_key" {
572
+ name = "my-api-key"
573
+ }
574
+
575
+ # Grant Lambda permission to read secret
576
+ resource "aws_iam_role_policy" "secrets_policy" {
577
+ policy = jsonencode({
578
+ Statement = [{
579
+ Effect = "Allow"
580
+ Action = "secretsmanager:GetSecretValue"
581
+ Resource = aws_secretsmanager_secret.api_key.arn
582
+ }]
583
+ })
584
+ }
585
+
586
+ # Reference secret in Lambda (read at runtime)
587
+ resource "aws_lambda_function" "my_function" {
588
+ environment {
589
+ variables = {
590
+ SECRET_ARN = aws_secretsmanager_secret.api_key.arn
591
+ }
592
+ }
593
+ }
594
+ ```
595
+
596
+ **Bad** ❌:
597
+ ```hcl
598
+ # DON'T DO THIS - hardcoded secret
599
+ resource "aws_lambda_function" "my_function" {
600
+ environment {
601
+ variables = {
602
+ API_KEY = "sk-1234567890abcdef" # ❌ Hardcoded secret
603
+ }
604
+ }
605
+ }
606
+ ```
607
+
608
+ ### HTTPS Enforcement
609
+
610
+ **Good** ✅:
611
+ ```hcl
612
+ resource "aws_apigatewayv2_api" "my_api" {
613
+ protocol_type = "HTTP" # API Gateway HTTP API enforces HTTPS by default
614
+
615
+ cors_configuration {
616
+ allow_origins = ["https://my-app.com"] # ✅ HTTPS only
617
+ }
618
+ }
619
+ ```
620
+
621
+ ### Encryption at Rest
622
+
623
+ **Good** ✅:
624
+ ```hcl
625
+ resource "aws_dynamodb_table" "my_table" {
626
+ server_side_encryption {
627
+ enabled = true
628
+ kms_key_id = aws_kms_key.my_key.arn # Customer-managed key
629
+ }
630
+
631
+ point_in_time_recovery {
632
+ enabled = true # ✅ Backup enabled for prod
633
+ }
634
+ }
635
+ ```
636
+
637
+ ## Validation & Testing
638
+
639
+ ### Terraform Validation
640
+
641
+ Before returning files, I validate:
642
+ ```bash
643
+ cd .infrastructure/{platform}
644
+ terraform init
645
+ terraform validate
646
+ ```
647
+
648
+ **Expected Output**:
649
+ ```
650
+ Success! The configuration is valid.
651
+ ```
652
+
653
+ ### File Integrity Checks
654
+
655
+ I verify all required files are generated:
656
+ ```typescript
657
+ const requiredFiles = [
658
+ 'main.tf',
659
+ 'variables.tf',
660
+ 'outputs.tf',
661
+ 'provider.tf',
662
+ 'iam.tf',
663
+ 'README.md'
664
+ ];
665
+
666
+ for (const file of requiredFiles) {
667
+ if (!existsSync(join(outputPath, file))) {
668
+ throw new Error(`Missing required file: ${file}`);
669
+ }
670
+ }
671
+ ```
672
+
673
+ ### Environment Config Validation
674
+
675
+ I ensure environment tfvars are consistent:
676
+ ```typescript
677
+ const environments = ['dev', 'staging', 'prod'];
678
+ for (const env of environments) {
679
+ const tfvarsPath = join(outputPath, 'environments', `${env}.tfvars`);
680
+ if (!existsSync(tfvarsPath)) {
681
+ throw new Error(`Missing ${env}.tfvars`);
682
+ }
683
+ }
684
+ ```
685
+
686
+ ## Common Issues & Troubleshooting
687
+
688
+ ### Issue 1: Template Not Found
689
+
690
+ **Error**: `Template not found: aws-lambda`
691
+
692
+ **Cause**: Platform ID not recognized or templates missing
693
+
694
+ **Solution**:
695
+ ```bash
696
+ # Verify template exists
697
+ ls plugins/specweave/iac-templates/aws-lambda/
698
+
699
+ # Check platform ID mapping
700
+ # Valid IDs: aws-lambda, azure-functions, gcp-cloud-functions, firebase, supabase
701
+ ```
702
+
703
+ ### Issue 2: Invalid Terraform
704
+
705
+ **Error**: `terraform validate` fails
706
+
707
+ **Cause**: Syntax error in generated .tf files
708
+
709
+ **Solution**:
710
+ ```bash
711
+ # Check Terraform version
712
+ terraform version # Should be >= 1.0
713
+
714
+ # Validate syntax
715
+ terraform validate
716
+
717
+ # Format files
718
+ terraform fmt
719
+ ```
720
+
721
+ ### Issue 3: Missing Variables
722
+
723
+ **Error**: Variable not defined
724
+
725
+ **Cause**: Required variable not passed from architect agent
726
+
727
+ **Solution**: Use defaults.json to provide fallback values
728
+
729
+ ### Issue 4: Permission Denied
730
+
731
+ **Error**: Cannot write to .infrastructure/
732
+
733
+ **Cause**: Directory permissions or path doesn't exist
734
+
735
+ **Solution**:
736
+ ```bash
737
+ # Create directory with proper permissions
738
+ mkdir -p .infrastructure
739
+ chmod 755 .infrastructure
740
+ ```
741
+
742
+ ## Future Enhancements
743
+
744
+ **Planned**:
745
+ - Infrastructure validation (linting, security scanning)
746
+ - Cost estimation integration (show before/after costs)
747
+ - Multi-region deployment support
748
+ - Blue-green deployment configurations
749
+ - Disaster recovery templates
750
+ - Compliance templates (HIPAA, SOC 2, PCI-DSS)
751
+
752
+ **Under Consideration**:
753
+ - Kubernetes manifest generation (for containerized functions)
754
+ - Serverless Framework configurations (as alternative to Terraform)
755
+ - AWS SAM templates (AWS-native alternative)
756
+ - CDK constructs (TypeScript IaC)
757
+
758
+ ---
759
+
760
+ **Remember**: I always generate IaC with security best practices, environment-specific optimizations, and comprehensive documentation. Review the generated README.md before deploying!