@shepai/cli 1.165.0 → 1.166.0-pr513.7e8c227

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 (415) hide show
  1. package/apis/json-schema/Feature.yaml +17 -5
  2. package/apis/json-schema/FeatureMode.yaml +8 -0
  3. package/apis/json-schema/SdlcLifecycle.yaml +1 -0
  4. package/apis/json-schema/StageTimeouts.yaml +7 -2
  5. package/apis/json-schema/WorkflowConfig.yaml +10 -5
  6. package/dist/packages/core/src/application/ports/output/agents/feature-agent-process.interface.d.ts +2 -2
  7. package/dist/packages/core/src/application/ports/output/agents/feature-agent-process.interface.d.ts.map +1 -1
  8. package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.d.ts +4 -3
  9. package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.d.ts.map +1 -1
  10. package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.js +2 -2
  11. package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.js +2 -2
  12. package/dist/packages/core/src/application/use-cases/features/adopt-branch.use-case.d.ts.map +1 -1
  13. package/dist/packages/core/src/application/use-cases/features/adopt-branch.use-case.js +3 -2
  14. package/dist/packages/core/src/application/use-cases/features/check-and-unblock-features.use-case.js +2 -2
  15. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts.map +1 -1
  16. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js +18 -7
  17. package/dist/packages/core/src/application/use-cases/features/create/types.d.ts +3 -2
  18. package/dist/packages/core/src/application/use-cases/features/create/types.d.ts.map +1 -1
  19. package/dist/packages/core/src/application/use-cases/features/delete-feature.use-case.d.ts.map +1 -1
  20. package/dist/packages/core/src/application/use-cases/features/delete-feature.use-case.js +13 -0
  21. package/dist/packages/core/src/application/use-cases/features/promote/promote-exploration.use-case.d.ts +40 -0
  22. package/dist/packages/core/src/application/use-cases/features/promote/promote-exploration.use-case.d.ts.map +1 -0
  23. package/dist/packages/core/src/application/use-cases/features/promote/promote-exploration.use-case.js +125 -0
  24. package/dist/packages/core/src/application/use-cases/features/resume-feature.use-case.js +2 -2
  25. package/dist/packages/core/src/application/use-cases/features/start-feature.use-case.d.ts.map +1 -1
  26. package/dist/packages/core/src/application/use-cases/features/start-feature.use-case.js +5 -3
  27. package/dist/packages/core/src/domain/factories/settings-defaults.factory.d.ts.map +1 -1
  28. package/dist/packages/core/src/domain/factories/settings-defaults.factory.js +2 -1
  29. package/dist/packages/core/src/domain/generated/output.d.ts +28 -6
  30. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  31. package/dist/packages/core/src/domain/generated/output.js +7 -0
  32. package/dist/packages/core/src/domain/lifecycle-gates.d.ts +21 -6
  33. package/dist/packages/core/src/domain/lifecycle-gates.d.ts.map +1 -1
  34. package/dist/packages/core/src/domain/lifecycle-gates.js +25 -6
  35. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  36. package/dist/packages/core/src/infrastructure/di/container.js +5 -0
  37. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts +3 -1
  38. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts.map +1 -1
  39. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.js +10 -4
  40. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +3 -1
  41. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
  42. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +10 -2
  43. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/051-replace-fast-with-mode.d.ts +19 -0
  44. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/051-replace-fast-with-mode.d.ts.map +1 -0
  45. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/051-replace-fast-with-mode.js +46 -0
  46. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/052-add-stage-timeout-fast-implement-ms.d.ts +15 -0
  47. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/052-add-stage-timeout-fast-implement-ms.d.ts.map +1 -0
  48. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/052-add-stage-timeout-fast-implement-ms.js +22 -0
  49. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/052-replace-default-fast-mode-with-default-mode.d.ts +17 -0
  50. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/052-replace-default-fast-mode-with-default-mode.d.ts.map +1 -0
  51. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/052-replace-default-fast-mode-with-default-mode.js +37 -0
  52. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-exploration-max-iterations.d.ts +12 -0
  53. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-exploration-max-iterations.d.ts.map +1 -0
  54. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-exploration-max-iterations.js +17 -0
  55. package/dist/packages/core/src/infrastructure/repositories/sqlite-feature.repository.d.ts.map +1 -1
  56. package/dist/packages/core/src/infrastructure/repositories/sqlite-feature.repository.js +5 -3
  57. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.js +3 -3
  58. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/exploration-agent-graph.d.ts +362 -0
  59. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/exploration-agent-graph.d.ts.map +1 -0
  60. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/exploration-agent-graph.js +72 -0
  61. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.d.ts +20 -0
  62. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.d.ts.map +1 -1
  63. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts +68 -0
  64. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts.map +1 -1
  65. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts +2 -2
  66. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts.map +1 -1
  67. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.js +3 -3
  68. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts +2 -2
  69. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
  70. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +19 -8
  71. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/lifecycle-context.d.ts.map +1 -1
  72. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/lifecycle-context.js +1 -0
  73. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/apply-feedback.node.d.ts +18 -0
  74. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/apply-feedback.node.d.ts.map +1 -0
  75. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/apply-feedback.node.js +52 -0
  76. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -1
  77. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +3 -2
  78. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/apply-feedback.prompt.d.ts +24 -0
  79. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/apply-feedback.prompt.d.ts.map +1 -0
  80. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/apply-feedback.prompt.js +38 -0
  81. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/prototype-generate.prompt.d.ts +31 -0
  82. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/prototype-generate.prompt.d.ts.map +1 -0
  83. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/prototype-generate.prompt.js +240 -0
  84. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prototype-generate.node.d.ts +21 -0
  85. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prototype-generate.node.d.ts.map +1 -0
  86. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prototype-generate.node.js +134 -0
  87. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts +4 -0
  88. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts.map +1 -1
  89. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.js +17 -0
  90. package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.d.ts +1 -1
  91. package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.d.ts.map +1 -1
  92. package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.js +7 -4
  93. package/dist/src/presentation/cli/commands/feat/feedback.command.d.ts +12 -0
  94. package/dist/src/presentation/cli/commands/feat/feedback.command.d.ts.map +1 -0
  95. package/dist/src/presentation/cli/commands/feat/feedback.command.js +64 -0
  96. package/dist/src/presentation/cli/commands/feat/index.d.ts.map +1 -1
  97. package/dist/src/presentation/cli/commands/feat/index.js +5 -1
  98. package/dist/src/presentation/cli/commands/feat/new.command.d.ts.map +1 -1
  99. package/dist/src/presentation/cli/commands/feat/new.command.js +18 -5
  100. package/dist/src/presentation/cli/commands/feat/promote.command.d.ts +13 -0
  101. package/dist/src/presentation/cli/commands/feat/promote.command.d.ts.map +1 -0
  102. package/dist/src/presentation/cli/commands/feat/promote.command.js +41 -0
  103. package/dist/src/presentation/web/app/actions/create-feature.d.ts +3 -2
  104. package/dist/src/presentation/web/app/actions/create-feature.d.ts.map +1 -1
  105. package/dist/src/presentation/web/app/actions/create-feature.js +3 -3
  106. package/dist/src/presentation/web/app/actions/discard-exploration.d.ts +9 -0
  107. package/dist/src/presentation/web/app/actions/discard-exploration.d.ts.map +1 -0
  108. package/dist/src/presentation/web/app/actions/discard-exploration.js +29 -0
  109. package/dist/src/presentation/web/app/actions/get-workflow-defaults.d.ts +2 -1
  110. package/dist/src/presentation/web/app/actions/get-workflow-defaults.d.ts.map +1 -1
  111. package/dist/src/presentation/web/app/actions/get-workflow-defaults.js +2 -1
  112. package/dist/src/presentation/web/app/actions/promote-exploration.d.ts +11 -0
  113. package/dist/src/presentation/web/app/actions/promote-exploration.d.ts.map +1 -0
  114. package/dist/src/presentation/web/app/actions/promote-exploration.js +21 -0
  115. package/dist/src/presentation/web/app/actions/submit-exploration-feedback.d.ts +12 -0
  116. package/dist/src/presentation/web/app/actions/submit-exploration-feedback.d.ts.map +1 -0
  117. package/dist/src/presentation/web/app/actions/submit-exploration-feedback.js +40 -0
  118. package/dist/src/presentation/web/app/api/agent-events/route.d.ts.map +1 -1
  119. package/dist/src/presentation/web/app/api/agent-events/route.js +1 -0
  120. package/dist/src/presentation/web/app/build-feature-node-data.d.ts.map +1 -1
  121. package/dist/src/presentation/web/app/build-feature-node-data.js +4 -2
  122. package/dist/src/presentation/web/app/build-graph-nodes.js +4 -2
  123. package/dist/src/presentation/web/components/common/control-center-drawer/drawer-view.d.ts +1 -1
  124. package/dist/src/presentation/web/components/common/control-center-drawer/drawer-view.d.ts.map +1 -1
  125. package/dist/src/presentation/web/components/common/control-center-drawer/drawer-view.js +3 -0
  126. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.d.ts.map +1 -1
  127. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js +65 -1
  128. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts +3 -2
  129. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -1
  130. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +15 -11
  131. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts.map +1 -1
  132. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.js +2 -1
  133. package/dist/src/presentation/web/components/common/feature-create-drawer/mode-selector.d.ts +8 -0
  134. package/dist/src/presentation/web/components/common/feature-create-drawer/mode-selector.d.ts.map +1 -0
  135. package/dist/src/presentation/web/components/common/feature-create-drawer/mode-selector.js +33 -0
  136. package/dist/src/presentation/web/components/common/feature-create-drawer/mode-selector.stories.d.ts +10 -0
  137. package/dist/src/presentation/web/components/common/feature-create-drawer/mode-selector.stories.d.ts.map +1 -0
  138. package/dist/src/presentation/web/components/common/feature-create-drawer/mode-selector.stories.js +33 -0
  139. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts +6 -1
  140. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts.map +1 -1
  141. package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.js +16 -4
  142. package/dist/src/presentation/web/components/common/feature-drawer-tabs/prototype-tab.d.ts +11 -0
  143. package/dist/src/presentation/web/components/common/feature-drawer-tabs/prototype-tab.d.ts.map +1 -0
  144. package/dist/src/presentation/web/components/common/feature-drawer-tabs/prototype-tab.js +34 -0
  145. package/dist/src/presentation/web/components/common/feature-drawer-tabs/prototype-tab.stories.d.ts +16 -0
  146. package/dist/src/presentation/web/components/common/feature-drawer-tabs/prototype-tab.stories.d.ts.map +1 -0
  147. package/dist/src/presentation/web/components/common/feature-drawer-tabs/prototype-tab.stories.js +70 -0
  148. package/dist/src/presentation/web/components/common/feature-node/derive-feature-state.d.ts.map +1 -1
  149. package/dist/src/presentation/web/components/common/feature-node/derive-feature-state.js +2 -0
  150. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +6 -2
  151. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
  152. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.js +12 -0
  153. package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
  154. package/dist/src/presentation/web/components/common/feature-node/feature-node.js +7 -2
  155. package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
  156. package/dist/src/presentation/web/components/features/settings/settings-page-client.js +14 -6
  157. package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.d.ts.map +1 -1
  158. package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.js +1 -0
  159. package/dist/src/presentation/web/components/features/settings/workflow-settings-section.d.ts.map +1 -1
  160. package/dist/src/presentation/web/components/features/settings/workflow-settings-section.js +11 -0
  161. package/dist/src/presentation/web/components/features/settings/workflow-settings-section.stories.d.ts.map +1 -1
  162. package/dist/src/presentation/web/components/features/settings/workflow-settings-section.stories.js +5 -3
  163. package/dist/src/presentation/web/components/ui/toggle-group.d.ts +10 -0
  164. package/dist/src/presentation/web/components/ui/toggle-group.d.ts.map +1 -0
  165. package/dist/src/presentation/web/components/ui/toggle-group.js +22 -0
  166. package/dist/src/presentation/web/components/ui/toggle.d.ts +10 -0
  167. package/dist/src/presentation/web/components/ui/toggle.d.ts.map +1 -0
  168. package/dist/src/presentation/web/components/ui/toggle.js +26 -0
  169. package/dist/translations/ar/cli.json +24 -0
  170. package/dist/translations/ar/web.json +8 -2
  171. package/dist/translations/de/cli.json +24 -0
  172. package/dist/translations/de/web.json +8 -2
  173. package/dist/translations/en/cli.json +24 -0
  174. package/dist/translations/en/web.json +8 -2
  175. package/dist/translations/es/cli.json +24 -0
  176. package/dist/translations/es/web.json +8 -2
  177. package/dist/translations/fr/cli.json +24 -0
  178. package/dist/translations/fr/web.json +8 -2
  179. package/dist/translations/he/cli.json +24 -0
  180. package/dist/translations/he/web.json +8 -2
  181. package/dist/translations/pt/cli.json +24 -0
  182. package/dist/translations/pt/web.json +8 -2
  183. package/dist/translations/ru/cli.json +24 -0
  184. package/dist/translations/ru/web.json +8 -2
  185. package/dist/tsconfig.build.tsbuildinfo +1 -1
  186. package/package.json +1 -1
  187. package/web/.next/BUILD_ID +1 -1
  188. package/web/.next/build-manifest.json +2 -2
  189. package/web/.next/fallback-build-manifest.json +2 -2
  190. package/web/.next/prerender-manifest.json +3 -3
  191. package/web/.next/required-server-files.js +3 -3
  192. package/web/.next/required-server-files.json +3 -3
  193. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
  194. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  195. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  196. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
  197. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  198. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  199. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +30 -30
  200. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  201. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  202. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +119 -74
  203. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +2 -1
  204. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  205. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  206. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +119 -74
  207. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +2 -1
  208. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  209. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  210. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  211. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  212. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  213. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  214. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  215. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  216. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
  217. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  218. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  219. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +30 -30
  220. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  221. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  222. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +119 -74
  223. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +2 -1
  224. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  225. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  226. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +119 -74
  227. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +2 -1
  228. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  229. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  230. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
  231. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  232. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  233. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  234. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  235. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  236. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  237. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  238. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  239. package/web/.next/server/app/_global-error.html +2 -2
  240. package/web/.next/server/app/_global-error.rsc +1 -1
  241. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  242. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  243. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  244. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  245. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  246. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
  247. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  248. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  249. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  250. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  251. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  252. package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
  253. package/web/.next/server/app/settings/page/server-reference-manifest.json +9 -9
  254. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  255. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  256. package/web/.next/server/app/skills/page/server-reference-manifest.json +11 -11
  257. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  258. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  259. package/web/.next/server/app/tools/page/server-reference-manifest.json +11 -11
  260. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  261. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  262. package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
  263. package/web/.next/server/app/version/page.js.nft.json +1 -1
  264. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  265. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js +1 -1
  266. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js.map +1 -1
  267. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js +1 -1
  268. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js.map +1 -1
  269. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  270. package/web/.next/server/chunks/[root-of-the-server]__c78383b1._.js +1 -1
  271. package/web/.next/server/chunks/[root-of-the-server]__c78383b1._.js.map +1 -1
  272. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js +1 -1
  273. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
  274. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  275. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  276. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +3 -3
  277. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
  278. package/web/.next/server/chunks/ssr/[root-of-the-server]__1abe77bb._.js +2 -2
  279. package/web/.next/server/chunks/ssr/[root-of-the-server]__1abe77bb._.js.map +1 -1
  280. package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js +1 -1
  281. package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js.map +1 -1
  282. package/web/.next/server/chunks/ssr/[root-of-the-server]__2d0c3840._.js +1 -1
  283. package/web/.next/server/chunks/ssr/[root-of-the-server]__2d0c3840._.js.map +1 -1
  284. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  285. package/web/.next/server/chunks/ssr/[root-of-the-server]__4ed9b909._.js +1 -1
  286. package/web/.next/server/chunks/ssr/[root-of-the-server]__58a5b819._.js +4 -0
  287. package/web/.next/server/chunks/ssr/[root-of-the-server]__58a5b819._.js.map +1 -0
  288. package/web/.next/server/chunks/ssr/[root-of-the-server]__67a193c8._.js +4 -0
  289. package/web/.next/server/chunks/ssr/[root-of-the-server]__67a193c8._.js.map +1 -0
  290. package/web/.next/server/chunks/ssr/[root-of-the-server]__684a868c._.js +1 -1
  291. package/web/.next/server/chunks/ssr/[root-of-the-server]__684a868c._.js.map +1 -1
  292. package/web/.next/server/chunks/ssr/[root-of-the-server]__754fb18e._.js +4 -0
  293. package/web/.next/server/chunks/ssr/[root-of-the-server]__754fb18e._.js.map +1 -0
  294. package/web/.next/server/chunks/ssr/[root-of-the-server]__7562afc6._.js +2 -2
  295. package/web/.next/server/chunks/ssr/[root-of-the-server]__7562afc6._.js.map +1 -1
  296. package/web/.next/server/chunks/ssr/[root-of-the-server]__8b0aac03._.js +1 -1
  297. package/web/.next/server/chunks/ssr/[root-of-the-server]__96ba046b._.js +4 -0
  298. package/web/.next/server/chunks/ssr/[root-of-the-server]__96ba046b._.js.map +1 -0
  299. package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js +1 -1
  300. package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js.map +1 -1
  301. package/web/.next/server/chunks/ssr/[root-of-the-server]__c1262d08._.js +1 -1
  302. package/web/.next/server/chunks/ssr/[root-of-the-server]__c16bf5de._.js +1 -1
  303. package/web/.next/server/chunks/ssr/[root-of-the-server]__c16bf5de._.js.map +1 -1
  304. package/web/.next/server/chunks/ssr/[root-of-the-server]__dffa13c5._.js +1 -1
  305. package/web/.next/server/chunks/ssr/[root-of-the-server]__dffa13c5._.js.map +1 -1
  306. package/web/.next/server/chunks/ssr/_02e01240._.js +1 -1
  307. package/web/.next/server/chunks/ssr/_02e01240._.js.map +1 -1
  308. package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
  309. package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
  310. package/web/.next/server/chunks/ssr/_0727935d._.js +1 -1
  311. package/web/.next/server/chunks/ssr/_0727935d._.js.map +1 -1
  312. package/web/.next/server/chunks/ssr/_0dc06d07._.js +1 -1
  313. package/web/.next/server/chunks/ssr/_0dc06d07._.js.map +1 -1
  314. package/web/.next/server/chunks/ssr/_12c98a3d._.js +3 -0
  315. package/web/.next/server/chunks/ssr/_12c98a3d._.js.map +1 -0
  316. package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
  317. package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
  318. package/web/.next/server/chunks/ssr/_18886033._.js +1 -1
  319. package/web/.next/server/chunks/ssr/_18886033._.js.map +1 -1
  320. package/web/.next/server/chunks/ssr/_22e00a14._.js +1 -1
  321. package/web/.next/server/chunks/ssr/_22e00a14._.js.map +1 -1
  322. package/web/.next/server/chunks/ssr/_5119a3df._.js +1 -1
  323. package/web/.next/server/chunks/ssr/_5119a3df._.js.map +1 -1
  324. package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
  325. package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
  326. package/web/.next/server/chunks/ssr/{_44591fa7._.js → _5e0c43c0._.js} +2 -2
  327. package/web/.next/server/chunks/ssr/_5e0c43c0._.js.map +1 -0
  328. package/web/.next/server/chunks/ssr/_5eb460b1._.js +3 -0
  329. package/web/.next/server/chunks/ssr/_5eb460b1._.js.map +1 -0
  330. package/web/.next/server/chunks/ssr/_997b560b._.js +3 -0
  331. package/web/.next/server/chunks/ssr/_997b560b._.js.map +1 -0
  332. package/web/.next/server/chunks/ssr/_a5a5901d._.js +1 -1
  333. package/web/.next/server/chunks/ssr/_a5a5901d._.js.map +1 -1
  334. package/web/.next/server/chunks/ssr/{_616a8ac1._.js → _a8f53ee2._.js} +2 -2
  335. package/web/.next/server/chunks/ssr/_a8f53ee2._.js.map +1 -0
  336. package/web/.next/server/chunks/ssr/_acc5e43e._.js +9 -0
  337. package/web/.next/server/chunks/ssr/_acc5e43e._.js.map +1 -0
  338. package/web/.next/server/chunks/ssr/_ad09f271._.js +1 -1
  339. package/web/.next/server/chunks/ssr/_ad09f271._.js.map +1 -1
  340. package/web/.next/server/chunks/ssr/_c3f595c6._.js +1 -1
  341. package/web/.next/server/chunks/ssr/_c3f595c6._.js.map +1 -1
  342. package/web/.next/server/chunks/ssr/{_d582e961._.js → _cc456d44._.js} +2 -2
  343. package/web/.next/server/chunks/ssr/{_d582e961._.js.map → _cc456d44._.js.map} +1 -1
  344. package/web/.next/server/chunks/ssr/_ea9e1556._.js +1 -1
  345. package/web/.next/server/chunks/ssr/_ea9e1556._.js.map +1 -1
  346. package/web/.next/server/chunks/ssr/_f1ba9be6._.js +2 -2
  347. package/web/.next/server/chunks/ssr/_f1ba9be6._.js.map +1 -1
  348. package/web/.next/server/chunks/ssr/_f33cd07e._.js +2 -2
  349. package/web/.next/server/chunks/ssr/_f33cd07e._.js.map +1 -1
  350. package/web/.next/server/chunks/ssr/_f8b45233._.js +1 -1
  351. package/web/.next/server/chunks/ssr/_f8b45233._.js.map +1 -1
  352. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  353. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  354. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +1 -1
  355. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js.map +1 -1
  356. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_approve-feature_ts_9453ce8b._.js +3 -0
  357. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_approve-feature_ts_9453ce8b._.js.map +1 -0
  358. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
  359. package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js +1 -1
  360. package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js.map +1 -1
  361. package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js +1 -1
  362. package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js.map +1 -1
  363. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  364. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  365. package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js +1 -1
  366. package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js +1 -1
  367. package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js.map +1 -1
  368. package/web/.next/server/pages/500.html +2 -2
  369. package/web/.next/server/server-reference-manifest.js +1 -1
  370. package/web/.next/server/server-reference-manifest.json +303 -195
  371. package/web/.next/static/chunks/{90fbdf461b7ec652.js → 03d92643ee2190a4.js} +1 -1
  372. package/web/.next/static/chunks/{cad3cca5183ead26.js → 0811164ad80e0ca5.js} +1 -1
  373. package/web/.next/static/chunks/{2b3740e29ed9b3de.js → 0f6208eca3d7d895.js} +2 -2
  374. package/web/.next/static/chunks/{9461ce4baa99276f.js → 14838064627a5dcb.js} +1 -1
  375. package/web/.next/static/chunks/150c00c30ece763b.js +1 -0
  376. package/web/.next/static/chunks/246321074153cf07.js +5 -0
  377. package/web/.next/static/chunks/{ccdd1bc568f11f61.js → 2a641dc89a852e0c.js} +1 -1
  378. package/web/.next/static/chunks/{d5366257d6b9f855.js → 2a9af061f4fbe7f5.js} +1 -1
  379. package/web/.next/static/chunks/2ceebcc839ee0d4b.js +1 -0
  380. package/web/.next/static/chunks/3425ca88c85dddb9.js +1 -0
  381. package/web/.next/static/chunks/{5c6428d4679cd574.js → 453a86648b40099a.js} +1 -1
  382. package/web/.next/static/chunks/84ecdec18d323210.css +1 -0
  383. package/web/.next/static/chunks/85c9f8d4601354cd.js +1 -0
  384. package/web/.next/static/chunks/{65440524d7ee7d13.js → 884fceb3e6a67215.js} +1 -1
  385. package/web/.next/static/chunks/{61e13c3bd0f3cd25.js → 95ecd55bfbbc87aa.js} +3 -3
  386. package/web/.next/static/chunks/{bec9239427893a91.js → c1103035e0d56769.js} +1 -1
  387. package/web/.next/static/chunks/{21f9eacf5581b713.js → d5656afdef3b2ee5.js} +1 -1
  388. package/web/.next/static/chunks/e83613a2d0198a6a.js +1 -0
  389. package/web/.next/server/chunks/ssr/[root-of-the-server]__563e4faf._.js +0 -4
  390. package/web/.next/server/chunks/ssr/[root-of-the-server]__563e4faf._.js.map +0 -1
  391. package/web/.next/server/chunks/ssr/[root-of-the-server]__821a11c1._.js +0 -4
  392. package/web/.next/server/chunks/ssr/[root-of-the-server]__821a11c1._.js.map +0 -1
  393. package/web/.next/server/chunks/ssr/[root-of-the-server]__98740ee4._.js +0 -4
  394. package/web/.next/server/chunks/ssr/[root-of-the-server]__98740ee4._.js.map +0 -1
  395. package/web/.next/server/chunks/ssr/[root-of-the-server]__ba9f9e11._.js +0 -4
  396. package/web/.next/server/chunks/ssr/[root-of-the-server]__ba9f9e11._.js.map +0 -1
  397. package/web/.next/server/chunks/ssr/_44591fa7._.js.map +0 -1
  398. package/web/.next/server/chunks/ssr/_4d49a312._.js +0 -3
  399. package/web/.next/server/chunks/ssr/_4d49a312._.js.map +0 -1
  400. package/web/.next/server/chunks/ssr/_506a3bc3._.js +0 -9
  401. package/web/.next/server/chunks/ssr/_506a3bc3._.js.map +0 -1
  402. package/web/.next/server/chunks/ssr/_616a8ac1._.js.map +0 -1
  403. package/web/.next/server/chunks/ssr/_9215e9ec._.js +0 -3
  404. package/web/.next/server/chunks/ssr/_9215e9ec._.js.map +0 -1
  405. package/web/.next/server/chunks/ssr/node_modules__pnpm_1300ae39._.js +0 -3
  406. package/web/.next/server/chunks/ssr/node_modules__pnpm_1300ae39._.js.map +0 -1
  407. package/web/.next/static/chunks/1a3b885d3f886bcb.js +0 -1
  408. package/web/.next/static/chunks/1e6609edc3367244.css +0 -1
  409. package/web/.next/static/chunks/28ae5046faef6cec.js +0 -1
  410. package/web/.next/static/chunks/558d87d09cd1cc45.js +0 -1
  411. package/web/.next/static/chunks/c96dff98886884ee.js +0 -5
  412. package/web/.next/static/chunks/e4be686cb3bd28f0.js +0 -1
  413. /package/web/.next/static/{rkwlBjHfpnafQpJdBxN27 → i5nbrQ-16hfoxXQF80u89}/_buildManifest.js +0 -0
  414. /package/web/.next/static/{rkwlBjHfpnafQpJdBxN27 → i5nbrQ-16hfoxXQF80u89}/_clientMiddlewareManifest.json +0 -0
  415. /package/web/.next/static/{rkwlBjHfpnafQpJdBxN27 → i5nbrQ-16hfoxXQF80u89}/_ssgManifest.js +0 -0
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Apply-Feedback Prompt Builder
3
+ *
4
+ * Builds a context summary for the apply-feedback node. This is used
5
+ * internally by the graph to prepare context for the next
6
+ * prototype-generate iteration — it does NOT call the executor.
7
+ *
8
+ * The prompt text produced here serves as a structured summary of
9
+ * the current feedback and iteration context that the apply-feedback
10
+ * node stores in state for the next prototype-generate node to consume.
11
+ */
12
+ /**
13
+ * Build a context summary for the apply-feedback state transformation.
14
+ *
15
+ * Includes:
16
+ * 1. Current feedback text
17
+ * 2. Iteration count
18
+ * 3. Summary of prior feedback history
19
+ *
20
+ * This is stored in graph state, not sent to an executor.
21
+ */
22
+ export function buildApplyFeedbackContext(state, currentFeedback) {
23
+ const iterationCount = state.iterationCount ?? 0;
24
+ const feedbackHistory = state.feedbackHistory ?? [];
25
+ const sections = [];
26
+ sections.push(`## Feedback Applied — Iteration ${iterationCount + 1}`);
27
+ sections.push(`**Current feedback:** ${currentFeedback}`);
28
+ if (feedbackHistory.length > 0) {
29
+ sections.push(`**Prior feedback rounds:** ${feedbackHistory.length}`);
30
+ const recentPrior = feedbackHistory.slice(-3);
31
+ const startIdx = feedbackHistory.length - recentPrior.length;
32
+ recentPrior.forEach((fb, i) => {
33
+ const summary = fb.length > 80 ? `${fb.slice(0, 80)}...` : fb;
34
+ sections.push(`- Iteration ${startIdx + i + 1}: ${summary}`);
35
+ });
36
+ }
37
+ return sections.join('\n');
38
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Prototype-Generate Prompt Builder
3
+ *
4
+ * Builds the prompt for exploration mode prototype generation.
5
+ * Emphasizes quick prototyping, minimal scope, and throwaway quality.
6
+ * Includes iteration context (feedback history) for subsequent rounds.
7
+ *
8
+ * The prompt instructs the executor to produce a working prototype that
9
+ * demonstrates the idea — prioritizing concept demonstration over
10
+ * production quality.
11
+ */
12
+ import type { FeatureAgentState } from '../../state.js';
13
+ /**
14
+ * Build a feedback history section for the prompt.
15
+ * Recent feedback (last 3) gets full detail; older entries are summarized.
16
+ */
17
+ export declare function buildFeedbackHistorySection(feedbackHistory: string[]): string;
18
+ /**
19
+ * Build the prototype-generate prompt.
20
+ *
21
+ * The prompt includes:
22
+ * 1. Exploration mode instructions (speed over quality)
23
+ * 2. User's idea/query
24
+ * 3. Iteration context (feedback history from prior rounds)
25
+ * 4. CLAUDE.md content (if exists)
26
+ * 5. Shallow directory listing
27
+ *
28
+ * Instructs the executor to produce a quick, working prototype.
29
+ */
30
+ export declare function buildPrototypeGeneratePrompt(state: FeatureAgentState): string;
31
+ //# sourceMappingURL=prototype-generate.prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prototype-generate.prompt.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/prototype-generate.prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAgHxD;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,eAAe,EAAE,MAAM,EAAE,GAAG,MAAM,CAwB7E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAsF7E"}
@@ -0,0 +1,240 @@
1
+ /**
2
+ * Prototype-Generate Prompt Builder
3
+ *
4
+ * Builds the prompt for exploration mode prototype generation.
5
+ * Emphasizes quick prototyping, minimal scope, and throwaway quality.
6
+ * Includes iteration context (feedback history) for subsequent rounds.
7
+ *
8
+ * The prompt instructs the executor to produce a working prototype that
9
+ * demonstrates the idea — prioritizing concept demonstration over
10
+ * production quality.
11
+ */
12
+ import { readFileSync, readdirSync, statSync } from 'node:fs';
13
+ import { join } from 'node:path';
14
+ import yaml from 'js-yaml';
15
+ import { readSpecFile } from '../node-helpers.js';
16
+ /**
17
+ * Read a file from the worktree, returning empty string if not found.
18
+ */
19
+ function readWorktreeFile(worktreePath, filename) {
20
+ try {
21
+ return readFileSync(join(worktreePath, filename), 'utf-8');
22
+ }
23
+ catch {
24
+ return '';
25
+ }
26
+ }
27
+ /**
28
+ * Build a shallow directory listing (depth 1-2) of the worktree.
29
+ * Returns a tree-style string. Skips common noise directories.
30
+ */
31
+ function buildDirectoryListing(worktreePath) {
32
+ const SKIP_DIRS = new Set([
33
+ 'node_modules',
34
+ '.git',
35
+ '.next',
36
+ 'dist',
37
+ 'build',
38
+ 'coverage',
39
+ '.turbo',
40
+ '.cache',
41
+ '.shep',
42
+ ]);
43
+ const lines = [];
44
+ try {
45
+ const topLevel = readdirSync(worktreePath);
46
+ for (const entry of topLevel) {
47
+ if (SKIP_DIRS.has(entry))
48
+ continue;
49
+ const fullPath = join(worktreePath, entry);
50
+ let isDir = false;
51
+ try {
52
+ isDir = statSync(fullPath).isDirectory();
53
+ }
54
+ catch {
55
+ continue;
56
+ }
57
+ if (isDir) {
58
+ lines.push(`${entry}/`);
59
+ try {
60
+ const children = readdirSync(fullPath);
61
+ for (const child of children) {
62
+ if (SKIP_DIRS.has(child))
63
+ continue;
64
+ const childPath = join(fullPath, child);
65
+ let childIsDir = false;
66
+ try {
67
+ childIsDir = statSync(childPath).isDirectory();
68
+ }
69
+ catch {
70
+ continue;
71
+ }
72
+ lines.push(` ${child}${childIsDir ? '/' : ''}`);
73
+ }
74
+ }
75
+ catch {
76
+ // Cannot read subdirectory — skip
77
+ }
78
+ }
79
+ else {
80
+ lines.push(entry);
81
+ }
82
+ }
83
+ }
84
+ catch {
85
+ return '(unable to list directory)';
86
+ }
87
+ return lines.join('\n');
88
+ }
89
+ /**
90
+ * Extract the user query from spec.yaml's userQuery field.
91
+ * Falls back to the raw YAML content if parsing fails.
92
+ */
93
+ function extractUserQuery(specDir) {
94
+ const specContent = readSpecFile(specDir, 'spec.yaml');
95
+ if (!specContent) {
96
+ // For exploration mode, also check feature.yaml for the prompt
97
+ const featureContent = readSpecFile(specDir, 'feature.yaml');
98
+ if (!featureContent)
99
+ return '';
100
+ try {
101
+ const data = yaml.load(featureContent);
102
+ const userQuery = data?.userQuery ?? data?.feature?.description;
103
+ if (typeof userQuery === 'string' && userQuery.trim()) {
104
+ return userQuery.trim();
105
+ }
106
+ }
107
+ catch {
108
+ // Fall through
109
+ }
110
+ return featureContent;
111
+ }
112
+ try {
113
+ const data = yaml.load(specContent);
114
+ const userQuery = data?.userQuery;
115
+ if (typeof userQuery === 'string' && userQuery.trim()) {
116
+ return userQuery.trim();
117
+ }
118
+ }
119
+ catch {
120
+ // Fall through to raw content
121
+ }
122
+ return specContent;
123
+ }
124
+ /** Maximum number of recent feedback entries to include in full detail. */
125
+ const MAX_FULL_FEEDBACK_ENTRIES = 3;
126
+ /**
127
+ * Build a feedback history section for the prompt.
128
+ * Recent feedback (last 3) gets full detail; older entries are summarized.
129
+ */
130
+ export function buildFeedbackHistorySection(feedbackHistory) {
131
+ if (feedbackHistory.length === 0)
132
+ return '';
133
+ const sections = [];
134
+ if (feedbackHistory.length > MAX_FULL_FEEDBACK_ENTRIES) {
135
+ const older = feedbackHistory.slice(0, -MAX_FULL_FEEDBACK_ENTRIES);
136
+ sections.push('### Earlier feedback (summarized)');
137
+ older.forEach((fb, i) => {
138
+ // Truncate each older entry to a single line summary
139
+ const summary = fb.length > 100 ? `${fb.slice(0, 100)}...` : fb;
140
+ sections.push(`- Iteration ${i + 1}: ${summary}`);
141
+ });
142
+ sections.push('');
143
+ }
144
+ const recent = feedbackHistory.slice(-MAX_FULL_FEEDBACK_ENTRIES);
145
+ const startIdx = feedbackHistory.length - recent.length;
146
+ sections.push('### Recent feedback (act on these)');
147
+ recent.forEach((fb, i) => {
148
+ sections.push(`**Iteration ${startIdx + i + 1}:** ${fb}`);
149
+ });
150
+ return `## Feedback History\n\n${sections.join('\n')}`;
151
+ }
152
+ /**
153
+ * Build the prototype-generate prompt.
154
+ *
155
+ * The prompt includes:
156
+ * 1. Exploration mode instructions (speed over quality)
157
+ * 2. User's idea/query
158
+ * 3. Iteration context (feedback history from prior rounds)
159
+ * 4. CLAUDE.md content (if exists)
160
+ * 5. Shallow directory listing
161
+ *
162
+ * Instructs the executor to produce a quick, working prototype.
163
+ */
164
+ export function buildPrototypeGeneratePrompt(state) {
165
+ const cwd = state.worktreePath || state.repositoryPath;
166
+ const userQuery = extractUserQuery(state.specDir);
167
+ const iterationCount = state.iterationCount ?? 0;
168
+ const feedbackHistory = state.feedbackHistory ?? [];
169
+ // Read optional context files
170
+ const claudeMd = readWorktreeFile(cwd, 'CLAUDE.md');
171
+ const dirListing = buildDirectoryListing(cwd);
172
+ const isFirstIteration = iterationCount === 0;
173
+ const sections = [];
174
+ // Main instruction
175
+ sections.push(`You are a senior software engineer in EXPLORATION MODE — generating a quick prototype.
176
+
177
+ ## Mode: Exploration (Prototype)
178
+
179
+ **Priority: SPEED over quality. Show the concept, don't build for production.**
180
+
181
+ - Generate a working prototype that demonstrates the idea
182
+ - Keep scope minimal — focus on the core concept
183
+ - Skip edge cases, error handling, and production polish
184
+ - Write just enough code to show how the idea would work
185
+ - This is throwaway code — it will be rewritten if the idea is promoted to a real feature`);
186
+ // User request
187
+ if (isFirstIteration) {
188
+ sections.push(`## User's Idea
189
+
190
+ ${userQuery}`);
191
+ }
192
+ else {
193
+ sections.push(`## User's Idea (Original)
194
+
195
+ ${userQuery}
196
+
197
+ ## Current Iteration: ${iterationCount + 1}
198
+
199
+ This is iteration ${iterationCount + 1} of the prototype. Review the feedback below and update the prototype accordingly.`);
200
+ }
201
+ // Feedback history
202
+ const feedbackSection = buildFeedbackHistorySection(feedbackHistory);
203
+ if (feedbackSection) {
204
+ sections.push(feedbackSection);
205
+ }
206
+ // Implementation instructions
207
+ sections.push(`## Implementation Instructions
208
+
209
+ 1. ${isFirstIteration ? 'Create' : 'Update'} the prototype based on ${isFirstIteration ? 'the idea above' : 'the feedback above'}
210
+ 2. Make the code functional — it should compile and demonstrate the concept
211
+ 3. Commit your work with a conventional commit message (e.g. \`feat(domain): prototype workspace grouping\`)
212
+ 4. Do NOT write tests — this is a prototype
213
+ 5. Do NOT run linters or builds — speed is the priority
214
+ 6. Do NOT push to remote
215
+
216
+ ## Working Directory
217
+
218
+ ${cwd}`);
219
+ if (claudeMd) {
220
+ sections.push(`## Project Guidelines (CLAUDE.md)
221
+
222
+ ${claudeMd}`);
223
+ }
224
+ if (dirListing && dirListing !== '(unable to list directory)') {
225
+ sections.push(`## Project Structure
226
+
227
+ \`\`\`
228
+ ${dirListing}
229
+ \`\`\``);
230
+ }
231
+ sections.push(`## Constraints
232
+
233
+ - SPEED is the priority — generate a working prototype quickly
234
+ - Keep changes minimal and focused on demonstrating the concept
235
+ - Do NOT modify any spec YAML files
236
+ - Do NOT enter plan mode — implement directly
237
+ - Do NOT ask questions — make reasonable assumptions and proceed
238
+ - You MUST create or modify actual code files — a plan or summary alone is not acceptable`);
239
+ return sections.join('\n\n');
240
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Prototype-Generate Node
3
+ *
4
+ * Exploration mode node that generates a quick prototype by calling the
5
+ * agent executor with an exploration-focused prompt. After generation,
6
+ * interrupts for user feedback. Uses shared utilities (retryExecute,
7
+ * createNodeLogger) but NOT executeNode() which is coupled to approval gates.
8
+ *
9
+ * Follows the same factory pattern as other nodes: takes executor
10
+ * dependency, returns async (state) => Partial<FeatureAgentState>.
11
+ */
12
+ import type { IAgentExecutor } from '../../../../../application/ports/output/agents/agent-executor.interface.js';
13
+ import type { FeatureAgentState } from '../state.js';
14
+ /**
15
+ * Factory that creates the prototype-generate node function.
16
+ *
17
+ * @param executor - The agent executor to use for prototype generation
18
+ * @returns A LangGraph node function
19
+ */
20
+ export declare function createPrototypeGenerateNode(executor: IAgentExecutor): (state: FeatureAgentState) => Promise<Partial<FeatureAgentState>>;
21
+ //# sourceMappingURL=prototype-generate.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prototype-generate.node.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/prototype-generate.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+DAA+D,CAAC;AACpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAOrD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,cAAc,IAGpD,OAAO,iBAAiB,KAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAuH7E"}
@@ -0,0 +1,134 @@
1
+ /**
2
+ * Prototype-Generate Node
3
+ *
4
+ * Exploration mode node that generates a quick prototype by calling the
5
+ * agent executor with an exploration-focused prompt. After generation,
6
+ * interrupts for user feedback. Uses shared utilities (retryExecute,
7
+ * createNodeLogger) but NOT executeNode() which is coupled to approval gates.
8
+ *
9
+ * Follows the same factory pattern as other nodes: takes executor
10
+ * dependency, returns async (state) => Partial<FeatureAgentState>.
11
+ */
12
+ import { interrupt, isGraphBubbleUp } from '@langchain/langgraph';
13
+ import { createNodeLogger, buildExecutorOptions, retryExecute } from './node-helpers.js';
14
+ import { reportNodeStart } from '../heartbeat.js';
15
+ import { recordPhaseStart, recordPhaseEnd } from '../phase-timing-context.js';
16
+ import { updateNodeLifecycle } from '../lifecycle-context.js';
17
+ import { buildPrototypeGeneratePrompt } from './prompts/prototype-generate.prompt.js';
18
+ /**
19
+ * Factory that creates the prototype-generate node function.
20
+ *
21
+ * @param executor - The agent executor to use for prototype generation
22
+ * @returns A LangGraph node function
23
+ */
24
+ export function createPrototypeGenerateNode(executor) {
25
+ const log = createNodeLogger('prototype-generate');
26
+ return async (state) => {
27
+ log.activate();
28
+ const iterationCount = state.iterationCount ?? 0;
29
+ const maxIterations = state.maxIterations ?? 10;
30
+ log.info(`Starting prototype generation (iteration ${iterationCount + 1}/${maxIterations})`);
31
+ reportNodeStart('prototype-generate');
32
+ await updateNodeLifecycle('prototype-generate');
33
+ // On resume from interrupt, LangGraph re-executes the node function.
34
+ // If _approvalAction is set, the worker has resumed us with a user action.
35
+ // Return early and let the conditional edge route to apply-feedback or END.
36
+ if (state._approvalAction !== null && state._approvalAction !== undefined) {
37
+ if (state._approvalAction === 'rejected') {
38
+ log.info('Resumed with feedback — routing to apply-feedback');
39
+ return {
40
+ currentNode: 'prototype-generate',
41
+ explorationStatus: 'applying-feedback',
42
+ messages: ['[prototype-generate] Resumed — routing feedback to apply-feedback'],
43
+ };
44
+ }
45
+ else {
46
+ log.info('Resumed with promote/discard — routing to END');
47
+ return {
48
+ currentNode: 'prototype-generate',
49
+ explorationStatus: 'promoting',
50
+ messages: ['[prototype-generate] Resumed — routing to END (promote/discard)'],
51
+ _approvalAction: null,
52
+ };
53
+ }
54
+ }
55
+ // Check if max iterations reached — force user to promote or discard
56
+ if (iterationCount >= maxIterations) {
57
+ log.info(`Max iterations (${maxIterations}) reached — interrupting for final action`);
58
+ interrupt({
59
+ node: 'prototype-generate',
60
+ message: `Maximum iterations (${maxIterations}) reached. Please promote or discard this exploration.`,
61
+ iterationCount,
62
+ maxIterations,
63
+ forceAction: true,
64
+ });
65
+ // If we get here after resume, the graph router will handle the action
66
+ return {
67
+ currentNode: 'prototype-generate',
68
+ explorationStatus: 'waiting-feedback',
69
+ messages: [
70
+ `[prototype-generate] Max iterations reached (${maxIterations}) — awaiting promote/discard`,
71
+ ],
72
+ };
73
+ }
74
+ const startTime = Date.now();
75
+ const prompt = buildPrototypeGeneratePrompt(state);
76
+ const timingId = await recordPhaseStart('prototype-generate', {
77
+ prompt,
78
+ modelId: state.model,
79
+ agentType: executor.agentType,
80
+ });
81
+ try {
82
+ const options = buildExecutorOptions(state, undefined, 'prototype-generate');
83
+ log.info(`Executing agent at cwd=${options.cwd}`);
84
+ log.info(`Prompt length: ${prompt.length} chars`);
85
+ const result = await retryExecute(executor, prompt, options, { logger: log });
86
+ const durationMs = Date.now() - startTime;
87
+ const elapsed = (durationMs / 1000).toFixed(1);
88
+ log.info(`Prototype generated (${result.result.length} chars, ${elapsed}s)`);
89
+ await recordPhaseEnd(timingId, durationMs, {
90
+ inputTokens: result.usage?.inputTokens,
91
+ outputTokens: result.usage?.outputTokens,
92
+ cacheCreationInputTokens: result.usage?.cacheCreationInputTokens,
93
+ cacheReadInputTokens: result.usage?.cacheReadInputTokens,
94
+ costUsd: result.usage?.costUsd,
95
+ numTurns: result.usage?.numTurns,
96
+ durationApiMs: result.usage?.durationApiMs,
97
+ exitCode: 'success',
98
+ });
99
+ const newIterationCount = iterationCount + 1;
100
+ // Interrupt for user feedback
101
+ log.info(`Interrupting for feedback (iteration ${newIterationCount}/${maxIterations})`);
102
+ interrupt({
103
+ node: 'prototype-generate',
104
+ message: `Prototype iteration ${newIterationCount} complete. Review and provide feedback, promote, or discard.`,
105
+ iterationCount: newIterationCount,
106
+ maxIterations,
107
+ resultSummary: result.result.slice(0, 500),
108
+ });
109
+ // After resume, return the updated state
110
+ return {
111
+ currentNode: 'prototype-generate',
112
+ iterationCount: newIterationCount,
113
+ explorationStatus: 'waiting-feedback',
114
+ messages: [
115
+ `[prototype-generate] Iteration ${newIterationCount} complete (${result.result.length} chars, ${elapsed}s)`,
116
+ ],
117
+ };
118
+ }
119
+ catch (err) {
120
+ if (isGraphBubbleUp(err))
121
+ throw err;
122
+ const message = err instanceof Error ? err.message : String(err);
123
+ const durationMs = Date.now() - startTime;
124
+ const elapsed = (durationMs / 1000).toFixed(1);
125
+ log.error(`${message} (after ${elapsed}s)`);
126
+ await recordPhaseEnd(timingId, durationMs, {
127
+ exitCode: 'error',
128
+ errorMessage: message.slice(0, 1000),
129
+ });
130
+ // Throw so LangGraph does NOT checkpoint this node as "completed"
131
+ throw new Error(`[prototype-generate] ${message}`);
132
+ }
133
+ };
134
+ }
@@ -59,6 +59,10 @@ export declare const FeatureAgentAnnotation: import("@langchain/langgraph").Anno
59
59
  ciFixAttempts: import("@langchain/langgraph").BinaryOperatorAggregate<number, number>;
60
60
  ciFixHistory: import("@langchain/langgraph").BinaryOperatorAggregate<CiFixRecord[], CiFixRecord[]>;
61
61
  ciFixStatus: import("@langchain/langgraph").BinaryOperatorAggregate<"success" | "timeout" | "idle" | "watching" | "fixing" | "exhausted", "success" | "timeout" | "idle" | "watching" | "fixing" | "exhausted">;
62
+ iterationCount: import("@langchain/langgraph").BinaryOperatorAggregate<number, number>;
63
+ maxIterations: import("@langchain/langgraph").BinaryOperatorAggregate<number, number>;
64
+ feedbackHistory: import("@langchain/langgraph").BinaryOperatorAggregate<string[], string[]>;
65
+ explorationStatus: import("@langchain/langgraph").BinaryOperatorAggregate<"generating" | "waiting-feedback" | "applying-feedback" | "promoting" | "discarding" | undefined, "generating" | "waiting-feedback" | "applying-feedback" | "promoting" | "discarding" | undefined>;
62
66
  }>;
63
67
  export type FeatureAgentState = typeof FeatureAgentAnnotation.State;
64
68
  //# sourceMappingURL=state.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/state.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAEzF;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwHjC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,OAAO,sBAAsB,CAAC,KAAK,CAAC"}
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/state.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAEzF;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2IjC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,OAAO,sBAAsB,CAAC,KAAK,CAAC"}
@@ -126,4 +126,21 @@ export const FeatureAgentAnnotation = Annotation.Root({
126
126
  reducer: (_prev, next) => next,
127
127
  default: () => 'idle',
128
128
  }),
129
+ // --- Exploration mode state channels ---
130
+ iterationCount: Annotation({
131
+ reducer: (_prev, next) => next,
132
+ default: () => 0,
133
+ }),
134
+ maxIterations: Annotation({
135
+ reducer: (_prev, next) => next,
136
+ default: () => 10,
137
+ }),
138
+ feedbackHistory: Annotation({
139
+ reducer: (prev, next) => [...prev, ...next],
140
+ default: () => [],
141
+ }),
142
+ explorationStatus: Annotation({
143
+ reducer: (_prev, next) => next,
144
+ default: () => undefined,
145
+ }),
129
146
  });
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import type { ISpecInitializerService, SpecInitializerResult } from '../../../application/ports/output/services/spec-initializer.interface.js';
9
9
  export declare class SpecInitializerService implements ISpecInitializerService {
10
- initialize(basePath: string, slug: string, featureNumber: number, description: string, mode?: 'fast'): Promise<SpecInitializerResult>;
10
+ initialize(basePath: string, slug: string, featureNumber: number, description: string, mode?: 'fast' | 'exploration'): Promise<SpecInitializerResult>;
11
11
  /**
12
12
  * Scan specs/ for existing NNN-* directories and return the next available number.
13
13
  * Uses the DB-derived hint as a minimum, but always respects filesystem state.
@@ -1 +1 @@
1
- {"version":3,"file":"spec-initializer.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/spec/spec-initializer.service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EACV,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,mEAAmE,CAAC;AA8P3E,qBAAa,sBAAuB,YAAW,uBAAuB;IAC9D,UAAU,CACd,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,qBAAqB,CAAC;IAqCjC;;;OAGG;YACW,iBAAiB;CAoBhC"}
1
+ {"version":3,"file":"spec-initializer.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/spec/spec-initializer.service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EACV,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,mEAAmE,CAAC;AA8P3E,qBAAa,sBAAuB,YAAW,uBAAuB;IAC9D,UAAU,CACd,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE,MAAM,GAAG,aAAa,GAC5B,OAAO,CAAC,qBAAqB,CAAC;IAwCjC;;;OAGG;YACW,iBAAiB;CAoBhC"}
@@ -254,10 +254,13 @@ export class SpecInitializerService {
254
254
  const timestamp = now.toISOString().replace(/\.\d{3}Z$/, 'Z');
255
255
  const vars = { nnn, slug, featureNumber: resolvedNumber, date, timestamp, description };
256
256
  // In fast mode, write feature.yaml + spec.yaml (spec.yaml stores the user query
257
- // which the fast-implement node reads; no research/plan/tasks needed)
258
- const templates = mode === 'fast'
259
- ? TEMPLATES.filter(({ filename }) => filename === 'feature.yaml' || filename === 'spec.yaml')
260
- : TEMPLATES;
257
+ // which the fast-implement node reads; no research/plan/tasks needed).
258
+ // In exploration mode, write only feature.yaml (no SDLC spec artifacts).
259
+ const templates = mode === 'exploration'
260
+ ? TEMPLATES.filter(({ filename }) => filename === 'feature.yaml')
261
+ : mode === 'fast'
262
+ ? TEMPLATES.filter(({ filename }) => filename === 'feature.yaml' || filename === 'spec.yaml')
263
+ : TEMPLATES;
261
264
  // Write template files
262
265
  await Promise.all(templates.map(({ filename, content }) => writeFile(join(specDir, filename), applyTemplate(content, vars), 'utf-8')));
263
266
  return { specDir, featureNumber: nnn };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Feature Feedback Command
3
+ *
4
+ * Sends feedback on an exploration prototype to iterate on the design.
5
+ * Resumes the interrupted exploration agent graph with the provided feedback.
6
+ *
7
+ * Usage:
8
+ * shep feat feedback <id> <feedback-text>
9
+ */
10
+ import { Command } from 'commander';
11
+ export declare function createFeedbackCommand(): Command;
12
+ //# sourceMappingURL=feedback.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feedback.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/feat/feedback.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,wBAAgB,qBAAqB,IAAI,OAAO,CA+D/C"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Feature Feedback Command
3
+ *
4
+ * Sends feedback on an exploration prototype to iterate on the design.
5
+ * Resumes the interrupted exploration agent graph with the provided feedback.
6
+ *
7
+ * Usage:
8
+ * shep feat feedback <id> <feedback-text>
9
+ */
10
+ import { Command } from 'commander';
11
+ import { container } from '../../../../../packages/core/src/infrastructure/di/container.js';
12
+ import { RejectAgentRunUseCase } from '../../../../../packages/core/src/application/use-cases/agents/reject-agent-run.use-case.js';
13
+ import { FeatureMode, SdlcLifecycle } from '../../../../../packages/core/src/domain/generated/output.js';
14
+ import { colors, messages } from '../../ui/index.js';
15
+ import { getCliI18n } from '../../i18n.js';
16
+ export function createFeedbackCommand() {
17
+ const t = getCliI18n().t;
18
+ return new Command('feedback')
19
+ .description(t('cli:commands.feat.feedback.description'))
20
+ .argument('<id>', t('cli:commands.feat.feedback.idArgument'))
21
+ .argument('<feedback>', t('cli:commands.feat.feedback.feedbackArgument'))
22
+ .action(async (featureId, feedback) => {
23
+ try {
24
+ const featureRepo = container.resolve('IFeatureRepository');
25
+ const runRepo = container.resolve('IAgentRunRepository');
26
+ const feature = (await featureRepo.findById(featureId)) ?? (await featureRepo.findByIdPrefix(featureId));
27
+ if (!feature) {
28
+ throw new Error(`Feature not found: ${featureId}`);
29
+ }
30
+ if (feature.mode !== FeatureMode.Exploration ||
31
+ feature.lifecycle !== SdlcLifecycle.Exploring) {
32
+ messages.error(t('cli:commands.feat.feedback.notExploration', {
33
+ name: feature.name,
34
+ mode: feature.mode,
35
+ lifecycle: feature.lifecycle,
36
+ }));
37
+ process.exitCode = 1;
38
+ return;
39
+ }
40
+ if (!feature.agentRunId) {
41
+ throw new Error(`Feature "${feature.name}" has no agent run`);
42
+ }
43
+ const run = await runRepo.findById(feature.agentRunId);
44
+ if (!run) {
45
+ throw new Error(`Agent run not found: ${feature.agentRunId}`);
46
+ }
47
+ const rejectUseCase = container.resolve(RejectAgentRunUseCase);
48
+ const result = await rejectUseCase.execute(run.id, feedback);
49
+ if (!result.rejected) {
50
+ throw new Error(result.reason);
51
+ }
52
+ messages.newline();
53
+ messages.success(t('cli:commands.feat.feedback.feedbackSubmitted', { name: feature.name }));
54
+ console.log(` ${colors.muted(t('cli:commands.feat.feedback.iterationLabel'))} ${result.iteration}`);
55
+ console.log(` ${colors.muted(t('cli:commands.feat.feedback.agentLabel'))} ${t('cli:commands.feat.feedback.agentIterating')}`);
56
+ messages.newline();
57
+ }
58
+ catch (error) {
59
+ const err = error instanceof Error ? error : new Error(String(error));
60
+ messages.error(t('cli:commands.feat.feedback.failedToSubmit'), err);
61
+ process.exitCode = 1;
62
+ }
63
+ });
64
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/feat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBpC;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAgB3C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/feat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkBpC;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAkB3C"}
@@ -24,6 +24,8 @@ import { createLogsCommand } from './logs.command.js';
24
24
  import { createAdoptCommand } from './adopt.command.js';
25
25
  import { createArchiveCommand } from './archive.command.js';
26
26
  import { createUnarchiveCommand } from './unarchive.command.js';
27
+ import { createFeedbackCommand } from './feedback.command.js';
28
+ import { createPromoteCommand } from './promote.command.js';
27
29
  /**
28
30
  * Create the feat command group
29
31
  */
@@ -42,5 +44,7 @@ export function createFeatCommand() {
42
44
  .addCommand(createLogsCommand())
43
45
  .addCommand(createAdoptCommand())
44
46
  .addCommand(createArchiveCommand())
45
- .addCommand(createUnarchiveCommand());
47
+ .addCommand(createUnarchiveCommand())
48
+ .addCommand(createFeedbackCommand())
49
+ .addCommand(createPromoteCommand());
46
50
  }