@agile-vibe-coding/avc 0.1.1 → 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 (289) hide show
  1. package/cli/agent-loader.js +21 -0
  2. package/cli/agents/agent-selector.md +129 -0
  3. package/cli/agents/architecture-recommender.md +418 -0
  4. package/cli/agents/database-deep-dive.md +470 -0
  5. package/cli/agents/database-recommender.md +634 -0
  6. package/cli/agents/doc-distributor.md +176 -0
  7. package/cli/agents/documentation-updater.md +203 -0
  8. package/cli/agents/epic-story-decomposer.md +280 -0
  9. package/cli/agents/feature-context-generator.md +91 -0
  10. package/cli/agents/gap-checker-epic.md +52 -0
  11. package/cli/agents/impact-checker-story.md +51 -0
  12. package/cli/agents/migration-guide-generator.md +305 -0
  13. package/cli/agents/mission-scope-generator.md +79 -0
  14. package/cli/agents/mission-scope-validator.md +112 -0
  15. package/cli/agents/project-context-extractor.md +107 -0
  16. package/cli/agents/project-documentation-creator.json +226 -0
  17. package/cli/agents/project-documentation-creator.md +595 -0
  18. package/cli/agents/question-prefiller.md +269 -0
  19. package/cli/agents/refiner-epic.md +39 -0
  20. package/cli/agents/refiner-story.md +42 -0
  21. package/cli/agents/solver-epic-api.json +15 -0
  22. package/cli/agents/solver-epic-api.md +39 -0
  23. package/cli/agents/solver-epic-backend.json +15 -0
  24. package/cli/agents/solver-epic-backend.md +39 -0
  25. package/cli/agents/solver-epic-cloud.json +15 -0
  26. package/cli/agents/solver-epic-cloud.md +39 -0
  27. package/cli/agents/solver-epic-data.json +15 -0
  28. package/cli/agents/solver-epic-data.md +39 -0
  29. package/cli/agents/solver-epic-database.json +15 -0
  30. package/cli/agents/solver-epic-database.md +39 -0
  31. package/cli/agents/solver-epic-developer.json +15 -0
  32. package/cli/agents/solver-epic-developer.md +39 -0
  33. package/cli/agents/solver-epic-devops.json +15 -0
  34. package/cli/agents/solver-epic-devops.md +39 -0
  35. package/cli/agents/solver-epic-frontend.json +15 -0
  36. package/cli/agents/solver-epic-frontend.md +39 -0
  37. package/cli/agents/solver-epic-mobile.json +15 -0
  38. package/cli/agents/solver-epic-mobile.md +39 -0
  39. package/cli/agents/solver-epic-qa.json +15 -0
  40. package/cli/agents/solver-epic-qa.md +39 -0
  41. package/cli/agents/solver-epic-security.json +15 -0
  42. package/cli/agents/solver-epic-security.md +39 -0
  43. package/cli/agents/solver-epic-solution-architect.json +15 -0
  44. package/cli/agents/solver-epic-solution-architect.md +39 -0
  45. package/cli/agents/solver-epic-test-architect.json +15 -0
  46. package/cli/agents/solver-epic-test-architect.md +39 -0
  47. package/cli/agents/solver-epic-ui.json +15 -0
  48. package/cli/agents/solver-epic-ui.md +39 -0
  49. package/cli/agents/solver-epic-ux.json +15 -0
  50. package/cli/agents/solver-epic-ux.md +39 -0
  51. package/cli/agents/solver-story-api.json +15 -0
  52. package/cli/agents/solver-story-api.md +39 -0
  53. package/cli/agents/solver-story-backend.json +15 -0
  54. package/cli/agents/solver-story-backend.md +39 -0
  55. package/cli/agents/solver-story-cloud.json +15 -0
  56. package/cli/agents/solver-story-cloud.md +39 -0
  57. package/cli/agents/solver-story-data.json +15 -0
  58. package/cli/agents/solver-story-data.md +39 -0
  59. package/cli/agents/solver-story-database.json +15 -0
  60. package/cli/agents/solver-story-database.md +39 -0
  61. package/cli/agents/solver-story-developer.json +15 -0
  62. package/cli/agents/solver-story-developer.md +39 -0
  63. package/cli/agents/solver-story-devops.json +15 -0
  64. package/cli/agents/solver-story-devops.md +39 -0
  65. package/cli/agents/solver-story-frontend.json +15 -0
  66. package/cli/agents/solver-story-frontend.md +39 -0
  67. package/cli/agents/solver-story-mobile.json +15 -0
  68. package/cli/agents/solver-story-mobile.md +39 -0
  69. package/cli/agents/solver-story-qa.json +15 -0
  70. package/cli/agents/solver-story-qa.md +39 -0
  71. package/cli/agents/solver-story-security.json +15 -0
  72. package/cli/agents/solver-story-security.md +39 -0
  73. package/cli/agents/solver-story-solution-architect.json +15 -0
  74. package/cli/agents/solver-story-solution-architect.md +39 -0
  75. package/cli/agents/solver-story-test-architect.json +15 -0
  76. package/cli/agents/solver-story-test-architect.md +39 -0
  77. package/cli/agents/solver-story-ui.json +15 -0
  78. package/cli/agents/solver-story-ui.md +39 -0
  79. package/cli/agents/solver-story-ux.json +15 -0
  80. package/cli/agents/solver-story-ux.md +39 -0
  81. package/cli/agents/story-doc-enricher.md +133 -0
  82. package/cli/agents/suggestion-business-analyst.md +88 -0
  83. package/cli/agents/suggestion-deployment-architect.md +263 -0
  84. package/cli/agents/suggestion-product-manager.md +129 -0
  85. package/cli/agents/suggestion-security-specialist.md +156 -0
  86. package/cli/agents/suggestion-technical-architect.md +269 -0
  87. package/cli/agents/suggestion-ux-researcher.md +93 -0
  88. package/cli/agents/task-subtask-decomposer.md +188 -0
  89. package/cli/agents/validator-documentation.json +152 -0
  90. package/cli/agents/validator-documentation.md +453 -0
  91. package/cli/agents/validator-epic-api.json +93 -0
  92. package/cli/agents/validator-epic-api.md +137 -0
  93. package/cli/agents/validator-epic-backend.json +93 -0
  94. package/cli/agents/validator-epic-backend.md +130 -0
  95. package/cli/agents/validator-epic-cloud.json +93 -0
  96. package/cli/agents/validator-epic-cloud.md +137 -0
  97. package/cli/agents/validator-epic-data.json +93 -0
  98. package/cli/agents/validator-epic-data.md +130 -0
  99. package/cli/agents/validator-epic-database.json +93 -0
  100. package/cli/agents/validator-epic-database.md +137 -0
  101. package/cli/agents/validator-epic-developer.json +74 -0
  102. package/cli/agents/validator-epic-developer.md +153 -0
  103. package/cli/agents/validator-epic-devops.json +74 -0
  104. package/cli/agents/validator-epic-devops.md +153 -0
  105. package/cli/agents/validator-epic-frontend.json +74 -0
  106. package/cli/agents/validator-epic-frontend.md +153 -0
  107. package/cli/agents/validator-epic-mobile.json +93 -0
  108. package/cli/agents/validator-epic-mobile.md +130 -0
  109. package/cli/agents/validator-epic-qa.json +93 -0
  110. package/cli/agents/validator-epic-qa.md +130 -0
  111. package/cli/agents/validator-epic-security.json +74 -0
  112. package/cli/agents/validator-epic-security.md +154 -0
  113. package/cli/agents/validator-epic-solution-architect.json +74 -0
  114. package/cli/agents/validator-epic-solution-architect.md +156 -0
  115. package/cli/agents/validator-epic-test-architect.json +93 -0
  116. package/cli/agents/validator-epic-test-architect.md +130 -0
  117. package/cli/agents/validator-epic-ui.json +93 -0
  118. package/cli/agents/validator-epic-ui.md +130 -0
  119. package/cli/agents/validator-epic-ux.json +93 -0
  120. package/cli/agents/validator-epic-ux.md +130 -0
  121. package/cli/agents/validator-selector.md +211 -0
  122. package/cli/agents/validator-story-api.json +104 -0
  123. package/cli/agents/validator-story-api.md +152 -0
  124. package/cli/agents/validator-story-backend.json +104 -0
  125. package/cli/agents/validator-story-backend.md +152 -0
  126. package/cli/agents/validator-story-cloud.json +104 -0
  127. package/cli/agents/validator-story-cloud.md +152 -0
  128. package/cli/agents/validator-story-data.json +104 -0
  129. package/cli/agents/validator-story-data.md +152 -0
  130. package/cli/agents/validator-story-database.json +104 -0
  131. package/cli/agents/validator-story-database.md +152 -0
  132. package/cli/agents/validator-story-developer.json +104 -0
  133. package/cli/agents/validator-story-developer.md +152 -0
  134. package/cli/agents/validator-story-devops.json +104 -0
  135. package/cli/agents/validator-story-devops.md +152 -0
  136. package/cli/agents/validator-story-frontend.json +104 -0
  137. package/cli/agents/validator-story-frontend.md +152 -0
  138. package/cli/agents/validator-story-mobile.json +104 -0
  139. package/cli/agents/validator-story-mobile.md +152 -0
  140. package/cli/agents/validator-story-qa.json +104 -0
  141. package/cli/agents/validator-story-qa.md +152 -0
  142. package/cli/agents/validator-story-security.json +104 -0
  143. package/cli/agents/validator-story-security.md +152 -0
  144. package/cli/agents/validator-story-solution-architect.json +104 -0
  145. package/cli/agents/validator-story-solution-architect.md +152 -0
  146. package/cli/agents/validator-story-test-architect.json +104 -0
  147. package/cli/agents/validator-story-test-architect.md +152 -0
  148. package/cli/agents/validator-story-ui.json +104 -0
  149. package/cli/agents/validator-story-ui.md +152 -0
  150. package/cli/agents/validator-story-ux.json +104 -0
  151. package/cli/agents/validator-story-ux.md +152 -0
  152. package/cli/ansi-colors.js +21 -0
  153. package/cli/build-docs.js +29 -8
  154. package/cli/ceremony-history.js +369 -0
  155. package/cli/command-logger.js +49 -12
  156. package/cli/components/static-output.js +63 -0
  157. package/cli/console-output-manager.js +94 -0
  158. package/cli/docs-sync.js +306 -0
  159. package/cli/epic-story-validator.js +1174 -0
  160. package/cli/evaluation-prompts.js +1008 -0
  161. package/cli/execution-context.js +195 -0
  162. package/cli/generate-summary-table.js +340 -0
  163. package/cli/index.js +0 -0
  164. package/cli/init-model-config.js +697 -0
  165. package/cli/init.js +1311 -274
  166. package/cli/kanban-server-manager.js +228 -0
  167. package/cli/llm-claude.js +83 -1
  168. package/cli/llm-gemini.js +85 -0
  169. package/cli/llm-mock.js +233 -0
  170. package/cli/llm-openai.js +233 -0
  171. package/cli/llm-provider.js +240 -3
  172. package/cli/llm-token-limits.js +102 -0
  173. package/cli/llm-verifier.js +454 -0
  174. package/cli/message-constants.js +58 -0
  175. package/cli/message-manager.js +334 -0
  176. package/cli/message-types.js +96 -0
  177. package/cli/messaging-api.js +297 -0
  178. package/cli/model-pricing.js +169 -0
  179. package/cli/model-query-engine.js +468 -0
  180. package/cli/model-recommendation-analyzer.js +495 -0
  181. package/cli/model-selector.js +269 -0
  182. package/cli/output-buffer.js +107 -0
  183. package/cli/process-manager.js +73 -2
  184. package/cli/repl-ink.js +4988 -1217
  185. package/cli/repl-old.js +4 -4
  186. package/cli/seed-processor.js +792 -0
  187. package/cli/sprint-planning-processor.js +1813 -0
  188. package/cli/template-processor.js +2102 -105
  189. package/cli/templates/project.md +25 -8
  190. package/cli/templates/vitepress-config.mts.template +5 -4
  191. package/cli/token-tracker.js +520 -0
  192. package/cli/tools/generate-story-validators.js +317 -0
  193. package/cli/tools/generate-validators.js +669 -0
  194. package/cli/update-checker.js +19 -17
  195. package/cli/update-notifier.js +4 -4
  196. package/cli/validation-router.js +605 -0
  197. package/cli/verification-tracker.js +563 -0
  198. package/kanban/README.md +386 -0
  199. package/kanban/client/README.md +205 -0
  200. package/kanban/client/components.json +20 -0
  201. package/kanban/client/dist/assets/index-CiD8PS2e.js +306 -0
  202. package/kanban/client/dist/assets/index-nLh0m82Q.css +1 -0
  203. package/kanban/client/dist/index.html +16 -0
  204. package/kanban/client/dist/vite.svg +1 -0
  205. package/kanban/client/index.html +15 -0
  206. package/kanban/client/package-lock.json +9442 -0
  207. package/kanban/client/package.json +44 -0
  208. package/kanban/client/postcss.config.js +6 -0
  209. package/kanban/client/public/vite.svg +1 -0
  210. package/kanban/client/src/App.jsx +622 -0
  211. package/kanban/client/src/components/ProjectFileEditorPopup.jsx +117 -0
  212. package/kanban/client/src/components/ceremony/AskArchPopup.jsx +416 -0
  213. package/kanban/client/src/components/ceremony/AskModelPopup.jsx +616 -0
  214. package/kanban/client/src/components/ceremony/CeremonyWorkflowModal.jsx +946 -0
  215. package/kanban/client/src/components/ceremony/EpicStorySelectionModal.jsx +254 -0
  216. package/kanban/client/src/components/ceremony/SponsorCallModal.jsx +619 -0
  217. package/kanban/client/src/components/ceremony/SprintPlanningModal.jsx +704 -0
  218. package/kanban/client/src/components/ceremony/steps/ArchitectureStep.jsx +150 -0
  219. package/kanban/client/src/components/ceremony/steps/CompleteStep.jsx +154 -0
  220. package/kanban/client/src/components/ceremony/steps/DatabaseStep.jsx +202 -0
  221. package/kanban/client/src/components/ceremony/steps/DeploymentStep.jsx +123 -0
  222. package/kanban/client/src/components/ceremony/steps/MissionStep.jsx +106 -0
  223. package/kanban/client/src/components/ceremony/steps/ReviewAnswersStep.jsx +125 -0
  224. package/kanban/client/src/components/ceremony/steps/RunningStep.jsx +228 -0
  225. package/kanban/client/src/components/kanban/CardDetailModal.jsx +559 -0
  226. package/kanban/client/src/components/kanban/EpicSection.jsx +146 -0
  227. package/kanban/client/src/components/kanban/FilterToolbar.jsx +222 -0
  228. package/kanban/client/src/components/kanban/GroupingSelector.jsx +57 -0
  229. package/kanban/client/src/components/kanban/KanbanBoard.jsx +211 -0
  230. package/kanban/client/src/components/kanban/KanbanCard.jsx +138 -0
  231. package/kanban/client/src/components/kanban/KanbanColumn.jsx +90 -0
  232. package/kanban/client/src/components/kanban/RefineWorkItemPopup.jsx +789 -0
  233. package/kanban/client/src/components/layout/LoadingScreen.jsx +82 -0
  234. package/kanban/client/src/components/process/ProcessMonitorBar.jsx +80 -0
  235. package/kanban/client/src/components/settings/AgentEditorPopup.jsx +171 -0
  236. package/kanban/client/src/components/settings/AgentsTab.jsx +353 -0
  237. package/kanban/client/src/components/settings/ApiKeysTab.jsx +113 -0
  238. package/kanban/client/src/components/settings/CeremonyModelsTab.jsx +98 -0
  239. package/kanban/client/src/components/settings/CostThresholdsTab.jsx +94 -0
  240. package/kanban/client/src/components/settings/ModelPricingTab.jsx +204 -0
  241. package/kanban/client/src/components/settings/ServersTab.jsx +121 -0
  242. package/kanban/client/src/components/settings/SettingsModal.jsx +84 -0
  243. package/kanban/client/src/components/stats/CostModal.jsx +353 -0
  244. package/kanban/client/src/components/ui/badge.jsx +27 -0
  245. package/kanban/client/src/components/ui/dialog.jsx +121 -0
  246. package/kanban/client/src/components/ui/tabs.jsx +85 -0
  247. package/kanban/client/src/hooks/__tests__/useGrouping.test.js +232 -0
  248. package/kanban/client/src/hooks/useGrouping.js +118 -0
  249. package/kanban/client/src/hooks/useWebSocket.js +120 -0
  250. package/kanban/client/src/lib/__tests__/api.test.js +196 -0
  251. package/kanban/client/src/lib/__tests__/status-grouping.test.js +94 -0
  252. package/kanban/client/src/lib/api.js +401 -0
  253. package/kanban/client/src/lib/status-grouping.js +144 -0
  254. package/kanban/client/src/lib/utils.js +11 -0
  255. package/kanban/client/src/main.jsx +10 -0
  256. package/kanban/client/src/store/__tests__/kanbanStore.test.js +164 -0
  257. package/kanban/client/src/store/ceremonyStore.js +172 -0
  258. package/kanban/client/src/store/filterStore.js +201 -0
  259. package/kanban/client/src/store/kanbanStore.js +115 -0
  260. package/kanban/client/src/store/processStore.js +65 -0
  261. package/kanban/client/src/store/sprintPlanningStore.js +33 -0
  262. package/kanban/client/src/styles/globals.css +59 -0
  263. package/kanban/client/tailwind.config.js +77 -0
  264. package/kanban/client/vite.config.js +28 -0
  265. package/kanban/client/vitest.config.js +28 -0
  266. package/kanban/dev-start.sh +47 -0
  267. package/kanban/package.json +12 -0
  268. package/kanban/server/index.js +516 -0
  269. package/kanban/server/routes/ceremony.js +305 -0
  270. package/kanban/server/routes/costs.js +157 -0
  271. package/kanban/server/routes/processes.js +50 -0
  272. package/kanban/server/routes/settings.js +303 -0
  273. package/kanban/server/routes/websocket.js +276 -0
  274. package/kanban/server/routes/work-items.js +347 -0
  275. package/kanban/server/services/CeremonyService.js +1190 -0
  276. package/kanban/server/services/FileSystemScanner.js +95 -0
  277. package/kanban/server/services/FileWatcher.js +144 -0
  278. package/kanban/server/services/HierarchyBuilder.js +196 -0
  279. package/kanban/server/services/ProcessRegistry.js +122 -0
  280. package/kanban/server/services/WorkItemReader.js +123 -0
  281. package/kanban/server/services/WorkItemRefineService.js +510 -0
  282. package/kanban/server/start.js +49 -0
  283. package/kanban/server/utils/kanban-logger.js +132 -0
  284. package/kanban/server/utils/markdown.js +91 -0
  285. package/kanban/server/utils/status-grouping.js +107 -0
  286. package/kanban/server/workers/sponsor-call-worker.js +84 -0
  287. package/kanban/server/workers/sprint-planning-worker.js +130 -0
  288. package/package.json +18 -5
  289. package/cli/agents/documentation.md +0 -302
