wogiflow 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. package/.workflow/agents/reviewer.md +81 -0
  2. package/.workflow/agents/security.md +94 -0
  3. package/.workflow/agents/story-writer.md +58 -0
  4. package/.workflow/bridges/base-bridge.js +395 -0
  5. package/.workflow/bridges/claude-bridge.js +434 -0
  6. package/.workflow/bridges/index.js +130 -0
  7. package/.workflow/lib/assumption-detector.js +481 -0
  8. package/.workflow/lib/config-substitution.js +371 -0
  9. package/.workflow/lib/failure-categories.js +478 -0
  10. package/.workflow/state/app-map.md.template +15 -0
  11. package/.workflow/state/architecture.md.template +24 -0
  12. package/.workflow/state/component-index.json.template +5 -0
  13. package/.workflow/state/decisions.md.template +15 -0
  14. package/.workflow/state/feedback-patterns.md.template +9 -0
  15. package/.workflow/state/knowledge-sync.json.template +6 -0
  16. package/.workflow/state/progress.md.template +14 -0
  17. package/.workflow/state/ready.json.template +7 -0
  18. package/.workflow/state/request-log.md.template +14 -0
  19. package/.workflow/state/session-state.json.template +11 -0
  20. package/.workflow/state/stack.md.template +33 -0
  21. package/.workflow/state/testing.md.template +36 -0
  22. package/.workflow/templates/claude-md.hbs +257 -0
  23. package/.workflow/templates/correction-report.md +67 -0
  24. package/.workflow/templates/gemini-md.hbs +52 -0
  25. package/README.md +1802 -0
  26. package/bin/flow +205 -0
  27. package/lib/index.js +33 -0
  28. package/lib/installer.js +467 -0
  29. package/lib/release-channel.js +269 -0
  30. package/lib/skill-registry.js +526 -0
  31. package/lib/upgrader.js +401 -0
  32. package/lib/utils.js +305 -0
  33. package/package.json +64 -0
  34. package/scripts/flow +985 -0
  35. package/scripts/flow-adaptive-learning.js +1259 -0
  36. package/scripts/flow-aggregate.js +488 -0
  37. package/scripts/flow-archive +133 -0
  38. package/scripts/flow-auto-context.js +1015 -0
  39. package/scripts/flow-auto-learn.js +615 -0
  40. package/scripts/flow-bridge.js +223 -0
  41. package/scripts/flow-browser-suggest.js +316 -0
  42. package/scripts/flow-bug.js +247 -0
  43. package/scripts/flow-cascade.js +711 -0
  44. package/scripts/flow-changelog +85 -0
  45. package/scripts/flow-checkpoint.js +483 -0
  46. package/scripts/flow-cli.js +403 -0
  47. package/scripts/flow-code-intelligence.js +760 -0
  48. package/scripts/flow-complexity.js +502 -0
  49. package/scripts/flow-config-set.js +152 -0
  50. package/scripts/flow-constants.js +157 -0
  51. package/scripts/flow-context +152 -0
  52. package/scripts/flow-context-init.js +482 -0
  53. package/scripts/flow-context-monitor.js +384 -0
  54. package/scripts/flow-context-scoring.js +886 -0
  55. package/scripts/flow-correct.js +458 -0
  56. package/scripts/flow-damage-control.js +985 -0
  57. package/scripts/flow-deps +101 -0
  58. package/scripts/flow-diff.js +700 -0
  59. package/scripts/flow-done +151 -0
  60. package/scripts/flow-done.js +489 -0
  61. package/scripts/flow-durable-session.js +1541 -0
  62. package/scripts/flow-entropy-monitor.js +345 -0
  63. package/scripts/flow-export-profile +349 -0
  64. package/scripts/flow-export-scanner.js +1046 -0
  65. package/scripts/flow-figma-confirm.js +400 -0
  66. package/scripts/flow-figma-extract.js +496 -0
  67. package/scripts/flow-figma-generate.js +683 -0
  68. package/scripts/flow-figma-index.js +909 -0
  69. package/scripts/flow-figma-match.js +617 -0
  70. package/scripts/flow-figma-mcp-server.js +518 -0
  71. package/scripts/flow-figma-pipeline.js +414 -0
  72. package/scripts/flow-file-ops.js +301 -0
  73. package/scripts/flow-gate-confidence.js +825 -0
  74. package/scripts/flow-guided-edit.js +659 -0
  75. package/scripts/flow-health +185 -0
  76. package/scripts/flow-health.js +413 -0
  77. package/scripts/flow-hooks.js +556 -0
  78. package/scripts/flow-http-client.js +249 -0
  79. package/scripts/flow-hybrid-detect.js +167 -0
  80. package/scripts/flow-hybrid-interactive.js +591 -0
  81. package/scripts/flow-hybrid-test.js +152 -0
  82. package/scripts/flow-import-profile +439 -0
  83. package/scripts/flow-init +253 -0
  84. package/scripts/flow-instruction-richness.js +827 -0
  85. package/scripts/flow-jira-integration.js +579 -0
  86. package/scripts/flow-knowledge-router.js +522 -0
  87. package/scripts/flow-knowledge-sync.js +589 -0
  88. package/scripts/flow-linear-integration.js +631 -0
  89. package/scripts/flow-links.js +774 -0
  90. package/scripts/flow-log-manager.js +559 -0
  91. package/scripts/flow-loop-enforcer.js +1246 -0
  92. package/scripts/flow-loop-retry-learning.js +630 -0
  93. package/scripts/flow-lsp.js +923 -0
  94. package/scripts/flow-map-index +348 -0
  95. package/scripts/flow-map-sync +201 -0
  96. package/scripts/flow-memory-blocks.js +668 -0
  97. package/scripts/flow-memory-compactor.js +350 -0
  98. package/scripts/flow-memory-db.js +1110 -0
  99. package/scripts/flow-memory-sync.js +484 -0
  100. package/scripts/flow-metrics.js +353 -0
  101. package/scripts/flow-migrate-ids.js +370 -0
  102. package/scripts/flow-model-adapter.js +802 -0
  103. package/scripts/flow-model-router.js +884 -0
  104. package/scripts/flow-models.js +1231 -0
  105. package/scripts/flow-morning.js +517 -0
  106. package/scripts/flow-multi-approach.js +660 -0
  107. package/scripts/flow-new-feature +86 -0
  108. package/scripts/flow-onboard +1042 -0
  109. package/scripts/flow-orchestrate-llm.js +459 -0
  110. package/scripts/flow-orchestrate.js +3592 -0
  111. package/scripts/flow-output.js +123 -0
  112. package/scripts/flow-parallel-detector.js +399 -0
  113. package/scripts/flow-parallel-dispatch.js +987 -0
  114. package/scripts/flow-parallel.js +428 -0
  115. package/scripts/flow-pattern-enforcer.js +600 -0
  116. package/scripts/flow-prd-manager.js +282 -0
  117. package/scripts/flow-progress.js +323 -0
  118. package/scripts/flow-project-analyzer.js +975 -0
  119. package/scripts/flow-prompt-composer.js +487 -0
  120. package/scripts/flow-providers.js +1381 -0
  121. package/scripts/flow-queue.js +308 -0
  122. package/scripts/flow-ready +82 -0
  123. package/scripts/flow-ready.js +189 -0
  124. package/scripts/flow-regression.js +396 -0
  125. package/scripts/flow-response-parser.js +450 -0
  126. package/scripts/flow-resume.js +284 -0
  127. package/scripts/flow-rules-sync.js +439 -0
  128. package/scripts/flow-run-trace.js +718 -0
  129. package/scripts/flow-safety.js +587 -0
  130. package/scripts/flow-search +104 -0
  131. package/scripts/flow-security.js +481 -0
  132. package/scripts/flow-session-end +106 -0
  133. package/scripts/flow-session-end.js +437 -0
  134. package/scripts/flow-session-state.js +671 -0
  135. package/scripts/flow-setup-hooks +216 -0
  136. package/scripts/flow-setup-hooks.js +377 -0
  137. package/scripts/flow-skill-create.js +329 -0
  138. package/scripts/flow-skill-creator.js +572 -0
  139. package/scripts/flow-skill-generator.js +1046 -0
  140. package/scripts/flow-skill-learn.js +880 -0
  141. package/scripts/flow-skill-matcher.js +578 -0
  142. package/scripts/flow-spec-generator.js +820 -0
  143. package/scripts/flow-stack-wizard.js +895 -0
  144. package/scripts/flow-standup +162 -0
  145. package/scripts/flow-start +74 -0
  146. package/scripts/flow-start.js +235 -0
  147. package/scripts/flow-status +110 -0
  148. package/scripts/flow-status.js +301 -0
  149. package/scripts/flow-step-browser.js +83 -0
  150. package/scripts/flow-step-changelog.js +217 -0
  151. package/scripts/flow-step-comments.js +306 -0
  152. package/scripts/flow-step-complexity.js +234 -0
  153. package/scripts/flow-step-coverage.js +218 -0
  154. package/scripts/flow-step-knowledge.js +193 -0
  155. package/scripts/flow-step-pr-tests.js +364 -0
  156. package/scripts/flow-step-regression.js +89 -0
  157. package/scripts/flow-step-review.js +516 -0
  158. package/scripts/flow-step-security.js +162 -0
  159. package/scripts/flow-step-silent-failures.js +290 -0
  160. package/scripts/flow-step-simplifier.js +346 -0
  161. package/scripts/flow-story +105 -0
  162. package/scripts/flow-story.js +500 -0
  163. package/scripts/flow-suspend.js +252 -0
  164. package/scripts/flow-sync-daemon.js +654 -0
  165. package/scripts/flow-task-analyzer.js +606 -0
  166. package/scripts/flow-team-dashboard.js +748 -0
  167. package/scripts/flow-team-sync.js +752 -0
  168. package/scripts/flow-team.js +977 -0
  169. package/scripts/flow-tech-options.js +528 -0
  170. package/scripts/flow-templates.js +812 -0
  171. package/scripts/flow-tiered-learning.js +728 -0
  172. package/scripts/flow-trace +204 -0
  173. package/scripts/flow-transcript-chunking.js +1106 -0
  174. package/scripts/flow-transcript-digest.js +7918 -0
  175. package/scripts/flow-transcript-language.js +465 -0
  176. package/scripts/flow-transcript-parsing.js +1085 -0
  177. package/scripts/flow-transcript-stories.js +2194 -0
  178. package/scripts/flow-update-map +224 -0
  179. package/scripts/flow-utils.js +2242 -0
  180. package/scripts/flow-verification.js +644 -0
  181. package/scripts/flow-verify.js +1177 -0
  182. package/scripts/flow-voice-input.js +638 -0
  183. package/scripts/flow-watch +168 -0
  184. package/scripts/flow-workflow-steps.js +521 -0
  185. package/scripts/flow-workflow.js +1029 -0
  186. package/scripts/flow-worktree.js +489 -0
  187. package/scripts/hooks/adapters/base-adapter.js +102 -0
  188. package/scripts/hooks/adapters/claude-code.js +359 -0
  189. package/scripts/hooks/adapters/index.js +79 -0
  190. package/scripts/hooks/core/component-check.js +341 -0
  191. package/scripts/hooks/core/index.js +35 -0
  192. package/scripts/hooks/core/loop-check.js +241 -0
  193. package/scripts/hooks/core/session-context.js +294 -0
  194. package/scripts/hooks/core/task-gate.js +177 -0
  195. package/scripts/hooks/core/validation.js +230 -0
  196. package/scripts/hooks/entry/claude-code/post-tool-use.js +65 -0
  197. package/scripts/hooks/entry/claude-code/pre-tool-use.js +89 -0
  198. package/scripts/hooks/entry/claude-code/session-end.js +87 -0
  199. package/scripts/hooks/entry/claude-code/session-start.js +46 -0
  200. package/scripts/hooks/entry/claude-code/stop.js +43 -0
  201. package/scripts/postinstall.js +139 -0
  202. package/templates/browser-test-flow.json +56 -0
  203. package/templates/bug-report.md +43 -0
  204. package/templates/component-detail.md +42 -0
  205. package/templates/component.stories.tsx +49 -0
  206. package/templates/context/constraints.md +83 -0
  207. package/templates/context/conventions.md +177 -0
  208. package/templates/context/stack.md +60 -0
  209. package/templates/correction-report.md +90 -0
  210. package/templates/feature-proposal.md +35 -0
  211. package/templates/hybrid/_base.md +254 -0
  212. package/templates/hybrid/_patterns.md +45 -0
  213. package/templates/hybrid/create-component.md +127 -0
  214. package/templates/hybrid/create-file.md +56 -0
  215. package/templates/hybrid/create-hook.md +145 -0
  216. package/templates/hybrid/create-service.md +70 -0
  217. package/templates/hybrid/fix-bug.md +33 -0
  218. package/templates/hybrid/modify-file.md +55 -0
  219. package/templates/story.md +68 -0
  220. package/templates/task.json +56 -0
  221. package/templates/trace.md +69 -0
