task-o-matic-core 0.1.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 (447) hide show
  1. package/README.md +646 -0
  2. package/dist/index.d.ts +27 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +46 -0
  5. package/dist/lib/ai-service/ai-operations.d.ts +45 -0
  6. package/dist/lib/ai-service/ai-operations.d.ts.map +1 -0
  7. package/dist/lib/ai-service/ai-operations.js +60 -0
  8. package/dist/lib/ai-service/base-operations.d.ts +43 -0
  9. package/dist/lib/ai-service/base-operations.d.ts.map +1 -0
  10. package/dist/lib/ai-service/base-operations.js +119 -0
  11. package/dist/lib/ai-service/documentation-operations.d.ts +18 -0
  12. package/dist/lib/ai-service/documentation-operations.d.ts.map +1 -0
  13. package/dist/lib/ai-service/documentation-operations.js +308 -0
  14. package/dist/lib/ai-service/filesystem-tools.d.ts +69 -0
  15. package/dist/lib/ai-service/filesystem-tools.d.ts.map +1 -0
  16. package/dist/lib/ai-service/filesystem-tools.js +70 -0
  17. package/dist/lib/ai-service/json-parser.d.ts +34 -0
  18. package/dist/lib/ai-service/json-parser.d.ts.map +1 -0
  19. package/dist/lib/ai-service/json-parser.js +177 -0
  20. package/dist/lib/ai-service/mcp-client.d.ts +9 -0
  21. package/dist/lib/ai-service/mcp-client.d.ts.map +1 -0
  22. package/dist/lib/ai-service/mcp-client.js +48 -0
  23. package/dist/lib/ai-service/model-provider.d.ts +12 -0
  24. package/dist/lib/ai-service/model-provider.d.ts.map +1 -0
  25. package/dist/lib/ai-service/model-provider.js +146 -0
  26. package/dist/lib/ai-service/prd-operations.d.ts +25 -0
  27. package/dist/lib/ai-service/prd-operations.d.ts.map +1 -0
  28. package/dist/lib/ai-service/prd-operations.js +592 -0
  29. package/dist/lib/ai-service/research-tools.d.ts +4 -0
  30. package/dist/lib/ai-service/research-tools.d.ts.map +1 -0
  31. package/dist/lib/ai-service/research-tools.js +8 -0
  32. package/dist/lib/ai-service/retry-handler.d.ts +8 -0
  33. package/dist/lib/ai-service/retry-handler.d.ts.map +1 -0
  34. package/dist/lib/ai-service/retry-handler.js +63 -0
  35. package/dist/lib/ai-service/task-operations.d.ts +13 -0
  36. package/dist/lib/ai-service/task-operations.d.ts.map +1 -0
  37. package/dist/lib/ai-service/task-operations.js +220 -0
  38. package/dist/lib/benchmark/registry.d.ts +11 -0
  39. package/dist/lib/benchmark/registry.d.ts.map +1 -0
  40. package/dist/lib/benchmark/registry.js +212 -0
  41. package/dist/lib/benchmark/runner.d.ts +6 -0
  42. package/dist/lib/benchmark/runner.d.ts.map +1 -0
  43. package/dist/lib/benchmark/runner.js +150 -0
  44. package/dist/lib/benchmark/storage.d.ts +13 -0
  45. package/dist/lib/benchmark/storage.d.ts.map +1 -0
  46. package/dist/lib/benchmark/storage.js +100 -0
  47. package/dist/lib/benchmark/types.d.ts +104 -0
  48. package/dist/lib/benchmark/types.d.ts.map +1 -0
  49. package/dist/lib/benchmark/types.js +2 -0
  50. package/dist/lib/better-t-stack-cli.d.ts +50 -0
  51. package/dist/lib/better-t-stack-cli.d.ts.map +1 -0
  52. package/dist/lib/better-t-stack-cli.js +428 -0
  53. package/dist/lib/bootstrap/cli-bootstrap.d.ts +14 -0
  54. package/dist/lib/bootstrap/cli-bootstrap.d.ts.map +1 -0
  55. package/dist/lib/bootstrap/cli-bootstrap.js +322 -0
  56. package/dist/lib/bootstrap/index.d.ts +3 -0
  57. package/dist/lib/bootstrap/index.d.ts.map +1 -0
  58. package/dist/lib/bootstrap/index.js +18 -0
  59. package/dist/lib/bootstrap/medusa-bootstrap.d.ts +14 -0
  60. package/dist/lib/bootstrap/medusa-bootstrap.d.ts.map +1 -0
  61. package/dist/lib/bootstrap/medusa-bootstrap.js +215 -0
  62. package/dist/lib/config-validation.d.ts +215 -0
  63. package/dist/lib/config-validation.d.ts.map +1 -0
  64. package/dist/lib/config-validation.js +254 -0
  65. package/dist/lib/config.d.ts +55 -0
  66. package/dist/lib/config.d.ts.map +1 -0
  67. package/dist/lib/config.js +351 -0
  68. package/dist/lib/context-builder.d.ts +66 -0
  69. package/dist/lib/context-builder.d.ts.map +1 -0
  70. package/dist/lib/context-builder.js +322 -0
  71. package/dist/lib/executors/claude-code-executor.d.ts +9 -0
  72. package/dist/lib/executors/claude-code-executor.d.ts.map +1 -0
  73. package/dist/lib/executors/claude-code-executor.js +69 -0
  74. package/dist/lib/executors/codex-executor.d.ts +9 -0
  75. package/dist/lib/executors/codex-executor.d.ts.map +1 -0
  76. package/dist/lib/executors/codex-executor.js +73 -0
  77. package/dist/lib/executors/executor-factory.d.ts +5 -0
  78. package/dist/lib/executors/executor-factory.d.ts.map +1 -0
  79. package/dist/lib/executors/executor-factory.js +27 -0
  80. package/dist/lib/executors/gemini-executor.d.ts +9 -0
  81. package/dist/lib/executors/gemini-executor.d.ts.map +1 -0
  82. package/dist/lib/executors/gemini-executor.js +67 -0
  83. package/dist/lib/executors/kilo-executor.d.ts +9 -0
  84. package/dist/lib/executors/kilo-executor.d.ts.map +1 -0
  85. package/dist/lib/executors/kilo-executor.js +69 -0
  86. package/dist/lib/executors/opencode-executor.d.ts +9 -0
  87. package/dist/lib/executors/opencode-executor.d.ts.map +1 -0
  88. package/dist/lib/executors/opencode-executor.js +67 -0
  89. package/dist/lib/git-utils.d.ts +88 -0
  90. package/dist/lib/git-utils.d.ts.map +1 -0
  91. package/dist/lib/git-utils.js +242 -0
  92. package/dist/lib/hooks.d.ts +73 -0
  93. package/dist/lib/hooks.d.ts.map +1 -0
  94. package/dist/lib/hooks.js +62 -0
  95. package/dist/lib/index.d.ts +100 -0
  96. package/dist/lib/index.d.ts.map +1 -0
  97. package/dist/lib/index.js +143 -0
  98. package/dist/lib/logger.d.ts +20 -0
  99. package/dist/lib/logger.d.ts.map +1 -0
  100. package/dist/lib/logger.js +32 -0
  101. package/dist/lib/notifications.d.ts +7 -0
  102. package/dist/lib/notifications.d.ts.map +1 -0
  103. package/dist/lib/notifications.js +81 -0
  104. package/dist/lib/prompt-builder.d.ts +70 -0
  105. package/dist/lib/prompt-builder.d.ts.map +1 -0
  106. package/dist/lib/prompt-builder.js +344 -0
  107. package/dist/lib/prompt-registry.d.ts +22 -0
  108. package/dist/lib/prompt-registry.d.ts.map +1 -0
  109. package/dist/lib/prompt-registry.js +409 -0
  110. package/dist/lib/provider-defaults.json +32 -0
  111. package/dist/lib/storage/file-system.d.ts +57 -0
  112. package/dist/lib/storage/file-system.d.ts.map +1 -0
  113. package/dist/lib/storage/file-system.js +638 -0
  114. package/dist/lib/storage/storage-callbacks.d.ts +17 -0
  115. package/dist/lib/storage/storage-callbacks.d.ts.map +1 -0
  116. package/dist/lib/storage/storage-callbacks.js +94 -0
  117. package/dist/lib/storage/types.d.ts +43 -0
  118. package/dist/lib/storage/types.d.ts.map +1 -0
  119. package/dist/lib/storage/types.js +2 -0
  120. package/dist/lib/task-execution-core.d.ts +7 -0
  121. package/dist/lib/task-execution-core.d.ts.map +1 -0
  122. package/dist/lib/task-execution-core.js +381 -0
  123. package/dist/lib/task-execution.d.ts +7 -0
  124. package/dist/lib/task-execution.d.ts.map +1 -0
  125. package/dist/lib/task-execution.js +40 -0
  126. package/dist/lib/task-loop-execution.d.ts +7 -0
  127. package/dist/lib/task-loop-execution.d.ts.map +1 -0
  128. package/dist/lib/task-loop-execution.js +156 -0
  129. package/dist/lib/task-planning.d.ts +29 -0
  130. package/dist/lib/task-planning.d.ts.map +1 -0
  131. package/dist/lib/task-planning.js +103 -0
  132. package/dist/lib/task-review.d.ts +27 -0
  133. package/dist/lib/task-review.d.ts.map +1 -0
  134. package/dist/lib/task-review.js +103 -0
  135. package/dist/lib/validation.d.ts +26 -0
  136. package/dist/lib/validation.d.ts.map +1 -0
  137. package/dist/lib/validation.js +98 -0
  138. package/dist/prompts/documentation-detection.d.ts +2 -0
  139. package/dist/prompts/documentation-detection.d.ts.map +1 -0
  140. package/dist/prompts/documentation-detection.js +24 -0
  141. package/dist/prompts/documentation-recap.d.ts +3 -0
  142. package/dist/prompts/documentation-recap.d.ts.map +1 -0
  143. package/dist/prompts/documentation-recap.js +13 -0
  144. package/dist/prompts/index.d.ts +15 -0
  145. package/dist/prompts/index.d.ts.map +1 -0
  146. package/dist/prompts/index.js +30 -0
  147. package/dist/prompts/prd-combination.d.ts +2 -0
  148. package/dist/prompts/prd-combination.d.ts.map +1 -0
  149. package/dist/prompts/prd-combination.js +35 -0
  150. package/dist/prompts/prd-generation.d.ts +2 -0
  151. package/dist/prompts/prd-generation.d.ts.map +1 -0
  152. package/dist/prompts/prd-generation.js +49 -0
  153. package/dist/prompts/prd-parsing.d.ts +3 -0
  154. package/dist/prompts/prd-parsing.d.ts.map +1 -0
  155. package/dist/prompts/prd-parsing.js +172 -0
  156. package/dist/prompts/prd-question-answer.d.ts +3 -0
  157. package/dist/prompts/prd-question-answer.d.ts.map +1 -0
  158. package/dist/prompts/prd-question-answer.js +27 -0
  159. package/dist/prompts/prd-question.d.ts +3 -0
  160. package/dist/prompts/prd-question.d.ts.map +1 -0
  161. package/dist/prompts/prd-question.js +40 -0
  162. package/dist/prompts/prd-rework.d.ts +3 -0
  163. package/dist/prompts/prd-rework.d.ts.map +1 -0
  164. package/dist/prompts/prd-rework.js +81 -0
  165. package/dist/prompts/prd-suggest-stack.d.ts +3 -0
  166. package/dist/prompts/prd-suggest-stack.d.ts.map +1 -0
  167. package/dist/prompts/prd-suggest-stack.js +99 -0
  168. package/dist/prompts/task-breakdown.d.ts +3 -0
  169. package/dist/prompts/task-breakdown.d.ts.map +1 -0
  170. package/dist/prompts/task-breakdown.js +151 -0
  171. package/dist/prompts/task-enhancement.d.ts +3 -0
  172. package/dist/prompts/task-enhancement.d.ts.map +1 -0
  173. package/dist/prompts/task-enhancement.js +140 -0
  174. package/dist/prompts/task-execution.d.ts +3 -0
  175. package/dist/prompts/task-execution.d.ts.map +1 -0
  176. package/dist/prompts/task-execution.js +24 -0
  177. package/dist/prompts/task-planning.d.ts +3 -0
  178. package/dist/prompts/task-planning.d.ts.map +1 -0
  179. package/dist/prompts/task-planning.js +66 -0
  180. package/dist/prompts/workflow-assistance.d.ts +32 -0
  181. package/dist/prompts/workflow-assistance.d.ts.map +1 -0
  182. package/dist/prompts/workflow-assistance.js +130 -0
  183. package/dist/prompts/workflow-prompts.d.ts +9 -0
  184. package/dist/prompts/workflow-prompts.d.ts.map +1 -0
  185. package/dist/prompts/workflow-prompts.js +93 -0
  186. package/dist/services/benchmark.d.ts +26 -0
  187. package/dist/services/benchmark.d.ts.map +1 -0
  188. package/dist/services/benchmark.js +343 -0
  189. package/dist/services/prd.d.ts +136 -0
  190. package/dist/services/prd.d.ts.map +1 -0
  191. package/dist/services/prd.js +550 -0
  192. package/dist/services/tasks.d.ts +388 -0
  193. package/dist/services/tasks.d.ts.map +1 -0
  194. package/dist/services/tasks.js +1150 -0
  195. package/dist/services/workflow-ai-assistant.d.ts +74 -0
  196. package/dist/services/workflow-ai-assistant.d.ts.map +1 -0
  197. package/dist/services/workflow-ai-assistant.js +175 -0
  198. package/dist/services/workflow-benchmark.d.ts +34 -0
  199. package/dist/services/workflow-benchmark.d.ts.map +1 -0
  200. package/dist/services/workflow-benchmark.js +318 -0
  201. package/dist/services/workflow.d.ts +107 -0
  202. package/dist/services/workflow.d.ts.map +1 -0
  203. package/dist/services/workflow.js +580 -0
  204. package/dist/test/hooks.test.d.ts +2 -0
  205. package/dist/test/hooks.test.d.ts.map +1 -0
  206. package/dist/test/hooks.test.js +67 -0
  207. package/dist/test/integration/callbacks.test.d.ts +2 -0
  208. package/dist/test/integration/callbacks.test.d.ts.map +1 -0
  209. package/dist/test/integration/callbacks.test.js +64 -0
  210. package/dist/test/lib/ai-service/task-operations.test.d.ts +2 -0
  211. package/dist/test/lib/ai-service/task-operations.test.d.ts.map +1 -0
  212. package/dist/test/lib/ai-service/task-operations.test.js +362 -0
  213. package/dist/test/lib/config.test.d.ts +2 -0
  214. package/dist/test/lib/config.test.d.ts.map +1 -0
  215. package/dist/test/lib/config.test.js +128 -0
  216. package/dist/test/lib/git-utils.test.d.ts +2 -0
  217. package/dist/test/lib/git-utils.test.d.ts.map +1 -0
  218. package/dist/test/lib/git-utils.test.js +168 -0
  219. package/dist/test/mocks/mock-ai-operations.d.ts +15 -0
  220. package/dist/test/mocks/mock-ai-operations.d.ts.map +1 -0
  221. package/dist/test/mocks/mock-ai-operations.js +107 -0
  222. package/dist/test/mocks/mock-context-builder.d.ts +10 -0
  223. package/dist/test/mocks/mock-context-builder.d.ts.map +1 -0
  224. package/dist/test/mocks/mock-context-builder.js +81 -0
  225. package/dist/test/mocks/mock-model-provider.d.ts +7 -0
  226. package/dist/test/mocks/mock-model-provider.d.ts.map +1 -0
  227. package/dist/test/mocks/mock-model-provider.js +21 -0
  228. package/dist/test/mocks/mock-service-factory.d.ts +11 -0
  229. package/dist/test/mocks/mock-service-factory.d.ts.map +1 -0
  230. package/dist/test/mocks/mock-service-factory.js +61 -0
  231. package/dist/test/mocks/mock-storage.d.ts +50 -0
  232. package/dist/test/mocks/mock-storage.d.ts.map +1 -0
  233. package/dist/test/mocks/mock-storage.js +145 -0
  234. package/dist/test/model-parsing.test.d.ts +2 -0
  235. package/dist/test/model-parsing.test.d.ts.map +1 -0
  236. package/dist/test/model-parsing.test.js +73 -0
  237. package/dist/test/services/task-service.test.d.ts +2 -0
  238. package/dist/test/services/task-service.test.d.ts.map +1 -0
  239. package/dist/test/services/task-service.test.js +459 -0
  240. package/dist/test/storage.test.d.ts +2 -0
  241. package/dist/test/storage.test.d.ts.map +1 -0
  242. package/dist/test/storage.test.js +207 -0
  243. package/dist/test/task-loop-git.test.d.ts +2 -0
  244. package/dist/test/task-loop-git.test.d.ts.map +1 -0
  245. package/dist/test/task-loop-git.test.js +95 -0
  246. package/dist/test/test-mock-setup.d.ts +26 -0
  247. package/dist/test/test-mock-setup.d.ts.map +1 -0
  248. package/dist/test/test-mock-setup.js +41 -0
  249. package/dist/test/test-setup.d.ts +9 -0
  250. package/dist/test/test-setup.d.ts.map +1 -0
  251. package/dist/test/test-setup.js +44 -0
  252. package/dist/test/test-utils.d.ts +22 -0
  253. package/dist/test/test-utils.d.ts.map +1 -0
  254. package/dist/test/test-utils.js +37 -0
  255. package/dist/test/utils/ai-operation-utility.test.d.ts +2 -0
  256. package/dist/test/utils/ai-operation-utility.test.d.ts.map +1 -0
  257. package/dist/test/utils/ai-operation-utility.test.js +290 -0
  258. package/dist/test/utils/error-handling.test.d.ts +2 -0
  259. package/dist/test/utils/error-handling.test.d.ts.map +1 -0
  260. package/dist/test/utils/error-handling.test.js +231 -0
  261. package/dist/test/utils/file-utils.test.d.ts +2 -0
  262. package/dist/test/utils/file-utils.test.d.ts.map +1 -0
  263. package/dist/test/utils/file-utils.test.js +76 -0
  264. package/dist/test/utils/id-generator.test.d.ts +2 -0
  265. package/dist/test/utils/id-generator.test.d.ts.map +1 -0
  266. package/dist/test/utils/id-generator.test.js +41 -0
  267. package/dist/test/utils/model-parser.test.d.ts +2 -0
  268. package/dist/test/utils/model-parser.test.d.ts.map +1 -0
  269. package/dist/test/utils/model-parser.test.js +65 -0
  270. package/dist/test/validation.test.d.ts +2 -0
  271. package/dist/test/validation.test.d.ts.map +1 -0
  272. package/dist/test/validation.test.js +22 -0
  273. package/dist/types/callbacks.d.ts +30 -0
  274. package/dist/types/callbacks.d.ts.map +1 -0
  275. package/dist/types/callbacks.js +2 -0
  276. package/dist/types/index.d.ts +435 -0
  277. package/dist/types/index.d.ts.map +1 -0
  278. package/dist/types/index.js +30 -0
  279. package/dist/types/mcp.d.ts +3 -0
  280. package/dist/types/mcp.d.ts.map +1 -0
  281. package/dist/types/mcp.js +3 -0
  282. package/dist/types/options.d.ts +112 -0
  283. package/dist/types/options.d.ts.map +1 -0
  284. package/dist/types/options.js +2 -0
  285. package/dist/types/results.d.ts +200 -0
  286. package/dist/types/results.d.ts.map +1 -0
  287. package/dist/types/results.js +2 -0
  288. package/dist/types/workflow-options.d.ts +82 -0
  289. package/dist/types/workflow-options.d.ts.map +1 -0
  290. package/dist/types/workflow-options.js +2 -0
  291. package/dist/types/workflow-results.d.ts +82 -0
  292. package/dist/types/workflow-results.d.ts.map +1 -0
  293. package/dist/types/workflow-results.js +2 -0
  294. package/dist/utils/ai-config-builder.d.ts +14 -0
  295. package/dist/utils/ai-config-builder.d.ts.map +1 -0
  296. package/dist/utils/ai-config-builder.js +22 -0
  297. package/dist/utils/ai-operation-utility.d.ts +142 -0
  298. package/dist/utils/ai-operation-utility.d.ts.map +1 -0
  299. package/dist/utils/ai-operation-utility.js +303 -0
  300. package/dist/utils/ai-service-factory.d.ts +34 -0
  301. package/dist/utils/ai-service-factory.d.ts.map +1 -0
  302. package/dist/utils/ai-service-factory.js +99 -0
  303. package/dist/utils/error-utils.d.ts +70 -0
  304. package/dist/utils/error-utils.d.ts.map +1 -0
  305. package/dist/utils/error-utils.js +104 -0
  306. package/dist/utils/file-utils.d.ts +107 -0
  307. package/dist/utils/file-utils.d.ts.map +1 -0
  308. package/dist/utils/file-utils.js +171 -0
  309. package/dist/utils/id-generator.d.ts +92 -0
  310. package/dist/utils/id-generator.d.ts.map +1 -0
  311. package/dist/utils/id-generator.js +146 -0
  312. package/dist/utils/metadata-utils.d.ts +40 -0
  313. package/dist/utils/metadata-utils.d.ts.map +1 -0
  314. package/dist/utils/metadata-utils.js +43 -0
  315. package/dist/utils/model-executor-parser.d.ts +38 -0
  316. package/dist/utils/model-executor-parser.d.ts.map +1 -0
  317. package/dist/utils/model-executor-parser.js +69 -0
  318. package/dist/utils/model-parser.d.ts +6 -0
  319. package/dist/utils/model-parser.d.ts.map +1 -0
  320. package/dist/utils/model-parser.js +49 -0
  321. package/dist/utils/stack-formatter.d.ts +12 -0
  322. package/dist/utils/stack-formatter.d.ts.map +1 -0
  323. package/dist/utils/stack-formatter.js +36 -0
  324. package/dist/utils/storage-utils.d.ts +49 -0
  325. package/dist/utils/storage-utils.d.ts.map +1 -0
  326. package/dist/utils/storage-utils.js +80 -0
  327. package/dist/utils/streaming-utils.d.ts +38 -0
  328. package/dist/utils/streaming-utils.d.ts.map +1 -0
  329. package/dist/utils/streaming-utils.js +64 -0
  330. package/dist/utils/task-o-matic-error.d.ts +206 -0
  331. package/dist/utils/task-o-matic-error.d.ts.map +1 -0
  332. package/dist/utils/task-o-matic-error.js +304 -0
  333. package/package.json +40 -0
  334. package/src/index.ts +36 -0
  335. package/src/lib/ai-service/ai-operations.ts +310 -0
  336. package/src/lib/ai-service/base-operations.ts +139 -0
  337. package/src/lib/ai-service/documentation-operations.ts +438 -0
  338. package/src/lib/ai-service/filesystem-tools.ts +73 -0
  339. package/src/lib/ai-service/gemini-proxy.ts.bak +52 -0
  340. package/src/lib/ai-service/json-parser.ts +203 -0
  341. package/src/lib/ai-service/mcp-client.ts +54 -0
  342. package/src/lib/ai-service/model-provider.ts +192 -0
  343. package/src/lib/ai-service/prd-operations.ts +854 -0
  344. package/src/lib/ai-service/research-tools.ts +207 -0
  345. package/src/lib/ai-service/retry-handler.ts +89 -0
  346. package/src/lib/ai-service/task-operations.ts +342 -0
  347. package/src/lib/benchmark/registry.ts +307 -0
  348. package/src/lib/benchmark/runner.ts +190 -0
  349. package/src/lib/benchmark/storage.ts +140 -0
  350. package/src/lib/benchmark/types.ts +121 -0
  351. package/src/lib/better-t-stack-cli.ts +524 -0
  352. package/src/lib/bootstrap/cli-bootstrap.ts +397 -0
  353. package/src/lib/bootstrap/index.ts +2 -0
  354. package/src/lib/bootstrap/medusa-bootstrap.ts +261 -0
  355. package/src/lib/config-validation.ts +278 -0
  356. package/src/lib/config.ts +435 -0
  357. package/src/lib/context-builder.ts +383 -0
  358. package/src/lib/executors/claude-code-executor.ts +83 -0
  359. package/src/lib/executors/codex-executor.ts +85 -0
  360. package/src/lib/executors/executor-factory.ts +28 -0
  361. package/src/lib/executors/gemini-executor.ts +80 -0
  362. package/src/lib/executors/kilo-executor.ts +83 -0
  363. package/src/lib/executors/opencode-executor.ts +81 -0
  364. package/src/lib/git-utils.ts +334 -0
  365. package/src/lib/hooks.ts +121 -0
  366. package/src/lib/index.ts +166 -0
  367. package/src/lib/logger.ts +43 -0
  368. package/src/lib/notifications.ts +103 -0
  369. package/src/lib/prompt-builder.ts +471 -0
  370. package/src/lib/prompt-registry.ts +491 -0
  371. package/src/lib/provider-defaults.json +32 -0
  372. package/src/lib/storage/file-system.ts +864 -0
  373. package/src/lib/storage/storage-callbacks.ts +120 -0
  374. package/src/lib/storage/types.ts +58 -0
  375. package/src/lib/task-execution-core.ts +591 -0
  376. package/src/lib/task-execution.ts +59 -0
  377. package/src/lib/task-loop-execution.ts +214 -0
  378. package/src/lib/task-planning.ts +157 -0
  379. package/src/lib/task-review.ts +138 -0
  380. package/src/lib/validation.ts +140 -0
  381. package/src/prompts/documentation-detection.ts +21 -0
  382. package/src/prompts/documentation-recap.ts +11 -0
  383. package/src/prompts/index.ts +14 -0
  384. package/src/prompts/prd-combination.ts +32 -0
  385. package/src/prompts/prd-generation.ts +46 -0
  386. package/src/prompts/prd-parsing.ts +170 -0
  387. package/src/prompts/prd-question-answer.ts +25 -0
  388. package/src/prompts/prd-question.ts +38 -0
  389. package/src/prompts/prd-rework.ts +79 -0
  390. package/src/prompts/prd-suggest-stack.ts +97 -0
  391. package/src/prompts/task-breakdown.ts +149 -0
  392. package/src/prompts/task-enhancement.ts +138 -0
  393. package/src/prompts/task-execution.ts +22 -0
  394. package/src/prompts/task-planning.ts +64 -0
  395. package/src/prompts/workflow-assistance.ts +151 -0
  396. package/src/prompts/workflow-prompts.ts +97 -0
  397. package/src/services/benchmark.ts +433 -0
  398. package/src/services/prd.ts +845 -0
  399. package/src/services/tasks.ts +1515 -0
  400. package/src/services/workflow-ai-assistant.ts +298 -0
  401. package/src/services/workflow-benchmark.ts +339 -0
  402. package/src/services/workflow.ts +779 -0
  403. package/src/test/hooks.test.ts +77 -0
  404. package/src/test/integration/callbacks.test.ts +39 -0
  405. package/src/test/lib/ai-service/task-operations.test.ts +430 -0
  406. package/src/test/lib/config.test.ts +150 -0
  407. package/src/test/lib/git-utils.test.ts +198 -0
  408. package/src/test/mocks/mock-ai-operations.ts +205 -0
  409. package/src/test/mocks/mock-context-builder.ts +84 -0
  410. package/src/test/mocks/mock-model-provider.ts +21 -0
  411. package/src/test/mocks/mock-service-factory.ts +64 -0
  412. package/src/test/mocks/mock-storage.ts +204 -0
  413. package/src/test/model-parsing.test.ts +78 -0
  414. package/src/test/services/task-service.test.ts +551 -0
  415. package/src/test/storage.test.ts +206 -0
  416. package/src/test/task-loop-git.test.ts +142 -0
  417. package/src/test/test-mock-setup.ts +46 -0
  418. package/src/test/test-setup.ts +48 -0
  419. package/src/test/test-utils.ts +45 -0
  420. package/src/test/utils/ai-operation-utility.test.ts +306 -0
  421. package/src/test/utils/error-handling.test.ts +241 -0
  422. package/src/test/utils/file-utils.test.ts +80 -0
  423. package/src/test/utils/id-generator.test.ts +44 -0
  424. package/src/test/utils/model-parser.test.ts +67 -0
  425. package/src/test/validation.test.ts +19 -0
  426. package/src/types/callbacks.ts +14 -0
  427. package/src/types/index.ts +628 -0
  428. package/src/types/mcp.ts +5 -0
  429. package/src/types/options.ts +165 -0
  430. package/src/types/results.ts +216 -0
  431. package/src/types/workflow-options.ts +113 -0
  432. package/src/types/workflow-results.ts +87 -0
  433. package/src/utils/ai-config-builder.ts +33 -0
  434. package/src/utils/ai-operation-utility.ts +380 -0
  435. package/src/utils/ai-service-factory.ts +125 -0
  436. package/src/utils/error-utils.ts +124 -0
  437. package/src/utils/file-utils.ts +197 -0
  438. package/src/utils/id-generator.ts +168 -0
  439. package/src/utils/metadata-utils.ts +48 -0
  440. package/src/utils/model-executor-parser.ts +80 -0
  441. package/src/utils/model-parser.ts +58 -0
  442. package/src/utils/stack-formatter.ts +53 -0
  443. package/src/utils/storage-utils.ts +94 -0
  444. package/src/utils/streaming-utils.ts +91 -0
  445. package/src/utils/task-o-matic-error.ts +393 -0
  446. package/tsconfig.json +20 -0
  447. package/tsconfig.tsbuildinfo +1 -0
