@shepai/cli 1.121.0 → 1.122.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 (265) hide show
  1. package/apis/json-schema/PhaseTiming.yaml +17 -0
  2. package/dist/packages/core/src/application/ports/output/agents/agent-executor.interface.d.ts +19 -5
  3. package/dist/packages/core/src/application/ports/output/agents/agent-executor.interface.d.ts.map +1 -1
  4. package/dist/packages/core/src/application/ports/output/agents/phase-timing-repository.interface.d.ts +1 -1
  5. package/dist/packages/core/src/application/ports/output/agents/phase-timing-repository.interface.d.ts.map +1 -1
  6. package/dist/packages/core/src/application/use-cases/features/resume-feature.use-case.d.ts +3 -1
  7. package/dist/packages/core/src/application/use-cases/features/resume-feature.use-case.d.ts.map +1 -1
  8. package/dist/packages/core/src/application/use-cases/features/resume-feature.use-case.js +4 -2
  9. package/dist/packages/core/src/domain/generated/output.d.ts +22 -0
  10. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  11. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/039-add-phase-timing-extended-stats.d.ts +11 -0
  12. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/039-add-phase-timing-extended-stats.d.ts.map +1 -0
  13. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/039-add-phase-timing-extended-stats.js +25 -0
  14. package/dist/packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.d.ts +1 -1
  15. package/dist/packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.d.ts.map +1 -1
  16. package/dist/packages/core/src/infrastructure/repositories/sqlite-phase-timing.repository.js +42 -2
  17. package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts +5 -0
  18. package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts.map +1 -1
  19. package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.js +38 -13
  20. package/dist/packages/core/src/infrastructure/services/agents/common/executors/dev-executor.service.d.ts.map +1 -1
  21. package/dist/packages/core/src/infrastructure/services/agents/common/executors/dev-executor.service.js +23 -2
  22. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence-output-parser.d.ts +21 -0
  23. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence-output-parser.d.ts.map +1 -1
  24. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence-output-parser.js +71 -0
  25. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence.node.d.ts.map +1 -1
  26. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence.node.js +11 -1
  27. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/fast-implement.node.d.ts.map +1 -1
  28. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/fast-implement.node.js +34 -1
  29. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.d.ts.map +1 -1
  30. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.js +12 -0
  31. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -1
  32. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +5 -0
  33. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/evidence-prompts.d.ts.map +1 -1
  34. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/evidence-prompts.js +18 -6
  35. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/fast-implement.prompt.d.ts.map +1 -1
  36. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/fast-implement.prompt.js +4 -1
  37. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/phase-timing-context.d.ts +5 -0
  38. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/phase-timing-context.d.ts.map +1 -1
  39. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/phase-timing-context.js +9 -0
  40. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts +1 -0
  41. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts.map +1 -1
  42. package/dist/packages/core/src/infrastructure/services/git/git-pr.service.js +20 -1
  43. package/dist/src/presentation/tui/prompts/prd-review-question.prompt.d.ts +1 -1
  44. package/dist/src/presentation/tui/prompts/prd-review-question.prompt.d.ts.map +1 -1
  45. package/dist/src/presentation/tui/prompts/prd-review-question.prompt.js +5 -2
  46. package/dist/src/presentation/tui/wizards/prd-review.wizard.d.ts.map +1 -1
  47. package/dist/src/presentation/tui/wizards/prd-review.wizard.js +4 -2
  48. package/dist/src/presentation/web/app/(dashboard)/get-graph-data.d.ts.map +1 -1
  49. package/dist/src/presentation/web/app/(dashboard)/get-graph-data.js +2 -43
  50. package/dist/src/presentation/web/app/actions/approve-feature.d.ts.map +1 -1
  51. package/dist/src/presentation/web/app/actions/approve-feature.js +9 -0
  52. package/dist/src/presentation/web/app/actions/get-feature-phase-timings.d.ts +5 -0
  53. package/dist/src/presentation/web/app/actions/get-feature-phase-timings.d.ts.map +1 -1
  54. package/dist/src/presentation/web/app/actions/get-feature-phase-timings.js +5 -0
  55. package/dist/src/presentation/web/app/actions/reject-feature.d.ts.map +1 -1
  56. package/dist/src/presentation/web/app/actions/reject-feature.js +9 -0
  57. package/dist/src/presentation/web/app/actions/stop-feature.d.ts +5 -0
  58. package/dist/src/presentation/web/app/actions/stop-feature.d.ts.map +1 -0
  59. package/dist/src/presentation/web/app/actions/stop-feature.js +30 -0
  60. package/dist/src/presentation/web/app/api/npm-version/route.d.ts.map +1 -1
  61. package/dist/src/presentation/web/app/api/npm-version/route.js +9 -1
  62. package/dist/src/presentation/web/app/api/sessions/route.d.ts.map +1 -1
  63. package/dist/src/presentation/web/app/api/sessions/route.js +43 -10
  64. package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.d.ts.map +1 -1
  65. package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.js +15 -6
  66. package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.stories.d.ts.map +1 -1
  67. package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.stories.js +35 -0
  68. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.d.ts.map +1 -1
  69. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.js +2 -2
  70. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.d.ts +2 -0
  71. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.d.ts.map +1 -1
  72. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.stories.js +4 -0
  73. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +1 -0
  74. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
  75. package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.js +1 -1
  76. package/dist/src/presentation/web/components/features/control-center/control-center-inner.d.ts.map +1 -1
  77. package/dist/src/presentation/web/components/features/control-center/control-center-inner.js +3 -1
  78. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts +1 -0
  79. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts.map +1 -1
  80. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js +18 -0
  81. package/dist/src/presentation/web/lib/derive-graph.d.ts +2 -0
  82. package/dist/src/presentation/web/lib/derive-graph.d.ts.map +1 -1
  83. package/dist/src/presentation/web/lib/derive-graph.js +5 -0
  84. package/dist/tsconfig.build.tsbuildinfo +1 -1
  85. package/package.json +3 -5
  86. package/web/.next/BUILD_ID +1 -1
  87. package/web/.next/build-manifest.json +2 -2
  88. package/web/.next/fallback-build-manifest.json +2 -2
  89. package/web/.next/prerender-manifest.json +3 -3
  90. package/web/.next/required-server-files.js +2 -2
  91. package/web/.next/required-server-files.json +2 -2
  92. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +57 -42
  93. package/web/.next/server/app/(dashboard)/@drawer/create/page.js +1 -1
  94. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  95. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  96. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +69 -54
  97. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +1 -1
  98. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  99. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  100. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +69 -54
  101. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +1 -1
  102. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  103. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  104. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +53 -38
  105. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +1 -1
  106. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  107. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  108. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +57 -42
  109. package/web/.next/server/app/(dashboard)/create/page.js +1 -1
  110. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  111. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  112. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +69 -54
  113. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +1 -1
  114. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  115. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  116. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +69 -54
  117. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +1 -1
  118. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  119. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  120. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +53 -38
  121. package/web/.next/server/app/(dashboard)/page.js +1 -1
  122. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  123. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  124. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +53 -38
  125. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +1 -1
  126. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  127. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  128. package/web/.next/server/app/_global-error.html +2 -2
  129. package/web/.next/server/app/_global-error.rsc +1 -1
  130. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  131. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  132. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  133. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  134. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  135. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  136. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  137. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  138. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  139. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  140. package/web/.next/server/app/api/sessions/route.js +1 -1
  141. package/web/.next/server/app/api/sessions/route.js.nft.json +1 -1
  142. package/web/.next/server/app/settings/page/server-reference-manifest.json +6 -6
  143. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  144. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  145. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  146. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  147. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  148. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  149. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  150. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  151. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  152. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  153. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js +1 -1
  154. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js.map +1 -1
  155. package/web/.next/server/chunks/[externals]_node:fs_ddf6f167._.js +3 -0
  156. package/web/.next/server/chunks/[externals]_node:fs_ddf6f167._.js.map +1 -0
  157. package/web/.next/server/chunks/[root-of-the-server]__3b72e8b0._.js +1 -1
  158. package/web/.next/server/chunks/[root-of-the-server]__3b72e8b0._.js.map +1 -1
  159. package/web/.next/server/chunks/[root-of-the-server]__42b7ab55._.js +1 -1
  160. package/web/.next/server/chunks/[root-of-the-server]__42b7ab55._.js.map +1 -1
  161. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  162. package/web/.next/server/chunks/[root-of-the-server]__a62bd945._.js +3 -0
  163. package/web/.next/server/chunks/[root-of-the-server]__a62bd945._.js.map +1 -0
  164. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js +1 -1
  165. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
  166. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  167. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  168. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js +3 -0
  169. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_f30d0343.js.map +1 -0
  170. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js +3 -0
  171. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_9f1775bb.js.map +1 -0
  172. package/web/.next/server/chunks/ssr/[root-of-the-server]__06fef644._.js +1 -1
  173. package/web/.next/server/chunks/ssr/[root-of-the-server]__2698e9f4._.js +3 -0
  174. package/web/.next/server/chunks/ssr/[root-of-the-server]__2698e9f4._.js.map +1 -0
  175. package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js +1 -1
  176. package/web/.next/server/chunks/ssr/[root-of-the-server]__545792ab._.js.map +1 -1
  177. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
  178. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js.map +1 -1
  179. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js +2 -2
  180. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb00d90._.js.map +1 -1
  181. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
  182. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js.map +1 -1
  183. package/web/.next/server/chunks/ssr/[root-of-the-server]__8c553503._.js +2 -2
  184. package/web/.next/server/chunks/ssr/[root-of-the-server]__8e3bf5d7._.js +3 -0
  185. package/web/.next/server/chunks/ssr/[root-of-the-server]__8e3bf5d7._.js.map +1 -0
  186. package/web/.next/server/chunks/ssr/[root-of-the-server]__a022445f._.js +2 -2
  187. package/web/.next/server/chunks/ssr/[root-of-the-server]__a022445f._.js.map +1 -1
  188. package/web/.next/server/chunks/ssr/[root-of-the-server]__a7de2711._.js +2 -2
  189. package/web/.next/server/chunks/ssr/[root-of-the-server]__a7de2711._.js.map +1 -1
  190. package/web/.next/server/chunks/ssr/[root-of-the-server]__b724df9e._.js +1 -1
  191. package/web/.next/server/chunks/ssr/[root-of-the-server]__b724df9e._.js.map +1 -1
  192. package/web/.next/server/chunks/ssr/[root-of-the-server]__c07f9f79._.js +3 -0
  193. package/web/.next/server/chunks/ssr/[root-of-the-server]__c07f9f79._.js.map +1 -0
  194. package/web/.next/server/chunks/ssr/[root-of-the-server]__c605a375._.js +3 -0
  195. package/web/.next/server/chunks/ssr/[root-of-the-server]__c605a375._.js.map +1 -0
  196. package/web/.next/server/chunks/ssr/_0dc2cfd3._.js +1 -1
  197. package/web/.next/server/chunks/ssr/_0dc2cfd3._.js.map +1 -1
  198. package/web/.next/server/chunks/ssr/_135edb9c._.js +1 -1
  199. package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
  200. package/web/.next/server/chunks/ssr/_1bb131c4._.js.map +1 -1
  201. package/web/.next/server/chunks/ssr/_2f6f48b8._.js +1 -1
  202. package/web/.next/server/chunks/ssr/_2f6f48b8._.js.map +1 -1
  203. package/web/.next/server/chunks/ssr/{_0314651a._.js → _6e403a1e._.js} +2 -2
  204. package/web/.next/server/chunks/ssr/{_0314651a._.js.map → _6e403a1e._.js.map} +1 -1
  205. package/web/.next/server/chunks/ssr/{_68cc9b82._.js → _9f1ab4ee._.js} +2 -2
  206. package/web/.next/server/chunks/ssr/{_68cc9b82._.js.map → _9f1ab4ee._.js.map} +1 -1
  207. package/web/.next/server/chunks/ssr/_a37f5f18._.js +1 -1
  208. package/web/.next/server/chunks/ssr/_cc77a143._.js +1 -1
  209. package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -1
  210. package/web/.next/server/chunks/ssr/_fffd4212._.js +3 -0
  211. package/web/.next/server/chunks/ssr/{_73a34cb2._.js.map → _fffd4212._.js.map} +1 -1
  212. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  213. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  214. package/web/.next/server/chunks/ssr/{src_presentation_web_0835b28e._.js → src_presentation_web_5f039db1._.js} +3 -3
  215. package/web/.next/server/chunks/ssr/{src_presentation_web_0835b28e._.js.map → src_presentation_web_5f039db1._.js.map} +1 -1
  216. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js +3 -0
  217. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_2a52b697.js.map +1 -0
  218. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
  219. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
  220. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
  221. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
  222. package/web/.next/server/chunks/ssr/{src_presentation_web_e8034a29._.js → src_presentation_web_c4337169._.js} +3 -3
  223. package/web/.next/server/chunks/ssr/{src_presentation_web_e8034a29._.js.map → src_presentation_web_c4337169._.js.map} +1 -1
  224. package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js +1 -1
  225. package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js.map +1 -1
  226. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
  227. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
  228. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  229. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  230. package/web/.next/server/pages/500.html +2 -2
  231. package/web/.next/server/server-reference-manifest.js +1 -1
  232. package/web/.next/server/server-reference-manifest.json +311 -240
  233. package/web/.next/static/chunks/0dfc3b1cff4bdcc2.js +2 -0
  234. package/web/.next/static/chunks/{f27e3d3959bf91e6.js → 1c206da59596f056.js} +1 -1
  235. package/web/.next/static/chunks/2429cf8757ddad34.js +1 -0
  236. package/web/.next/static/chunks/{f22c2cdecc7a523b.js → 39dc15636654a1e3.js} +1 -1
  237. package/web/.next/static/chunks/{4c22a50608db401a.js → 3e9320301a0cac8b.js} +1 -1
  238. package/web/.next/static/chunks/447e720f6cf54767.js +1 -0
  239. package/web/.next/static/chunks/{0cc5f5ca1696267a.js → 53e9eda219a7f61c.js} +1 -1
  240. package/web/.next/static/chunks/{5186e2254580afd1.js → 7bc5806d9f82cc79.js} +1 -1
  241. package/web/.next/static/chunks/{4b58ac6e7721f9ea.js → 9076710a2df38d14.js} +1 -1
  242. package/web/.next/static/chunks/{8ded2620c2272c27.js → 9c2f294bf748b4ba.js} +2 -2
  243. package/web/.next/server/chunks/[root-of-the-server]__0fe7788d._.js +0 -3
  244. package/web/.next/server/chunks/[root-of-the-server]__0fe7788d._.js.map +0 -1
  245. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_ed372306.js +0 -3
  246. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_ed372306.js.map +0 -1
  247. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_32e26434.js +0 -3
  248. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_32e26434.js.map +0 -1
  249. package/web/.next/server/chunks/ssr/[root-of-the-server]__3b14e5a0._.js +0 -3
  250. package/web/.next/server/chunks/ssr/[root-of-the-server]__3b14e5a0._.js.map +0 -1
  251. package/web/.next/server/chunks/ssr/[root-of-the-server]__8b59c03e._.js +0 -3
  252. package/web/.next/server/chunks/ssr/[root-of-the-server]__8b59c03e._.js.map +0 -1
  253. package/web/.next/server/chunks/ssr/[root-of-the-server]__994ad9fe._.js +0 -3
  254. package/web/.next/server/chunks/ssr/[root-of-the-server]__994ad9fe._.js.map +0 -1
  255. package/web/.next/server/chunks/ssr/[root-of-the-server]__c9c1cfee._.js +0 -3
  256. package/web/.next/server/chunks/ssr/[root-of-the-server]__c9c1cfee._.js.map +0 -1
  257. package/web/.next/server/chunks/ssr/_73a34cb2._.js +0 -3
  258. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_e99d78dd.js +0 -3
  259. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_e99d78dd.js.map +0 -1
  260. package/web/.next/static/chunks/2132807f96110232.js +0 -1
  261. package/web/.next/static/chunks/9fdfff0a8c69ecd2.js +0 -2
  262. package/web/.next/static/chunks/c6a68bd98c2c0446.js +0 -1
  263. /package/web/.next/static/{Fg0DqzWA5hDmVmj5X9iq- → t8J3jMT2l7HfCuusAPC-b}/_buildManifest.js +0 -0
  264. /package/web/.next/static/{Fg0DqzWA5hDmVmj5X9iq- → t8J3jMT2l7HfCuusAPC-b}/_clientMiddlewareManifest.json +0 -0
  265. /package/web/.next/static/{Fg0DqzWA5hDmVmj5X9iq- → t8J3jMT2l7HfCuusAPC-b}/_ssgManifest.js +0 -0