@@ -0,0 +1,528 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Centralized Tech Stack Options for Wogi Flow
5
+ * Contains all technology definitions with Context7 IDs and ecosystem relationships
6
+ */
7
+
8
+ // ============================================
9
+ // PLATFORM TYPES
10
+ // ============================================
11
+
12
+ const PLATFORM_TYPES = [
13
+ { key: 'a', value: 'web', label: 'Web Application' },
14
+ { key: 'b', value: 'mobile', label: 'Mobile App (React Native / Flutter / Native)' },
15
+ { key: 'c', value: 'desktop', label: 'Desktop App (Electron / Tauri)' },
16
+ { key: 'd', value: 'backend', label: 'Backend API / Microservice' },
17
+ { key: 'e', value: 'fullstack', label: 'Full-Stack (Web + API)' },
18
+ { key: 'f', value: 'cli', label: 'CLI Tool' },
19
+ { key: 'g', value: 'library', label: 'Library / Package' }
20
+ ];
21
+
22
+ const FOCUS_AREAS = [
23
+ { key: 'a', value: 'frontend', label: 'Frontend only' },
24
+ { key: 'b', value: 'backend', label: 'Backend only' },
25
+ { key: 'c', value: 'both', label: 'Full-stack (both)' }
26
+ ];
27
+
28
+ // ============================================
29
+ // FRONTEND FRAMEWORKS
30
+ // ============================================
31
+
32
+ const FRONTEND_FRAMEWORKS = [
33
+ // React Ecosystem
34
+ { key: '1', value: 'react', label: 'React', context7: '/facebook/react', group: 'React Ecosystem', ecosystem: 'react' },
35
+ { key: '2', value: 'nextjs', label: 'Next.js', context7: '/vercel/next.js', group: 'React Ecosystem', ecosystem: 'react', recommended: true },
36
+ { key: '3', value: 'remix', label: 'Remix', context7: '/remix-run/remix', group: 'React Ecosystem', ecosystem: 'react' },
37
+ { key: '4', value: 'gatsby', label: 'Gatsby', context7: '/gatsbyjs/gatsby', group: 'React Ecosystem', ecosystem: 'react' },
38
+
39
+ // Vue Ecosystem
40
+ { key: '5', value: 'vue', label: 'Vue 3', context7: '/vuejs/vue', group: 'Vue Ecosystem', ecosystem: 'vue' },
41
+ { key: '6', value: 'nuxt', label: 'Nuxt 3', context7: '/nuxt/nuxt', group: 'Vue Ecosystem', ecosystem: 'vue' },
42
+
43
+ // Other Frameworks
44
+ { key: '7', value: 'svelte', label: 'Svelte / SvelteKit', context7: '/sveltejs/svelte', group: 'Other Frameworks', ecosystem: 'svelte' },
45
+ { key: '8', value: 'angular', label: 'Angular', context7: '/angular/angular', group: 'Other Frameworks', ecosystem: 'angular' },
46
+ { key: '9', value: 'astro', label: 'Astro', context7: '/withastro/astro', group: 'Other Frameworks', ecosystem: 'astro' },
47
+ { key: '10', value: 'solid', label: 'Solid.js', context7: '/solidjs/solid', group: 'Other Frameworks', ecosystem: 'solid' },
48
+ { key: '11', value: 'qwik', label: 'Qwik', context7: '/qwikdev/qwik', group: 'Other Frameworks', ecosystem: 'qwik' },
49
+
50
+ { key: '0', value: 'none', label: 'None / Other', context7: null, group: null, ecosystem: null }
51
+ ];
52
+
53
+ // ============================================
54
+ // BACKEND FRAMEWORKS
55
+ // ============================================
56
+
57
+ const BACKEND_FRAMEWORKS = [
58
+ // Node.js
59
+ { key: '1', value: 'express', label: 'Express', context7: '/expressjs/express', group: 'Node.js', ecosystem: 'node' },
60
+ { key: '2', value: 'nestjs', label: 'NestJS', context7: '/nestjs/nest', group: 'Node.js', ecosystem: 'nestjs', recommended: true },
61
+ { key: '3', value: 'fastify', label: 'Fastify', context7: '/fastify/fastify', group: 'Node.js', ecosystem: 'node' },
62
+ { key: '4', value: 'hono', label: 'Hono', context7: '/honojs/hono', group: 'Node.js', ecosystem: 'node' },
63
+ { key: '5', value: 'trpc', label: 'tRPC', context7: '/trpc/trpc', group: 'Node.js', ecosystem: 'node' },
64
+
65
+ // Python
66
+ { key: '6', value: 'fastapi', label: 'FastAPI', context7: '/tiangolo/fastapi', group: 'Python', ecosystem: 'python' },
67
+ { key: '7', value: 'django', label: 'Django', context7: '/django/django', group: 'Python', ecosystem: 'python' },
68
+ { key: '8', value: 'flask', label: 'Flask', context7: '/pallets/flask', group: 'Python', ecosystem: 'python' },
69
+
70
+ // Other
71
+ { key: '9', value: 'go', label: 'Go (Gin/Echo/Fiber)', context7: '/gin-gonic/gin', group: 'Other', ecosystem: 'go' },
72
+ { key: '10', value: 'rust', label: 'Rust (Actix/Axum)', context7: '/tokio-rs/axum', group: 'Other', ecosystem: 'rust' },
73
+ { key: '11', value: 'spring', label: 'Java (Spring Boot)', context7: '/spring-projects/spring-boot', group: 'Other', ecosystem: 'java' },
74
+ { key: '12', value: 'dotnet', label: '.NET (ASP.NET Core)', context7: '/dotnet/aspnetcore', group: 'Other', ecosystem: 'dotnet' },
75
+ { key: '13', value: 'rails', label: 'Ruby on Rails', context7: '/rails/rails', group: 'Other', ecosystem: 'ruby' },
76
+ { key: '14', value: 'phoenix', label: 'Elixir (Phoenix)', context7: '/phoenixframework/phoenix', group: 'Other', ecosystem: 'elixir' },
77
+
78
+ { key: '0', value: 'none', label: 'None / Other', context7: null, group: null, ecosystem: null }
79
+ ];
80
+
81
+ // ============================================
82
+ // MOBILE FRAMEWORKS
83
+ // ============================================
84
+
85
+ const MOBILE_FRAMEWORKS = [
86
+ { key: '1', value: 'react-native', label: 'React Native', context7: '/facebook/react-native', ecosystem: 'react' },
87
+ { key: '2', value: 'expo', label: 'Expo', context7: '/expo/expo', ecosystem: 'react', recommended: true },
88
+ { key: '3', value: 'flutter', label: 'Flutter', context7: '/flutter/flutter', ecosystem: 'flutter' },
89
+ { key: '4', value: 'swift', label: 'Swift (iOS native)', context7: '/apple/swift', ecosystem: 'ios' },
90
+ { key: '5', value: 'kotlin', label: 'Kotlin (Android native)', context7: '/JetBrains/kotlin', ecosystem: 'android' },
91
+ { key: '0', value: 'none', label: 'None / Other', context7: null, ecosystem: null }
92
+ ];
93
+
94
+ // ============================================
95
+ // STATE MANAGEMENT
96
+ // ============================================
97
+
98
+ const STATE_MANAGEMENT = [
99
+ // React
100
+ { key: '1', value: 'context', label: 'React Context + useReducer', context7: null, group: 'React', forFramework: ['react', 'nextjs', 'remix', 'gatsby'] },
101
+ { key: '2', value: 'zustand', label: 'Zustand', context7: '/pmndrs/zustand', group: 'React', forFramework: ['react', 'nextjs', 'remix', 'gatsby'], recommended: true },
102
+ { key: '3', value: 'redux', label: 'Redux Toolkit', context7: '/reduxjs/redux-toolkit', group: 'React', forFramework: ['react', 'nextjs', 'remix', 'gatsby'] },
103
+ { key: '4', value: 'jotai', label: 'Jotai', context7: '/pmndrs/jotai', group: 'React', forFramework: ['react', 'nextjs', 'remix', 'gatsby'] },
104
+ { key: '5', value: 'recoil', label: 'Recoil', context7: '/facebookexperimental/recoil', group: 'React', forFramework: ['react', 'nextjs', 'remix', 'gatsby'] },
105
+ { key: '6', value: 'mobx', label: 'MobX', context7: '/mobxjs/mobx', group: 'React', forFramework: ['react', 'nextjs', 'remix', 'gatsby'] },
106
+ { key: '7', value: 'tanstack-query', label: 'TanStack Query (server state)', context7: '/tanstack/query', group: 'React', forFramework: ['react', 'nextjs', 'remix', 'gatsby'] },
107
+
108
+ // Vue
109
+ { key: '8', value: 'pinia', label: 'Pinia', context7: '/vuejs/pinia', group: 'Vue', forFramework: ['vue', 'nuxt'], recommended: true },
110
+ { key: '9', value: 'vuex', label: 'Vuex', context7: '/vuejs/vuex', group: 'Vue', forFramework: ['vue', 'nuxt'] },
111
+
112
+ // General
113
+ { key: '10', value: 'xstate', label: 'XState (state machines)', context7: '/statelyai/xstate', group: 'General', forFramework: null },
114
+ { key: '0', value: 'none', label: 'None / Custom', context7: null, group: 'General', forFramework: null }
115
+ ];
116
+
117
+ // ============================================
118
+ // FORM LIBRARIES
119
+ // ============================================
120
+
121
+ const FORM_LIBRARIES = [
122
+ { key: '1', value: 'react-hook-form', label: 'React Hook Form', context7: '/react-hook-form/react-hook-form', forFramework: ['react', 'nextjs', 'remix', 'gatsby'], recommended: true },
123
+ { key: '2', value: 'formik', label: 'Formik', context7: '/jaredpalmer/formik', forFramework: ['react', 'nextjs', 'remix', 'gatsby'] },
124
+ { key: '3', value: 'vee-validate', label: 'VeeValidate', context7: '/logaretm/vee-validate', forFramework: ['vue', 'nuxt'] },
125
+ { key: '4', value: 'formkit', label: 'FormKit', context7: '/formkit/formkit', forFramework: ['vue', 'nuxt'] },
126
+ { key: '0', value: 'native', label: 'Native controlled components', context7: null, forFramework: null }
127
+ ];
128
+
129
+ // ============================================
130
+ // STYLING OPTIONS
131
+ // ============================================
132
+
133
+ const STYLING_OPTIONS = [
134
+ { key: '1', value: 'tailwind', label: 'Tailwind CSS', context7: '/tailwindlabs/tailwindcss', recommended: true },
135
+ { key: '2', value: 'shadcn', label: 'shadcn/ui + Tailwind', context7: '/shadcn-ui/ui', forFramework: ['react', 'nextjs'] },
136
+ { key: '3', value: 'css-modules', label: 'CSS Modules', context7: null },
137
+ { key: '4', value: 'styled-components', label: 'Styled Components', context7: '/styled-components/styled-components', forFramework: ['react', 'nextjs'] },
138
+ { key: '5', value: 'emotion', label: 'Emotion', context7: '/emotion-js/emotion', forFramework: ['react', 'nextjs'] },
139
+ { key: '6', value: 'vanilla-extract', label: 'Vanilla Extract', context7: '/vanilla-extract-css/vanilla-extract' },
140
+ { key: '7', value: 'sass', label: 'Sass/SCSS', context7: '/sass/sass' },
141
+ { key: '8', value: 'css', label: 'Plain CSS', context7: null }
142
+ ];
143
+
144
+ // ============================================
145
+ // DATA FETCHING
146
+ // ============================================
147
+
148
+ const DATA_FETCHING = [
149
+ { key: '1', value: 'tanstack-query', label: 'TanStack Query', context7: '/tanstack/query', forFramework: ['react', 'nextjs', 'remix', 'vue', 'nuxt'], recommended: true },
150
+ { key: '2', value: 'swr', label: 'SWR', context7: '/vercel/swr', forFramework: ['react', 'nextjs'] },
151
+ { key: '3', value: 'rtk-query', label: 'RTK Query', context7: '/reduxjs/redux-toolkit', forFramework: ['react', 'nextjs'] },
152
+ { key: '4', value: 'apollo', label: 'Apollo Client (GraphQL)', context7: '/apollographql/apollo-client', forFramework: ['react', 'nextjs', 'vue', 'nuxt'] },
153
+ { key: '0', value: 'native', label: 'Native fetch/axios', context7: null, forFramework: null }
154
+ ];
155
+
156
+ // ============================================
157
+ // ANIMATION LIBRARIES
158
+ // ============================================
159
+
160
+ const ANIMATION_LIBRARIES = [
161
+ { key: '1', value: 'framer-motion', label: 'Framer Motion', context7: '/framer/motion', forFramework: ['react', 'nextjs'], recommended: true },
162
+ { key: '2', value: 'react-spring', label: 'React Spring', context7: '/pmndrs/react-spring', forFramework: ['react', 'nextjs'] },
163
+ { key: '3', value: 'gsap', label: 'GSAP', context7: '/greensock/GSAP', forFramework: null },
164
+ { key: '4', value: 'auto-animate', label: 'AutoAnimate', context7: '/formkit/auto-animate', forFramework: null },
165
+ { key: '0', value: 'none', label: 'None', context7: null, forFramework: null }
166
+ ];
167
+
168
+ // ============================================
169
+ // VALIDATION LIBRARIES
170
+ // ============================================
171
+
172
+ const VALIDATION_LIBRARIES = [
173
+ { key: '1', value: 'zod', label: 'Zod', context7: '/colinhacks/zod', recommended: true },
174
+ { key: '2', value: 'yup', label: 'Yup', context7: '/jquense/yup' },
175
+ { key: '3', value: 'class-validator', label: 'class-validator', context7: '/typestack/class-validator', forFramework: ['nestjs'] },
176
+ { key: '4', value: 'joi', label: 'Joi', context7: '/hapijs/joi' },
177
+ { key: '5', value: 'valibot', label: 'Valibot', context7: '/fabian-hiller/valibot' },
178
+ { key: '0', value: 'none', label: 'None / Custom', context7: null }
179
+ ];
180
+
181
+ // ============================================
182
+ // DATABASE / ORM
183
+ // ============================================
184
+
185
+ const DATABASE_OPTIONS = [
186
+ // SQL Databases
187
+ { key: '1', value: 'postgresql', label: 'PostgreSQL', context7: '/postgres/postgres', group: 'SQL', recommended: true },
188
+ { key: '2', value: 'mysql', label: 'MySQL', context7: '/mysql/mysql-server', group: 'SQL' },
189
+ { key: '3', value: 'sqlite', label: 'SQLite', context7: '/sqlite/sqlite', group: 'SQL' },
190
+
191
+ // NoSQL Databases
192
+ { key: '4', value: 'mongodb', label: 'MongoDB', context7: '/mongodb/mongo', group: 'NoSQL' },
193
+ { key: '5', value: 'redis', label: 'Redis', context7: '/redis/redis', group: 'NoSQL' },
194
+ { key: '6', value: 'dynamodb', label: 'DynamoDB', context7: '/aws/aws-sdk', group: 'NoSQL' },
195
+
196
+ { key: '0', value: 'none', label: 'None', context7: null, group: null }
197
+ ];
198
+
199
+ const ORM_OPTIONS = [
200
+ { key: '1', value: 'prisma', label: 'Prisma', context7: '/prisma/prisma', forFramework: ['nextjs', 'nestjs', 'express', 'fastify'] },
201
+ { key: '2', value: 'drizzle', label: 'Drizzle', context7: '/drizzle-team/drizzle-orm', forFramework: ['nextjs', 'nestjs', 'express', 'fastify'] },
202
+ { key: '3', value: 'typeorm', label: 'TypeORM', context7: '/typeorm/typeorm', forFramework: ['nestjs'], recommended: true },
203
+ { key: '4', value: 'mikro-orm', label: 'MikroORM', context7: '/mikro-orm/mikro-orm', forFramework: ['nestjs'] },
204
+ { key: '5', value: 'mongoose', label: 'Mongoose', context7: '/automattic/mongoose', forFramework: ['express', 'nestjs', 'fastify'] },
205
+ { key: '6', value: 'sequelize', label: 'Sequelize', context7: '/sequelize/sequelize', forFramework: ['express', 'nestjs'] },
206
+ { key: '7', value: 'sqlalchemy', label: 'SQLAlchemy', context7: '/sqlalchemy/sqlalchemy', forFramework: ['fastapi', 'flask'] },
207
+ { key: '8', value: 'django-orm', label: 'Django ORM', context7: '/django/django', forFramework: ['django'] },
208
+ { key: '0', value: 'none', label: 'None / Raw SQL', context7: null, forFramework: null }
209
+ ];
210
+
211
+ // ============================================
212
+ // AUTHENTICATION
213
+ // ============================================
214
+
215
+ const AUTH_OPTIONS = [
216
+ { key: '1', value: 'next-auth', label: 'NextAuth.js / Auth.js', context7: '/nextauthjs/next-auth', forFramework: ['nextjs'] },
217
+ { key: '2', value: 'clerk', label: 'Clerk', context7: '/clerk/javascript', forFramework: ['nextjs', 'react'] },
218
+ { key: '3', value: 'auth0', label: 'Auth0', context7: '/auth0/nextjs-auth0', forFramework: ['nextjs', 'react'] },
219
+ { key: '4', value: 'supabase-auth', label: 'Supabase Auth', context7: '/supabase/supabase', forFramework: ['nextjs', 'react'] },
220
+ { key: '5', value: 'firebase-auth', label: 'Firebase Auth', context7: '/firebase/firebase-js-sdk', forFramework: ['nextjs', 'react'] },
221
+ { key: '6', value: 'passport', label: 'Passport.js', context7: '/jaredhanson/passport', forFramework: ['express', 'nestjs', 'fastify'], recommended: true },
222
+ { key: '7', value: 'lucia', label: 'Lucia', context7: '/lucia-auth/lucia', forFramework: ['nextjs', 'sveltekit'] },
223
+ { key: '0', value: 'custom', label: 'Custom JWT / None', context7: null, forFramework: null }
224
+ ];
225
+
226
+ // ============================================
227
+ // TESTING
228
+ // ============================================
229
+
230
+ const TESTING_OPTIONS = [
231
+ // Unit Testing
232
+ { key: '1', value: 'vitest', label: 'Vitest', context7: '/vitest-dev/vitest', group: 'Unit', recommended: true },
233
+ { key: '2', value: 'jest', label: 'Jest', context7: '/jestjs/jest', group: 'Unit' },
234
+ { key: '3', value: 'testing-library', label: 'Testing Library', context7: '/testing-library/react-testing-library', group: 'Unit' },
235
+
236
+ // E2E Testing
237
+ { key: '4', value: 'playwright', label: 'Playwright', context7: '/microsoft/playwright', group: 'E2E', recommended: true },
238
+ { key: '5', value: 'cypress', label: 'Cypress', context7: '/cypress-io/cypress', group: 'E2E' },
239
+
240
+ // Python
241
+ { key: '6', value: 'pytest', label: 'Pytest', context7: '/pytest-dev/pytest', group: 'Python' },
242
+
243
+ { key: '0', value: 'none', label: 'None', context7: null, group: null }
244
+ ];
245
+
246
+ // ============================================
247
+ // ADDITIONAL TOOLS
248
+ // ============================================
249
+
250
+ const ADDITIONAL_TOOLS = [
251
+ { key: '1', value: 'docker', label: 'Docker', context7: '/docker/docs' },
252
+ { key: '2', value: 'kubernetes', label: 'Kubernetes', context7: '/kubernetes/kubernetes' },
253
+ { key: '3', value: 'terraform', label: 'Terraform', context7: '/hashicorp/terraform' },
254
+ { key: '4', value: 'github-actions', label: 'GitHub Actions', context7: '/actions/toolkit' },
255
+ { key: '5', value: 'graphql', label: 'GraphQL', context7: '/graphql/graphql-js' },
256
+ { key: '6', value: 'websockets', label: 'WebSockets', context7: '/websockets/ws' },
257
+ { key: '7', value: 'stripe', label: 'Stripe (Payments)', context7: '/stripe/stripe-node' },
258
+ { key: '8', value: 'sentry', label: 'Sentry (Error Tracking)', context7: '/getsentry/sentry-javascript' },
259
+ { key: '9', value: 'analytics', label: 'Analytics (Posthog/Mixpanel)', context7: '/PostHog/posthog' }
260
+ ];
261
+
262
+ // ============================================
263
+ // MOBILE-SPECIFIC TOOLS
264
+ // ============================================
265
+
266
+ const MOBILE_TOOLS = [
267
+ { key: '1', value: 'react-navigation', label: 'React Navigation', context7: '/react-navigation/react-navigation', forFramework: ['react-native', 'expo'] },
268
+ { key: '2', value: 'expo-router', label: 'Expo Router', context7: '/expo/router', forFramework: ['expo'] },
269
+ { key: '3', value: 'nativewind', label: 'NativeWind (Tailwind for RN)', context7: '/marklawlor/nativewind', forFramework: ['react-native', 'expo'] },
270
+ { key: '4', value: 'react-native-reanimated', label: 'Reanimated', context7: '/software-mansion/react-native-reanimated', forFramework: ['react-native', 'expo'] },
271
+ { key: '5', value: 'mmkv', label: 'MMKV (Storage)', context7: '/mrousavy/react-native-mmkv', forFramework: ['react-native', 'expo'] }
272
+ ];
273
+
274
+ // ============================================
275
+ // ECOSYSTEM DEFINITIONS
276
+ // ============================================
277
+
278
+ const ECOSYSTEMS = {
279
+ react: {
280
+ name: 'React Ecosystem',
281
+ categories: ['stateManagement', 'forms', 'styling', 'dataFetching', 'animation', 'validation'],
282
+ defaults: {
283
+ stateManagement: 'zustand',
284
+ forms: 'react-hook-form',
285
+ styling: 'shadcn',
286
+ dataFetching: 'tanstack-query',
287
+ validation: 'zod'
288
+ }
289
+ },
290
+ vue: {
291
+ name: 'Vue Ecosystem',
292
+ categories: ['stateManagement', 'forms', 'styling', 'dataFetching', 'validation'],
293
+ defaults: {
294
+ stateManagement: 'pinia',
295
+ forms: 'vee-validate',
296
+ styling: 'tailwind',
297
+ dataFetching: 'tanstack-query',
298
+ validation: 'zod'
299
+ }
300
+ },
301
+ nestjs: {
302
+ name: 'NestJS Ecosystem',
303
+ categories: ['orm', 'database', 'auth', 'validation'],
304
+ defaults: {
305
+ orm: 'typeorm',
306
+ database: 'postgresql',
307
+ auth: 'passport',
308
+ validation: 'class-validator'
309
+ }
310
+ },
311
+ express: {
312
+ name: 'Express Ecosystem',
313
+ categories: ['orm', 'database', 'auth', 'validation'],
314
+ defaults: {
315
+ orm: 'prisma',
316
+ database: 'postgresql',
317
+ auth: 'passport',
318
+ validation: 'zod'
319
+ }
320
+ },
321
+ python: {
322
+ name: 'Python Ecosystem',
323
+ categories: ['orm', 'database', 'auth'],
324
+ defaults: {
325
+ orm: 'sqlalchemy',
326
+ database: 'postgresql',
327
+ auth: 'custom'
328
+ }
329
+ },
330
+ mobile: {
331
+ name: 'Mobile Ecosystem',
332
+ categories: ['navigation', 'styling', 'animation', 'storage'],
333
+ defaults: {
334
+ navigation: 'expo-router',
335
+ styling: 'nativewind',
336
+ animation: 'react-native-reanimated',
337
+ storage: 'mmkv'
338
+ }
339
+ }
340
+ };
341
+
342
+ // ============================================
343
+ // "CHOOSE BEST FOR ME" DEFAULTS
344
+ // ============================================
345
+
346
+ const BEST_DEFAULTS = {
347
+ // Platform defaults
348
+ projectType: 'fullstack',
349
+ focus: 'both',
350
+
351
+ // Frontend defaults
352
+ frontend: 'nextjs',
353
+ stateManagement: 'zustand',
354
+ forms: 'react-hook-form',
355
+ styling: 'shadcn',
356
+ dataFetching: 'tanstack-query',
357
+ animation: 'framer-motion',
358
+
359
+ // Backend defaults
360
+ backend: 'nestjs',
361
+ orm: 'typeorm',
362
+ database: 'postgresql',
363
+ auth: 'passport',
364
+ validation: 'zod',
365
+
366
+ // Testing defaults
367
+ testing: 'vitest',
368
+ e2e: 'playwright',
369
+
370
+ // Mobile defaults
371
+ mobile: 'expo',
372
+ mobileNavigation: 'expo-router',
373
+ mobileStyling: 'nativewind'
374
+ };
375
+
376
+ // ============================================
377
+ // HELPER FUNCTIONS
378
+ // ============================================
379
+
380
+ /**
381
+ * Get options filtered by framework
382
+ */
383
+ function getOptionsForFramework(options, framework) {
384
+ return options.filter(opt => {
385
+ if (!opt.forFramework) return true;
386
+ return opt.forFramework.includes(framework);
387
+ });
388
+ }
389
+
390
+ /**
391
+ * Get ecosystem defaults for a framework
392
+ */
393
+ function getEcosystemDefaults(framework) {
394
+ // Map framework to ecosystem
395
+ const frameworkToEcosystem = {
396
+ react: 'react',
397
+ nextjs: 'react',
398
+ remix: 'react',
399
+ gatsby: 'react',
400
+ vue: 'vue',
401
+ nuxt: 'vue',
402
+ nestjs: 'nestjs',
403
+ express: 'express',
404
+ fastify: 'express',
405
+ fastapi: 'python',
406
+ django: 'python',
407
+ flask: 'python',
408
+ 'react-native': 'mobile',
409
+ expo: 'mobile'
410
+ };
411
+
412
+ const ecosystem = frameworkToEcosystem[framework];
413
+ return ecosystem ? ECOSYSTEMS[ecosystem] : null;
414
+ }
415
+
416
+ /**
417
+ * Get all technologies for Context7 fetching
418
+ */
419
+ function collectTechnologiesFromSelections(selections) {
420
+ const technologies = [];
421
+ const allOptions = [
422
+ ...FRONTEND_FRAMEWORKS,
423
+ ...BACKEND_FRAMEWORKS,
424
+ ...MOBILE_FRAMEWORKS,
425
+ ...STATE_MANAGEMENT,
426
+ ...FORM_LIBRARIES,
427
+ ...STYLING_OPTIONS,
428
+ ...DATA_FETCHING,
429
+ ...ANIMATION_LIBRARIES,
430
+ ...VALIDATION_LIBRARIES,
431
+ ...DATABASE_OPTIONS,
432
+ ...ORM_OPTIONS,
433
+ ...AUTH_OPTIONS,
434
+ ...TESTING_OPTIONS,
435
+ ...ADDITIONAL_TOOLS,
436
+ ...MOBILE_TOOLS
437
+ ];
438
+
439
+ const selectedValues = Object.values(selections).flat().filter(v => v && v !== 'none' && v !== 'native' && v !== 'custom');
440
+
441
+ for (const value of selectedValues) {
442
+ const option = allOptions.find(o => o.value === value);
443
+ if (option && option.context7) {
444
+ technologies.push({
445
+ value: option.value,
446
+ label: option.label,
447
+ context7: option.context7,
448
+ group: option.group || null,
449
+ forFramework: option.forFramework || null
450
+ });
451
+ }
452
+ }
453
+
454
+ return technologies;
455
+ }
456
+
457
+ /**
458
+ * Determine skill type (hub/framework vs spoke/library)
459
+ */
460
+ function getSkillType(techValue) {
461
+ const frameworks = ['nextjs', 'react', 'vue', 'nuxt', 'svelte', 'angular', 'astro', 'nestjs', 'express', 'fastify', 'fastapi', 'django', 'flask', 'expo', 'react-native', 'flutter'];
462
+ return frameworks.includes(techValue) ? 'framework' : 'library';
463
+ }
464
+
465
+ /**
466
+ * Get parent framework for a library
467
+ */
468
+ function getParentFramework(techValue, selections) {
469
+ const frontendEcosystemLibs = ['zustand', 'redux', 'jotai', 'recoil', 'mobx', 'tanstack-query', 'react-hook-form', 'formik', 'framer-motion', 'react-spring', 'swr', 'rtk-query'];
470
+ const vueEcosystemLibs = ['pinia', 'vuex', 'vee-validate', 'formkit'];
471
+ const nestjsEcosystemLibs = ['typeorm', 'mikro-orm', 'class-validator'];
472
+
473
+ if (frontendEcosystemLibs.includes(techValue)) {
474
+ return selections.frontend || 'react';
475
+ }
476
+ if (vueEcosystemLibs.includes(techValue)) {
477
+ return selections.frontend || 'vue';
478
+ }
479
+ if (nestjsEcosystemLibs.includes(techValue)) {
480
+ return 'nestjs';
481
+ }
482
+
483
+ return null;
484
+ }
485
+
486
+ // ============================================
487
+ // EXPORTS
488
+ // ============================================
489
+
490
+ module.exports = {
491
+ // Platform & Focus
492
+ PLATFORM_TYPES,
493
+ FOCUS_AREAS,
494
+
495
+ // Frameworks
496
+ FRONTEND_FRAMEWORKS,
497
+ BACKEND_FRAMEWORKS,
498
+ MOBILE_FRAMEWORKS,
499
+
500
+ // Frontend Ecosystem
501
+ STATE_MANAGEMENT,
502
+ FORM_LIBRARIES,
503
+ STYLING_OPTIONS,
504
+ DATA_FETCHING,
505
+ ANIMATION_LIBRARIES,
506
+
507
+ // Backend Ecosystem
508
+ DATABASE_OPTIONS,
509
+ ORM_OPTIONS,
510
+ AUTH_OPTIONS,
511
+ VALIDATION_LIBRARIES,
512
+
513
+ // Testing & Tools
514
+ TESTING_OPTIONS,
515
+ ADDITIONAL_TOOLS,
516
+ MOBILE_TOOLS,
517
+
518
+ // Ecosystem Definitions
519
+ ECOSYSTEMS,
520
+ BEST_DEFAULTS,
521
+
522
+ // Helper Functions
523
+ getOptionsForFramework,
524
+ getEcosystemDefaults,
525
+ collectTechnologiesFromSelections,
526
+ getSkillType,
527
+ getParentFramework
528
+ };