@@ -0,0 +1,2 @@
1
+ export declare const PRD_COMBINATION_SYSTEM_PROMPT = "You are a Senior Product Lead tasked with synthesizing multiple Product Requirements Documents (PRDs) into a single, master PRD.\n\nYou will be provided with:\n1. The original product description.\n2. Multiple PRDs generated by different AI models.\n\nYour goal is to create the \"Best of Breed\" Master PRD.\n\nProcess:\n1. Analyze all input PRDs.\n2. Identify the strongest points, most detailed features, and best technical architectural decisions from each.\n3. Resolve any conflicts by choosing the most robust and feasible option.\n4. Merge them into a single, cohesive document following the standard PRD structure.\n\nStructure the Master PRD as follows:\n\n# Master Product Requirements Document\n\n## 1. Overview\n## 2. Objectives\n## 3. Target Audience\n## 4. Features (MVP & Future)\n## 5. Technical Requirements\n## 6. Timeline & Milestones\n## 7. Open Questions / Risks\n\nGuidelines:\n- Do not simply concatenate the documents. Synthesize them.\n- If one PRD has a better database schema and another has better UI/UX flows, combine them.\n- Maintain a consistent tone and voice.\n- Ensure the final document is self-contained and complete.\n";
2
+ //# sourceMappingURL=prd-combination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prd-combination.d.ts","sourceRoot":"","sources":["../../src/prompts/prd-combination.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,yoCA+BzC,CAAC"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRD_COMBINATION_SYSTEM_PROMPT = void 0;
4
+ exports.PRD_COMBINATION_SYSTEM_PROMPT = `You are a Senior Product Lead tasked with synthesizing multiple Product Requirements Documents (PRDs) into a single, master PRD.
5
+
6
+ You will be provided with:
7
+ 1. The original product description.
8
+ 2. Multiple PRDs generated by different AI models.
9
+
10
+ Your goal is to create the "Best of Breed" Master PRD.
11
+
12
+ Process:
13
+ 1. Analyze all input PRDs.
14
+ 2. Identify the strongest points, most detailed features, and best technical architectural decisions from each.
15
+ 3. Resolve any conflicts by choosing the most robust and feasible option.
16
+ 4. Merge them into a single, cohesive document following the standard PRD structure.
17
+
18
+ Structure the Master PRD as follows:
19
+
20
+ # Master Product Requirements Document
21
+
22
+ ## 1. Overview
23
+ ## 2. Objectives
24
+ ## 3. Target Audience
25
+ ## 4. Features (MVP & Future)
26
+ ## 5. Technical Requirements
27
+ ## 6. Timeline & Milestones
28
+ ## 7. Open Questions / Risks
29
+
30
+ Guidelines:
31
+ - Do not simply concatenate the documents. Synthesize them.
32
+ - If one PRD has a better database schema and another has better UI/UX flows, combine them.
33
+ - Maintain a consistent tone and voice.
34
+ - Ensure the final document is self-contained and complete.
35
+ `;
@@ -0,0 +1,2 @@
1
+ export declare const PRD_GENERATION_SYSTEM_PROMPT = "You are an expert Product Manager and Technical Architect. Your goal is to create a comprehensive Product Requirements Document (PRD) based on the user's description.\n\nThe PRD should be detailed, actionable, and structured in Markdown.\n\nStructure the PRD with the following sections:\n\n# Product Requirements Document\n\n## 1. Overview\n- Executive summary of the product\n- Problem statement\n- Value proposition\n\n## 2. Objectives\n- Key goals (Business & Technical)\n- Success metrics (KPIs)\n\n## 3. Target Audience\n- User personas\n- User stories\n\n## 4. Features\n### 4.1 Core Features (MVP)\n- Detailed description of essential features\n- Acceptance criteria for each\n\n### 4.2 Future Features (Post-MVP)\n- Nice-to-have features for later iterations\n\n## 5. Technical Requirements\n- Tech stack recommendations (Frontend, Backend, Database, etc.)\n- System architecture overview\n- Security and Performance requirements\n\n## 6. Timeline & Milestones\n- Rough estimation of phases\n\n## 7. Open Questions / Risks\n- Any ambiguities or potential blockers\n\nGuidelines:\n- Be specific and avoid vague language.\n- Use professional technical terminology.\n- Focus on feasibility and clarity.\n- If the user provides specific technical constraints, adhere to them strictly.\n";
2
+ //# sourceMappingURL=prd-generation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prd-generation.d.ts","sourceRoot":"","sources":["../../src/prompts/prd-generation.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,gxCA6CxC,CAAC"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRD_GENERATION_SYSTEM_PROMPT = void 0;
4
+ exports.PRD_GENERATION_SYSTEM_PROMPT = `You are an expert Product Manager and Technical Architect. Your goal is to create a comprehensive Product Requirements Document (PRD) based on the user's description.
5
+
6
+ The PRD should be detailed, actionable, and structured in Markdown.
7
+
8
+ Structure the PRD with the following sections:
9
+
10
+ # Product Requirements Document
11
+
12
+ ## 1. Overview
13
+ - Executive summary of the product
14
+ - Problem statement
15
+ - Value proposition
16
+
17
+ ## 2. Objectives
18
+ - Key goals (Business & Technical)
19
+ - Success metrics (KPIs)
20
+
21
+ ## 3. Target Audience
22
+ - User personas
23
+ - User stories
24
+
25
+ ## 4. Features
26
+ ### 4.1 Core Features (MVP)
27
+ - Detailed description of essential features
28
+ - Acceptance criteria for each
29
+
30
+ ### 4.2 Future Features (Post-MVP)
31
+ - Nice-to-have features for later iterations
32
+
33
+ ## 5. Technical Requirements
34
+ - Tech stack recommendations (Frontend, Backend, Database, etc.)
35
+ - System architecture overview
36
+ - Security and Performance requirements
37
+
38
+ ## 6. Timeline & Milestones
39
+ - Rough estimation of phases
40
+
41
+ ## 7. Open Questions / Risks
42
+ - Any ambiguities or potential blockers
43
+
44
+ Guidelines:
45
+ - Be specific and avoid vague language.
46
+ - Use professional technical terminology.
47
+ - Focus on feasibility and clarity.
48
+ - If the user provides specific technical constraints, adhere to them strictly.
49
+ `;
@@ -0,0 +1,3 @@
1
+ export declare const PRD_PARSING_PROMPT = "\nYou are an AI assistant specialized in analyzing Product Requirements Documents (PRDs) and generating a structured, logically ordered, dependency-aware and sequenced list of development phases in JSON format.\n\n## \uD83C\uDFD7\uFE0F IMPORTANT: PROJECT INFRASTRUCTURE IS READY\nThis project is **already bootstrapped and configured**. The foundation is complete and ready for development. **DO NOT** create tasks for setting up the basic infrastructure.\n\nAnalyze the provided PRD content and generate an appropriate number of top-level development phases. Each phase should represent 1-3 weeks of focused development work and focus on the most direct and effective way to implement the requirements without unnecessary complexity or overengineering.\n\nIf the complexity or the level of detail of the PRD is high, generate more phases relative to the complexity of the PRD. Let the PRD content determine the appropriate number of phases - there is no fixed target.\n\n## CRITICAL: Task ID and Dependency Format\nYou MUST generate unique task IDs and reference them properly in dependencies:\n\n1. **Task ID Generation**: \n - Each task must have an \"id\" field with simple numeric format: \"1\", \"2\", \"3\", etc.\n - IDs must be sequential starting from \"1\"\n - Each task ID must be unique\n - NO prefixes like \"task-\" - use simple numbers only\n\n2. **Dependency References**:\n - Dependencies MUST reference the exact task IDs (not titles)\n - Use format: [\"1\", \"2\", \"3\"]\n - NEVER use task titles in dependencies\n - Only reference tasks that appear EARLIER in the list\n - Ensure all dependency references are valid\n\n## \uD83D\uDCCB Phase Sizing (1-3 WEEKS per phase):\n- **Small**: 1 week (5-7 days) - Focused module with clear boundaries\n- **Medium**: 2 weeks (8-12 days) - Complex feature with multiple components \n- **Large**: 3 weeks (13-15 days) - Major system with integrations and polish\n\n## \uD83C\uDFAF PHASE EXAMPLES (1-3 WEEKS EACH):\n\u2705 \"User Authentication & Profile Management\" - Complete user system with registration, login, profiles, and security\n\u2705 \"Interactive Map & Location Services\" - Full mapping functionality with search, geolocation, and place markers\n\u2705 \"Rating & Review System\" - Complete rating workflow with reviews, scores, and moderation\n\u2705 \"Content Management System\" - Full CRUD system for managing content with validation and permissions\n\n## \u274C FORBIDDEN MICRO-TASKS (THESE ARE IMPLEMENTATION DETAILS, NOT PHASES):\n- \"Implement API endpoint\" (this is a planning step)\n- \"Build UI component\" (this is a planning step) \n- \"Create database schema\" (this is a planning step)\n- \"Setup authentication\" (this is part of a larger phase)\n\n## \u2705 Guidelines:\n1. Create an appropriate number of phases based on PRD complexity\n2. Each phase should be atomic and focused on a major feature area\n3. Order phases logically - consider dependencies and implementation sequence\n4. Early phases should focus on foundation and core functionality first, then advanced features\n5. Include clear technical considerations for each phase\n6. Set appropriate dependency IDs (a phase can only depend on phases with lower IDs)\n7. Assign effort based on the scope and complexity of work involved\n8. Include detailed implementation guidance in the description\n9. If the PRD contains specific requirements for libraries, frameworks, or tech stacks, STRICTLY ADHERE to these requirements\n10. Focus on filling in any gaps left by the PRD while preserving all explicit requirements\n11. Always aim to provide the most direct path to implementation, avoiding over-engineering\n\n## \u2705 Dependency Validation Rules:\n- Task \"1\" must have no dependencies (it's the first task)\n- Task N can only depend on tasks 1 through (N-1)\n- No circular dependencies allowed\n- No forward references\n- Every task must have a unique sequential ID\n\nFormat your response as JSON:\n{\n \"tasks\": [\n {\n \"id\": \"1\",\n \"title\": \"User Authentication & Security System\",\n \"description\": \"Implement complete user authentication system including registration, login/logout, password reset, session management, security measures, and user profile functionality with proper validation and error handling\",\n \"effort\": \"medium\",\n \"dependencies\": [],\n \"technicalConsiderations\": \"Leverage existing Better-Auth integration and Convex backend for secure user management\"\n },\n {\n \"id\": \"2\", \n \"title\": \"Core Business Data Management\",\n \"description\": \"Set up database schemas, models, and business logic for the main application entities including data validation, relationships, and core CRUD operations\",\n \"effort\": \"medium\", \n \"dependencies\": [\"1\"],\n \"technicalConsiderations\": \"Design efficient Convex schemas with proper indexing and relationships\"\n }\n ]\n}\n\n## Technology Stack\n{STACK_INFO}\n\nPRD to parse:\n{PRD_CONTENT}\n";
2
+ export declare const PRD_PARSING_SYSTEM_PROMPT = "\nYou are an AI assistant specialized in analyzing Product Requirements Documents (PRDs) and generating a structured, logically ordered, dependency-aware and sequenced list of development phases in JSON format.\n\n## CRITICAL INSTRUCTION: Create Appropriate-Sized Phases\nYou MUST generate development phases that represent 1-3 weeks of focused work each. The number of phases should be determined by the PRD complexity, not by arbitrary targets.\n\n## CRITICAL INSTRUCTION: Task ID Generation and Dependencies\nYou MUST generate unique task IDs and use them for dependencies:\n\n1. **Generate Task IDs**: \n - Each task needs an \"id\" field: \"1\", \"2\", \"3\", etc.\n - IDs must be sequential and unique\n - Start with \"1\"\n - NO prefixes like \"task-\" - use simple numbers only\n\n2. **Dependency References**:\n - Use the exact task IDs in dependencies arrays\n - NEVER use task titles\n - Only reference earlier tasks (lower numbers)\n - Validate that all dependency references exist\n\n3. **Required Fields for Each Task**:\n - id: \"N\" format (required)\n - title: string (required)\n - description: string (required)\n - effort: \"small\"|\"medium\"|\"large\" (required - based on 1-3 week duration)\n - dependencies: array of task IDs (required)\n - technicalConsiderations: string (optional)\n\n## Phase Analysis Guidelines:\n1. **Scope Appropriately**: Each phase should represent 1-3 weeks of substantial development work\n2. **Business-Focused**: Phase titles should reflect business value and user-facing features\n3. **Logical Sequencing**: Order phases based on dependencies and implementation priorities\n4. **Complexity-Based**: More complex PRDs should result in more phases, simpler PRDs in fewer phases\n5. **Direct Implementation**: Focus on the most direct path to implementing requirements\n\n## FORBIDDEN MICRO-TASKS (DO NOT CREATE):\n- Individual API endpoints, UI components, database schemas\n- Technical implementation details that belong in planning\n- Tasks that take less than 1 week to complete\n\n## REQUIRED PHASE EXAMPLES (1-3 WEEKS EACH):\n- \"User Authentication & Profile Management\" \u2192 Complete user system\n- \"Interactive Map & Location Services\" \u2192 Full mapping functionality\n- \"Rating & Review System\" \u2192 Complete rating workflow\n- \"Content Management System\" \u2192 Full CRUD for content\n\n## Dependency Validation Rules:\n- Task \"1\" MUST have empty dependencies array: []\n- Task N can only reference tasks 1 through (N-1)\n- No circular dependencies\n- No forward references\n- All dependency references must be valid task IDs\n- Every task must have a unique sequential ID\n- Verify all referenced IDs exist in the tasks array\n\n## Quality Standards:\n- Each phase should be atomic and focused on a major feature area\n- Include detailed implementation guidance in descriptions\n- Consider the existing technology stack and infrastructure\n- Ensure phases build upon each other logically\n- Focus on business value and user-facing outcomes\n\n## Output Validation:\nBefore returning your response, verify:\n1. Every task represents 1-3 weeks of substantial work\n2. Tasks are major phases, not implementation details\n3. Every task has a unique sequential ID (\"1\", \"2\", \"3\", etc.)\n4. All dependency arrays contain valid task IDs (not titles)\n5. No task depends on itself or a later task\n6. Task \"1\" has no dependencies\n7. All referenced task IDs exist in the tasks array\n8. JSON structure is valid and parseable\n9. All required fields are present for each task\n10. The number of tasks is appropriate for the PRD complexity\n\nReturn only valid JSON that can be parsed. Ensure all required fields are present and properly formatted.\n";
3
+ //# sourceMappingURL=prd-parsing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prd-parsing.d.ts","sourceRoot":"","sources":["../../src/prompts/prd-parsing.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,i8JA0F9B,CAAC;AAEF,eAAO,MAAM,yBAAyB,+qHA6ErC,CAAC"}
@@ -0,0 +1,172 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRD_PARSING_SYSTEM_PROMPT = exports.PRD_PARSING_PROMPT = void 0;
4
+ exports.PRD_PARSING_PROMPT = `
5
+ You are an AI assistant specialized in analyzing Product Requirements Documents (PRDs) and generating a structured, logically ordered, dependency-aware and sequenced list of development phases in JSON format.
6
+
7
+ ## 🏗️ IMPORTANT: PROJECT INFRASTRUCTURE IS READY
8
+ This project is **already bootstrapped and configured**. The foundation is complete and ready for development. **DO NOT** create tasks for setting up the basic infrastructure.
9
+
10
+ Analyze the provided PRD content and generate an appropriate number of top-level development phases. Each phase should represent 1-3 weeks of focused development work and focus on the most direct and effective way to implement the requirements without unnecessary complexity or overengineering.
11
+
12
+ If the complexity or the level of detail of the PRD is high, generate more phases relative to the complexity of the PRD. Let the PRD content determine the appropriate number of phases - there is no fixed target.
13
+
14
+ ## CRITICAL: Task ID and Dependency Format
15
+ You MUST generate unique task IDs and reference them properly in dependencies:
16
+
17
+ 1. **Task ID Generation**:
18
+ - Each task must have an "id" field with simple numeric format: "1", "2", "3", etc.
19
+ - IDs must be sequential starting from "1"
20
+ - Each task ID must be unique
21
+ - NO prefixes like "task-" - use simple numbers only
22
+
23
+ 2. **Dependency References**:
24
+ - Dependencies MUST reference the exact task IDs (not titles)
25
+ - Use format: ["1", "2", "3"]
26
+ - NEVER use task titles in dependencies
27
+ - Only reference tasks that appear EARLIER in the list
28
+ - Ensure all dependency references are valid
29
+
30
+ ## 📋 Phase Sizing (1-3 WEEKS per phase):
31
+ - **Small**: 1 week (5-7 days) - Focused module with clear boundaries
32
+ - **Medium**: 2 weeks (8-12 days) - Complex feature with multiple components
33
+ - **Large**: 3 weeks (13-15 days) - Major system with integrations and polish
34
+
35
+ ## 🎯 PHASE EXAMPLES (1-3 WEEKS EACH):
36
+ ✅ "User Authentication & Profile Management" - Complete user system with registration, login, profiles, and security
37
+ ✅ "Interactive Map & Location Services" - Full mapping functionality with search, geolocation, and place markers
38
+ ✅ "Rating & Review System" - Complete rating workflow with reviews, scores, and moderation
39
+ ✅ "Content Management System" - Full CRUD system for managing content with validation and permissions
40
+
41
+ ## ❌ FORBIDDEN MICRO-TASKS (THESE ARE IMPLEMENTATION DETAILS, NOT PHASES):
42
+ - "Implement API endpoint" (this is a planning step)
43
+ - "Build UI component" (this is a planning step)
44
+ - "Create database schema" (this is a planning step)
45
+ - "Setup authentication" (this is part of a larger phase)
46
+
47
+ ## ✅ Guidelines:
48
+ 1. Create an appropriate number of phases based on PRD complexity
49
+ 2. Each phase should be atomic and focused on a major feature area
50
+ 3. Order phases logically - consider dependencies and implementation sequence
51
+ 4. Early phases should focus on foundation and core functionality first, then advanced features
52
+ 5. Include clear technical considerations for each phase
53
+ 6. Set appropriate dependency IDs (a phase can only depend on phases with lower IDs)
54
+ 7. Assign effort based on the scope and complexity of work involved
55
+ 8. Include detailed implementation guidance in the description
56
+ 9. If the PRD contains specific requirements for libraries, frameworks, or tech stacks, STRICTLY ADHERE to these requirements
57
+ 10. Focus on filling in any gaps left by the PRD while preserving all explicit requirements
58
+ 11. Always aim to provide the most direct path to implementation, avoiding over-engineering
59
+
60
+ ## ✅ Dependency Validation Rules:
61
+ - Task "1" must have no dependencies (it's the first task)
62
+ - Task N can only depend on tasks 1 through (N-1)
63
+ - No circular dependencies allowed
64
+ - No forward references
65
+ - Every task must have a unique sequential ID
66
+
67
+ Format your response as JSON:
68
+ {
69
+ "tasks": [
70
+ {
71
+ "id": "1",
72
+ "title": "User Authentication & Security System",
73
+ "description": "Implement complete user authentication system including registration, login/logout, password reset, session management, security measures, and user profile functionality with proper validation and error handling",
74
+ "effort": "medium",
75
+ "dependencies": [],
76
+ "technicalConsiderations": "Leverage existing Better-Auth integration and Convex backend for secure user management"
77
+ },
78
+ {
79
+ "id": "2",
80
+ "title": "Core Business Data Management",
81
+ "description": "Set up database schemas, models, and business logic for the main application entities including data validation, relationships, and core CRUD operations",
82
+ "effort": "medium",
83
+ "dependencies": ["1"],
84
+ "technicalConsiderations": "Design efficient Convex schemas with proper indexing and relationships"
85
+ }
86
+ ]
87
+ }
88
+
89
+ ## Technology Stack
90
+ {STACK_INFO}
91
+
92
+ PRD to parse:
93
+ {PRD_CONTENT}
94
+ `;
95
+ exports.PRD_PARSING_SYSTEM_PROMPT = `
96
+ You are an AI assistant specialized in analyzing Product Requirements Documents (PRDs) and generating a structured, logically ordered, dependency-aware and sequenced list of development phases in JSON format.
97
+
98
+ ## CRITICAL INSTRUCTION: Create Appropriate-Sized Phases
99
+ You MUST generate development phases that represent 1-3 weeks of focused work each. The number of phases should be determined by the PRD complexity, not by arbitrary targets.
100
+
101
+ ## CRITICAL INSTRUCTION: Task ID Generation and Dependencies
102
+ You MUST generate unique task IDs and use them for dependencies:
103
+
104
+ 1. **Generate Task IDs**:
105
+ - Each task needs an "id" field: "1", "2", "3", etc.
106
+ - IDs must be sequential and unique
107
+ - Start with "1"
108
+ - NO prefixes like "task-" - use simple numbers only
109
+
110
+ 2. **Dependency References**:
111
+ - Use the exact task IDs in dependencies arrays
112
+ - NEVER use task titles
113
+ - Only reference earlier tasks (lower numbers)
114
+ - Validate that all dependency references exist
115
+
116
+ 3. **Required Fields for Each Task**:
117
+ - id: "N" format (required)
118
+ - title: string (required)
119
+ - description: string (required)
120
+ - effort: "small"|"medium"|"large" (required - based on 1-3 week duration)
121
+ - dependencies: array of task IDs (required)
122
+ - technicalConsiderations: string (optional)
123
+
124
+ ## Phase Analysis Guidelines:
125
+ 1. **Scope Appropriately**: Each phase should represent 1-3 weeks of substantial development work
126
+ 2. **Business-Focused**: Phase titles should reflect business value and user-facing features
127
+ 3. **Logical Sequencing**: Order phases based on dependencies and implementation priorities
128
+ 4. **Complexity-Based**: More complex PRDs should result in more phases, simpler PRDs in fewer phases
129
+ 5. **Direct Implementation**: Focus on the most direct path to implementing requirements
130
+
131
+ ## FORBIDDEN MICRO-TASKS (DO NOT CREATE):
132
+ - Individual API endpoints, UI components, database schemas
133
+ - Technical implementation details that belong in planning
134
+ - Tasks that take less than 1 week to complete
135
+
136
+ ## REQUIRED PHASE EXAMPLES (1-3 WEEKS EACH):
137
+ - "User Authentication & Profile Management" → Complete user system
138
+ - "Interactive Map & Location Services" → Full mapping functionality
139
+ - "Rating & Review System" → Complete rating workflow
140
+ - "Content Management System" → Full CRUD for content
141
+
142
+ ## Dependency Validation Rules:
143
+ - Task "1" MUST have empty dependencies array: []
144
+ - Task N can only reference tasks 1 through (N-1)
145
+ - No circular dependencies
146
+ - No forward references
147
+ - All dependency references must be valid task IDs
148
+ - Every task must have a unique sequential ID
149
+ - Verify all referenced IDs exist in the tasks array
150
+
151
+ ## Quality Standards:
152
+ - Each phase should be atomic and focused on a major feature area
153
+ - Include detailed implementation guidance in descriptions
154
+ - Consider the existing technology stack and infrastructure
155
+ - Ensure phases build upon each other logically
156
+ - Focus on business value and user-facing outcomes
157
+
158
+ ## Output Validation:
159
+ Before returning your response, verify:
160
+ 1. Every task represents 1-3 weeks of substantial work
161
+ 2. Tasks are major phases, not implementation details
162
+ 3. Every task has a unique sequential ID ("1", "2", "3", etc.)
163
+ 4. All dependency arrays contain valid task IDs (not titles)
164
+ 5. No task depends on itself or a later task
165
+ 6. Task "1" has no dependencies
166
+ 7. All referenced task IDs exist in the tasks array
167
+ 8. JSON structure is valid and parseable
168
+ 9. All required fields are present for each task
169
+ 10. The number of tasks is appropriate for the PRD complexity
170
+
171
+ Return only valid JSON that can be parsed. Ensure all required fields are present and properly formatted.
172
+ `;
@@ -0,0 +1,3 @@
1
+ export declare const PRD_QUESTION_ANSWER_PROMPT = "You are a product expert helping to clarify a PRD.\n\nPRD Content:\n{PRD_CONTENT}{CONTEXT_TEXT}\n\nPlease answer the following questions based on the PRD and context:\n\n{QUESTIONS_TEXT}\n\nProvide thoughtful, specific answers that will help refine the PRD.\nFormat your response as JSON with the following structure:\n{\n \"answers\": {\n \"1\": \"answer to question 1\",\n \"2\": \"answer to question 2\",\n ...\n }\n}";
2
+ export declare const PRD_QUESTION_ANSWER_SYSTEM_PROMPT = "You are a product expert analyzing PRDs and answering clarifying questions.\nYour answers should be:\n- Specific and actionable\n- Based on the PRD content and project context\n- Helpful for refining the PRD\n- Formatted as JSON";
3
+ //# sourceMappingURL=prd-question-answer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prd-question-answer.d.ts","sourceRoot":"","sources":["../../src/prompts/prd-question-answer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,obAiBrC,CAAC;AAEH,eAAO,MAAM,iCAAiC,yOAK1B,CAAC"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRD_QUESTION_ANSWER_SYSTEM_PROMPT = exports.PRD_QUESTION_ANSWER_PROMPT = void 0;
4
+ exports.PRD_QUESTION_ANSWER_PROMPT = `You are a product expert helping to clarify a PRD.
5
+
6
+ PRD Content:
7
+ {PRD_CONTENT}{CONTEXT_TEXT}
8
+
9
+ Please answer the following questions based on the PRD and context:
10
+
11
+ {QUESTIONS_TEXT}
12
+
13
+ Provide thoughtful, specific answers that will help refine the PRD.
14
+ Format your response as JSON with the following structure:
15
+ {
16
+ "answers": {
17
+ "1": "answer to question 1",
18
+ "2": "answer to question 2",
19
+ ...
20
+ }
21
+ }`;
22
+ exports.PRD_QUESTION_ANSWER_SYSTEM_PROMPT = `You are a product expert analyzing PRDs and answering clarifying questions.
23
+ Your answers should be:
24
+ - Specific and actionable
25
+ - Based on the PRD content and project context
26
+ - Helpful for refining the PRD
27
+ - Formatted as JSON`;
@@ -0,0 +1,3 @@
1
+ export declare const PRD_QUESTION_PROMPT = "\nAnalyze this PRD and generate meaningful clarifying questions to help improve its quality and completeness.\n\n## Current PRD:\n{PRD_CONTENT}\n\n## Project Technology Stack:\n{STACK_INFO}\n\nIdentify ambiguities, missing requirements, technical gaps, or potential conflicts.\nFocus on questions that will help:\n- Clarify user intent\n- Define edge cases\n- Specify technical implementation details aligned with the stack\n- Resolve potential architectural issues\n\nReturn a JSON object with a \"questions\" array, where each item is a string containing a question.\n";
2
+ export declare const PRD_QUESTION_SYSTEM_PROMPT = "\nYou are an expert Product Manager and Technical Architect. Your goal is to analyze Product Requirements Documents (PRDs) and ask insightful questions to clarify requirements and ensure technical feasibility.\n\nOutput Format:\nYou must return a valid JSON object with the following structure:\n{\n \"questions\": [\n \"Question 1?\",\n \"Question 2?\",\n ...\n ]\n}\n\nGuidelines:\n1. Ask 3-5 most critical questions. Do not overwhelm the user.\n2. Focus on \"what\" and \"why\" rather than \"how\" unless it affects feasibility.\n3. Be specific and reference parts of the PRD.\n4. Consider the technology stack constraints.\n";
3
+ //# sourceMappingURL=prd-question.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prd-question.d.ts","sourceRoot":"","sources":["../../src/prompts/prd-question.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,+jBAiB/B,CAAC;AAEF,eAAO,MAAM,0BAA0B,ooBAkBtC,CAAC"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRD_QUESTION_SYSTEM_PROMPT = exports.PRD_QUESTION_PROMPT = void 0;
4
+ exports.PRD_QUESTION_PROMPT = `
5
+ Analyze this PRD and generate meaningful clarifying questions to help improve its quality and completeness.
6
+
7
+ ## Current PRD:
8
+ {PRD_CONTENT}
9
+
10
+ ## Project Technology Stack:
11
+ {STACK_INFO}
12
+
13
+ Identify ambiguities, missing requirements, technical gaps, or potential conflicts.
14
+ Focus on questions that will help:
15
+ - Clarify user intent
16
+ - Define edge cases
17
+ - Specify technical implementation details aligned with the stack
18
+ - Resolve potential architectural issues
19
+
20
+ Return a JSON object with a "questions" array, where each item is a string containing a question.
21
+ `;
22
+ exports.PRD_QUESTION_SYSTEM_PROMPT = `
23
+ You are an expert Product Manager and Technical Architect. Your goal is to analyze Product Requirements Documents (PRDs) and ask insightful questions to clarify requirements and ensure technical feasibility.
24
+
25
+ Output Format:
26
+ You must return a valid JSON object with the following structure:
27
+ {
28
+ "questions": [
29
+ "Question 1?",
30
+ "Question 2?",
31
+ ...
32
+ ]
33
+ }
34
+
35
+ Guidelines:
36
+ 1. Ask 3-5 most critical questions. Do not overwhelm the user.
37
+ 2. Focus on "what" and "why" rather than "how" unless it affects feasibility.
38
+ 3. Be specific and reference parts of the PRD.
39
+ 4. Consider the technology stack constraints.
40
+ `;
@@ -0,0 +1,3 @@
1
+ export declare const PRD_REWORK_PROMPT = "\nImprove this PRD based on the following feedback and the existing project technology stack:\n\n## User Feedback:\n{USER_FEEDBACK}\n\n## Project Technology Stack:\n{STACK_INFO}\n\n## Current PRD:\n{PRD_CONTENT}\n\nProvide an improved version of the PRD that:\n- Addresses all the feedback points\n- Maintains the core requirements and structure\n- Improves clarity and completeness\n- Fills in any gaps identified by the feedback\n- Enhances technical specifications to align with the existing stack\n- Maintains professional tone and formatting\n- Leverages the existing technology stack capabilities\n- Considers project structure and architecture patterns\n- Ensures requirements are implementable with the current tools and frameworks\n\n## Stack-Aware Considerations:\n- Align technical requirements with the existing technology stack\n- Consider authentication system capabilities and patterns\n- Leverage database/ORM setup for data requirements\n- Utilize addon capabilities where relevant\n- Ensure compatibility with the current project architecture\n- Consider package manager and deployment constraints\n\nFocus on making the PRD more actionable and comprehensive while preserving the original intent and ensuring it's well-suited for the existing technology stack.\n";
2
+ export declare const PRD_REWORK_SYSTEM_PROMPT = "\nYou are an expert product manager and technical writer with deep expertise in modern web development stacks. Your role is to improve Product Requirements Documents based on user feedback while ensuring alignment with the existing project technology stack.\n\n## Stack-Aware Improvement Guidelines:\n\n### 1. **Feedback Integration**\n- Address all feedback points thoroughly and specifically\n- Ensure improvements don't conflict with existing architecture\n- Maintain the original document's structure and intent\n\n### 2. **Technical Stack Alignment**\n- Enhance technical specifications to match the existing stack capabilities\n- Ensure requirements are implementable with current tools and frameworks\n- Leverage existing patterns and conventions in the stack\n- Consider limitations and constraints of the current technology choices\n\n### 3. **Architecture Considerations**\n- Align with project structure and organization patterns\n- Consider authentication, database, and deployment patterns\n- Ensure compatibility with existing integrations and addons\n- Maintain consistency with established development workflows\n\n### 4. **Quality Enhancement**\n- Enhance clarity and completeness with stack-specific details\n- Add missing technical details where appropriate\n- Improve formatting and organization\n- Ensure all requirements are actionable and testable\n- Maintain professional documentation standards\n\n### 5. **Implementation Feasibility**\n- Preserve the core scope and objectives\n- Ensure requirements are realistic for the current stack\n- Consider development effort and complexity\n- Account for existing infrastructure and tooling\n\n## Stack-Specific Focus Areas:\n- Frontend framework patterns and capabilities\n- Backend API and service architecture\n- Authentication and authorization flows\n- Data modeling and persistence patterns\n- Deployment and operational considerations\n- Integration with existing addons and tools\n\nReturn the improved PRD in a well-structured format that's ready for development teams working within the specified technology stack.\n";
3
+ //# sourceMappingURL=prd-rework.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prd-rework.d.ts","sourceRoot":"","sources":["../../src/prompts/prd-rework.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,qwCAgC7B,CAAC;AAEF,eAAO,MAAM,wBAAwB,mjEA4CpC,CAAC"}
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRD_REWORK_SYSTEM_PROMPT = exports.PRD_REWORK_PROMPT = void 0;
4
+ exports.PRD_REWORK_PROMPT = `
5
+ Improve this PRD based on the following feedback and the existing project technology stack:
6
+
7
+ ## User Feedback:
8
+ {USER_FEEDBACK}
9
+
10
+ ## Project Technology Stack:
11
+ {STACK_INFO}
12
+
13
+ ## Current PRD:
14
+ {PRD_CONTENT}
15
+
16
+ Provide an improved version of the PRD that:
17
+ - Addresses all the feedback points
18
+ - Maintains the core requirements and structure
19
+ - Improves clarity and completeness
20
+ - Fills in any gaps identified by the feedback
21
+ - Enhances technical specifications to align with the existing stack
22
+ - Maintains professional tone and formatting
23
+ - Leverages the existing technology stack capabilities
24
+ - Considers project structure and architecture patterns
25
+ - Ensures requirements are implementable with the current tools and frameworks
26
+
27
+ ## Stack-Aware Considerations:
28
+ - Align technical requirements with the existing technology stack
29
+ - Consider authentication system capabilities and patterns
30
+ - Leverage database/ORM setup for data requirements
31
+ - Utilize addon capabilities where relevant
32
+ - Ensure compatibility with the current project architecture
33
+ - Consider package manager and deployment constraints
34
+
35
+ Focus on making the PRD more actionable and comprehensive while preserving the original intent and ensuring it's well-suited for the existing technology stack.
36
+ `;
37
+ exports.PRD_REWORK_SYSTEM_PROMPT = `
38
+ You are an expert product manager and technical writer with deep expertise in modern web development stacks. Your role is to improve Product Requirements Documents based on user feedback while ensuring alignment with the existing project technology stack.
39
+
40
+ ## Stack-Aware Improvement Guidelines:
41
+
42
+ ### 1. **Feedback Integration**
43
+ - Address all feedback points thoroughly and specifically
44
+ - Ensure improvements don't conflict with existing architecture
45
+ - Maintain the original document's structure and intent
46
+
47
+ ### 2. **Technical Stack Alignment**
48
+ - Enhance technical specifications to match the existing stack capabilities
49
+ - Ensure requirements are implementable with current tools and frameworks
50
+ - Leverage existing patterns and conventions in the stack
51
+ - Consider limitations and constraints of the current technology choices
52
+
53
+ ### 3. **Architecture Considerations**
54
+ - Align with project structure and organization patterns
55
+ - Consider authentication, database, and deployment patterns
56
+ - Ensure compatibility with existing integrations and addons
57
+ - Maintain consistency with established development workflows
58
+
59
+ ### 4. **Quality Enhancement**
60
+ - Enhance clarity and completeness with stack-specific details
61
+ - Add missing technical details where appropriate
62
+ - Improve formatting and organization
63
+ - Ensure all requirements are actionable and testable
64
+ - Maintain professional documentation standards
65
+
66
+ ### 5. **Implementation Feasibility**
67
+ - Preserve the core scope and objectives
68
+ - Ensure requirements are realistic for the current stack
69
+ - Consider development effort and complexity
70
+ - Account for existing infrastructure and tooling
71
+
72
+ ## Stack-Specific Focus Areas:
73
+ - Frontend framework patterns and capabilities
74
+ - Backend API and service architecture
75
+ - Authentication and authorization flows
76
+ - Data modeling and persistence patterns
77
+ - Deployment and operational considerations
78
+ - Integration with existing addons and tools
79
+
80
+ Return the improved PRD in a well-structured format that's ready for development teams working within the specified technology stack.
81
+ `;
@@ -0,0 +1,3 @@
1
+ export declare const PRD_SUGGEST_STACK_SYSTEM_PROMPT = "You are an expert Software Architect specializing in modern full-stack development. Your goal is to analyze a Product Requirements Document (PRD) and suggest the optimal technology stack using the Better-T-Stack framework.\n\nYou must respond with valid JSON only. No markdown, no explanations outside the JSON structure.\n\nResponse Format:\n{\n \"config\": {\n \"projectName\": \"string (kebab-case)\",\n \"frontend\": \"string or string[] for multiple\",\n \"backend\": \"string\",\n \"database\": \"string\",\n \"orm\": \"string\",\n \"api\": \"string\",\n \"auth\": \"string\",\n \"payments\": \"string\",\n \"dbSetup\": \"string\",\n \"runtime\": \"string\",\n \"packageManager\": \"string\",\n \"git\": true,\n \"install\": true,\n \"webDeploy\": \"string\",\n \"serverDeploy\": \"string\",\n \"addons\": [\"array of strings\"],\n \"examples\": [\"array of strings\"]\n },\n \"reasoning\": \"string explaining your choices\"\n}\n\nGuidelines:\n- Choose technologies that best match the PRD requirements\n- Consider scalability, maintainability, and developer experience\n- Prefer modern, well-supported technologies\n- Only use values from the allowed options listed in the prompt\n- If a category is not needed, use \"none\"\n- Be specific about WHY you chose each technology\n";
2
+ export declare const PRD_SUGGEST_STACK_PROMPT = "Analyze the following PRD and suggest the optimal technology stack.\n\n## Available Stack Options\n\n### Frontend (choose one or more)\n- Web: `tanstack-router`, `react-router`, `tanstack-start`, `next`, `nuxt`, `svelte`, `solid`\n- Native: `native-bare`, `native-uniwind`, `native-unistyles`\n- Other: `cli`, `medusa`, `none`\n\n### Backend\n`hono`, `express`, `fastify`, `elysia`, `convex`, `self`, `none`\n\n### Database\n`sqlite`, `postgres`, `mysql`, `mongodb`, `none`\n\n### ORM\n`drizzle`, `prisma`, `mongoose`, `none`\n\n### API Layer\n`trpc`, `orpc`, `none`\n\n### Authentication\n`better-auth`, `clerk`, `none`\n\n### Payments\n`polar`, `none`\n\n### Database Setup/Hosting\n`turso`, `neon`, `prisma-postgres`, `planetscale`, `mongodb-atlas`, `supabase`, `d1`, `docker`, `none`\n\n### Runtime\n`bun`, `node`, `workers`, `none`\n\n### Package Manager\n`npm`, `pnpm`, `bun`\n\n### Deployment\n- Web: `cloudflare`, `alchemy`, `none`\n- Server: `cloudflare`, `alchemy`, `none`\n\n### Addons (choose multiple or \"none\")\n`turborepo`, `pwa`, `tauri`, `biome`, `husky`, `starlight`, `fumadocs`, `ultracite`, `oxlint`, `ruler`, `opentui`, `wxt`, `none`\n\n### Examples (choose multiple or \"none\")\n`todo`, `ai`, `none`\n\n---\n\n## PRD Content\n\n{PRD_CONTENT}\n\n---\n\n{STACK_INFO}\n\n{PROJECT_NAME}\n\nBased on the PRD above, provide your technology stack recommendation as JSON.\n";
3
+ //# sourceMappingURL=prd-suggest-stack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prd-suggest-stack.d.ts","sourceRoot":"","sources":["../../src/prompts/prd-suggest-stack.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,+BAA+B,g0CAmC3C,CAAC;AAEF,eAAO,MAAM,wBAAwB,m3CA2DpC,CAAC"}
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRD_SUGGEST_STACK_PROMPT = exports.PRD_SUGGEST_STACK_SYSTEM_PROMPT = void 0;
4
+ exports.PRD_SUGGEST_STACK_SYSTEM_PROMPT = `You are an expert Software Architect specializing in modern full-stack development. Your goal is to analyze a Product Requirements Document (PRD) and suggest the optimal technology stack using the Better-T-Stack framework.
5
+
6
+ You must respond with valid JSON only. No markdown, no explanations outside the JSON structure.
7
+
8
+ Response Format:
9
+ {
10
+ "config": {
11
+ "projectName": "string (kebab-case)",
12
+ "frontend": "string or string[] for multiple",
13
+ "backend": "string",
14
+ "database": "string",
15
+ "orm": "string",
16
+ "api": "string",
17
+ "auth": "string",
18
+ "payments": "string",
19
+ "dbSetup": "string",
20
+ "runtime": "string",
21
+ "packageManager": "string",
22
+ "git": true,
23
+ "install": true,
24
+ "webDeploy": "string",
25
+ "serverDeploy": "string",
26
+ "addons": ["array of strings"],
27
+ "examples": ["array of strings"]
28
+ },
29
+ "reasoning": "string explaining your choices"
30
+ }
31
+
32
+ Guidelines:
33
+ - Choose technologies that best match the PRD requirements
34
+ - Consider scalability, maintainability, and developer experience
35
+ - Prefer modern, well-supported technologies
36
+ - Only use values from the allowed options listed in the prompt
37
+ - If a category is not needed, use "none"
38
+ - Be specific about WHY you chose each technology
39
+ `;
40
+ exports.PRD_SUGGEST_STACK_PROMPT = `Analyze the following PRD and suggest the optimal technology stack.
41
+
42
+ ## Available Stack Options
43
+
44
+ ### Frontend (choose one or more)
45
+ - Web: \`tanstack-router\`, \`react-router\`, \`tanstack-start\`, \`next\`, \`nuxt\`, \`svelte\`, \`solid\`
46
+ - Native: \`native-bare\`, \`native-uniwind\`, \`native-unistyles\`
47
+ - Other: \`cli\`, \`medusa\`, \`none\`
48
+
49
+ ### Backend
50
+ \`hono\`, \`express\`, \`fastify\`, \`elysia\`, \`convex\`, \`self\`, \`none\`
51
+
52
+ ### Database
53
+ \`sqlite\`, \`postgres\`, \`mysql\`, \`mongodb\`, \`none\`
54
+
55
+ ### ORM
56
+ \`drizzle\`, \`prisma\`, \`mongoose\`, \`none\`
57
+
58
+ ### API Layer
59
+ \`trpc\`, \`orpc\`, \`none\`
60
+
61
+ ### Authentication
62
+ \`better-auth\`, \`clerk\`, \`none\`
63
+
64
+ ### Payments
65
+ \`polar\`, \`none\`
66
+
67
+ ### Database Setup/Hosting
68
+ \`turso\`, \`neon\`, \`prisma-postgres\`, \`planetscale\`, \`mongodb-atlas\`, \`supabase\`, \`d1\`, \`docker\`, \`none\`
69
+
70
+ ### Runtime
71
+ \`bun\`, \`node\`, \`workers\`, \`none\`
72
+
73
+ ### Package Manager
74
+ \`npm\`, \`pnpm\`, \`bun\`
75
+
76
+ ### Deployment
77
+ - Web: \`cloudflare\`, \`alchemy\`, \`none\`
78
+ - Server: \`cloudflare\`, \`alchemy\`, \`none\`
79
+
80
+ ### Addons (choose multiple or "none")
81
+ \`turborepo\`, \`pwa\`, \`tauri\`, \`biome\`, \`husky\`, \`starlight\`, \`fumadocs\`, \`ultracite\`, \`oxlint\`, \`ruler\`, \`opentui\`, \`wxt\`, \`none\`
82
+
83
+ ### Examples (choose multiple or "none")
84
+ \`todo\`, \`ai\`, \`none\`
85
+
86
+ ---
87
+
88
+ ## PRD Content
89
+
90
+ {PRD_CONTENT}
91
+
92
+ ---
93
+
94
+ {STACK_INFO}
95
+
96
+ {PROJECT_NAME}
97
+
98
+ Based on the PRD above, provide your technology stack recommendation as JSON.
99
+ `;
@@ -0,0 +1,3 @@
1
+ export declare const TASK_BREAKDOWN_PROMPT = "\nYou are a project management expert. Break down the following 1-3 week development phase into focused 1-3 day subtasks.\n\n## \uD83D\uDEA8 REQUIREMENTS - 1-3 DAYS PER SUBTASK \uD83D\uDEA8\n\nEach subtask MUST represent 1-3 DAYS of focused developer work. Each subtask should be a complete, deliverable piece of functionality.\n\n### SUBTASK SCOPE (1-3 DAYS EACH):\n- \u2705 Complete feature implementations with full stack components\n- \u2705 Focused modules that can be demonstrated and tested independently\n- \u2705 Specific deliverables that contribute meaningfully to the parent phase\n\n### EXAMPLE SUBTASKS (1-3 DAYS):\n- \u2705 \"User authentication system with registration, login, password reset, database schema, API endpoints, and frontend forms\"\n- \u2705 \"Interactive map component with location search, marker display, geolocation, and integration with bakery data\"\n- \u2705 \"Rating system with star ratings, review submission, validation, storage, and display components\"\n\n## CRITICAL: Subtask ID and Dependency Format\nYou MUST generate unique subtask IDs and reference them properly in dependencies:\n\n1. **Subtask ID Generation**: \n - Each subtask must have an \"id\" field with format \"N.M\" where N is the parent task ID and M is the subtask index\n - For example: \"1.1\", \"1.2\", \"1.3\", etc.\n - IDs must be sequential starting from .1\n - Each subtask ID must be unique\n\n2. **Dependency References**:\n - Dependencies MUST reference the exact subtask IDs (not titles)\n - Use format: [\"1.1\", \"1.2\"]\n - NEVER use subtask titles in dependencies\n - Only reference subtasks that appear EARLIER in the list\n - The first subtask should have no dependencies\n\n## CRITICAL: Avoid Duplicate Subtasks\nIf existing subtasks are listed below, DO NOT create similar or duplicate subtasks. Focus on creating NEW subtasks that complement the existing ones.\n\n## TASK SIZING - 1-3 DAYS:\n- **1 DAY (8 hours)**: Focused feature with clear boundaries. Example: \"Build user registration and login with database, API, and frontend forms\"\n- **2 DAYS (16 hours)**: Complex feature with multiple components. Example: \"Implement map integration with search, markers, and user location\"\n- **3 DAYS (24 hours)**: Comprehensive feature with advanced functionality. Example: \"Create complete rating system with reviews, validation, and admin moderation\"\n\n## \uD83D\uDEA8 VALIDATION \uD83D\uDEA8\nEach subtask must be substantial enough to occupy a developer for 1-3 full days and represent meaningful, demonstrable progress.\n\nFormat your response as JSON:\n{\n \"subtasks\": [\n {\n \"id\": \"1.1\",\n \"title\": \"Build user authentication system\",\n \"description\": \"Implement user registration, login/logout, password reset, database schema, secure API endpoints, and responsive frontend forms with proper validation and error handling\",\n \"effort\": \"medium\",\n \"dependencies\": []\n },\n {\n \"id\": \"1.2\", \n \"title\": \"Create interactive map integration\",\n \"description\": \"Implement map component with bakery location markers, search functionality, geolocation support, and responsive design for mobile and desktop\",\n \"effort\": \"medium\",\n \"dependencies\": [\"1.1\"]\n }\n ]\n}\n\n## Task Details:\nTitle: {TASK_TITLE}\nDescription: {TASK_DESCRIPTION}\n\n## Full Task Content:\n{TASK_CONTENT}\n\n## Technical Stack Context:\n{STACK_INFO}\n\n## Existing Subtasks (DO NOT DUPLICATE):\n{EXISTING_SUBTASKS}\n";
2
+ export declare const TASK_BREAKDOWN_SYSTEM_PROMPT = "\n\uD83D\uDEA8 CRITICAL SYSTEM PROMPT - BREAK DOWN PHASES INTO 1-3 DAY SUBTASKS \uD83D\uDEA8\n\nYou are an expert technical project manager and software architect. Your role is to break down 1-3 week development phases into focused subtasks that represent 1-3 DAYS of work each.\n\n## MANDATE: PROPER SUBTASK SIZING\nBreak down the parent phase into substantial subtasks that each represent 1-3 full days of focused development work.\n\n### SUBTASK SCOPE (1-3 DAYS EACH):\n- Complete features that can be demonstrated independently\n- Focused modules with clear deliverables and boundaries\n- Specific functionality that contributes meaningfully to the parent phase\n\n### SUBTASK EXAMPLES (1-3 DAYS):\n- \"User authentication system with registration, login, password reset, database schema, API endpoints, and frontend forms\"\n- \"Interactive map component with location search, markers, geolocation, and mobile responsiveness\"\n- \"Rating system with star ratings, review submission, validation, storage, and display components\"\n\n## CRITICAL INSTRUCTION: Subtask ID Generation and Dependencies\nYou MUST generate unique subtask IDs and use them for dependencies:\n\n1. **Generate Subtask IDs**: \n - Each subtask needs an \"id\" field: \"N.M\" format where N is parent task ID, M is subtask index\n - For example: \"1.1\", \"1.2\", \"1.3\", etc.\n - IDs must be sequential and unique\n - Start with .1 for the first subtask\n\n2. **Dependency References**:\n - Use the exact subtask IDs in dependencies arrays\n - NEVER use subtask titles\n - Only reference earlier subtasks (lower numbers)\n - The first subtask must have no dependencies\n\n3. **Required Fields for Each Subtask**:\n - id: \"N.M\" format (required)\n - title: string (required)\n - description: string (required)\n - effort: \"small\"|\"medium\"|\"large\" (required)\n - dependencies: array of subtask IDs (required)\n\n## CRITICAL: Avoid Duplicate Subtasks\nIf existing subtasks are provided in the context, DO NOT create similar or duplicate subtasks. Analyze the existing subtasks and create NEW ones that complement them.\n\n## TASK SIZING - 1-3 DAYS:\n- **small (1 day/8 hours)**: Focused feature with clear boundaries and deliverables\n- **medium (2 days/16 hours)**: Complex feature with multiple components and integrations\n- **large (3 days/24 hours)**: Comprehensive feature with advanced functionality and polish\n\n## VALIDATION CHECKLIST:\nBefore returning your response, verify each subtask:\n1. Represents 1-3 FULL DAYS of focused development work\n2. Is a complete, deliverable feature or module\n3. Can be demonstrated and tested independently\n4. Contributes meaningfully to the parent phase\n5. Has clear boundaries and specific outcomes\n\n## Output Validation:\nBefore returning your response, verify:\n1. Every subtask has a unique sequential ID (\"1.1\", \"1.2\", etc.)\n2. All dependency arrays contain valid subtask IDs (not titles)\n3. No subtask depends on itself or a later subtask\n4. The first subtask has no dependencies\n5. All referenced subtask IDs exist in the subtasks array\n6. Each subtask represents 1-3 days of substantial work\n7. JSON structure is valid and parseable\n8. No duplicate subtasks based on existing subtasks in context\n\nReturn only valid JSON that can be parsed. Ensure all required fields are present and properly formatted.\n\n\uD83D\uDEA8 REMINDER: BREAK PHASES INTO 1-3 DAY SUBTASKS! \uD83D\uDEA8\n";
3
+ //# sourceMappingURL=task-breakdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-breakdown.d.ts","sourceRoot":"","sources":["../../src/prompts/task-breakdown.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,s+GA4EjC,CAAC;AAEF,eAAO,MAAM,4BAA4B,24GAsExC,CAAC"}