vibebusiness 1.2.87 → 1.2.89

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 (277) hide show
  1. package/.next/standalone/.env +27 -14
  2. package/.next/standalone/.next/BUILD_ID +1 -1
  3. package/.next/standalone/.next/app-build-manifest.json +89 -72
  4. package/.next/standalone/.next/app-path-routes-manifest.json +1 -1
  5. package/.next/standalone/.next/build-manifest.json +8 -8
  6. package/.next/standalone/.next/prerender-manifest.json +1 -1
  7. package/.next/standalone/.next/required-server-files.json +1 -1
  8. package/.next/standalone/.next/routes-manifest.json +1 -1
  9. package/.next/standalone/.next/server/app/_not-found/page.js +1 -1
  10. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  11. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  12. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  13. package/.next/standalone/.next/server/app/api/analyze/route.js +1 -1
  14. package/.next/standalone/.next/server/app/api/analyze/route.js.nft.json +1 -1
  15. package/.next/standalone/.next/server/app/api/briefing/route.js +1 -0
  16. package/.next/standalone/.next/server/app/api/briefing/route.js.nft.json +1 -0
  17. package/.next/standalone/.next/server/app/api/checkout/route.js +1 -1
  18. package/.next/standalone/.next/server/app/api/config/detect-repos/route.js +1 -1
  19. package/.next/standalone/.next/server/app/api/config/route.js +1 -1
  20. package/.next/standalone/.next/server/app/api/config/route.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/api/epics/[id]/ideas/route.js +1 -1
  22. package/.next/standalone/.next/server/app/api/epics/[id]/ideas/route.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/api/epics/[id]/route.js +1 -1
  24. package/.next/standalone/.next/server/app/api/epics/[id]/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/epics/route.js +1 -1
  26. package/.next/standalone/.next/server/app/api/epics/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/goals/[id]/kpis/route.js +1 -1
  28. package/.next/standalone/.next/server/app/api/goals/[id]/kpis/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/goals/[id]/route.js +1 -1
  30. package/.next/standalone/.next/server/app/api/goals/[id]/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/goals/route.js +1 -1
  32. package/.next/standalone/.next/server/app/api/goals/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/health/route.js +1 -1
  34. package/.next/standalone/.next/server/app/api/hypotheses/[id]/route.js +1 -1
  35. package/.next/standalone/.next/server/app/api/hypotheses/[id]/route.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/api/hypotheses/route.js +1 -1
  37. package/.next/standalone/.next/server/app/api/hypotheses/route.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/api/ideas/[id]/card/route.js +1 -1
  39. package/.next/standalone/.next/server/app/api/ideas/[id]/card/route.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/api/ideas/[id]/comments/route.js +1 -1
  41. package/.next/standalone/.next/server/app/api/ideas/[id]/comments/route.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/api/ideas/[id]/implement/route.js +1 -1
  43. package/.next/standalone/.next/server/app/api/ideas/[id]/implement/route.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/api/ideas/[id]/route.js +1 -1
  45. package/.next/standalone/.next/server/app/api/ideas/[id]/route.js.nft.json +1 -1
  46. package/.next/standalone/.next/server/app/api/ideas/[id]/transition/route.js +1 -1
  47. package/.next/standalone/.next/server/app/api/ideas/[id]/transition/route.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/api/ideas/route.js +1 -1
  49. package/.next/standalone/.next/server/app/api/ideas/route.js.nft.json +1 -1
  50. package/.next/standalone/.next/server/app/api/implementations/route.js +1 -1
  51. package/.next/standalone/.next/server/app/api/implementations/route.js.nft.json +1 -1
  52. package/.next/standalone/.next/server/app/api/investor-updates/generate/route.js +1 -1
  53. package/.next/standalone/.next/server/app/api/kpis/refresh/route.js +1 -1
  54. package/.next/standalone/.next/server/app/api/kpis/refresh/route.js.nft.json +1 -1
  55. package/.next/standalone/.next/server/app/api/license/route.js +1 -1
  56. package/.next/standalone/.next/server/app/api/portal/route.js +1 -1
  57. package/.next/standalone/.next/server/app/api/provider-status/route.js +1 -1
  58. package/.next/standalone/.next/server/app/api/social/[id]/publish/route.js +1 -1
  59. package/.next/standalone/.next/server/app/api/social/[id]/publish/route.js.nft.json +1 -1
  60. package/.next/standalone/.next/server/app/api/social/[id]/route.js +1 -1
  61. package/.next/standalone/.next/server/app/api/social/[id]/route.js.nft.json +1 -1
  62. package/.next/standalone/.next/server/app/api/social/route.js +1 -1
  63. package/.next/standalone/.next/server/app/api/social/route.js.nft.json +1 -1
  64. package/.next/standalone/.next/server/app/api/webhook/route.js +1 -1
  65. package/.next/standalone/.next/server/app/briefing/page.js +1 -0
  66. package/.next/standalone/.next/server/app/briefing/page.js.nft.json +1 -0
  67. package/.next/standalone/.next/server/app/briefing/page_client-reference-manifest.js +1 -0
  68. package/.next/standalone/.next/server/app/goals/[id]/page.js +1 -1
  69. package/.next/standalone/.next/server/app/goals/[id]/page.js.nft.json +1 -1
  70. package/.next/standalone/.next/server/app/goals/[id]/page_client-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/app/goals/page.js +1 -1
  72. package/.next/standalone/.next/server/app/goals/page.js.nft.json +1 -1
  73. package/.next/standalone/.next/server/app/goals/page_client-reference-manifest.js +1 -1
  74. package/.next/standalone/.next/server/app/hypotheses/[id]/page.js +1 -1
  75. package/.next/standalone/.next/server/app/hypotheses/[id]/page.js.nft.json +1 -1
  76. package/.next/standalone/.next/server/app/hypotheses/[id]/page_client-reference-manifest.js +1 -1
  77. package/.next/standalone/.next/server/app/hypotheses/page.js +1 -1
  78. package/.next/standalone/.next/server/app/hypotheses/page.js.nft.json +1 -1
  79. package/.next/standalone/.next/server/app/hypotheses/page_client-reference-manifest.js +1 -1
  80. package/.next/standalone/.next/server/app/ideas/[id]/page.js +1 -1
  81. package/.next/standalone/.next/server/app/ideas/[id]/page.js.nft.json +1 -1
  82. package/.next/standalone/.next/server/app/ideas/[id]/page_client-reference-manifest.js +1 -1
  83. package/.next/standalone/.next/server/app/index.html +1 -0
  84. package/.next/standalone/.next/server/app/index.meta +6 -0
  85. package/.next/standalone/.next/server/app/index.rsc +6 -0
  86. package/.next/standalone/.next/server/app/kanban/page.js +1 -0
  87. package/.next/standalone/.next/server/app/kanban/page.js.nft.json +1 -0
  88. package/.next/standalone/.next/server/app/kanban/page_client-reference-manifest.js +1 -0
  89. package/.next/standalone/.next/server/app/page.js +1 -1
  90. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  91. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  92. package/.next/standalone/.next/server/app/roadmap/[id]/page.js +1 -1
  93. package/.next/standalone/.next/server/app/roadmap/[id]/page.js.nft.json +1 -1
  94. package/.next/standalone/.next/server/app/roadmap/[id]/page_client-reference-manifest.js +1 -1
  95. package/.next/standalone/.next/server/app/roadmap/investors/page.js +1 -1
  96. package/.next/standalone/.next/server/app/roadmap/investors/page.js.nft.json +1 -1
  97. package/.next/standalone/.next/server/app/roadmap/investors/page_client-reference-manifest.js +1 -1
  98. package/.next/standalone/.next/server/app/roadmap/page.js +1 -1
  99. package/.next/standalone/.next/server/app/roadmap/page.js.nft.json +1 -1
  100. package/.next/standalone/.next/server/app/roadmap/page_client-reference-manifest.js +1 -1
  101. package/.next/standalone/.next/server/app/roadmap/public/page.js +1 -1
  102. package/.next/standalone/.next/server/app/roadmap/public/page.js.nft.json +1 -1
  103. package/.next/standalone/.next/server/app/roadmap/public/page_client-reference-manifest.js +1 -1
  104. package/.next/standalone/.next/server/app/sessions/page.js +1 -1
  105. package/.next/standalone/.next/server/app/sessions/page.js.nft.json +1 -1
  106. package/.next/standalone/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  107. package/.next/standalone/.next/server/app/settings/page.js +1 -1
  108. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  109. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  110. package/.next/standalone/.next/server/app/settings.html +1 -1
  111. package/.next/standalone/.next/server/app/settings.rsc +3 -3
  112. package/.next/standalone/.next/server/app/social/page.js +1 -1
  113. package/.next/standalone/.next/server/app/social/page.js.nft.json +1 -1
  114. package/.next/standalone/.next/server/app/social/page_client-reference-manifest.js +1 -1
  115. package/.next/standalone/.next/server/app/social.html +1 -1
  116. package/.next/standalone/.next/server/app/social.rsc +3 -3
  117. package/.next/standalone/.next/server/app/updates/[id]/page.js +1 -1
  118. package/.next/standalone/.next/server/app/updates/[id]/page.js.nft.json +1 -1
  119. package/.next/standalone/.next/server/app/updates/[id]/page_client-reference-manifest.js +1 -1
  120. package/.next/standalone/.next/server/app/updates/new/page.js +1 -1
  121. package/.next/standalone/.next/server/app/updates/new/page_client-reference-manifest.js +1 -1
  122. package/.next/standalone/.next/server/app/updates/new.html +1 -1
  123. package/.next/standalone/.next/server/app/updates/new.rsc +3 -3
  124. package/.next/standalone/.next/server/app/updates/page.js +1 -1
  125. package/.next/standalone/.next/server/app/updates/page.js.nft.json +1 -1
  126. package/.next/standalone/.next/server/app/updates/page_client-reference-manifest.js +1 -1
  127. package/.next/standalone/.next/server/app-paths-manifest.json +18 -15
  128. package/.next/standalone/.next/server/chunks/3098.js +1 -0
  129. package/.next/standalone/.next/server/chunks/3871.js +1 -1
  130. package/.next/standalone/.next/server/chunks/4355.js +1 -0
  131. package/.next/standalone/.next/server/chunks/4471.js +2 -2
  132. package/.next/standalone/.next/server/chunks/7151.js +10 -10
  133. package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
  134. package/.next/standalone/.next/server/pages/404.html +1 -1
  135. package/.next/standalone/.next/server/pages/500.html +1 -1
  136. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  137. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  138. package/.next/standalone/data/business-context.json +31 -181
  139. package/.next/standalone/data/codebase-snapshot.json +64 -42
  140. package/.next/standalone/data/competitors.json +39 -559
  141. package/.next/standalone/data/config.json +16 -40
  142. package/.next/standalone/data/goals.json +35 -410
  143. package/.next/standalone/data/positioning.json +10 -127
  144. package/.next/standalone/data/sessions.json +84 -299
  145. package/.next/standalone/node_modules/@esbuild/{darwin-arm64 → darwin-x64}/bin/esbuild +0 -0
  146. package/.next/standalone/node_modules/@esbuild/{darwin-arm64 → darwin-x64}/package.json +3 -3
  147. package/.next/standalone/package.json +3 -2
  148. package/.next/standalone/scripts/analyze.ts +70 -21
  149. package/.next/standalone/scripts/implement.ts +67 -17
  150. package/.next/standalone/server.js +1 -1
  151. package/.next/standalone/templates/commands/distribution-google-ads.md +86 -0
  152. package/.next/standalone/templates/commands/distribution-meta-ads.md +106 -0
  153. package/.next/standalone/templates/commands/distribution-repurpose.md +121 -0
  154. package/.next/standalone/templates/commands/distribution-seo-content.md +115 -0
  155. package/.next/standalone/templates/commands/distribution-social-expansion.md +128 -0
  156. package/.next/static/chunks/147-b00f2ac2bbec93ae.js +1 -0
  157. package/.next/static/chunks/159-4ce492ccac6de8f7.js +1 -0
  158. package/.next/static/chunks/47-eba0f8b4f9b17641.js +1 -0
  159. package/.next/static/chunks/547-921898871311cd72.js +1 -0
  160. package/.next/static/chunks/619-2b2ff3b9eaef112c.js +1 -0
  161. package/.next/static/chunks/735-b33805b2b19d17ad.js +1 -0
  162. package/.next/static/chunks/879-7fbd95e93ddc4636.js +1 -0
  163. package/.next/static/chunks/930-330300153dfcbfc0.js +1 -0
  164. package/.next/static/chunks/app/briefing/page-683aba0c52e910d7.js +1 -0
  165. package/.next/static/chunks/app/goals/[id]/page-40818dc7e710eeda.js +1 -0
  166. package/.next/static/chunks/app/goals/page-f80a64a68854e357.js +1 -0
  167. package/.next/static/chunks/app/hypotheses/[id]/page-023c882fa395f3ed.js +1 -0
  168. package/.next/static/chunks/app/hypotheses/page-168748bde00e7d90.js +1 -0
  169. package/.next/static/chunks/app/ideas/[id]/page-5f33e0ecf590ddec.js +1 -0
  170. package/.next/static/chunks/app/kanban/page-4f18f1e4f56948a5.js +1 -0
  171. package/.next/static/chunks/app/layout-cd1571ba4ed4a0fa.js +1 -0
  172. package/.next/static/chunks/app/page-0a8b9a7b052e6eac.js +1 -0
  173. package/.next/static/chunks/app/roadmap/[id]/page-9ba8a537e30c633c.js +1 -0
  174. package/.next/static/chunks/app/roadmap/investors/{page-0095ea5695573796.js → page-a914223623f56df3.js} +1 -1
  175. package/.next/static/chunks/app/roadmap/page-30de1fdc304eb572.js +1 -0
  176. package/.next/static/chunks/app/roadmap/public/page-c481b3f9217919ac.js +1 -0
  177. package/.next/static/chunks/app/sessions/page-d7eefd2fd42b4d55.js +1 -0
  178. package/.next/static/chunks/app/settings/{page-3afa908a96ce4e51.js → page-caf6daf930e4f2c6.js} +1 -1
  179. package/.next/static/chunks/app/social/page-21daeca0cf8af46b.js +1 -0
  180. package/.next/static/chunks/app/updates/[id]/page-2807cd17ae4938d0.js +1 -0
  181. package/.next/static/chunks/app/updates/new/{page-dcc67ffca587dcc2.js → page-ac5b966024ce0ddc.js} +1 -1
  182. package/.next/static/chunks/app/updates/page-b6efcdaae7f4f6d2.js +1 -0
  183. package/.next/static/chunks/{main-6ee938c5db2d5eb4.js → main-3eb11800bc19ca7f.js} +1 -1
  184. package/.next/static/chunks/{main-app-f42d9aa726a818bf.js → main-app-06ab73909d2a44c7.js} +1 -1
  185. package/.next/static/chunks/webpack-616e068a201ad621.js +1 -0
  186. package/.next/static/css/ff70d16171b1c02c.css +3 -0
  187. package/dist/bin/vibebusiness.js +1 -8
  188. package/dist/scripts/analyze.js +161 -19
  189. package/dist/scripts/heartbeat.js +24 -129
  190. package/dist/scripts/implement.js +77 -15
  191. package/dist/scripts/scan.js +0 -3
  192. package/dist/scripts/social-routine.js +0 -3
  193. package/package.json +3 -2
  194. package/scripts/lib/video/compositions/DemoVideo.tsx +50 -134
  195. package/scripts/lib/video/compositions/Root.tsx +2 -21
  196. package/templates/commands/distribution-google-ads.md +86 -0
  197. package/templates/commands/distribution-meta-ads.md +106 -0
  198. package/templates/commands/distribution-repurpose.md +121 -0
  199. package/templates/commands/distribution-seo-content.md +115 -0
  200. package/templates/commands/distribution-social-expansion.md +128 -0
  201. package/.next/standalone/.next/server/chunks/6299.js +0 -1
  202. package/.next/standalone/.next/server/chunks/995.js +0 -1
  203. package/.next/standalone/data/.analysis-prompt.txt +0 -170
  204. package/.next/standalone/data/copy/landing-improvements-2026-02-20.md +0 -111
  205. package/.next/standalone/data/copy/landing-landing-page-2026-02-20.md +0 -68
  206. package/.next/standalone/data/email-campaigns/sequences/onboarding.md +0 -183
  207. package/.next/standalone/data/email-campaigns/welcome-2026-02-20.md +0 -42
  208. package/.next/standalone/data/heartbeat-sessions.json +0 -7550
  209. package/.next/standalone/data/hypotheses.json +0 -269
  210. package/.next/standalone/data/ideas.json +0 -10764
  211. package/.next/standalone/data/implementations.json +0 -3342
  212. package/.next/standalone/data/pages.json +0 -22
  213. package/.next/standalone/data/payments.json +0 -33
  214. package/.next/standalone/data/reports/visuals/idea-3f4595f7-card.png +0 -0
  215. package/.next/standalone/data/reports/visuals/idea-4rxt3mkj-card.png +0 -0
  216. package/.next/standalone/data/reports/visuals/idea-6631456b-card.png +0 -0
  217. package/.next/standalone/data/reports/visuals/idea-boot-001-card.png +0 -0
  218. package/.next/standalone/data/reports/visuals/idea-fb3eba74-card.png +0 -0
  219. package/.next/standalone/data/reports/visuals/idea-first-tweet-card.png +0 -0
  220. package/.next/standalone/data/reports/visuals/idea-lp-hero-specificity-card.png +0 -0
  221. package/.next/standalone/data/reports/visuals/idea-lp-og-meta-card.png +0 -0
  222. package/.next/standalone/data/reports/visuals/idea-lp-social-proof-card.png +0 -0
  223. package/.next/standalone/data/reports/visuals/idea-prqf3lob-card.png +0 -0
  224. package/.next/standalone/data/reports/visuals/idea-readme-landing-url-card.png +0 -0
  225. package/.next/standalone/data/reports/visuals/idea-stripe-integration-card.png +0 -0
  226. package/.next/standalone/data/reports/visuals/promo-launch.png +0 -0
  227. package/.next/standalone/data/reports/visuals/promo-ship-fast.png +0 -0
  228. package/.next/standalone/data/reports/visuals/promo-while-you-slept-v2.png +0 -0
  229. package/.next/standalone/data/reports/visuals/promo-while-you-slept-v3.png +0 -0
  230. package/.next/standalone/data/reports/visuals/promo-while-you-slept.png +0 -0
  231. package/.next/standalone/data/social.json +0 -194
  232. package/.next/standalone/data/social.json.backup +0 -179
  233. package/.next/standalone/data/videos/ad-solo-founder-burnout.mp4 +0 -0
  234. package/.next/standalone/data/videos/ai-gets-business-feed.mp4 +0 -0
  235. package/.next/standalone/data/videos/idea-graveyard-feed.mp4 +0 -0
  236. package/.next/standalone/data/videos/lonely-founder-feed.mp4 +0 -0
  237. package/.next/standalone/data/videos/staging/ad-solo-founder-burnout.json +0 -54
  238. package/.next/standalone/data/videos/staging/ai-gets-business.json +0 -55
  239. package/.next/standalone/data/videos/staging/idea-graveyard.json +0 -61
  240. package/.next/standalone/data/videos/staging/lonely-founder.json +0 -60
  241. package/.next/standalone/data/videos/staging/while-you-slept-v2-fast.json +0 -67
  242. package/.next/standalone/data/videos/staging/while-you-slept-v3-dynamic.json +0 -67
  243. package/.next/standalone/data/videos/while-you-slept-demo-feed.mp4 +0 -0
  244. package/.next/standalone/data/videos/while-you-slept-v2-fast-feed.mp4 +0 -0
  245. package/.next/standalone/data/videos/while-you-slept-v3-dynamic-feed.mp4 +0 -0
  246. package/.next/standalone/node_modules/.cache/webpack/remotion-production-4.0.428/48519e014fdef8bfe40a0d447e90c96c/0.pack +0 -0
  247. package/.next/standalone/node_modules/.cache/webpack/remotion-production-4.0.428/48519e014fdef8bfe40a0d447e90c96c/index.pack +0 -0
  248. package/.next/standalone/node_modules/.cache/webpack/remotion-production-4.0.428/c99d23d3548030c8ff8de678c71eeb15/0.pack +0 -0
  249. package/.next/standalone/node_modules/.cache/webpack/remotion-production-4.0.428/c99d23d3548030c8ff8de678c71eeb15/1.pack +0 -0
  250. package/.next/standalone/node_modules/.cache/webpack/remotion-production-4.0.428/c99d23d3548030c8ff8de678c71eeb15/2.pack +0 -0
  251. package/.next/standalone/node_modules/.cache/webpack/remotion-production-4.0.428/c99d23d3548030c8ff8de678c71eeb15/3.pack +0 -0
  252. package/.next/standalone/node_modules/.cache/webpack/remotion-production-4.0.428/c99d23d3548030c8ff8de678c71eeb15/index.pack +0 -0
  253. package/.next/standalone/node_modules/.cache/webpack/remotion-production-4.0.428/c99d23d3548030c8ff8de678c71eeb15/index.pack.old +0 -0
  254. package/.next/static/chunks/280-fd1092f75f985b1e.js +0 -1
  255. package/.next/static/chunks/354-d5bc9619159f46c5.js +0 -1
  256. package/.next/static/chunks/429-8f4030371ebef5c3.js +0 -1
  257. package/.next/static/chunks/809-833fcb9fe6e81fd6.js +0 -1
  258. package/.next/static/chunks/827-6cf4bfc10d1ff0c7.js +0 -1
  259. package/.next/static/chunks/851-65b033bf38847cbb.js +0 -1
  260. package/.next/static/chunks/app/goals/[id]/page-231bb4daae0f06eb.js +0 -1
  261. package/.next/static/chunks/app/goals/page-4dfa36ac38853b88.js +0 -1
  262. package/.next/static/chunks/app/hypotheses/[id]/page-6ec09d5470557c18.js +0 -1
  263. package/.next/static/chunks/app/hypotheses/page-1732b7466579493e.js +0 -1
  264. package/.next/static/chunks/app/ideas/[id]/page-b3dfe1e61fc656a4.js +0 -1
  265. package/.next/static/chunks/app/layout-eeef7928298d2198.js +0 -1
  266. package/.next/static/chunks/app/page-d325a95479e7c453.js +0 -1
  267. package/.next/static/chunks/app/roadmap/[id]/page-b93a96f017c8d3dd.js +0 -1
  268. package/.next/static/chunks/app/roadmap/page-eacd69a99fcfc658.js +0 -1
  269. package/.next/static/chunks/app/roadmap/public/page-6b791041894b76d2.js +0 -1
  270. package/.next/static/chunks/app/sessions/page-a56ea625acdfa13e.js +0 -1
  271. package/.next/static/chunks/app/social/page-5211c78a5f37df65.js +0 -1
  272. package/.next/static/chunks/app/updates/[id]/page-fa20533878416cd0.js +0 -1
  273. package/.next/static/chunks/app/updates/page-19a09d7046577f70.js +0 -1
  274. package/.next/static/chunks/webpack-a3c37fcbf859f6f9.js +0 -1
  275. package/.next/static/css/654766eb547c6bab.css +0 -3
  276. /package/.next/static/{kgtR3Ls8MG4aQqwp3I0UE → UaMf1fmArAE78vyk_zQVK}/_buildManifest.js +0 -0
  277. /package/.next/static/{kgtR3Ls8MG4aQqwp3I0UE → UaMf1fmArAE78vyk_zQVK}/_ssgManifest.js +0 -0
