faf-cli 5.2.0 → 6.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 (731) hide show
  1. package/README.md +80 -52
  2. package/dist/cli.js +313 -1884
  3. package/dist/index.js +4 -46
  4. package/package.json +27 -103
  5. package/project.faf +33 -141
  6. package/assets/project-faf-screenshot.png +0 -0
  7. package/dist/big-orange/bigo-push.d.ts +0 -18
  8. package/dist/big-orange/bigo-push.d.ts.map +0 -1
  9. package/dist/big-orange/bigo-push.js +0 -88
  10. package/dist/big-orange/bigo-push.js.map +0 -1
  11. package/dist/big-orange/compare.d.ts +0 -11
  12. package/dist/big-orange/compare.d.ts.map +0 -1
  13. package/dist/big-orange/compare.js +0 -179
  14. package/dist/big-orange/compare.js.map +0 -1
  15. package/dist/big-orange/faf-generator.d.ts +0 -22
  16. package/dist/big-orange/faf-generator.d.ts.map +0 -1
  17. package/dist/big-orange/faf-generator.js +0 -215
  18. package/dist/big-orange/faf-generator.js.map +0 -1
  19. package/dist/big-orange/index.d.ts +0 -7
  20. package/dist/big-orange/index.d.ts.map +0 -1
  21. package/dist/big-orange/index.js +0 -96
  22. package/dist/big-orange/index.js.map +0 -1
  23. package/dist/big-orange/types.d.ts +0 -62
  24. package/dist/big-orange/types.d.ts.map +0 -1
  25. package/dist/big-orange/types.js +0 -7
  26. package/dist/big-orange/types.js.map +0 -1
  27. package/dist/cli.d.ts +0 -8
  28. package/dist/cli.d.ts.map +0 -1
  29. package/dist/cli.js.map +0 -1
  30. package/dist/commands/agents.d.ts +0 -14
  31. package/dist/commands/agents.d.ts.map +0 -1
  32. package/dist/commands/agents.js +0 -353
  33. package/dist/commands/agents.js.map +0 -1
  34. package/dist/commands/ai-analyze.d.ts +0 -18
  35. package/dist/commands/ai-analyze.d.ts.map +0 -1
  36. package/dist/commands/ai-analyze.js +0 -190
  37. package/dist/commands/ai-analyze.js.map +0 -1
  38. package/dist/commands/ai-enhance.d.ts +0 -17
  39. package/dist/commands/ai-enhance.d.ts.map +0 -1
  40. package/dist/commands/ai-enhance.js +0 -275
  41. package/dist/commands/ai-enhance.js.map +0 -1
  42. package/dist/commands/antigravity.d.ts +0 -16
  43. package/dist/commands/antigravity.d.ts.map +0 -1
  44. package/dist/commands/antigravity.js +0 -398
  45. package/dist/commands/antigravity.js.map +0 -1
  46. package/dist/commands/audit.d.ts +0 -11
  47. package/dist/commands/audit.d.ts.map +0 -1
  48. package/dist/commands/audit.js +0 -148
  49. package/dist/commands/audit.js.map +0 -1
  50. package/dist/commands/auto.d.ts +0 -27
  51. package/dist/commands/auto.d.ts.map +0 -1
  52. package/dist/commands/auto.js +0 -498
  53. package/dist/commands/auto.js.map +0 -1
  54. package/dist/commands/bi-sync.d.ts +0 -50
  55. package/dist/commands/bi-sync.d.ts.map +0 -1
  56. package/dist/commands/bi-sync.js +0 -307
  57. package/dist/commands/bi-sync.js.map +0 -1
  58. package/dist/commands/chat.d.ts +0 -7
  59. package/dist/commands/chat.d.ts.map +0 -1
  60. package/dist/commands/chat.js +0 -415
  61. package/dist/commands/chat.js.map +0 -1
  62. package/dist/commands/check.d.ts +0 -31
  63. package/dist/commands/check.d.ts.map +0 -1
  64. package/dist/commands/check.js +0 -301
  65. package/dist/commands/check.js.map +0 -1
  66. package/dist/commands/clear.d.ts +0 -15
  67. package/dist/commands/clear.d.ts.map +0 -1
  68. package/dist/commands/clear.js +0 -167
  69. package/dist/commands/clear.js.map +0 -1
  70. package/dist/commands/compile.d.ts +0 -12
  71. package/dist/commands/compile.d.ts.map +0 -1
  72. package/dist/commands/compile.js +0 -51
  73. package/dist/commands/compile.js.map +0 -1
  74. package/dist/commands/conductor.d.ts +0 -15
  75. package/dist/commands/conductor.d.ts.map +0 -1
  76. package/dist/commands/conductor.js +0 -339
  77. package/dist/commands/conductor.js.map +0 -1
  78. package/dist/commands/convert.d.ts +0 -19
  79. package/dist/commands/convert.d.ts.map +0 -1
  80. package/dist/commands/convert.js +0 -99
  81. package/dist/commands/convert.js.map +0 -1
  82. package/dist/commands/credit.d.ts +0 -13
  83. package/dist/commands/credit.d.ts.map +0 -1
  84. package/dist/commands/credit.js +0 -149
  85. package/dist/commands/credit.js.map +0 -1
  86. package/dist/commands/cursor.d.ts +0 -13
  87. package/dist/commands/cursor.d.ts.map +0 -1
  88. package/dist/commands/cursor.js +0 -310
  89. package/dist/commands/cursor.js.map +0 -1
  90. package/dist/commands/decompile.d.ts +0 -9
  91. package/dist/commands/decompile.d.ts.map +0 -1
  92. package/dist/commands/decompile.js +0 -21
  93. package/dist/commands/decompile.js.map +0 -1
  94. package/dist/commands/demo.d.ts +0 -20
  95. package/dist/commands/demo.d.ts.map +0 -1
  96. package/dist/commands/demo.js +0 -205
  97. package/dist/commands/demo.js.map +0 -1
  98. package/dist/commands/doctor.d.ts +0 -6
  99. package/dist/commands/doctor.d.ts.map +0 -1
  100. package/dist/commands/doctor.js +0 -230
  101. package/dist/commands/doctor.js.map +0 -1
  102. package/dist/commands/drift.d.ts +0 -16
  103. package/dist/commands/drift.d.ts.map +0 -1
  104. package/dist/commands/drift.js +0 -524
  105. package/dist/commands/drift.js.map +0 -1
  106. package/dist/commands/edit-helper.d.ts +0 -6
  107. package/dist/commands/edit-helper.d.ts.map +0 -1
  108. package/dist/commands/edit-helper.js +0 -52
  109. package/dist/commands/edit-helper.js.map +0 -1
  110. package/dist/commands/edit.d.ts +0 -14
  111. package/dist/commands/edit.d.ts.map +0 -1
  112. package/dist/commands/edit.js +0 -196
  113. package/dist/commands/edit.js.map +0 -1
  114. package/dist/commands/enhance-real.d.ts +0 -18
  115. package/dist/commands/enhance-real.d.ts.map +0 -1
  116. package/dist/commands/enhance-real.js +0 -1164
  117. package/dist/commands/enhance-real.js.map +0 -1
  118. package/dist/commands/faf-auth.d.ts +0 -10
  119. package/dist/commands/faf-auth.d.ts.map +0 -1
  120. package/dist/commands/faf-auth.js +0 -162
  121. package/dist/commands/faf-auth.js.map +0 -1
  122. package/dist/commands/faf-dna.d.ts +0 -9
  123. package/dist/commands/faf-dna.d.ts.map +0 -1
  124. package/dist/commands/faf-dna.js +0 -141
  125. package/dist/commands/faf-dna.js.map +0 -1
  126. package/dist/commands/faf-log.d.ts +0 -9
  127. package/dist/commands/faf-log.d.ts.map +0 -1
  128. package/dist/commands/faf-log.js +0 -135
  129. package/dist/commands/faf-log.js.map +0 -1
  130. package/dist/commands/faf-recover.d.ts +0 -3
  131. package/dist/commands/faf-recover.d.ts.map +0 -1
  132. package/dist/commands/faf-recover.js +0 -296
  133. package/dist/commands/faf-recover.js.map +0 -1
  134. package/dist/commands/faf-update.d.ts +0 -9
  135. package/dist/commands/faf-update.d.ts.map +0 -1
  136. package/dist/commands/faf-update.js +0 -68
  137. package/dist/commands/faf-update.js.map +0 -1
  138. package/dist/commands/fam.d.ts +0 -15
  139. package/dist/commands/fam.d.ts.map +0 -1
  140. package/dist/commands/fam.js +0 -339
  141. package/dist/commands/fam.js.map +0 -1
  142. package/dist/commands/faq.d.ts +0 -12
  143. package/dist/commands/faq.d.ts.map +0 -1
  144. package/dist/commands/faq.js +0 -84
  145. package/dist/commands/faq.js.map +0 -1
  146. package/dist/commands/formats.d.ts +0 -12
  147. package/dist/commands/formats.d.ts.map +0 -1
  148. package/dist/commands/formats.js +0 -107
  149. package/dist/commands/formats.js.map +0 -1
  150. package/dist/commands/gemini.d.ts +0 -15
  151. package/dist/commands/gemini.d.ts.map +0 -1
  152. package/dist/commands/gemini.js +0 -357
  153. package/dist/commands/gemini.js.map +0 -1
  154. package/dist/commands/git.d.ts +0 -25
  155. package/dist/commands/git.d.ts.map +0 -1
  156. package/dist/commands/git.js +0 -365
  157. package/dist/commands/git.js.map +0 -1
  158. package/dist/commands/go.d.ts +0 -23
  159. package/dist/commands/go.d.ts.map +0 -1
  160. package/dist/commands/go.js +0 -283
  161. package/dist/commands/go.js.map +0 -1
  162. package/dist/commands/human.d.ts +0 -19
  163. package/dist/commands/human.d.ts.map +0 -1
  164. package/dist/commands/human.js +0 -204
  165. package/dist/commands/human.js.map +0 -1
  166. package/dist/commands/index.d.ts +0 -26
  167. package/dist/commands/index.d.ts.map +0 -1
  168. package/dist/commands/index.js +0 -438
  169. package/dist/commands/index.js.map +0 -1
  170. package/dist/commands/init.d.ts +0 -19
  171. package/dist/commands/init.d.ts.map +0 -1
  172. package/dist/commands/init.js +0 -409
  173. package/dist/commands/init.js.map +0 -1
  174. package/dist/commands/lint.d.ts +0 -11
  175. package/dist/commands/lint.d.ts.map +0 -1
  176. package/dist/commands/lint.js +0 -233
  177. package/dist/commands/lint.js.map +0 -1
  178. package/dist/commands/memory.d.ts +0 -14
  179. package/dist/commands/memory.d.ts.map +0 -1
  180. package/dist/commands/memory.js +0 -293
  181. package/dist/commands/memory.js.map +0 -1
  182. package/dist/commands/migrate.d.ts +0 -11
  183. package/dist/commands/migrate.d.ts.map +0 -1
  184. package/dist/commands/migrate.js +0 -85
  185. package/dist/commands/migrate.js.map +0 -1
  186. package/dist/commands/notifications.d.ts +0 -12
  187. package/dist/commands/notifications.d.ts.map +0 -1
  188. package/dist/commands/notifications.js +0 -35
  189. package/dist/commands/notifications.js.map +0 -1
  190. package/dist/commands/plugin-install.d.ts +0 -20
  191. package/dist/commands/plugin-install.d.ts.map +0 -1
  192. package/dist/commands/plugin-install.js +0 -183
  193. package/dist/commands/plugin-install.js.map +0 -1
  194. package/dist/commands/pro.d.ts +0 -10
  195. package/dist/commands/pro.d.ts.map +0 -1
  196. package/dist/commands/pro.js +0 -113
  197. package/dist/commands/pro.js.map +0 -1
  198. package/dist/commands/quick.d.ts +0 -10
  199. package/dist/commands/quick.d.ts.map +0 -1
  200. package/dist/commands/quick.js +0 -207
  201. package/dist/commands/quick.js.map +0 -1
  202. package/dist/commands/ram.d.ts +0 -17
  203. package/dist/commands/ram.d.ts.map +0 -1
  204. package/dist/commands/ram.js +0 -322
  205. package/dist/commands/ram.js.map +0 -1
  206. package/dist/commands/readme.d.ts +0 -21
  207. package/dist/commands/readme.d.ts.map +0 -1
  208. package/dist/commands/readme.js +0 -519
  209. package/dist/commands/readme.js.map +0 -1
  210. package/dist/commands/rename.d.ts +0 -18
  211. package/dist/commands/rename.d.ts.map +0 -1
  212. package/dist/commands/rename.js +0 -212
  213. package/dist/commands/rename.js.map +0 -1
  214. package/dist/commands/score-v3.d.ts +0 -15
  215. package/dist/commands/score-v3.d.ts.map +0 -1
  216. package/dist/commands/score-v3.js +0 -224
  217. package/dist/commands/score-v3.js.map +0 -1
  218. package/dist/commands/score.d.ts +0 -16
  219. package/dist/commands/score.d.ts.map +0 -1
  220. package/dist/commands/score.js +0 -19
  221. package/dist/commands/score.js.map +0 -1
  222. package/dist/commands/search.d.ts +0 -16
  223. package/dist/commands/search.d.ts.map +0 -1
  224. package/dist/commands/search.js +0 -174
  225. package/dist/commands/search.js.map +0 -1
  226. package/dist/commands/share.d.ts +0 -17
  227. package/dist/commands/share.d.ts.map +0 -1
  228. package/dist/commands/share.js +0 -261
  229. package/dist/commands/share.js.map +0 -1
  230. package/dist/commands/show.d.ts +0 -10
  231. package/dist/commands/show.d.ts.map +0 -1
  232. package/dist/commands/show.js +0 -142
  233. package/dist/commands/show.js.map +0 -1
  234. package/dist/commands/sixws.d.ts +0 -6
  235. package/dist/commands/sixws.d.ts.map +0 -1
  236. package/dist/commands/sixws.js +0 -154
  237. package/dist/commands/sixws.js.map +0 -1
  238. package/dist/commands/skills.d.ts +0 -8
  239. package/dist/commands/skills.d.ts.map +0 -1
  240. package/dist/commands/skills.js +0 -43
  241. package/dist/commands/skills.js.map +0 -1
  242. package/dist/commands/stacks.d.ts +0 -51
  243. package/dist/commands/stacks.d.ts.map +0 -1
  244. package/dist/commands/stacks.js +0 -180
  245. package/dist/commands/stacks.js.map +0 -1
  246. package/dist/commands/status.d.ts +0 -14
  247. package/dist/commands/status.d.ts.map +0 -1
  248. package/dist/commands/status.js +0 -210
  249. package/dist/commands/status.js.map +0 -1
  250. package/dist/commands/sync.d.ts +0 -11
  251. package/dist/commands/sync.d.ts.map +0 -1
  252. package/dist/commands/sync.js +0 -543
  253. package/dist/commands/sync.js.map +0 -1
  254. package/dist/commands/taf-init.d.ts +0 -14
  255. package/dist/commands/taf-init.d.ts.map +0 -1
  256. package/dist/commands/taf-init.js +0 -138
  257. package/dist/commands/taf-init.js.map +0 -1
  258. package/dist/commands/taf-log.d.ts +0 -31
  259. package/dist/commands/taf-log.d.ts.map +0 -1
  260. package/dist/commands/taf-log.js +0 -351
  261. package/dist/commands/taf-log.js.map +0 -1
  262. package/dist/commands/taf-stars.d.ts +0 -8
  263. package/dist/commands/taf-stars.d.ts.map +0 -1
  264. package/dist/commands/taf-stars.js +0 -105
  265. package/dist/commands/taf-stars.js.map +0 -1
  266. package/dist/commands/taf-stats.d.ts +0 -8
  267. package/dist/commands/taf-stats.d.ts.map +0 -1
  268. package/dist/commands/taf-stats.js +0 -133
  269. package/dist/commands/taf-stats.js.map +0 -1
  270. package/dist/commands/taf-validate.d.ts +0 -8
  271. package/dist/commands/taf-validate.d.ts.map +0 -1
  272. package/dist/commands/taf-validate.js +0 -108
  273. package/dist/commands/taf-validate.js.map +0 -1
  274. package/dist/commands/taf.d.ts +0 -14
  275. package/dist/commands/taf.d.ts.map +0 -1
  276. package/dist/commands/taf.js +0 -106
  277. package/dist/commands/taf.js.map +0 -1
  278. package/dist/commands/todo.d.ts +0 -14
  279. package/dist/commands/todo.d.ts.map +0 -1
  280. package/dist/commands/todo.js +0 -282
  281. package/dist/commands/todo.js.map +0 -1
  282. package/dist/commands/trust.d.ts +0 -33
  283. package/dist/commands/trust.d.ts.map +0 -1
  284. package/dist/commands/trust.js +0 -308
  285. package/dist/commands/trust.js.map +0 -1
  286. package/dist/commands/tsa.d.ts +0 -9
  287. package/dist/commands/tsa.d.ts.map +0 -1
  288. package/dist/commands/tsa.js +0 -60
  289. package/dist/commands/tsa.js.map +0 -1
  290. package/dist/commands/validate.d.ts +0 -11
  291. package/dist/commands/validate.d.ts.map +0 -1
  292. package/dist/commands/validate.js +0 -64
  293. package/dist/commands/validate.js.map +0 -1
  294. package/dist/commands/verify.d.ts +0 -36
  295. package/dist/commands/verify.d.ts.map +0 -1
  296. package/dist/commands/verify.js +0 -194
  297. package/dist/commands/verify.js.map +0 -1
  298. package/dist/commands/version.d.ts +0 -5
  299. package/dist/commands/version.d.ts.map +0 -1
  300. package/dist/commands/version.js +0 -29
  301. package/dist/commands/version.js.map +0 -1
  302. package/dist/commands/vibe.d.ts +0 -7
  303. package/dist/commands/vibe.d.ts.map +0 -1
  304. package/dist/commands/vibe.js +0 -73
  305. package/dist/commands/vibe.js.map +0 -1
  306. package/dist/commands/welcome.d.ts +0 -10
  307. package/dist/commands/welcome.d.ts.map +0 -1
  308. package/dist/commands/welcome.js +0 -117
  309. package/dist/commands/welcome.js.map +0 -1
  310. package/dist/commands/yolo.d.ts +0 -12
  311. package/dist/commands/yolo.d.ts.map +0 -1
  312. package/dist/commands/yolo.js +0 -212
  313. package/dist/commands/yolo.js.map +0 -1
  314. package/dist/compiler/faf-compiler.d.ts +0 -176
  315. package/dist/compiler/faf-compiler.d.ts.map +0 -1
  316. package/dist/compiler/faf-compiler.js +0 -1587
  317. package/dist/compiler/faf-compiler.js.map +0 -1
  318. package/dist/converters/faf-converters.d.ts +0 -43
  319. package/dist/converters/faf-converters.d.ts.map +0 -1
  320. package/dist/converters/faf-converters.js +0 -197
  321. package/dist/converters/faf-converters.js.map +0 -1
  322. package/dist/core-extraction-fixes.d.ts +0 -92
  323. package/dist/core-extraction-fixes.d.ts.map +0 -1
  324. package/dist/core-extraction-fixes.js +0 -265
  325. package/dist/core-extraction-fixes.js.map +0 -1
  326. package/dist/engines/art-ansi-renderer.d.ts +0 -335
  327. package/dist/engines/art-ansi-renderer.d.ts.map +0 -1
  328. package/dist/engines/art-ansi-renderer.js +0 -290
  329. package/dist/engines/art-ansi-renderer.js.map +0 -1
  330. package/dist/engines/c-mirror/broadcast/terminal-display.d.ts +0 -23
  331. package/dist/engines/c-mirror/broadcast/terminal-display.d.ts.map +0 -1
  332. package/dist/engines/c-mirror/broadcast/terminal-display.js +0 -194
  333. package/dist/engines/c-mirror/broadcast/terminal-display.js.map +0 -1
  334. package/dist/engines/c-mirror/core/claude-to-faf.d.ts +0 -28
  335. package/dist/engines/c-mirror/core/claude-to-faf.d.ts.map +0 -1
  336. package/dist/engines/c-mirror/core/claude-to-faf.js +0 -195
  337. package/dist/engines/c-mirror/core/claude-to-faf.js.map +0 -1
  338. package/dist/engines/c-mirror/core/events/event-emitter.d.ts +0 -36
  339. package/dist/engines/c-mirror/core/events/event-emitter.d.ts.map +0 -1
  340. package/dist/engines/c-mirror/core/events/event-emitter.js +0 -77
  341. package/dist/engines/c-mirror/core/events/event-emitter.js.map +0 -1
  342. package/dist/engines/c-mirror/core/events/mirror-events.d.ts +0 -103
  343. package/dist/engines/c-mirror/core/events/mirror-events.d.ts.map +0 -1
  344. package/dist/engines/c-mirror/core/events/mirror-events.js +0 -65
  345. package/dist/engines/c-mirror/core/events/mirror-events.js.map +0 -1
  346. package/dist/engines/c-mirror/core/faf-to-claude.d.ts +0 -18
  347. package/dist/engines/c-mirror/core/faf-to-claude.d.ts.map +0 -1
  348. package/dist/engines/c-mirror/core/faf-to-claude.js +0 -162
  349. package/dist/engines/c-mirror/core/faf-to-claude.js.map +0 -1
  350. package/dist/engines/c-mirror/core/interfaces.d.ts +0 -153
  351. package/dist/engines/c-mirror/core/interfaces.d.ts.map +0 -1
  352. package/dist/engines/c-mirror/core/interfaces.js +0 -8
  353. package/dist/engines/c-mirror/core/interfaces.js.map +0 -1
  354. package/dist/engines/c-mirror/core/mirror-engine.d.ts +0 -49
  355. package/dist/engines/c-mirror/core/mirror-engine.d.ts.map +0 -1
  356. package/dist/engines/c-mirror/core/mirror-engine.js +0 -315
  357. package/dist/engines/c-mirror/core/mirror-engine.js.map +0 -1
  358. package/dist/engines/c-mirror/faf-extensions/faf-mirror.d.ts +0 -33
  359. package/dist/engines/c-mirror/faf-extensions/faf-mirror.d.ts.map +0 -1
  360. package/dist/engines/c-mirror/faf-extensions/faf-mirror.js +0 -115
  361. package/dist/engines/c-mirror/faf-extensions/faf-mirror.js.map +0 -1
  362. package/dist/engines/c-mirror/strategies/atomic-write.d.ts +0 -34
  363. package/dist/engines/c-mirror/strategies/atomic-write.d.ts.map +0 -1
  364. package/dist/engines/c-mirror/strategies/atomic-write.js +0 -132
  365. package/dist/engines/c-mirror/strategies/atomic-write.js.map +0 -1
  366. package/dist/engines/claude-todo-engine.d.ts +0 -115
  367. package/dist/engines/claude-todo-engine.d.ts.map +0 -1
  368. package/dist/engines/claude-todo-engine.js +0 -346
  369. package/dist/engines/claude-todo-engine.js.map +0 -1
  370. package/dist/engines/dependency-tsa.d.ts +0 -89
  371. package/dist/engines/dependency-tsa.d.ts.map +0 -1
  372. package/dist/engines/dependency-tsa.js +0 -365
  373. package/dist/engines/dependency-tsa.js.map +0 -1
  374. package/dist/engines/drop-coach.d.ts +0 -64
  375. package/dist/engines/drop-coach.d.ts.map +0 -1
  376. package/dist/engines/drop-coach.js +0 -222
  377. package/dist/engines/drop-coach.js.map +0 -1
  378. package/dist/engines/execution-context.d.ts +0 -75
  379. package/dist/engines/execution-context.d.ts.map +0 -1
  380. package/dist/engines/execution-context.js +0 -308
  381. package/dist/engines/execution-context.js.map +0 -1
  382. package/dist/engines/fab-formats-processor.d.ts +0 -179
  383. package/dist/engines/fab-formats-processor.d.ts.map +0 -1
  384. package/dist/engines/fab-formats-processor.js +0 -1524
  385. package/dist/engines/fab-formats-processor.js.map +0 -1
  386. package/dist/engines/faf-dna.d.ts +0 -160
  387. package/dist/engines/faf-dna.d.ts.map +0 -1
  388. package/dist/engines/faf-dna.js +0 -547
  389. package/dist/engines/faf-dna.js.map +0 -1
  390. package/dist/engines/relentless-context-extractor.d.ts +0 -105
  391. package/dist/engines/relentless-context-extractor.d.ts.map +0 -1
  392. package/dist/engines/relentless-context-extractor.js +0 -698
  393. package/dist/engines/relentless-context-extractor.js.map +0 -1
  394. package/dist/engines/v252-hybrid-engine.d.ts +0 -60
  395. package/dist/engines/v252-hybrid-engine.d.ts.map +0 -1
  396. package/dist/engines/v252-hybrid-engine.js +0 -290
  397. package/dist/engines/v252-hybrid-engine.js.map +0 -1
  398. package/dist/family/detectors/n8n.d.ts +0 -10
  399. package/dist/family/detectors/n8n.d.ts.map +0 -1
  400. package/dist/family/detectors/n8n.js +0 -102
  401. package/dist/family/detectors/n8n.js.map +0 -1
  402. package/dist/family/detectors/next.d.ts +0 -8
  403. package/dist/family/detectors/next.d.ts.map +0 -1
  404. package/dist/family/detectors/next.js +0 -106
  405. package/dist/family/detectors/next.js.map +0 -1
  406. package/dist/family/detectors/react.d.ts +0 -8
  407. package/dist/family/detectors/react.d.ts.map +0 -1
  408. package/dist/family/detectors/react.js +0 -85
  409. package/dist/family/detectors/react.js.map +0 -1
  410. package/dist/family/detectors/svelte.d.ts +0 -8
  411. package/dist/family/detectors/svelte.d.ts.map +0 -1
  412. package/dist/family/detectors/svelte.js +0 -102
  413. package/dist/family/detectors/svelte.js.map +0 -1
  414. package/dist/family/detectors/typescript.d.ts +0 -8
  415. package/dist/family/detectors/typescript.d.ts.map +0 -1
  416. package/dist/family/detectors/typescript.js +0 -112
  417. package/dist/family/detectors/typescript.js.map +0 -1
  418. package/dist/family/detectors/vite.d.ts +0 -8
  419. package/dist/family/detectors/vite.d.ts.map +0 -1
  420. package/dist/family/detectors/vite.js +0 -97
  421. package/dist/family/detectors/vite.js.map +0 -1
  422. package/dist/family/index.d.ts +0 -21
  423. package/dist/family/index.d.ts.map +0 -1
  424. package/dist/family/index.js +0 -73
  425. package/dist/family/index.js.map +0 -1
  426. package/dist/family/registry.d.ts +0 -57
  427. package/dist/family/registry.d.ts.map +0 -1
  428. package/dist/family/registry.js +0 -156
  429. package/dist/family/registry.js.map +0 -1
  430. package/dist/family/types.d.ts +0 -102
  431. package/dist/family/types.d.ts.map +0 -1
  432. package/dist/family/types.js +0 -8
  433. package/dist/family/types.js.map +0 -1
  434. package/dist/fix-once/colors.d.ts +0 -105
  435. package/dist/fix-once/colors.d.ts.map +0 -1
  436. package/dist/fix-once/colors.js +0 -248
  437. package/dist/fix-once/colors.js.map +0 -1
  438. package/dist/fix-once/commander.d.ts +0 -18
  439. package/dist/fix-once/commander.d.ts.map +0 -1
  440. package/dist/fix-once/commander.js +0 -25
  441. package/dist/fix-once/commander.js.map +0 -1
  442. package/dist/fix-once/types.d.ts +0 -258
  443. package/dist/fix-once/types.d.ts.map +0 -1
  444. package/dist/fix-once/types.js +0 -26
  445. package/dist/fix-once/types.js.map +0 -1
  446. package/dist/fix-once/yaml.d.ts +0 -58
  447. package/dist/fix-once/yaml.d.ts.map +0 -1
  448. package/dist/fix-once/yaml.js +0 -172
  449. package/dist/fix-once/yaml.js.map +0 -1
  450. package/dist/framework-detector.d.ts +0 -307
  451. package/dist/framework-detector.d.ts.map +0 -1
  452. package/dist/framework-detector.js +0 -951
  453. package/dist/framework-detector.js.map +0 -1
  454. package/dist/generators/faf-generator-championship.d.ts +0 -17
  455. package/dist/generators/faf-generator-championship.d.ts.map +0 -1
  456. package/dist/generators/faf-generator-championship.js +0 -612
  457. package/dist/generators/faf-generator-championship.js.map +0 -1
  458. package/dist/github/current-score-calculator.d.ts +0 -15
  459. package/dist/github/current-score-calculator.d.ts.map +0 -1
  460. package/dist/github/current-score-calculator.js +0 -125
  461. package/dist/github/current-score-calculator.js.map +0 -1
  462. package/dist/github/faf-git-generator.d.ts +0 -52
  463. package/dist/github/faf-git-generator.d.ts.map +0 -1
  464. package/dist/github/faf-git-generator.js +0 -527
  465. package/dist/github/faf-git-generator.js.map +0 -1
  466. package/dist/github/github-extractor.d.ts +0 -60
  467. package/dist/github/github-extractor.d.ts.map +0 -1
  468. package/dist/github/github-extractor.js +0 -381
  469. package/dist/github/github-extractor.js.map +0 -1
  470. package/dist/github/popular-repos.d.ts +0 -43
  471. package/dist/github/popular-repos.d.ts.map +0 -1
  472. package/dist/github/popular-repos.js +0 -205
  473. package/dist/github/popular-repos.js.map +0 -1
  474. package/dist/github/repo-selector.d.ts +0 -48
  475. package/dist/github/repo-selector.d.ts.map +0 -1
  476. package/dist/github/repo-selector.js +0 -297
  477. package/dist/github/repo-selector.js.map +0 -1
  478. package/dist/index.d.ts +0 -20
  479. package/dist/index.d.ts.map +0 -1
  480. package/dist/index.js.map +0 -1
  481. package/dist/licensing/license-messages.d.ts +0 -20
  482. package/dist/licensing/license-messages.d.ts.map +0 -1
  483. package/dist/licensing/license-messages.js +0 -77
  484. package/dist/licensing/license-messages.js.map +0 -1
  485. package/dist/licensing/pro-gate.d.ts +0 -54
  486. package/dist/licensing/pro-gate.d.ts.map +0 -1
  487. package/dist/licensing/pro-gate.js +0 -243
  488. package/dist/licensing/pro-gate.js.map +0 -1
  489. package/dist/output/experience-manager.d.ts +0 -58
  490. package/dist/output/experience-manager.d.ts.map +0 -1
  491. package/dist/output/experience-manager.js +0 -215
  492. package/dist/output/experience-manager.js.map +0 -1
  493. package/dist/schema/faf-schema.d.ts +0 -97
  494. package/dist/schema/faf-schema.d.ts.map +0 -1
  495. package/dist/schema/faf-schema.js +0 -173
  496. package/dist/schema/faf-schema.js.map +0 -1
  497. package/dist/smart-faf.d.ts +0 -68
  498. package/dist/smart-faf.d.ts.map +0 -1
  499. package/dist/smart-faf.js +0 -400
  500. package/dist/smart-faf.js.map +0 -1
  501. package/dist/systems/question-system.d.ts +0 -122
  502. package/dist/systems/question-system.d.ts.map +0 -1
  503. package/dist/systems/question-system.js +0 -413
  504. package/dist/systems/question-system.js.map +0 -1
  505. package/dist/taf/index.d.ts +0 -21
  506. package/dist/taf/index.d.ts.map +0 -1
  507. package/dist/taf/index.js +0 -72
  508. package/dist/taf/index.js.map +0 -1
  509. package/dist/taf/logger.d.ts +0 -88
  510. package/dist/taf/logger.d.ts.map +0 -1
  511. package/dist/taf/logger.js +0 -137
  512. package/dist/taf/logger.js.map +0 -1
  513. package/dist/taf/parser.d.ts +0 -32
  514. package/dist/taf/parser.d.ts.map +0 -1
  515. package/dist/taf/parser.js +0 -161
  516. package/dist/taf/parser.js.map +0 -1
  517. package/dist/taf/star-badge.d.ts +0 -32
  518. package/dist/taf/star-badge.d.ts.map +0 -1
  519. package/dist/taf/star-badge.js +0 -158
  520. package/dist/taf/star-badge.js.map +0 -1
  521. package/dist/taf/star-rating.d.ts +0 -30
  522. package/dist/taf/star-rating.d.ts.map +0 -1
  523. package/dist/taf/star-rating.js +0 -79
  524. package/dist/taf/star-rating.js.map +0 -1
  525. package/dist/taf/stats.d.ts +0 -31
  526. package/dist/taf/stats.d.ts.map +0 -1
  527. package/dist/taf/stats.js +0 -190
  528. package/dist/taf/stats.js.map +0 -1
  529. package/dist/taf/test-output-parser.d.ts +0 -42
  530. package/dist/taf/test-output-parser.d.ts.map +0 -1
  531. package/dist/taf/test-output-parser.js +0 -127
  532. package/dist/taf/test-output-parser.js.map +0 -1
  533. package/dist/taf/types.d.ts +0 -77
  534. package/dist/taf/types.d.ts.map +0 -1
  535. package/dist/taf/types.js +0 -9
  536. package/dist/taf/types.js.map +0 -1
  537. package/dist/taf/validator.d.ts +0 -18
  538. package/dist/taf/validator.d.ts.map +0 -1
  539. package/dist/taf/validator.js +0 -148
  540. package/dist/taf/validator.js.map +0 -1
  541. package/dist/telemetry/analytics.d.ts +0 -74
  542. package/dist/telemetry/analytics.d.ts.map +0 -1
  543. package/dist/telemetry/analytics.js +0 -370
  544. package/dist/telemetry/analytics.js.map +0 -1
  545. package/dist/tests/test-chrome-fuzzy.d.ts +0 -5
  546. package/dist/tests/test-chrome-fuzzy.d.ts.map +0 -1
  547. package/dist/tests/test-chrome-fuzzy.js +0 -68
  548. package/dist/tests/test-chrome-fuzzy.js.map +0 -1
  549. package/dist/types/faf-types.d.ts +0 -144
  550. package/dist/types/faf-types.d.ts.map +0 -1
  551. package/dist/types/faf-types.js +0 -21
  552. package/dist/types/faf-types.js.map +0 -1
  553. package/dist/types/index.d.ts +0 -36
  554. package/dist/types/index.d.ts.map +0 -1
  555. package/dist/types/index.js +0 -7
  556. package/dist/types/index.js.map +0 -1
  557. package/dist/utils/agents-parser.d.ts +0 -60
  558. package/dist/utils/agents-parser.d.ts.map +0 -1
  559. package/dist/utils/agents-parser.js +0 -339
  560. package/dist/utils/agents-parser.js.map +0 -1
  561. package/dist/utils/announcements.d.ts +0 -16
  562. package/dist/utils/announcements.d.ts.map +0 -1
  563. package/dist/utils/announcements.js +0 -131
  564. package/dist/utils/announcements.js.map +0 -1
  565. package/dist/utils/balance-visualizer.d.ts +0 -38
  566. package/dist/utils/balance-visualizer.d.ts.map +0 -1
  567. package/dist/utils/balance-visualizer.js +0 -190
  568. package/dist/utils/balance-visualizer.js.map +0 -1
  569. package/dist/utils/championship-core.d.ts +0 -127
  570. package/dist/utils/championship-core.d.ts.map +0 -1
  571. package/dist/utils/championship-core.js +0 -212
  572. package/dist/utils/championship-core.js.map +0 -1
  573. package/dist/utils/championship-style.d.ts +0 -110
  574. package/dist/utils/championship-style.d.ts.map +0 -1
  575. package/dist/utils/championship-style.js +0 -219
  576. package/dist/utils/championship-style.js.map +0 -1
  577. package/dist/utils/chrome-extension-confirmer.d.ts +0 -41
  578. package/dist/utils/chrome-extension-confirmer.d.ts.map +0 -1
  579. package/dist/utils/chrome-extension-confirmer.js +0 -203
  580. package/dist/utils/chrome-extension-confirmer.js.map +0 -1
  581. package/dist/utils/chrome-extension-detector.d.ts +0 -74
  582. package/dist/utils/chrome-extension-detector.d.ts.map +0 -1
  583. package/dist/utils/chrome-extension-detector.js +0 -268
  584. package/dist/utils/chrome-extension-detector.js.map +0 -1
  585. package/dist/utils/color-utils.d.ts +0 -17
  586. package/dist/utils/color-utils.d.ts.map +0 -1
  587. package/dist/utils/color-utils.js +0 -112
  588. package/dist/utils/color-utils.js.map +0 -1
  589. package/dist/utils/conductor-parser.d.ts +0 -86
  590. package/dist/utils/conductor-parser.d.ts.map +0 -1
  591. package/dist/utils/conductor-parser.js +0 -293
  592. package/dist/utils/conductor-parser.js.map +0 -1
  593. package/dist/utils/cursorrules-parser.d.ts +0 -56
  594. package/dist/utils/cursorrules-parser.d.ts.map +0 -1
  595. package/dist/utils/cursorrules-parser.js +0 -327
  596. package/dist/utils/cursorrules-parser.js.map +0 -1
  597. package/dist/utils/email-opt-in.d.ts +0 -31
  598. package/dist/utils/email-opt-in.d.ts.map +0 -1
  599. package/dist/utils/email-opt-in.js +0 -199
  600. package/dist/utils/email-opt-in.js.map +0 -1
  601. package/dist/utils/fab-formats-engine.d.ts +0 -83
  602. package/dist/utils/fab-formats-engine.d.ts.map +0 -1
  603. package/dist/utils/fab-formats-engine.js +0 -502
  604. package/dist/utils/fab-formats-engine.js.map +0 -1
  605. package/dist/utils/fafb-compiler.d.ts +0 -62
  606. package/dist/utils/fafb-compiler.d.ts.map +0 -1
  607. package/dist/utils/fafb-compiler.js +0 -225
  608. package/dist/utils/fafb-compiler.js.map +0 -1
  609. package/dist/utils/fafb-detector.d.ts +0 -26
  610. package/dist/utils/fafb-detector.d.ts.map +0 -1
  611. package/dist/utils/fafb-detector.js +0 -180
  612. package/dist/utils/fafb-detector.js.map +0 -1
  613. package/dist/utils/fafignore-parser.d.ts +0 -21
  614. package/dist/utils/fafignore-parser.d.ts.map +0 -1
  615. package/dist/utils/fafignore-parser.js +0 -178
  616. package/dist/utils/fafignore-parser.js.map +0 -1
  617. package/dist/utils/feedback-messages.d.ts +0 -13
  618. package/dist/utils/feedback-messages.d.ts.map +0 -1
  619. package/dist/utils/feedback-messages.js +0 -118
  620. package/dist/utils/feedback-messages.js.map +0 -1
  621. package/dist/utils/file-utils.d.ts +0 -113
  622. package/dist/utils/file-utils.d.ts.map +0 -1
  623. package/dist/utils/file-utils.js +0 -949
  624. package/dist/utils/file-utils.js.map +0 -1
  625. package/dist/utils/gemini-parser.d.ts +0 -58
  626. package/dist/utils/gemini-parser.d.ts.map +0 -1
  627. package/dist/utils/gemini-parser.js +0 -263
  628. package/dist/utils/gemini-parser.js.map +0 -1
  629. package/dist/utils/markdown-to-context.d.ts +0 -28
  630. package/dist/utils/markdown-to-context.d.ts.map +0 -1
  631. package/dist/utils/markdown-to-context.js +0 -206
  632. package/dist/utils/markdown-to-context.js.map +0 -1
  633. package/dist/utils/memory-parser.d.ts +0 -95
  634. package/dist/utils/memory-parser.d.ts.map +0 -1
  635. package/dist/utils/memory-parser.js +0 -408
  636. package/dist/utils/memory-parser.js.map +0 -1
  637. package/dist/utils/memory-topic-writer.d.ts +0 -52
  638. package/dist/utils/memory-topic-writer.d.ts.map +0 -1
  639. package/dist/utils/memory-topic-writer.js +0 -415
  640. package/dist/utils/memory-topic-writer.js.map +0 -1
  641. package/dist/utils/native-cli-parser.d.ts +0 -152
  642. package/dist/utils/native-cli-parser.d.ts.map +0 -1
  643. package/dist/utils/native-cli-parser.js +0 -466
  644. package/dist/utils/native-cli-parser.js.map +0 -1
  645. package/dist/utils/native-file-finder.d.ts +0 -116
  646. package/dist/utils/native-file-finder.d.ts.map +0 -1
  647. package/dist/utils/native-file-finder.js +0 -211
  648. package/dist/utils/native-file-finder.js.map +0 -1
  649. package/dist/utils/platform-detector.d.ts +0 -31
  650. package/dist/utils/platform-detector.d.ts.map +0 -1
  651. package/dist/utils/platform-detector.js +0 -220
  652. package/dist/utils/platform-detector.js.map +0 -1
  653. package/dist/utils/score-header.d.ts +0 -22
  654. package/dist/utils/score-header.d.ts.map +0 -1
  655. package/dist/utils/score-header.js +0 -88
  656. package/dist/utils/score-header.js.map +0 -1
  657. package/dist/utils/slot-counter.d.ts +0 -56
  658. package/dist/utils/slot-counter.d.ts.map +0 -1
  659. package/dist/utils/slot-counter.js +0 -100
  660. package/dist/utils/slot-counter.js.map +0 -1
  661. package/dist/utils/technical-credit.d.ts +0 -36
  662. package/dist/utils/technical-credit.d.ts.map +0 -1
  663. package/dist/utils/technical-credit.js +0 -286
  664. package/dist/utils/technical-credit.js.map +0 -1
  665. package/dist/utils/trust-cache.d.ts +0 -29
  666. package/dist/utils/trust-cache.d.ts.map +0 -1
  667. package/dist/utils/trust-cache.js +0 -122
  668. package/dist/utils/trust-cache.js.map +0 -1
  669. package/dist/utils/turbo-cat-knowledge.d.ts +0 -105
  670. package/dist/utils/turbo-cat-knowledge.d.ts.map +0 -1
  671. package/dist/utils/turbo-cat-knowledge.js +0 -1941
  672. package/dist/utils/turbo-cat-knowledge.js.map +0 -1
  673. package/dist/utils/turbo-cat-pyramid.d.ts +0 -48
  674. package/dist/utils/turbo-cat-pyramid.d.ts.map +0 -1
  675. package/dist/utils/turbo-cat-pyramid.js +0 -380
  676. package/dist/utils/turbo-cat-pyramid.js.map +0 -1
  677. package/dist/utils/turbo-cat.d.ts +0 -99
  678. package/dist/utils/turbo-cat.d.ts.map +0 -1
  679. package/dist/utils/turbo-cat.js +0 -456
  680. package/dist/utils/turbo-cat.js.map +0 -1
  681. package/dist/utils/universal-fuzzy-detector.d.ts +0 -64
  682. package/dist/utils/universal-fuzzy-detector.d.ts.map +0 -1
  683. package/dist/utils/universal-fuzzy-detector.js +0 -386
  684. package/dist/utils/universal-fuzzy-detector.js.map +0 -1
  685. package/dist/utils/update-checker.d.ts +0 -15
  686. package/dist/utils/update-checker.d.ts.map +0 -1
  687. package/dist/utils/update-checker.js +0 -200
  688. package/dist/utils/update-checker.js.map +0 -1
  689. package/dist/utils/vibe-sync.d.ts +0 -25
  690. package/dist/utils/vibe-sync.d.ts.map +0 -1
  691. package/dist/utils/vibe-sync.js +0 -175
  692. package/dist/utils/vibe-sync.js.map +0 -1
  693. package/dist/utils/yaml-generator.d.ts +0 -52
  694. package/dist/utils/yaml-generator.d.ts.map +0 -1
  695. package/dist/utils/yaml-generator.js +0 -432
  696. package/dist/utils/yaml-generator.js.map +0 -1
  697. package/faf-banner.png +0 -0
  698. package/scripts/ANTHROPIC-DEMO.sh +0 -203
  699. package/scripts/boris-ready.sh +0 -169
  700. package/scripts/bundle-yaml.js +0 -87
  701. package/scripts/check-version.js +0 -88
  702. package/scripts/clean-build.js +0 -34
  703. package/scripts/cleanup-unused.sh +0 -54
  704. package/scripts/debug-django.txt +0 -9
  705. package/scripts/debug-mongo.txt +0 -9
  706. package/scripts/debug-react.txt +0 -9
  707. package/scripts/debug-rust.txt +0 -9
  708. package/scripts/debug-whisper.cpp.txt +0 -9
  709. package/scripts/evaluate-family-member.ts +0 -300
  710. package/scripts/generate-docs.ts +0 -358
  711. package/scripts/generate-drift-reports.sh +0 -111
  712. package/scripts/industry-showcase.json +0 -122
  713. package/scripts/mcp-ecosystem-research.sh +0 -58
  714. package/scripts/migrate-yaml-imports.sh +0 -55
  715. package/scripts/migrate-yaml.ts +0 -132
  716. package/scripts/performance-validation.ts +0 -460
  717. package/scripts/postinstall.js +0 -30
  718. package/scripts/prepare-release.ts +0 -421
  719. package/scripts/run-industry-showcase.ts +0 -237
  720. package/scripts/run-test-showcase.ts +0 -244
  721. package/scripts/setup-github-watch.sh +0 -43
  722. package/scripts/sync-version.js +0 -35
  723. package/scripts/test-integration-detection.ts +0 -93
  724. package/scripts/test-integration-simple.js +0 -93
  725. package/scripts/test-medal-progression.sh +0 -143
  726. package/scripts/test-showcase-results.json +0 -109
  727. package/scripts/test-showcase.json +0 -32
  728. package/scripts/update-version.js +0 -148
  729. package/scripts/verify-build.js +0 -343
  730. package/scripts/version-check.js +0 -78
  731. package/scripts/watch-discussions.sh +0 -86
