@agile-vibe-coding/avc 0.1.0 → 0.2.3

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 (290) hide show
  1. package/README.md +2 -0
  2. package/cli/agent-loader.js +21 -0
  3. package/cli/agents/agent-selector.md +129 -0
  4. package/cli/agents/architecture-recommender.md +418 -0
  5. package/cli/agents/database-deep-dive.md +470 -0
  6. package/cli/agents/database-recommender.md +634 -0
  7. package/cli/agents/doc-distributor.md +176 -0
  8. package/cli/agents/documentation-updater.md +203 -0
  9. package/cli/agents/epic-story-decomposer.md +280 -0
  10. package/cli/agents/feature-context-generator.md +91 -0
  11. package/cli/agents/gap-checker-epic.md +52 -0
  12. package/cli/agents/impact-checker-story.md +51 -0
  13. package/cli/agents/migration-guide-generator.md +305 -0
  14. package/cli/agents/mission-scope-generator.md +79 -0
  15. package/cli/agents/mission-scope-validator.md +112 -0
  16. package/cli/agents/project-context-extractor.md +107 -0
  17. package/cli/agents/project-documentation-creator.json +226 -0
  18. package/cli/agents/project-documentation-creator.md +595 -0
  19. package/cli/agents/question-prefiller.md +269 -0
  20. package/cli/agents/refiner-epic.md +39 -0
  21. package/cli/agents/refiner-story.md +42 -0
  22. package/cli/agents/solver-epic-api.json +15 -0
  23. package/cli/agents/solver-epic-api.md +39 -0
  24. package/cli/agents/solver-epic-backend.json +15 -0
  25. package/cli/agents/solver-epic-backend.md +39 -0
  26. package/cli/agents/solver-epic-cloud.json +15 -0
  27. package/cli/agents/solver-epic-cloud.md +39 -0
  28. package/cli/agents/solver-epic-data.json +15 -0
  29. package/cli/agents/solver-epic-data.md +39 -0
  30. package/cli/agents/solver-epic-database.json +15 -0
  31. package/cli/agents/solver-epic-database.md +39 -0
  32. package/cli/agents/solver-epic-developer.json +15 -0
  33. package/cli/agents/solver-epic-developer.md +39 -0
  34. package/cli/agents/solver-epic-devops.json +15 -0
  35. package/cli/agents/solver-epic-devops.md +39 -0
  36. package/cli/agents/solver-epic-frontend.json +15 -0
  37. package/cli/agents/solver-epic-frontend.md +39 -0
  38. package/cli/agents/solver-epic-mobile.json +15 -0
  39. package/cli/agents/solver-epic-mobile.md +39 -0
  40. package/cli/agents/solver-epic-qa.json +15 -0
  41. package/cli/agents/solver-epic-qa.md +39 -0
  42. package/cli/agents/solver-epic-security.json +15 -0
  43. package/cli/agents/solver-epic-security.md +39 -0
  44. package/cli/agents/solver-epic-solution-architect.json +15 -0
  45. package/cli/agents/solver-epic-solution-architect.md +39 -0
  46. package/cli/agents/solver-epic-test-architect.json +15 -0
  47. package/cli/agents/solver-epic-test-architect.md +39 -0
  48. package/cli/agents/solver-epic-ui.json +15 -0
  49. package/cli/agents/solver-epic-ui.md +39 -0
  50. package/cli/agents/solver-epic-ux.json +15 -0
  51. package/cli/agents/solver-epic-ux.md +39 -0
  52. package/cli/agents/solver-story-api.json +15 -0
  53. package/cli/agents/solver-story-api.md +39 -0
  54. package/cli/agents/solver-story-backend.json +15 -0
  55. package/cli/agents/solver-story-backend.md +39 -0
  56. package/cli/agents/solver-story-cloud.json +15 -0
  57. package/cli/agents/solver-story-cloud.md +39 -0
  58. package/cli/agents/solver-story-data.json +15 -0
  59. package/cli/agents/solver-story-data.md +39 -0
  60. package/cli/agents/solver-story-database.json +15 -0
  61. package/cli/agents/solver-story-database.md +39 -0
  62. package/cli/agents/solver-story-developer.json +15 -0
  63. package/cli/agents/solver-story-developer.md +39 -0
  64. package/cli/agents/solver-story-devops.json +15 -0
  65. package/cli/agents/solver-story-devops.md +39 -0
  66. package/cli/agents/solver-story-frontend.json +15 -0
  67. package/cli/agents/solver-story-frontend.md +39 -0
  68. package/cli/agents/solver-story-mobile.json +15 -0
  69. package/cli/agents/solver-story-mobile.md +39 -0
  70. package/cli/agents/solver-story-qa.json +15 -0
  71. package/cli/agents/solver-story-qa.md +39 -0
  72. package/cli/agents/solver-story-security.json +15 -0
  73. package/cli/agents/solver-story-security.md +39 -0
  74. package/cli/agents/solver-story-solution-architect.json +15 -0
  75. package/cli/agents/solver-story-solution-architect.md +39 -0
  76. package/cli/agents/solver-story-test-architect.json +15 -0
  77. package/cli/agents/solver-story-test-architect.md +39 -0
  78. package/cli/agents/solver-story-ui.json +15 -0
  79. package/cli/agents/solver-story-ui.md +39 -0
  80. package/cli/agents/solver-story-ux.json +15 -0
  81. package/cli/agents/solver-story-ux.md +39 -0
  82. package/cli/agents/story-doc-enricher.md +133 -0
  83. package/cli/agents/suggestion-business-analyst.md +88 -0
  84. package/cli/agents/suggestion-deployment-architect.md +263 -0
  85. package/cli/agents/suggestion-product-manager.md +129 -0
  86. package/cli/agents/suggestion-security-specialist.md +156 -0
  87. package/cli/agents/suggestion-technical-architect.md +269 -0
  88. package/cli/agents/suggestion-ux-researcher.md +93 -0
  89. package/cli/agents/task-subtask-decomposer.md +188 -0
  90. package/cli/agents/validator-documentation.json +152 -0
  91. package/cli/agents/validator-documentation.md +453 -0
  92. package/cli/agents/validator-epic-api.json +93 -0
  93. package/cli/agents/validator-epic-api.md +137 -0
  94. package/cli/agents/validator-epic-backend.json +93 -0
  95. package/cli/agents/validator-epic-backend.md +130 -0
  96. package/cli/agents/validator-epic-cloud.json +93 -0
  97. package/cli/agents/validator-epic-cloud.md +137 -0
  98. package/cli/agents/validator-epic-data.json +93 -0
  99. package/cli/agents/validator-epic-data.md +130 -0
  100. package/cli/agents/validator-epic-database.json +93 -0
  101. package/cli/agents/validator-epic-database.md +137 -0
  102. package/cli/agents/validator-epic-developer.json +74 -0
  103. package/cli/agents/validator-epic-developer.md +153 -0
  104. package/cli/agents/validator-epic-devops.json +74 -0
  105. package/cli/agents/validator-epic-devops.md +153 -0
  106. package/cli/agents/validator-epic-frontend.json +74 -0
  107. package/cli/agents/validator-epic-frontend.md +153 -0
  108. package/cli/agents/validator-epic-mobile.json +93 -0
  109. package/cli/agents/validator-epic-mobile.md +130 -0
  110. package/cli/agents/validator-epic-qa.json +93 -0
  111. package/cli/agents/validator-epic-qa.md +130 -0
  112. package/cli/agents/validator-epic-security.json +74 -0
  113. package/cli/agents/validator-epic-security.md +154 -0
  114. package/cli/agents/validator-epic-solution-architect.json +74 -0
  115. package/cli/agents/validator-epic-solution-architect.md +156 -0
  116. package/cli/agents/validator-epic-test-architect.json +93 -0
  117. package/cli/agents/validator-epic-test-architect.md +130 -0
  118. package/cli/agents/validator-epic-ui.json +93 -0
  119. package/cli/agents/validator-epic-ui.md +130 -0
  120. package/cli/agents/validator-epic-ux.json +93 -0
  121. package/cli/agents/validator-epic-ux.md +130 -0
  122. package/cli/agents/validator-selector.md +211 -0
  123. package/cli/agents/validator-story-api.json +104 -0
  124. package/cli/agents/validator-story-api.md +152 -0
  125. package/cli/agents/validator-story-backend.json +104 -0
  126. package/cli/agents/validator-story-backend.md +152 -0
  127. package/cli/agents/validator-story-cloud.json +104 -0
  128. package/cli/agents/validator-story-cloud.md +152 -0
  129. package/cli/agents/validator-story-data.json +104 -0
  130. package/cli/agents/validator-story-data.md +152 -0
  131. package/cli/agents/validator-story-database.json +104 -0
  132. package/cli/agents/validator-story-database.md +152 -0
  133. package/cli/agents/validator-story-developer.json +104 -0
  134. package/cli/agents/validator-story-developer.md +152 -0
  135. package/cli/agents/validator-story-devops.json +104 -0
  136. package/cli/agents/validator-story-devops.md +152 -0
  137. package/cli/agents/validator-story-frontend.json +104 -0
  138. package/cli/agents/validator-story-frontend.md +152 -0
  139. package/cli/agents/validator-story-mobile.json +104 -0
  140. package/cli/agents/validator-story-mobile.md +152 -0
  141. package/cli/agents/validator-story-qa.json +104 -0
  142. package/cli/agents/validator-story-qa.md +152 -0
  143. package/cli/agents/validator-story-security.json +104 -0
  144. package/cli/agents/validator-story-security.md +152 -0
  145. package/cli/agents/validator-story-solution-architect.json +104 -0
  146. package/cli/agents/validator-story-solution-architect.md +152 -0
  147. package/cli/agents/validator-story-test-architect.json +104 -0
  148. package/cli/agents/validator-story-test-architect.md +152 -0
  149. package/cli/agents/validator-story-ui.json +104 -0
  150. package/cli/agents/validator-story-ui.md +152 -0
  151. package/cli/agents/validator-story-ux.json +104 -0
  152. package/cli/agents/validator-story-ux.md +152 -0
  153. package/cli/ansi-colors.js +21 -0
  154. package/cli/build-docs.js +298 -0
  155. package/cli/ceremony-history.js +369 -0
  156. package/cli/command-logger.js +245 -0
  157. package/cli/components/static-output.js +63 -0
  158. package/cli/console-output-manager.js +94 -0
  159. package/cli/docs-sync.js +306 -0
  160. package/cli/epic-story-validator.js +1174 -0
  161. package/cli/evaluation-prompts.js +1008 -0
  162. package/cli/execution-context.js +195 -0
  163. package/cli/generate-summary-table.js +340 -0
  164. package/cli/index.js +3 -25
  165. package/cli/init-model-config.js +697 -0
  166. package/cli/init.js +1765 -100
  167. package/cli/kanban-server-manager.js +228 -0
  168. package/cli/llm-claude.js +109 -0
  169. package/cli/llm-gemini.js +115 -0
  170. package/cli/llm-mock.js +233 -0
  171. package/cli/llm-openai.js +233 -0
  172. package/cli/llm-provider.js +300 -0
  173. package/cli/llm-token-limits.js +102 -0
  174. package/cli/llm-verifier.js +454 -0
  175. package/cli/logger.js +32 -5
  176. package/cli/message-constants.js +58 -0
  177. package/cli/message-manager.js +334 -0
  178. package/cli/message-types.js +96 -0
  179. package/cli/messaging-api.js +297 -0
  180. package/cli/model-pricing.js +169 -0
  181. package/cli/model-query-engine.js +468 -0
  182. package/cli/model-recommendation-analyzer.js +495 -0
  183. package/cli/model-selector.js +269 -0
  184. package/cli/output-buffer.js +107 -0
  185. package/cli/process-manager.js +332 -0
  186. package/cli/repl-ink.js +5840 -504
  187. package/cli/repl-old.js +4 -4
  188. package/cli/seed-processor.js +792 -0
  189. package/cli/sprint-planning-processor.js +1813 -0
  190. package/cli/template-processor.js +2306 -108
  191. package/cli/templates/project.md +25 -8
  192. package/cli/templates/vitepress-config.mts.template +34 -0
  193. package/cli/token-tracker.js +520 -0
  194. package/cli/tools/generate-story-validators.js +317 -0
  195. package/cli/tools/generate-validators.js +669 -0
  196. package/cli/update-checker.js +19 -17
  197. package/cli/update-notifier.js +4 -4
  198. package/cli/validation-router.js +605 -0
  199. package/cli/verification-tracker.js +563 -0
  200. package/kanban/README.md +386 -0
  201. package/kanban/client/README.md +205 -0
  202. package/kanban/client/components.json +20 -0
  203. package/kanban/client/dist/assets/index-CiD8PS2e.js +306 -0
  204. package/kanban/client/dist/assets/index-nLh0m82Q.css +1 -0
  205. package/kanban/client/dist/index.html +16 -0
  206. package/kanban/client/dist/vite.svg +1 -0
  207. package/kanban/client/index.html +15 -0
  208. package/kanban/client/package-lock.json +9442 -0
  209. package/kanban/client/package.json +44 -0
  210. package/kanban/client/postcss.config.js +6 -0
  211. package/kanban/client/public/vite.svg +1 -0
  212. package/kanban/client/src/App.jsx +622 -0
  213. package/kanban/client/src/components/ProjectFileEditorPopup.jsx +117 -0
  214. package/kanban/client/src/components/ceremony/AskArchPopup.jsx +416 -0
  215. package/kanban/client/src/components/ceremony/AskModelPopup.jsx +616 -0
  216. package/kanban/client/src/components/ceremony/CeremonyWorkflowModal.jsx +946 -0
  217. package/kanban/client/src/components/ceremony/EpicStorySelectionModal.jsx +254 -0
  218. package/kanban/client/src/components/ceremony/SponsorCallModal.jsx +619 -0
  219. package/kanban/client/src/components/ceremony/SprintPlanningModal.jsx +704 -0
  220. package/kanban/client/src/components/ceremony/steps/ArchitectureStep.jsx +150 -0
  221. package/kanban/client/src/components/ceremony/steps/CompleteStep.jsx +154 -0
  222. package/kanban/client/src/components/ceremony/steps/DatabaseStep.jsx +202 -0
  223. package/kanban/client/src/components/ceremony/steps/DeploymentStep.jsx +123 -0
  224. package/kanban/client/src/components/ceremony/steps/MissionStep.jsx +106 -0
  225. package/kanban/client/src/components/ceremony/steps/ReviewAnswersStep.jsx +125 -0
  226. package/kanban/client/src/components/ceremony/steps/RunningStep.jsx +228 -0
  227. package/kanban/client/src/components/kanban/CardDetailModal.jsx +559 -0
  228. package/kanban/client/src/components/kanban/EpicSection.jsx +146 -0
  229. package/kanban/client/src/components/kanban/FilterToolbar.jsx +222 -0
  230. package/kanban/client/src/components/kanban/GroupingSelector.jsx +57 -0
  231. package/kanban/client/src/components/kanban/KanbanBoard.jsx +211 -0
  232. package/kanban/client/src/components/kanban/KanbanCard.jsx +138 -0
  233. package/kanban/client/src/components/kanban/KanbanColumn.jsx +90 -0
  234. package/kanban/client/src/components/kanban/RefineWorkItemPopup.jsx +789 -0
  235. package/kanban/client/src/components/layout/LoadingScreen.jsx +82 -0
  236. package/kanban/client/src/components/process/ProcessMonitorBar.jsx +80 -0
  237. package/kanban/client/src/components/settings/AgentEditorPopup.jsx +171 -0
  238. package/kanban/client/src/components/settings/AgentsTab.jsx +353 -0
  239. package/kanban/client/src/components/settings/ApiKeysTab.jsx +113 -0
  240. package/kanban/client/src/components/settings/CeremonyModelsTab.jsx +98 -0
  241. package/kanban/client/src/components/settings/CostThresholdsTab.jsx +94 -0
  242. package/kanban/client/src/components/settings/ModelPricingTab.jsx +204 -0
  243. package/kanban/client/src/components/settings/ServersTab.jsx +121 -0
  244. package/kanban/client/src/components/settings/SettingsModal.jsx +84 -0
  245. package/kanban/client/src/components/stats/CostModal.jsx +353 -0
  246. package/kanban/client/src/components/ui/badge.jsx +27 -0
  247. package/kanban/client/src/components/ui/dialog.jsx +121 -0
  248. package/kanban/client/src/components/ui/tabs.jsx +85 -0
  249. package/kanban/client/src/hooks/__tests__/useGrouping.test.js +232 -0
  250. package/kanban/client/src/hooks/useGrouping.js +118 -0
  251. package/kanban/client/src/hooks/useWebSocket.js +120 -0
  252. package/kanban/client/src/lib/__tests__/api.test.js +196 -0
  253. package/kanban/client/src/lib/__tests__/status-grouping.test.js +94 -0
  254. package/kanban/client/src/lib/api.js +401 -0
  255. package/kanban/client/src/lib/status-grouping.js +144 -0
  256. package/kanban/client/src/lib/utils.js +11 -0
  257. package/kanban/client/src/main.jsx +10 -0
  258. package/kanban/client/src/store/__tests__/kanbanStore.test.js +164 -0
  259. package/kanban/client/src/store/ceremonyStore.js +172 -0
  260. package/kanban/client/src/store/filterStore.js +201 -0
  261. package/kanban/client/src/store/kanbanStore.js +115 -0
  262. package/kanban/client/src/store/processStore.js +65 -0
  263. package/kanban/client/src/store/sprintPlanningStore.js +33 -0
  264. package/kanban/client/src/styles/globals.css +59 -0
  265. package/kanban/client/tailwind.config.js +77 -0
  266. package/kanban/client/vite.config.js +28 -0
  267. package/kanban/client/vitest.config.js +28 -0
  268. package/kanban/dev-start.sh +47 -0
  269. package/kanban/package.json +12 -0
  270. package/kanban/server/index.js +516 -0
  271. package/kanban/server/routes/ceremony.js +305 -0
  272. package/kanban/server/routes/costs.js +157 -0
  273. package/kanban/server/routes/processes.js +50 -0
  274. package/kanban/server/routes/settings.js +303 -0
  275. package/kanban/server/routes/websocket.js +276 -0
  276. package/kanban/server/routes/work-items.js +347 -0
  277. package/kanban/server/services/CeremonyService.js +1190 -0
  278. package/kanban/server/services/FileSystemScanner.js +95 -0
  279. package/kanban/server/services/FileWatcher.js +144 -0
  280. package/kanban/server/services/HierarchyBuilder.js +196 -0
  281. package/kanban/server/services/ProcessRegistry.js +122 -0
  282. package/kanban/server/services/WorkItemReader.js +123 -0
  283. package/kanban/server/services/WorkItemRefineService.js +510 -0
  284. package/kanban/server/start.js +49 -0
  285. package/kanban/server/utils/kanban-logger.js +132 -0
  286. package/kanban/server/utils/markdown.js +91 -0
  287. package/kanban/server/utils/status-grouping.js +107 -0
  288. package/kanban/server/workers/sponsor-call-worker.js +84 -0
  289. package/kanban/server/workers/sprint-planning-worker.js +130 -0
  290. package/package.json +34 -7
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@avc/kanban-client",
3
+ "private": true,
4
+ "version": "0.1.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "vite build",
9
+ "preview": "vite preview",
10
+ "lint": "eslint .",
11
+ "test": "vitest run",
12
+ "test:watch": "vitest",
13
+ "test:coverage": "vitest run --coverage"
14
+ },
15
+ "dependencies": {
16
+ "clsx": "^2.1.1",
17
+ "framer-motion": "^11.15.0",
18
+ "lucide-react": "^0.468.0",
19
+ "react": "^18.3.1",
20
+ "react-dom": "^18.3.1",
21
+ "react-markdown": "^9.0.1",
22
+ "recharts": "^3.7.0",
23
+ "tailwind-merge": "^2.6.0",
24
+ "zustand": "^5.0.2"
25
+ },
26
+ "devDependencies": {
27
+ "@tailwindcss/typography": "^0.5.19",
28
+ "@testing-library/react": "^16.1.0",
29
+ "@types/react": "^18.3.18",
30
+ "@types/react-dom": "^18.3.5",
31
+ "@vitejs/plugin-react": "^4.3.4",
32
+ "autoprefixer": "^10.4.20",
33
+ "eslint": "^9.18.0",
34
+ "eslint-plugin-react": "^7.37.2",
35
+ "eslint-plugin-react-hooks": "^5.0.0",
36
+ "eslint-plugin-react-refresh": "^0.4.16",
37
+ "jsdom": "^28.0.0",
38
+ "postcss": "^8.4.49",
39
+ "tailwindcss": "^3.4.17",
40
+ "tailwindcss-animate": "^1.0.7",
41
+ "vite": "^6.0.5",
42
+ "vitest": "^2.1.9"
43
+ }
44
+ }
@@ -0,0 +1,6 @@
1
+ export default {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {},
5
+ },
6
+ };
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -0,0 +1,622 @@
1
+ import { useEffect, useState, useMemo, useRef } from 'react';
2
+ import { Pencil, Check, X, BookOpen, Settings, DollarSign } from 'lucide-react';
3
+ import { getHealth, getBoardTitle, updateBoardTitle, getDocsUrl, getSettings, getModels, getCostSummary, getProjectStatus, getCeremonyStatus, continuePastCostLimit, cancelCeremony } from './lib/api';
4
+ import { useWebSocket } from './hooks/useWebSocket';
5
+ import { useKanbanStore } from './store/kanbanStore';
6
+ import { useFilterStore } from './store/filterStore';
7
+ import { useCeremonyStore } from './store/ceremonyStore';
8
+ import { useSprintPlanningStore } from './store/sprintPlanningStore';
9
+ import { useProcessStore } from './store/processStore';
10
+ import { KanbanBoard } from './components/kanban/KanbanBoard';
11
+ import { ProjectFileEditorPopup } from './components/ProjectFileEditorPopup';
12
+ import { FilterToolbar } from './components/kanban/FilterToolbar';
13
+ import { ProcessMonitorBar } from './components/process/ProcessMonitorBar';
14
+ import { CardDetailModal } from './components/kanban/CardDetailModal';
15
+ import { SponsorCallModal } from './components/ceremony/SponsorCallModal';
16
+ import { SprintPlanningModal } from './components/ceremony/SprintPlanningModal';
17
+ import { EpicStorySelectionModal } from './components/ceremony/EpicStorySelectionModal';
18
+ import { SettingsModal } from './components/settings/SettingsModal';
19
+ import { CostModal } from './components/stats/CostModal';
20
+ import { groupItemsByColumn } from './lib/status-grouping';
21
+
22
+ function App() {
23
+ const [health, setHealth] = useState(null);
24
+ const [selectedItem, setSelectedItem] = useState(null);
25
+ const [modalOpen, setModalOpen] = useState(false);
26
+
27
+ // Board title state
28
+ const [boardTitle, setBoardTitle] = useState('AVC Kanban Board');
29
+ const [docsUrl, setDocsUrl] = useState('http://localhost:4173');
30
+ const [editingTitle, setEditingTitle] = useState(false);
31
+ const [titleInput, setTitleInput] = useState('');
32
+ const titleInputRef = useRef(null);
33
+
34
+ // Settings modal state
35
+ const [settingsOpen, setSettingsOpen] = useState(false);
36
+ const [settingsSnapshot, setSettingsSnapshot] = useState(null);
37
+ const [modelsSnapshot, setModelsSnapshot] = useState([]);
38
+
39
+ // Cost chip + modal state
40
+ const [costSummary, setCostSummary] = useState(null);
41
+ const [costModalOpen, setCostModalOpen] = useState(false);
42
+
43
+ // Cost-limit pause dialog — { cost, threshold, runningType } when ceremony hits limit
44
+ const [costLimitPending, setCostLimitPending] = useState(null);
45
+
46
+ // Refine work item state — { itemId, jobId, message } / { itemId, jobId, result } / { itemId, jobId, error }
47
+ const [refineProgress, setRefineProgress] = useState(null);
48
+ const [refineResult, setRefineResult] = useState(null);
49
+ const [refineError, setRefineError] = useState(null);
50
+
51
+ // Project file status + editor popup
52
+ const [projectFilesStatus, setProjectFilesStatus] = useState({ docExists: false });
53
+ const [projectFilesLoaded, setProjectFilesLoaded] = useState(false);
54
+ const [editingProjectFile, setEditingProjectFile] = useState(null); // 'doc' | null
55
+
56
+ // Zustand stores
57
+ const { workItems, loadWorkItems, loading, error } = useKanbanStore();
58
+ const { typeFilters, searchQuery } = useFilterStore();
59
+ const {
60
+ isOpen: ceremonyOpen,
61
+ openWizard,
62
+ resetWizard,
63
+ ceremonyStatus,
64
+ setCeremonyStatus,
65
+ setCeremonyResult,
66
+ setCeremonyError,
67
+ appendProgress,
68
+ appendMissionProgress,
69
+ setProgressLog: setCeremonyProgressLog,
70
+ setWizardStep,
71
+ setPaused: setCeremonyPaused,
72
+ setProcessId: setCeremonyProcessId,
73
+ } = useCeremonyStore();
74
+
75
+ const {
76
+ isOpen: sprintPlanningOpen,
77
+ openModal: openSprintPlanning,
78
+ closeModal: closeSprintPlanning,
79
+ reopenModal: reopenSprintPlanning,
80
+ setStep: setSprintPlanningStep,
81
+ setStatus: setSprintPlanningStatus,
82
+ appendProgress: appendSprintPlanningProgress,
83
+ setProgressLog: setSprintPlanningProgressLog,
84
+ setResult: setSprintPlanningResult,
85
+ setError: setSprintPlanningError,
86
+ status: sprintPlanningStatus,
87
+ setPaused: setSprintPlanningPaused,
88
+ setProcessId: setSprintPlanningProcessId,
89
+ setDecomposedHierarchy: setSprintPlanningDecomposedHierarchy,
90
+ } = useSprintPlanningStore();
91
+
92
+ const { handleProcessMessage } = useProcessStore();
93
+
94
+ // Get filtered items for navigation
95
+ const filteredItems = useMemo(() => {
96
+ let filtered = workItems.filter((item) => typeFilters[item.type]);
97
+
98
+ if (searchQuery.trim()) {
99
+ const query = searchQuery.toLowerCase();
100
+ filtered = filtered.filter(
101
+ (item) =>
102
+ item.name.toLowerCase().includes(query) ||
103
+ item.id.toLowerCase().includes(query) ||
104
+ (item.description && item.description.toLowerCase().includes(query)) ||
105
+ (item.epicName && item.epicName.toLowerCase().includes(query))
106
+ );
107
+ }
108
+
109
+ return filtered;
110
+ }, [workItems, typeFilters, searchQuery]);
111
+
112
+ // WebSocket connection for real-time updates + ceremony events
113
+ const { wsStatus } = useWebSocket({
114
+ onMessage: (message) => {
115
+ if (message.type === 'refresh' || message.type === 'work-item-update') {
116
+ loadWorkItems();
117
+ } else if (message.type === 'ceremony:progress') {
118
+ appendProgress({ type: 'progress', message: message.message });
119
+ } else if (message.type === 'ceremony:substep') {
120
+ appendProgress({ type: 'substep', substep: message.substep, meta: message.meta });
121
+ } else if (message.type === 'ceremony:detail') {
122
+ appendProgress({ type: 'detail', detail: message.detail });
123
+ } else if (message.type === 'ceremony:complete') {
124
+ setCostLimitPending(null);
125
+ setCeremonyStatus('complete');
126
+ setCeremonyResult(message.result);
127
+ setWizardStep(7);
128
+ loadWorkItems();
129
+ getProjectStatus().then(setProjectFilesStatus).catch(() => { });
130
+ } else if (message.type === 'ceremony:error') {
131
+ setCeremonyStatus('error');
132
+ setCeremonyError(message.error);
133
+ } else if (message.type === 'mission:progress') {
134
+ appendMissionProgress({ step: message.step, message: message.message });
135
+ } else if (message.type === 'ceremony:cost-limit') {
136
+ setCostLimitPending({ cost: message.cost, threshold: message.threshold, runningType: message.runningType });
137
+ } else if (message.type === 'cost:update') {
138
+ getCostSummary().then(setCostSummary).catch(() => { });
139
+ } else if (message.type === 'sprint-planning:progress') {
140
+ appendSprintPlanningProgress({ type: 'progress', message: message.message });
141
+ } else if (message.type === 'sprint-planning:substep') {
142
+ appendSprintPlanningProgress({ type: 'substep', substep: message.substep, meta: message.meta });
143
+ } else if (message.type === 'sprint-planning:detail') {
144
+ appendSprintPlanningProgress({ type: 'detail', detail: message.detail });
145
+ } else if (message.type === 'sprint-planning:decomposition-complete') {
146
+ setSprintPlanningDecomposedHierarchy(message.hierarchy);
147
+ setSprintPlanningStatus('awaiting-selection');
148
+ setSprintPlanningStep(3);
149
+ } else if (message.type === 'sprint-planning:complete') {
150
+ setCostLimitPending(null);
151
+ setSprintPlanningStatus('complete');
152
+ setSprintPlanningResult(message.result);
153
+ setSprintPlanningDecomposedHierarchy(null);
154
+ setSprintPlanningStep(4);
155
+ loadWorkItems();
156
+ } else if (message.type === 'sprint-planning:error') {
157
+ setSprintPlanningStatus('error');
158
+ setSprintPlanningError(message.error);
159
+ } else if (message.type === 'sprint-planning:paused') {
160
+ setSprintPlanningPaused(true);
161
+ } else if (message.type === 'sprint-planning:resumed') {
162
+ setSprintPlanningPaused(false);
163
+ } else if (message.type === 'sprint-planning:cancelled') {
164
+ setCostLimitPending(null);
165
+ setSprintPlanningStatus('idle');
166
+ setSprintPlanningStep(1);
167
+ setSprintPlanningPaused(false);
168
+ setSprintPlanningDecomposedHierarchy(null);
169
+ } else if (message.type === 'ceremony:paused') {
170
+ setCeremonyPaused(true);
171
+ } else if (message.type === 'ceremony:resumed') {
172
+ setCeremonyPaused(false);
173
+ } else if (message.type === 'ceremony:cancelled') {
174
+ setCostLimitPending(null);
175
+ setCeremonyStatus('idle');
176
+ setWizardStep(1);
177
+ setCeremonyPaused(false);
178
+ } else if (message.type === 'refine:progress') {
179
+ setRefineProgress({ itemId: message.itemId, jobId: message.jobId, message: message.message });
180
+ } else if (message.type === 'refine:complete') {
181
+ setRefineProgress(null);
182
+ setRefineResult({ itemId: message.itemId, jobId: message.jobId, result: message.result });
183
+ } else if (message.type === 'refine:error') {
184
+ setRefineProgress(null);
185
+ setRefineError({ itemId: message.itemId, jobId: message.jobId, error: message.error });
186
+ } else if (message.type === 'process:started') {
187
+ handleProcessMessage(message);
188
+ if (message.processType === 'sprint-planning') {
189
+ setSprintPlanningProcessId(message.processId);
190
+ } else if (message.processType === 'sponsor-call') {
191
+ setCeremonyProcessId(message.processId);
192
+ }
193
+ } else if (message.type === 'process:list' || message.type === 'process:status') {
194
+ handleProcessMessage(message);
195
+ } else if (message.type === 'ceremony:sync') {
196
+ // Server sends this on WebSocket connect when a ceremony is already running.
197
+ // Restores client state without requiring an HTTP round-trip.
198
+ const cs = message.ceremonyStatus;
199
+ if (cs?.status === 'running' || cs?.status === 'cost-limit-pending' || cs?.status === 'awaiting-selection') {
200
+ if (cs.runningType === 'sprint-planning') {
201
+ if (cs.status === 'awaiting-selection') {
202
+ setSprintPlanningStatus('awaiting-selection');
203
+ setSprintPlanningDecomposedHierarchy(cs.decomposedHierarchy || null);
204
+ setSprintPlanningStep(3);
205
+ } else {
206
+ setSprintPlanningStatus('running');
207
+ }
208
+ if (cs.processId) setSprintPlanningProcessId(cs.processId);
209
+ if (cs.progress?.length) setSprintPlanningProgressLog(cs.progress);
210
+ } else if (cs.runningType === 'sponsor-call') {
211
+ setCeremonyStatus('running');
212
+ if (cs.processId) setCeremonyProcessId(cs.processId);
213
+ if (cs.progress?.length) setCeremonyProgressLog(cs.progress);
214
+ }
215
+ if (cs.status === 'cost-limit-pending' && cs.costLimitInfo) {
216
+ setCostLimitPending({ ...cs.costLimitInfo, runningType: cs.runningType });
217
+ }
218
+ }
219
+ }
220
+ },
221
+ });
222
+
223
+ // Initial data load
224
+ useEffect(() => {
225
+ const init = async () => {
226
+ try {
227
+ const [healthData, title, docsUrlData, filesStatus, ceremonyState] = await Promise.all([
228
+ getHealth(),
229
+ getBoardTitle(),
230
+ getDocsUrl(),
231
+ getProjectStatus(),
232
+ getCeremonyStatus().catch(() => null),
233
+ ]);
234
+ setHealth(healthData);
235
+ setBoardTitle(title);
236
+ setDocsUrl(docsUrlData);
237
+ setProjectFilesStatus(filesStatus);
238
+
239
+ // Restore running ceremony state BEFORE revealing projectFilesLoaded so the
240
+ // board never shows "Start" buttons for an already-running ceremony.
241
+ if (ceremonyState?.status === 'running' || ceremonyState?.status === 'cost-limit-pending' || ceremonyState?.status === 'awaiting-selection') {
242
+ if (ceremonyState.runningType === 'sprint-planning') {
243
+ if (ceremonyState.status === 'awaiting-selection') {
244
+ setSprintPlanningStatus('awaiting-selection');
245
+ setSprintPlanningDecomposedHierarchy(ceremonyState.decomposedHierarchy || null);
246
+ setSprintPlanningStep(3);
247
+ } else {
248
+ setSprintPlanningStatus('running');
249
+ }
250
+ if (ceremonyState.processId) setSprintPlanningProcessId(ceremonyState.processId);
251
+ if (ceremonyState.progress?.length) setSprintPlanningProgressLog(ceremonyState.progress);
252
+ } else if (ceremonyState.runningType === 'sponsor-call') {
253
+ setCeremonyStatus('running');
254
+ if (ceremonyState.processId) setCeremonyProcessId(ceremonyState.processId);
255
+ if (ceremonyState.progress?.length) setCeremonyProgressLog(ceremonyState.progress);
256
+ }
257
+ if (ceremonyState.status === 'cost-limit-pending' && ceremonyState.costLimitInfo) {
258
+ setCostLimitPending({ ...ceremonyState.costLimitInfo, runningType: ceremonyState.runningType });
259
+ }
260
+ }
261
+
262
+ setProjectFilesLoaded(true);
263
+
264
+ await loadWorkItems();
265
+ } catch (err) {
266
+ console.error('Initialization error:', err);
267
+ }
268
+ };
269
+
270
+ init();
271
+ }, [loadWorkItems]);
272
+
273
+ // Focus input when editing starts
274
+ useEffect(() => {
275
+ if (editingTitle) {
276
+ titleInputRef.current?.focus();
277
+ titleInputRef.current?.select();
278
+ }
279
+ }, [editingTitle]);
280
+
281
+ // Poll cost summary every 60 seconds
282
+ useEffect(() => {
283
+ getCostSummary().then(setCostSummary).catch(() => { });
284
+ const id = setInterval(() => getCostSummary().then(setCostSummary).catch(() => { }), 60_000);
285
+ return () => clearInterval(id);
286
+ }, []);
287
+
288
+ // ── Title editing handlers ─────────────────────────────────────────────────
289
+
290
+ const startEditTitle = () => {
291
+ setTitleInput(boardTitle);
292
+ setEditingTitle(true);
293
+ };
294
+
295
+ const cancelEditTitle = () => {
296
+ setEditingTitle(false);
297
+ setTitleInput('');
298
+ };
299
+
300
+ const saveTitle = async () => {
301
+ const trimmed = titleInput.trim();
302
+ if (!trimmed || trimmed === boardTitle) {
303
+ cancelEditTitle();
304
+ return;
305
+ }
306
+ try {
307
+ await updateBoardTitle(trimmed);
308
+ setBoardTitle(trimmed);
309
+ } catch (err) {
310
+ console.error('Failed to save title:', err);
311
+ }
312
+ setEditingTitle(false);
313
+ setTitleInput('');
314
+ };
315
+
316
+ const handleTitleKeyDown = (e) => {
317
+ if (e.key === 'Enter') saveTitle();
318
+ if (e.key === 'Escape') cancelEditTitle();
319
+ };
320
+
321
+ // ── Settings modal ─────────────────────────────────────────────────────────
322
+
323
+ const openSettings = async () => {
324
+ try {
325
+ const [data, modelList] = await Promise.all([getSettings(), getModels()]);
326
+ setSettingsSnapshot(data);
327
+ setModelsSnapshot(modelList);
328
+ setSettingsOpen(true);
329
+ } catch (err) {
330
+ console.error('Failed to load settings:', err);
331
+ }
332
+ };
333
+
334
+ const handleSettingsSaved = async () => {
335
+ try {
336
+ const data = await getSettings();
337
+ setSettingsSnapshot(data);
338
+ const title = await getBoardTitle();
339
+ setBoardTitle(title);
340
+ } catch (err) {
341
+ console.error('Failed to refresh settings:', err);
342
+ }
343
+ };
344
+
345
+ // ── Card navigation ────────────────────────────────────────────────────────
346
+
347
+ const handleCardClick = (item) => {
348
+ setSelectedItem(item);
349
+ setModalOpen(true);
350
+ };
351
+
352
+ const handleNavigate = (direction) => {
353
+ if (!selectedItem || filteredItems.length === 0) return;
354
+
355
+ const currentIndex = filteredItems.findIndex((item) => item.id === selectedItem.id);
356
+ if (currentIndex === -1) return;
357
+
358
+ let newIndex;
359
+ if (direction === 'prev') {
360
+ newIndex = currentIndex > 0 ? currentIndex - 1 : filteredItems.length - 1;
361
+ } else {
362
+ newIndex = currentIndex < filteredItems.length - 1 ? currentIndex + 1 : 0;
363
+ }
364
+
365
+ setSelectedItem(filteredItems[newIndex]);
366
+ };
367
+
368
+ const handleModalClose = () => {
369
+ setModalOpen(false);
370
+ setTimeout(() => setSelectedItem(null), 200);
371
+ };
372
+
373
+ // ── Loading / error states ─────────────────────────────────────────────────
374
+
375
+ if (loading && !health) {
376
+ return (
377
+ <div className="flex items-center justify-center min-h-screen bg-slate-50">
378
+ <div className="text-center">
379
+ <div className="animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"></div>
380
+ <p className="text-slate-600">Loading {boardTitle}...</p>
381
+ </div>
382
+ </div>
383
+ );
384
+ }
385
+
386
+ if (error && !health) {
387
+ return (
388
+ <div className="flex items-center justify-center min-h-screen bg-slate-50">
389
+ <div className="text-center max-w-md p-6 bg-white rounded-lg shadow-md">
390
+ <div className="text-red-600 text-5xl mb-4">⚠️</div>
391
+ <h2 className="text-xl font-semibold text-slate-900 mb-2">Connection Error</h2>
392
+ <p className="text-slate-600 mb-4">{error}</p>
393
+ <button
394
+ onClick={() => window.location.reload()}
395
+ className="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors"
396
+ >
397
+ Retry
398
+ </button>
399
+ </div>
400
+ </div>
401
+ );
402
+ }
403
+
404
+ return (
405
+ <div className="min-h-screen bg-slate-50 flex flex-col">
406
+ {/* Header */}
407
+ <header className="bg-white border-b border-slate-200 shadow-sm flex-shrink-0">
408
+ <div className="max-w-full px-4 sm:px-6 lg:px-8 py-4">
409
+ <div className="flex items-center justify-between">
410
+ <div>
411
+ {/* Editable board title */}
412
+ {editingTitle ? (
413
+ <div className="flex items-center gap-2">
414
+ <input
415
+ ref={titleInputRef}
416
+ value={titleInput}
417
+ onChange={(e) => setTitleInput(e.target.value)}
418
+ onKeyDown={handleTitleKeyDown}
419
+ className="text-2xl font-bold text-slate-900 bg-transparent border-b-2 border-blue-500 outline-none min-w-0 w-72"
420
+ />
421
+ <button
422
+ onClick={saveTitle}
423
+ className="text-green-600 hover:text-green-700 transition-colors"
424
+ title="Save"
425
+ >
426
+ <Check className="w-5 h-5" />
427
+ </button>
428
+ <button
429
+ onClick={cancelEditTitle}
430
+ className="text-slate-400 hover:text-slate-600 transition-colors"
431
+ title="Cancel"
432
+ >
433
+ <X className="w-5 h-5" />
434
+ </button>
435
+ </div>
436
+ ) : (
437
+ <button
438
+ onClick={startEditTitle}
439
+ className="group flex items-center gap-2 text-left"
440
+ title="Click to edit board title"
441
+ >
442
+ <h1 className="text-2xl font-bold text-slate-900 group-hover:text-slate-700 transition-colors">
443
+ {boardTitle}
444
+ </h1>
445
+ <Pencil className="w-4 h-4 text-slate-300 group-hover:text-slate-500 transition-colors flex-shrink-0" />
446
+ </button>
447
+ )}
448
+ <p className="text-sm text-slate-600 mt-1">
449
+ {health?.projectRoot || 'Loading...'}
450
+ </p>
451
+ </div>
452
+ <div className="flex items-center gap-4">
453
+ {/* Real-time updates status */}
454
+ <div className="flex items-center gap-2">
455
+ <div
456
+ className={`w-2 h-2 rounded-full ${wsStatus === 'connected'
457
+ ? 'bg-green-500 animate-pulse'
458
+ : wsStatus === 'connecting'
459
+ ? 'bg-amber-400 animate-pulse'
460
+ : 'bg-slate-400'
461
+ }`}
462
+ ></div>
463
+ <span className="text-sm text-slate-500">
464
+ {wsStatus === 'connected'
465
+ ? 'Live updates'
466
+ : wsStatus === 'connecting'
467
+ ? 'Connecting...'
468
+ : 'No live updates'}
469
+ </span>
470
+ </div>
471
+
472
+ {/* Cost chip */}
473
+ {costSummary != null && (
474
+ <button
475
+ onClick={() => setCostModalOpen(true)}
476
+ className="flex items-center gap-1 text-xs text-slate-500 hover:text-slate-700 border border-slate-200 rounded px-2 py-0.5 hover:border-slate-300 transition-colors"
477
+ title="LLM cost this month — click for details"
478
+ >
479
+ <DollarSign className="w-3 h-3" />
480
+ {costSummary.totalCost < 0.01 && costSummary.totalCost > 0
481
+ ? '< 0.01'
482
+ : costSummary.totalCost.toFixed(2)}
483
+ <span className="text-slate-400">/mo</span>
484
+ </button>
485
+ )}
486
+
487
+ {/* Settings button */}
488
+ <button
489
+ onClick={openSettings}
490
+ className="flex items-center gap-1.5 text-sm text-slate-500 hover:text-slate-800 transition-colors"
491
+ title="Project settings"
492
+ >
493
+ <Settings className="w-4 h-4" />
494
+ Settings
495
+ </button>
496
+
497
+ {/* Documentation link */}
498
+ <a
499
+ href={docsUrl}
500
+ target="_blank"
501
+ rel="noopener noreferrer"
502
+ className="flex items-center gap-1.5 text-sm text-slate-500 hover:text-slate-800 transition-colors"
503
+ title="Open project documentation"
504
+ >
505
+ <BookOpen className="w-4 h-4" />
506
+ Project Documentation
507
+ </a>
508
+ </div>
509
+ </div>
510
+ </div>
511
+ </header>
512
+
513
+ {/* Filter Toolbar */}
514
+ <FilterToolbar />
515
+
516
+ {/* Process Monitor Bar */}
517
+ <ProcessMonitorBar />
518
+
519
+ {/* Main Content */}
520
+ <main className="flex-1 overflow-hidden">
521
+ <div className="h-full px-4 sm:px-6 lg:px-8 py-6">
522
+ <KanbanBoard
523
+ onCardClick={handleCardClick}
524
+ projectFilesReady={projectFilesStatus.docExists}
525
+ onStartProject={
526
+ projectFilesLoaded &&
527
+ !projectFilesStatus.docExists && ceremonyStatus !== 'running'
528
+ ? () => { resetWizard(); openWizard(); }
529
+ : undefined
530
+ }
531
+ onEditProjectDoc={() => setEditingProjectFile('doc')}
532
+ onStartSprintPlanning={
533
+ projectFilesLoaded &&
534
+ projectFilesStatus.docExists &&
535
+ sprintPlanningStatus !== 'running' &&
536
+ sprintPlanningStatus !== 'awaiting-selection' &&
537
+ ceremonyStatus !== 'running'
538
+ ? openSprintPlanning
539
+ : undefined
540
+ }
541
+ onOpenSprintPlanningSelection={
542
+ sprintPlanningStatus === 'awaiting-selection' ? reopenSprintPlanning : undefined
543
+ }
544
+ sponsorCallRunning={ceremonyStatus === 'running'}
545
+ />
546
+ </div>
547
+ </main>
548
+
549
+ {/* Footer */}
550
+ <footer className="bg-white border-t border-slate-200 py-4 text-center text-sm text-slate-500 flex-shrink-0">
551
+ <a
552
+ href="https://agilevibecoding.org"
553
+ target="_blank"
554
+ rel="noopener noreferrer"
555
+ className="text-blue-600 hover:text-blue-700 hover:underline"
556
+ >
557
+ Agile Vibe Coding
558
+ </a>
559
+ </footer>
560
+
561
+ {/* Detail Modal */}
562
+ <CardDetailModal
563
+ workItem={selectedItem}
564
+ open={modalOpen}
565
+ onOpenChange={handleModalClose}
566
+ onNavigate={handleNavigate}
567
+ onItemClick={handleCardClick}
568
+ allItems={workItems}
569
+ refineProgress={refineProgress}
570
+ refineResult={refineResult}
571
+ refineError={refineError}
572
+ onClearRefine={() => { setRefineResult(null); setRefineError(null); setRefineProgress(null); }}
573
+ />
574
+
575
+ {/* Sponsor Call Ceremony Modal */}
576
+ {ceremonyOpen && (
577
+ <SponsorCallModal
578
+ onOpenSettings={openSettings}
579
+ costLimitPending={costLimitPending?.runningType === 'sponsor-call' ? costLimitPending : null}
580
+ onContinuePastCostLimit={async () => { try { await continuePastCostLimit(); setCostLimitPending(null); } catch (_) {} }}
581
+ onCancelFromCostLimit={async () => { try { await cancelCeremony(); setCostLimitPending(null); } catch (_) {} }}
582
+ />
583
+ )}
584
+
585
+ {/* Sprint Planning Ceremony Modal */}
586
+ {sprintPlanningOpen && (
587
+ <SprintPlanningModal
588
+ onClose={closeSprintPlanning}
589
+ costLimitPending={costLimitPending?.runningType === 'sprint-planning' ? costLimitPending : null}
590
+ onContinuePastCostLimit={async () => { try { await continuePastCostLimit(); setCostLimitPending(null); } catch (_) {} }}
591
+ onCancelFromCostLimit={async () => { try { await cancelCeremony(); setCostLimitPending(null); } catch (_) {} }}
592
+ />
593
+ )}
594
+
595
+ {/* Epic/Story Selection Popup — shown independently when decomposition completes */}
596
+ <EpicStorySelectionModal />
597
+
598
+ {/* Settings Modal */}
599
+ {settingsOpen && settingsSnapshot && (
600
+ <SettingsModal
601
+ settings={settingsSnapshot}
602
+ models={modelsSnapshot}
603
+ onClose={() => setSettingsOpen(false)}
604
+ onSaved={handleSettingsSaved}
605
+ />
606
+ )}
607
+
608
+ {/* Cost Modal */}
609
+ {costModalOpen && <CostModal onClose={() => setCostModalOpen(false)} />}
610
+
611
+ {/* Project File Editor Popup */}
612
+ {editingProjectFile && (
613
+ <ProjectFileEditorPopup
614
+ fileType={editingProjectFile}
615
+ onClose={() => setEditingProjectFile(null)}
616
+ />
617
+ )}
618
+ </div>
619
+ );
620
+ }
621
+
622
+ export default App;