ccjk 14.2.2 → 15.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 (528) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +58 -341
  3. package/dist/cli.js +59 -0
  4. package/dist/cli.js.map +1 -0
  5. package/dist/commands/detect.js +15 -0
  6. package/dist/commands/detect.js.map +1 -0
  7. package/dist/commands/doctor.js +68 -0
  8. package/dist/commands/doctor.js.map +1 -0
  9. package/dist/commands/git-install.js +50 -0
  10. package/dist/commands/git-install.js.map +1 -0
  11. package/dist/commands/init.js +102 -0
  12. package/dist/commands/init.js.map +1 -0
  13. package/dist/commands/mcp.js +66 -0
  14. package/dist/commands/mcp.js.map +1 -0
  15. package/dist/commands/menu.js +33 -0
  16. package/dist/commands/menu.js.map +1 -0
  17. package/dist/core/detect.js +24 -0
  18. package/dist/core/detect.js.map +1 -0
  19. package/dist/core/lint.js +49 -0
  20. package/dist/core/lint.js.map +1 -0
  21. package/dist/core/mcp.js +41 -0
  22. package/dist/core/mcp.js.map +1 -0
  23. package/dist/core/paths.js +9 -0
  24. package/dist/core/paths.js.map +1 -0
  25. package/dist/core/providers.js +53 -0
  26. package/dist/core/providers.js.map +1 -0
  27. package/dist/core/settings.js +31 -0
  28. package/dist/core/settings.js.map +1 -0
  29. package/dist/core/slash-templates.js +56 -0
  30. package/dist/core/slash-templates.js.map +1 -0
  31. package/dist/core/tools.js +27 -0
  32. package/dist/core/tools.js.map +1 -0
  33. package/package.json +43 -164
  34. package/README.HONEST.md +0 -176
  35. package/README.en.md +0 -67
  36. package/README.ja.md +0 -67
  37. package/README.ko.md +0 -67
  38. package/README.zh-CN.md +0 -86
  39. package/bin/ccjk.mjs +0 -5
  40. package/bin/ccjk.ts +0 -222
  41. package/dist/chunks/agent-teams.mjs +0 -145
  42. package/dist/chunks/agent.mjs +0 -1439
  43. package/dist/chunks/agents.mjs +0 -3783
  44. package/dist/chunks/api-cli.mjs +0 -135
  45. package/dist/chunks/api-config-selector.mjs +0 -159
  46. package/dist/chunks/api-providers.mjs +0 -144
  47. package/dist/chunks/api.mjs +0 -115
  48. package/dist/chunks/auto-bootstrap.mjs +0 -358
  49. package/dist/chunks/auto-fixer.mjs +0 -95
  50. package/dist/chunks/auto-updater.mjs +0 -507
  51. package/dist/chunks/banner.mjs +0 -173
  52. package/dist/chunks/bash.mjs +0 -187
  53. package/dist/chunks/boost.mjs +0 -474
  54. package/dist/chunks/brain-config.mjs +0 -75
  55. package/dist/chunks/brain-status.mjs +0 -89
  56. package/dist/chunks/ccjk-agents.mjs +0 -416
  57. package/dist/chunks/ccjk-all.mjs +0 -1046
  58. package/dist/chunks/ccjk-config.mjs +0 -445
  59. package/dist/chunks/ccjk-hooks.mjs +0 -1074
  60. package/dist/chunks/ccjk-mcp.mjs +0 -763
  61. package/dist/chunks/ccjk-setup.mjs +0 -765
  62. package/dist/chunks/ccjk-skills.mjs +0 -518
  63. package/dist/chunks/ccr.mjs +0 -109
  64. package/dist/chunks/ccu.mjs +0 -40
  65. package/dist/chunks/check-updates.mjs +0 -117
  66. package/dist/chunks/claude-code-incremental-manager.mjs +0 -761
  67. package/dist/chunks/claude-config.mjs +0 -606
  68. package/dist/chunks/claude-config2.mjs +0 -62
  69. package/dist/chunks/claude-wrapper.mjs +0 -85
  70. package/dist/chunks/clavue-config.mjs +0 -1454
  71. package/dist/chunks/cleanup-migration.mjs +0 -20
  72. package/dist/chunks/cli-hook.mjs +0 -4096
  73. package/dist/chunks/cloud-sync.mjs +0 -29
  74. package/dist/chunks/code-type-resolver.mjs +0 -880
  75. package/dist/chunks/codex-config-switch.mjs +0 -452
  76. package/dist/chunks/codex-provider-manager.mjs +0 -238
  77. package/dist/chunks/codex-uninstaller.mjs +0 -404
  78. package/dist/chunks/codex.mjs +0 -2141
  79. package/dist/chunks/commands.mjs +0 -108
  80. package/dist/chunks/commands2.mjs +0 -421
  81. package/dist/chunks/commit.mjs +0 -140
  82. package/dist/chunks/completion.mjs +0 -517
  83. package/dist/chunks/config-consolidator.mjs +0 -172
  84. package/dist/chunks/config-switch.mjs +0 -334
  85. package/dist/chunks/config.mjs +0 -558
  86. package/dist/chunks/config2.mjs +0 -484
  87. package/dist/chunks/config3.mjs +0 -486
  88. package/dist/chunks/constants.mjs +0 -323
  89. package/dist/chunks/context-opt.mjs +0 -444
  90. package/dist/chunks/context.mjs +0 -974
  91. package/dist/chunks/dashboard.mjs +0 -481
  92. package/dist/chunks/doctor.mjs +0 -1301
  93. package/dist/chunks/eval.mjs +0 -502
  94. package/dist/chunks/evolution.mjs +0 -322
  95. package/dist/chunks/features.mjs +0 -715
  96. package/dist/chunks/fish.mjs +0 -181
  97. package/dist/chunks/fs-operations.mjs +0 -180
  98. package/dist/chunks/health-alerts.mjs +0 -830
  99. package/dist/chunks/help.mjs +0 -341
  100. package/dist/chunks/hook-installer.mjs +0 -48
  101. package/dist/chunks/impact.mjs +0 -651
  102. package/dist/chunks/index.mjs +0 -23
  103. package/dist/chunks/index10.mjs +0 -19
  104. package/dist/chunks/index11.mjs +0 -1171
  105. package/dist/chunks/index12.mjs +0 -218
  106. package/dist/chunks/index13.mjs +0 -679
  107. package/dist/chunks/index14.mjs +0 -1009
  108. package/dist/chunks/index15.mjs +0 -194
  109. package/dist/chunks/index2.mjs +0 -7637
  110. package/dist/chunks/index3.mjs +0 -171
  111. package/dist/chunks/index4.mjs +0 -26
  112. package/dist/chunks/index5.mjs +0 -19
  113. package/dist/chunks/index6.mjs +0 -19092
  114. package/dist/chunks/index7.mjs +0 -616
  115. package/dist/chunks/index8.mjs +0 -1602
  116. package/dist/chunks/index9.mjs +0 -5384
  117. package/dist/chunks/init.mjs +0 -1911
  118. package/dist/chunks/installer.mjs +0 -757
  119. package/dist/chunks/installer2.mjs +0 -103
  120. package/dist/chunks/interview.mjs +0 -2927
  121. package/dist/chunks/json-config.mjs +0 -60
  122. package/dist/chunks/linux.mjs +0 -3863
  123. package/dist/chunks/macos.mjs +0 -69
  124. package/dist/chunks/main.mjs +0 -635
  125. package/dist/chunks/manager.mjs +0 -1048
  126. package/dist/chunks/marketplace.mjs +0 -265
  127. package/dist/chunks/mcp-cli.mjs +0 -205
  128. package/dist/chunks/mcp-performance.mjs +0 -187
  129. package/dist/chunks/mcp.mjs +0 -667
  130. package/dist/chunks/memory-check.mjs +0 -2973
  131. package/dist/chunks/memory-paths.mjs +0 -259
  132. package/dist/chunks/memory-sync.mjs +0 -209
  133. package/dist/chunks/memory.mjs +0 -354
  134. package/dist/chunks/metrics-display.mjs +0 -153
  135. package/dist/chunks/monitor.mjs +0 -1856
  136. package/dist/chunks/notification.mjs +0 -1864
  137. package/dist/chunks/onboarding.mjs +0 -386
  138. package/dist/chunks/package.mjs +0 -3
  139. package/dist/chunks/paradigm.mjs +0 -74
  140. package/dist/chunks/permission-manager.mjs +0 -250
  141. package/dist/chunks/permissions.mjs +0 -265
  142. package/dist/chunks/persistence-manager.mjs +0 -801
  143. package/dist/chunks/persistence.mjs +0 -707
  144. package/dist/chunks/platform.mjs +0 -395
  145. package/dist/chunks/plugin.mjs +0 -1936
  146. package/dist/chunks/powershell.mjs +0 -213
  147. package/dist/chunks/prompts.mjs +0 -244
  148. package/dist/chunks/providers.mjs +0 -263
  149. package/dist/chunks/quick-actions.mjs +0 -335
  150. package/dist/chunks/quick-provider.mjs +0 -755
  151. package/dist/chunks/quick-setup.mjs +0 -421
  152. package/dist/chunks/remote.mjs +0 -497
  153. package/dist/chunks/research.mjs +0 -1904
  154. package/dist/chunks/rollback.mjs +0 -38
  155. package/dist/chunks/session-manager.mjs +0 -1371
  156. package/dist/chunks/session.mjs +0 -878
  157. package/dist/chunks/sessions.mjs +0 -106
  158. package/dist/chunks/silent-updater.mjs +0 -396
  159. package/dist/chunks/simple-config.mjs +0 -122
  160. package/dist/chunks/skill.mjs +0 -117
  161. package/dist/chunks/skill2.mjs +0 -9052
  162. package/dist/chunks/skills-sync.mjs +0 -1343
  163. package/dist/chunks/skills.mjs +0 -577
  164. package/dist/chunks/slash-commands.mjs +0 -208
  165. package/dist/chunks/smart-guide.mjs +0 -247
  166. package/dist/chunks/snapshot.mjs +0 -58
  167. package/dist/chunks/startup.mjs +0 -487
  168. package/dist/chunks/stats.mjs +0 -191
  169. package/dist/chunks/status.mjs +0 -471
  170. package/dist/chunks/team.mjs +0 -63
  171. package/dist/chunks/thinking.mjs +0 -626
  172. package/dist/chunks/trace.mjs +0 -57
  173. package/dist/chunks/uninstall.mjs +0 -852
  174. package/dist/chunks/update.mjs +0 -174
  175. package/dist/chunks/upgrade-manager.mjs +0 -204
  176. package/dist/chunks/upgrade.mjs +0 -133
  177. package/dist/chunks/version-checker.mjs +0 -891
  178. package/dist/chunks/vim.mjs +0 -903
  179. package/dist/chunks/windows.mjs +0 -14
  180. package/dist/chunks/workflows.mjs +0 -633
  181. package/dist/chunks/wsl.mjs +0 -129
  182. package/dist/chunks/zero-config.mjs +0 -871
  183. package/dist/chunks/zsh.mjs +0 -182
  184. package/dist/cli.d.mts +0 -1
  185. package/dist/cli.d.ts +0 -1
  186. package/dist/cli.mjs +0 -2684
  187. package/dist/i18n/locales/en/agent-teams.json +0 -18
  188. package/dist/i18n/locales/en/agentBrowser.json +0 -80
  189. package/dist/i18n/locales/en/agents.json +0 -135
  190. package/dist/i18n/locales/en/api.json +0 -63
  191. package/dist/i18n/locales/en/ccjk-agents.json +0 -33
  192. package/dist/i18n/locales/en/ccjk-all.json +0 -23
  193. package/dist/i18n/locales/en/ccjk-skills.json +0 -22
  194. package/dist/i18n/locales/en/ccjk.json +0 -276
  195. package/dist/i18n/locales/en/ccr.json +0 -65
  196. package/dist/i18n/locales/en/claude-md.json +0 -73
  197. package/dist/i18n/locales/en/cli.json +0 -148
  198. package/dist/i18n/locales/en/cloud-setup.json +0 -31
  199. package/dist/i18n/locales/en/cloud-sync.json +0 -147
  200. package/dist/i18n/locales/en/cloud.json +0 -40
  201. package/dist/i18n/locales/en/cloudPlugins.json +0 -118
  202. package/dist/i18n/locales/en/codex.json +0 -184
  203. package/dist/i18n/locales/en/cometix.json +0 -29
  204. package/dist/i18n/locales/en/common.json +0 -68
  205. package/dist/i18n/locales/en/config.json +0 -108
  206. package/dist/i18n/locales/en/configuration.json +0 -236
  207. package/dist/i18n/locales/en/context.json +0 -85
  208. package/dist/i18n/locales/en/dashboard.json +0 -78
  209. package/dist/i18n/locales/en/errors.json +0 -26
  210. package/dist/i18n/locales/en/evolution.json +0 -54
  211. package/dist/i18n/locales/en/hooks.json +0 -74
  212. package/dist/i18n/locales/en/hooksSync.json +0 -133
  213. package/dist/i18n/locales/en/installation.json +0 -83
  214. package/dist/i18n/locales/en/interview.json +0 -104
  215. package/dist/i18n/locales/en/language.json +0 -19
  216. package/dist/i18n/locales/en/lsp.json +0 -78
  217. package/dist/i18n/locales/en/marketplace.json +0 -116
  218. package/dist/i18n/locales/en/mcp.json +0 -180
  219. package/dist/i18n/locales/en/memory.json +0 -23
  220. package/dist/i18n/locales/en/menu.json +0 -299
  221. package/dist/i18n/locales/en/multi-config.json +0 -79
  222. package/dist/i18n/locales/en/notification.json +0 -307
  223. package/dist/i18n/locales/en/permissions.json +0 -95
  224. package/dist/i18n/locales/en/persistence.json +0 -127
  225. package/dist/i18n/locales/en/plugins.json +0 -146
  226. package/dist/i18n/locales/en/quick-actions.json +0 -78
  227. package/dist/i18n/locales/en/registry.json +0 -54
  228. package/dist/i18n/locales/en/remote.json +0 -93
  229. package/dist/i18n/locales/en/sandbox.json +0 -44
  230. package/dist/i18n/locales/en/setup.json +0 -44
  231. package/dist/i18n/locales/en/shencha.json +0 -14
  232. package/dist/i18n/locales/en/skills.json +0 -100
  233. package/dist/i18n/locales/en/skillsSync.json +0 -74
  234. package/dist/i18n/locales/en/smartGuide.json +0 -49
  235. package/dist/i18n/locales/en/stats.json +0 -20
  236. package/dist/i18n/locales/en/subagent.json +0 -69
  237. package/dist/i18n/locales/en/superpowers.json +0 -117
  238. package/dist/i18n/locales/en/team.json +0 -7
  239. package/dist/i18n/locales/en/thinking.json +0 -65
  240. package/dist/i18n/locales/en/tools.json +0 -42
  241. package/dist/i18n/locales/en/uninstall.json +0 -56
  242. package/dist/i18n/locales/en/updater.json +0 -29
  243. package/dist/i18n/locales/en/vim.json +0 -169
  244. package/dist/i18n/locales/en/workflow.json +0 -55
  245. package/dist/i18n/locales/en/workspace.json +0 -108
  246. package/dist/i18n/locales/zh-CN/agent-teams.json +0 -18
  247. package/dist/i18n/locales/zh-CN/agentBrowser.json +0 -80
  248. package/dist/i18n/locales/zh-CN/agents.json +0 -135
  249. package/dist/i18n/locales/zh-CN/api.json +0 -63
  250. package/dist/i18n/locales/zh-CN/ccjk-agents.json +0 -33
  251. package/dist/i18n/locales/zh-CN/ccjk-all.json +0 -23
  252. package/dist/i18n/locales/zh-CN/ccjk-skills.json +0 -22
  253. package/dist/i18n/locales/zh-CN/ccjk.json +0 -276
  254. package/dist/i18n/locales/zh-CN/ccr.json +0 -65
  255. package/dist/i18n/locales/zh-CN/claude-md.json +0 -73
  256. package/dist/i18n/locales/zh-CN/cli.json +0 -148
  257. package/dist/i18n/locales/zh-CN/cloud-setup.json +0 -31
  258. package/dist/i18n/locales/zh-CN/cloud-sync.json +0 -147
  259. package/dist/i18n/locales/zh-CN/cloud.json +0 -40
  260. package/dist/i18n/locales/zh-CN/cloudPlugins.json +0 -118
  261. package/dist/i18n/locales/zh-CN/codex.json +0 -184
  262. package/dist/i18n/locales/zh-CN/cometix.json +0 -29
  263. package/dist/i18n/locales/zh-CN/common.json +0 -68
  264. package/dist/i18n/locales/zh-CN/config.json +0 -108
  265. package/dist/i18n/locales/zh-CN/configuration.json +0 -234
  266. package/dist/i18n/locales/zh-CN/context.json +0 -85
  267. package/dist/i18n/locales/zh-CN/dashboard.json +0 -78
  268. package/dist/i18n/locales/zh-CN/errors.json +0 -26
  269. package/dist/i18n/locales/zh-CN/evolution.json +0 -54
  270. package/dist/i18n/locales/zh-CN/hooks.json +0 -74
  271. package/dist/i18n/locales/zh-CN/hooksSync.json +0 -133
  272. package/dist/i18n/locales/zh-CN/installation.json +0 -83
  273. package/dist/i18n/locales/zh-CN/interview.json +0 -104
  274. package/dist/i18n/locales/zh-CN/language.json +0 -19
  275. package/dist/i18n/locales/zh-CN/lsp.json +0 -78
  276. package/dist/i18n/locales/zh-CN/marketplace.json +0 -116
  277. package/dist/i18n/locales/zh-CN/mcp.json +0 -180
  278. package/dist/i18n/locales/zh-CN/memory.json +0 -23
  279. package/dist/i18n/locales/zh-CN/menu.json +0 -299
  280. package/dist/i18n/locales/zh-CN/multi-config.json +0 -79
  281. package/dist/i18n/locales/zh-CN/notification.json +0 -307
  282. package/dist/i18n/locales/zh-CN/permissions.json +0 -95
  283. package/dist/i18n/locales/zh-CN/persistence.json +0 -127
  284. package/dist/i18n/locales/zh-CN/plugins.json +0 -146
  285. package/dist/i18n/locales/zh-CN/quick-actions.json +0 -78
  286. package/dist/i18n/locales/zh-CN/registry.json +0 -54
  287. package/dist/i18n/locales/zh-CN/remote.json +0 -93
  288. package/dist/i18n/locales/zh-CN/sandbox.json +0 -44
  289. package/dist/i18n/locales/zh-CN/setup.json +0 -44
  290. package/dist/i18n/locales/zh-CN/shencha.json +0 -14
  291. package/dist/i18n/locales/zh-CN/skills.json +0 -100
  292. package/dist/i18n/locales/zh-CN/skillsSync.json +0 -74
  293. package/dist/i18n/locales/zh-CN/smartGuide.json +0 -49
  294. package/dist/i18n/locales/zh-CN/stats.json +0 -20
  295. package/dist/i18n/locales/zh-CN/subagent.json +0 -69
  296. package/dist/i18n/locales/zh-CN/superpowers.json +0 -117
  297. package/dist/i18n/locales/zh-CN/team.json +0 -7
  298. package/dist/i18n/locales/zh-CN/thinking.json +0 -65
  299. package/dist/i18n/locales/zh-CN/tools.json +0 -42
  300. package/dist/i18n/locales/zh-CN/uninstall.json +0 -56
  301. package/dist/i18n/locales/zh-CN/updater.json +0 -29
  302. package/dist/i18n/locales/zh-CN/vim.json +0 -169
  303. package/dist/i18n/locales/zh-CN/workflow.json +0 -55
  304. package/dist/i18n/locales/zh-CN/workspace.json +0 -108
  305. package/dist/index.d.mts +0 -5658
  306. package/dist/index.d.ts +0 -5658
  307. package/dist/index.mjs +0 -3732
  308. package/dist/shared/ccjk.5bEolFrk.mjs +0 -254
  309. package/dist/shared/ccjk.8oaxX4iR.mjs +0 -90
  310. package/dist/shared/ccjk.B2U7DsPy.mjs +0 -31
  311. package/dist/shared/ccjk.B2f-cwUP.mjs +0 -468
  312. package/dist/shared/ccjk.BAGoDD49.mjs +0 -36
  313. package/dist/shared/ccjk.BBtCGd_g.mjs +0 -899
  314. package/dist/shared/ccjk.BFQ7yr5S.mjs +0 -16
  315. package/dist/shared/ccjk.BLsIiTqO.mjs +0 -449
  316. package/dist/shared/ccjk.BXv8aYs1.mjs +0 -170
  317. package/dist/shared/ccjk.BnsY5WxD.mjs +0 -171
  318. package/dist/shared/ccjk.BoApaI4j.mjs +0 -28
  319. package/dist/shared/ccjk.Bq8TqZG_.mjs +0 -189
  320. package/dist/shared/ccjk.BtrioX1Z.mjs +0 -25
  321. package/dist/shared/ccjk.Bx_rmYfN.mjs +0 -69
  322. package/dist/shared/ccjk.BzPbSEP2.mjs +0 -115
  323. package/dist/shared/ccjk.C0WLUnFV.mjs +0 -293
  324. package/dist/shared/ccjk.C1hANZTu.mjs +0 -19
  325. package/dist/shared/ccjk.C2jHOZVP.mjs +0 -52
  326. package/dist/shared/ccjk.CNhnT6uQ.mjs +0 -636
  327. package/dist/shared/ccjk.COweQ1RR.mjs +0 -5
  328. package/dist/shared/ccjk.CfKKcvWy.mjs +0 -126
  329. package/dist/shared/ccjk.Cjgrln_h.mjs +0 -297
  330. package/dist/shared/ccjk.CoCHVXl3.mjs +0 -3951
  331. package/dist/shared/ccjk.CwGZSTAK.mjs +0 -319
  332. package/dist/shared/ccjk.CxpGa6MC.mjs +0 -2724
  333. package/dist/shared/ccjk.D-magaEx.mjs +0 -763
  334. package/dist/shared/ccjk.D0g2ABGg.mjs +0 -171
  335. package/dist/shared/ccjk.D6ycHbak.mjs +0 -270
  336. package/dist/shared/ccjk.D75wivnp.mjs +0 -142
  337. package/dist/shared/ccjk.DDL-4C-k.mjs +0 -100
  338. package/dist/shared/ccjk.DFRPtmK_.mjs +0 -75
  339. package/dist/shared/ccjk.DMV3x5Sd.mjs +0 -299
  340. package/dist/shared/ccjk.DZ2LLOa-.mjs +0 -2195
  341. package/dist/shared/ccjk.DbigonEQ.mjs +0 -698
  342. package/dist/shared/ccjk.DcMvE7lf.mjs +0 -618
  343. package/dist/shared/ccjk.DeWpAShp.mjs +0 -1828
  344. package/dist/shared/ccjk.DhJ1kyDR.mjs +0 -30
  345. package/dist/shared/ccjk.DlTXS9rP.mjs +0 -224
  346. package/dist/shared/ccjk.DopKzo3z.mjs +0 -305
  347. package/dist/shared/ccjk.DsZsc4LR.mjs +0 -1280
  348. package/dist/shared/ccjk.DuzJZlgj.mjs +0 -418
  349. package/dist/shared/ccjk.Dxgd2vjc.mjs +0 -444
  350. package/dist/shared/ccjk.J8YiPsOw.mjs +0 -259
  351. package/dist/shared/ccjk.KfSWcGlE.mjs +0 -38
  352. package/dist/shared/ccjk.L7yC58_i.mjs +0 -225
  353. package/dist/shared/ccjk.MwtjAULc.mjs +0 -1447
  354. package/dist/shared/ccjk.OJKHVSOb.mjs +0 -2005
  355. package/dist/shared/ccjk.OTnevPNE.mjs +0 -225
  356. package/dist/shared/ccjk.RyizuzOI.mjs +0 -21
  357. package/dist/shared/ccjk.T_cX87dY.mjs +0 -15
  358. package/dist/shared/ccjk.bQ7Dh1g4.mjs +0 -249
  359. package/dist/shared/ccjk.gDEDGD_t.mjs +0 -38
  360. package/dist/shared/ccjk.hoqrwWdN.mjs +0 -333
  361. package/dist/shared/ccjk.i_vn-9C3.mjs +0 -317
  362. package/dist/shared/ccjk.lG3ccFjm.mjs +0 -885
  363. package/dist/shared/ccjk.wLJHO0Af.mjs +0 -244
  364. package/dist/shared/ccjk.y-a_1vK4.mjs +0 -5127
  365. package/dist/templates/agents/README.md +0 -78
  366. package/dist/templates/agents/fullstack-developer.json +0 -70
  367. package/dist/templates/agents/go-expert.json +0 -69
  368. package/dist/templates/agents/index.json +0 -64
  369. package/dist/templates/agents/python-expert.json +0 -69
  370. package/dist/templates/agents/react-specialist.json +0 -69
  371. package/dist/templates/agents/testing-automation-expert.json +0 -70
  372. package/dist/templates/agents/typescript-architect.json +0 -69
  373. package/dist/templates/claude-code/common/settings.json +0 -109
  374. package/dist/templates/common/error-prevention.md +0 -267
  375. package/dist/templates/common/karpathy-baseline.md +0 -83
  376. package/dist/templates/common/output-styles/zh-CN/carmack-mode.md +0 -381
  377. package/dist/templates/common/output-styles/zh-CN/codex-rigor-mode.md +0 -114
  378. package/dist/templates/common/output-styles/zh-CN/dhh-mode.md +0 -265
  379. package/dist/templates/common/output-styles/zh-CN/evan-you-mode.md +0 -539
  380. package/dist/templates/common/output-styles/zh-CN/jobs-mode.md +0 -369
  381. package/dist/templates/common/output-styles/zh-CN/linus-mode.md +0 -135
  382. package/dist/templates/common/output-styles/zh-CN/uncle-bob-mode.md +0 -221
  383. package/dist/templates/common/workflow/continuousDelivery/en/continuous-delivery.md +0 -628
  384. package/dist/templates/common/workflow/continuousDelivery/zh-CN/continuous-delivery.md +0 -628
  385. package/dist/templates/common/workflow/essential/en/agents/ccjk-config-agent.md +0 -187
  386. package/dist/templates/common/workflow/essential/en/agents/ccjk-mcp-agent.md +0 -191
  387. package/dist/templates/common/workflow/essential/en/agents/ccjk-skill-agent.md +0 -249
  388. package/dist/templates/common/workflow/essential/en/agents/ccjk-workflow-agent.md +0 -277
  389. package/dist/templates/common/workflow/essential/en/agents/get-current-datetime.md +0 -29
  390. package/dist/templates/common/workflow/essential/en/agents/init-architect.md +0 -115
  391. package/dist/templates/common/workflow/essential/en/agents/ui-ux-designer.md +0 -91
  392. package/dist/templates/common/workflow/essential/en/feat.md +0 -92
  393. package/dist/templates/common/workflow/essential/en/goal.md +0 -147
  394. package/dist/templates/common/workflow/essential/en/init-project.md +0 -53
  395. package/dist/templates/common/workflow/essential/zh-CN/agents/get-current-datetime.md +0 -29
  396. package/dist/templates/common/workflow/essential/zh-CN/agents/init-architect.md +0 -115
  397. package/dist/templates/common/workflow/essential/zh-CN/agents/ui-ux-designer.md +0 -91
  398. package/dist/templates/common/workflow/essential/zh-CN/feat.md +0 -315
  399. package/dist/templates/common/workflow/essential/zh-CN/goal.md +0 -146
  400. package/dist/templates/common/workflow/essential/zh-CN/init-project.md +0 -53
  401. package/dist/templates/common/workflow/git/en/git-cleanBranches.md +0 -102
  402. package/dist/templates/common/workflow/git/en/git-commit.md +0 -205
  403. package/dist/templates/common/workflow/git/en/git-rollback.md +0 -90
  404. package/dist/templates/common/workflow/git/en/git-worktree.md +0 -276
  405. package/dist/templates/common/workflow/git/zh-CN/git-cleanBranches.md +0 -102
  406. package/dist/templates/common/workflow/git/zh-CN/git-commit.md +0 -205
  407. package/dist/templates/common/workflow/git/zh-CN/git-rollback.md +0 -90
  408. package/dist/templates/common/workflow/git/zh-CN/git-worktree.md +0 -276
  409. package/dist/templates/common/workflow/interview/en/interview.md +0 -67
  410. package/dist/templates/common/workflow/interview/zh-CN/interview.md +0 -67
  411. package/dist/templates/common/workflow/linearMethod/en/linear-method.md +0 -651
  412. package/dist/templates/common/workflow/linearMethod/zh-CN/linear-method.md +0 -752
  413. package/dist/templates/common/workflow/refactoringMaster/en/refactoring-master.md +0 -516
  414. package/dist/templates/common/workflow/refactoringMaster/zh-CN/refactoring-master.md +0 -812
  415. package/dist/templates/common/workflow/sixStep/en/workflow.md +0 -83
  416. package/dist/templates/common/workflow/sixStep/zh-CN/workflow.md +0 -359
  417. package/dist/templates/common/workflow/specFirstTDD/en/spec-first-tdd.md +0 -364
  418. package/dist/templates/common/workflow/specFirstTDD/zh-CN/spec-first-tdd.md +0 -366
  419. package/dist/templates/hooks/README.md +0 -212
  420. package/dist/templates/hooks/git-workflow-hooks.md +0 -551
  421. package/dist/templates/hooks/post-test/coverage.json +0 -21
  422. package/dist/templates/hooks/post-test/summary.json +0 -21
  423. package/dist/templates/hooks/post-test-coverage.md +0 -434
  424. package/dist/templates/hooks/pre-commit/eslint.json +0 -22
  425. package/dist/templates/hooks/pre-commit/prettier.json +0 -22
  426. package/dist/templates/hooks/pre-commit-black.md +0 -274
  427. package/dist/templates/hooks/pre-commit-eslint.md +0 -153
  428. package/dist/templates/hooks/pre-commit-gofmt.md +0 -284
  429. package/dist/templates/hooks/pre-commit-prettier.md +0 -212
  430. package/dist/templates/hooks/pre-commit-type-check.md +0 -377
  431. package/dist/templates/skills/ccjk-init.md +0 -154
  432. package/dist/templates/skills/ccjk-mcp-setup.md +0 -205
  433. package/dist/templates/skills/ccjk-troubleshoot.md +0 -228
  434. package/dist/templates/skills/django-patterns.md +0 -1016
  435. package/dist/templates/skills/git-workflow.md +0 -748
  436. package/dist/templates/skills/go-idioms.md +0 -963
  437. package/dist/templates/skills/index.json +0 -132
  438. package/dist/templates/skills/nextjs-optimization.md +0 -694
  439. package/dist/templates/skills/python-pep8.md +0 -852
  440. package/dist/templates/skills/react-patterns.md +0 -686
  441. package/dist/templates/skills/rust-patterns.md +0 -1057
  442. package/dist/templates/skills/security-best-practices.md +0 -1413
  443. package/dist/templates/skills/testing-best-practices.md +0 -1315
  444. package/dist/templates/skills/ts-best-practices.md +0 -354
  445. package/templates/agents/README.md +0 -78
  446. package/templates/agents/fullstack-developer.json +0 -70
  447. package/templates/agents/go-expert.json +0 -69
  448. package/templates/agents/index.json +0 -64
  449. package/templates/agents/python-expert.json +0 -69
  450. package/templates/agents/react-specialist.json +0 -69
  451. package/templates/agents/testing-automation-expert.json +0 -70
  452. package/templates/agents/typescript-architect.json +0 -69
  453. package/templates/claude-code/common/settings.json +0 -109
  454. package/templates/common/error-prevention.md +0 -267
  455. package/templates/common/karpathy-baseline.md +0 -83
  456. package/templates/common/output-styles/zh-CN/carmack-mode.md +0 -381
  457. package/templates/common/output-styles/zh-CN/codex-rigor-mode.md +0 -114
  458. package/templates/common/output-styles/zh-CN/dhh-mode.md +0 -265
  459. package/templates/common/output-styles/zh-CN/evan-you-mode.md +0 -539
  460. package/templates/common/output-styles/zh-CN/jobs-mode.md +0 -369
  461. package/templates/common/output-styles/zh-CN/linus-mode.md +0 -135
  462. package/templates/common/output-styles/zh-CN/uncle-bob-mode.md +0 -221
  463. package/templates/common/workflow/continuousDelivery/en/continuous-delivery.md +0 -628
  464. package/templates/common/workflow/continuousDelivery/zh-CN/continuous-delivery.md +0 -628
  465. package/templates/common/workflow/essential/en/agents/ccjk-config-agent.md +0 -187
  466. package/templates/common/workflow/essential/en/agents/ccjk-mcp-agent.md +0 -191
  467. package/templates/common/workflow/essential/en/agents/ccjk-skill-agent.md +0 -249
  468. package/templates/common/workflow/essential/en/agents/ccjk-workflow-agent.md +0 -277
  469. package/templates/common/workflow/essential/en/agents/get-current-datetime.md +0 -29
  470. package/templates/common/workflow/essential/en/agents/init-architect.md +0 -115
  471. package/templates/common/workflow/essential/en/agents/ui-ux-designer.md +0 -91
  472. package/templates/common/workflow/essential/en/feat.md +0 -92
  473. package/templates/common/workflow/essential/en/goal.md +0 -147
  474. package/templates/common/workflow/essential/en/init-project.md +0 -53
  475. package/templates/common/workflow/essential/zh-CN/agents/get-current-datetime.md +0 -29
  476. package/templates/common/workflow/essential/zh-CN/agents/init-architect.md +0 -115
  477. package/templates/common/workflow/essential/zh-CN/agents/ui-ux-designer.md +0 -91
  478. package/templates/common/workflow/essential/zh-CN/feat.md +0 -315
  479. package/templates/common/workflow/essential/zh-CN/goal.md +0 -146
  480. package/templates/common/workflow/essential/zh-CN/init-project.md +0 -53
  481. package/templates/common/workflow/git/en/git-cleanBranches.md +0 -102
  482. package/templates/common/workflow/git/en/git-commit.md +0 -205
  483. package/templates/common/workflow/git/en/git-rollback.md +0 -90
  484. package/templates/common/workflow/git/en/git-worktree.md +0 -276
  485. package/templates/common/workflow/git/zh-CN/git-cleanBranches.md +0 -102
  486. package/templates/common/workflow/git/zh-CN/git-commit.md +0 -205
  487. package/templates/common/workflow/git/zh-CN/git-rollback.md +0 -90
  488. package/templates/common/workflow/git/zh-CN/git-worktree.md +0 -276
  489. package/templates/common/workflow/interview/en/interview.md +0 -67
  490. package/templates/common/workflow/interview/zh-CN/interview.md +0 -67
  491. package/templates/common/workflow/linearMethod/en/linear-method.md +0 -651
  492. package/templates/common/workflow/linearMethod/zh-CN/linear-method.md +0 -752
  493. package/templates/common/workflow/refactoringMaster/en/refactoring-master.md +0 -516
  494. package/templates/common/workflow/refactoringMaster/zh-CN/refactoring-master.md +0 -812
  495. package/templates/common/workflow/sixStep/en/workflow.md +0 -83
  496. package/templates/common/workflow/sixStep/zh-CN/workflow.md +0 -359
  497. package/templates/common/workflow/specFirstTDD/en/spec-first-tdd.md +0 -364
  498. package/templates/common/workflow/specFirstTDD/zh-CN/spec-first-tdd.md +0 -366
  499. package/templates/hooks/README.md +0 -212
  500. package/templates/hooks/git-workflow-hooks.md +0 -551
  501. package/templates/hooks/post-test/coverage.json +0 -21
  502. package/templates/hooks/post-test/summary.json +0 -21
  503. package/templates/hooks/post-test-coverage.md +0 -434
  504. package/templates/hooks/pre-commit/eslint.json +0 -22
  505. package/templates/hooks/pre-commit/prettier.json +0 -22
  506. package/templates/hooks/pre-commit-black.md +0 -274
  507. package/templates/hooks/pre-commit-eslint.md +0 -153
  508. package/templates/hooks/pre-commit-gofmt.md +0 -284
  509. package/templates/hooks/pre-commit-prettier.md +0 -212
  510. package/templates/hooks/pre-commit-type-check.md +0 -377
  511. package/templates/skills/basic.hbs +0 -72
  512. package/templates/skills/ccjk-init.md +0 -154
  513. package/templates/skills/ccjk-mcp-setup.md +0 -205
  514. package/templates/skills/ccjk-troubleshoot.md +0 -228
  515. package/templates/skills/code-refactor.hbs +0 -133
  516. package/templates/skills/code-review.hbs +0 -141
  517. package/templates/skills/django-patterns.md +0 -1016
  518. package/templates/skills/git-workflow.md +0 -748
  519. package/templates/skills/go-idioms.md +0 -963
  520. package/templates/skills/index.json +0 -132
  521. package/templates/skills/nextjs-optimization.md +0 -694
  522. package/templates/skills/python-pep8.md +0 -852
  523. package/templates/skills/react-patterns.md +0 -686
  524. package/templates/skills/rust-patterns.md +0 -1057
  525. package/templates/skills/security-best-practices.md +0 -1413
  526. package/templates/skills/testing-best-practices.md +0 -1315
  527. package/templates/skills/ts-best-practices.md +0 -354
  528. package/templates/skills/type-fix.hbs +0 -132