@@ -1,1524 +0,0 @@
1
- "use strict";
2
- /**
3
- * FAB-FORMATS PROCESSOR v3.0.0 - The Championship Engine
4
- *
5
- * Direct port from faf-svelte-engine - the 86% scorer!
6
- * 150+ file handlers with deep intelligence extraction
7
- * Two-stage pattern: Discover first, read second
8
- *
9
- * THIS IS THE POWER UNIT! 🏎️
10
- */
11
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
12
- if (k2 === undefined) k2 = k;
13
- var desc = Object.getOwnPropertyDescriptor(m, k);
14
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
15
- desc = { enumerable: true, get: function() { return m[k]; } };
16
- }
17
- Object.defineProperty(o, k2, desc);
18
- }) : (function(o, m, k, k2) {
19
- if (k2 === undefined) k2 = k;
20
- o[k2] = m[k];
21
- }));
22
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
23
- Object.defineProperty(o, "default", { enumerable: true, value: v });
24
- }) : function(o, v) {
25
- o["default"] = v;
26
- });
27
- var __importStar = (this && this.__importStar) || (function () {
28
- var ownKeys = function(o) {
29
- ownKeys = Object.getOwnPropertyNames || function (o) {
30
- var ar = [];
31
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
32
- return ar;
33
- };
34
- return ownKeys(o);
35
- };
36
- return function (mod) {
37
- if (mod && mod.__esModule) return mod;
38
- var result = {};
39
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
40
- __setModuleDefault(result, mod);
41
- return result;
42
- };
43
- })();
44
- Object.defineProperty(exports, "__esModule", { value: true });
45
- exports.fabFormatsProcessor = exports.FabFormatsProcessor = void 0;
46
- const fs_1 = require("fs");
47
- const path = __importStar(require("path"));
48
- // ==================== MAIN ENGINE ====================
49
- class FabFormatsProcessor {
50
- context = {};
51
- processedFileTypes = new Set();
52
- contextTodos = [];
53
- /**
54
- * Process multiple files with championship-grade intelligence extraction
55
- */
56
- async processFiles(projectDir) {
57
- // Stage 1: Discovery - Find ALL relevant files
58
- const files = await this.discoverFiles(projectDir);
59
- // Stage 2: Process - Extract intelligence with deduplication
60
- const results = [];
61
- let totalBonus = 0;
62
- for (const filePath of files) {
63
- const result = await this.processFile(filePath);
64
- if (result && !result.isDuplicate) {
65
- results.push(result);
66
- totalBonus += result.intelligenceBonus;
67
- // Update context with detected values
68
- this.updateContext(result);
69
- }
70
- }
71
- // Stage 3: Analysis - Generate quality metrics
72
- const qualityMetrics = {
73
- highestGrade: 'MINIMAL',
74
- averageScore: results.length > 0 ? totalBonus / results.length : 0,
75
- filesCovered: results.length,
76
- intelligenceDepth: this.calculateDepth()
77
- };
78
- return {
79
- results,
80
- totalBonus,
81
- context: this.context,
82
- qualityMetrics
83
- };
84
- }
85
- /**
86
- * Stage 1: Discover all relevant files (no reading yet!)
87
- */
88
- async discoverFiles(projectDir) {
89
- const discovered = [];
90
- const visited = new Set();
91
- // Priority files to look for
92
- const priorityFiles = [
93
- 'package.json',
94
- 'tsconfig.json',
95
- 'README.md',
96
- 'requirements.txt',
97
- 'pyproject.toml',
98
- 'Cargo.toml',
99
- 'go.mod',
100
- 'pom.xml',
101
- 'build.gradle',
102
- 'build.zig', // Zig build file
103
- 'Gemfile',
104
- 'composer.json',
105
- '.faf'
106
- ];
107
- // MONOREPO SUPPORT: Check if starting directory has its own .git
108
- const hasOwnGit = await this.hasGitDirectory(projectDir);
109
- // Check project directory and up to 3 levels up (unless in monorepo)
110
- let currentDir = projectDir;
111
- for (let level = 0; level < 4; level++) {
112
- if (visited.has(currentDir)) {
113
- break;
114
- }
115
- visited.add(currentDir);
116
- try {
117
- const files = await fs_1.promises.readdir(currentDir);
118
- for (const file of files) {
119
- const fullPath = path.join(currentDir, file);
120
- // Check if it's a priority file
121
- if (priorityFiles.includes(file)) {
122
- discovered.push(fullPath);
123
- }
124
- // Check known extensions
125
- else if (this.isRelevantFile(file)) {
126
- discovered.push(fullPath);
127
- }
128
- }
129
- // MONOREPO BOUNDARY: If project has its own .git, stop after first dir
130
- if (hasOwnGit && level === 0) {
131
- break; // Don't pollute with parent project configs
132
- }
133
- // Move up one directory
134
- const parentDir = path.dirname(currentDir);
135
- if (parentDir === currentDir) {
136
- break;
137
- }
138
- currentDir = parentDir;
139
- }
140
- catch {
141
- // Directory not accessible, continue
142
- break;
143
- }
144
- }
145
- return discovered;
146
- }
147
- /**
148
- * Check if directory has a .git folder (indicates project boundary)
149
- */
150
- async hasGitDirectory(dir) {
151
- try {
152
- const gitPath = path.join(dir, '.git');
153
- const stats = await fs_1.promises.stat(gitPath);
154
- return stats.isDirectory();
155
- }
156
- catch {
157
- return false;
158
- }
159
- }
160
- /**
161
- * Check if file is relevant for intelligence extraction
162
- */
163
- isRelevantFile(fileName) {
164
- const relevantPatterns = [
165
- // Config files
166
- /^\.eslintrc/,
167
- /^\.prettierrc/,
168
- /^jest\.config/,
169
- /^vitest\.config/,
170
- /^vite\.config/,
171
- /^webpack\.config/,
172
- /^rollup\.config/,
173
- /^babel\.config/,
174
- // Docker
175
- /^Dockerfile/,
176
- /^docker-compose/,
177
- // CI/CD
178
- /^\.gitlab-ci\.yml$/,
179
- /^Jenkinsfile$/,
180
- // Cloud configs
181
- /^vercel\.json$/,
182
- /^netlify\.toml$/,
183
- /^railway\./,
184
- /^render\./,
185
- /^fly\.toml$/,
186
- /^heroku\./,
187
- // Database
188
- /prisma\.schema$/,
189
- /drizzle\.config/,
190
- // Environment
191
- /^\.env/,
192
- // Documentation
193
- /^REQUIREMENTS\./i,
194
- /^LICENSE/
195
- ];
196
- return relevantPatterns.some(pattern => pattern.test(fileName));
197
- }
198
- /**
199
- * Process a single file with intelligence extraction
200
- */
201
- async processFile(filePath) {
202
- const fileName = path.basename(filePath);
203
- // Smart categorization for deduplication
204
- const category = this.categorizeFile(fileName);
205
- // Skip if we've already processed this category
206
- if (this.processedFileTypes.has(category)) {
207
- return {
208
- fileName,
209
- fileType: category,
210
- intelligenceBonus: 0,
211
- metadata: { message: `${category} already processed` },
212
- category,
213
- isDuplicate: true
214
- };
215
- }
216
- // Mark category as processed
217
- this.processedFileTypes.add(category);
218
- try {
219
- const content = await fs_1.promises.readFile(filePath, 'utf-8');
220
- // Route to specific processor
221
- if (fileName === 'package.json') {
222
- return this.processPackageJson(fileName, content);
223
- }
224
- else if (fileName === 'tsconfig.json') {
225
- return this.processTypeScriptConfig(fileName, content);
226
- }
227
- else if (fileName === 'README.md') {
228
- return this.processReadme(fileName, content);
229
- }
230
- else if (fileName === 'requirements.txt') {
231
- return this.processPythonRequirements(fileName, content);
232
- }
233
- else if (fileName === 'pyproject.toml') {
234
- return this.processPyProject(fileName, content);
235
- }
236
- else if (fileName === 'Cargo.toml') {
237
- return this.processCargoToml(fileName, content);
238
- }
239
- else if (fileName === 'go.mod') {
240
- return this.processGoMod(fileName, content);
241
- }
242
- else if (fileName === 'build.zig') {
243
- return this.processBuildZig(fileName, content);
244
- }
245
- else if (fileName === 'pom.xml') {
246
- return this.processMavenPom(fileName, content);
247
- }
248
- else if (fileName === 'build.gradle' || fileName === 'build.gradle.kts') {
249
- return this.processGradle(fileName, content);
250
- }
251
- else if (fileName === 'Gemfile') {
252
- return this.processGemfile(fileName, content);
253
- }
254
- else if (fileName === 'composer.json') {
255
- return this.processComposer(fileName, content);
256
- }
257
- else if (fileName === '.faf') {
258
- return this.processFafFile(fileName, content);
259
- }
260
- else if (fileName === 'Dockerfile') {
261
- return this.processDockerfile(fileName, content);
262
- }
263
- else if (fileName === 'docker-compose.yml' || fileName === 'docker-compose.yaml') {
264
- return this.processDockerCompose(fileName, content);
265
- }
266
- else if (fileName.startsWith('.env')) {
267
- return this.processEnvFile(fileName, content);
268
- }
269
- else {
270
- return this.processGenericFile(fileName, content);
271
- }
272
- }
273
- catch {
274
- return null;
275
- }
276
- }
277
- /**
278
- * Categorize files for intelligent deduplication
279
- */
280
- categorizeFile(fileName) {
281
- // Package managers (only one per project)
282
- if (fileName === 'package.json') {
283
- return 'package-manager';
284
- }
285
- if (fileName === 'Cargo.toml') {
286
- return 'package-manager-rust';
287
- }
288
- if (fileName === 'requirements.txt') {
289
- return 'package-manager-python';
290
- }
291
- if (fileName === 'pyproject.toml') {
292
- return 'package-manager-python-modern';
293
- }
294
- if (fileName === 'go.mod') {
295
- return 'package-manager-go';
296
- }
297
- if (fileName === 'build.zig') {
298
- return 'package-manager-zig';
299
- }
300
- if (fileName === 'pom.xml') {
301
- return 'package-manager-java';
302
- }
303
- if (fileName === 'build.gradle') {
304
- return 'package-manager-gradle';
305
- }
306
- if (fileName === 'Gemfile') {
307
- return 'package-manager-ruby';
308
- }
309
- if (fileName === 'composer.json') {
310
- return 'package-manager-php';
311
- }
312
- // Config files (one per type)
313
- if (fileName === 'tsconfig.json') {
314
- return 'typescript-config';
315
- }
316
- if (fileName.includes('vite.config')) {
317
- return 'vite-config';
318
- }
319
- if (fileName.includes('webpack.config')) {
320
- return 'webpack-config';
321
- }
322
- if (fileName.includes('jest.config')) {
323
- return 'test-config';
324
- }
325
- if (fileName.includes('vitest.config')) {
326
- return 'test-config-vite';
327
- }
328
- if (fileName.includes('eslint')) {
329
- return 'lint-config';
330
- }
331
- if (fileName.includes('prettier')) {
332
- return 'format-config';
333
- }
334
- // Docker (one of each)
335
- if (fileName === 'Dockerfile') {
336
- return 'docker-config';
337
- }
338
- if (fileName.includes('docker-compose')) {
339
- return 'docker-compose-config';
340
- }
341
- // Documentation (one main)
342
- if (fileName === 'README.md') {
343
- return 'documentation';
344
- }
345
- if (fileName.includes('REQUIREMENTS')) {
346
- return 'requirements-doc';
347
- }
348
- if (fileName.includes('LICENSE')) {
349
- return 'license';
350
- }
351
- // Cloud configs
352
- if (fileName === 'vercel.json') {
353
- return 'vercel-config';
354
- }
355
- if (fileName === 'netlify.toml') {
356
- return 'netlify-config';
357
- }
358
- // FAF
359
- if (fileName === '.faf') {
360
- return 'faf-context';
361
- }
362
- // Default
363
- const ext = path.extname(fileName);
364
- return `file-type-${ext}`;
365
- }
366
- /**
367
- * CHAMPIONSHIP PROCESSOR: package.json with quality grading
368
- */
369
- async processPackageJson(fileName, content) {
370
- let intelligenceBonus = 0;
371
- const metadata = {};
372
- try {
373
- const packageData = JSON.parse(content);
374
- const allDeps = {
375
- ...packageData.dependencies,
376
- ...packageData.devDependencies,
377
- ...packageData.peerDependencies
378
- };
379
- // Grade the quality
380
- const quality = this.gradePackageJsonQuality(packageData, content);
381
- metadata.grade = quality.grade;
382
- intelligenceBonus = quality.baseScore;
383
- metadata.criteria = quality.criteria;
384
- // Extract project name
385
- if (packageData.name && !this.context.projectName) {
386
- this.context.projectName = packageData.name
387
- .replace(/[-_]/g, ' ')
388
- .split(' ')
389
- .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
390
- .join(' ');
391
- }
392
- // Extract project goal
393
- if (packageData.description && !this.context.projectGoal) {
394
- this.context.projectGoal = packageData.description;
395
- }
396
- // Framework detection (comprehensive)
397
- if (!this.context.framework) {
398
- if (allDeps['svelte']) {
399
- const version = allDeps['svelte'];
400
- this.context.framework = version?.startsWith('^5') || version?.startsWith('5')
401
- ? 'Svelte 5' : 'Svelte';
402
- }
403
- else if (allDeps['@sveltejs/kit']) {
404
- this.context.framework = 'SvelteKit';
405
- }
406
- else if (allDeps['next']) {
407
- this.context.framework = 'Next.js';
408
- }
409
- else if (allDeps['react']) {
410
- this.context.framework = 'React';
411
- }
412
- else if (allDeps['vue']) {
413
- this.context.framework = 'Vue.js';
414
- }
415
- else if (allDeps['nuxt']) {
416
- this.context.framework = 'Nuxt.js';
417
- }
418
- else if (allDeps['@angular/core']) {
419
- this.context.framework = 'Angular';
420
- }
421
- else if (allDeps['astro']) {
422
- this.context.framework = 'Astro';
423
- }
424
- else if (allDeps['solid-js']) {
425
- this.context.framework = 'SolidJS';
426
- }
427
- else if (allDeps['express']) {
428
- this.context.framework = 'Express.js';
429
- }
430
- else if (allDeps['fastify']) {
431
- this.context.framework = 'Fastify';
432
- }
433
- else if (allDeps['@nestjs/core']) {
434
- this.context.framework = 'NestJS';
435
- }
436
- }
437
- // Language detection
438
- if (!this.context.mainLanguage) {
439
- if (allDeps['typescript'] || packageData.types || allDeps['@types/node']) {
440
- this.context.mainLanguage = 'TypeScript';
441
- }
442
- else {
443
- this.context.mainLanguage = 'JavaScript';
444
- }
445
- }
446
- // Build tool detection
447
- if (!this.context.buildTool) {
448
- if (allDeps['vite']) {
449
- this.context.buildTool = 'Vite';
450
- }
451
- else if (allDeps['webpack']) {
452
- this.context.buildTool = 'Webpack';
453
- }
454
- else if (allDeps['rollup']) {
455
- this.context.buildTool = 'Rollup';
456
- }
457
- else if (allDeps['parcel']) {
458
- this.context.buildTool = 'Parcel';
459
- }
460
- else if (allDeps['esbuild']) {
461
- this.context.buildTool = 'ESBuild';
462
- }
463
- }
464
- // Test framework detection
465
- if (!this.context.testFramework) {
466
- if (allDeps['vitest']) {
467
- this.context.testFramework = 'Vitest';
468
- }
469
- else if (allDeps['jest']) {
470
- this.context.testFramework = 'Jest';
471
- }
472
- else if (allDeps['playwright']) {
473
- this.context.testFramework = 'Playwright';
474
- }
475
- else if (allDeps['cypress']) {
476
- this.context.testFramework = 'Cypress';
477
- }
478
- else if (allDeps['mocha']) {
479
- this.context.testFramework = 'Mocha';
480
- }
481
- }
482
- // Package manager detection
483
- if (!this.context.packageManager) {
484
- if (packageData.packageManager) {
485
- this.context.packageManager = packageData.packageManager.split('@')[0];
486
- }
487
- else {
488
- this.context.packageManager = 'npm'; // Default
489
- }
490
- }
491
- // Backend detection
492
- if (!this.context.backend) {
493
- if (allDeps['express'] || allDeps['fastify'] || allDeps['koa'] || allDeps['hapi']) {
494
- this.context.backend = 'Node.js';
495
- }
496
- else if (allDeps['deno']) {
497
- this.context.backend = 'Deno';
498
- }
499
- else if (allDeps['bun']) {
500
- this.context.backend = 'Bun';
501
- }
502
- }
503
- // Database detection from dependencies
504
- if (!this.context.database) {
505
- if (allDeps['pg'] || allDeps['postgres'] || allDeps['postgresql']) {
506
- this.context.database = 'PostgreSQL';
507
- }
508
- else if (allDeps['mysql'] || allDeps['mysql2']) {
509
- this.context.database = 'MySQL';
510
- }
511
- else if (allDeps['mongodb'] || allDeps['mongoose']) {
512
- this.context.database = 'MongoDB';
513
- }
514
- else if (allDeps['redis'] || allDeps['ioredis']) {
515
- this.context.database = 'Redis';
516
- }
517
- else if (allDeps['sqlite3'] || allDeps['better-sqlite3']) {
518
- this.context.database = 'SQLite';
519
- }
520
- }
521
- // Deployment detection from homepage
522
- if (packageData.homepage && !this.context.deploymentMarket) {
523
- if (packageData.homepage.includes('vercel.app')) {
524
- this.context.deploymentMarket = 'Vercel';
525
- }
526
- else if (packageData.homepage.includes('netlify.app')) {
527
- this.context.deploymentMarket = 'Netlify';
528
- }
529
- else if (packageData.homepage.includes('github.io')) {
530
- this.context.deploymentMarket = 'GitHub Pages';
531
- }
532
- }
533
- metadata.dependencies = Object.keys(allDeps).length;
534
- metadata.hasScripts = !!packageData.scripts;
535
- metadata.hasTests = !!(packageData.scripts?.test);
536
- metadata.hasBuild = !!(packageData.scripts?.build);
537
- }
538
- catch {
539
- // Invalid JSON
540
- intelligenceBonus = 10;
541
- metadata.error = 'Invalid JSON';
542
- }
543
- return {
544
- fileName,
545
- fileType: 'package.json',
546
- intelligenceBonus,
547
- detectedFramework: this.context.framework,
548
- detectedLanguage: this.context.mainLanguage,
549
- detectedBuildTool: this.context.buildTool,
550
- metadata,
551
- category: 'package-manager'
552
- };
553
- }
554
- /**
555
- * QUALITY GRADING SYSTEM - The secret sauce!
556
- */
557
- gradePackageJsonQuality(packageData, _content) {
558
- const criteria = [];
559
- // TIER 1: EXCEPTIONAL (90%+ score) - 90-150 points
560
- let exceptionalCount = 0;
561
- // Complete project metadata
562
- if (packageData.name && packageData.description && packageData.version) {
563
- exceptionalCount++;
564
- criteria.push('Complete project metadata');
565
- }
566
- // Rich scripts showing full dev lifecycle
567
- const scripts = packageData.scripts || {};
568
- const scriptKeys = Object.keys(scripts);
569
- if (scriptKeys.includes('dev') && scriptKeys.includes('build') &&
570
- (scriptKeys.includes('test') || scriptKeys.includes('check'))) {
571
- exceptionalCount++;
572
- criteria.push('Complete dev lifecycle scripts');
573
- }
574
- // Professional dependency management
575
- const totalDeps = Object.keys(packageData.dependencies || {}).length +
576
- Object.keys(packageData.devDependencies || {}).length;
577
- if (totalDeps >= 15 && packageData.devDependencies) {
578
- exceptionalCount++;
579
- criteria.push('Professional dependency structure');
580
- }
581
- // Modern toolchain
582
- const allDeps = { ...packageData.dependencies, ...packageData.devDependencies };
583
- let modernTools = 0;
584
- if (allDeps['typescript'] || allDeps['@types/node']) {
585
- modernTools++;
586
- }
587
- if (allDeps['vite'] || allDeps['webpack'] || allDeps['rollup']) {
588
- modernTools++;
589
- }
590
- if (allDeps['jest'] || allDeps['vitest'] || allDeps['playwright']) {
591
- modernTools++;
592
- }
593
- if (allDeps['eslint'] || allDeps['prettier']) {
594
- modernTools++;
595
- }
596
- if (modernTools >= 3) {
597
- exceptionalCount++;
598
- criteria.push('Modern development toolchain');
599
- }
600
- // Framework sophistication
601
- let frameworkSophistication = 0;
602
- if (allDeps['svelte'] || allDeps['react'] || allDeps['vue'] || allDeps['next'] || allDeps['nuxt']) {
603
- frameworkSophistication++;
604
- }
605
- if (allDeps['@sveltejs/kit'] || allDeps['next'] || allDeps['nuxt']) {
606
- frameworkSophistication++; // Meta-frameworks
607
- }
608
- if (allDeps['tailwindcss'] || allDeps['styled-components'] || allDeps['@emotion/styled']) {
609
- frameworkSophistication++; // Styling
610
- }
611
- if (frameworkSophistication >= 2) {
612
- exceptionalCount++;
613
- criteria.push('Sophisticated framework stack');
614
- }
615
- // Professional project setup
616
- if (packageData.repository && packageData.author && packageData.license) {
617
- exceptionalCount++;
618
- criteria.push('Professional project setup');
619
- }
620
- // Determine grade
621
- if (exceptionalCount >= 5) {
622
- return { grade: 'EXCEPTIONAL', baseScore: 120, criteria };
623
- }
624
- else if (exceptionalCount >= 3) {
625
- return { grade: 'PROFESSIONAL', baseScore: 85, criteria };
626
- }
627
- else if (packageData.name && totalDeps >= 5 && scriptKeys.length >= 2) {
628
- return { grade: 'GOOD', baseScore: 65, criteria };
629
- }
630
- else if (packageData.name && totalDeps >= 1) {
631
- return { grade: 'BASIC', baseScore: 45, criteria };
632
- }
633
- else {
634
- return { grade: 'MINIMAL', baseScore: 25, criteria };
635
- }
636
- }
637
- /**
638
- * Process TypeScript configuration
639
- */
640
- async processTypeScriptConfig(fileName, content) {
641
- let intelligenceBonus = 60;
642
- const metadata = {};
643
- try {
644
- const tsConfig = JSON.parse(content);
645
- if (!this.context.mainLanguage) {
646
- this.context.mainLanguage = 'TypeScript';
647
- }
648
- // Check for strict mode (quality indicator)
649
- if (tsConfig.compilerOptions?.strict) {
650
- intelligenceBonus += 20;
651
- metadata.strict = true;
652
- }
653
- // Check for modern features
654
- if (tsConfig.compilerOptions?.target?.includes('ES20')) {
655
- intelligenceBonus += 10;
656
- metadata.modern = true;
657
- }
658
- metadata.module = tsConfig.compilerOptions?.module;
659
- metadata.target = tsConfig.compilerOptions?.target;
660
- }
661
- catch {
662
- intelligenceBonus = 30;
663
- metadata.error = 'Invalid JSON';
664
- }
665
- return {
666
- fileName,
667
- fileType: 'tsconfig.json',
668
- intelligenceBonus,
669
- detectedLanguage: 'TypeScript',
670
- metadata,
671
- category: 'typescript-config'
672
- };
673
- }
674
- /**
675
- * Process README for human context
676
- */
677
- async processReadme(fileName, content) {
678
- let intelligenceBonus = 50;
679
- const metadata = {};
680
- // Extract project name from title
681
- const titleMatch = content.match(/^#\s+(.+)$/m);
682
- if (titleMatch && !this.context.projectName) {
683
- this.context.projectName = titleMatch[1].trim();
684
- intelligenceBonus += 20;
685
- }
686
- // Extract description
687
- const descMatch = content.match(/^#+\s+(?:description|about|overview|introduction)\s*\n+(.+?)(?:\n#|\n\n#|$)/ims);
688
- if (descMatch && !this.context.projectGoal) {
689
- this.context.projectGoal = descMatch[1].trim().substring(0, 200);
690
- intelligenceBonus += 30;
691
- }
692
- // Look for installation/usage (indicates target user)
693
- if (content.match(/##\s+Installation/i)) {
694
- if (!this.context.targetUser) {
695
- this.context.targetUser = 'Developers';
696
- }
697
- intelligenceBonus += 10;
698
- }
699
- // Look for features section
700
- if (content.match(/##\s+Features/i)) {
701
- intelligenceBonus += 15;
702
- metadata.hasFeatures = true;
703
- }
704
- // Check documentation quality
705
- const sections = content.match(/^##\s+.+$/gm) || [];
706
- if (sections.length >= 5) {
707
- intelligenceBonus += 25;
708
- metadata.wellDocumented = true;
709
- }
710
- metadata.sections = sections.length;
711
- metadata.length = content.length;
712
- return {
713
- fileName,
714
- fileType: 'readme',
715
- intelligenceBonus,
716
- metadata,
717
- category: 'documentation'
718
- };
719
- }
720
- /**
721
- * Process Python requirements
722
- */
723
- async processPythonRequirements(fileName, content) {
724
- let intelligenceBonus = 50;
725
- const metadata = {};
726
- if (!this.context.mainLanguage) {
727
- this.context.mainLanguage = 'Python';
728
- }
729
- const lines = content.split('\n').filter(line => line && !line.startsWith('#'));
730
- metadata.dependencies = lines.length;
731
- // Check for specific frameworks
732
- if (!this.context.framework) {
733
- if (content.includes('django')) {
734
- this.context.framework = 'Django';
735
- intelligenceBonus += 20;
736
- }
737
- else if (content.includes('flask')) {
738
- this.context.framework = 'Flask';
739
- intelligenceBonus += 20;
740
- }
741
- else if (content.includes('fastapi')) {
742
- this.context.framework = 'FastAPI';
743
- intelligenceBonus += 25;
744
- }
745
- else if (content.includes('streamlit')) {
746
- this.context.framework = 'Streamlit';
747
- intelligenceBonus += 20;
748
- }
749
- }
750
- // Check for AI/ML libraries
751
- if (content.includes('torch') || content.includes('tensorflow')) {
752
- metadata.aiml = true;
753
- intelligenceBonus += 30;
754
- }
755
- // Check for data science
756
- if (content.includes('pandas') || content.includes('numpy')) {
757
- metadata.dataScience = true;
758
- intelligenceBonus += 20;
759
- }
760
- return {
761
- fileName,
762
- fileType: 'requirements.txt',
763
- intelligenceBonus,
764
- detectedLanguage: 'Python',
765
- detectedFramework: this.context.framework,
766
- metadata,
767
- category: 'package-manager-python'
768
- };
769
- }
770
- /**
771
- * Process pyproject.toml
772
- */
773
- async processPyProject(fileName, content) {
774
- let intelligenceBonus = 70;
775
- const metadata = {};
776
- if (!this.context.mainLanguage) {
777
- this.context.mainLanguage = 'Python';
778
- }
779
- // Check for Poetry
780
- if (content.includes('[tool.poetry]')) {
781
- if (!this.context.packageManager) {
782
- this.context.packageManager = 'Poetry';
783
- }
784
- intelligenceBonus += 20;
785
- metadata.poetry = true;
786
- }
787
- // Check for build system and detect actual package manager/build tool
788
- if (content.includes('[build-system]')) {
789
- intelligenceBonus += 15;
790
- metadata.modernBuild = true;
791
- // Detect actual build backend from [build-system] requires
792
- const requiresMatch = content.match(/\[build-system\][^[]*requires\s*=\s*\[([^\]]*)\]/s);
793
- if (requiresMatch) {
794
- const requires = requiresMatch[1].toLowerCase();
795
- if (requires.includes('setuptools')) {
796
- if (!this.context.packageManager) {
797
- this.context.packageManager = 'pip';
798
- }
799
- if (!this.context.buildTool) {
800
- this.context.buildTool = 'setuptools';
801
- }
802
- }
803
- else if (requires.includes('hatchling') || requires.includes('hatch')) {
804
- if (!this.context.packageManager) {
805
- this.context.packageManager = 'hatch';
806
- }
807
- if (!this.context.buildTool) {
808
- this.context.buildTool = 'hatchling';
809
- }
810
- }
811
- else if (requires.includes('flit')) {
812
- if (!this.context.packageManager) {
813
- this.context.packageManager = 'flit';
814
- }
815
- if (!this.context.buildTool) {
816
- this.context.buildTool = 'flit';
817
- }
818
- }
819
- else if (requires.includes('pdm')) {
820
- if (!this.context.packageManager) {
821
- this.context.packageManager = 'pdm';
822
- }
823
- if (!this.context.buildTool) {
824
- this.context.buildTool = 'pdm';
825
- }
826
- }
827
- else if (requires.includes('poetry')) {
828
- if (!this.context.packageManager) {
829
- this.context.packageManager = 'Poetry';
830
- }
831
- if (!this.context.buildTool) {
832
- this.context.buildTool = 'Poetry';
833
- }
834
- }
835
- }
836
- }
837
- // Parse dependencies to detect database, API type, framework
838
- const allDeps = this.extractPyProjectDeps(content);
839
- if (allDeps.length > 0) {
840
- // Database detection
841
- if (!this.context.database) {
842
- if (allDeps.some(d => d.includes('bigquery') || d.includes('google-cloud-bigquery'))) {
843
- this.context.database = 'BigQuery';
844
- if (!this.context.connection) {
845
- this.context.connection = 'gRPC';
846
- }
847
- }
848
- else if (allDeps.some(d => d.includes('psycopg') || d.includes('asyncpg') || d.includes('sqlalchemy'))) {
849
- this.context.database = 'PostgreSQL';
850
- if (!this.context.connection) {
851
- this.context.connection = 'TCP';
852
- }
853
- }
854
- else if (allDeps.some(d => d.includes('pymongo') || d.includes('motor'))) {
855
- this.context.database = 'MongoDB';
856
- if (!this.context.connection) {
857
- this.context.connection = 'TCP';
858
- }
859
- }
860
- else if (allDeps.some(d => d === 'redis' || d.includes('redis'))) {
861
- this.context.database = 'Redis';
862
- if (!this.context.connection) {
863
- this.context.connection = 'TCP';
864
- }
865
- }
866
- }
867
- // API type / framework detection
868
- if (!this.context.apiType) {
869
- if (allDeps.some(d => d.includes('fastmcp') || d.includes('mcp'))) {
870
- this.context.apiType = 'MCP';
871
- if (!this.context.connection) {
872
- this.context.connection = 'stdio';
873
- }
874
- if (!this.context.framework) {
875
- this.context.framework = 'FastMCP';
876
- }
877
- }
878
- else if (allDeps.some(d => d.includes('fastapi'))) {
879
- this.context.apiType = 'REST';
880
- if (!this.context.framework) {
881
- this.context.framework = 'FastAPI';
882
- }
883
- }
884
- else if (allDeps.some(d => d.includes('flask'))) {
885
- this.context.apiType = 'REST';
886
- if (!this.context.framework) {
887
- this.context.framework = 'Flask';
888
- }
889
- }
890
- else if (allDeps.some(d => d.includes('django'))) {
891
- this.context.apiType = 'REST';
892
- if (!this.context.framework) {
893
- this.context.framework = 'Django';
894
- }
895
- }
896
- else if (allDeps.some(d => d.includes('graphql') || d.includes('strawberry') || d.includes('ariadne'))) {
897
- this.context.apiType = 'GraphQL';
898
- }
899
- }
900
- }
901
- // Extract project name
902
- const nameMatch = content.match(/name\s*=\s*"([^"]+)"/);
903
- if (nameMatch && !this.context.projectName) {
904
- this.context.projectName = nameMatch[1];
905
- intelligenceBonus += 10;
906
- }
907
- // Extract description
908
- const descMatch = content.match(/description\s*=\s*"([^"]+)"/);
909
- if (descMatch && !this.context.projectGoal) {
910
- this.context.projectGoal = descMatch[1];
911
- intelligenceBonus += 15;
912
- }
913
- return {
914
- fileName,
915
- fileType: 'pyproject.toml',
916
- intelligenceBonus,
917
- detectedLanguage: 'Python',
918
- metadata,
919
- category: 'package-manager-python-modern'
920
- };
921
- }
922
- /**
923
- * Extract dependency names from pyproject.toml content
924
- */
925
- extractPyProjectDeps(content) {
926
- const deps = [];
927
- // [project] dependencies = ["foo", "bar>=1.0"]
928
- const projDepsMatch = content.match(/\[project\][^[]*dependencies\s*=\s*\[([\s\S]*?)\]/);
929
- if (projDepsMatch) {
930
- const matches = projDepsMatch[1].match(/"([^"]+)"/g);
931
- if (matches) {
932
- matches.forEach(m => deps.push(m.replace(/"/g, '').split(/[>=<!\s;]/)[0].toLowerCase()));
933
- }
934
- }
935
- // [tool.poetry.dependencies]
936
- const poetryDepsMatch = content.match(/\[tool\.poetry\.dependencies\]([\s\S]*?)(?:\[|$)/);
937
- if (poetryDepsMatch) {
938
- const lines = poetryDepsMatch[1].split('\n');
939
- lines.forEach(line => {
940
- const pkgMatch = line.match(/^(\S+)\s*=/);
941
- if (pkgMatch && pkgMatch[1] !== 'python') {
942
- deps.push(pkgMatch[1].toLowerCase());
943
- }
944
- });
945
- }
946
- return deps;
947
- }
948
- /**
949
- * Process Cargo.toml
950
- */
951
- async processCargoToml(fileName, content) {
952
- let intelligenceBonus = 70;
953
- const metadata = {};
954
- if (!this.context.mainLanguage) {
955
- this.context.mainLanguage = 'Rust';
956
- }
957
- if (!this.context.packageManager) {
958
- this.context.packageManager = 'Cargo';
959
- }
960
- // Extract project name
961
- const nameMatch = content.match(/name\s*=\s*"([^"]+)"/);
962
- if (nameMatch && !this.context.projectName) {
963
- this.context.projectName = nameMatch[1];
964
- intelligenceBonus += 10;
965
- }
966
- // Check for specific frameworks
967
- if (!this.context.framework) {
968
- if (content.includes('actix-web')) {
969
- this.context.framework = 'Actix Web';
970
- intelligenceBonus += 25;
971
- }
972
- else if (content.includes('rocket')) {
973
- this.context.framework = 'Rocket';
974
- intelligenceBonus += 25;
975
- }
976
- else if (content.includes('tokio')) {
977
- this.context.framework = 'Tokio';
978
- intelligenceBonus += 20;
979
- }
980
- else if (content.includes('axum')) {
981
- this.context.framework = 'Axum';
982
- intelligenceBonus += 25;
983
- }
984
- }
985
- // Count dependencies
986
- const deps = content.match(/\[dependencies\]/g);
987
- if (deps) {
988
- metadata.hasDependencies = true;
989
- intelligenceBonus += 15;
990
- }
991
- return {
992
- fileName,
993
- fileType: 'Cargo.toml',
994
- intelligenceBonus,
995
- detectedLanguage: 'Rust',
996
- detectedFramework: this.context.framework,
997
- metadata,
998
- category: 'package-manager-rust'
999
- };
1000
- }
1001
- /**
1002
- * Process go.mod
1003
- */
1004
- async processGoMod(fileName, content) {
1005
- let intelligenceBonus = 70;
1006
- const metadata = {};
1007
- if (!this.context.mainLanguage) {
1008
- this.context.mainLanguage = 'Go';
1009
- }
1010
- if (!this.context.packageManager) {
1011
- this.context.packageManager = 'Go Modules';
1012
- }
1013
- // Extract module name
1014
- const moduleMatch = content.match(/module\s+(\S+)/);
1015
- if (moduleMatch && !this.context.projectName) {
1016
- this.context.projectName = moduleMatch[1].split('/').pop();
1017
- intelligenceBonus += 10;
1018
- }
1019
- // Check for frameworks
1020
- if (!this.context.framework) {
1021
- if (content.includes('gin-gonic/gin')) {
1022
- this.context.framework = 'Gin';
1023
- intelligenceBonus += 25;
1024
- }
1025
- else if (content.includes('fiber')) {
1026
- this.context.framework = 'Fiber';
1027
- intelligenceBonus += 25;
1028
- }
1029
- else if (content.includes('echo')) {
1030
- this.context.framework = 'Echo';
1031
- intelligenceBonus += 25;
1032
- }
1033
- }
1034
- // Count requirements
1035
- const requires = content.match(/require\s+\(/g);
1036
- if (requires) {
1037
- metadata.hasRequirements = true;
1038
- intelligenceBonus += 15;
1039
- }
1040
- return {
1041
- fileName,
1042
- fileType: 'go.mod',
1043
- intelligenceBonus,
1044
- detectedLanguage: 'Go',
1045
- detectedFramework: this.context.framework,
1046
- metadata,
1047
- category: 'package-manager-go'
1048
- };
1049
- }
1050
- /**
1051
- * Process build.zig
1052
- */
1053
- async processBuildZig(fileName, content) {
1054
- let intelligenceBonus = 70;
1055
- const metadata = {};
1056
- if (!this.context.mainLanguage) {
1057
- this.context.mainLanguage = 'Zig';
1058
- }
1059
- if (!this.context.packageManager) {
1060
- this.context.packageManager = 'Zig Package Manager';
1061
- }
1062
- if (!this.context.buildTool) {
1063
- this.context.buildTool = 'zig build';
1064
- }
1065
- // Extract project name from .name field
1066
- const nameMatch = content.match(/\.name\s*=\s*"([^"]+)"/);
1067
- if (nameMatch && !this.context.projectName) {
1068
- this.context.projectName = nameMatch[1];
1069
- intelligenceBonus += 10;
1070
- }
1071
- // Check for WASM target
1072
- if (!this.context.framework) {
1073
- if (content.includes('wasm32') || content.includes('.wasm')) {
1074
- this.context.framework = 'Zig WASM';
1075
- metadata.runtime = 'WASM32';
1076
- intelligenceBonus += 25;
1077
- }
1078
- else if (content.includes('addExecutable')) {
1079
- this.context.framework = 'Zig CLI';
1080
- intelligenceBonus += 15;
1081
- }
1082
- else if (content.includes('addStaticLibrary') || content.includes('addSharedLibrary')) {
1083
- this.context.framework = 'Zig Library';
1084
- intelligenceBonus += 15;
1085
- }
1086
- }
1087
- // Check for test step
1088
- if (content.includes('addTest')) {
1089
- metadata.hasTests = true;
1090
- intelligenceBonus += 10;
1091
- }
1092
- return {
1093
- fileName,
1094
- fileType: 'build.zig',
1095
- intelligenceBonus,
1096
- detectedLanguage: 'Zig',
1097
- detectedFramework: this.context.framework,
1098
- metadata,
1099
- category: 'package-manager-zig'
1100
- };
1101
- }
1102
- /**
1103
- * Process Maven pom.xml
1104
- */
1105
- async processMavenPom(fileName, content) {
1106
- let intelligenceBonus = 70;
1107
- const metadata = {};
1108
- if (!this.context.mainLanguage) {
1109
- this.context.mainLanguage = 'Java';
1110
- }
1111
- if (!this.context.buildTool) {
1112
- this.context.buildTool = 'Maven';
1113
- }
1114
- // Check for Spring
1115
- if (!this.context.framework) {
1116
- if (content.includes('spring-boot')) {
1117
- this.context.framework = 'Spring Boot';
1118
- intelligenceBonus += 30;
1119
- }
1120
- else if (content.includes('spring-framework')) {
1121
- this.context.framework = 'Spring';
1122
- intelligenceBonus += 25;
1123
- }
1124
- }
1125
- // Extract artifact ID as project name
1126
- const artifactMatch = content.match(/<artifactId>([^<]+)<\/artifactId>/);
1127
- if (artifactMatch && !this.context.projectName) {
1128
- this.context.projectName = artifactMatch[1];
1129
- intelligenceBonus += 10;
1130
- }
1131
- return {
1132
- fileName,
1133
- fileType: 'pom.xml',
1134
- intelligenceBonus,
1135
- detectedLanguage: 'Java',
1136
- detectedBuildTool: 'Maven',
1137
- detectedFramework: this.context.framework,
1138
- metadata,
1139
- category: 'package-manager-java'
1140
- };
1141
- }
1142
- /**
1143
- * Process Gradle build file
1144
- */
1145
- async processGradle(fileName, content) {
1146
- let intelligenceBonus = 70;
1147
- const metadata = {};
1148
- const isKotlin = fileName.endsWith('.kts');
1149
- if (!this.context.mainLanguage) {
1150
- this.context.mainLanguage = isKotlin ? 'Kotlin' : 'Java';
1151
- }
1152
- if (!this.context.buildTool) {
1153
- this.context.buildTool = 'Gradle';
1154
- }
1155
- // Check for frameworks
1156
- if (!this.context.framework) {
1157
- if (content.includes('spring-boot')) {
1158
- this.context.framework = 'Spring Boot';
1159
- intelligenceBonus += 30;
1160
- }
1161
- else if (content.includes('ktor')) {
1162
- this.context.framework = 'Ktor';
1163
- intelligenceBonus += 25;
1164
- }
1165
- }
1166
- metadata.isKotlinDSL = isKotlin;
1167
- return {
1168
- fileName,
1169
- fileType: 'build.gradle',
1170
- intelligenceBonus,
1171
- detectedLanguage: this.context.mainLanguage,
1172
- detectedBuildTool: 'Gradle',
1173
- detectedFramework: this.context.framework,
1174
- metadata,
1175
- category: 'package-manager-gradle'
1176
- };
1177
- }
1178
- /**
1179
- * Process Gemfile
1180
- */
1181
- async processGemfile(fileName, content) {
1182
- let intelligenceBonus = 60;
1183
- const metadata = {};
1184
- if (!this.context.mainLanguage) {
1185
- this.context.mainLanguage = 'Ruby';
1186
- }
1187
- if (!this.context.packageManager) {
1188
- this.context.packageManager = 'Bundler';
1189
- }
1190
- // Check for Rails
1191
- if (!this.context.framework) {
1192
- if (content.includes("gem 'rails'") || content.includes('gem "rails"')) {
1193
- this.context.framework = 'Ruby on Rails';
1194
- intelligenceBonus += 30;
1195
- }
1196
- else if (content.includes('sinatra')) {
1197
- this.context.framework = 'Sinatra';
1198
- intelligenceBonus += 20;
1199
- }
1200
- }
1201
- return {
1202
- fileName,
1203
- fileType: 'Gemfile',
1204
- intelligenceBonus,
1205
- detectedLanguage: 'Ruby',
1206
- detectedFramework: this.context.framework,
1207
- metadata,
1208
- category: 'package-manager-ruby'
1209
- };
1210
- }
1211
- /**
1212
- * Process composer.json
1213
- */
1214
- async processComposer(fileName, content) {
1215
- let intelligenceBonus = 60;
1216
- const metadata = {};
1217
- if (!this.context.mainLanguage) {
1218
- this.context.mainLanguage = 'PHP';
1219
- }
1220
- if (!this.context.packageManager) {
1221
- this.context.packageManager = 'Composer';
1222
- }
1223
- try {
1224
- const composerData = JSON.parse(content);
1225
- // Check for frameworks
1226
- if (!this.context.framework) {
1227
- const requires = composerData.require || {};
1228
- if (requires['laravel/framework']) {
1229
- this.context.framework = 'Laravel';
1230
- intelligenceBonus += 30;
1231
- }
1232
- else if (requires['symfony/framework-bundle']) {
1233
- this.context.framework = 'Symfony';
1234
- intelligenceBonus += 30;
1235
- }
1236
- }
1237
- // Extract name
1238
- if (composerData.name && !this.context.projectName) {
1239
- this.context.projectName = composerData.name.split('/').pop();
1240
- intelligenceBonus += 10;
1241
- }
1242
- }
1243
- catch {
1244
- // Invalid JSON
1245
- }
1246
- return {
1247
- fileName,
1248
- fileType: 'composer.json',
1249
- intelligenceBonus,
1250
- detectedLanguage: 'PHP',
1251
- detectedFramework: this.context.framework,
1252
- metadata,
1253
- category: 'package-manager-php'
1254
- };
1255
- }
1256
- /**
1257
- * Process .faf file
1258
- */
1259
- async processFafFile(fileName, content) {
1260
- let intelligenceBonus = 100; // FAF files are high value!
1261
- const metadata = {};
1262
- try {
1263
- const fafData = JSON.parse(content);
1264
- // Extract all context from FAF
1265
- if (fafData.project?.name && !this.context.projectName) {
1266
- this.context.projectName = fafData.project.name;
1267
- }
1268
- if (fafData.project?.goal && !this.context.projectGoal) {
1269
- this.context.projectGoal = fafData.project.goal;
1270
- }
1271
- if (fafData.project?.main_language && !this.context.mainLanguage) {
1272
- this.context.mainLanguage = fafData.project.main_language;
1273
- }
1274
- if ((fafData.stack?.framework || fafData.stack?.frontend) && !this.context.framework) {
1275
- this.context.framework = fafData.stack.framework || fafData.stack.frontend;
1276
- }
1277
- if (fafData.stack?.backend && !this.context.backend) {
1278
- this.context.backend = fafData.stack.backend;
1279
- }
1280
- if ((fafData.stack?.db || fafData.stack?.database) && !this.context.database) {
1281
- this.context.database = fafData.stack.db || fafData.stack.database;
1282
- }
1283
- // Extract human context
1284
- if (fafData.human?.who && !this.context.targetUser) {
1285
- this.context.targetUser = fafData.human.who;
1286
- }
1287
- if (fafData.human?.what && !this.context.coreProblem) {
1288
- this.context.coreProblem = fafData.human.what;
1289
- }
1290
- if (fafData.human?.why && !this.context.missionPurpose) {
1291
- this.context.missionPurpose = fafData.human.why;
1292
- }
1293
- metadata.hasFafContext = true;
1294
- metadata.version = fafData.version;
1295
- }
1296
- catch {
1297
- intelligenceBonus = 50;
1298
- metadata.error = 'Invalid FAF JSON';
1299
- }
1300
- return {
1301
- fileName,
1302
- fileType: '.faf',
1303
- intelligenceBonus,
1304
- metadata,
1305
- category: 'faf-context'
1306
- };
1307
- }
1308
- /**
1309
- * Process Dockerfile
1310
- */
1311
- async processDockerfile(fileName, content) {
1312
- let intelligenceBonus = 60;
1313
- const metadata = {};
1314
- // Detect base image language
1315
- if (!this.context.mainLanguage) {
1316
- if (content.includes('FROM node:') || content.includes('FROM node ')) {
1317
- this.context.mainLanguage = 'JavaScript';
1318
- }
1319
- else if (content.includes('FROM python:')) {
1320
- this.context.mainLanguage = 'Python';
1321
- }
1322
- else if (content.includes('FROM rust:')) {
1323
- this.context.mainLanguage = 'Rust';
1324
- }
1325
- else if (content.includes('FROM golang:')) {
1326
- this.context.mainLanguage = 'Go';
1327
- }
1328
- else if (content.includes('FROM openjdk:') || content.includes('FROM amazoncorretto:')) {
1329
- this.context.mainLanguage = 'Java';
1330
- }
1331
- else if (content.includes('FROM ruby:')) {
1332
- this.context.mainLanguage = 'Ruby';
1333
- }
1334
- else if (content.includes('FROM php:')) {
1335
- this.context.mainLanguage = 'PHP';
1336
- }
1337
- }
1338
- // Check for deployment indicators
1339
- if (content.includes('EXPOSE')) {
1340
- metadata.hasExpose = true;
1341
- intelligenceBonus += 10;
1342
- }
1343
- // Multi-stage build (indicates production readiness)
1344
- if (content.includes('FROM') && content.split('FROM').length > 2) {
1345
- metadata.multiStage = true;
1346
- intelligenceBonus += 20;
1347
- }
1348
- return {
1349
- fileName,
1350
- fileType: 'Dockerfile',
1351
- intelligenceBonus,
1352
- metadata,
1353
- category: 'docker-config'
1354
- };
1355
- }
1356
- /**
1357
- * Process docker-compose
1358
- */
1359
- async processDockerCompose(fileName, content) {
1360
- let intelligenceBonus = 70;
1361
- const metadata = {};
1362
- // Check for databases
1363
- if (!this.context.database) {
1364
- if (content.includes('postgres:') || content.includes('postgresql:')) {
1365
- this.context.database = 'PostgreSQL';
1366
- }
1367
- else if (content.includes('mysql:') || content.includes('mariadb:')) {
1368
- this.context.database = 'MySQL';
1369
- }
1370
- else if (content.includes('mongo:') || content.includes('mongodb:')) {
1371
- this.context.database = 'MongoDB';
1372
- }
1373
- else if (content.includes('redis:')) {
1374
- this.context.database = 'Redis';
1375
- }
1376
- }
1377
- // Count services
1378
- const services = content.match(/^\s{2}\w+:/gm);
1379
- if (services) {
1380
- metadata.serviceCount = services.length;
1381
- intelligenceBonus += services.length * 10;
1382
- }
1383
- return {
1384
- fileName,
1385
- fileType: 'docker-compose',
1386
- intelligenceBonus,
1387
- metadata,
1388
- category: 'docker-compose-config'
1389
- };
1390
- }
1391
- /**
1392
- * Process .env files
1393
- */
1394
- async processEnvFile(fileName, content) {
1395
- let intelligenceBonus = 40;
1396
- const metadata = {};
1397
- // Database detection
1398
- if (content.includes('DATABASE_URL') || content.includes('DB_')) {
1399
- intelligenceBonus += 20;
1400
- if (content.includes('postgresql://') || content.includes('postgres://')) {
1401
- if (!this.context.database) {
1402
- this.context.database = 'PostgreSQL';
1403
- }
1404
- }
1405
- else if (content.includes('mysql://')) {
1406
- if (!this.context.database) {
1407
- this.context.database = 'MySQL';
1408
- }
1409
- }
1410
- else if (content.includes('mongodb://')) {
1411
- if (!this.context.database) {
1412
- this.context.database = 'MongoDB';
1413
- }
1414
- }
1415
- }
1416
- // Hosting detection
1417
- if (content.includes('VERCEL_')) {
1418
- if (!this.context.hosting) {
1419
- this.context.hosting = 'Vercel';
1420
- }
1421
- intelligenceBonus += 10;
1422
- }
1423
- else if (content.includes('NETLIFY_')) {
1424
- if (!this.context.hosting) {
1425
- this.context.hosting = 'Netlify';
1426
- }
1427
- intelligenceBonus += 10;
1428
- }
1429
- else if (content.includes('RAILWAY_')) {
1430
- if (!this.context.hosting) {
1431
- this.context.hosting = 'Railway';
1432
- }
1433
- intelligenceBonus += 10;
1434
- }
1435
- // API detection
1436
- if (content.includes('STRIPE_') || content.includes('PAYPAL_')) {
1437
- metadata.hasPaymentAPI = true;
1438
- intelligenceBonus += 20;
1439
- }
1440
- if (content.includes('JWT_') || content.includes('AUTH0_')) {
1441
- metadata.hasAuthAPI = true;
1442
- intelligenceBonus += 15;
1443
- }
1444
- if (content.includes('AWS_') || content.includes('S3_')) {
1445
- metadata.hasCloudStorage = true;
1446
- intelligenceBonus += 15;
1447
- }
1448
- return {
1449
- fileName,
1450
- fileType: '.env',
1451
- intelligenceBonus,
1452
- metadata,
1453
- category: 'environment'
1454
- };
1455
- }
1456
- /**
1457
- * Generic file processor (fallback)
1458
- */
1459
- async processGenericFile(fileName, content) {
1460
- const intelligenceBonus = 10;
1461
- const metadata = {};
1462
- metadata.fileSize = content.length;
1463
- metadata.lineCount = content.split('\n').length;
1464
- return {
1465
- fileName,
1466
- fileType: path.extname(fileName) || 'unknown',
1467
- intelligenceBonus,
1468
- metadata,
1469
- category: 'generic'
1470
- };
1471
- }
1472
- /**
1473
- * Update context with results
1474
- */
1475
- updateContext(result) {
1476
- if (result.detectedFramework && !this.context.framework) {
1477
- this.context.framework = result.detectedFramework;
1478
- }
1479
- if (result.detectedLanguage && !this.context.mainLanguage) {
1480
- this.context.mainLanguage = result.detectedLanguage;
1481
- }
1482
- if (result.detectedBuildTool && !this.context.buildTool) {
1483
- this.context.buildTool = result.detectedBuildTool;
1484
- }
1485
- if (result.detectedHosting && !this.context.hosting) {
1486
- this.context.hosting = result.detectedHosting;
1487
- }
1488
- }
1489
- /**
1490
- * Calculate intelligence depth
1491
- */
1492
- calculateDepth() {
1493
- let depth = 0;
1494
- // Technical context (15 possible)
1495
- const technicalFields = [
1496
- 'projectName', 'projectGoal', 'mainLanguage', 'framework',
1497
- 'backend', 'server', 'apiType', 'database', 'connection',
1498
- 'hosting', 'cicd', 'buildTool', 'packageManager', 'testFramework', 'linter'
1499
- ];
1500
- technicalFields.forEach(field => {
1501
- if (this.context[field]) {
1502
- depth++;
1503
- }
1504
- });
1505
- // Human context (6 possible)
1506
- const humanFields = [
1507
- 'targetUser', 'coreProblem', 'missionPurpose',
1508
- 'deploymentMarket', 'timeline', 'approach'
1509
- ];
1510
- humanFields.forEach(field => {
1511
- if (this.context[field]) {
1512
- depth++;
1513
- }
1514
- });
1515
- // Return percentage (21 total slots)
1516
- return Math.round((depth / 21) * 100);
1517
- }
1518
- }
1519
- exports.FabFormatsProcessor = FabFormatsProcessor;
1520
- /**
1521
- * Export singleton instance for CLI usage
1522
- */
1523
- exports.fabFormatsProcessor = new FabFormatsProcessor();
1524
- //# sourceMappingURL=fab-formats-processor.js.map