@@ -9594,9 +9594,6 @@ function invokeClaudeCLI(options, claudePath) {
9594
9594
  stderr += data.toString();
9595
9595
  });
9596
9596
  if (useStdin && child.stdin) {
9597
- child.stdin.on("error", (err2) => {
9598
- if (err2.code !== "EPIPE") throw err2;
9599
- });
9600
9597
  child.stdin.write(options.prompt);
9601
9598
  child.stdin.end();
9602
9599
  }
@@ -33252,8 +33249,7 @@ async function renderCarousel(carousel, format, outputPath, _depsOverride, compo
33252
33249
  const inputProps = {
33253
33250
  slides: carousel.slides,
33254
33251
  format,
33255
- ...carousel.audio ? { audio: carousel.audio } : {},
33256
- ...carousel.variant ? { variant: carousel.variant } : {}
33252
+ ...carousel.audio ? { audio: carousel.audio } : {}
33257
33253
  };
33258
33254
  const composition = await selectComposition({
33259
33255
  serveUrl: bundleCache,
@@ -34169,14 +34165,6 @@ function execGit(args2, cwd, timeoutMs) {
34169
34165
  throw new Error(`git ${args2[0]} failed: ${stderr || execError.message}`);
34170
34166
  }
34171
34167
  }
34172
- function checkGitAvailable() {
34173
- try {
34174
- (0, import_child_process10.execFileSync)("git", ["--version"], { stdio: "pipe", timeout: 5e3 });
34175
- return true;
34176
- } catch {
34177
- return false;
34178
- }
34179
- }
34180
34168
 
34181
34169
  // scripts/lib/shell-safe.ts
34182
34170
  var SAFE_BRANCH_RE = /^[a-zA-Z0-9._\-/]+$/;
@@ -34415,16 +34403,8 @@ async function writeJsonFile(filePath, data) {
34415
34403
  }
34416
34404
  async function getIdeas() {
34417
34405
  const store = await readJsonFile(getFilePath("ideas.json"), { ideas: [] });
34418
- const VALID_PRIORITIES = ["critical", "high", "medium", "low"];
34419
- const VALID_SIZES = ["xs", "s", "m", "l", "xl"];
34420
34406
  return store.ideas.map((idea) => ({
34421
34407
  ...idea,
34422
- stage: idea.stage ?? idea.status ?? "inbox",
34423
- priority: VALID_PRIORITIES.includes(idea.priority) ? idea.priority : "medium",
34424
- impact: VALID_SIZES.includes(idea.impact) ? idea.impact : "m",
34425
- effort: VALID_SIZES.includes(idea.effort) ? idea.effort : "s",
34426
- comments: idea.comments ?? [],
34427
- tags: idea.tags ?? [],
34428
34408
  epic_id: idea.epic_id ?? null,
34429
34409
  implementation: {
34430
34410
  ...idea.implementation,
@@ -34432,6 +34412,7 @@ async function getIdeas() {
34432
34412
  }
34433
34413
  }));
34434
34414
  }
34415
+ var goalsLock = getFilePath("goals") + ".lock";
34435
34416
  var MAX_EPIC_SIZE = 5;
34436
34417
  var STOP_WORDS = /* @__PURE__ */ new Set([
34437
34418
  "the",
@@ -34870,9 +34851,6 @@ init_paths();
34870
34851
  var ROOT_DIR = PROJECT_DIR;
34871
34852
  var execAsync = (0, import_util.promisify)(import_child_process11.exec);
34872
34853
  var DEFAULT_MAX_DECOMP_ATTEMPTS = 2;
34873
- var MAX_REASONING_PROMPT_CHARS = 8e4;
34874
- var MAX_CONTEXT_CHARS = 2e4;
34875
- var IDLE_THRESHOLD = 2;
34876
34854
  function spawnAsync(cmd, args2, options) {
34877
34855
  return new Promise((resolve3, reject) => {
34878
34856
  const child = (0, import_child_process11.spawn)(cmd, args2, {
@@ -35750,16 +35728,13 @@ function buildContextForClaude(state, alerts, businessContext) {
35750
35728
  in_progress: state.ideas.filter((i) => i.stage === "in_progress").map((i) => {
35751
35729
  const subTasks = i.implementation.sub_tasks || [];
35752
35730
  const completed = subTasks.filter((st) => st.status === "completed").length;
35753
- const failedTasks = subTasks.filter((st) => st.status === "failed");
35754
- const lastFailedTask = failedTasks.length > 0 ? failedTasks[failedTasks.length - 1] : null;
35755
- const lastFailureMsg = lastFailedTask?.error_message ? lastFailedTask.error_message.substring(0, 120) : null;
35731
+ const failed = subTasks.filter((st) => st.status === "failed").length;
35756
35732
  return {
35757
35733
  id: i.id,
35758
35734
  title: i.title,
35759
35735
  days_in_progress: daysSince(i.updated_at),
35760
35736
  branch: i.implementation.branch_name,
35761
- sub_task_progress: subTasks.length > 0 ? `${completed}/${subTasks.length} done${failedTasks.length > 0 ? `, ${failedTasks.length} failed` : ""}` : null,
35762
- last_failure: lastFailureMsg
35737
+ sub_task_progress: subTasks.length > 0 ? `${completed}/${subTasks.length} done${failed > 0 ? `, ${failed} failed` : ""}` : null
35763
35738
  };
35764
35739
  }),
35765
35740
  shipped: state.ideas.filter((i) => i.stage === "shipped").map((i) => ({
@@ -35877,33 +35852,8 @@ async function runClaudeReasoning(state, alerts, businessContext) {
35877
35852
  const memorySection = memoryContext ? `
35878
35853
 
35879
35854
  LEARNINGS FROM PREVIOUS SESSIONS:
35880
- IMPORTANT: Any MEMORY.md entry that asserts a file exists, is missing, is a placeholder, or is disabled \u2014 re-read the referenced file NOW before treating it as current. Memory entries are hypotheses, not ground truth.
35881
35855
  ${memoryContext}
35882
35856
  ` : "";
35883
- const CONTEXT_BUDGET = MAX_CONTEXT_CHARS;
35884
- const contextObj = context;
35885
- const ideasObj = contextObj.ideas;
35886
- const contextSize = () => JSON.stringify(contextObj).length + memoryContext.length;
35887
- if (contextSize() > CONTEXT_BUDGET && ideasObj && Array.isArray(ideasObj.shipped)) {
35888
- const count = ideasObj.shipped.length;
35889
- if (count > 0) {
35890
- ideasObj.shipped = `${count} shipped ideas omitted`;
35891
- log(`[context-trim] Dropped shipped ideas (${count})`);
35892
- }
35893
- }
35894
- if (contextSize() > CONTEXT_BUDGET && ideasObj && Array.isArray(ideasObj.inbox)) {
35895
- ideasObj.inbox = ideasObj.inbox.map((i) => ({
35896
- id: i.id,
35897
- title: i.title,
35898
- priority: i.priority,
35899
- days_in_inbox: i.days_in_inbox
35900
- }));
35901
- log(`[context-trim] Trimmed inbox idea details`);
35902
- }
35903
- if (contextSize() > CONTEXT_BUDGET && contextObj.codebase_context) {
35904
- contextObj.codebase_context = "[codebase_context omitted to reduce prompt size]";
35905
- log(`[context-trim] Dropped codebase_context`);
35906
- }
35907
35857
  const prompt = `You are the AI Product Manager for ${productName}${productSummary}.
35908
35858
 
35909
35859
  CURRENT STATE:
@@ -35915,11 +35865,7 @@ Your job is to analyze this state and recommend the next action. Consider:
35915
35865
  3. Are there ideas stuck that need to be moved forward?
35916
35866
  4. What should be prioritized next?
35917
35867
  5. Approved ideas are pre-sorted by score (priority \xD7 impact / effort, boosted by goal and hypothesis alignment). Prefer the highest-scored idea unless you have a specific reason to override (funnel stage mismatch, stale assumption, or a critical alert). Reference the score when explaining your choice. If recommending implementation, use task_id "implement-{ideaId}".
35918
- 6. Are there in_progress ideas with sub-tasks? Check their progress. If an idea shows "last_failure", that is the most recent error from the last sub-task execution.
35919
-
35920
- FM3 \u2014 IMPLEMENTATION RETRY RULES:
35921
- - For any implement-* task where the idea shows a non-null "last_failure": you MUST NOT recommend the same task unless you explicitly state a different strategy in the analysis.
35922
- - If last_failure indicates an unresolvable environment issue (e.g., "ENOENT", "permission denied", "network unreachable", "git not found"), move the task to Blocked immediately instead of retrying. Set autonomous=false in next_action so the system routes it to Blocked.
35868
+ 6. Are there in_progress ideas with sub-tasks? Check their progress.
35923
35869
 
35924
35870
  DATA FRESHNESS CHECK:
35925
35871
  Before acting on any TODO or idea description, verify its assumptions against live_data:
@@ -35953,7 +35899,6 @@ META-TASKS:
35953
35899
  - "batch-cleanup" \u2014 Multiple cleanup operations in one pass
35954
35900
  - Use descriptive task_id names and detailed descriptions so the executor knows exactly what to do
35955
35901
  - The description field is critical \u2014 it's the full instruction set for the executor
35956
- - FM2: For research/spike tasks whose output is a file (docs, reports, analysis), append [expects: relative/path] to the description. Example: "Research DATAJUD API endpoints [expects: docs/spike-datajud.md]". The system will verify the file exists after completion \u2014 tasks that skip file creation will be kept in High Priority and retried.
35957
35902
 
35958
35903
  EVALUATION TASKS:
35959
35904
  - To evaluate a shipped idea's success metrics, use task_id: "evaluate-shipped-{ideaId}"
@@ -35987,6 +35932,18 @@ Best practice workflow:
35987
35932
  3. Review research findings \u2192 approve or revise
35988
35933
  4. Approved \u2192 trigger "implement-{id}" for autonomous implementation
35989
35934
 
35935
+ GROWTH DISTRIBUTION ANALYSIS:
35936
+ - "growth-analysis" \u2192 Run growth/distribution analysis to generate digital marketing campaign ideas
35937
+ - Generates ideas for: Google Ads keywords, Meta Ads audiences, Reddit posts, LinkedIn content, SEO pages, content repurposing
35938
+ - Each idea includes specific channel, targeting, budget, and expected results
35939
+
35940
+ When to recommend growth-analysis:
35941
+ 1. Acquisition goal is "behind" or "at_risk" \u2192 URGENT: run growth-analysis
35942
+ 2. No growth-category ideas exist in inbox or under_review \u2192 run growth-analysis
35943
+ 3. Last growth analysis was >14 days ago \u2192 schedule growth-analysis
35944
+ 4. Monthly budget changed (paid_ads no longer excluded) \u2192 run growth-analysis to propose paid campaigns
35945
+ 5. New competitor detected \u2192 run growth-analysis to find their channels we're not using
35946
+
35990
35947
  GOAL-GAP RESEARCH:
35991
35948
  - To research ideas for an underperforming goal, use task_id: "goal-gap-research-{goalId}"
35992
35949
  - Use when a goal is "behind" or "at_risk" AND has few/no active ideas working toward it
@@ -36191,9 +36148,6 @@ If there's nothing urgent, set next_action to null and new_todos to an empty arr
36191
36148
  Focus on actionable, specific recommendations. Be concise.`;
36192
36149
  const startTime = Date.now();
36193
36150
  const promptSize = prompt.length;
36194
- if (promptSize > MAX_REASONING_PROMPT_CHARS) {
36195
- log(`[context-trim] WARNING: Total prompt is ${promptSize} chars (over ${MAX_REASONING_PROMPT_CHARS} soft cap) \u2014 may cause timeout`);
36196
- }
36197
36151
  log(`Running Claude reasoning (prompt: ${promptSize} chars)...`);
36198
36152
  const reasoningSchema = {
36199
36153
  type: "object",
@@ -37255,11 +37209,6 @@ async function executeAutonomousImplementation(ideaId) {
37255
37209
  log(`Autonomy not enabled, skipping implementation for ${ideaId}`);
37256
37210
  return false;
37257
37211
  }
37258
- if (!checkGitAvailable()) {
37259
- log("[pre-flight] git not found in PATH (ENOENT) \u2014 implementation tasks unavailable");
37260
- reclassifyAsHumanDependent(`implement-${ideaId}`);
37261
- return false;
37262
- }
37263
37212
  const ideasData = loadJson(IDEAS_FILE, { ideas: [] });
37264
37213
  let idea = ideasData.ideas.find((i) => i.id === ideaId);
37265
37214
  if (!idea && !ideaId.startsWith("idea-")) {
@@ -37688,18 +37637,6 @@ ${allowedFiles.map((f) => `- ${f}`).join("\n")}
37688
37637
  resolve3(false);
37689
37638
  return;
37690
37639
  }
37691
- const expectsMatch = description.match(/\[expects:\s*([^\]]+)\]/);
37692
- if (expectsMatch) {
37693
- const expectedRelPath = expectsMatch[1].trim();
37694
- const expectedFullPath = path30.join(PROJECT_DIR, expectedRelPath);
37695
- if (!fs35.existsSync(expectedFullPath)) {
37696
- log(`[FM2] Artifact verification FAILED for ${taskId}: expected "${expectedRelPath}" but file not found`);
37697
- incrementMetaTaskFailureCount(taskId);
37698
- resolve3(false);
37699
- return;
37700
- }
37701
- log(`[FM2] Artifact verification passed: ${expectedRelPath} exists`);
37702
- }
37703
37640
  log(`Meta-task completed: ${output.substring(0, 200)}`);
37704
37641
  resolve3(true);
37705
37642
  } else {
@@ -38759,6 +38696,9 @@ async function executeTask(task, config, businessContext) {
38759
38696
  case "seo-audit":
38760
38697
  await runAnalysis("seo");
38761
38698
  return true;
38699
+ case "growth-analysis":
38700
+ await runAnalysis("growth");
38701
+ return true;
38762
38702
  default:
38763
38703
  if (taskId.startsWith("evaluate-shipped-")) {
38764
38704
  const ideaId = taskId.replace("evaluate-shipped-", "");
@@ -38938,33 +38878,7 @@ function updateTodoFile(taskId, completed) {
38938
38878
  log(`Failed to update TODO.md: ${error instanceof Error ? error.message : "Unknown error"}`);
38939
38879
  }
38940
38880
  }
38941
- function readConsecutiveNoops() {
38942
- try {
38943
- if (!fs35.existsSync(STATUS_FILE)) return 0;
38944
- const content = fs35.readFileSync(STATUS_FILE, "utf-8");
38945
- const match = content.match(/^consecutive_noops:\s*(\d+)/m);
38946
- return match ? parseInt(match[1], 10) : 0;
38947
- } catch {
38948
- return 0;
38949
- }
38950
- }
38951
- function ensureSystemIdleTask() {
38952
- try {
38953
- const content = fs35.readFileSync(TODO_FILE, "utf-8");
38954
- if (content.includes("`system-idle`")) return;
38955
- const highPriorityMarker = "## High Priority";
38956
- const idx = content.indexOf(highPriorityMarker);
38957
- if (idx === -1) return;
38958
- const insertAt = content.indexOf("\n", idx) + 1;
38959
- const idleLine = "\n- [ ] `system-idle` \u2014 All autonomous tasks are blocked. Review Blocked section and unblock manually.\n";
38960
- const newContent = content.slice(0, insertAt) + idleLine + content.slice(insertAt);
38961
- fs35.writeFileSync(TODO_FILE, newContent);
38962
- log("[IDLE] Added system-idle task to TODO.md High Priority section");
38963
- } catch (error) {
38964
- log(`Failed to add system-idle task: ${error instanceof Error ? error.message : "Unknown"}`);
38965
- }
38966
- }
38967
- function generateStatusContent(state, alerts, nextTask, reasoning, systemHealth, consecutiveNoops) {
38881
+ function generateStatusContent(state, alerts, nextTask, reasoning, systemHealth) {
38968
38882
  const now = /* @__PURE__ */ new Date();
38969
38883
  const currentGoal = state.goals[0];
38970
38884
  const goalSection = currentGoal ? `- **Goal:** ${currentGoal.title} (${currentGoal.target_value}${currentGoal.target_unit} by Q2 2026)
@@ -39016,7 +38930,6 @@ ${systemHealth.recovery_actions.map((a) => `- ${a}`).join("\n")}
39016
38930
 
39017
38931
  **Last Heartbeat:** ${formatDateTime(now)}
39018
38932
  **Next Scheduled:** ${nextScheduled}
39019
- consecutive_noops: ${consecutiveNoops ?? 0}
39020
38933
 
39021
38934
  ## Current Focus
39022
38935
 
@@ -39089,7 +39002,6 @@ async function runSingleHeartbeat(beatNumber = 1) {
39089
39002
  if (SKIP_REASONING) {
39090
39003
  log("Skipping Claude reasoning step");
39091
39004
  }
39092
- let consecutiveNoops = readConsecutiveNoops();
39093
39005
  const state = loadState4();
39094
39006
  const businessContext = loadBusinessContext();
39095
39007
  const heartbeatConfig = loadConfig();
@@ -39163,7 +39075,6 @@ async function runSingleHeartbeat(beatNumber = 1) {
39163
39075
  };
39164
39076
  log(`Task override: ${taskToDo.id} \u2014 ${taskToDo.description}`);
39165
39077
  }
39166
- let inlineWorkDone = false;
39167
39078
  if (!TASK_OVERRIDE) {
39168
39079
  const inProgressOverride = (() => {
39169
39080
  const cfgCheck = loadConfig();
@@ -39201,7 +39112,6 @@ async function runSingleHeartbeat(beatNumber = 1) {
39201
39112
  const success = await executeTask(reasoning.next_action, heartbeatConfig, businessContext);
39202
39113
  if (success) {
39203
39114
  taskToDo = null;
39204
- inlineWorkDone = true;
39205
39115
  } else {
39206
39116
  log(`Critical task failed, resuming in-progress work: ${inProgressOverride.id}`);
39207
39117
  taskToDo = inProgressOverride;
@@ -39225,9 +39135,7 @@ async function runSingleHeartbeat(beatNumber = 1) {
39225
39135
  taskToDo = existingTask;
39226
39136
  } else {
39227
39137
  const success = await executeTask(reasoning.next_action, heartbeatConfig, businessContext);
39228
- if (success) {
39229
- inlineWorkDone = true;
39230
- } else {
39138
+ if (!success) {
39231
39139
  taskToDo = determineWork(state);
39232
39140
  }
39233
39141
  }
@@ -39235,21 +39143,11 @@ async function runSingleHeartbeat(beatNumber = 1) {
39235
39143
  taskToDo = determineWork(state);
39236
39144
  }
39237
39145
  }
39238
- if (!taskToDo && !inlineWorkDone && !TASK_OVERRIDE && !DRY_RUN) {
39239
- consecutiveNoops++;
39240
- log(`[IDLE] No task determined (consecutive_noops: ${consecutiveNoops})`);
39241
- if (consecutiveNoops >= IDLE_THRESHOLD) {
39242
- log(`[IDLE] All actionable tasks blocked. Pausing autonomous work (${consecutiveNoops} consecutive no-ops >= threshold ${IDLE_THRESHOLD}).`);
39243
- ensureSystemIdleTask();
39244
- }
39245
- }
39246
- let taskSucceeded = false;
39247
39146
  if (taskToDo) {
39248
39147
  log(`Task to do: ${taskToDo.id} \u2014 ${taskToDo.description}`);
39249
39148
  const success = await executeTask(taskToDo, heartbeatConfig, businessContext);
39250
- taskSucceeded = success;
39251
39149
  if (success && !DRY_RUN) {
39252
- if (!["quick-analysis", "deep-analysis", "metrics-analysis", "seo-audit"].includes(taskToDo.id)) {
39150
+ if (!["quick-analysis", "deep-analysis", "metrics-analysis", "seo-audit", "growth-analysis"].includes(taskToDo.id)) {
39253
39151
  updateTodoFile(taskToDo.id, true);
39254
39152
  }
39255
39153
  } else if (!success) {
@@ -39293,9 +39191,6 @@ async function runSingleHeartbeat(beatNumber = 1) {
39293
39191
  } else {
39294
39192
  log("No tasks to do right now");
39295
39193
  }
39296
- if (taskSucceeded || inlineWorkDone) {
39297
- consecutiveNoops = 0;
39298
- }
39299
39194
  if (reasoning?.new_todos && reasoning.new_todos.length > 0 && !DRY_RUN) {
39300
39195
  const MAX_NEW_TODOS_PER_HEARTBEAT = 2;
39301
39196
  const cappedTodos = reasoning.new_todos.slice(0, MAX_NEW_TODOS_PER_HEARTBEAT);
@@ -39309,7 +39204,7 @@ async function runSingleHeartbeat(beatNumber = 1) {
39309
39204
  pruneMemoryLearnings();
39310
39205
  }
39311
39206
  if (!DRY_RUN) {
39312
- const statusContent = generateStatusContent(state, alerts, taskToDo, reasoning, systemHealth, consecutiveNoops);
39207
+ const statusContent = generateStatusContent(state, alerts, taskToDo, reasoning, systemHealth);
39313
39208
  fs35.writeFileSync(STATUS_FILE, statusContent);
39314
39209
  log("Updated STATUS.md");
39315
39210
  } else {
@@ -6,6 +6,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
9
13
  var __copyProps = (to, from, except, desc) => {
10
14
  if (from && typeof from === "object" || typeof from === "function") {
11
15
  for (let key of __getOwnPropNames(from))
@@ -22,8 +26,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
22
26
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
23
27
  mod
24
28
  ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
30
 
26
31
  // scripts/implement.ts
32
+ var implement_exports = {};
33
+ __export(implement_exports, {
34
+ revertIdeaStage: () => revertIdeaStage,
35
+ updateImplementation: () => updateImplementation
36
+ });
37
+ module.exports = __toCommonJS(implement_exports);
27
38
  var import_child_process3 = require("child_process");
28
39
  var fs5 = __toESM(require("fs"));
29
40
  var os = __toESM(require("os"));
@@ -370,6 +381,25 @@ function updateIdea(ideaId, updates) {
370
381
  saveJson(IDEAS_FILE, data);
371
382
  }
372
383
  }
384
+ function revertIdeaStage(ideaId, reason) {
385
+ try {
386
+ const data = loadJson(IDEAS_FILE);
387
+ const index = data.ideas.findIndex((i) => i.id === ideaId);
388
+ if (index !== -1) {
389
+ data.ideas[index].stage = "approved";
390
+ if (!data.ideas[index].comments) data.ideas[index].comments = [];
391
+ data.ideas[index].comments.push({
392
+ id: `comment-${Date.now()}`,
393
+ author: "system",
394
+ body: reason,
395
+ created_at: (/* @__PURE__ */ new Date()).toISOString()
396
+ });
397
+ saveJson(IDEAS_FILE, data);
398
+ }
399
+ } catch (e) {
400
+ console.error("[implement] Failed to revert idea stage", { ideaId, error: e.message });
401
+ }
402
+ }
373
403
  function createImplementation(ideaId, repoName, branchName, workspacePath) {
374
404
  const data = loadJson(IMPLEMENTATIONS_FILE);
375
405
  const now = (/* @__PURE__ */ new Date()).toISOString();
@@ -573,7 +603,7 @@ async function runImplementation(workspacePath, prompt, implId, timeoutMs = 3e5,
573
603
  claudeArgs.push("--allowedTools", "Read Edit Write Bash");
574
604
  }
575
605
  claudeArgs.push("-p", prompt);
576
- return new Promise((resolve) => {
606
+ return new Promise((resolve, reject) => {
577
607
  const claude = (0, import_child_process3.spawn)("claude", claudeArgs, {
578
608
  cwd: workspacePath,
579
609
  env: { ...process.env },
@@ -604,7 +634,7 @@ async function runImplementation(workspacePath, prompt, implId, timeoutMs = 3e5,
604
634
  } catch {
605
635
  }
606
636
  }, 5e3);
607
- resolve(false);
637
+ reject(new Error(`Implementation timed out after ${timeoutMs / 1e3}s`));
608
638
  }
609
639
  }, timeoutMs);
610
640
  claude.stdout.on("data", (data) => {
@@ -624,10 +654,10 @@ async function runImplementation(workspacePath, prompt, implId, timeoutMs = 3e5,
624
654
  const elapsed = Math.round((Date.now() - startTime) / 1e3);
625
655
  if (code === 0) {
626
656
  addLog(implId, `Claude Code completed successfully in ${elapsed}s (${output.length} chars)`);
627
- resolve(true);
657
+ resolve();
628
658
  } else {
629
659
  addLog(implId, `Claude Code exited with code ${code} after ${elapsed}s`);
630
- resolve(false);
660
+ reject(new Error(`Claude Code exited with code ${code}`));
631
661
  }
632
662
  });
633
663
  claude.on("error", (error) => {
@@ -635,7 +665,7 @@ async function runImplementation(workspacePath, prompt, implId, timeoutMs = 3e5,
635
665
  isResolved = true;
636
666
  clearTimeout(timeout);
637
667
  addLog(implId, `Claude Code error: ${error.message}`);
638
- resolve(false);
668
+ reject(error);
639
669
  });
640
670
  });
641
671
  }
@@ -721,10 +751,27 @@ async function main() {
721
751
  if (scope) console.log(`Mode: Scoped sub-task`);
722
752
  if (skipPr) console.log(`Mode: Skip PR creation`);
723
753
  if (createPrOnly) console.log(`Mode: Create PR only`);
724
- const config = loadConfig();
725
- const idea = loadIdea(ideaId);
754
+ let config;
755
+ try {
756
+ config = loadConfig();
757
+ } catch (err) {
758
+ const e = err;
759
+ console.error("[implement] Failed to load config", { error: e.message, file: CONFIG_FILE });
760
+ console.error(`[implement] Cannot continue without config \u2014 exiting. Check that ${CONFIG_FILE} exists and contains valid JSON.`);
761
+ process.exit(1);
762
+ }
763
+ let idea;
764
+ try {
765
+ idea = loadIdea(ideaId);
766
+ } catch (err) {
767
+ const e = err;
768
+ console.error("[implement] Failed to load idea", { ideaId, error: e.message, file: IDEAS_FILE });
769
+ console.error(`[implement] Cannot continue without idea record \u2014 exiting. Check that ${IDEAS_FILE} exists and contains valid JSON.`);
770
+ process.exit(1);
771
+ }
726
772
  if (!idea) {
727
- console.error(`Idea not found: ${ideaId}`);
773
+ console.error("[implement] Failed to load idea", { ideaId, error: "idea not found in ideas file", file: IDEAS_FILE });
774
+ console.error(`[implement] Idea ${ideaId} not found \u2014 exiting.`);
728
775
  process.exit(1);
729
776
  }
730
777
  console.log(`Title: ${idea.title}`);
@@ -749,7 +796,14 @@ async function main() {
749
796
  const defaultBranch = targetRepo.default_branch || "main";
750
797
  console.log(`Branch: ${branchName}`);
751
798
  console.log(`Workspace: ${config.workspace_dir}`);
752
- const implData = loadJson(IMPLEMENTATIONS_FILE);
799
+ let implData;
800
+ try {
801
+ implData = loadJson(IMPLEMENTATIONS_FILE);
802
+ } catch (err) {
803
+ const e = err;
804
+ console.error("[implement] Failed to load implementations file, falling back to fresh session", { error: e.message, file: IMPLEMENTATIONS_FILE });
805
+ implData = { implementations: [] };
806
+ }
753
807
  const existingImpl = implData.implementations.find(
754
808
  (i) => i.idea_id === ideaId && i.status !== "failed" && i.status !== "completed"
755
809
  );
@@ -821,14 +875,11 @@ async function main() {
821
875
  }
822
876
  updateImplementation(impl.id, { status: "implementing" });
823
877
  const prompt = generatePrompt(idea, scope);
824
- const success = await runImplementation(workspacePath, prompt, impl.id, timeout, {
878
+ await runImplementation(workspacePath, prompt, impl.id, timeout, {
825
879
  model: model || (scope ? "sonnet" : void 0),
826
880
  // Default to sonnet for sub-tasks
827
881
  scoped: !!scope
828
882
  });
829
- if (!success) {
830
- throw new Error("Implementation failed");
831
- }
832
883
  if (hasChanges(workspacePath)) {
833
884
  addLog(impl.id, "Changes detected, staging and committing...");
834
885
  if (scope) {
@@ -902,12 +953,23 @@ Idea: ${idea.id}`;
902
953
  const err = error;
903
954
  addLog(impl.id, `Error: ${err.message}`);
904
955
  updateImplementation(impl.id, {
905
- status: "failed"
956
+ status: "failed",
957
+ error_message: err.message
906
958
  });
959
+ revertIdeaStage(ideaId, `Implementation failed: ${err.message}`);
960
+ console.error("[implement] Fatal error", { ideaId, implId: impl.id, error: err.message, stack: err.stack });
907
961
  console.error(`
908
962
  === Implementation Failed ===`);
909
963
  console.error(err.message);
910
964
  process.exit(1);
911
965
  }
912
966
  }
913
- main().catch(console.error);
967
+ var _scriptPath = process.argv[1] ?? "";
968
+ if (_scriptPath.endsWith("implement.ts") || _scriptPath.endsWith("implement.js")) {
969
+ main().catch(console.error);
970
+ }
971
+ // Annotate the CommonJS export names for ESM import in node:
972
+ 0 && (module.exports = {
973
+ revertIdeaStage,
974
+ updateImplementation
975
+ });
@@ -170,9 +170,6 @@ function invokeClaudeCLI(options, claudePath) {
170
170
  stderr += data.toString();
171
171
  });
172
172
  if (useStdin && child.stdin) {
173
- child.stdin.on("error", (err) => {
174
- if (err.code !== "EPIPE") throw err;
175
- });
176
173
  child.stdin.write(options.prompt);
177
174
  child.stdin.end();
178
175
  }
@@ -7266,9 +7266,6 @@ function invokeClaudeCLI(options, claudePath) {
7266
7266
  stderr += data.toString();
7267
7267
  });
7268
7268
  if (useStdin && child.stdin) {
7269
- child.stdin.on("error", (err) => {
7270
- if (err.code !== "EPIPE") throw err;
7271
- });
7272
7269
  child.stdin.write(options.prompt);
7273
7270
  child.stdin.end();
7274
7271
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibebusiness",
3
- "version": "1.2.87",
3
+ "version": "1.2.89",
4
4
  "description": "AI-powered autonomous product manager. Research. Build. Ship. Grow.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "private": false,
@@ -80,6 +80,7 @@
80
80
  "dotenv": "^17.3.1",
81
81
  "remotion": "^4.0.428",
82
82
  "stripe": "^20.3.1",
83
- "twitter-api-v2": "^1.29.0"
83
+ "twitter-api-v2": "^1.29.0",
84
+ "vibebusiness": "^1.2.85"
84
85
  }
85
86
  }