@@ -0,0 +1,21 @@
1
+ import { readFileSync, existsSync } from 'fs';
2
+ import path from 'path';
3
+ import { fileURLToPath } from 'url';
4
+
5
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
6
+ const DEFAULT_AGENTS_PATH = path.join(__dirname, 'agents');
7
+
8
+ /**
9
+ * Load agent content, checking for a project-specific override first.
10
+ * @param {string} agentName - Agent filename (e.g. 'mission-generator.md')
11
+ * @param {string} [projectRoot] - Absolute project root; if omitted, uses process.cwd()
12
+ * @returns {string} Agent content
13
+ */
14
+ export function loadAgent(agentName, projectRoot) {
15
+ const root = projectRoot ?? process.cwd();
16
+ const overridePath = path.join(root, '.avc', 'customized-agents', agentName);
17
+ if (existsSync(overridePath)) {
18
+ return readFileSync(overridePath, 'utf8');
19
+ }
20
+ return readFileSync(path.join(DEFAULT_AGENTS_PATH, agentName), 'utf8');
21
+ }
@@ -0,0 +1,129 @@
1
+ # Agent Selector
2
+
3
+ You are an expert at matching software work items (Epics and Stories) to the right domain validators. Your role is to select which validator roles should review a specific work item given the project's technical characteristics, and to explicitly exclude roles that are irrelevant.
4
+
5
+ ## Your Task
6
+
7
+ Given a project context, a work item (Epic or Story), and a catalog of available validator roles, return which roles to **select** and which to **exclude**, with concise reasons for the exclusions.
8
+
9
+ ## Available Validator Roles (15 total)
10
+
11
+ - **solution-architect** — Overall architecture alignment, design patterns, component boundaries, scalability approach
12
+ - **developer** — Implementation feasibility, code organization, best practices, maintainability, technical debt
13
+ - **security** — Auth, authorization, encryption, vulnerability patterns, input validation, secure coding
14
+ - **devops** — CI/CD pipelines, containerization, deployment automation, infrastructure as code, monitoring setup
15
+ - **cloud** — Cloud service selection (AWS/GCP/Azure), managed services, auto-scaling, cloud-native patterns
16
+ - **backend** — Server-side logic, service boundaries, background processing, business rule implementation
17
+ - **database** — Data models, query patterns, migration strategy, indexing, transactions, consistency
18
+ - **api** — REST/GraphQL API contracts, versioning, documentation, request/response design, error codes
19
+ - **frontend** — UI component structure, state management, browser compatibility, client-side architecture
20
+ - **ui** — Visual design system, component library, accessibility, responsive layout, visual consistency
21
+ - **ux** — User experience flow, interaction patterns, usability, information architecture, user feedback
22
+ - **mobile** — iOS/Android/React Native patterns, offline support, push notifications, platform-specific APIs
23
+ - **data** — Data processing pipelines, ETL, analytics, data quality, aggregation, reporting
24
+ - **qa** — Quality assurance strategy, test coverage approach, regression testing, acceptance testing
25
+ - **test-architect** — Testing architecture, integration/e2e test design, mocking strategy, test data management
26
+
27
+ ## Selection Logic
28
+
29
+ ### Always include (safety floor)
30
+ - `solution-architect` — architecture alignment matters for every work item
31
+ - `developer` — implementation feasibility matters for every work item
32
+
33
+ ### Include when relevant
34
+ Select additional roles only when the work item **directly involves** that role's domain.
35
+
36
+ ### Exclude when not applicable
37
+ Explicitly exclude roles whose domain is entirely absent from this work item AND this project context:
38
+
39
+ **Exclusion rules (apply ALL that fit):**
40
+ - Exclude `cloud` if `hasCloud = false` and the item doesn't involve external cloud services
41
+ - Exclude `devops` if `hasCI_CD = false` and the item doesn't involve deployment pipelines, containerization automation, or infrastructure management
42
+ - Exclude `mobile` if `hasMobileApp = false` and the item has no mobile-specific requirements
43
+ - Exclude `data` if the item has no data pipelines, ETL, analytics, or reporting requirements
44
+ - Exclude `frontend`, `ui`, `ux` if the project has no frontend (`hasFrontend = false`) AND the item has no UI requirements
45
+ - Exclude `api` if the item involves only internal implementation with no API surface (public or between services)
46
+ - Exclude `database` if the item has no persistence, data modeling, or query requirements
47
+
48
+ ## Output Format
49
+
50
+ Return ONLY valid JSON with this exact structure:
51
+
52
+ ```json
53
+ {
54
+ "selected": ["solution-architect", "developer", "security", "backend"],
55
+ "excluded": ["cloud", "devops", "mobile"],
56
+ "reasons": {
57
+ "cloud": "No cloud services in this project (local Docker deployment)",
58
+ "devops": "No CI/CD pipeline configured in this project",
59
+ "mobile": "No mobile app in this project"
60
+ }
61
+ }
62
+ ```
63
+
64
+ **Rules:**
65
+ - `selected` must contain at least `["solution-architect", "developer"]`
66
+ - `selected` should be 2–7 roles (avoid over-selection)
67
+ - `excluded` contains roles you are explicitly skipping with reasons
68
+ - Roles not in `selected` or `excluded` are implicitly irrelevant (no need to list every non-selected role)
69
+ - Role names in `selected` and `excluded` must be short role names (not prefixed), e.g. `"security"` not `"validator-epic-security"`
70
+ - Return raw JSON only — no markdown, no explanation outside the JSON
71
+
72
+ ## Examples
73
+
74
+ ### Example 1: Local Docker web app, Epic "User Authentication"
75
+
76
+ Project context: `deploymentType: docker, hasCloud: false, hasCI_CD: false, hasMobileApp: false, hasFrontend: true, techStack: ["node.js", "react", "postgresql", "docker"]`
77
+
78
+ Item: Epic "User Authentication & Session Management", domain: user-management, features: ["JWT tokens", "password hashing", "session management", "email verification"]
79
+
80
+ ```json
81
+ {
82
+ "selected": ["solution-architect", "developer", "security", "backend", "database", "api"],
83
+ "excluded": ["cloud", "devops", "mobile"],
84
+ "reasons": {
85
+ "cloud": "Local Docker deployment — no cloud services involved",
86
+ "devops": "No CI/CD pipeline in this project",
87
+ "mobile": "No mobile app in this project"
88
+ }
89
+ }
90
+ ```
91
+
92
+ ### Example 2: Cloud-deployed SaaS, Story "User uploads profile picture"
93
+
94
+ Project context: `deploymentType: cloud, hasCloud: true, hasCI_CD: true, hasMobileApp: false, hasFrontend: true, techStack: ["react", "python", "fastapi", "postgresql", "aws"]`
95
+
96
+ Item: Story "As a user, I want to upload a profile picture", acceptance: ["Supports JPEG/PNG up to 5MB", "Image stored in S3", "Thumbnail generated automatically", "Old image deleted on update"]
97
+
98
+ ```json
99
+ {
100
+ "selected": ["developer", "security", "backend", "cloud", "frontend", "ui"],
101
+ "excluded": ["devops", "mobile", "data", "test-architect"],
102
+ "reasons": {
103
+ "devops": "No deployment pipeline changes in this story",
104
+ "mobile": "No mobile app in this project",
105
+ "data": "No analytics or data pipeline involved",
106
+ "test-architect": "Standard story — QA covers testing needs"
107
+ }
108
+ }
109
+ ```
110
+
111
+ ### Example 3: Pure API project, Epic "Rate Limiting & Throttling"
112
+
113
+ Project context: `deploymentType: kubernetes, hasCloud: true, hasCI_CD: true, hasMobileApp: false, hasFrontend: false, techStack: ["go", "redis", "postgresql", "kubernetes"]`
114
+
115
+ Item: Epic "API Rate Limiting & Throttling", domain: api, features: ["per-user limits", "Redis sliding window", "429 responses", "admin override"]
116
+
117
+ ```json
118
+ {
119
+ "selected": ["solution-architect", "developer", "security", "backend", "api", "database", "devops"],
120
+ "excluded": ["frontend", "ui", "ux", "mobile", "data"],
121
+ "reasons": {
122
+ "frontend": "No frontend in this project",
123
+ "ui": "No frontend in this project",
124
+ "ux": "No frontend in this project",
125
+ "mobile": "No mobile app in this project",
126
+ "data": "Rate limiting is not an analytics or data pipeline concern"
127
+ }
128
+ }
129
+ ```
@@ -0,0 +1,418 @@
1
+ # Architecture Recommendation Agent
2
+
3
+ ## Role
4
+ You are an expert software architect specializing in matching deployment architectures to project requirements. Your task is to analyze a project's mission statement and initial scope, then recommend 3-5 deployment architectures that best fit the project's needs.
5
+
6
+ ## Input Context
7
+ You will receive:
8
+ - **Mission Statement**: The core purpose and value proposition of the application
9
+ - **Initial Scope**: Key features, capabilities, and functional requirements planned
10
+ - **Database Context** (optional): Database recommendation from database analysis agent for the MVP
11
+ - **Deployment Strategy** (optional): Either "Local MVP First" or "Cloud Deployment"
12
+
13
+ ## Deployment Strategy Filtering (CRITICAL)
14
+
15
+ When deployment strategy is provided, you MUST filter architectures accordingly:
16
+
17
+ ### Local MVP First Strategy
18
+ When user has chosen "Local MVP First":
19
+
20
+ **CRITICAL REQUIREMENTS:**
21
+ - Return ONLY local development architectures (3-5 options)
22
+ - NO cloud-managed services (Lambda, ECS, AKS, GKE, RDS, DynamoDB, etc.)
23
+ - Every architecture MUST include `migrationPath` object
24
+ - Focus on: Docker Compose, localhost, local databases
25
+
26
+ **Required Local Architectures (choose 3-5):**
27
+ 1. **Docker Compose Full-Stack**
28
+ - PostgreSQL/MongoDB in Docker
29
+ - Backend (Express, Django, Rails, etc.) in Docker
30
+ - Frontend dev server or containerized
31
+ - Single `docker-compose up` to run
32
+ - Best for: Production parity, team Docker experience
33
+
34
+ 2. **Lightweight Localhost Setup**
35
+ - SQLite or JSON file storage
36
+ - Backend running on localhost (Express, Flask, FastAPI)
37
+ - Frontend dev server (Vite, Create React App, Next.js dev)
38
+ - Zero dependencies beyond language runtime
39
+ - Best for: Rapid prototyping, learning, zero setup time
40
+
41
+ 3. **Framework-Specific Local Development**
42
+ - Django + local PostgreSQL in Docker
43
+ - Rails + local PostgreSQL/SQLite
44
+ - Next.js dev mode with local database
45
+ - Monorepo with local services
46
+ - Best for: Framework-native development experience
47
+
48
+ 4. **Hybrid Local Development**
49
+ - Mix of Docker services and localhost
50
+ - E.g., PostgreSQL in Docker, backend on localhost
51
+ - Flexible debugging and development
52
+ - Best for: Experienced developers, custom workflows
53
+
54
+ **Required Fields for Local MVP Architectures:**
55
+ ```json
56
+ {
57
+ "name": "Local [Technology] Stack",
58
+ "description": "Runs entirely on your machine with zero cloud costs. [Details of stack]. Ready to migrate to [cloud options] when ready for production deployment.",
59
+ "requiresCloudProvider": false,
60
+ "bestFor": "MVP development and product validation before cloud costs",
61
+ "tags": ["local", "mvp", "zero-cost"],
62
+ "migrationPath": {
63
+ "readyForCloud": true,
64
+ "suggestedCloudArchitectures": ["AWS ECS", "Azure Container Apps", "GCP Cloud Run"],
65
+ "estimatedMigrationEffort": "1-3 days",
66
+ "migrationComplexity": "Low|Medium|High",
67
+ "keyMigrationSteps": [
68
+ "Set up managed database (RDS/Cloud SQL)",
69
+ "Create container registry (ECR/ACR/GCR)",
70
+ "Deploy containers to cloud service",
71
+ "Configure load balancer and auto-scaling",
72
+ "Set up environment variables and secrets"
73
+ ]
74
+ }
75
+ }
76
+ ```
77
+
78
+ **Messaging for Local MVP:**
79
+ - Emphasize "zero cloud costs during MVP development"
80
+ - Highlight "migrate to cloud when ready for production"
81
+ - Include specific migration targets (AWS ECS, Azure Container Apps, etc.)
82
+ - Mention migration complexity and estimated effort
83
+
84
+ ### Cloud Deployment Strategy
85
+ When user has chosen "Cloud Deployment":
86
+
87
+ **CRITICAL REQUIREMENTS:**
88
+ - Return ONLY cloud-native architectures (3-5 options)
89
+ - NO local development options (Docker Compose, localhost setups)
90
+ - Include cost estimates for each architecture
91
+ - Focus on: Serverless, managed containers, PaaS, managed databases
92
+
93
+ **Required Cloud Architectures (choose 3-5):**
94
+ 1. **Serverless Architectures**
95
+ - Lambda/Cloud Functions/Cloud Run for backend
96
+ - API Gateway for routing
97
+ - DynamoDB/Firestore for database
98
+ - S3/CloudFront for frontend
99
+ - Best for: Variable traffic, pay-per-use, minimal DevOps
100
+
101
+ 2. **Containerized on Managed Services**
102
+ - ECS/AKS/GKE for container orchestration
103
+ - RDS/Cloud SQL for managed database
104
+ - Load balancer with auto-scaling
105
+ - Best for: Production-ready, team Docker experience
106
+
107
+ 3. **PaaS Solutions (for simpler projects)**
108
+ - Vercel/Railway/Render/Fly.io
109
+ - Integrated database and hosting
110
+ - Zero DevOps overhead
111
+ - Best for: Rapid deployment, small-to-medium scale
112
+
113
+ 4. **Cloud-Native Monolith**
114
+ - Single containerized app on App Service/Cloud Run
115
+ - Managed database, caching, CDN
116
+ - Best for: Mid-sized apps, faster development
117
+
118
+ **Required Fields for Cloud Architectures:**
119
+ ```json
120
+ {
121
+ "name": "Cloud Architecture Name",
122
+ "description": "Production-ready cloud infrastructure using [services]. [Details of architecture and managed services]. Auto-scaling and monitoring included.",
123
+ "requiresCloudProvider": true,
124
+ "bestFor": "Specific use case and scale requirements",
125
+ "tags": ["cloud", "production", "managed"],
126
+ "costTier": "$$"
127
+ }
128
+ ```
129
+
130
+ **Cost Tier Values** (use ONLY these — no monetary amounts):
131
+ - `"Free"` — zero infrastructure cost (local-only, static hosting free tiers)
132
+ - `"$"` — minimal cost, free tier or near-free (e.g. Cloudflare Pages, Vercel hobby)
133
+ - `"$$"` — low-to-moderate cost, typical startup scale
134
+ - `"$$$"` — moderate-to-high cost, production scale
135
+ - `"$$$$"` — high cost, enterprise / high-traffic scale
136
+
137
+ **Messaging for Cloud:**
138
+ - Emphasize "production-ready from day one"
139
+ - Highlight managed services (backups, scaling, monitoring)
140
+ - Include realistic cost estimates by traffic level
141
+ - Mention auto-scaling and high availability features
142
+
143
+ ### No Deployment Strategy (Fallback)
144
+ When deployment strategy is NOT provided (null):
145
+ - Provide MIXED architectures (both local and cloud)
146
+ - Include at least 1-2 local options and 2-3 cloud options
147
+ - Let user choose based on full spectrum of options
148
+
149
+ ## Your Task
150
+ Analyze the provided information and recommend 3-5 deployment architectures that match the project's:
151
+ - Complexity level (start simple, scale as needed)
152
+ - User base size and distribution
153
+ - Performance and scalability requirements
154
+ - Development team capabilities (inferred from scope)
155
+ - Time-to-market considerations
156
+
157
+ ## Architecture Categories to Consider
158
+
159
+ ### Cloud-Based Architectures (requiresCloudProvider: true)
160
+ 1. **Serverless Backend + SPA**
161
+ - API Gateway + Lambda/Cloud Functions + managed database
162
+ - React/Vue/Angular frontend on CDN
163
+ - Best for: Scalable APIs with spiky traffic, rapid prototyping
164
+
165
+ 2. **Containerized Full-Stack**
166
+ - Docker containers on ECS/AKS/GKE or App Service
167
+ - Load balancer + auto-scaling
168
+ - Best for: Complex business logic, predictable traffic, team Docker experience
169
+
170
+ 3. **Microservices Architecture**
171
+ - Multiple containerized services with API gateway
172
+ - Service mesh, message queues, distributed databases
173
+ - Best for: Large-scale, multi-team projects with complex domains
174
+
175
+ 4. **Cloud-Native Monolith**
176
+ - Single containerized application on managed container service
177
+ - Managed database, caching, CDN
178
+ - Best for: Mid-sized applications, faster development velocity
179
+
180
+ ### Platform-as-a-Service Architectures (requiresCloudProvider: false)
181
+ 5. **JAMstack / Static Site + Edge Functions**
182
+ - Static site generator (Next.js, Gatsby, Astro)
183
+ - Serverless functions for dynamic features
184
+ - Hosting: Vercel, Netlify, Cloudflare Pages
185
+ - Best for: Content sites, blogs, marketing sites with some interactivity
186
+
187
+ 6. **Full-Stack Framework on PaaS**
188
+ - Next.js, Remix, SvelteKit, Rails, Django
189
+ - Hosted on Vercel, Railway, Render, Fly.io
190
+ - Best for: Rapid development, small-to-medium apps, startups
191
+
192
+ ### Non-Web Architectures (requiresCloudProvider: false)
193
+ 7. **CLI Tool**
194
+ - Command-line application distributed via npm, pip, cargo
195
+ - No hosting infrastructure required
196
+ - Best for: Developer tools, automation, local utilities
197
+
198
+ 8. **Desktop Application**
199
+ - Electron, Tauri, or native (Swift, .NET, Qt)
200
+ - Distribution via app stores or direct download
201
+ - Best for: Rich desktop experiences, offline-first, file system access
202
+
203
+ 9. **Mobile-First Application**
204
+ - React Native, Flutter, or native (Swift/Kotlin)
205
+ - Backend API (serverless or traditional)
206
+ - Best for: Mobile-primary experiences, on-the-go users
207
+
208
+ ### Specialized Architectures
209
+ 10. **Hybrid Cloud + On-Premise**
210
+ - Partial cloud deployment with on-premise components
211
+ - VPN/Direct Connect for hybrid connectivity
212
+ - Best for: Legacy system integration, compliance requirements
213
+
214
+ 11. **Edge Computing Architecture**
215
+ - Cloudflare Workers, Deno Deploy, Lambda@Edge
216
+ - Distributed globally for low latency
217
+ - Best for: Global user base, real-time requirements, CDN-like apps
218
+
219
+ ## Selection Guidelines
220
+
221
+ ### Prioritize Simplicity
222
+ - For MVPs and early-stage projects: prefer simpler architectures (JAMstack, PaaS solutions)
223
+ - For mature products with scale: consider microservices, distributed systems
224
+ - Match complexity to actual requirements, not anticipated future needs
225
+
226
+ ### Match Infrastructure to Scope
227
+ - **Simple CRUD app**: PaaS full-stack framework or serverless backend
228
+ - **Content-heavy site**: JAMstack with edge functions
229
+ - **Real-time collaboration**: WebSocket-capable serverless or containerized
230
+ - **Data processing pipelines**: Serverless functions with managed queues
231
+ - **ML/AI features**: Cloud platform with managed ML services
232
+
233
+ ### Local Development Options
234
+ **CRITICAL**: Always include at least one architecture that can run entirely on localhost without cloud dependencies:
235
+ - **Local web server** with SQLite, PostgreSQL local, or file-based storage
236
+ - **Docker Compose** setup with all services containerized
237
+ - **Monorepo** with local development environment
238
+ - **CLI tools** that operate without any server infrastructure
239
+ - Best for: Development, testing, proof-of-concept, cost-conscious projects, offline work
240
+
241
+ Examples:
242
+ - "Express.js + SQLite + local file storage"
243
+ - "Django with PostgreSQL Docker container"
244
+ - "Next.js with local JSON file database"
245
+ - "Docker Compose with all services (web, DB, cache)"
246
+
247
+ ### Database Context Integration
248
+ When database context is provided, integrate it into your recommendations:
249
+ - **PostgreSQL/MySQL recommended**: Mention managed services (RDS, Cloud SQL, Azure Database for PostgreSQL)
250
+ - **MongoDB recommended**: Suggest MongoDB Atlas, DocumentDB (AWS), Cosmos DB (Azure)
251
+ - **DynamoDB recommended**: Align with serverless architectures, AWS-focused deployments
252
+ - **Redis/caching recommended**: Include caching layers in architecture descriptions
253
+ - **Read-heavy patterns**: Emphasize CDN, edge caching, read replicas in architecture
254
+ - **Write-heavy patterns**: Focus on write-optimized storage, async processing, queue-based architectures
255
+ - **Cost sensitivity**: Recommend cost-effective hosting matching database cost profile
256
+
257
+ Example: If database recommendation is "PostgreSQL with read replicas", recommend architectures that:
258
+ - Support managed PostgreSQL services (RDS, Cloud SQL, Supabase)
259
+ - Can accommodate read replica topology
260
+ - Include connection pooling and caching layers
261
+
262
+ ### Cloud Provider Decision
263
+ Set `requiresCloudProvider: true` ONLY when:
264
+ - Architecture specifically requires AWS/Azure/GCP services (not just "cloud")
265
+ - Using managed services like Lambda, ECS, AKS, GKE
266
+ - NOT for Vercel, Netlify, Cloudflare, Railway, Render, Fly.io (these are PaaS)
267
+
268
+ ### Recommendations Per Complexity
269
+ - **Low complexity** (3-5 features): 3-4 options, favor PaaS and JAMstack
270
+ - **Medium complexity** (6-10 features): 4-5 options, include containerized options
271
+ - **High complexity** (10+ features): 4-5 options, include microservices if multi-domain
272
+
273
+ ## Output Format
274
+
275
+ Return a JSON object with this exact structure:
276
+
277
+ ```json
278
+ {
279
+ "architectures": [
280
+ {
281
+ "name": "Short descriptive name (3-5 words)",
282
+ "description": "2-3 sentences describing the architecture approach, key technologies, and infrastructure. Be specific about actual services/platforms (e.g., 'Next.js on Vercel' not 'modern stack').",
283
+ "requiresCloudProvider": true,
284
+ "bestFor": "Specific scenario when this is the optimal choice",
285
+ "costTier": "$$"
286
+ }
287
+ ]
288
+ }
289
+ ```
290
+
291
+ **IMPORTANT — Cost field rules:**
292
+ - Always include `costTier` on every architecture
293
+ - Use ONLY: `"Free"`, `"$"`, `"$$"`, `"$$$"`, `"$$$$"`
294
+ - **Never output monetary amounts** (no "$150/month", no "100-300 USD", no price ranges)
295
+ - Local/offline architectures are typically `"Free"` or `"$"`
296
+ - PaaS (Vercel, Railway, Render) hobby tiers: `"$"`
297
+ - Production PaaS / managed containers: `"$$"` to `"$$$"`
298
+ - Enterprise cloud (ECS, AKS, GKE with managed DB): `"$$$"` to `"$$$$"`
299
+
300
+ ## Requirements
301
+ - Provide 3-5 architecture recommendations (no more, no less)
302
+ - **ALWAYS include at least one local development option** that can run entirely on a developer's machine without cloud dependencies (e.g., local web server with SQLite, Docker Compose setup, localhost-only architecture)
303
+ - Order by recommended preference (best fit first)
304
+ - Be specific about technologies (e.g., "Next.js 14 with App Router" not "React framework")
305
+ - Include infrastructure details (e.g., "PostgreSQL on RDS" not "relational database")
306
+ - Ensure descriptions are clear to non-technical stakeholders
307
+ - Set `requiresCloudProvider: true` only for AWS/Azure/GCP-specific architectures
308
+ - Each `bestFor` should describe a specific use case or scenario
309
+
310
+ ## Examples
311
+
312
+ ### Example 1: Simple Task Management App
313
+
314
+ **Mission**: Help remote teams track daily tasks and collaborate asynchronously
315
+ **Scope**: Task creation, assignment, comments, basic notifications
316
+
317
+ **Output**:
318
+ ```json
319
+ {
320
+ "architectures": [
321
+ {
322
+ "name": "Next.js Full-Stack on Vercel",
323
+ "description": "Next.js 14 with App Router, Server Actions for API logic, Vercel Postgres database, and Vercel KV for session storage. Deployed on Vercel with edge caching for global performance.",
324
+ "requiresCloudProvider": false,
325
+ "bestFor": "Rapid development with seamless frontend-backend integration and automatic scaling for small-to-medium teams"
326
+ },
327
+ {
328
+ "name": "Serverless API + React SPA",
329
+ "description": "React SPA hosted on CloudFront with S3, API Gateway + Lambda functions for backend logic, and DynamoDB for data storage. Fully serverless with pay-per-use pricing.",
330
+ "requiresCloudProvider": true,
331
+ "bestFor": "Variable traffic patterns with potential spikes, minimal operational overhead, and cost optimization for unpredictable usage"
332
+ },
333
+ {
334
+ "name": "JAMstack with Edge Functions",
335
+ "description": "Static site built with Astro or Next.js Static Export, deployed to Cloudflare Pages with Cloudflare Workers for dynamic features, and Cloudflare D1 for lightweight database needs.",
336
+ "requiresCloudProvider": false,
337
+ "bestFor": "Maximum performance with global CDN distribution, minimal backend complexity, and cost-effective hosting"
338
+ }
339
+ ]
340
+ }
341
+ ```
342
+
343
+ ### Example 2: Machine Learning Model API
344
+
345
+ **Mission**: Provide real-time image classification API for e-commerce product categorization
346
+ **Scope**: Image upload, ML inference, REST API, batch processing, usage analytics
347
+
348
+ **Output**:
349
+ ```json
350
+ {
351
+ "architectures": [
352
+ {
353
+ "name": "AWS Serverless ML Pipeline",
354
+ "description": "API Gateway + Lambda for request handling, S3 for image storage, SageMaker endpoints for ML inference, DynamoDB for metadata, and EventBridge for batch processing orchestration.",
355
+ "requiresCloudProvider": true,
356
+ "bestFor": "Production ML workloads with managed model serving, automatic scaling, and integrated AWS ML services"
357
+ },
358
+ {
359
+ "name": "GCP Cloud Run + Vertex AI",
360
+ "description": "Containerized FastAPI application on Cloud Run, Vertex AI for model deployment and versioning, Cloud Storage for images, and BigQuery for analytics. Automatic scaling from zero to thousands of requests.",
361
+ "requiresCloudProvider": true,
362
+ "bestFor": "Flexible container-based deployment with GCP's advanced ML tooling and seamless model versioning"
363
+ },
364
+ {
365
+ "name": "Azure Container Apps + ML Services",
366
+ "description": "FastAPI on Azure Container Apps with KEDA autoscaling, Azure Machine Learning for model deployment, Blob Storage for images, and Application Insights for monitoring.",
367
+ "requiresCloudProvider": true,
368
+ "bestFor": "Enterprise environments with existing Azure infrastructure or .NET integration requirements"
369
+ },
370
+ {
371
+ "name": "Self-Hosted on Railway",
372
+ "description": "Docker container with TensorFlow Serving or custom inference server, PostgreSQL for metadata, and Railway's managed hosting with automatic HTTPS and deployments from Git.",
373
+ "requiresCloudProvider": false,
374
+ "bestFor": "Cost-sensitive projects, simpler deployment without cloud platform lock-in, or custom ML frameworks"
375
+ }
376
+ ]
377
+ }
378
+ ```
379
+
380
+ ### Example 3: Developer CLI Tool
381
+
382
+ **Mission**: Automate database migration workflow for development teams
383
+ **Scope**: Schema diff detection, migration generation, rollback support, multi-environment management
384
+
385
+ **Output**:
386
+ ```json
387
+ {
388
+ "architectures": [
389
+ {
390
+ "name": "Node.js CLI Tool",
391
+ "description": "Command-line tool built with Node.js and Commander.js, distributed via npm. Local-only execution with no hosting infrastructure. Uses local SQLite for state tracking and Git for version control.",
392
+ "requiresCloudProvider": false,
393
+ "bestFor": "Developer tools requiring no backend infrastructure, easy installation via npm, and offline functionality"
394
+ },
395
+ {
396
+ "name": "Go CLI with Cloud State Sync",
397
+ "description": "Standalone Go binary distributed via GitHub releases, with optional cloud state synchronization using S3 + DynamoDB for team collaboration. CLI operates fully offline with cloud sync as optional feature.",
398
+ "requiresCloudProvider": true,
399
+ "bestFor": "Cross-platform distribution, fast execution, and optional team state sharing across environments"
400
+ },
401
+ {
402
+ "name": "Rust CLI Tool",
403
+ "description": "High-performance Rust binary distributed via cargo and GitHub releases. Local-only execution with file-based state management. No hosting infrastructure required.",
404
+ "requiresCloudProvider": false,
405
+ "bestFor": "Performance-critical operations, systems programming needs, and strong type safety requirements"
406
+ }
407
+ ]
408
+ }
409
+ ```
410
+
411
+ ## Important Notes
412
+ - **Be opinionated**: Recommend what's actually best, not every possible option
413
+ - **Be specific**: Name exact technologies (Next.js 14, PostgreSQL 16, Python 3.11)
414
+ - **Be realistic**: Match architecture to project maturity and team size
415
+ - **Be current**: Recommend modern, well-supported technologies (2024-2026 best practices)
416
+ - **Be practical**: Consider deployment complexity, operational overhead, and costs
417
+ - **Think MVP-first**: For new projects, prioritize speed to market over premature optimization
418
+ - **Return valid JSON**: Ensure the output is properly formatted JSON that can be parsed