@@ -1,2927 +0,0 @@
1
- import { existsSync } from 'node:fs';
2
- import { writeFile, mkdir, readFile } from 'node:fs/promises';
3
- import { resolve, dirname, join } from 'node:path';
4
- import process__default from 'node:process';
5
- import a from './index5.mjs';
6
- import { i as inquirer } from './index6.mjs';
7
- import { i18n } from './index2.mjs';
8
- import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.BtrioX1Z.mjs';
9
- import { randomUUID } from 'node:crypto';
10
- import '../shared/ccjk.BAGoDD49.mjs';
11
- import 'node:readline';
12
- import 'stream';
13
- import 'node:tty';
14
- import 'node:async_hooks';
15
- import '../shared/ccjk.Cjgrln_h.mjs';
16
- import 'node:util';
17
- import 'tty';
18
- import 'fs';
19
- import 'child_process';
20
- import 'node:os';
21
- import 'buffer';
22
- import 'string_decoder';
23
- import 'node:url';
24
- import '../shared/ccjk.bQ7Dh1g4.mjs';
25
-
26
- const projectFoundationQuestions = [
27
- {
28
- id: "app-purpose",
29
- category: "project-foundation",
30
- question: {
31
- "en": "What is the primary purpose of this application?",
32
- "zh-CN": "\u8FD9\u4E2A\u5E94\u7528\u7684\u4E3B\u8981\u76EE\u7684\u662F\u4EC0\u4E48\uFF1F"
33
- },
34
- header: {
35
- "en": "App Purpose",
36
- "zh-CN": "\u5E94\u7528\u76EE\u7684"
37
- },
38
- options: [
39
- {
40
- label: { "en": "SaaS/Web App", "zh-CN": "SaaS/Web\u5E94\u7528" },
41
- description: {
42
- "en": "Subscription-based software service with user accounts",
43
- "zh-CN": "\u57FA\u4E8E\u8BA2\u9605\u7684\u8F6F\u4EF6\u670D\u52A1\uFF0C\u5E26\u6709\u7528\u6237\u8D26\u6237\u7CFB\u7EDF"
44
- },
45
- value: "saas"
46
- },
47
- {
48
- label: { "en": "Marketing/Landing", "zh-CN": "\u8425\u9500/\u7740\u9646\u9875" },
49
- description: {
50
- "en": "Promotional website focused on conversion",
51
- "zh-CN": "\u4E13\u6CE8\u4E8E\u8F6C\u5316\u7684\u63A8\u5E7F\u7F51\u7AD9"
52
- },
53
- value: "marketing"
54
- },
55
- {
56
- label: { "en": "E-commerce", "zh-CN": "\u7535\u5546\u5E73\u53F0" },
57
- description: {
58
- "en": "Online store with products, cart, and checkout",
59
- "zh-CN": "\u5E26\u6709\u5546\u54C1\u3001\u8D2D\u7269\u8F66\u548C\u7ED3\u7B97\u7684\u5728\u7EBF\u5546\u5E97"
60
- },
61
- value: "ecommerce"
62
- },
63
- {
64
- label: { "en": "Dashboard/Admin", "zh-CN": "\u7BA1\u7406\u540E\u53F0" },
65
- description: {
66
- "en": "Internal tool for data management and operations",
67
- "zh-CN": "\u7528\u4E8E\u6570\u636E\u7BA1\u7406\u548C\u8FD0\u8425\u7684\u5185\u90E8\u5DE5\u5177"
68
- },
69
- value: "dashboard"
70
- }
71
- ],
72
- multiSelect: false,
73
- order: 1,
74
- required: true
75
- },
76
- {
77
- id: "target-platform",
78
- category: "project-foundation",
79
- question: {
80
- "en": "What is your target platform?",
81
- "zh-CN": "\u76EE\u6807\u5E73\u53F0\u662F\u4EC0\u4E48\uFF1F"
82
- },
83
- header: {
84
- "en": "Platform",
85
- "zh-CN": "\u5E73\u53F0"
86
- },
87
- options: [
88
- {
89
- label: { "en": "Web (Responsive)", "zh-CN": "Web\uFF08\u54CD\u5E94\u5F0F\uFF09" },
90
- description: {
91
- "en": "Browser-based, works on desktop and mobile",
92
- "zh-CN": "\u57FA\u4E8E\u6D4F\u89C8\u5668\uFF0C\u9002\u914D\u684C\u9762\u548C\u79FB\u52A8\u8BBE\u5907"
93
- },
94
- value: "web"
95
- },
96
- {
97
- label: { "en": "Mobile Native", "zh-CN": "\u539F\u751F\u79FB\u52A8\u5E94\u7528" },
98
- description: {
99
- "en": "iOS/Android native apps (React Native, Flutter)",
100
- "zh-CN": "iOS/Android\u539F\u751F\u5E94\u7528\uFF08React Native, Flutter\uFF09"
101
- },
102
- value: "mobile-native"
103
- },
104
- {
105
- label: { "en": "Mobile PWA", "zh-CN": "\u79FB\u52A8PWA" },
106
- description: {
107
- "en": "Progressive Web App with offline support",
108
- "zh-CN": "\u652F\u6301\u79BB\u7EBF\u7684\u6E10\u8FDB\u5F0FWeb\u5E94\u7528"
109
- },
110
- value: "pwa"
111
- },
112
- {
113
- label: { "en": "Desktop", "zh-CN": "\u684C\u9762\u5E94\u7528" },
114
- description: {
115
- "en": "Desktop application (Electron, Tauri)",
116
- "zh-CN": "\u684C\u9762\u5E94\u7528\u7A0B\u5E8F\uFF08Electron, Tauri\uFF09"
117
- },
118
- value: "desktop"
119
- }
120
- ],
121
- multiSelect: true,
122
- order: 2,
123
- required: true
124
- },
125
- {
126
- id: "project-stage",
127
- category: "project-foundation",
128
- question: {
129
- "en": "What stage is this project at?",
130
- "zh-CN": "\u9879\u76EE\u76EE\u524D\u5904\u4E8E\u4EC0\u4E48\u9636\u6BB5\uFF1F"
131
- },
132
- header: {
133
- "en": "Stage",
134
- "zh-CN": "\u9636\u6BB5"
135
- },
136
- options: [
137
- {
138
- label: { "en": "New Project", "zh-CN": "\u65B0\u9879\u76EE" },
139
- description: {
140
- "en": "Starting from scratch, no existing code",
141
- "zh-CN": "\u4ECE\u96F6\u5F00\u59CB\uFF0C\u6CA1\u6709\u73B0\u6709\u4EE3\u7801"
142
- },
143
- value: "new"
144
- },
145
- {
146
- label: { "en": "MVP/Prototype", "zh-CN": "MVP/\u539F\u578B" },
147
- description: {
148
- "en": "Building minimum viable product for validation",
149
- "zh-CN": "\u6784\u5EFA\u7528\u4E8E\u9A8C\u8BC1\u7684\u6700\u5C0F\u53EF\u884C\u4EA7\u54C1"
150
- },
151
- value: "mvp"
152
- },
153
- {
154
- label: { "en": "Existing Codebase", "zh-CN": "\u73B0\u6709\u4EE3\u7801\u5E93" },
155
- description: {
156
- "en": "Adding features to existing application",
157
- "zh-CN": "\u5728\u73B0\u6709\u5E94\u7528\u4E0A\u6DFB\u52A0\u529F\u80FD"
158
- },
159
- value: "existing"
160
- },
161
- {
162
- label: { "en": "Refactoring", "zh-CN": "\u91CD\u6784" },
163
- description: {
164
- "en": "Improving/restructuring existing code",
165
- "zh-CN": "\u6539\u8FDB/\u91CD\u6784\u73B0\u6709\u4EE3\u7801"
166
- },
167
- value: "refactoring"
168
- }
169
- ],
170
- multiSelect: false,
171
- order: 3,
172
- required: true
173
- }
174
- ];
175
- const targetAudienceQuestions = [
176
- {
177
- id: "customer-segment",
178
- category: "target-audience",
179
- question: {
180
- "en": "What's your target customer segment?",
181
- "zh-CN": "\u76EE\u6807\u5BA2\u6237\u7FA4\u662F\u4EC0\u4E48\uFF1F"
182
- },
183
- header: {
184
- "en": "Customers",
185
- "zh-CN": "\u5BA2\u6237"
186
- },
187
- options: [
188
- {
189
- label: { "en": "SMB", "zh-CN": "\u4E2D\u5C0F\u4F01\u4E1A" },
190
- description: {
191
- "en": "Small/Medium Business, 10-500 employees, $50-500/mo typical",
192
- "zh-CN": "\u4E2D\u5C0F\u578B\u4F01\u4E1A\uFF0C10-500\u5458\u5DE5\uFF0C\u6708\u4ED8$50-500"
193
- },
194
- value: "smb"
195
- },
196
- {
197
- label: { "en": "Enterprise", "zh-CN": "\u4F01\u4E1A\u7EA7" },
198
- description: {
199
- "en": "Large corporations, $1000+/mo, longer sales cycles",
200
- "zh-CN": "\u5927\u578B\u4F01\u4E1A\uFF0C\u6708\u4ED8$1000+\uFF0C\u9500\u552E\u5468\u671F\u66F4\u957F"
201
- },
202
- value: "enterprise"
203
- },
204
- {
205
- label: { "en": "Individual/Prosumer", "zh-CN": "\u4E2A\u4EBA/\u4E13\u4E1A\u7528\u6237" },
206
- description: {
207
- "en": "Solo professionals, $10-50/mo pricing",
208
- "zh-CN": "\u72EC\u7ACB\u4E13\u4E1A\u4EBA\u58EB\uFF0C\u6708\u4ED8$10-50"
209
- },
210
- value: "individual"
211
- },
212
- {
213
- label: { "en": "Developers/Technical", "zh-CN": "\u5F00\u53D1\u8005/\u6280\u672F\u4EBA\u5458" },
214
- description: {
215
- "en": "Software engineers, API-first products",
216
- "zh-CN": "\u8F6F\u4EF6\u5DE5\u7A0B\u5E08\uFF0CAPI\u4F18\u5148\u4EA7\u54C1"
217
- },
218
- value: "developers"
219
- }
220
- ],
221
- multiSelect: true,
222
- order: 1,
223
- required: true
224
- },
225
- {
226
- id: "geographic-focus",
227
- category: "target-audience",
228
- question: {
229
- "en": "What is your geographic focus?",
230
- "zh-CN": "\u5730\u7406\u91CD\u70B9\u662F\u4EC0\u4E48\uFF1F"
231
- },
232
- header: {
233
- "en": "Region",
234
- "zh-CN": "\u5730\u533A"
235
- },
236
- options: [
237
- {
238
- label: { "en": "Global", "zh-CN": "\u5168\u7403" },
239
- description: {
240
- "en": "Worldwide audience, multi-language support needed",
241
- "zh-CN": "\u5168\u7403\u53D7\u4F17\uFF0C\u9700\u8981\u591A\u8BED\u8A00\u652F\u6301"
242
- },
243
- value: "global"
244
- },
245
- {
246
- label: { "en": "US/EU", "zh-CN": "\u7F8E\u56FD/\u6B27\u76DF" },
247
- description: {
248
- "en": "Western markets, GDPR compliance required",
249
- "zh-CN": "\u897F\u65B9\u5E02\u573A\uFF0C\u9700\u8981GDPR\u5408\u89C4"
250
- },
251
- value: "us-eu"
252
- },
253
- {
254
- label: { "en": "Asia", "zh-CN": "\u4E9A\u6D32" },
255
- description: {
256
- "en": "Asian markets, local payment methods",
257
- "zh-CN": "\u4E9A\u6D32\u5E02\u573A\uFF0C\u672C\u5730\u652F\u4ED8\u65B9\u5F0F"
258
- },
259
- value: "asia"
260
- },
261
- {
262
- label: { "en": "Specific Country", "zh-CN": "\u7279\u5B9A\u56FD\u5BB6" },
263
- description: {
264
- "en": "Single country focus with local regulations",
265
- "zh-CN": "\u5355\u4E00\u56FD\u5BB6\uFF0C\u9075\u5FAA\u5F53\u5730\u6CD5\u89C4"
266
- },
267
- value: "specific"
268
- }
269
- ],
270
- multiSelect: false,
271
- order: 2,
272
- required: true
273
- },
274
- {
275
- id: "user-volume",
276
- category: "target-audience",
277
- question: {
278
- "en": "What user volume do you expect at launch?",
279
- "zh-CN": "\u53D1\u5E03\u65F6\u9884\u671F\u7684\u7528\u6237\u91CF\u662F\u591A\u5C11\uFF1F"
280
- },
281
- header: {
282
- "en": "Users",
283
- "zh-CN": "\u7528\u6237\u91CF"
284
- },
285
- options: [
286
- {
287
- label: { "en": "Small (< 100)", "zh-CN": "\u5C0F\u89C4\u6A21 (< 100)" },
288
- description: {
289
- "en": "Initial beta users, simple infrastructure",
290
- "zh-CN": "\u521D\u59CB\u6D4B\u8BD5\u7528\u6237\uFF0C\u7B80\u5355\u57FA\u7840\u8BBE\u65BD"
291
- },
292
- value: "small"
293
- },
294
- {
295
- label: { "en": "Medium (100-10K)", "zh-CN": "\u4E2D\u7B49\u89C4\u6A21 (100-10K)" },
296
- description: {
297
- "en": "Growing user base, need some scalability",
298
- "zh-CN": "\u589E\u957F\u4E2D\u7684\u7528\u6237\u7FA4\uFF0C\u9700\u8981\u4E00\u5B9A\u53EF\u6269\u5C55\u6027"
299
- },
300
- value: "medium"
301
- },
302
- {
303
- label: { "en": "Large (10K-100K)", "zh-CN": "\u5927\u89C4\u6A21 (10K-100K)" },
304
- description: {
305
- "en": "Significant traffic, serious infrastructure needed",
306
- "zh-CN": "\u5927\u91CF\u6D41\u91CF\uFF0C\u9700\u8981\u8BA4\u771F\u7684\u57FA\u7840\u8BBE\u65BD"
307
- },
308
- value: "large"
309
- },
310
- {
311
- label: { "en": "Massive (100K+)", "zh-CN": "\u8D85\u5927\u89C4\u6A21 (100K+)" },
312
- description: {
313
- "en": "High-scale system, distributed architecture",
314
- "zh-CN": "\u9AD8\u89C4\u6A21\u7CFB\u7EDF\uFF0C\u5206\u5E03\u5F0F\u67B6\u6784"
315
- },
316
- value: "massive"
317
- }
318
- ],
319
- multiSelect: false,
320
- order: 3,
321
- required: true
322
- }
323
- ];
324
- const technicalImplementationQuestions = [
325
- {
326
- id: "auth-strategy",
327
- category: "technical-implementation",
328
- question: {
329
- "en": "What authentication strategy do you prefer?",
330
- "zh-CN": "\u4F60\u504F\u597D\u4EC0\u4E48\u8BA4\u8BC1\u7B56\u7565\uFF1F"
331
- },
332
- header: {
333
- "en": "Auth",
334
- "zh-CN": "\u8BA4\u8BC1"
335
- },
336
- options: [
337
- {
338
- label: { "en": "JWT Tokens", "zh-CN": "JWT\u4EE4\u724C" },
339
- description: {
340
- "en": "Stateless, good for APIs, client-side storage",
341
- "zh-CN": "\u65E0\u72B6\u6001\uFF0C\u9002\u5408API\uFF0C\u5BA2\u6237\u7AEF\u5B58\u50A8"
342
- },
343
- value: "jwt",
344
- recommended: true
345
- },
346
- {
347
- label: { "en": "OAuth 2.0", "zh-CN": "OAuth 2.0" },
348
- description: {
349
- "en": "Social login, third-party auth providers",
350
- "zh-CN": "\u793E\u4EA4\u767B\u5F55\uFF0C\u7B2C\u4E09\u65B9\u8BA4\u8BC1\u63D0\u4F9B\u5546"
351
- },
352
- value: "oauth"
353
- },
354
- {
355
- label: { "en": "Session-based", "zh-CN": "\u57FA\u4E8E\u4F1A\u8BDD" },
356
- description: {
357
- "en": "Server-side sessions, traditional approach",
358
- "zh-CN": "\u670D\u52A1\u7AEF\u4F1A\u8BDD\uFF0C\u4F20\u7EDF\u65B9\u5F0F"
359
- },
360
- value: "session"
361
- },
362
- {
363
- label: { "en": "Magic Links", "zh-CN": "\u9B54\u6CD5\u94FE\u63A5" },
364
- description: {
365
- "en": "Passwordless email authentication",
366
- "zh-CN": "\u65E0\u5BC6\u7801\u90AE\u4EF6\u8BA4\u8BC1"
367
- },
368
- value: "magic-link"
369
- }
370
- ],
371
- multiSelect: false,
372
- order: 1,
373
- required: true
374
- },
375
- {
376
- id: "primary-database",
377
- category: "technical-implementation",
378
- question: {
379
- "en": "What is your primary database choice?",
380
- "zh-CN": "\u4E3B\u6570\u636E\u5E93\u9009\u62E9\u662F\u4EC0\u4E48\uFF1F"
381
- },
382
- header: {
383
- "en": "Database",
384
- "zh-CN": "\u6570\u636E\u5E93"
385
- },
386
- options: [
387
- {
388
- label: { "en": "PostgreSQL", "zh-CN": "PostgreSQL" },
389
- description: {
390
- "en": "Powerful relational DB, great for complex queries",
391
- "zh-CN": "\u5F3A\u5927\u7684\u5173\u7CFB\u578B\u6570\u636E\u5E93\uFF0C\u9002\u5408\u590D\u6742\u67E5\u8BE2"
392
- },
393
- value: "postgresql",
394
- recommended: true
395
- },
396
- {
397
- label: { "en": "MySQL", "zh-CN": "MySQL" },
398
- description: {
399
- "en": "Popular relational DB, widely supported",
400
- "zh-CN": "\u6D41\u884C\u7684\u5173\u7CFB\u578B\u6570\u636E\u5E93\uFF0C\u5E7F\u6CDB\u652F\u6301"
401
- },
402
- value: "mysql"
403
- },
404
- {
405
- label: { "en": "MongoDB", "zh-CN": "MongoDB" },
406
- description: {
407
- "en": "Document DB, flexible schema, good for rapid dev",
408
- "zh-CN": "\u6587\u6863\u6570\u636E\u5E93\uFF0C\u7075\u6D3B\u6A21\u5F0F\uFF0C\u9002\u5408\u5FEB\u901F\u5F00\u53D1"
409
- },
410
- value: "mongodb"
411
- },
412
- {
413
- label: { "en": "SQLite", "zh-CN": "SQLite" },
414
- description: {
415
- "en": "Embedded DB, great for small apps/prototypes",
416
- "zh-CN": "\u5D4C\u5165\u5F0F\u6570\u636E\u5E93\uFF0C\u9002\u5408\u5C0F\u5E94\u7528/\u539F\u578B"
417
- },
418
- value: "sqlite"
419
- }
420
- ],
421
- multiSelect: false,
422
- order: 2,
423
- required: true
424
- },
425
- {
426
- id: "state-management",
427
- category: "technical-implementation",
428
- question: {
429
- "en": "What state management approach do you prefer?",
430
- "zh-CN": "\u4F60\u504F\u597D\u4EC0\u4E48\u72B6\u6001\u7BA1\u7406\u65B9\u5F0F\uFF1F"
431
- },
432
- header: {
433
- "en": "State",
434
- "zh-CN": "\u72B6\u6001"
435
- },
436
- options: [
437
- {
438
- label: { "en": "Server State (React Query/SWR)", "zh-CN": "\u670D\u52A1\u7AEF\u72B6\u6001 (React Query/SWR)" },
439
- description: {
440
- "en": "Cache server data, automatic refetching",
441
- "zh-CN": "\u7F13\u5B58\u670D\u52A1\u7AEF\u6570\u636E\uFF0C\u81EA\u52A8\u91CD\u65B0\u83B7\u53D6"
442
- },
443
- value: "server-state",
444
- recommended: true
445
- },
446
- {
447
- label: { "en": "Global Store (Redux/Zustand)", "zh-CN": "\u5168\u5C40\u5B58\u50A8 (Redux/Zustand)" },
448
- description: {
449
- "en": "Centralized state, time-travel debugging",
450
- "zh-CN": "\u96C6\u4E2D\u5F0F\u72B6\u6001\uFF0C\u65F6\u95F4\u65C5\u884C\u8C03\u8BD5"
451
- },
452
- value: "global-store"
453
- },
454
- {
455
- label: { "en": "URL State", "zh-CN": "URL\u72B6\u6001" },
456
- description: {
457
- "en": "State in URL params, shareable links",
458
- "zh-CN": "URL\u53C2\u6570\u4E2D\u7684\u72B6\u6001\uFF0C\u53EF\u5206\u4EAB\u94FE\u63A5"
459
- },
460
- value: "url-state"
461
- },
462
- {
463
- label: { "en": "Local State Only", "zh-CN": "\u4EC5\u672C\u5730\u72B6\u6001" },
464
- description: {
465
- "en": "Component-level state, simple apps",
466
- "zh-CN": "\u7EC4\u4EF6\u7EA7\u72B6\u6001\uFF0C\u7B80\u5355\u5E94\u7528"
467
- },
468
- value: "local-state"
469
- }
470
- ],
471
- multiSelect: false,
472
- order: 3,
473
- required: true
474
- },
475
- {
476
- id: "api-design",
477
- category: "technical-implementation",
478
- question: {
479
- "en": "What API design approach do you prefer?",
480
- "zh-CN": "\u4F60\u504F\u597D\u4EC0\u4E48API\u8BBE\u8BA1\u65B9\u5F0F\uFF1F"
481
- },
482
- header: {
483
- "en": "API",
484
- "zh-CN": "API"
485
- },
486
- options: [
487
- {
488
- label: { "en": "REST API", "zh-CN": "REST API" },
489
- description: {
490
- "en": "Traditional HTTP endpoints, widely understood",
491
- "zh-CN": "\u4F20\u7EDFHTTP\u7AEF\u70B9\uFF0C\u5E7F\u6CDB\u7406\u89E3"
492
- },
493
- value: "rest",
494
- recommended: true
495
- },
496
- {
497
- label: { "en": "GraphQL", "zh-CN": "GraphQL" },
498
- description: {
499
- "en": "Flexible queries, single endpoint, typed schema",
500
- "zh-CN": "\u7075\u6D3B\u67E5\u8BE2\uFF0C\u5355\u4E00\u7AEF\u70B9\uFF0C\u7C7B\u578B\u5316\u6A21\u5F0F"
501
- },
502
- value: "graphql"
503
- },
504
- {
505
- label: { "en": "tRPC", "zh-CN": "tRPC" },
506
- description: {
507
- "en": "End-to-end type safety, great for monorepos",
508
- "zh-CN": "\u7AEF\u5230\u7AEF\u7C7B\u578B\u5B89\u5168\uFF0C\u9002\u5408\u5355\u4ED3\u5E93"
509
- },
510
- value: "trpc"
511
- },
512
- {
513
- label: { "en": "Server Actions", "zh-CN": "Server Actions" },
514
- description: {
515
- "en": "Next.js server actions, minimal API surface",
516
- "zh-CN": "Next.js\u670D\u52A1\u7AEF\u52A8\u4F5C\uFF0C\u6700\u5C0FAPI\u8868\u9762"
517
- },
518
- value: "server-actions"
519
- }
520
- ],
521
- multiSelect: false,
522
- order: 4,
523
- required: true
524
- }
525
- ];
526
- const featuresScopeQuestions = [
527
- {
528
- id: "mvp-features",
529
- category: "features-scope",
530
- question: {
531
- "en": "Which features are must-have for MVP?",
532
- "zh-CN": "MVP\u5FC5\u987B\u6709\u54EA\u4E9B\u529F\u80FD\uFF1F"
533
- },
534
- header: {
535
- "en": "MVP",
536
- "zh-CN": "MVP"
537
- },
538
- options: [
539
- {
540
- label: { "en": "User Registration/Login", "zh-CN": "\u7528\u6237\u6CE8\u518C/\u767B\u5F55" },
541
- description: {
542
- "en": "Basic auth flow with email verification",
543
- "zh-CN": "\u57FA\u672C\u8BA4\u8BC1\u6D41\u7A0B\uFF0C\u5E26\u90AE\u4EF6\u9A8C\u8BC1"
544
- },
545
- value: "user-auth"
546
- },
547
- {
548
- label: { "en": "Payments/Billing", "zh-CN": "\u652F\u4ED8/\u8D26\u5355" },
549
- description: {
550
- "en": "Stripe/payment integration, subscriptions",
551
- "zh-CN": "Stripe/\u652F\u4ED8\u96C6\u6210\uFF0C\u8BA2\u9605\u529F\u80FD"
552
- },
553
- value: "payments"
554
- },
555
- {
556
- label: { "en": "Admin Dashboard", "zh-CN": "\u7BA1\u7406\u540E\u53F0" },
557
- description: {
558
- "en": "Internal admin panel for management",
559
- "zh-CN": "\u5185\u90E8\u7BA1\u7406\u9762\u677F"
560
- },
561
- value: "admin"
562
- },
563
- {
564
- label: { "en": "Real-time Updates", "zh-CN": "\u5B9E\u65F6\u66F4\u65B0" },
565
- description: {
566
- "en": "WebSocket/SSE for live data",
567
- "zh-CN": "WebSocket/SSE\u5B9E\u65F6\u6570\u636E"
568
- },
569
- value: "realtime"
570
- }
571
- ],
572
- multiSelect: true,
573
- order: 1,
574
- required: true
575
- },
576
- {
577
- id: "third-party-integrations",
578
- category: "features-scope",
579
- question: {
580
- "en": "Which third-party integrations are needed?",
581
- "zh-CN": "\u9700\u8981\u54EA\u4E9B\u7B2C\u4E09\u65B9\u96C6\u6210\uFF1F"
582
- },
583
- header: {
584
- "en": "Integrations",
585
- "zh-CN": "\u96C6\u6210"
586
- },
587
- options: [
588
- {
589
- label: { "en": "Payment (Stripe)", "zh-CN": "\u652F\u4ED8 (Stripe)" },
590
- description: {
591
- "en": "Payment processing and subscriptions",
592
- "zh-CN": "\u652F\u4ED8\u5904\u7406\u548C\u8BA2\u9605"
593
- },
594
- value: "stripe"
595
- },
596
- {
597
- label: { "en": "Email (SendGrid/Resend)", "zh-CN": "\u90AE\u4EF6 (SendGrid/Resend)" },
598
- description: {
599
- "en": "Transactional and marketing emails",
600
- "zh-CN": "\u4E8B\u52A1\u6027\u548C\u8425\u9500\u90AE\u4EF6"
601
- },
602
- value: "email"
603
- },
604
- {
605
- label: { "en": "Analytics (Mixpanel/Amplitude)", "zh-CN": "\u5206\u6790 (Mixpanel/Amplitude)" },
606
- description: {
607
- "en": "User behavior tracking and analytics",
608
- "zh-CN": "\u7528\u6237\u884C\u4E3A\u8DDF\u8E2A\u548C\u5206\u6790"
609
- },
610
- value: "analytics"
611
- },
612
- {
613
- label: { "en": "Storage (S3/Cloudflare)", "zh-CN": "\u5B58\u50A8 (S3/Cloudflare)" },
614
- description: {
615
- "en": "File uploads and media storage",
616
- "zh-CN": "\u6587\u4EF6\u4E0A\u4F20\u548C\u5A92\u4F53\u5B58\u50A8"
617
- },
618
- value: "storage"
619
- }
620
- ],
621
- multiSelect: true,
622
- order: 2,
623
- required: false
624
- },
625
- {
626
- id: "data-import-export",
627
- category: "features-scope",
628
- question: {
629
- "en": "Do you need data import/export functionality?",
630
- "zh-CN": "\u662F\u5426\u9700\u8981\u6570\u636E\u5BFC\u5165/\u5BFC\u51FA\u529F\u80FD\uFF1F"
631
- },
632
- header: {
633
- "en": "Data",
634
- "zh-CN": "\u6570\u636E"
635
- },
636
- options: [
637
- {
638
- label: { "en": "CSV Import/Export", "zh-CN": "CSV\u5BFC\u5165/\u5BFC\u51FA" },
639
- description: {
640
- "en": "Spreadsheet-compatible data exchange",
641
- "zh-CN": "\u4E0E\u7535\u5B50\u8868\u683C\u517C\u5BB9\u7684\u6570\u636E\u4EA4\u6362"
642
- },
643
- value: "csv"
644
- },
645
- {
646
- label: { "en": "API Access", "zh-CN": "API\u8BBF\u95EE" },
647
- description: {
648
- "en": "Programmatic data access for developers",
649
- "zh-CN": "\u5F00\u53D1\u8005\u7A0B\u5E8F\u5316\u6570\u636E\u8BBF\u95EE"
650
- },
651
- value: "api"
652
- },
653
- {
654
- label: { "en": "PDF Reports", "zh-CN": "PDF\u62A5\u544A" },
655
- description: {
656
- "en": "Generate downloadable PDF reports",
657
- "zh-CN": "\u751F\u6210\u53EF\u4E0B\u8F7D\u7684PDF\u62A5\u544A"
658
- },
659
- value: "pdf"
660
- },
661
- {
662
- label: { "en": "Not Needed", "zh-CN": "\u4E0D\u9700\u8981" },
663
- description: {
664
- "en": "No data import/export required",
665
- "zh-CN": "\u4E0D\u9700\u8981\u6570\u636E\u5BFC\u5165/\u5BFC\u51FA"
666
- },
667
- value: "none"
668
- }
669
- ],
670
- multiSelect: true,
671
- order: 3,
672
- required: false
673
- }
674
- ];
675
- const uiUxQuestions = [
676
- {
677
- id: "design-system",
678
- category: "ui-ux",
679
- question: {
680
- "en": "What design system/UI framework do you prefer?",
681
- "zh-CN": "\u4F60\u504F\u597D\u4EC0\u4E48\u8BBE\u8BA1\u7CFB\u7EDF/UI\u6846\u67B6\uFF1F"
682
- },
683
- header: {
684
- "en": "UI System",
685
- "zh-CN": "UI\u7CFB\u7EDF"
686
- },
687
- options: [
688
- {
689
- label: { "en": "Tailwind + shadcn/ui", "zh-CN": "Tailwind + shadcn/ui" },
690
- description: {
691
- "en": "Utility-first with accessible components",
692
- "zh-CN": "\u5B9E\u7528\u4F18\u5148\uFF0C\u5E26\u53EF\u8BBF\u95EE\u6027\u7EC4\u4EF6"
693
- },
694
- value: "tailwind-shadcn",
695
- recommended: true
696
- },
697
- {
698
- label: { "en": "Material UI", "zh-CN": "Material UI" },
699
- description: {
700
- "en": "Google Material Design components",
701
- "zh-CN": "Google Material Design\u7EC4\u4EF6"
702
- },
703
- value: "material-ui"
704
- },
705
- {
706
- label: { "en": "Ant Design", "zh-CN": "Ant Design" },
707
- description: {
708
- "en": "Enterprise-grade React components",
709
- "zh-CN": "\u4F01\u4E1A\u7EA7React\u7EC4\u4EF6"
710
- },
711
- value: "antd"
712
- },
713
- {
714
- label: { "en": "Custom Design", "zh-CN": "\u81EA\u5B9A\u4E49\u8BBE\u8BA1" },
715
- description: {
716
- "en": "Build from scratch with custom styles",
717
- "zh-CN": "\u4ECE\u5934\u6784\u5EFA\u81EA\u5B9A\u4E49\u6837\u5F0F"
718
- },
719
- value: "custom"
720
- }
721
- ],
722
- multiSelect: false,
723
- order: 1,
724
- required: true
725
- },
726
- {
727
- id: "accessibility-level",
728
- category: "ui-ux",
729
- question: {
730
- "en": "What level of accessibility (a11y) is required?",
731
- "zh-CN": "\u9700\u8981\u4EC0\u4E48\u7EA7\u522B\u7684\u65E0\u969C\u788D\u8BBF\u95EE\uFF1F"
732
- },
733
- header: {
734
- "en": "A11y",
735
- "zh-CN": "\u65E0\u969C\u788D"
736
- },
737
- options: [
738
- {
739
- label: { "en": "WCAG AA", "zh-CN": "WCAG AA" },
740
- description: {
741
- "en": "Standard compliance, recommended baseline",
742
- "zh-CN": "\u6807\u51C6\u5408\u89C4\uFF0C\u63A8\u8350\u57FA\u7EBF"
743
- },
744
- value: "wcag-aa",
745
- recommended: true
746
- },
747
- {
748
- label: { "en": "WCAG AAA", "zh-CN": "WCAG AAA" },
749
- description: {
750
- "en": "Highest compliance, government/enterprise",
751
- "zh-CN": "\u6700\u9AD8\u5408\u89C4\uFF0C\u653F\u5E9C/\u4F01\u4E1A\u8981\u6C42"
752
- },
753
- value: "wcag-aaa"
754
- },
755
- {
756
- label: { "en": "Basic", "zh-CN": "\u57FA\u7840" },
757
- description: {
758
- "en": "Keyboard navigation, screen reader basics",
759
- "zh-CN": "\u952E\u76D8\u5BFC\u822A\uFF0C\u5C4F\u5E55\u9605\u8BFB\u5668\u57FA\u7840"
760
- },
761
- value: "basic"
762
- },
763
- {
764
- label: { "en": "Not Priority", "zh-CN": "\u975E\u4F18\u5148" },
765
- description: {
766
- "en": "Minimal a11y, will improve later",
767
- "zh-CN": "\u6700\u5C11\u65E0\u969C\u788D\uFF0C\u540E\u7EED\u6539\u8FDB"
768
- },
769
- value: "minimal"
770
- }
771
- ],
772
- multiSelect: false,
773
- order: 2,
774
- required: true
775
- },
776
- {
777
- id: "dark-mode",
778
- category: "ui-ux",
779
- question: {
780
- "en": "Do you need dark mode support?",
781
- "zh-CN": "\u662F\u5426\u9700\u8981\u6DF1\u8272\u6A21\u5F0F\u652F\u6301\uFF1F"
782
- },
783
- header: {
784
- "en": "Theme",
785
- "zh-CN": "\u4E3B\u9898"
786
- },
787
- options: [
788
- {
789
- label: { "en": "Light + Dark", "zh-CN": "\u6D45\u8272 + \u6DF1\u8272" },
790
- description: {
791
- "en": "Both themes with system preference detection",
792
- "zh-CN": "\u4E24\u79CD\u4E3B\u9898\uFF0C\u7CFB\u7EDF\u504F\u597D\u68C0\u6D4B"
793
- },
794
- value: "both",
795
- recommended: true
796
- },
797
- {
798
- label: { "en": "Light Only", "zh-CN": "\u4EC5\u6D45\u8272" },
799
- description: {
800
- "en": "Single light theme, simpler to maintain",
801
- "zh-CN": "\u5355\u4E00\u6D45\u8272\u4E3B\u9898\uFF0C\u6613\u4E8E\u7EF4\u62A4"
802
- },
803
- value: "light"
804
- },
805
- {
806
- label: { "en": "Dark Only", "zh-CN": "\u4EC5\u6DF1\u8272" },
807
- description: {
808
- "en": "Single dark theme, developer/gaming focus",
809
- "zh-CN": "\u5355\u4E00\u6DF1\u8272\u4E3B\u9898\uFF0C\u5F00\u53D1\u8005/\u6E38\u620F\u98CE\u683C"
810
- },
811
- value: "dark"
812
- },
813
- {
814
- label: { "en": "User Customizable", "zh-CN": "\u7528\u6237\u53EF\u5B9A\u5236" },
815
- description: {
816
- "en": "Multiple themes, user can choose colors",
817
- "zh-CN": "\u591A\u4E3B\u9898\uFF0C\u7528\u6237\u53EF\u9009\u62E9\u989C\u8272"
818
- },
819
- value: "custom"
820
- }
821
- ],
822
- multiSelect: false,
823
- order: 3,
824
- required: false
825
- }
826
- ];
827
- const concernsQuestions = [
828
- {
829
- id: "performance-priority",
830
- category: "concerns",
831
- question: {
832
- "en": "What is your primary performance concern?",
833
- "zh-CN": "\u4E3B\u8981\u7684\u6027\u80FD\u5173\u6CE8\u70B9\u662F\u4EC0\u4E48\uFF1F"
834
- },
835
- header: {
836
- "en": "Performance",
837
- "zh-CN": "\u6027\u80FD"
838
- },
839
- options: [
840
- {
841
- label: { "en": "Page Load Speed", "zh-CN": "\u9875\u9762\u52A0\u8F7D\u901F\u5EA6" },
842
- description: {
843
- "en": "Core Web Vitals, LCP, FCP optimization",
844
- "zh-CN": "Core Web Vitals, LCP, FCP\u4F18\u5316"
845
- },
846
- value: "page-load"
847
- },
848
- {
849
- label: { "en": "API Response Time", "zh-CN": "API\u54CD\u5E94\u65F6\u95F4" },
850
- description: {
851
- "en": "Backend latency, database optimization",
852
- "zh-CN": "\u540E\u7AEF\u5EF6\u8FDF\uFF0C\u6570\u636E\u5E93\u4F18\u5316"
853
- },
854
- value: "api-response"
855
- },
856
- {
857
- label: { "en": "Real-time Latency", "zh-CN": "\u5B9E\u65F6\u5EF6\u8FDF" },
858
- description: {
859
- "en": "WebSocket performance, live updates",
860
- "zh-CN": "WebSocket\u6027\u80FD\uFF0C\u5B9E\u65F6\u66F4\u65B0"
861
- },
862
- value: "realtime-latency"
863
- },
864
- {
865
- label: { "en": "Bundle Size", "zh-CN": "\u5305\u4F53\u79EF" },
866
- description: {
867
- "en": "JavaScript size, code splitting",
868
- "zh-CN": "JavaScript\u5927\u5C0F\uFF0C\u4EE3\u7801\u5206\u5272"
869
- },
870
- value: "bundle-size"
871
- }
872
- ],
873
- multiSelect: true,
874
- order: 1,
875
- required: true
876
- },
877
- {
878
- id: "security-requirements",
879
- category: "concerns",
880
- question: {
881
- "en": "What security requirements apply?",
882
- "zh-CN": "\u9002\u7528\u4EC0\u4E48\u5B89\u5168\u8981\u6C42\uFF1F"
883
- },
884
- header: {
885
- "en": "Security",
886
- "zh-CN": "\u5B89\u5168"
887
- },
888
- options: [
889
- {
890
- label: { "en": "Standard Web Security", "zh-CN": "\u6807\u51C6Web\u5B89\u5168" },
891
- description: {
892
- "en": "OWASP basics, HTTPS, input validation",
893
- "zh-CN": "OWASP\u57FA\u7840\uFF0CHTTPS\uFF0C\u8F93\u5165\u9A8C\u8BC1"
894
- },
895
- value: "standard",
896
- recommended: true
897
- },
898
- {
899
- label: { "en": "SOC 2 Compliance", "zh-CN": "SOC 2\u5408\u89C4" },
900
- description: {
901
- "en": "Security controls for enterprise customers",
902
- "zh-CN": "\u4F01\u4E1A\u5BA2\u6237\u7684\u5B89\u5168\u63A7\u5236"
903
- },
904
- value: "soc2"
905
- },
906
- {
907
- label: { "en": "HIPAA", "zh-CN": "HIPAA" },
908
- description: {
909
- "en": "Healthcare data protection requirements",
910
- "zh-CN": "\u533B\u7597\u6570\u636E\u4FDD\u62A4\u8981\u6C42"
911
- },
912
- value: "hipaa"
913
- },
914
- {
915
- label: { "en": "PCI DSS", "zh-CN": "PCI DSS" },
916
- description: {
917
- "en": "Payment card data security standards",
918
- "zh-CN": "\u652F\u4ED8\u5361\u6570\u636E\u5B89\u5168\u6807\u51C6"
919
- },
920
- value: "pci"
921
- }
922
- ],
923
- multiSelect: true,
924
- order: 2,
925
- required: true
926
- },
927
- {
928
- id: "error-handling",
929
- category: "concerns",
930
- question: {
931
- "en": "How should errors be handled?",
932
- "zh-CN": "\u5982\u4F55\u5904\u7406\u9519\u8BEF\uFF1F"
933
- },
934
- header: {
935
- "en": "Errors",
936
- "zh-CN": "\u9519\u8BEF"
937
- },
938
- options: [
939
- {
940
- label: { "en": "User-friendly Messages", "zh-CN": "\u7528\u6237\u53CB\u597D\u6D88\u606F" },
941
- description: {
942
- "en": "Clear error messages, actionable guidance",
943
- "zh-CN": "\u6E05\u6670\u7684\u9519\u8BEF\u6D88\u606F\uFF0C\u53EF\u64CD\u4F5C\u7684\u6307\u5BFC"
944
- },
945
- value: "user-friendly",
946
- recommended: true
947
- },
948
- {
949
- label: { "en": "Detailed Logging", "zh-CN": "\u8BE6\u7EC6\u65E5\u5FD7" },
950
- description: {
951
- "en": "Sentry/error tracking, stack traces",
952
- "zh-CN": "Sentry/\u9519\u8BEF\u8DDF\u8E2A\uFF0C\u5806\u6808\u8DDF\u8E2A"
953
- },
954
- value: "detailed-logging"
955
- },
956
- {
957
- label: { "en": "Graceful Degradation", "zh-CN": "\u4F18\u96C5\u964D\u7EA7" },
958
- description: {
959
- "en": "Fallback UI, partial functionality",
960
- "zh-CN": "\u540E\u5907UI\uFF0C\u90E8\u5206\u529F\u80FD"
961
- },
962
- value: "graceful"
963
- },
964
- {
965
- label: { "en": "Retry Logic", "zh-CN": "\u91CD\u8BD5\u903B\u8F91" },
966
- description: {
967
- "en": "Automatic retry for transient failures",
968
- "zh-CN": "\u77AC\u6001\u6545\u969C\u81EA\u52A8\u91CD\u8BD5"
969
- },
970
- value: "retry"
971
- }
972
- ],
973
- multiSelect: true,
974
- order: 3,
975
- required: true
976
- }
977
- ];
978
- const tradeoffsQuestions = [
979
- {
980
- id: "speed-vs-quality",
981
- category: "tradeoffs",
982
- question: {
983
- "en": "What is your speed vs quality tradeoff preference?",
984
- "zh-CN": "\u4F60\u5BF9\u901F\u5EA6\u548C\u8D28\u91CF\u7684\u6743\u8861\u504F\u597D\u662F\u4EC0\u4E48\uFF1F"
985
- },
986
- header: {
987
- "en": "Tradeoff",
988
- "zh-CN": "\u6743\u8861"
989
- },
990
- options: [
991
- {
992
- label: { "en": "Ship Fast", "zh-CN": "\u5FEB\u901F\u53D1\u5E03" },
993
- description: {
994
- "en": "Get to market quickly, iterate based on feedback",
995
- "zh-CN": "\u5FEB\u901F\u4E0A\u5E02\uFF0C\u6839\u636E\u53CD\u9988\u8FED\u4EE3"
996
- },
997
- value: "ship-fast"
998
- },
999
- {
1000
- label: { "en": "Get It Right", "zh-CN": "\u505A\u5BF9\u518D\u53D1" },
1001
- description: {
1002
- "en": "Thorough testing, polished before launch",
1003
- "zh-CN": "\u5145\u5206\u6D4B\u8BD5\uFF0C\u53D1\u5E03\u524D\u6253\u78E8"
1004
- },
1005
- value: "get-it-right"
1006
- },
1007
- {
1008
- label: { "en": "Balanced", "zh-CN": "\u5E73\u8861\u65B9\u6CD5" },
1009
- description: {
1010
- "en": "MVP first, then refine incrementally",
1011
- "zh-CN": "\u5148MVP\uFF0C\u7136\u540E\u9010\u6B65\u6539\u8FDB"
1012
- },
1013
- value: "balanced",
1014
- recommended: true
1015
- }
1016
- ],
1017
- multiSelect: false,
1018
- order: 1,
1019
- required: true
1020
- },
1021
- {
1022
- id: "build-vs-buy",
1023
- category: "tradeoffs",
1024
- question: {
1025
- "en": "What is your build vs buy preference?",
1026
- "zh-CN": "\u4F60\u5BF9\u81EA\u5EFA\u548C\u8D2D\u4E70\u7684\u504F\u597D\u662F\u4EC0\u4E48\uFF1F"
1027
- },
1028
- header: {
1029
- "en": "Build/Buy",
1030
- "zh-CN": "\u81EA\u5EFA/\u8D2D\u4E70"
1031
- },
1032
- options: [
1033
- {
1034
- label: { "en": "Build Custom", "zh-CN": "\u81EA\u5EFA\u5B9A\u5236" },
1035
- description: {
1036
- "en": "Build from scratch, full control",
1037
- "zh-CN": "\u4ECE\u5934\u6784\u5EFA\uFF0C\u5B8C\u5168\u63A7\u5236"
1038
- },
1039
- value: "build"
1040
- },
1041
- {
1042
- label: { "en": "Use Services", "zh-CN": "\u4F7F\u7528\u670D\u52A1" },
1043
- description: {
1044
- "en": "Leverage SaaS tools, faster to market",
1045
- "zh-CN": "\u5229\u7528SaaS\u5DE5\u5177\uFF0C\u66F4\u5FEB\u4E0A\u5E02"
1046
- },
1047
- value: "buy"
1048
- },
1049
- {
1050
- label: { "en": "Hybrid", "zh-CN": "\u6DF7\u5408\u65B9\u5F0F" },
1051
- description: {
1052
- "en": "Core features custom, utilities from services",
1053
- "zh-CN": "\u6838\u5FC3\u529F\u80FD\u81EA\u5EFA\uFF0C\u5DE5\u5177\u7528\u670D\u52A1"
1054
- },
1055
- value: "hybrid",
1056
- recommended: true
1057
- }
1058
- ],
1059
- multiSelect: false,
1060
- order: 2,
1061
- required: true
1062
- },
1063
- {
1064
- id: "complexity-vs-simplicity",
1065
- category: "tradeoffs",
1066
- question: {
1067
- "en": "How do you balance complexity vs simplicity?",
1068
- "zh-CN": "\u5982\u4F55\u5E73\u8861\u590D\u6742\u6027\u548C\u7B80\u5355\u6027\uFF1F"
1069
- },
1070
- header: {
1071
- "en": "Complexity",
1072
- "zh-CN": "\u590D\u6742\u5EA6"
1073
- },
1074
- options: [
1075
- {
1076
- label: { "en": "KISS Principle", "zh-CN": "KISS\u539F\u5219" },
1077
- description: {
1078
- "en": "Keep it simple, avoid over-engineering",
1079
- "zh-CN": "\u4FDD\u6301\u7B80\u5355\uFF0C\u907F\u514D\u8FC7\u5EA6\u5DE5\u7A0B"
1080
- },
1081
- value: "simple",
1082
- recommended: true
1083
- },
1084
- {
1085
- label: { "en": "Future-proof", "zh-CN": "\u9762\u5411\u672A\u6765" },
1086
- description: {
1087
- "en": "Build for scale, anticipate growth",
1088
- "zh-CN": "\u4E3A\u89C4\u6A21\u6784\u5EFA\uFF0C\u9884\u671F\u589E\u957F"
1089
- },
1090
- value: "future-proof"
1091
- },
1092
- {
1093
- label: { "en": "Pragmatic", "zh-CN": "\u52A1\u5B9E" },
1094
- description: {
1095
- "en": "Right-size solutions, refactor when needed",
1096
- "zh-CN": "\u9002\u5EA6\u65B9\u6848\uFF0C\u9700\u8981\u65F6\u91CD\u6784"
1097
- },
1098
- value: "pragmatic"
1099
- }
1100
- ],
1101
- multiSelect: false,
1102
- order: 3,
1103
- required: true
1104
- }
1105
- ];
1106
- const businessLogicQuestions = [
1107
- {
1108
- id: "validation-approach",
1109
- category: "business-logic",
1110
- question: {
1111
- "en": "How strict should validation be?",
1112
- "zh-CN": "\u9A8C\u8BC1\u5E94\u8BE5\u591A\u4E25\u683C\uFF1F"
1113
- },
1114
- header: {
1115
- "en": "Validation",
1116
- "zh-CN": "\u9A8C\u8BC1"
1117
- },
1118
- options: [
1119
- {
1120
- label: { "en": "Strict", "zh-CN": "\u4E25\u683C" },
1121
- description: {
1122
- "en": "Comprehensive validation, fail-fast",
1123
- "zh-CN": "\u5168\u9762\u9A8C\u8BC1\uFF0C\u5FEB\u901F\u5931\u8D25"
1124
- },
1125
- value: "strict"
1126
- },
1127
- {
1128
- label: { "en": "Lenient", "zh-CN": "\u5BBD\u677E" },
1129
- description: {
1130
- "en": "Accept more inputs, sanitize/normalize",
1131
- "zh-CN": "\u63A5\u53D7\u66F4\u591A\u8F93\u5165\uFF0C\u6E05\u7406/\u89C4\u8303\u5316"
1132
- },
1133
- value: "lenient"
1134
- },
1135
- {
1136
- label: { "en": "Progressive", "zh-CN": "\u6E10\u8FDB\u5F0F" },
1137
- description: {
1138
- "en": "Basic at first, stricter over time",
1139
- "zh-CN": "\u5148\u57FA\u7840\uFF0C\u9010\u6E10\u4E25\u683C"
1140
- },
1141
- value: "progressive",
1142
- recommended: true
1143
- }
1144
- ],
1145
- multiSelect: false,
1146
- order: 1,
1147
- required: true
1148
- },
1149
- {
1150
- id: "workflow-states",
1151
- category: "business-logic",
1152
- question: {
1153
- "en": "Do you have complex workflow states?",
1154
- "zh-CN": "\u662F\u5426\u6709\u590D\u6742\u7684\u5DE5\u4F5C\u6D41\u72B6\u6001\uFF1F"
1155
- },
1156
- header: {
1157
- "en": "Workflow",
1158
- "zh-CN": "\u5DE5\u4F5C\u6D41"
1159
- },
1160
- options: [
1161
- {
1162
- label: { "en": "Simple CRUD", "zh-CN": "\u7B80\u5355CRUD" },
1163
- description: {
1164
- "en": "Create, read, update, delete operations",
1165
- "zh-CN": "\u521B\u5EFA\u3001\u8BFB\u53D6\u3001\u66F4\u65B0\u3001\u5220\u9664\u64CD\u4F5C"
1166
- },
1167
- value: "simple"
1168
- },
1169
- {
1170
- label: { "en": "State Machine", "zh-CN": "\u72B6\u6001\u673A" },
1171
- description: {
1172
- "en": "Defined states and transitions",
1173
- "zh-CN": "\u5B9A\u4E49\u7684\u72B6\u6001\u548C\u8F6C\u6362"
1174
- },
1175
- value: "state-machine"
1176
- },
1177
- {
1178
- label: { "en": "Approval Workflow", "zh-CN": "\u5BA1\u6279\u5DE5\u4F5C\u6D41" },
1179
- description: {
1180
- "en": "Multi-step approval processes",
1181
- "zh-CN": "\u591A\u6B65\u5BA1\u6279\u6D41\u7A0B"
1182
- },
1183
- value: "approval"
1184
- },
1185
- {
1186
- label: { "en": "Event-driven", "zh-CN": "\u4E8B\u4EF6\u9A71\u52A8" },
1187
- description: {
1188
- "en": "Actions trigger events and side effects",
1189
- "zh-CN": "\u52A8\u4F5C\u89E6\u53D1\u4E8B\u4EF6\u548C\u526F\u4F5C\u7528"
1190
- },
1191
- value: "event-driven"
1192
- }
1193
- ],
1194
- multiSelect: true,
1195
- order: 2,
1196
- required: true
1197
- }
1198
- ];
1199
- const securityComplianceQuestions = [
1200
- {
1201
- id: "data-privacy",
1202
- category: "security-compliance",
1203
- question: {
1204
- "en": "What data privacy regulations apply?",
1205
- "zh-CN": "\u9002\u7528\u4EC0\u4E48\u6570\u636E\u9690\u79C1\u6CD5\u89C4\uFF1F"
1206
- },
1207
- header: {
1208
- "en": "Privacy",
1209
- "zh-CN": "\u9690\u79C1"
1210
- },
1211
- options: [
1212
- {
1213
- label: { "en": "GDPR", "zh-CN": "GDPR" },
1214
- description: {
1215
- "en": "EU data protection, consent management",
1216
- "zh-CN": "\u6B27\u76DF\u6570\u636E\u4FDD\u62A4\uFF0C\u540C\u610F\u7BA1\u7406"
1217
- },
1218
- value: "gdpr"
1219
- },
1220
- {
1221
- label: { "en": "CCPA", "zh-CN": "CCPA" },
1222
- description: {
1223
- "en": "California consumer privacy",
1224
- "zh-CN": "\u52A0\u5DDE\u6D88\u8D39\u8005\u9690\u79C1"
1225
- },
1226
- value: "ccpa"
1227
- },
1228
- {
1229
- label: { "en": "None Specific", "zh-CN": "\u65E0\u7279\u5B9A\u8981\u6C42" },
1230
- description: {
1231
- "en": "General best practices only",
1232
- "zh-CN": "\u4EC5\u4E00\u822C\u6700\u4F73\u5B9E\u8DF5"
1233
- },
1234
- value: "none"
1235
- },
1236
- {
1237
- label: { "en": "Multiple", "zh-CN": "\u591A\u9879" },
1238
- description: {
1239
- "en": "Several regulations, complex compliance",
1240
- "zh-CN": "\u591A\u9879\u6CD5\u89C4\uFF0C\u590D\u6742\u5408\u89C4"
1241
- },
1242
- value: "multiple"
1243
- }
1244
- ],
1245
- multiSelect: true,
1246
- order: 1,
1247
- required: true
1248
- },
1249
- {
1250
- id: "data-retention",
1251
- category: "security-compliance",
1252
- question: {
1253
- "en": "What is your data retention policy?",
1254
- "zh-CN": "\u6570\u636E\u4FDD\u7559\u7B56\u7565\u662F\u4EC0\u4E48\uFF1F"
1255
- },
1256
- header: {
1257
- "en": "Retention",
1258
- "zh-CN": "\u4FDD\u7559"
1259
- },
1260
- options: [
1261
- {
1262
- label: { "en": "Keep Forever", "zh-CN": "\u6C38\u4E45\u4FDD\u7559" },
1263
- description: {
1264
- "en": "Never delete data, archive old records",
1265
- "zh-CN": "\u6C38\u4E0D\u5220\u9664\u6570\u636E\uFF0C\u5F52\u6863\u65E7\u8BB0\u5F55"
1266
- },
1267
- value: "forever"
1268
- },
1269
- {
1270
- label: { "en": "Time-based", "zh-CN": "\u57FA\u4E8E\u65F6\u95F4" },
1271
- description: {
1272
- "en": "Delete after X months/years",
1273
- "zh-CN": "X\u4E2A\u6708/\u5E74\u540E\u5220\u9664"
1274
- },
1275
- value: "time-based"
1276
- },
1277
- {
1278
- label: { "en": "User-controlled", "zh-CN": "\u7528\u6237\u63A7\u5236" },
1279
- description: {
1280
- "en": "Users can delete their own data",
1281
- "zh-CN": "\u7528\u6237\u53EF\u5220\u9664\u81EA\u5DF1\u7684\u6570\u636E"
1282
- },
1283
- value: "user-controlled",
1284
- recommended: true
1285
- },
1286
- {
1287
- label: { "en": "Legal Requirement", "zh-CN": "\u6CD5\u5F8B\u8981\u6C42" },
1288
- description: {
1289
- "en": "Specific retention period by law",
1290
- "zh-CN": "\u6CD5\u5F8B\u89C4\u5B9A\u7684\u7279\u5B9A\u4FDD\u7559\u671F"
1291
- },
1292
- value: "legal"
1293
- }
1294
- ],
1295
- multiSelect: false,
1296
- order: 2,
1297
- required: true
1298
- }
1299
- ];
1300
- const INTERVIEW_CATEGORIES = [
1301
- {
1302
- id: "project-foundation",
1303
- name: {
1304
- "en": "Project Foundation",
1305
- "zh-CN": "\u9879\u76EE\u57FA\u7840"
1306
- },
1307
- description: {
1308
- "en": "Basic project type, platform, and scope",
1309
- "zh-CN": "\u57FA\u672C\u9879\u76EE\u7C7B\u578B\u3001\u5E73\u53F0\u548C\u8303\u56F4"
1310
- },
1311
- questions: projectFoundationQuestions,
1312
- order: 1,
1313
- icon: "\u{1F3D7}\uFE0F"
1314
- },
1315
- {
1316
- id: "target-audience",
1317
- name: {
1318
- "en": "Target Audience",
1319
- "zh-CN": "\u76EE\u6807\u53D7\u4F17"
1320
- },
1321
- description: {
1322
- "en": "Customer segments and geographic focus",
1323
- "zh-CN": "\u5BA2\u6237\u7EC6\u5206\u548C\u5730\u7406\u91CD\u70B9"
1324
- },
1325
- questions: targetAudienceQuestions,
1326
- order: 2,
1327
- icon: "\u{1F465}"
1328
- },
1329
- {
1330
- id: "technical-implementation",
1331
- name: {
1332
- "en": "Technical Implementation",
1333
- "zh-CN": "\u6280\u672F\u5B9E\u73B0"
1334
- },
1335
- description: {
1336
- "en": "Architecture, database, and API decisions",
1337
- "zh-CN": "\u67B6\u6784\u3001\u6570\u636E\u5E93\u548CAPI\u51B3\u7B56"
1338
- },
1339
- questions: technicalImplementationQuestions,
1340
- order: 3,
1341
- icon: "\u2699\uFE0F"
1342
- },
1343
- {
1344
- id: "features-scope",
1345
- name: {
1346
- "en": "Features & Scope",
1347
- "zh-CN": "\u529F\u80FD\u4E0E\u8303\u56F4"
1348
- },
1349
- description: {
1350
- "en": "MVP features and integrations",
1351
- "zh-CN": "MVP\u529F\u80FD\u548C\u96C6\u6210"
1352
- },
1353
- questions: featuresScopeQuestions,
1354
- order: 4,
1355
- icon: "\u2728"
1356
- },
1357
- {
1358
- id: "ui-ux",
1359
- name: {
1360
- "en": "UI & UX",
1361
- "zh-CN": "UI\u548CUX"
1362
- },
1363
- description: {
1364
- "en": "Design system and accessibility",
1365
- "zh-CN": "\u8BBE\u8BA1\u7CFB\u7EDF\u548C\u65E0\u969C\u788D"
1366
- },
1367
- questions: uiUxQuestions,
1368
- order: 5,
1369
- icon: "\u{1F3A8}"
1370
- },
1371
- {
1372
- id: "concerns",
1373
- name: {
1374
- "en": "Concerns",
1375
- "zh-CN": "\u5173\u6CE8\u70B9"
1376
- },
1377
- description: {
1378
- "en": "Performance, security, and error handling",
1379
- "zh-CN": "\u6027\u80FD\u3001\u5B89\u5168\u548C\u9519\u8BEF\u5904\u7406"
1380
- },
1381
- questions: concernsQuestions,
1382
- order: 6,
1383
- icon: "\u26A0\uFE0F"
1384
- },
1385
- {
1386
- id: "tradeoffs",
1387
- name: {
1388
- "en": "Tradeoffs",
1389
- "zh-CN": "\u6743\u8861"
1390
- },
1391
- description: {
1392
- "en": "Speed vs quality, build vs buy decisions",
1393
- "zh-CN": "\u901F\u5EA6\u4E0E\u8D28\u91CF\u3001\u81EA\u5EFA\u4E0E\u8D2D\u4E70\u51B3\u7B56"
1394
- },
1395
- questions: tradeoffsQuestions,
1396
- order: 7,
1397
- icon: "\u2696\uFE0F"
1398
- },
1399
- {
1400
- id: "business-logic",
1401
- name: {
1402
- "en": "Business Logic",
1403
- "zh-CN": "\u4E1A\u52A1\u903B\u8F91"
1404
- },
1405
- description: {
1406
- "en": "Validation rules and workflow states",
1407
- "zh-CN": "\u9A8C\u8BC1\u89C4\u5219\u548C\u5DE5\u4F5C\u6D41\u72B6\u6001"
1408
- },
1409
- questions: businessLogicQuestions,
1410
- order: 8,
1411
- icon: "\u{1F4CB}"
1412
- },
1413
- {
1414
- id: "security-compliance",
1415
- name: {
1416
- "en": "Security & Compliance",
1417
- "zh-CN": "\u5B89\u5168\u4E0E\u5408\u89C4"
1418
- },
1419
- description: {
1420
- "en": "Data privacy and regulatory requirements",
1421
- "zh-CN": "\u6570\u636E\u9690\u79C1\u548C\u76D1\u7BA1\u8981\u6C42"
1422
- },
1423
- questions: securityComplianceQuestions,
1424
- order: 9,
1425
- icon: "\u{1F512}"
1426
- }
1427
- ];
1428
- const INTERVIEW_TEMPLATES = [
1429
- {
1430
- id: "webapp",
1431
- name: {
1432
- "en": "Web Application",
1433
- "zh-CN": "Web\u5E94\u7528"
1434
- },
1435
- description: {
1436
- "en": "Standard web application interview template",
1437
- "zh-CN": "\u6807\u51C6Web\u5E94\u7528\u8BBF\u8C08\u6A21\u677F"
1438
- },
1439
- targetTypes: ["saas", "dashboard", "webapp"],
1440
- categories: [
1441
- "project-foundation",
1442
- "target-audience",
1443
- "technical-implementation",
1444
- "features-scope",
1445
- "ui-ux",
1446
- "concerns",
1447
- "tradeoffs"
1448
- ],
1449
- defaultDepth: "standard",
1450
- estimatedQuestions: 25
1451
- },
1452
- {
1453
- id: "api",
1454
- name: {
1455
- "en": "API Service",
1456
- "zh-CN": "API\u670D\u52A1"
1457
- },
1458
- description: {
1459
- "en": "Backend API/microservice interview template",
1460
- "zh-CN": "\u540E\u7AEFAPI/\u5FAE\u670D\u52A1\u8BBF\u8C08\u6A21\u677F"
1461
- },
1462
- targetTypes: ["api", "backend", "microservice"],
1463
- categories: [
1464
- "project-foundation",
1465
- "target-audience",
1466
- "technical-implementation",
1467
- "concerns",
1468
- "security-compliance"
1469
- ],
1470
- defaultDepth: "standard",
1471
- estimatedQuestions: 20
1472
- },
1473
- {
1474
- id: "saas",
1475
- name: {
1476
- "en": "SaaS Product",
1477
- "zh-CN": "SaaS\u4EA7\u54C1"
1478
- },
1479
- description: {
1480
- "en": "Full SaaS product interview with all categories",
1481
- "zh-CN": "\u5305\u542B\u6240\u6709\u7C7B\u522B\u7684\u5B8C\u6574SaaS\u4EA7\u54C1\u8BBF\u8C08"
1482
- },
1483
- targetTypes: ["saas", "b2b", "subscription"],
1484
- categories: [
1485
- "project-foundation",
1486
- "target-audience",
1487
- "technical-implementation",
1488
- "features-scope",
1489
- "ui-ux",
1490
- "concerns",
1491
- "tradeoffs",
1492
- "business-logic",
1493
- "security-compliance"
1494
- ],
1495
- defaultDepth: "deep",
1496
- estimatedQuestions: 40
1497
- },
1498
- {
1499
- id: "ecommerce",
1500
- name: {
1501
- "en": "E-commerce",
1502
- "zh-CN": "\u7535\u5546"
1503
- },
1504
- description: {
1505
- "en": "Online store interview template",
1506
- "zh-CN": "\u5728\u7EBF\u5546\u5E97\u8BBF\u8C08\u6A21\u677F"
1507
- },
1508
- targetTypes: ["ecommerce", "shop", "store"],
1509
- categories: [
1510
- "project-foundation",
1511
- "target-audience",
1512
- "technical-implementation",
1513
- "features-scope",
1514
- "ui-ux",
1515
- "security-compliance"
1516
- ],
1517
- defaultDepth: "deep",
1518
- estimatedQuestions: 35
1519
- },
1520
- {
1521
- id: "quick",
1522
- name: {
1523
- "en": "Quick Validation",
1524
- "zh-CN": "\u5FEB\u901F\u9A8C\u8BC1"
1525
- },
1526
- description: {
1527
- "en": "Fast interview for quick project validation",
1528
- "zh-CN": "\u5FEB\u901F\u9879\u76EE\u9A8C\u8BC1\u7684\u5FEB\u901F\u8BBF\u8C08"
1529
- },
1530
- targetTypes: ["any", "prototype", "mvp"],
1531
- categories: [
1532
- "project-foundation",
1533
- "technical-implementation",
1534
- "tradeoffs"
1535
- ],
1536
- defaultDepth: "quick",
1537
- estimatedQuestions: 10
1538
- }
1539
- ];
1540
- function getQuestionsByCategory(categoryId) {
1541
- const category = INTERVIEW_CATEGORIES.find((c) => c.id === categoryId);
1542
- return category?.questions ?? [];
1543
- }
1544
- function getCategoryById(categoryId) {
1545
- return INTERVIEW_CATEGORIES.find((c) => c.id === categoryId);
1546
- }
1547
- function getTemplateById(templateId) {
1548
- return INTERVIEW_TEMPLATES.find((t) => t.id === templateId);
1549
- }
1550
- function calculateQuestionCount(categoryIds) {
1551
- return categoryIds.reduce((total, catId) => {
1552
- const category = getCategoryById(catId);
1553
- return total + (category?.questions.length ?? 0);
1554
- }, 0);
1555
- }
1556
-
1557
- const DEFAULT_OPTIONS = {
1558
- depth: "standard",
1559
- categories: [],
1560
- skipObvious: true,
1561
- outputFile: "SPEC.md",
1562
- language: "en"
1563
- };
1564
- class InterviewEngine {
1565
- sessions = /* @__PURE__ */ new Map();
1566
- language = "en";
1567
- constructor(language = "en") {
1568
- this.language = language;
1569
- }
1570
- /**
1571
- * Start a new interview session
1572
- */
1573
- async startInterview(specFile, options = {}) {
1574
- const mergedOptions = { ...DEFAULT_OPTIONS, ...options };
1575
- const sessionId = randomUUID();
1576
- let categories = mergedOptions.categories;
1577
- if (categories.length === 0) {
1578
- categories = this.getCategoriesForDepth(mergedOptions.depth);
1579
- }
1580
- const totalQuestions = calculateQuestionCount(categories);
1581
- const progress = categories.map((catId, index) => {
1582
- const category = getCategoryById(catId);
1583
- return {
1584
- categoryId: catId,
1585
- name: category?.name[this.language] ?? catId,
1586
- answered: 0,
1587
- total: category?.questions.length ?? 0,
1588
- percentage: 0,
1589
- isComplete: false,
1590
- isCurrent: index === 0
1591
- };
1592
- });
1593
- const session = {
1594
- id: sessionId,
1595
- specFile,
1596
- depth: mergedOptions.depth,
1597
- currentCategory: categories[0],
1598
- currentQuestionIndex: 0,
1599
- questionsAsked: 0,
1600
- questionsRemaining: totalQuestions,
1601
- answers: [],
1602
- progress,
1603
- startedAt: /* @__PURE__ */ new Date(),
1604
- lastActivityAt: /* @__PURE__ */ new Date(),
1605
- status: "in_progress",
1606
- includedCategories: categories,
1607
- context: mergedOptions.context
1608
- };
1609
- this.sessions.set(sessionId, session);
1610
- return session;
1611
- }
1612
- /**
1613
- * Get categories based on depth level
1614
- */
1615
- getCategoriesForDepth(depth) {
1616
- switch (depth) {
1617
- case "quick":
1618
- return ["project-foundation", "technical-implementation", "tradeoffs"];
1619
- case "standard":
1620
- return [
1621
- "project-foundation",
1622
- "target-audience",
1623
- "technical-implementation",
1624
- "features-scope",
1625
- "ui-ux",
1626
- "concerns",
1627
- "tradeoffs"
1628
- ];
1629
- case "deep":
1630
- return INTERVIEW_CATEGORIES.map((c) => c.id);
1631
- }
1632
- }
1633
- /**
1634
- * Get the next question to ask
1635
- */
1636
- async getNextQuestion(sessionId) {
1637
- const session = this.sessions.get(sessionId);
1638
- if (!session || session.status !== "in_progress") {
1639
- return null;
1640
- }
1641
- const categoryQuestions = getQuestionsByCategory(session.currentCategory);
1642
- while (session.currentQuestionIndex < categoryQuestions.length) {
1643
- const question = categoryQuestions[session.currentQuestionIndex];
1644
- if (this.shouldSkipQuestion(session, question)) {
1645
- session.currentQuestionIndex++;
1646
- continue;
1647
- }
1648
- return this.formatQuestionForDisplay(session, question);
1649
- }
1650
- const currentCatIndex = session.includedCategories.indexOf(session.currentCategory);
1651
- if (currentCatIndex < session.includedCategories.length - 1) {
1652
- this.updateCategoryProgress(session, session.currentCategory, true);
1653
- session.currentCategory = session.includedCategories[currentCatIndex + 1];
1654
- session.currentQuestionIndex = 0;
1655
- session.progress.forEach((p) => {
1656
- p.isCurrent = p.categoryId === session.currentCategory;
1657
- });
1658
- return this.getNextQuestion(sessionId);
1659
- }
1660
- session.status = "completed";
1661
- this.updateCategoryProgress(session, session.currentCategory, true);
1662
- return null;
1663
- }
1664
- /**
1665
- * Check if a question should be skipped based on conditional logic
1666
- */
1667
- shouldSkipQuestion(session, question) {
1668
- if (!question.conditional) {
1669
- return false;
1670
- }
1671
- const { dependsOn, whenValues, action } = question.conditional;
1672
- const dependentAnswer = session.answers.find((a) => a.questionId === dependsOn);
1673
- if (!dependentAnswer) {
1674
- return action === "show";
1675
- }
1676
- const hasMatchingValue = dependentAnswer.values.some((v) => whenValues.includes(v));
1677
- if (action === "show") {
1678
- return !hasMatchingValue;
1679
- } else {
1680
- return hasMatchingValue;
1681
- }
1682
- }
1683
- /**
1684
- * Format a question for display
1685
- */
1686
- formatQuestionForDisplay(session, question) {
1687
- const estimatedTotal = this.getEstimatedTotal(session);
1688
- return {
1689
- question,
1690
- progressText: this.formatProgressText(session),
1691
- categoryBreadcrumb: this.formatCategoryBreadcrumb(session),
1692
- questionNumber: session.questionsAsked + 1,
1693
- estimatedTotal,
1694
- options: question.options.map((opt) => ({
1695
- label: opt.label[this.language],
1696
- description: opt.description[this.language],
1697
- value: opt.value ?? opt.label[this.language],
1698
- isRecommended: opt.recommended ?? false
1699
- }))
1700
- };
1701
- }
1702
- /**
1703
- * Format progress text
1704
- */
1705
- formatProgressText(session) {
1706
- const estimatedTotal = this.getEstimatedTotal(session);
1707
- return `Question ${session.questionsAsked + 1} of ~${estimatedTotal}`;
1708
- }
1709
- /**
1710
- * Format category breadcrumb
1711
- */
1712
- formatCategoryBreadcrumb(session) {
1713
- return session.progress.map((p) => {
1714
- if (p.isComplete) {
1715
- return `[X] ${p.name}`;
1716
- }
1717
- if (p.isCurrent) {
1718
- return `[>] ${p.name}`;
1719
- }
1720
- return `[ ] ${p.name}`;
1721
- }).join(" -> ");
1722
- }
1723
- /**
1724
- * Get estimated total questions
1725
- */
1726
- getEstimatedTotal(session) {
1727
- switch (session.depth) {
1728
- case "quick":
1729
- return 10;
1730
- case "standard":
1731
- return 25;
1732
- case "deep":
1733
- return 40;
1734
- }
1735
- }
1736
- /**
1737
- * Process user's answer to a question
1738
- */
1739
- async processAnswer(sessionId, questionId, values, customInput) {
1740
- const session = this.sessions.get(sessionId);
1741
- if (!session || session.status !== "in_progress") {
1742
- return false;
1743
- }
1744
- const categoryQuestions = getQuestionsByCategory(session.currentCategory);
1745
- const question = categoryQuestions.find((q) => q.id === questionId);
1746
- if (!question) {
1747
- return false;
1748
- }
1749
- const answer = {
1750
- questionId,
1751
- categoryId: session.currentCategory,
1752
- values,
1753
- customInput,
1754
- answeredAt: /* @__PURE__ */ new Date()
1755
- };
1756
- session.answers.push(answer);
1757
- session.questionsAsked++;
1758
- session.questionsRemaining--;
1759
- session.currentQuestionIndex++;
1760
- session.lastActivityAt = /* @__PURE__ */ new Date();
1761
- this.updateCategoryProgress(session, session.currentCategory, false);
1762
- return true;
1763
- }
1764
- /**
1765
- * Update category progress
1766
- */
1767
- updateCategoryProgress(session, categoryId, isComplete) {
1768
- const progressItem = session.progress.find((p) => p.categoryId === categoryId);
1769
- if (progressItem) {
1770
- const categoryAnswers = session.answers.filter((a) => a.categoryId === categoryId);
1771
- progressItem.answered = categoryAnswers.length;
1772
- progressItem.percentage = Math.round(progressItem.answered / progressItem.total * 100);
1773
- progressItem.isComplete = isComplete || progressItem.answered >= progressItem.total;
1774
- }
1775
- }
1776
- /**
1777
- * Pause an interview session
1778
- */
1779
- async pauseInterview(sessionId) {
1780
- const session = this.sessions.get(sessionId);
1781
- if (!session || session.status !== "in_progress") {
1782
- return false;
1783
- }
1784
- session.status = "paused";
1785
- session.lastActivityAt = /* @__PURE__ */ new Date();
1786
- return true;
1787
- }
1788
- /**
1789
- * Resume a paused interview session
1790
- */
1791
- async resumeInterview(sessionId) {
1792
- const session = this.sessions.get(sessionId);
1793
- if (!session || session.status !== "paused") {
1794
- return null;
1795
- }
1796
- session.status = "in_progress";
1797
- session.lastActivityAt = /* @__PURE__ */ new Date();
1798
- return session;
1799
- }
1800
- /**
1801
- * Cancel an interview session
1802
- */
1803
- async cancelInterview(sessionId) {
1804
- const session = this.sessions.get(sessionId);
1805
- if (!session) {
1806
- return false;
1807
- }
1808
- session.status = "cancelled";
1809
- session.lastActivityAt = /* @__PURE__ */ new Date();
1810
- return true;
1811
- }
1812
- /**
1813
- * Get session by ID
1814
- */
1815
- getSession(sessionId) {
1816
- return this.sessions.get(sessionId);
1817
- }
1818
- /**
1819
- * Get all active sessions
1820
- */
1821
- getActiveSessions() {
1822
- return Array.from(this.sessions.values()).filter(
1823
- (s) => s.status === "in_progress" || s.status === "paused"
1824
- );
1825
- }
1826
- /**
1827
- * Check if interview is complete
1828
- */
1829
- isComplete(sessionId) {
1830
- const session = this.sessions.get(sessionId);
1831
- return session?.status === "completed";
1832
- }
1833
- /**
1834
- * Get interview result
1835
- */
1836
- async getResult(sessionId) {
1837
- const session = this.sessions.get(sessionId);
1838
- if (!session) {
1839
- return {
1840
- success: false,
1841
- session: null,
1842
- error: "Session not found"
1843
- };
1844
- }
1845
- if (session.status !== "completed") {
1846
- return {
1847
- success: false,
1848
- session,
1849
- error: `Interview not complete. Status: ${session.status}`
1850
- };
1851
- }
1852
- return {
1853
- success: true,
1854
- session
1855
- };
1856
- }
1857
- /**
1858
- * Get answers grouped by category
1859
- */
1860
- getAnswersByCategory(sessionId) {
1861
- const session = this.sessions.get(sessionId);
1862
- if (!session) {
1863
- return /* @__PURE__ */ new Map();
1864
- }
1865
- const grouped = /* @__PURE__ */ new Map();
1866
- for (const answer of session.answers) {
1867
- const existing = grouped.get(answer.categoryId) ?? [];
1868
- existing.push(answer);
1869
- grouped.set(answer.categoryId, existing);
1870
- }
1871
- return grouped;
1872
- }
1873
- /**
1874
- * Get answer for a specific question
1875
- */
1876
- getAnswerForQuestion(sessionId, questionId) {
1877
- const session = this.sessions.get(sessionId);
1878
- return session?.answers.find((a) => a.questionId === questionId);
1879
- }
1880
- /**
1881
- * Get interview statistics
1882
- */
1883
- getStats(sessionId) {
1884
- const session = this.sessions.get(sessionId);
1885
- if (!session) {
1886
- return null;
1887
- }
1888
- const duration = Math.round(
1889
- (session.lastActivityAt.getTime() - session.startedAt.getTime()) / 1e3
1890
- );
1891
- const total = session.questionsAsked + session.questionsRemaining;
1892
- const percentage = Math.round(session.questionsAsked / total * 100);
1893
- return {
1894
- answered: session.questionsAsked,
1895
- remaining: session.questionsRemaining,
1896
- percentage,
1897
- duration
1898
- };
1899
- }
1900
- /**
1901
- * Export session to JSON
1902
- */
1903
- exportSession(sessionId) {
1904
- const session = this.sessions.get(sessionId);
1905
- if (!session) {
1906
- return null;
1907
- }
1908
- return JSON.stringify(session, null, 2);
1909
- }
1910
- /**
1911
- * Import session from JSON
1912
- */
1913
- importSession(json) {
1914
- try {
1915
- const session = JSON.parse(json);
1916
- session.startedAt = new Date(session.startedAt);
1917
- session.lastActivityAt = new Date(session.lastActivityAt);
1918
- session.answers.forEach((a) => {
1919
- a.answeredAt = new Date(a.answeredAt);
1920
- });
1921
- this.sessions.set(session.id, session);
1922
- return session;
1923
- } catch {
1924
- return null;
1925
- }
1926
- }
1927
- /**
1928
- * Clear all sessions
1929
- */
1930
- clearAllSessions() {
1931
- this.sessions.clear();
1932
- }
1933
- /**
1934
- * Set language for the engine
1935
- */
1936
- setLanguage(language) {
1937
- this.language = language;
1938
- }
1939
- /**
1940
- * Get current language
1941
- */
1942
- getLanguage() {
1943
- return this.language;
1944
- }
1945
- }
1946
- function createInterviewEngine(language = "en") {
1947
- return new InterviewEngine(language);
1948
- }
1949
-
1950
- class SpecGenerator {
1951
- language = "en";
1952
- constructor(language = "en") {
1953
- this.language = language;
1954
- }
1955
- /**
1956
- * Generate spec from completed interview session
1957
- */
1958
- async generateSpec(session) {
1959
- const answersByCategory = this.groupAnswersByCategory(session.answers);
1960
- const spec = {
1961
- title: this.extractTitle(session),
1962
- generatedAt: /* @__PURE__ */ new Date(),
1963
- sessionId: session.id,
1964
- questionCount: session.questionsAsked,
1965
- depth: session.depth,
1966
- overview: this.generateOverview(answersByCategory),
1967
- technical: this.generateTechnical(answersByCategory),
1968
- uiux: this.generateUIUX(answersByCategory),
1969
- security: this.generateSecurity(answersByCategory),
1970
- business: this.generateBusiness(answersByCategory),
1971
- decisions: this.extractDecisions(session.answers),
1972
- edgeCases: this.identifyEdgeCases(session.answers),
1973
- openQuestions: this.identifyOpenQuestions(session),
1974
- rawAnswers: session.answers
1975
- };
1976
- return spec;
1977
- }
1978
- /**
1979
- * Write spec to file
1980
- */
1981
- async writeSpecToFile(spec, filePath) {
1982
- const markdown = this.formatSpecAsMarkdown(spec);
1983
- await writeFile(filePath, markdown, "utf-8");
1984
- }
1985
- /**
1986
- * Group answers by category
1987
- */
1988
- groupAnswersByCategory(answers) {
1989
- const grouped = /* @__PURE__ */ new Map();
1990
- for (const answer of answers) {
1991
- const existing = grouped.get(answer.categoryId) ?? [];
1992
- existing.push(answer);
1993
- grouped.set(answer.categoryId, existing);
1994
- }
1995
- return grouped;
1996
- }
1997
- /**
1998
- * Extract title from session context or answers
1999
- */
2000
- extractTitle(session) {
2001
- if (session.context) {
2002
- const match = session.context.match(/(?:build|create|implement)\s+(?:a\s+)?(\w+(?:\s+\w+)*)/i);
2003
- if (match) {
2004
- return match[1].trim();
2005
- }
2006
- return session.context.slice(0, 50);
2007
- }
2008
- const fileName = session.specFile.replace(/\.md$/i, "").replace(/[-_]/g, " ");
2009
- return fileName.charAt(0).toUpperCase() + fileName.slice(1);
2010
- }
2011
- /**
2012
- * Generate overview section
2013
- */
2014
- generateOverview(answersByCategory) {
2015
- const foundationAnswers = answersByCategory.get("project-foundation") ?? [];
2016
- const audienceAnswers = answersByCategory.get("target-audience") ?? [];
2017
- const featureAnswers = answersByCategory.get("features-scope") ?? [];
2018
- return {
2019
- projectType: this.getAnswerValue(foundationAnswers, "app-purpose") ?? "Not specified",
2020
- targetAudience: this.getAnswerValue(audienceAnswers, "customer-segment") ?? "Not specified",
2021
- mvpScope: this.getAnswerValues(featureAnswers, "mvp-features"),
2022
- platforms: this.getAnswerValues(foundationAnswers, "target-platform")
2023
- };
2024
- }
2025
- /**
2026
- * Generate technical section
2027
- */
2028
- generateTechnical(answersByCategory) {
2029
- const techAnswers = answersByCategory.get("technical-implementation") ?? [];
2030
- const featureAnswers = answersByCategory.get("features-scope") ?? [];
2031
- return {
2032
- architecture: this.getAnswerValue(techAnswers, "api-design") ?? "Not specified",
2033
- database: this.getAnswerValue(techAnswers, "primary-database") ?? "Not specified",
2034
- authentication: this.getAnswerValue(techAnswers, "auth-strategy") ?? "Not specified",
2035
- stateManagement: this.getAnswerValue(techAnswers, "state-management") ?? "Not specified",
2036
- integrations: this.getAnswerValues(featureAnswers, "third-party-integrations"),
2037
- apiDesign: this.getAnswerValue(techAnswers, "api-design")
2038
- };
2039
- }
2040
- /**
2041
- * Generate UI/UX section
2042
- */
2043
- generateUIUX(answersByCategory) {
2044
- const uiuxAnswers = answersByCategory.get("ui-ux") ?? [];
2045
- const foundationAnswers = answersByCategory.get("project-foundation") ?? [];
2046
- return {
2047
- platforms: this.getAnswerValues(foundationAnswers, "target-platform"),
2048
- designSystem: this.getAnswerValue(uiuxAnswers, "design-system") ?? "Not specified",
2049
- accessibility: this.getAnswerValue(uiuxAnswers, "accessibility-level") ?? "Basic",
2050
- responsiveDesign: this.getAnswerValues(foundationAnswers, "target-platform").includes("web") ? "Required" : "Platform-specific",
2051
- keyFlows: []
2052
- // Will be populated from user flows if asked
2053
- };
2054
- }
2055
- /**
2056
- * Generate security section
2057
- */
2058
- generateSecurity(answersByCategory) {
2059
- const concernAnswers = answersByCategory.get("concerns") ?? [];
2060
- const complianceAnswers = answersByCategory.get("security-compliance") ?? [];
2061
- return {
2062
- requirements: this.getAnswerValues(concernAnswers, "security-requirements"),
2063
- compliance: this.getAnswerValues(complianceAnswers, "data-privacy"),
2064
- dataPrivacy: [
2065
- this.getAnswerValue(complianceAnswers, "data-retention") ?? "Standard"
2066
- ]
2067
- };
2068
- }
2069
- /**
2070
- * Generate business logic section
2071
- */
2072
- generateBusiness(answersByCategory) {
2073
- const businessAnswers = answersByCategory.get("business-logic") ?? [];
2074
- return {
2075
- validationRules: [
2076
- this.getAnswerValue(businessAnswers, "validation-approach") ?? "Progressive"
2077
- ],
2078
- workflowStates: this.getAnswerValues(businessAnswers, "workflow-states"),
2079
- constraints: []
2080
- };
2081
- }
2082
- /**
2083
- * Extract decisions from answers
2084
- */
2085
- extractDecisions(answers) {
2086
- const decisions = [];
2087
- for (const answer of answers) {
2088
- const questions = getQuestionsByCategory(answer.categoryId);
2089
- const question = questions.find((q) => q.id === answer.questionId);
2090
- if (question && answer.values.length > 0) {
2091
- const category = getCategoryById(answer.categoryId);
2092
- const selectedOptions = question.options.filter(
2093
- (opt) => answer.values.includes(opt.value ?? opt.label[this.language])
2094
- );
2095
- const rationale = selectedOptions.map((opt) => opt.description[this.language]).join("; ");
2096
- decisions.push({
2097
- decision: `${question.header[this.language]}: ${answer.values.join(", ")}`,
2098
- rationale: rationale || "User preference",
2099
- relatedQuestions: [answer.questionId],
2100
- category: category?.name[this.language] ?? answer.categoryId
2101
- });
2102
- }
2103
- }
2104
- return decisions;
2105
- }
2106
- /**
2107
- * Identify potential edge cases based on answers
2108
- */
2109
- identifyEdgeCases(answers) {
2110
- const edgeCases = [];
2111
- const geoAnswer = answers.find((a) => a.questionId === "geographic-focus");
2112
- if (geoAnswer?.values.includes("global")) {
2113
- edgeCases.push({
2114
- description: "Multi-language and localization support needed",
2115
- handling: "Implement i18n framework, RTL support, date/number formatting",
2116
- severity: "high",
2117
- relatedQuestions: ["geographic-focus"]
2118
- });
2119
- }
2120
- const mvpAnswer = answers.find((a) => a.questionId === "mvp-features");
2121
- if (mvpAnswer?.values.includes("realtime")) {
2122
- edgeCases.push({
2123
- description: "WebSocket connection handling edge cases",
2124
- handling: "Implement reconnection logic, offline queue, connection state management",
2125
- severity: "high",
2126
- relatedQuestions: ["mvp-features"]
2127
- });
2128
- }
2129
- const customerAnswer = answers.find((a) => a.questionId === "customer-segment");
2130
- if (customerAnswer?.values.includes("enterprise")) {
2131
- edgeCases.push({
2132
- description: "Enterprise SSO and SAML integration",
2133
- handling: "Plan for custom identity provider integration, session management",
2134
- severity: "medium",
2135
- relatedQuestions: ["customer-segment", "auth-strategy"]
2136
- });
2137
- }
2138
- const integrationAnswer = answers.find((a) => a.questionId === "third-party-integrations");
2139
- if (integrationAnswer?.values.includes("stripe")) {
2140
- edgeCases.push({
2141
- description: "Payment failure and retry handling",
2142
- handling: "Implement webhook handlers, failed payment recovery flow, dunning management",
2143
- severity: "high",
2144
- relatedQuestions: ["third-party-integrations", "mvp-features"]
2145
- });
2146
- }
2147
- const volumeAnswer = answers.find((a) => a.questionId === "user-volume");
2148
- if (volumeAnswer?.values.includes("large") || volumeAnswer?.values.includes("massive")) {
2149
- edgeCases.push({
2150
- description: "Database scaling and caching strategy",
2151
- handling: "Implement read replicas, caching layer, query optimization",
2152
- severity: "high",
2153
- relatedQuestions: ["user-volume", "primary-database"]
2154
- });
2155
- }
2156
- return edgeCases;
2157
- }
2158
- /**
2159
- * Identify open questions for future consideration
2160
- */
2161
- identifyOpenQuestions(session) {
2162
- const openQuestions = [];
2163
- const criticalQuestions = ["auth-strategy", "primary-database", "mvp-features"];
2164
- const answeredQuestions = new Set(session.answers.map((a) => a.questionId));
2165
- for (const qId of criticalQuestions) {
2166
- if (!answeredQuestions.has(qId)) {
2167
- openQuestions.push({
2168
- question: `${qId} was not determined during interview`,
2169
- reason: "Critical decision needs to be made",
2170
- suggestedApproach: "Conduct follow-up discussion",
2171
- priority: "high"
2172
- });
2173
- }
2174
- }
2175
- const projectType = session.answers.find((a) => a.questionId === "app-purpose")?.values[0];
2176
- if (projectType === "saas") {
2177
- openQuestions.push({
2178
- question: "How will pricing tiers be structured?",
2179
- reason: "Pricing strategy affects feature gating implementation",
2180
- suggestedApproach: "Define feature matrix and usage limits per tier",
2181
- priority: "medium"
2182
- });
2183
- }
2184
- openQuestions.push({
2185
- question: "What testing strategy will be used?",
2186
- reason: "Testing approach affects CI/CD setup and development workflow",
2187
- suggestedApproach: "Define unit test, integration test, and E2E test coverage targets",
2188
- priority: "medium"
2189
- });
2190
- return openQuestions;
2191
- }
2192
- /**
2193
- * Get single answer value
2194
- */
2195
- getAnswerValue(answers, questionId) {
2196
- const answer = answers.find((a) => a.questionId === questionId);
2197
- return answer?.values[0] ?? answer?.customInput;
2198
- }
2199
- /**
2200
- * Get multiple answer values
2201
- */
2202
- getAnswerValues(answers, questionId) {
2203
- const answer = answers.find((a) => a.questionId === questionId);
2204
- if (!answer) {
2205
- return [];
2206
- }
2207
- const values = [...answer.values];
2208
- if (answer.customInput) {
2209
- values.push(answer.customInput);
2210
- }
2211
- return values;
2212
- }
2213
- /**
2214
- * Format spec as Markdown
2215
- */
2216
- formatSpecAsMarkdown(spec) {
2217
- const lines = [];
2218
- lines.push(`# Feature Specification: ${spec.title}`);
2219
- lines.push("");
2220
- lines.push(`Generated: ${spec.generatedAt.toISOString()}`);
2221
- lines.push(`Interview Questions: ${spec.questionCount}`);
2222
- lines.push(`Interview Depth: ${spec.depth}`);
2223
- lines.push("");
2224
- lines.push("## Overview");
2225
- lines.push("");
2226
- lines.push(`- **Project Type**: ${spec.overview.projectType}`);
2227
- lines.push(`- **Target Audience**: ${spec.overview.targetAudience}`);
2228
- lines.push(`- **Platforms**: ${spec.overview.platforms.join(", ") || "Not specified"}`);
2229
- lines.push(`- **MVP Scope**: ${spec.overview.mvpScope.join(", ") || "Not specified"}`);
2230
- lines.push("");
2231
- lines.push("## Technical Architecture");
2232
- lines.push("");
2233
- lines.push(`- **Architecture**: ${spec.technical.architecture}`);
2234
- lines.push(`- **Database**: ${spec.technical.database}`);
2235
- lines.push(`- **Authentication**: ${spec.technical.authentication}`);
2236
- lines.push(`- **State Management**: ${spec.technical.stateManagement}`);
2237
- lines.push(`- **Integrations**: ${spec.technical.integrations.join(", ") || "None"}`);
2238
- lines.push("");
2239
- lines.push("## UI/UX Requirements");
2240
- lines.push("");
2241
- lines.push(`- **Platforms**: ${spec.uiux.platforms.join(", ") || "Web"}`);
2242
- lines.push(`- **Design System**: ${spec.uiux.designSystem}`);
2243
- lines.push(`- **Accessibility**: ${spec.uiux.accessibility}`);
2244
- lines.push(`- **Responsive Design**: ${spec.uiux.responsiveDesign}`);
2245
- lines.push("");
2246
- lines.push("## Security & Compliance");
2247
- lines.push("");
2248
- lines.push(`- **Requirements**: ${spec.security.requirements.join(", ") || "Standard"}`);
2249
- lines.push(`- **Compliance**: ${spec.security.compliance.join(", ") || "None specific"}`);
2250
- lines.push(`- **Data Privacy**: ${spec.security.dataPrivacy.join(", ") || "Standard"}`);
2251
- lines.push("");
2252
- if (spec.business.validationRules.length > 0 || spec.business.workflowStates.length > 0) {
2253
- lines.push("## Business Logic");
2254
- lines.push("");
2255
- if (spec.business.validationRules.length > 0) {
2256
- lines.push(`- **Validation**: ${spec.business.validationRules.join(", ")}`);
2257
- }
2258
- if (spec.business.workflowStates.length > 0) {
2259
- lines.push(`- **Workflow States**: ${spec.business.workflowStates.join(", ")}`);
2260
- }
2261
- lines.push("");
2262
- }
2263
- lines.push("## Decisions Made");
2264
- lines.push("");
2265
- if (spec.decisions.length > 0) {
2266
- spec.decisions.forEach((decision, index) => {
2267
- lines.push(`${index + 1}. **${decision.decision}**`);
2268
- lines.push(` - Rationale: ${decision.rationale}`);
2269
- lines.push(` - Category: ${decision.category}`);
2270
- lines.push("");
2271
- });
2272
- } else {
2273
- lines.push("No explicit decisions recorded.");
2274
- lines.push("");
2275
- }
2276
- lines.push("## Edge Cases Identified");
2277
- lines.push("");
2278
- if (spec.edgeCases.length > 0) {
2279
- spec.edgeCases.forEach((edgeCase, index) => {
2280
- lines.push(`${index + 1}. **${edgeCase.description}** (${edgeCase.severity})`);
2281
- lines.push(` - Handling: ${edgeCase.handling}`);
2282
- lines.push("");
2283
- });
2284
- } else {
2285
- lines.push("No edge cases identified during interview.");
2286
- lines.push("");
2287
- }
2288
- lines.push("## Open Questions");
2289
- lines.push("");
2290
- if (spec.openQuestions.length > 0) {
2291
- spec.openQuestions.forEach((question, index) => {
2292
- lines.push(`${index + 1}. **${question.question}** (${question.priority})`);
2293
- lines.push(` - Reason: ${question.reason}`);
2294
- if (question.suggestedApproach) {
2295
- lines.push(` - Suggested: ${question.suggestedApproach}`);
2296
- }
2297
- lines.push("");
2298
- });
2299
- } else {
2300
- lines.push("No open questions remaining.");
2301
- lines.push("");
2302
- }
2303
- lines.push("---");
2304
- lines.push("");
2305
- lines.push(`*Generated by CCJK Interview-Driven Development*`);
2306
- lines.push(`*Session ID: ${spec.sessionId}*`);
2307
- return lines.join("\n");
2308
- }
2309
- /**
2310
- * Set language
2311
- */
2312
- setLanguage(language) {
2313
- this.language = language;
2314
- }
2315
- }
2316
- function createSpecGenerator(language = "en") {
2317
- return new SpecGenerator(language);
2318
- }
2319
-
2320
- function displayInterviewBanner(compact = false) {
2321
- console.log("");
2322
- if (compact) {
2323
- console.log(a.green.bold(" \u{1F3A4} Interview-Driven Development"));
2324
- console.log(a.gray(' "Interview first. Spec second. Code last."'));
2325
- } else {
2326
- console.log(a.green("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"));
2327
- console.log(a.green("\u2551") + a.bold.white(" \u{1F3A4} Interview-Driven Development (IDD) ") + a.green("\u2551"));
2328
- console.log(a.green("\u2551") + a.gray(' "Interview first. Spec second. Code last." ') + a.green("\u2551"));
2329
- console.log(a.green("\u2551") + a.gray(" Based on Thariq (@trq212) workflow from Anthropic ") + a.green("\u2551"));
2330
- console.log(a.green("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"));
2331
- }
2332
- console.log("");
2333
- }
2334
- async function detectProjectType() {
2335
- const { existsSync: existsSync2 } = await import('node:fs');
2336
- const cwd = process__default.cwd();
2337
- const indicators = {
2338
- saas: ["prisma", "drizzle", "stripe", "auth", "subscription"].some(
2339
- (dir) => existsSync2(join(cwd, dir)) || existsSync2(join(cwd, "src", dir))
2340
- ),
2341
- ecommerce: ["cart", "checkout", "products", "shop"].some(
2342
- (dir) => existsSync2(join(cwd, dir)) || existsSync2(join(cwd, "src", dir))
2343
- ),
2344
- api: existsSync2(join(cwd, "routes")) || existsSync2(join(cwd, "api")) || existsSync2(join(cwd, "src/routes")) || existsSync2(join(cwd, "src/api")),
2345
- webapp: existsSync2(join(cwd, "pages")) || existsSync2(join(cwd, "app")) || existsSync2(join(cwd, "src/pages")) || existsSync2(join(cwd, "src/app")) || existsSync2(join(cwd, "components"))
2346
- };
2347
- if (indicators.saas)
2348
- return "saas";
2349
- if (indicators.ecommerce)
2350
- return "ecommerce";
2351
- if (indicators.api)
2352
- return "api";
2353
- if (indicators.webapp)
2354
- return "webapp";
2355
- return "webapp";
2356
- }
2357
- function displayProgressBar(session) {
2358
- const total = session.questionsAsked + session.questionsRemaining;
2359
- const percentage = Math.round(session.questionsAsked / total * 100);
2360
- const barWidth = 30;
2361
- const filled = Math.round(percentage / 100 * barWidth);
2362
- const empty = barWidth - filled;
2363
- const bar = a.green("\u2588".repeat(filled)) + a.gray("\u2591".repeat(empty));
2364
- console.log("");
2365
- console.log(a.gray(` Progress: [${bar}] ${percentage}%`));
2366
- }
2367
- function displayCategoryBreadcrumb(session) {
2368
- const breadcrumb = session.progress.map((p) => {
2369
- const category = getCategoryById(p.categoryId);
2370
- const icon = category?.icon || "\u{1F4CC}";
2371
- if (p.isComplete) {
2372
- return a.green(`${icon} ${p.name} \u2713`);
2373
- }
2374
- if (p.isCurrent) {
2375
- return a.green.bold(`${icon} ${p.name} \u25C0`);
2376
- }
2377
- return a.gray(`${icon} ${p.name}`);
2378
- }).join(a.gray(" \u2192 "));
2379
- console.log("");
2380
- console.log(` ${breadcrumb}`);
2381
- }
2382
- function displayQuestion(display, lang) {
2383
- const questionText = display.question.question[lang];
2384
- const headerText = display.question.header[lang];
2385
- console.log("");
2386
- console.log(a.gray("\u2500".repeat(65)));
2387
- console.log("");
2388
- console.log(a.green.bold(` Q${display.questionNumber}`) + a.gray(` of ~${display.estimatedTotal}`) + a.gray(` \u2502 `) + a.yellow(headerText));
2389
- console.log("");
2390
- console.log(a.white.bold(` ${questionText}`));
2391
- console.log("");
2392
- }
2393
- async function askQuestion(display, lang) {
2394
- displayQuestion(display, lang);
2395
- const choices = display.options.map((opt, index) => {
2396
- const label = opt.isRecommended ? `${opt.label} ${a.green("(Recommended)")}` : opt.label;
2397
- return {
2398
- name: `${a.green(`${index + 1}.`)} ${label}
2399
- ${a.gray(opt.description)}`,
2400
- value: opt.value,
2401
- short: opt.label
2402
- };
2403
- });
2404
- choices.push({
2405
- name: `${a.green(`${choices.length + 1}.`)} ${a.italic("Type something else...")}`,
2406
- value: "__custom__",
2407
- short: "Custom"
2408
- });
2409
- try {
2410
- if (display.question.multiSelect) {
2411
- const { selected } = await inquirer.prompt({
2412
- type: "checkbox",
2413
- name: "selected",
2414
- message: a.gray("Select all that apply (space to select, enter to confirm):"),
2415
- choices: choices.map((c) => ({
2416
- name: c.name,
2417
- value: c.value,
2418
- short: c.short
2419
- })),
2420
- pageSize: 10
2421
- });
2422
- if (selected.includes("__custom__")) {
2423
- const { customValue } = await inquirer.prompt({
2424
- type: "input",
2425
- name: "customValue",
2426
- message: a.gray("Enter your custom answer:")
2427
- });
2428
- const filtered = selected.filter((s) => s !== "__custom__");
2429
- return { values: filtered, customInput: customValue };
2430
- }
2431
- return { values: selected };
2432
- } else {
2433
- const { selected } = await inquirer.prompt({
2434
- type: "list",
2435
- name: "selected",
2436
- message: a.gray("Select one:"),
2437
- choices,
2438
- pageSize: 10
2439
- });
2440
- if (selected === "__custom__") {
2441
- const { customValue } = await inquirer.prompt({
2442
- type: "input",
2443
- name: "customValue",
2444
- message: a.gray("Enter your custom answer:")
2445
- });
2446
- return { values: [], customInput: customValue };
2447
- }
2448
- return { values: [selected] };
2449
- }
2450
- } catch {
2451
- return null;
2452
- }
2453
- }
2454
- async function selectTemplate(lang) {
2455
- console.log("");
2456
- console.log(a.green.bold(" \u{1F4CB} Select Interview Template"));
2457
- console.log("");
2458
- const choices = INTERVIEW_TEMPLATES.map((template, index) => ({
2459
- name: `${a.green(`${index + 1}.`)} ${a.bold(template.name[lang])}
2460
- ${a.gray(template.description[lang])}
2461
- ${a.gray(`~${template.estimatedQuestions} questions, ${template.defaultDepth} depth`)}`,
2462
- value: template.id,
2463
- short: template.name[lang]
2464
- }));
2465
- try {
2466
- const { templateId } = await inquirer.prompt({
2467
- type: "list",
2468
- name: "templateId",
2469
- message: a.gray("Choose a template:"),
2470
- choices,
2471
- pageSize: 10
2472
- });
2473
- return templateId;
2474
- } catch {
2475
- return null;
2476
- }
2477
- }
2478
- async function quickStartConfig(_lang) {
2479
- const detectedType = await detectProjectType();
2480
- const detectedTemplate = getTemplateById(detectedType);
2481
- console.log(a.gray(` Detected project type: ${a.white(detectedType)}`));
2482
- console.log("");
2483
- console.log(a.green.bold(" How would you like to proceed?"));
2484
- console.log("");
2485
- const quickChoices = [
2486
- {
2487
- name: `${a.green("1.")} ${a.green("\u26A1 Quick Start")} ${a.gray("(Recommended)")}
2488
- ${a.gray(`Use ${detectedType} template, ~${detectedTemplate?.estimatedQuestions || 25} questions \u2192 SPEC.md`)}`,
2489
- value: "quick-start",
2490
- short: "Quick Start"
2491
- },
2492
- {
2493
- name: `${a.green("2.")} ${a.yellow("\u{1F52C} Deep Dive")}
2494
- ${a.gray("40+ comprehensive questions for complex features")}`,
2495
- value: "deep",
2496
- short: "Deep Dive"
2497
- },
2498
- {
2499
- name: `${a.green("3.")} ${a.green("\u2699\uFE0F Custom Setup")}
2500
- ${a.gray("Choose template, depth, and output file")}`,
2501
- value: "custom",
2502
- short: "Custom"
2503
- },
2504
- {
2505
- name: `${a.green("4.")} ${a.magenta("\u{1F4A8} Express Mode")}
2506
- ${a.gray("~10 essential questions only")}`,
2507
- value: "express",
2508
- short: "Express"
2509
- }
2510
- ];
2511
- try {
2512
- const { mode } = await inquirer.prompt({
2513
- type: "list",
2514
- name: "mode",
2515
- message: a.gray("Select mode (press number or use arrows):"),
2516
- choices: quickChoices,
2517
- pageSize: 8
2518
- });
2519
- switch (mode) {
2520
- case "quick-start":
2521
- return {
2522
- template: detectedType,
2523
- depth: "standard",
2524
- specFile: "SPEC.md"
2525
- };
2526
- case "deep":
2527
- return {
2528
- template: detectedType,
2529
- depth: "deep",
2530
- specFile: "SPEC.md"
2531
- };
2532
- case "express":
2533
- return {
2534
- template: "quick",
2535
- depth: "quick",
2536
- specFile: "SPEC.md"
2537
- };
2538
- case "custom":
2539
- return null;
2540
- default:
2541
- return null;
2542
- }
2543
- } catch {
2544
- return null;
2545
- }
2546
- }
2547
- async function getSpecFilePath(defaultPath) {
2548
- try {
2549
- const { specFile } = await inquirer.prompt({
2550
- type: "input",
2551
- name: "specFile",
2552
- message: a.gray("Spec file path (where to save the specification):"),
2553
- default: defaultPath,
2554
- validate: (value) => {
2555
- if (!value.trim()) {
2556
- return "Please enter a file path";
2557
- }
2558
- if (!value.endsWith(".md")) {
2559
- return "File should have .md extension";
2560
- }
2561
- return true;
2562
- }
2563
- });
2564
- return specFile;
2565
- } catch {
2566
- return null;
2567
- }
2568
- }
2569
- function displayCompletionSummary(session, specFile) {
2570
- const duration = Math.round(
2571
- (session.lastActivityAt.getTime() - session.startedAt.getTime()) / 1e3 / 60
2572
- );
2573
- console.log("");
2574
- console.log(a.green("\u2550".repeat(65)));
2575
- console.log("");
2576
- console.log(a.green.bold(" \u2713 Interview Complete!"));
2577
- console.log("");
2578
- console.log(` ${a.gray("Questions answered:")} ${a.white(String(session.questionsAsked))}`);
2579
- console.log(` ${a.gray("Duration:")} ${a.white(`${duration} minutes`)}`);
2580
- console.log(` ${a.gray("Spec file:")} ${a.green(specFile)}`);
2581
- console.log("");
2582
- console.log(a.gray(" Category Summary:"));
2583
- for (const progress of session.progress) {
2584
- const category = getCategoryById(progress.categoryId);
2585
- const icon = category?.icon || "\u{1F4CC}";
2586
- const status = progress.isComplete ? a.green("\u2713") : a.yellow("\u25CB");
2587
- console.log(` ${status} ${icon} ${progress.name}: ${progress.answered}/${progress.total}`);
2588
- }
2589
- console.log("");
2590
- console.log(a.green("\u2550".repeat(65)));
2591
- console.log("");
2592
- console.log(a.green(" Next steps:"));
2593
- console.log(a.gray(` 1. Review the spec: ${a.white(`cat ${specFile}`)}`));
2594
- console.log(a.gray(` 2. Start planning: ${a.white("/plan")}`));
2595
- console.log(a.gray(` 3. Begin coding: ${a.white("Use the spec as context")}`));
2596
- console.log("");
2597
- }
2598
- function listTemplates(lang) {
2599
- console.log("");
2600
- console.log(a.green.bold(" Available Interview Templates:"));
2601
- console.log("");
2602
- for (const template of INTERVIEW_TEMPLATES) {
2603
- console.log(a.green(` ${template.id}`));
2604
- console.log(` ${a.white(template.name[lang])}`);
2605
- console.log(` ${a.gray(template.description[lang])}`);
2606
- console.log(` ${a.gray(`~${template.estimatedQuestions} questions, ${template.defaultDepth} depth`)}`);
2607
- console.log("");
2608
- }
2609
- console.log(a.gray(" Usage: ccjk interview --template <template-id> [SPEC.md]"));
2610
- console.log("");
2611
- }
2612
- async function interview(options = {}) {
2613
- try {
2614
- const lang = options.lang || i18n.language || "en";
2615
- if (options.list) {
2616
- listTemplates(lang);
2617
- return;
2618
- }
2619
- const hasPresetOptions = options.template || options.depth;
2620
- displayInterviewBanner(!hasPresetOptions);
2621
- let templateId;
2622
- let depth;
2623
- let specFile;
2624
- if (!hasPresetOptions) {
2625
- const quickConfig = await quickStartConfig(lang);
2626
- if (quickConfig) {
2627
- templateId = quickConfig.template;
2628
- depth = quickConfig.depth;
2629
- specFile = quickConfig.specFile;
2630
- } else {
2631
- const selectedTemplate = await selectTemplate(lang);
2632
- if (!selectedTemplate) {
2633
- console.log(a.yellow("\n Interview cancelled.\n"));
2634
- return;
2635
- }
2636
- templateId = selectedTemplate;
2637
- const template2 = getTemplateById(templateId);
2638
- if (!template2) {
2639
- console.log(a.red(`
2640
- Template not found: ${templateId}
2641
- `));
2642
- return;
2643
- }
2644
- const { selectedDepth } = await inquirer.prompt({
2645
- type: "list",
2646
- name: "selectedDepth",
2647
- message: a.gray("Interview depth:"),
2648
- choices: [
2649
- {
2650
- name: `${a.green("1.")} \u26A1 Quick (~10 questions)`,
2651
- value: "quick",
2652
- short: "Quick"
2653
- },
2654
- {
2655
- name: `${a.green("2.")} \u{1F4CA} Standard (~25 questions) ${template2.defaultDepth === "standard" ? a.green("(Recommended)") : ""}`,
2656
- value: "standard",
2657
- short: "Standard"
2658
- },
2659
- {
2660
- name: `${a.green("3.")} \u{1F52C} Deep (~40+ questions) ${template2.defaultDepth === "deep" ? a.green("(Recommended)") : ""}`,
2661
- value: "deep",
2662
- short: "Deep"
2663
- }
2664
- ],
2665
- default: template2.defaultDepth,
2666
- pageSize: 6
2667
- });
2668
- depth = selectedDepth;
2669
- const selectedSpecFile = await getSpecFilePath("SPEC.md");
2670
- if (!selectedSpecFile) {
2671
- console.log(a.yellow("\n Interview cancelled.\n"));
2672
- return;
2673
- }
2674
- specFile = selectedSpecFile;
2675
- }
2676
- } else {
2677
- templateId = options.template || "webapp";
2678
- depth = options.depth || "standard";
2679
- specFile = options.specFile || "SPEC.md";
2680
- }
2681
- const template = getTemplateById(templateId);
2682
- if (!template) {
2683
- console.log(a.red(`
2684
- Template not found: ${templateId}
2685
- `));
2686
- console.log(a.gray(" Available templates:"));
2687
- INTERVIEW_TEMPLATES.forEach((t) => console.log(a.gray(` - ${t.id}`)));
2688
- return;
2689
- }
2690
- const absoluteSpecFile = resolve(process__default.cwd(), specFile);
2691
- console.log("");
2692
- console.log(a.gray("\u2500".repeat(50)));
2693
- console.log(` ${a.gray("Template:")} ${a.white(template.name[lang])}`);
2694
- console.log(` ${a.gray("Depth:")} ${a.white(depth)} ${a.gray(`(~${depth === "quick" ? 10 : depth === "standard" ? 25 : 40}+ questions)`)}`);
2695
- console.log(` ${a.gray("Output:")} ${a.green(specFile)}`);
2696
- console.log(a.gray("\u2500".repeat(50)));
2697
- console.log("");
2698
- console.log(a.green(" Starting interview..."));
2699
- console.log(a.gray(" Press Ctrl+C to pause | Enter to select | Type for custom"));
2700
- console.log("");
2701
- const engine = createInterviewEngine(lang);
2702
- const session = await engine.startInterview(absoluteSpecFile, {
2703
- depth,
2704
- categories: template.categories,
2705
- skipObvious: true,
2706
- outputFile: absoluteSpecFile,
2707
- language: lang,
2708
- context: options.context
2709
- });
2710
- let questionDisplay = await engine.getNextQuestion(session.id);
2711
- while (questionDisplay) {
2712
- displayProgressBar(session);
2713
- displayCategoryBreadcrumb(session);
2714
- const answer = await askQuestion(questionDisplay, lang);
2715
- if (answer === null) {
2716
- console.log("");
2717
- console.log(a.yellow(" Interview paused."));
2718
- try {
2719
- const { saveProgress } = await inquirer.prompt({
2720
- type: "confirm",
2721
- name: "saveProgress",
2722
- message: "Save progress for later?",
2723
- default: true
2724
- });
2725
- if (saveProgress) {
2726
- await engine.pauseInterview(session.id);
2727
- const sessionJson = engine.exportSession(session.id);
2728
- if (sessionJson) {
2729
- const sessionFile = absoluteSpecFile.replace(".md", ".session.json");
2730
- await writeFile(sessionFile, sessionJson, "utf-8");
2731
- console.log(a.gray(` Session saved to: ${sessionFile}`));
2732
- console.log(a.gray(` Resume with: ccjk interview --resume`));
2733
- }
2734
- }
2735
- } catch {
2736
- }
2737
- return;
2738
- }
2739
- const values = answer.customInput && answer.values.length === 0 ? [answer.customInput] : answer.values;
2740
- await engine.processAnswer(
2741
- session.id,
2742
- questionDisplay.question.id,
2743
- values,
2744
- answer.customInput
2745
- );
2746
- questionDisplay = await engine.getNextQuestion(session.id);
2747
- }
2748
- console.log("");
2749
- console.log(a.green(" Generating specification..."));
2750
- const specGenerator = createSpecGenerator(lang);
2751
- const spec = await specGenerator.generateSpec(session);
2752
- const specDir = dirname(absoluteSpecFile);
2753
- if (!existsSync(specDir)) {
2754
- await mkdir(specDir, { recursive: true });
2755
- }
2756
- await specGenerator.writeSpecToFile(spec, absoluteSpecFile);
2757
- displayCompletionSummary(session, specFile);
2758
- } catch (error) {
2759
- if (!handleExitPromptError(error)) {
2760
- handleGeneralError(error);
2761
- }
2762
- }
2763
- }
2764
- async function resumeInterview(sessionFile, options = {}) {
2765
- try {
2766
- const lang = options.lang || i18n.language || "en";
2767
- let targetSessionFile = sessionFile;
2768
- if (!targetSessionFile) {
2769
- const { readdir, stat } = await import('node:fs/promises');
2770
- const { homedir } = await import('node:os');
2771
- const searchDirs = [
2772
- process__default.cwd(),
2773
- join(homedir(), ".ccjk", "sessions")
2774
- ];
2775
- const sessions = [];
2776
- for (const dir of searchDirs) {
2777
- try {
2778
- const files = await readdir(dir);
2779
- const sessionFiles = files.filter((f) => f.endsWith(".session.json"));
2780
- for (const file of sessionFiles) {
2781
- const filePath = join(dir, file);
2782
- const fileStats = await stat(filePath);
2783
- sessions.push({
2784
- name: file,
2785
- path: filePath,
2786
- modified: fileStats.mtime
2787
- });
2788
- }
2789
- } catch {
2790
- }
2791
- }
2792
- if (sessions.length === 0) {
2793
- console.log(a.yellow("\n No saved sessions found.\n"));
2794
- console.log(a.gray(" Start a new interview with: ccjk interview"));
2795
- return;
2796
- }
2797
- sessions.sort((a, b) => b.modified.getTime() - a.modified.getTime());
2798
- const { selectedSession } = await inquirer.prompt({
2799
- type: "list",
2800
- name: "selectedSession",
2801
- message: a.gray("Select a session to resume:"),
2802
- choices: sessions.map((s, i) => ({
2803
- name: `${a.green(`${i + 1}.`)} ${a.white(s.name)}
2804
- ${a.gray(`Modified: ${s.modified.toLocaleString()}`)}`,
2805
- value: s.path,
2806
- short: s.name
2807
- })),
2808
- pageSize: 10
2809
- });
2810
- targetSessionFile = selectedSession;
2811
- }
2812
- if (!existsSync(targetSessionFile)) {
2813
- console.log(a.red(`
2814
- Session file not found: ${targetSessionFile}
2815
- `));
2816
- return;
2817
- }
2818
- const sessionJson = await readFile(targetSessionFile, "utf-8");
2819
- const engine = createInterviewEngine(lang);
2820
- const session = engine.importSession(sessionJson);
2821
- if (!session) {
2822
- console.log(a.red("\n Failed to load session file.\n"));
2823
- return;
2824
- }
2825
- displayInterviewBanner();
2826
- console.log(a.green(" Resuming interview session..."));
2827
- console.log(a.gray(` Session ID: ${session.id}`));
2828
- console.log(a.gray(` Progress: ${session.questionsAsked} questions answered`));
2829
- console.log("");
2830
- const resumed = await engine.resumeInterview(session.id);
2831
- if (!resumed) {
2832
- console.log(a.red("\n Failed to resume session.\n"));
2833
- return;
2834
- }
2835
- let questionDisplay = await engine.getNextQuestion(session.id);
2836
- while (questionDisplay) {
2837
- displayProgressBar(session);
2838
- displayCategoryBreadcrumb(session);
2839
- const answer = await askQuestion(questionDisplay, lang);
2840
- if (answer === null) {
2841
- console.log("");
2842
- console.log(a.yellow(" Interview paused."));
2843
- await engine.pauseInterview(session.id);
2844
- const updatedSessionJson = engine.exportSession(session.id);
2845
- if (updatedSessionJson) {
2846
- await writeFile(targetSessionFile, updatedSessionJson, "utf-8");
2847
- console.log(a.gray(` Progress saved to: ${targetSessionFile}`));
2848
- }
2849
- return;
2850
- }
2851
- const values = answer.customInput && answer.values.length === 0 ? [answer.customInput] : answer.values;
2852
- await engine.processAnswer(
2853
- session.id,
2854
- questionDisplay.question.id,
2855
- values,
2856
- answer.customInput
2857
- );
2858
- questionDisplay = await engine.getNextQuestion(session.id);
2859
- }
2860
- console.log("");
2861
- console.log(a.green(" Generating specification..."));
2862
- const specGenerator = createSpecGenerator(lang);
2863
- const spec = await specGenerator.generateSpec(session);
2864
- await specGenerator.writeSpecToFile(spec, session.specFile);
2865
- displayCompletionSummary(session, session.specFile);
2866
- const { unlink } = await import('node:fs/promises');
2867
- await unlink(targetSessionFile).catch(() => {
2868
- });
2869
- } catch (error) {
2870
- if (!handleExitPromptError(error)) {
2871
- handleGeneralError(error);
2872
- }
2873
- }
2874
- }
2875
- async function quickInterview(specFile, options = {}) {
2876
- await interview({
2877
- ...options,
2878
- template: "quick",
2879
- depth: "quick",
2880
- specFile: specFile || options.specFile || "SPEC.md"
2881
- });
2882
- }
2883
- async function deepInterview(specFile, options = {}) {
2884
- await interview({
2885
- ...options,
2886
- template: "saas",
2887
- depth: "deep",
2888
- specFile: specFile || options.specFile || "SPEC.md"
2889
- });
2890
- }
2891
- async function listInterviewSessions() {
2892
- const { readdir, stat } = await import('node:fs/promises');
2893
- const { homedir } = await import('node:os');
2894
- console.log("");
2895
- console.log(a.green.bold(" Saved Interview Sessions:"));
2896
- console.log("");
2897
- const searchDirs = [
2898
- process__default.cwd(),
2899
- join(homedir(), ".ccjk", "sessions")
2900
- ];
2901
- let foundAny = false;
2902
- for (const dir of searchDirs) {
2903
- try {
2904
- const files = await readdir(dir);
2905
- const sessionFiles = files.filter((f) => f.endsWith(".session.json"));
2906
- for (const file of sessionFiles) {
2907
- const filePath = join(dir, file);
2908
- const fileStats = await stat(filePath);
2909
- const modified = fileStats.mtime.toLocaleString();
2910
- console.log(` ${a.green("\u2022")} ${a.white(file)}`);
2911
- console.log(` ${a.gray("Path:")} ${filePath}`);
2912
- console.log(` ${a.gray("Modified:")} ${modified}`);
2913
- console.log("");
2914
- foundAny = true;
2915
- }
2916
- } catch {
2917
- }
2918
- }
2919
- if (!foundAny) {
2920
- console.log(a.gray(" No saved sessions found."));
2921
- console.log("");
2922
- console.log(a.gray(" Start a new interview with: ccjk interview"));
2923
- }
2924
- console.log("");
2925
- }
2926
-
2927
- export { deepInterview, interview, listInterviewSessions, quickInterview, resumeInterview };