@@ -4,6 +4,9 @@
4
4
  * Extracts structured Evidence records from free-form agent text output.
5
5
  * Looks for a fenced JSON code block containing an array of evidence objects.
6
6
  * Returns empty array gracefully on any parsing failure.
7
+ *
8
+ * Also provides validation to ensure UI-related evidence includes app-level
9
+ * proof (not just Storybook screenshots).
7
10
  */
8
11
  import { EvidenceType } from '../../../../../domain/generated/output.js';
9
12
  // Matches a fenced JSON code block: ```json ... ```
@@ -46,3 +49,71 @@ export function parseEvidenceRecords(output) {
46
49
  return [];
47
50
  return parsed.filter(isValidRecord);
48
51
  }
52
+ /**
53
+ * Patterns that indicate a screenshot is from Storybook rather than the actual app.
54
+ * Checked case-insensitively against description and relativePath.
55
+ */
56
+ const STORYBOOK_PATTERNS = [/storybook/i, /story\b/i, /stories/i, /\b6006\b/];
57
+ /**
58
+ * Patterns that indicate a screenshot is from the actual running application.
59
+ * Checked case-insensitively against description and relativePath.
60
+ */
61
+ const APP_PROOF_PATTERNS = [/\bapp[:\-\s]/i, /dev\s*server/i, /running\s*app/i, /actual\s*app/i];
62
+ function isScreenshot(e) {
63
+ return e.type === EvidenceType.Screenshot || e.type === EvidenceType.Video;
64
+ }
65
+ function matchesAny(text, patterns) {
66
+ return patterns.some((p) => p.test(text));
67
+ }
68
+ function isStorybookEvidence(e) {
69
+ return (matchesAny(e.description, STORYBOOK_PATTERNS) || matchesAny(e.relativePath, STORYBOOK_PATTERNS));
70
+ }
71
+ function isAppEvidence(e) {
72
+ // Explicitly marked as app-level evidence
73
+ if (matchesAny(e.description, APP_PROOF_PATTERNS) ||
74
+ matchesAny(e.relativePath, APP_PROOF_PATTERNS)) {
75
+ return true;
76
+ }
77
+ // A screenshot that is NOT storybook is treated as app-level evidence
78
+ return !isStorybookEvidence(e);
79
+ }
80
+ /**
81
+ * Validate that UI-related evidence includes app-level proof, not just Storybook screenshots.
82
+ *
83
+ * Returns a validation result indicating whether the evidence set meets the requirement
84
+ * for app-level proof. Screenshots/videos are considered "Storybook-only" if their
85
+ * description or path contains storybook-related keywords and NO screenshots have
86
+ * app-level indicators.
87
+ *
88
+ * This validation is informational — it produces warnings but does not filter out records.
89
+ */
90
+ export function validateUiEvidenceHasAppProof(evidence) {
91
+ const screenshots = evidence.filter(isScreenshot);
92
+ const warnings = [];
93
+ if (screenshots.length === 0) {
94
+ return {
95
+ valid: true,
96
+ hasScreenshots: false,
97
+ hasAppScreenshots: false,
98
+ hasOnlyStorybookScreenshots: false,
99
+ warnings,
100
+ };
101
+ }
102
+ const appScreenshots = screenshots.filter(isAppEvidence);
103
+ const storybookScreenshots = screenshots.filter(isStorybookEvidence);
104
+ const hasOnlyStorybook = storybookScreenshots.length > 0 && appScreenshots.length === 0;
105
+ if (hasOnlyStorybook) {
106
+ warnings.push('UI evidence contains only Storybook screenshots. App-level screenshots from the running application are REQUIRED for UI features.');
107
+ }
108
+ if (screenshots.length > 0 && appScreenshots.length === 0 && storybookScreenshots.length === 0) {
109
+ // Screenshots exist but none clearly identified as app or storybook — warn to be explicit
110
+ warnings.push('UI screenshots lack clear app-level indicators. Include "app" in the description or filename to confirm they are from the actual running application.');
111
+ }
112
+ return {
113
+ valid: !hasOnlyStorybook,
114
+ hasScreenshots: screenshots.length > 0,
115
+ hasAppScreenshots: appScreenshots.length > 0,
116
+ hasOnlyStorybookScreenshots: hasOnlyStorybook,
117
+ warnings,
118
+ };
119
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"evidence.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AAEpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAerD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,cAAc,IAG3C,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAuE7E"}
1
+ {"version":3,"file":"evidence.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/evidence.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AAEpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAerD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,cAAc,IAG3C,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAkF7E"}
@@ -22,7 +22,7 @@ import { reportNodeStart } from '../heartbeat.js';
22
22
  import { recordPhaseStart, recordPhaseEnd } from '../phase-timing-context.js';
23
23
  import { updateNodeLifecycle } from '../lifecycle-context.js';
24
24
  import { buildEvidencePrompt } from './prompts/evidence-prompts.js';
25
- import { parseEvidenceRecords } from './evidence-output-parser.js';
25
+ import { parseEvidenceRecords, validateUiEvidenceHasAppProof } from './evidence-output-parser.js';
26
26
  import { hasSettings, getSettings } from '../../../settings.service.js';
27
27
  /**
28
28
  * Factory that creates the evidence collection node function.
@@ -70,6 +70,15 @@ export function createEvidenceNode(executor) {
70
70
  log.error(`Warning: evidence parsing failed: ${msg} — continuing with empty evidence`);
71
71
  evidence = [];
72
72
  }
73
+ // --- Validate UI evidence includes app-level proof ---
74
+ const validationResult = validateUiEvidenceHasAppProof(evidence);
75
+ const validationMessages = [];
76
+ if (validationResult.warnings.length > 0) {
77
+ for (const warning of validationResult.warnings) {
78
+ log.error(`Evidence validation: ${warning}`);
79
+ validationMessages.push(`[evidence] Warning: ${warning}`);
80
+ }
81
+ }
73
82
  await recordPhaseEnd(timingId, durationMs);
74
83
  markPhaseComplete(state.specDir, 'evidence', log);
75
84
  return {
@@ -80,6 +89,7 @@ export function createEvidenceNode(executor) {
80
89
  ...(evidence.length === 0
81
90
  ? ['[evidence] Warning: no evidence records parsed from agent output']
82
91
  : []),
92
+ ...validationMessages,
83
93
  ],
84
94
  _needsReexecution: false,
85
95
  };
@@ -1 +1 @@
1
- {"version":3,"file":"fast-implement.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/fast-implement.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AAEpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAUrD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,cAAc,IAGhD,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAoD7E"}
1
+ {"version":3,"file":"fast-implement.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/fast-implement.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AAEpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAgBrD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,cAAc,IAGhD,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CA0E7E"}
@@ -9,10 +9,11 @@
9
9
  * Follows the same factory pattern as other nodes: takes executor
10
10
  * dependency, returns async (state) => Partial<FeatureAgentState>.
11
11
  */
12
+ import { execSync } from 'node:child_process';
12
13
  import { mkdirSync, writeFileSync } from 'node:fs';
13
14
  import { join, dirname } from 'node:path';
14
15
  import { isGraphBubbleUp } from '@langchain/langgraph';
15
- import { createNodeLogger, buildExecutorOptions, retryExecute } from './node-helpers.js';
16
+ import { createNodeLogger, buildExecutorOptions, retryExecute, getCompletedPhases, markPhaseComplete, } from './node-helpers.js';
16
17
  import { reportNodeStart } from '../heartbeat.js';
17
18
  import { recordPhaseStart, recordPhaseEnd } from '../phase-timing-context.js';
18
19
  import { updateNodeLifecycle } from '../lifecycle-context.js';
@@ -33,6 +34,16 @@ export function createFastImplementNode(executor) {
33
34
  log.info('Starting fast implementation');
34
35
  reportNodeStart('fast-implement');
35
36
  await updateNodeLifecycle('fast-implement');
37
+ // Skip if already completed (resume from error path)
38
+ const completedPhases = getCompletedPhases(state.specDir);
39
+ if (completedPhases.includes('fast-implement')) {
40
+ log.info('Phase already completed, skipping execution');
41
+ return {
42
+ currentNode: 'fast-implement',
43
+ messages: ['[fast-implement] already completed — skipping'],
44
+ _needsReexecution: false,
45
+ };
46
+ }
36
47
  const startTime = Date.now();
37
48
  const timingId = await recordPhaseStart('fast-implement');
38
49
  try {
@@ -44,6 +55,11 @@ export function createFastImplementNode(executor) {
44
55
  const durationMs = Date.now() - startTime;
45
56
  const elapsed = (durationMs / 1000).toFixed(1);
46
57
  log.info(`Complete (${result.result.length} chars, ${elapsed}s)`);
58
+ // Validate that the executor actually produced file changes
59
+ const cwd = state.worktreePath || state.repositoryPath;
60
+ if (!hasWorktreeChanges(cwd)) {
61
+ throw new Error('[fast-implement] Agent produced no file changes — it may have entered plan mode or asked questions instead of implementing. Retrying.');
62
+ }
47
63
  // --- Evidence sub-agent: capture proof of completion (settings-gated) ---
48
64
  const evidenceEnabled = hasSettings() && getSettings().workflow.enableEvidence;
49
65
  const evidence = evidenceEnabled ? await collectEvidence(executor, state, log) : [];
@@ -51,6 +67,8 @@ export function createFastImplementNode(executor) {
51
67
  log.info('Evidence collection disabled via settings — skipping');
52
68
  }
53
69
  await recordPhaseEnd(timingId, durationMs);
70
+ // Mark phase complete so resume from error skips re-execution
71
+ markPhaseComplete(state.specDir, 'fast-implement', log);
54
72
  return {
55
73
  currentNode: 'fast-implement',
56
74
  evidence,
@@ -107,6 +125,21 @@ async function collectEvidence(executor, state, log) {
107
125
  return [];
108
126
  }
109
127
  }
128
+ /**
129
+ * Check whether the worktree has any uncommitted changes (new, modified, or deleted files).
130
+ * Uses `git status --porcelain` which outputs one line per changed file, or empty if clean.
131
+ * Returns false if the git command fails (e.g. not a git repo).
132
+ */
133
+ function hasWorktreeChanges(cwd) {
134
+ try {
135
+ const output = execSync('git status --porcelain', { cwd, encoding: 'utf-8' });
136
+ return output.trim().length > 0;
137
+ }
138
+ catch {
139
+ // If git command fails, assume no changes (conservative — will trigger the error)
140
+ return false;
141
+ }
142
+ }
110
143
  /**
111
144
  * Save evidence manifest to the shep home evidence folder so the
112
145
  * merge review UI can read it without accessing graph state.
@@ -1 +1 @@
1
- {"version":3,"file":"merge.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AACpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yEAAyE,CAAC;AAClH,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EACd,MAAM,iEAAiE,CAAC;AAmBzE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uEAAuE,CAAC;AAE3H,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,cAAc,CAAC;IACzB,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IAC1E,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,iBAAiB,EAAE,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,QAAQ,CAAC,CAAC;IACnE;;OAEG;IACH,gBAAgB,EAAE,CAChB,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,OAAO,KAChB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB;;;OAGG;IACH,WAAW,EAAE,CACX,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,MAAM,KACrB,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACxD,YAAY,EAAE,aAAa,CAAC;IAC5B,6BAA6B,EAAE,IAAI,CAAC,6BAA6B,EAAE,SAAS,CAAC,CAAC;CAC/E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,IAGnC,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAmT7E"}
1
+ {"version":3,"file":"merge.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AACpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yEAAyE,CAAC;AAClH,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EACd,MAAM,iEAAiE,CAAC;AAmBzE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uEAAuE,CAAC;AAE3H,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,cAAc,CAAC;IACzB,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IAC1E,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,iBAAiB,EAAE,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,QAAQ,CAAC,CAAC;IACnE;;OAEG;IACH,gBAAgB,EAAE,CAChB,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,OAAO,KAChB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB;;;OAGG;IACH,WAAW,EAAE,CACX,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,MAAM,KACrB,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACxD,YAAY,EAAE,aAAa,CAAC;IAC5B,6BAA6B,EAAE,IAAI,CAAC,6BAA6B,EAAE,SAAS,CAAC,CAAC;CAC/E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,IAGnC,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CA+T7E"}
@@ -70,6 +70,9 @@ export function createMergeNode(deps) {
70
70
  const startTime = Date.now();
71
71
  let totalInputTokens = 0;
72
72
  let totalOutputTokens = 0;
73
+ let totalCostUsd = 0;
74
+ let totalNumTurns = 0;
75
+ let totalDurationApiMs = 0;
73
76
  const { executor } = deps;
74
77
  const mergeTimingId = await recordPhaseStart('merge', {
75
78
  agentType: executor.agentType,
@@ -106,6 +109,9 @@ export function createMergeNode(deps) {
106
109
  });
107
110
  totalInputTokens += commitResult.usage?.inputTokens ?? 0;
108
111
  totalOutputTokens += commitResult.usage?.outputTokens ?? 0;
112
+ totalCostUsd += commitResult.usage?.costUsd ?? 0;
113
+ totalNumTurns += commitResult.usage?.numTurns ?? 0;
114
+ totalDurationApiMs += commitResult.usage?.durationApiMs ?? 0;
109
115
  commitHash = parseCommitHash(commitResult.result) ?? state.commitHash;
110
116
  messages.push(`[merge] Agent completed commit/push/PR operations`);
111
117
  if (effectiveState.openPr) {
@@ -183,6 +189,9 @@ export function createMergeNode(deps) {
183
189
  await recordPhaseEnd(mergeTimingId, Date.now() - startTime, {
184
190
  inputTokens: totalInputTokens || undefined,
185
191
  outputTokens: totalOutputTokens || undefined,
192
+ costUsd: totalCostUsd || undefined,
193
+ numTurns: totalNumTurns || undefined,
194
+ durationApiMs: totalDurationApiMs || undefined,
186
195
  exitCode: 'success',
187
196
  });
188
197
  await recordApprovalWaitStart(mergeTimingId);
@@ -294,6 +303,9 @@ export function createMergeNode(deps) {
294
303
  await recordPhaseEnd(mergeTimingId, Date.now() - startTime, {
295
304
  inputTokens: totalInputTokens || undefined,
296
305
  outputTokens: totalOutputTokens || undefined,
306
+ costUsd: totalCostUsd || undefined,
307
+ numTurns: totalNumTurns || undefined,
308
+ durationApiMs: totalDurationApiMs || undefined,
297
309
  exitCode: 'error',
298
310
  errorMessage: message.slice(0, 1000),
299
311
  });
@@ -1 +1 @@
1
- {"version":3,"file":"node-helpers.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,+DAA+D,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAUrD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM;IAE7C,4DAA4D;gBAChD,IAAI;kBAGF,MAAM,GAAG,I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ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,+DAA+D,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAUrD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM;IAE7C,4DAA4D;gBAChD,IAAI;kBAGF,MAAM,GAAG,IAAI;mBAIZ,MAAM,GAAG,IAAI;EAK/B;AAED,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE7D;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMtE;AAoBD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAO1D;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,iBAAiB,EACxB,SAAS,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,EAC3D,QAAQ,CAAC,EAAE,MAAM,GAChB,qBAAqB,CAUvB;AAeD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAQrD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,OAAO,CAQ3F;AAMD,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG,mBAAmB,GAAG,eAAe,GAAG,SAAS,CAAC;AAMhG;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAA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CAAC;CAC5B,GAAG,MAAM,CAiCT;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAa3E;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,cAAc,EACxB,WAAW,EAAE,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,UAAU,KAAK,MAAM,GACjE,CAAC,KAAK,EAAE,iBAAiB,KAAK,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAqInE"}
@@ -427,6 +427,11 @@ export function executeNode(nodeName, executor, buildPrompt) {
427
427
  await recordPhaseEnd(timingId, durationMs, {
428
428
  inputTokens: result.usage?.inputTokens,
429
429
  outputTokens: result.usage?.outputTokens,
430
+ cacheCreationInputTokens: result.usage?.cacheCreationInputTokens,
431
+ cacheReadInputTokens: result.usage?.cacheReadInputTokens,
432
+ costUsd: result.usage?.costUsd,
433
+ numTurns: result.usage?.numTurns,
434
+ durationApiMs: result.usage?.durationApiMs,
430
435
  exitCode: 'success',
431
436
  });
432
437
  // Mark phase complete BEFORE interrupting so that on resume the
@@ -1 +1 @@
1
- {"version":3,"file":"evidence-prompts.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/evidence-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,WAAW,qBAAqB;IACpC,kEAAkE;IAClE,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,iBAAiB,EACxB,OAAO,GAAE,qBAAiD,GACzD,MAAM,CA8LR"}
1
+ {"version":3,"file":"evidence-prompts.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/evidence-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,WAAW,qBAAqB;IACpC,kEAAkE;IAClE,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,iBAAiB,EACxB,OAAO,GAAE,qBAAiD,GACzD,MAAM,CA0MR"}
@@ -90,11 +90,17 @@ ${cwd}
90
90
 
91
91
  Review the completed tasks above and capture evidence for each.
92
92
 
93
- ### MANDATORY Screenshot Rule
93
+ ### MANDATORY Screenshot Rule — App-Level Proof Required
94
94
 
95
- **If ANY task touches UI code (components, pages, views, styles, layouts, templates, JSX/TSX, HTML, CSS), you MUST capture at least one Screenshot.** This is non-negotiable. Changing a heading, button label, color, layout, or any visible element requires a screenshot proving the change renders correctly.
95
+ **If ANY task touches UI code (components, pages, views, styles, layouts, templates, JSX/TSX, HTML, CSS), you MUST capture at least one Screenshot from the ACTUAL RUNNING APPLICATION (dev server).** This is non-negotiable. Changing a heading, button label, color, layout, or any visible element requires a screenshot proving the change renders correctly in the real app context.
96
96
 
97
- To capture screenshots:
97
+ **CRITICAL: Storybook-only evidence is NOT sufficient for UI features.** Storybook screenshots may be included as supplementary evidence, but they do NOT replace app-level screenshots. You MUST capture screenshots from the actual running application (via the dev server) to prove the feature works in its real context with actual data, routing, and integration.
98
+
99
+ For each UI change you MUST capture:
100
+ 1. **App screenshot (REQUIRED)**: A screenshot from the running dev server showing the feature in its actual app context. Include "app" or the actual page/route name in the screenshot file name (e.g., \`app-dashboard-new-toggle.png\`, \`app-settings-page.png\`).
101
+ 2. **Storybook screenshot (OPTIONAL, supplementary)**: If the component has a Storybook story, you may also capture a Storybook screenshot as supplementary evidence. Include "storybook" in the file name (e.g., \`storybook-toggle-component.png\`).
102
+
103
+ To capture app-level screenshots:
98
104
  1. Install Playwright if not already available: \`npx playwright install chromium --with-deps 2>/dev/null || npx playwright install chromium\`
99
105
  2. Start the dev server in the background (e.g., \`npm run dev &\` or \`pnpm dev &\`)
100
106
  3. Wait for the server to be ready
@@ -114,11 +120,16 @@ To capture screenshots:
114
120
  \`\`\`
115
121
  5. Stop the dev server after capturing
116
122
 
123
+ To capture Storybook screenshots (supplementary only):
124
+ 1. Start Storybook: \`npx storybook dev -p 6006 &\` or \`pnpm dev:storybook &\`
125
+ 2. Navigate to the relevant story and capture a screenshot
126
+ 3. Stop Storybook after capturing
127
+
117
128
  If Playwright installation fails, try alternative approaches (e.g., \`npx puppeteer\`, \`curl\` for API responses). Only skip screenshots if ALL browser automation approaches fail — and in that case, explicitly note the failure reason in the evidence description.
118
129
 
119
130
  ### Evidence by Task Type
120
131
 
121
- - **UI/Web tasks**: You MUST take screenshots (see mandatory rule above). Also run and capture test output.
132
+ - **UI/Web tasks**: You MUST take screenshots FROM THE RUNNING APP (see mandatory rule above). Storybook-only screenshots are NOT acceptable as primary evidence. Also run and capture test output.
122
133
  - **Backend/API tasks**: Run the relevant test suite and capture test output showing passing tests.
123
134
  - **CLI tasks**: Run the CLI commands and capture terminal output demonstrating correct behavior.
124
135
  - **Refactoring/Infrastructure tasks**: Capture test output or build output confirming no regressions.
@@ -133,9 +144,10 @@ If Playwright installation fails, try alternative approaches (e.g., \`npx puppet
133
144
  ### Minimum Evidence Requirements
134
145
 
135
146
  Your output MUST include:
136
- 1. At least one **Screenshot** if any task modifies UI/visual code (components, styles, templates, markup)
147
+ 1. At least one **Screenshot from the running app** (NOT Storybook) if any task modifies UI/visual code (components, styles, templates, markup). The screenshot description MUST clearly indicate it was captured from the actual application (e.g., "App: dashboard page showing new toggle", "App: settings page with updated layout"). Do NOT use descriptions that suggest Storybook-only proof.
137
148
  2. At least one **TestOutput** if the project has a test suite
138
- 3. Do NOT output only TestOutput/TerminalRecording when the feature involves visible UI changes — screenshots are mandatory in that case
149
+ 3. Do NOT output only TestOutput/TerminalRecording when the feature involves visible UI changes — app-level screenshots are mandatory in that case
150
+ 4. Do NOT submit only Storybook screenshots for UI features — each UI screenshot MUST have a corresponding app-level screenshot proving the feature works in its real context
139
151
 
140
152
  ${storageSection}
141
153
 
@@ -1 +1 @@
1
- {"version":3,"file":"fast-implement.prompt.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/fast-implement.prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAwIxD;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAoEzE"}
1
+ {"version":3,"file":"fast-implement.prompt.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/fast-implement.prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAwIxD;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAuEzE"}
@@ -211,6 +211,9 @@ ${dirListing}
211
211
  - Follow existing codebase conventions and patterns
212
212
  - Do NOT commit, push, or create pull requests
213
213
  - Do NOT modify any spec YAML files
214
- - Keep changes focused and minimal`);
214
+ - Keep changes focused and minimal
215
+ - Do NOT enter plan mode — implement directly without planning phases
216
+ - Do NOT ask the user questions or use AskUserQuestion — make reasonable decisions and proceed
217
+ - You MUST create or modify actual code files — a plan or summary alone is not acceptable output`);
215
218
  return sections.join('\n\n');
216
219
  }
@@ -39,6 +39,11 @@ export declare function recordPhaseStart(phase: string, metadata?: PhaseStartMet
39
39
  export interface PhaseEndMetadata {
40
40
  inputTokens?: number;
41
41
  outputTokens?: number;
42
+ cacheCreationInputTokens?: number;
43
+ cacheReadInputTokens?: number;
44
+ costUsd?: number;
45
+ numTurns?: number;
46
+ durationApiMs?: number;
42
47
  exitCode?: string;
43
48
  errorMessage?: string;
44
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"phase-timing-context.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/phase-timing-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wEAAwE,CAAC;AAMrH;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAE/C;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,sBAAsB,GAAG,IAAI,CAG7F;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAI9C;AA+BD,sDAAsD;AACtD,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,kBAAkB,GAC5B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAyBxB;AAED,qDAAqD;AACrD,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAClC,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,gBAAgB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAef;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,MAAM,EACb,aAAa,CAAC,EAAE,MAAM,EACtB,YAAY,CAAC,EAAE,sBAAsB,GACpC,OAAO,CAAC,IAAI,CAAC,CAoBf;AAED;;;GAGG;AACH,wBAAsB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAUpF"}
1
+ {"version":3,"file":"phase-timing-context.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/phase-timing-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wEAAwE,CAAC;AAMrH;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAE/C;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,sBAAsB,GAAG,IAAI,CAG7F;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAI9C;AA+BD,sDAAsD;AACtD,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,kBAAkB,GAC5B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAyBxB;AAED,qDAAqD;AACrD,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAClC,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,gBAAgB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAwBf;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,MAAM,EACb,aAAa,CAAC,EAAE,MAAM,EACtB,YAAY,CAAC,EAAE,sBAAsB,GACpC,OAAO,CAAC,IAAI,CAAC,CAoBf;AAED;;;GAGG;AACH,wBAAsB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAUpF"}
@@ -103,6 +103,15 @@ export async function recordPhaseEnd(timingId, durationMs, metadata) {
103
103
  durationMs: BigInt(durationMs),
104
104
  ...(metadata?.inputTokens != null && { inputTokens: BigInt(metadata.inputTokens) }),
105
105
  ...(metadata?.outputTokens != null && { outputTokens: BigInt(metadata.outputTokens) }),
106
+ ...(metadata?.cacheCreationInputTokens != null && {
107
+ cacheCreationInputTokens: BigInt(metadata.cacheCreationInputTokens),
108
+ }),
109
+ ...(metadata?.cacheReadInputTokens != null && {
110
+ cacheReadInputTokens: BigInt(metadata.cacheReadInputTokens),
111
+ }),
112
+ ...(metadata?.costUsd != null && { costUsd: metadata.costUsd }),
113
+ ...(metadata?.numTurns != null && { numTurns: metadata.numTurns }),
114
+ ...(metadata?.durationApiMs != null && { durationApiMs: BigInt(metadata.durationApiMs) }),
106
115
  ...(metadata?.exitCode != null && { exitCode: metadata.exitCode }),
107
116
  ...(metadata?.errorMessage != null && { errorMessage: metadata.errorMessage }),
108
117
  });
@@ -19,6 +19,7 @@ export declare class GitPrService implements IGitPrService {
19
19
  push(cwd: string, branch: string, setUpstream?: boolean): Promise<void>;
20
20
  createPr(cwd: string, prYamlPath: string): Promise<PrCreateResult>;
21
21
  mergePr(cwd: string, prNumber: number, strategy?: MergeStrategy): Promise<void>;
22
+ private getPrHeadBranch;
22
23
  localMergeSquash(cwd: string, featureBranch: string, baseBranch: string, commitMessage: string, hasRemote?: boolean): Promise<void>;
23
24
  mergeBranch(cwd: string, sourceBranch: string, targetBranch: string): Promise<void>;
24
25
  getCiStatus(cwd: string, branch: string): Promise<CiStatusResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"git-pr.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/git-pr.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wEAAwE,CAAC;AAC5G,OAAO,KAAK,EACV,cAAc,EAGd,WAAW,EACX,QAAQ,EACR,aAAa,EACb,cAAc,EACd,YAAY,EACb,MAAM,wEAAwE,CAAC;AAUhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,qBACa,YAAa,YAAW,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAErE,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKxC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAgBjD,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAgF9C,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKnD,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKpD,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAWxD,IAAI,CAAC,GAAG,EAAE,MAAM,EA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AY,EAAE,CAAC;IAoCpD,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;IAc/E,WAAW,CACf,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,OAAO,CAAC;IA6CnB;;;OAGG;YACW,UAAU;IAmBlB,cAAc,CAClB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,WAAW,SAAS,GACnB,OAAO,CAAC,MAAM,CAAC;IAWlB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,YAAY;IAepB,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,aAAa;CAiBtB"}
1
+ {"version":3,"file":"git-pr.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/git-pr.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wEAAwE,CAAC;AAC5G,OAAO,KAAK,EACV,cAAc,EAGd,WAAW,EACX,QAAQ,EACR,aAAa,EACb,cAAc,EACd,YAAY,EACb,MAAM,wEAAwE,CAAC;AAUhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,qBACa,YAAa,YAAW,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAErE,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKxC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAgBjD,gBAAgB,CAAC,GAAG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AY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAWhF,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAevE,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAaxE,OAAO,CAAC,gBAAgB;IAexB,OAAO,CAAC,aAAa;IAmFf,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAoCpD,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;IAc/E,WAAW,CACf,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,OAAO,CAAC;IA6CnB;;;OAGG;YACW,UAAU;IAmBlB,cAAc,CAClB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,WAAW,SAAS,GACnB,OAAO,CAAC,MAAM,CAAC;IAWlB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,YAAY;IAepB,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,aAAa;CAiBtB"}
@@ -186,13 +186,32 @@ let GitPrService = class GitPrService {
186
186
  }
187
187
  async mergePr(cwd, prNumber, strategy = 'squash') {
188
188
  try {
189
- await this.execFile('gh', ['pr', 'merge', String(prNumber), `--${strategy}`, '--auto', '--delete-branch'], { cwd });
189
+ await this.execFile('gh', ['pr', 'merge', String(prNumber), `--${strategy}`, '--auto'], {
190
+ cwd,
191
+ });
190
192
  }
191
193
  catch (error) {
192
194
  const message = error instanceof Error ? error.message : String(error);
193
195
  const cause = error instanceof Error ? error : undefined;
194
196
  throw new GitPrError(message, GitPrErrorCode.MERGE_FAILED, cause);
195
197
  }
198
+ // Try to delete the remote branch gracefully — not fatal if it fails
199
+ // (e.g. branch already deleted by GitHub auto-delete, or permissions)
200
+ try {
201
+ await this.execFile('gh', [
202
+ 'api',
203
+ '--method',
204
+ 'DELETE',
205
+ `repos/{owner}/{repo}/git/refs/heads/${await this.getPrHeadBranch(cwd, prNumber)}`,
206
+ ], { cwd });
207
+ }
208
+ catch {
209
+ // Branch deletion is best-effort — log-level concern, not an error
210
+ }
211
+ }
212
+ async getPrHeadBranch(cwd, prNumber) {
213
+ const { stdout } = await this.execFile('gh', ['pr', 'view', String(prNumber), '--json', 'headRefName', '--jq', '.headRefName'], { cwd });
214
+ return stdout.trim();
196
215
  }
197
216
  async localMergeSquash(cwd, featureBranch, baseBranch, commitMessage, hasRemote = false) {
198
217
  try {
@@ -8,7 +8,7 @@ import type { QuestionOption } from '../../../../packages/core/src/domain/genera
8
8
  /**
9
9
  * Creates the @inquirer/select configuration for a single open question.
10
10
  */
11
- export declare function createQuestionSelectConfig(question: string, options: QuestionOption[], currentAnswer?: string): {
11
+ export declare function createQuestionSelectConfig(question: string, options: QuestionOption[], currentAnswer?: string, questionNumber?: number, totalQuestions?: number): {
12
12
  message: string;
13
13
  choices: {
14
14
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"prd-review-question.prompt.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/tui/prompts/prd-review-question.prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,cAAc,EAAE,EACzB,aAAa,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;EAcvB"}
1
+ {"version":3,"file":"prd-review-question.prompt.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/tui/prompts/prd-review-question.prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,cAAc,EAAE,EACzB,aAAa,CAAC,EAAE,MAAM,EACtB,cAAc,CAAC,EAAE,MAAM,EACvB,cAAc,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;EAmBxB"}
@@ -8,14 +8,17 @@ import { shepTheme } from '../themes/shep.theme.js';
8
8
  /**
9
9
  * Creates the @inquirer/select configuration for a single open question.
10
10
  */
11
- export function createQuestionSelectConfig(question, options, currentAnswer) {
11
+ export function createQuestionSelectConfig(question, options, currentAnswer, questionNumber, totalQuestions) {
12
12
  const choices = options.map((opt) => ({
13
13
  name: opt.option,
14
14
  value: opt.option,
15
15
  description: opt.description,
16
16
  }));
17
+ const prefix = questionNumber != null && totalQuestions != null
18
+ ? `[${questionNumber}/${totalQuestions}] `
19
+ : '';
17
20
  return {
18
- message: question,
21
+ message: `${prefix}${question}`,
19
22
  choices,
20
23
  default: currentAnswer,
21
24
  theme: shepTheme,
@@ -1 +1 @@
1
- {"version":3,"file":"prd-review.wizard.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/tui/wizards/prd-review.wizard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,yCAAyC,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2DAA2D,CAAC;AAC9F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAG5E,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,YAAY,CAAC;IACrB,iBAAiB,EAAE,uBAAuB,EAAE,CAAC;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,SAAS,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA4B/F"}
1
+ {"version":3,"file":"prd-review.wizard.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/tui/wizards/prd-review.wizard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,yCAAyC,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2DAA2D,CAAC;AAC9F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAG5E,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,YAAY,CAAC;IACrB,iBAAiB,EAAE,uBAAuB,EAAE,CAAC;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,SAAS,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA8B/F"}
@@ -20,8 +20,10 @@ import { shepTheme } from '../themes/shep.theme.js';
20
20
  */
21
21
  export async function prdReviewWizard(questions) {
22
22
  const changedSelections = [];
23
- for (const q of questions) {
24
- const selected = await select(createQuestionSelectConfig(q.question, q.options, q.selectedOption));
23
+ const total = questions.length;
24
+ for (let i = 0; i < total; i++) {
25
+ const q = questions[i];
26
+ const selected = await select(createQuestionSelectConfig(q.question, q.options, q.selectedOption, i + 1, total));
25
27
  if (selected !== q.selectedOption) {
26
28
  changedSelections.push({
27
29
  questionId: q.question,
@@ -1 +1 @@
1
- {"version":3,"file":"get-graph-data.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/(dashboard)/get-graph-data.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAE5E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAQ1C,wBAAsB,YAAY,IAAI,OAAO,CAAC;IAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IAAC,KAAK,EAAE,IAAI,EAAE,CAAA;CAAE,CAAC,CAuFxF"}
1
+ {"version":3,"file":"get-graph-data.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/(dashboard)/get-graph-data.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAE5E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C,wBAAsB,YAAY,IAAI,OAAO,CAAC;IAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IAAC,KAAK,EAAE,IAAI,EAAE,CAAA;CAAE,CAAC,CA+CxF"}
@@ -1,55 +1,14 @@
1
1
  import { resolve } from '../../lib/server-container.js';
2
- import { CiStatus } from '../../../../../packages/core/src/domain/generated/output.js';
3
2
  import { getSettings } from '../../../../../packages/core/src/infrastructure/services/settings.service.js';
4
3
  import { layoutWithDagre, CANVAS_LAYOUT_DEFAULTS } from '../../lib/layout-with-dagre.js';
5
4
  import { buildGraphNodes } from '../build-graph-nodes.js';
6
- const CI_STATUS_MAP = {
7
- success: CiStatus.Success,
8
- failure: CiStatus.Failure,
9
- pending: CiStatus.Pending,
10
- };
11
5
  export async function getGraphData() {
12
6
  const listFeatures = resolve('ListFeaturesUseCase');
13
7
  const listRepos = resolve('ListRepositoriesUseCase');
14
8
  const agentRunRepo = resolve('IAgentRunRepository');
15
- const gitPrService = resolve('IGitPrService');
16
- const featureRepo = resolve('IFeatureRepository');
17
9
  const [features, repositories] = await Promise.all([listFeatures.execute(), listRepos.execute()]);
18
- // Fetch live PR status for features with open PRs so the canvas
19
- // reflects the current GitHub state without waiting for the background watcher.
20
- await Promise.all(features
21
- .filter((f) => f.pr?.number)
22
- .map(async (feature) => {
23
- try {
24
- const updates = {};
25
- // Live mergeable status (only if not yet known)
26
- if (feature.pr.mergeable === undefined) {
27
- const mergeable = await gitPrService.getMergeableStatus(feature.repositoryPath, feature.pr.number);
28
- if (mergeable !== undefined)
29
- updates.mergeable = mergeable;
30
- }
31
- // Live CI status
32
- if (feature.branch) {
33
- const ciResult = await gitPrService
34
- .getCiStatus(feature.repositoryPath, feature.branch)
35
- .catch(() => undefined);
36
- if (ciResult) {
37
- const ciStatus = CI_STATUS_MAP[ciResult.status] ?? CiStatus.Pending;
38
- if (ciStatus !== feature.pr.ciStatus)
39
- updates.ciStatus = ciStatus;
40
- }
41
- }
42
- if (Object.keys(updates).length > 0) {
43
- feature.pr = { ...feature.pr, ...updates };
44
- featureRepo.update(feature).catch(() => {
45
- /* best-effort persist */
46
- });
47
- }
48
- }
49
- catch {
50
- // GitHub fetch failed — use cached value
51
- }
52
- }));
10
+ // PR/CI status is kept fresh by PrSyncWatcher (30s background poll).
11
+ // No live GitHub calls here use cached DB values for fast response.
53
12
  const featuresWithRuns = await Promise.all(features.map(async (feature) => {
54
13
  const run = feature.agentRunId ? await agentRunRepo.findById(feature.agentRunId) : null;
55
14
  return { feature, run };
@@ -1 +1 @@
1
- {"version":3,"file":"approve-feature.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/approve-feature.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,wBAAsB,cAAc,CAClC,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CA6BhD"}
1
+ {"version":3,"file":"approve-feature.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/approve-feature.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAK/E,wBAAsB,cAAc,CAClC,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAsChD"}
@@ -1,5 +1,7 @@
1
1
  'use server';
2
2
  import { resolve } from '../../lib/server-container.js';
3
+ import { AgentRunStatus } from '../../../../../packages/core/src/domain/generated/output.js';
4
+ const ERROR_STATUSES = new Set([AgentRunStatus.failed, AgentRunStatus.interrupted]);
3
5
  export async function approveFeature(featureId, payload) {
4
6
  if (!featureId.trim()) {
5
7
  return { approved: false, error: 'Feature id is required' };
@@ -13,6 +15,13 @@ export async function approveFeature(featureId, payload) {
13
15
  if (!feature.agentRunId) {
14
16
  return { approved: false, error: 'Feature has no agent run' };
15
17
  }
18
+ const runRepo = resolve('IAgentRunRepository');
19
+ const run = await runRepo.findById(feature.agentRunId);
20
+ if (run && ERROR_STATUSES.has(run.status)) {
21
+ const resumeUseCase = resolve('ResumeFeatureUseCase');
22
+ await resumeUseCase.execute(featureId, { promptPrefix: 'User approved. Please continue.' });
23
+ return { approved: true };
24
+ }
16
25
  const approveUseCase = resolve('ApproveAgentRunUseCase');
17
26
  const result = await approveUseCase.execute(feature.agentRunId, payload);
18
27
  if (!result.approved) {
@@ -8,6 +8,11 @@ export interface PhaseTimingData {
8
8
  approvalWaitMs?: number;
9
9
  inputTokens?: number;
10
10
  outputTokens?: number;
11
+ cacheCreationInputTokens?: number;
12
+ cacheReadInputTokens?: number;
13
+ costUsd?: number;
14
+ numTurns?: number;
15
+ durationApiMs?: number;
11
16
  }
12
17
  export interface RejectionFeedbackData {
13
18
  iteration: number;