ai-first-cli 1.2.3 → 1.3.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 (470) hide show
  1. package/CHANGELOG.md +292 -6
  2. package/README.md +24 -4
  3. package/dist/analyzers/symbols.d.ts.map +1 -1
  4. package/dist/analyzers/symbols.js +9 -7
  5. package/dist/analyzers/symbols.js.map +1 -1
  6. package/dist/analyzers/techStack.d.ts.map +1 -1
  7. package/dist/analyzers/techStack.js +198 -3
  8. package/dist/analyzers/techStack.js.map +1 -1
  9. package/dist/commands/ai-first.d.ts.map +1 -1
  10. package/dist/commands/ai-first.js +14 -13
  11. package/dist/commands/ai-first.js.map +1 -1
  12. package/dist/core/analysis/architectureDetector.d.ts +37 -0
  13. package/dist/core/analysis/architectureDetector.d.ts.map +1 -0
  14. package/dist/core/analysis/architectureDetector.js +316 -0
  15. package/dist/core/analysis/architectureDetector.js.map +1 -0
  16. package/dist/core/analysis/callGraphBuilder.d.ts +37 -0
  17. package/dist/core/analysis/callGraphBuilder.d.ts.map +1 -0
  18. package/dist/core/analysis/callGraphBuilder.js +101 -0
  19. package/dist/core/analysis/callGraphBuilder.js.map +1 -0
  20. package/dist/core/analysis/dependencyAnalyzer.d.ts +45 -0
  21. package/dist/core/analysis/dependencyAnalyzer.d.ts.map +1 -0
  22. package/dist/core/analysis/dependencyAnalyzer.js +98 -0
  23. package/dist/core/analysis/dependencyAnalyzer.js.map +1 -0
  24. package/dist/core/analysis/index.d.ts +5 -0
  25. package/dist/core/analysis/index.d.ts.map +1 -0
  26. package/dist/core/analysis/index.js +5 -0
  27. package/dist/core/analysis/index.js.map +1 -0
  28. package/dist/core/analysis/inheritanceAnalyzer.d.ts +35 -0
  29. package/dist/core/analysis/inheritanceAnalyzer.d.ts.map +1 -0
  30. package/dist/core/analysis/inheritanceAnalyzer.js +115 -0
  31. package/dist/core/analysis/inheritanceAnalyzer.js.map +1 -0
  32. package/dist/core/ccp.d.ts.map +1 -1
  33. package/dist/core/ccp.js +3 -2
  34. package/dist/core/ccp.js.map +1 -1
  35. package/dist/core/generation/aiContextGenerator.d.ts +71 -0
  36. package/dist/core/generation/aiContextGenerator.d.ts.map +1 -0
  37. package/dist/core/generation/aiContextGenerator.js +217 -0
  38. package/dist/core/generation/aiContextGenerator.js.map +1 -0
  39. package/dist/core/generation/architectureGenerator.d.ts +17 -0
  40. package/dist/core/generation/architectureGenerator.d.ts.map +1 -0
  41. package/dist/core/generation/architectureGenerator.js +160 -0
  42. package/dist/core/generation/architectureGenerator.js.map +1 -0
  43. package/dist/core/generation/flowGenerator.d.ts +52 -0
  44. package/dist/core/generation/flowGenerator.d.ts.map +1 -0
  45. package/dist/core/generation/flowGenerator.js +164 -0
  46. package/dist/core/generation/flowGenerator.js.map +1 -0
  47. package/dist/core/generation/index.d.ts +4 -0
  48. package/dist/core/generation/index.d.ts.map +1 -0
  49. package/dist/core/generation/index.js +4 -0
  50. package/dist/core/generation/index.js.map +1 -0
  51. package/dist/core/hierarchyGenerator.d.ts.map +1 -1
  52. package/dist/core/hierarchyGenerator.js +3 -2
  53. package/dist/core/hierarchyGenerator.js.map +1 -1
  54. package/dist/core/parsers/index.d.ts +20 -0
  55. package/dist/core/parsers/index.d.ts.map +1 -0
  56. package/dist/core/parsers/index.js +76 -0
  57. package/dist/core/parsers/index.js.map +1 -0
  58. package/dist/core/parsers/pythonParser.d.ts +37 -0
  59. package/dist/core/parsers/pythonParser.d.ts.map +1 -0
  60. package/dist/core/parsers/pythonParser.js +229 -0
  61. package/dist/core/parsers/pythonParser.js.map +1 -0
  62. package/dist/core/parsers/typescriptParser.d.ts +54 -0
  63. package/dist/core/parsers/typescriptParser.d.ts.map +1 -0
  64. package/dist/core/parsers/typescriptParser.js +291 -0
  65. package/dist/core/parsers/typescriptParser.js.map +1 -0
  66. package/dist/core/pipeline.d.ts +42 -0
  67. package/dist/core/pipeline.d.ts.map +1 -0
  68. package/dist/core/pipeline.js +172 -0
  69. package/dist/core/pipeline.js.map +1 -0
  70. package/dist/core/semanticContexts.js +1 -1
  71. package/dist/core/semanticContexts.js.map +1 -1
  72. package/dist/utils/constants.d.ts +46 -0
  73. package/dist/utils/constants.d.ts.map +1 -0
  74. package/dist/utils/constants.js +67 -0
  75. package/dist/utils/constants.js.map +1 -0
  76. package/package.json +1 -1
  77. package/run-all-tests.sh +184 -0
  78. package/src/analyzers/symbols.ts +12 -7
  79. package/src/analyzers/techStack.ts +203 -3
  80. package/src/commands/ai-first.ts +14 -13
  81. package/src/core/analysis/architectureDetector.ts +487 -0
  82. package/src/core/analysis/callGraphBuilder.ts +158 -0
  83. package/src/core/analysis/dependencyAnalyzer.ts +167 -0
  84. package/src/core/analysis/index.ts +28 -0
  85. package/src/core/analysis/inheritanceAnalyzer.ts +169 -0
  86. package/src/core/ccp.ts +3 -2
  87. package/src/core/generation/aiContextGenerator.ts +335 -0
  88. package/src/core/generation/architectureGenerator.ts +200 -0
  89. package/src/core/generation/flowGenerator.ts +238 -0
  90. package/src/core/generation/index.ts +16 -0
  91. package/src/core/hierarchyGenerator.ts +3 -2
  92. package/src/core/parsers/index.ts +99 -0
  93. package/src/core/parsers/pythonParser.ts +302 -0
  94. package/src/core/parsers/typescriptParser.ts +445 -0
  95. package/src/core/pipeline.ts +241 -0
  96. package/src/core/semanticContexts.ts +1 -1
  97. package/src/utils/constants.ts +78 -0
  98. package/tests/analysis.test.ts +283 -0
  99. package/tests/architectureDetector.test.ts +137 -0
  100. package/tests/generation.test.ts +216 -0
  101. package/tests/parserRegistry.test.ts +139 -0
  102. package/tests/pipeline.integration.test.ts +245 -0
  103. package/tests/pythonParser.test.ts +210 -0
  104. package/tests/typescriptParser.test.ts +197 -0
  105. package/.ai-dev/index.db +0 -0
  106. package/ANALISIS_COMPLETO.md +0 -424
  107. package/ANALISIS_MEJORAS.md +0 -327
  108. package/BUGS.md +0 -455
  109. package/PLAN_MEJORAS.md +0 -216
  110. package/STATUS_ADAPTADORES +0 -126
  111. package/TEST_RESULTS.md +0 -198
  112. package/TEST_RESULTS_COMPARATIVE.md +0 -159
  113. package/TEST_RESULTS_COMPLETE.md +0 -127
  114. package/TEST_RESULTS_COMPREHENSIVE.md +0 -208
  115. package/TEST_RESULTS_PHASE1.md +0 -420
  116. package/ai/dependencies.json +0 -15
  117. package/ai/graph/knowledge-graph.json +0 -12
  118. package/ai-context/ai_context.md +0 -130
  119. package/ai-context/ai_rules.md +0 -54
  120. package/ai-context/architecture.md +0 -136
  121. package/ai-context/cache.json +0 -2349
  122. package/ai-context/ccp/jira-123/context.json +0 -7
  123. package/ai-context/context/features/commands.json +0 -18
  124. package/ai-context/context/features/src.json +0 -61
  125. package/ai-context/context/features/test-projects.json +0 -69
  126. package/ai-context/context/flows/account.json +0 -9
  127. package/ai-context/context/flows/ai-first.json +0 -9
  128. package/ai-context/context/flows/api.json +0 -9
  129. package/ai-context/context/flows/auth.json +0 -13
  130. package/ai-context/context/flows/category.json +0 -12
  131. package/ai-context/context/flows/comment.json +0 -16
  132. package/ai-context/context/flows/dashboard.json +0 -9
  133. package/ai-context/context/flows/doctor.json +0 -9
  134. package/ai-context/context/flows/explore.json +0 -9
  135. package/ai-context/context/flows/login.json +0 -9
  136. package/ai-context/context/flows/opportunity.json +0 -9
  137. package/ai-context/context/flows/post.json +0 -18
  138. package/ai-context/context/flows/routes.json +0 -19
  139. package/ai-context/context/flows/user.json +0 -20
  140. package/ai-context/context/flows/users.json +0 -9
  141. package/ai-context/context/flows/views.json +0 -14
  142. package/ai-context/context/repo.json +0 -56
  143. package/ai-context/context/utils.json +0 -7
  144. package/ai-context/conventions.md +0 -53
  145. package/ai-context/dependencies.json +0 -2978
  146. package/ai-context/embeddings.json +0 -23828
  147. package/ai-context/entrypoints.md +0 -42
  148. package/ai-context/files.json +0 -2944
  149. package/ai-context/git/commit-activity.json +0 -8646
  150. package/ai-context/git/recent-features.json +0 -1
  151. package/ai-context/git/recent-files.json +0 -52
  152. package/ai-context/git/recent-flows.json +0 -1
  153. package/ai-context/graph/knowledge-graph.json +0 -44129
  154. package/ai-context/graph/module-graph.json +0 -866
  155. package/ai-context/graph/symbol-graph.json +0 -200622
  156. package/ai-context/graph/symbol-references.json +0 -6778
  157. package/ai-context/hierarchy.json +0 -20
  158. package/ai-context/index-state.json +0 -4487
  159. package/ai-context/index.db +0 -0
  160. package/ai-context/modules.json +0 -933
  161. package/ai-context/project.json +0 -30
  162. package/ai-context/repo_map.json +0 -9116
  163. package/ai-context/repo_map.md +0 -2061
  164. package/ai-context/schema.json +0 -5
  165. package/ai-context/summary.md +0 -47
  166. package/ai-context/symbols.json +0 -65351
  167. package/ai-context/tech_stack.md +0 -47
  168. package/ai-context/tools.json +0 -10
  169. package/test-projects/django-app/.ai-dev/index.db +0 -0
  170. package/test-projects/django-app/ai-context/ai_context.md +0 -92
  171. package/test-projects/django-app/ai-context/ai_rules.md +0 -47
  172. package/test-projects/django-app/ai-context/architecture.md +0 -57
  173. package/test-projects/django-app/ai-context/cache.json +0 -169
  174. package/test-projects/django-app/ai-context/context/flows/views.json +0 -10
  175. package/test-projects/django-app/ai-context/conventions.md +0 -51
  176. package/test-projects/django-app/ai-context/dependencies.json +0 -312
  177. package/test-projects/django-app/ai-context/entrypoints.md +0 -4
  178. package/test-projects/django-app/ai-context/files.json +0 -209
  179. package/test-projects/django-app/ai-context/graph/knowledge-graph.json +0 -36
  180. package/test-projects/django-app/ai-context/graph/module-graph.json +0 -145
  181. package/test-projects/django-app/ai-context/graph/symbol-graph.json +0 -1488
  182. package/test-projects/django-app/ai-context/graph/symbol-references.json +0 -1
  183. package/test-projects/django-app/ai-context/index-state.json +0 -294
  184. package/test-projects/django-app/ai-context/index.db +0 -0
  185. package/test-projects/django-app/ai-context/modules.json +0 -35
  186. package/test-projects/django-app/ai-context/project.json +0 -11
  187. package/test-projects/django-app/ai-context/repo_map.json +0 -412
  188. package/test-projects/django-app/ai-context/repo_map.md +0 -105
  189. package/test-projects/django-app/ai-context/schema.json +0 -5
  190. package/test-projects/django-app/ai-context/summary.md +0 -15
  191. package/test-projects/django-app/ai-context/symbols.json +0 -1
  192. package/test-projects/django-app/ai-context/tech_stack.md +0 -32
  193. package/test-projects/django-app/ai-context/tools.json +0 -10
  194. package/test-projects/express-api/ai-context/ai_context.md +0 -112
  195. package/test-projects/express-api/ai-context/ai_rules.md +0 -50
  196. package/test-projects/express-api/ai-context/architecture.md +0 -62
  197. package/test-projects/express-api/ai-context/context/features/controllers.json +0 -13
  198. package/test-projects/express-api/ai-context/context/features/services.json +0 -13
  199. package/test-projects/express-api/ai-context/context/flows/auth.json +0 -12
  200. package/test-projects/express-api/ai-context/context/flows/user.json +0 -13
  201. package/test-projects/express-api/ai-context/conventions.md +0 -51
  202. package/test-projects/express-api/ai-context/dependencies.json +0 -54
  203. package/test-projects/express-api/ai-context/entrypoints.md +0 -17
  204. package/test-projects/express-api/ai-context/modules.json +0 -30
  205. package/test-projects/express-api/ai-context/project.json +0 -15
  206. package/test-projects/express-api/ai-context/repo_map.json +0 -100
  207. package/test-projects/express-api/ai-context/repo_map.md +0 -36
  208. package/test-projects/express-api/ai-context/schema.json +0 -5
  209. package/test-projects/express-api/ai-context/summary.md +0 -14
  210. package/test-projects/express-api/ai-context/symbols.json +0 -7
  211. package/test-projects/express-api/ai-context/tech_stack.md +0 -38
  212. package/test-projects/express-api/ai-context/tools.json +0 -10
  213. package/test-projects/fastapi-app/.ai-dev/index.db +0 -0
  214. package/test-projects/fastapi-app/ai-context/ai_context.md +0 -89
  215. package/test-projects/fastapi-app/ai-context/ai_rules.md +0 -47
  216. package/test-projects/fastapi-app/ai-context/architecture.md +0 -39
  217. package/test-projects/fastapi-app/ai-context/cache.json +0 -125
  218. package/test-projects/fastapi-app/ai-context/conventions.md +0 -51
  219. package/test-projects/fastapi-app/ai-context/dependencies.json +0 -244
  220. package/test-projects/fastapi-app/ai-context/entrypoints.md +0 -4
  221. package/test-projects/fastapi-app/ai-context/files.json +0 -154
  222. package/test-projects/fastapi-app/ai-context/graph/knowledge-graph.json +0 -15
  223. package/test-projects/fastapi-app/ai-context/graph/module-graph.json +0 -78
  224. package/test-projects/fastapi-app/ai-context/graph/symbol-graph.json +0 -1724
  225. package/test-projects/fastapi-app/ai-context/graph/symbol-references.json +0 -51
  226. package/test-projects/fastapi-app/ai-context/index-state.json +0 -217
  227. package/test-projects/fastapi-app/ai-context/index.db +0 -0
  228. package/test-projects/fastapi-app/ai-context/modules.json +0 -16
  229. package/test-projects/fastapi-app/ai-context/project.json +0 -9
  230. package/test-projects/fastapi-app/ai-context/repo_map.json +0 -298
  231. package/test-projects/fastapi-app/ai-context/repo_map.md +0 -74
  232. package/test-projects/fastapi-app/ai-context/schema.json +0 -5
  233. package/test-projects/fastapi-app/ai-context/summary.md +0 -12
  234. package/test-projects/fastapi-app/ai-context/symbols.json +0 -1
  235. package/test-projects/fastapi-app/ai-context/tech_stack.md +0 -32
  236. package/test-projects/fastapi-app/ai-context/tools.json +0 -10
  237. package/test-projects/flask-app/.ai-dev/index.db +0 -0
  238. package/test-projects/flask-app/ai-context/ai_context.md +0 -94
  239. package/test-projects/flask-app/ai-context/ai_rules.md +0 -47
  240. package/test-projects/flask-app/ai-context/architecture.md +0 -49
  241. package/test-projects/flask-app/ai-context/cache.json +0 -157
  242. package/test-projects/flask-app/ai-context/context/features/app.json +0 -25
  243. package/test-projects/flask-app/ai-context/context/flows/routes.json +0 -14
  244. package/test-projects/flask-app/ai-context/conventions.md +0 -51
  245. package/test-projects/flask-app/ai-context/dependencies.json +0 -298
  246. package/test-projects/flask-app/ai-context/entrypoints.md +0 -4
  247. package/test-projects/flask-app/ai-context/files.json +0 -194
  248. package/test-projects/flask-app/ai-context/graph/knowledge-graph.json +0 -60
  249. package/test-projects/flask-app/ai-context/graph/module-graph.json +0 -95
  250. package/test-projects/flask-app/ai-context/graph/symbol-graph.json +0 -1448
  251. package/test-projects/flask-app/ai-context/graph/symbol-references.json +0 -45
  252. package/test-projects/flask-app/ai-context/index-state.json +0 -273
  253. package/test-projects/flask-app/ai-context/index.db +0 -0
  254. package/test-projects/flask-app/ai-context/modules.json +0 -21
  255. package/test-projects/flask-app/ai-context/project.json +0 -13
  256. package/test-projects/flask-app/ai-context/repo_map.json +0 -400
  257. package/test-projects/flask-app/ai-context/repo_map.md +0 -98
  258. package/test-projects/flask-app/ai-context/schema.json +0 -5
  259. package/test-projects/flask-app/ai-context/summary.md +0 -13
  260. package/test-projects/flask-app/ai-context/symbols.json +0 -1
  261. package/test-projects/flask-app/ai-context/tech_stack.md +0 -32
  262. package/test-projects/flask-app/ai-context/tools.json +0 -10
  263. package/test-projects/laravel-app/.ai-dev/index.db +0 -0
  264. package/test-projects/laravel-app/ai-context/ai_context.md +0 -97
  265. package/test-projects/laravel-app/ai-context/ai_rules.md +0 -47
  266. package/test-projects/laravel-app/ai-context/architecture.md +0 -60
  267. package/test-projects/laravel-app/ai-context/cache.json +0 -161
  268. package/test-projects/laravel-app/ai-context/context/features/app.json +0 -21
  269. package/test-projects/laravel-app/ai-context/context/flows/.json +0 -9
  270. package/test-projects/laravel-app/ai-context/context/flows/category.json +0 -12
  271. package/test-projects/laravel-app/ai-context/context/flows/comment.json +0 -12
  272. package/test-projects/laravel-app/ai-context/context/flows/post.json +0 -12
  273. package/test-projects/laravel-app/ai-context/context/flows/unnamed.json +0 -9
  274. package/test-projects/laravel-app/ai-context/conventions.md +0 -51
  275. package/test-projects/laravel-app/ai-context/dependencies.json +0 -6
  276. package/test-projects/laravel-app/ai-context/entrypoints.md +0 -4
  277. package/test-projects/laravel-app/ai-context/files.json +0 -199
  278. package/test-projects/laravel-app/ai-context/graph/knowledge-graph.json +0 -98
  279. package/test-projects/laravel-app/ai-context/graph/module-graph.json +0 -30
  280. package/test-projects/laravel-app/ai-context/graph/symbol-graph.json +0 -5
  281. package/test-projects/laravel-app/ai-context/graph/symbol-references.json +0 -1
  282. package/test-projects/laravel-app/ai-context/index-state.json +0 -280
  283. package/test-projects/laravel-app/ai-context/index.db +0 -0
  284. package/test-projects/laravel-app/ai-context/modules.json +0 -29
  285. package/test-projects/laravel-app/ai-context/project.json +0 -17
  286. package/test-projects/laravel-app/ai-context/repo_map.json +0 -419
  287. package/test-projects/laravel-app/ai-context/repo_map.md +0 -106
  288. package/test-projects/laravel-app/ai-context/schema.json +0 -5
  289. package/test-projects/laravel-app/ai-context/summary.md +0 -15
  290. package/test-projects/laravel-app/ai-context/symbols.json +0 -1
  291. package/test-projects/laravel-app/ai-context/tech_stack.md +0 -34
  292. package/test-projects/laravel-app/ai-context/tools.json +0 -10
  293. package/test-projects/nestjs-backend/.ai-dev/index.db +0 -0
  294. package/test-projects/nestjs-backend/ai-context/ai_context.md +0 -111
  295. package/test-projects/nestjs-backend/ai-context/ai_rules.md +0 -52
  296. package/test-projects/nestjs-backend/ai-context/architecture.md +0 -49
  297. package/test-projects/nestjs-backend/ai-context/cache.json +0 -169
  298. package/test-projects/nestjs-backend/ai-context/context/features/src.json +0 -23
  299. package/test-projects/nestjs-backend/ai-context/context/flows/auth.controller.json +0 -14
  300. package/test-projects/nestjs-backend/ai-context/context/flows/auth.json +0 -10
  301. package/test-projects/nestjs-backend/ai-context/context/flows/users..json +0 -10
  302. package/test-projects/nestjs-backend/ai-context/context/flows/users.controller.json +0 -14
  303. package/test-projects/nestjs-backend/ai-context/context/flows/users.json +0 -10
  304. package/test-projects/nestjs-backend/ai-context/conventions.md +0 -52
  305. package/test-projects/nestjs-backend/ai-context/dependencies.json +0 -152
  306. package/test-projects/nestjs-backend/ai-context/entrypoints.md +0 -18
  307. package/test-projects/nestjs-backend/ai-context/files.json +0 -209
  308. package/test-projects/nestjs-backend/ai-context/graph/knowledge-graph.json +0 -132
  309. package/test-projects/nestjs-backend/ai-context/graph/module-graph.json +0 -29
  310. package/test-projects/nestjs-backend/ai-context/graph/symbol-graph.json +0 -304
  311. package/test-projects/nestjs-backend/ai-context/graph/symbol-references.json +0 -5
  312. package/test-projects/nestjs-backend/ai-context/index-state.json +0 -294
  313. package/test-projects/nestjs-backend/ai-context/index.db +0 -0
  314. package/test-projects/nestjs-backend/ai-context/modules.json +0 -19
  315. package/test-projects/nestjs-backend/ai-context/project.json +0 -18
  316. package/test-projects/nestjs-backend/ai-context/repo_map.json +0 -427
  317. package/test-projects/nestjs-backend/ai-context/repo_map.md +0 -104
  318. package/test-projects/nestjs-backend/ai-context/schema.json +0 -5
  319. package/test-projects/nestjs-backend/ai-context/summary.md +0 -13
  320. package/test-projects/nestjs-backend/ai-context/symbols.json +0 -1
  321. package/test-projects/nestjs-backend/ai-context/tech_stack.md +0 -38
  322. package/test-projects/nestjs-backend/ai-context/tools.json +0 -10
  323. package/test-projects/python-cli/.ai-dev/index.db +0 -0
  324. package/test-projects/python-cli/ai-context/ai_context.md +0 -95
  325. package/test-projects/python-cli/ai-context/ai_rules.md +0 -47
  326. package/test-projects/python-cli/ai-context/architecture.md +0 -55
  327. package/test-projects/python-cli/ai-context/cache.json +0 -149
  328. package/test-projects/python-cli/ai-context/context/features/cli.json +0 -16
  329. package/test-projects/python-cli/ai-context/context/flows/list_.json +0 -9
  330. package/test-projects/python-cli/ai-context/context/flows/remove_.json +0 -9
  331. package/test-projects/python-cli/ai-context/conventions.md +0 -51
  332. package/test-projects/python-cli/ai-context/dependencies.json +0 -66
  333. package/test-projects/python-cli/ai-context/entrypoints.md +0 -4
  334. package/test-projects/python-cli/ai-context/files.json +0 -184
  335. package/test-projects/python-cli/ai-context/graph/knowledge-graph.json +0 -83
  336. package/test-projects/python-cli/ai-context/graph/module-graph.json +0 -31
  337. package/test-projects/python-cli/ai-context/graph/symbol-graph.json +0 -358
  338. package/test-projects/python-cli/ai-context/graph/symbol-references.json +0 -11
  339. package/test-projects/python-cli/ai-context/index-state.json +0 -259
  340. package/test-projects/python-cli/ai-context/index.db +0 -0
  341. package/test-projects/python-cli/ai-context/modules.json +0 -21
  342. package/test-projects/python-cli/ai-context/project.json +0 -15
  343. package/test-projects/python-cli/ai-context/repo_map.json +0 -367
  344. package/test-projects/python-cli/ai-context/repo_map.md +0 -93
  345. package/test-projects/python-cli/ai-context/schema.json +0 -5
  346. package/test-projects/python-cli/ai-context/summary.md +0 -14
  347. package/test-projects/python-cli/ai-context/symbols.json +0 -1
  348. package/test-projects/python-cli/ai-context/tech_stack.md +0 -32
  349. package/test-projects/python-cli/ai-context/tools.json +0 -10
  350. package/test-projects/rails-app/.ai-dev/index.db +0 -0
  351. package/test-projects/rails-app/ai-context/ai_context.md +0 -94
  352. package/test-projects/rails-app/ai-context/ai_rules.md +0 -47
  353. package/test-projects/rails-app/ai-context/architecture.md +0 -49
  354. package/test-projects/rails-app/ai-context/cache.json +0 -193
  355. package/test-projects/rails-app/ai-context/context/features/app.json +0 -24
  356. package/test-projects/rails-app/ai-context/context/features/config.json +0 -13
  357. package/test-projects/rails-app/ai-context/context/flows/application.json +0 -9
  358. package/test-projects/rails-app/ai-context/context/flows/application_.json +0 -9
  359. package/test-projects/rails-app/ai-context/context/flows/comments.json +0 -11
  360. package/test-projects/rails-app/ai-context/context/flows/comments_.json +0 -11
  361. package/test-projects/rails-app/ai-context/context/flows/posts.json +0 -11
  362. package/test-projects/rails-app/ai-context/context/flows/posts_.json +0 -11
  363. package/test-projects/rails-app/ai-context/context/flows/routes.json +0 -9
  364. package/test-projects/rails-app/ai-context/context/flows/users.json +0 -11
  365. package/test-projects/rails-app/ai-context/context/flows/users_.json +0 -11
  366. package/test-projects/rails-app/ai-context/conventions.md +0 -51
  367. package/test-projects/rails-app/ai-context/dependencies.json +0 -6
  368. package/test-projects/rails-app/ai-context/entrypoints.md +0 -4
  369. package/test-projects/rails-app/ai-context/files.json +0 -239
  370. package/test-projects/rails-app/ai-context/graph/knowledge-graph.json +0 -130
  371. package/test-projects/rails-app/ai-context/graph/module-graph.json +0 -27
  372. package/test-projects/rails-app/ai-context/graph/symbol-graph.json +0 -5
  373. package/test-projects/rails-app/ai-context/graph/symbol-references.json +0 -1
  374. package/test-projects/rails-app/ai-context/index-state.json +0 -336
  375. package/test-projects/rails-app/ai-context/index.db +0 -0
  376. package/test-projects/rails-app/ai-context/modules.json +0 -26
  377. package/test-projects/rails-app/ai-context/project.json +0 -22
  378. package/test-projects/rails-app/ai-context/repo_map.json +0 -486
  379. package/test-projects/rails-app/ai-context/repo_map.md +0 -117
  380. package/test-projects/rails-app/ai-context/schema.json +0 -5
  381. package/test-projects/rails-app/ai-context/summary.md +0 -13
  382. package/test-projects/rails-app/ai-context/symbols.json +0 -1
  383. package/test-projects/rails-app/ai-context/tech_stack.md +0 -32
  384. package/test-projects/rails-app/ai-context/tools.json +0 -10
  385. package/test-projects/react-app/.ai-dev/index.db +0 -0
  386. package/test-projects/react-app/ai-context/ai_context.md +0 -96
  387. package/test-projects/react-app/ai-context/ai_rules.md +0 -49
  388. package/test-projects/react-app/ai-context/architecture.md +0 -39
  389. package/test-projects/react-app/ai-context/cache.json +0 -153
  390. package/test-projects/react-app/ai-context/context/features/src.json +0 -18
  391. package/test-projects/react-app/ai-context/context/flows/UsersPage.json +0 -14
  392. package/test-projects/react-app/ai-context/context/flows/dashboard.json +0 -9
  393. package/test-projects/react-app/ai-context/context/flows/login.json +0 -9
  394. package/test-projects/react-app/ai-context/context/flows/users.json +0 -9
  395. package/test-projects/react-app/ai-context/conventions.md +0 -52
  396. package/test-projects/react-app/ai-context/dependencies.json +0 -128
  397. package/test-projects/react-app/ai-context/entrypoints.md +0 -4
  398. package/test-projects/react-app/ai-context/files.json +0 -189
  399. package/test-projects/react-app/ai-context/graph/knowledge-graph.json +0 -112
  400. package/test-projects/react-app/ai-context/graph/module-graph.json +0 -31
  401. package/test-projects/react-app/ai-context/graph/symbol-graph.json +0 -868
  402. package/test-projects/react-app/ai-context/graph/symbol-references.json +0 -31
  403. package/test-projects/react-app/ai-context/index-state.json +0 -266
  404. package/test-projects/react-app/ai-context/index.db +0 -0
  405. package/test-projects/react-app/ai-context/modules.json +0 -17
  406. package/test-projects/react-app/ai-context/project.json +0 -16
  407. package/test-projects/react-app/ai-context/repo_map.json +0 -391
  408. package/test-projects/react-app/ai-context/repo_map.md +0 -94
  409. package/test-projects/react-app/ai-context/schema.json +0 -5
  410. package/test-projects/react-app/ai-context/summary.md +0 -13
  411. package/test-projects/react-app/ai-context/symbols.json +0 -1
  412. package/test-projects/react-app/ai-context/tech_stack.md +0 -39
  413. package/test-projects/react-app/ai-context/tools.json +0 -10
  414. package/test-projects/salesforce-cli/.ai-dev/index.db +0 -0
  415. package/test-projects/salesforce-cli/ai-context/ai_context.md +0 -89
  416. package/test-projects/salesforce-cli/ai-context/ai_rules.md +0 -47
  417. package/test-projects/salesforce-cli/ai-context/architecture.md +0 -39
  418. package/test-projects/salesforce-cli/ai-context/cache.json +0 -125
  419. package/test-projects/salesforce-cli/ai-context/context/features/force-app.json +0 -14
  420. package/test-projects/salesforce-cli/ai-context/context/flows/account.json +0 -9
  421. package/test-projects/salesforce-cli/ai-context/context/flows/opportunity.json +0 -9
  422. package/test-projects/salesforce-cli/ai-context/conventions.md +0 -51
  423. package/test-projects/salesforce-cli/ai-context/dependencies.json +0 -6
  424. package/test-projects/salesforce-cli/ai-context/entrypoints.md +0 -4
  425. package/test-projects/salesforce-cli/ai-context/files.json +0 -154
  426. package/test-projects/salesforce-cli/ai-context/graph/knowledge-graph.json +0 -64
  427. package/test-projects/salesforce-cli/ai-context/graph/module-graph.json +0 -13
  428. package/test-projects/salesforce-cli/ai-context/graph/symbol-graph.json +0 -148
  429. package/test-projects/salesforce-cli/ai-context/graph/symbol-references.json +0 -1
  430. package/test-projects/salesforce-cli/ai-context/index-state.json +0 -217
  431. package/test-projects/salesforce-cli/ai-context/index.db +0 -0
  432. package/test-projects/salesforce-cli/ai-context/modules.json +0 -12
  433. package/test-projects/salesforce-cli/ai-context/project.json +0 -14
  434. package/test-projects/salesforce-cli/ai-context/repo_map.json +0 -328
  435. package/test-projects/salesforce-cli/ai-context/repo_map.md +0 -80
  436. package/test-projects/salesforce-cli/ai-context/schema.json +0 -5
  437. package/test-projects/salesforce-cli/ai-context/summary.md +0 -13
  438. package/test-projects/salesforce-cli/ai-context/symbols.json +0 -1
  439. package/test-projects/salesforce-cli/ai-context/tech_stack.md +0 -31
  440. package/test-projects/salesforce-cli/ai-context/tools.json +0 -10
  441. package/test-projects/spring-boot-app/.ai-dev/index.db +0 -0
  442. package/test-projects/spring-boot-app/ai-context/ai_context.md +0 -91
  443. package/test-projects/spring-boot-app/ai-context/ai_rules.md +0 -48
  444. package/test-projects/spring-boot-app/ai-context/architecture.md +0 -39
  445. package/test-projects/spring-boot-app/ai-context/cache.json +0 -173
  446. package/test-projects/spring-boot-app/ai-context/context/features/src.json +0 -26
  447. package/test-projects/spring-boot-app/ai-context/context/flows/PostController.json +0 -19
  448. package/test-projects/spring-boot-app/ai-context/context/flows/UserController.json +0 -19
  449. package/test-projects/spring-boot-app/ai-context/context/flows/comment.json +0 -11
  450. package/test-projects/spring-boot-app/ai-context/context/flows/post.json +0 -14
  451. package/test-projects/spring-boot-app/ai-context/context/flows/user.json +0 -14
  452. package/test-projects/spring-boot-app/ai-context/conventions.md +0 -52
  453. package/test-projects/spring-boot-app/ai-context/dependencies.json +0 -326
  454. package/test-projects/spring-boot-app/ai-context/entrypoints.md +0 -4
  455. package/test-projects/spring-boot-app/ai-context/files.json +0 -214
  456. package/test-projects/spring-boot-app/ai-context/graph/knowledge-graph.json +0 -231
  457. package/test-projects/spring-boot-app/ai-context/graph/module-graph.json +0 -22
  458. package/test-projects/spring-boot-app/ai-context/graph/symbol-graph.json +0 -794
  459. package/test-projects/spring-boot-app/ai-context/graph/symbol-references.json +0 -70
  460. package/test-projects/spring-boot-app/ai-context/index-state.json +0 -301
  461. package/test-projects/spring-boot-app/ai-context/index.db +0 -0
  462. package/test-projects/spring-boot-app/ai-context/modules.json +0 -21
  463. package/test-projects/spring-boot-app/ai-context/project.json +0 -17
  464. package/test-projects/spring-boot-app/ai-context/repo_map.json +0 -461
  465. package/test-projects/spring-boot-app/ai-context/repo_map.md +0 -109
  466. package/test-projects/spring-boot-app/ai-context/schema.json +0 -5
  467. package/test-projects/spring-boot-app/ai-context/summary.md +0 -12
  468. package/test-projects/spring-boot-app/ai-context/symbols.json +0 -1
  469. package/test-projects/spring-boot-app/ai-context/tech_stack.md +0 -32
  470. package/test-projects/spring-boot-app/ai-context/tools.json +0 -10
@@ -1,126 +0,0 @@
1
- # 📊 ESTADO DE ADAPTADORES - Phase 2 Completado
2
-
3
- ## ✅ PROGRESO PHASE 2 - COMPLETADO ✅
4
-
5
- ---
6
-
7
- ## 📋 Test Results - Symbol Extraction (11/11 PASS)
8
-
9
- | # | Adapter | Extension | Test File | Symbols | Status |
10
- |---|---------|-----------|-----------|---------|--------|
11
- | 1 | Django | .py | blog/models.py | 10 | ✅ PASS |
12
- | 2 | Laravel | .php | Controller.php | 1 | ✅ PASS |
13
- | 3 | FastAPI | .py | app/main.py | 2 | ✅ PASS |
14
- | 4 | Flask | .py | app/models.py | 17 | ✅ PASS |
15
- | 5 | Rails | .rb | app/models/user.rb | 4 | ✅ PASS |
16
- | 6 | Spring Boot | .java | DemoApplication.java | 2 | ✅ PASS |
17
- | 7 | NestJS | .ts | src/main.ts | 2 | ✅ PASS |
18
- | 8 | Express | .js | index.js | 7 | ✅ PASS |
19
- | 9 | React | .tsx | src/App.tsx | 1 | ✅ PASS |
20
- | 10 | Salesforce | .cls | AccountController.cls | 3 | ✅ PASS |
21
- | 11 | Python CLI | .py | main.py | 1 | ✅ PASS |
22
-
23
- **Total: 11/11 Adapters Passing (100%)** ✅
24
-
25
- ---
26
-
27
- ## 🐛 Bugs Fixed in Phase 2
28
-
29
- ### 1. PHP Parser - Laravel Adapter ✅
30
- **Previously:** 0 symbols extracted
31
- **Fixed:** Added `parsePHP()` function in `src/analyzers/symbols.ts`
32
- **Test:** Controller.php now extracts 1 symbol (Controller class)
33
-
34
- ### 2. Ruby Parser - Rails Adapter ✅
35
- **Previously:** 0 symbols extracted
36
- **Fixed:** Added `parseRuby()` function in `src/analyzers/symbols.ts`
37
- **Test:** user.rb now extracts 4 symbols (User, full_name, deactivate, activate)
38
-
39
- ### 3. Extension Format Bug ✅
40
- **Previously:** Extension checks used `"js"` instead of `".js"`
41
- **Fixed:** All extension checks now use format with dot
42
- **Impact:** All JS/TS symbol extraction was broken
43
-
44
- ---
45
-
46
- ## 📊 Cobertura Total de Adapters: 11/16 (68.75%)
47
-
48
- | Adapter | Test Project | Status | Notes |
49
- |---------|--------------|--------|-------|
50
- | JavaScript/TypeScript | express-api, react-app | ✅ | |
51
- | NestJS | nestjs-backend | ✅ | |
52
- | Python | python-cli, django-app, fastapi-app, flask-app | ✅ | |
53
- | Django | django-app | ✅ | |
54
- | FastAPI | fastapi-app | ✅ | |
55
- | Flask | flask-app | ✅ | |
56
- | Laravel | laravel-app | ✅ | Fixed PHP parser |
57
- | Rails | rails-app | ✅ | Fixed Ruby parser |
58
- | Spring Boot | spring-boot-app | ✅ | |
59
- | Salesforce | salesforce-cli | ✅ | |
60
- | PHP | laravel-app | ✅ | |
61
- | Ruby | rails-app | ✅ | |
62
- | Elixir Phoenix | - | ❌ | |
63
- | .NET | - | ❌ | |
64
- | ASP.NET Core | - | ❌ | |
65
- | Blazor | - | ❌ | |
66
-
67
- ---
68
-
69
- ## 🔧 Test Projects
70
-
71
- | # | Framework | Path | AI Context Status |
72
- |---|-----------|------|-------------------|
73
- | 1 | Django | test-projects/django-app | ✅ |
74
- | 2 | Laravel | test-projects/laravel-app | ✅ |
75
- | 3 | FastAPI | test-projects/fastapi-app | ✅ |
76
- | 4 | Flask | test-projects/flask-app | ✅ |
77
- | 5 | Rails | test-projects/rails-app | ✅ |
78
- | 6 | Spring Boot | test-projects/spring-boot-app | ✅ |
79
- | 7 | NestJS | test-projects/nestjs-backend | ✅ |
80
- | 8 | Express | test-projects/express-api | ✅ |
81
- | 9 | React | test-projects/react-app | ✅ |
82
- | 10 | Salesforce | test-projects/salesforce-cli | ✅ |
83
- | 11 | Python CLI | test-projects/python-cli | ✅ |
84
-
85
- ---
86
-
87
- ## 📁 Scripts de Prueba
88
-
89
- ### test_adapters.mjs
90
- Ejecuta pruebas de extracción de símbolos para todos los adapters:
91
- ```bash
92
- node test_adapters.mjs
93
- ```
94
-
95
- ### tests/phase2-fixes.test.ts
96
- Pruebas funcionales para los fixes de Phase 2:
97
- - Symbol extraction con extensiones correctas
98
- - Flow name sanitization
99
- - repo_map.json consolidation
100
-
101
- ---
102
-
103
- ## ✅ Criterios de Éxito - Phase 2
104
-
105
- - [x] 11/11 adapters extraen símbolos correctamente
106
- - [x] No hay archivos duplicados (repo-map vs repo_map)
107
- - [x] Nombres de flows sanitizados (sin .. o _)
108
- - [x] Tests funcionales pasando
109
- - [x] Documentación actualizada
110
-
111
- ---
112
-
113
- ## 📝 Commits Realizados
114
-
115
- - `b9d50bc` - fix: Add PHP and Ruby parsers for symbol extraction
116
- - `9fb4196` - test: Add functional tests for Phase 2 fixes
117
- - `c6a8a31` - chore: Regenerate main project AI context with sanitized flow names
118
- - `a9bf9df` - chore: Regenerate test project AI contexts and clean up malformed files
119
- - `2b4f1a2` - fix(Phase 2): Core code fixes for symbol extraction and flow names
120
- - `0559783` - fix(Phase 2): Multiple code quality improvements
121
-
122
- ---
123
-
124
- *Estado actualizado: 2026-03-18*
125
- *Phase 2: ✅ COMPLETADO*
126
- *Branch: feature/phase-2-code-quality*
package/TEST_RESULTS.md DELETED
@@ -1,198 +0,0 @@
1
- # ai-first-cli Test Results - POST BUG FIXES
2
- ## Fecha: 2026-03-17
3
- ## Ejecutado por: Sisyphus (Post Fix)
4
-
5
- ---
6
-
7
- ## 🎉 RESUMEN: TODOS LOS BUGS CORREGIDOS
8
-
9
- ### Estado General: ✅ 100% FUNCIONAL
10
-
11
- **Comandos que funcionan correctamente (12/12):**
12
- - ✅ `init` - 5/5 proyectos
13
- - ✅ `map` - 5/5 proyectos
14
- - ✅ `doctor` - 5/5 proyectos
15
- - ✅ `index` - **CORREGIDO** ✅ Genera index.db
16
- - ✅ `graph` - **CORREGIDO** ✅ Genera knowledge-graph.json
17
- - ✅ `query` - **CORREGIDO** ✅ Encuentra símbolos
18
- - ✅ `context` - Funciona
19
- - ✅ `summarize` - Funciona
20
- - ✅ `update` - Funciona
21
- - ✅ `explore` - Funciona
22
- - ✅ `adapters` - Funciona
23
- - ✅ `git` - Funciona (requiere repo git)
24
-
25
- ---
26
-
27
- ## 📊 RESULTADOS DETALLADOS POR COMANDO
28
-
29
- ### 1. init ✅ FUNCIONA
30
-
31
- **Proyectos probados**: 5/5 exitosos
32
-
33
- | Proyecto | Estado | Features | Flows |
34
- |----------|--------|----------|-------|
35
- | express-api | ✅ | 2 | 2 |
36
- | nestjs-backend | ✅ | 1 | 2 |
37
- | python-cli | ✅ | 1 | 3 |
38
- | react-app | ✅ | 1 | 3 |
39
- | salesforce-cli | ✅ | 1 | 2 |
40
-
41
- ---
42
-
43
- ### 2. map ✅ FUNCIONA
44
-
45
- **Proyectos probados**: 5/5 exitosos
46
-
47
- | Proyecto | Símbolos | Relaciones |
48
- |----------|----------|------------|
49
- | express-api | 49 | 42 |
50
- | nestjs-backend | 18 | 13 |
51
- | python-cli | 14 | 21 |
52
- | react-app | 40 | 50 |
53
- | salesforce-cli | 7 | 7 |
54
-
55
- ---
56
-
57
- ### 3. doctor ✅ FUNCIONA
58
-
59
- **Proyectos probados**: 5/5 - Estado: PARTIALLY READY (sin errores críticos)
60
-
61
- ---
62
-
63
- ### 4. index ✅ CORREGIDO
64
-
65
- **Estado**: ✅ FUNCIONA - Genera index.db correctamente
66
-
67
- **Verificación:**
68
- ```
69
- -rw-r--r-- 1 julian julian 45056 nestjs-backend/ai/index.db
70
- ```
71
-
72
- **Contenido indexado:**
73
- - Files: 36
74
- - Symbols: 18
75
- - Imports: 23
76
-
77
- ---
78
-
79
- ### 5. graph ✅ CORREGIDO
80
-
81
- **Estado**: ✅ FUNCIONA - Genera knowledge-graph.json correctamente
82
-
83
- **Verificación:**
84
- ```
85
- -rw-r--r-- 1 julian julian 1809 express-api/ai/graph/knowledge-graph.json
86
- ```
87
-
88
- **Contenido:**
89
- - Nodes: 4 (2 features, 2 flows)
90
- - Edges: 9 (contains, implements)
91
-
92
- **Nota**: Ahora funciona sin repo git (static analysis)
93
-
94
- ---
95
-
96
- ### 6. query ✅ CORREGIDO
97
-
98
- **Estado**: ✅ FUNCIONA - Encuentra símbolos correctamente
99
-
100
- **Comando probado:**
101
- ```bash
102
- ai-first query symbol AuthController --root test-projects/nestjs-backend
103
- ```
104
-
105
- **Resultado:**
106
- ```
107
- Name | Type | File | Line
108
- -------------------|------------|-------------------------|------
109
- AuthController | class | src/auth/auth.controller.ts| 6
110
-
111
- Total: 1 symbols
112
- EXIT: 0
113
- ```
114
-
115
- ---
116
-
117
- ### 7. context ✅ FUNCIONA
118
-
119
- **Comando probado**: `ai-first context login`
120
-
121
- **Resultado:**
122
- ```
123
- 🎯 Generating context for symbol: login
124
-
125
- 📦 Symbol Context Packet:
126
- ID: controllers/authController.js#login
127
- Type: function
128
- Module: controllers
129
- File: controllers/authController.js:6
130
- Score: 11
131
-
132
- 📊 Relationships:
133
- Imports: 1 ✅
134
- Related symbols: 1 ✅
135
- EXIT: 0
136
- ```
137
-
138
- ---
139
-
140
- ### 8. summarize ✅ FUNCIONA
141
-
142
- **Resultado:**
143
- - Repository: express-api
144
- - Folders: 4
145
- - Files: 7
146
- - Output: ai/hierarchy.json
147
-
148
- ---
149
-
150
- ### 9. update ✅ FUNCIONA
151
-
152
- **Resultado:**
153
- - Changed files: 0 (no cambios)
154
- - Symbols: 0 updated
155
- - EXIT: 0
156
-
157
- ---
158
-
159
- ## 📈 COMPARATIVA: ANTES vs DESPUÉS
160
-
161
- | Comando | Antes | Después |
162
- |---------|-------|---------|
163
- | index | ❌ No generaba index.db | ✅ Genera index.db (45KB) |
164
- | graph | ❌ Exit 1, no generaba | ✅ Exit 0, genera knowledge-graph.json |
165
- | query | ❌ Exit 1, no encontraba | ✅ Exit 0, encuentra símbolos |
166
-
167
- ---
168
-
169
- ## ✅ VERIFICACIÓN FINAL
170
-
171
- ```bash
172
- # Bug A - index
173
- node dist/commands/ai-first.js index --root test-projects/nestjs-backend
174
- # ✅ EXIT 0 - Genera ai/index.db (45056 bytes)
175
-
176
- # Bug B - graph
177
- node dist/commands/ai-first.js graph --root test-projects/express-api
178
- # ✅ EXIT 0 - Genera ai/graph/knowledge-graph.json (1809 bytes)
179
-
180
- # Bug C - query
181
- node dist/commands/ai-first.js query symbol AuthController --root test-projects/nestjs-backend
182
- # ✅ EXIT 0 - Encuentra AuthController
183
- ```
184
-
185
- ---
186
-
187
- ## 🎯 CONCLUSIONES
188
-
189
- **El CLI es 100% funcional:**
190
- - ✅ init, map, doctor, index, graph, query
191
- - ✅ context, summarize, update
192
- - ✅ explore, adapters, git
193
-
194
- **Todos los bugs reportados han sido corregidos exitosamente.**
195
-
196
- ---
197
-
198
- Documento actualizado post-fix: 2026-03-17
@@ -1,159 +0,0 @@
1
- # Comparativa: Resultados Esperados vs Obtenidos
2
-
3
- ## 📊 Resumen de Escenarios de Prueba
4
-
5
- | Bug | Escenario | Esperado | Obtenido | Estado |
6
- |-----|-----------|----------|----------|--------|
7
- | **A** | `index` genera index.db | ✅ Genera en `--root/ai/` | ✅ GENERA index.db (45KB) | ✅ CORREGIDO |
8
- | **B** | `graph` sin git | ✅ Genera knowledge-graph.json | ✅ GENERA con static analysis | ✅ CORREGIDO |
9
- | **C** | `query` encuentra símbolos | ✅ Encuentra símbolos | ✅ Encuentra AuthController | ✅ CORREGIDO |
10
-
11
- ---
12
-
13
- ## 🔍 Detalle por Bug
14
-
15
- ### Bug A: index command - Generación de index.db
16
-
17
- | Aspecto | Antes (Bug) | Después (Corregido) |
18
- |---------|-------------|---------------------|
19
- | **Exit Code** | 0 (engañoso) | 0 |
20
- | **Archivo generado** | ❌ NO se generaba | ✅ `test-projects/nestjs-backend/ai/index.db` |
21
- | **Tamaño** | N/A | 45,056 bytes |
22
- | **Contenido** | N/A | 36 files, 18 symbols, 23 imports |
23
- | **Path** | Se generaba en `process.cwd()` | Se genera en `--root/ai/` |
24
-
25
- **Verificación:**
26
- ```bash
27
- # ANTES
28
- $ ai-first index --root test-projects/nestjs-backend
29
- EXIT: 0
30
- $ ls test-projects/nestjs-backend/ai/index.db
31
- ls: no such file or directory ❌
32
-
33
- # DESPUÉS
34
- $ node dist/commands/ai-first.js index --root test-projects/nestjs-backend
35
- ✅ Index created: test-projects/nestjs-backend/ai/index.db
36
- EXIT: 0
37
- $ ls -la test-projects/nestjs-backend/ai/index.db
38
- -rw-r--r-- 1 julian julian 45056 index.db ✅
39
- ```
40
-
41
- ---
42
-
43
- ### Bug B: graph command - Sin repositorio git
44
-
45
- | Aspecto | Antes (Bug) | Después (Corregido) |
46
- |---------|-------------|---------------------|
47
- | **Exit Code** | ❌ 1 | ✅ 0 |
48
- | **Repositorio git** | ❌ REQUERIDO | ✅ OPCIONAL |
49
- | **Archivo generado** | ❌ NO | ✅ `ai/graph/knowledge-graph.json` |
50
- | **Contenido** | N/A | Nodes: 4, Edges: 9 |
51
- | **Modo de operación** | N/A | Static analysis fallback |
52
-
53
- **Verificación:**
54
- ```bash
55
- # ANTES
56
- $ ai-first graph --root test-projects/express-api
57
- ❌ "Not a git repository"
58
- EXIT: 1 ❌
59
-
60
- # DESPUÉS
61
- $ node dist/commands/ai-first.js graph --root test-projects/express-api
62
- ⚠️ Not a git repository - generating graph from static analysis only
63
- ✅ Generated: ai/graph/knowledge-graph.json
64
- EXIT: 0 ✅
65
- ```
66
-
67
- **Contenido generado:**
68
- ```json
69
- {
70
- "nodes": [
71
- { "id": "auth", "type": "feature" },
72
- { "id": "users", "type": "feature" },
73
- { "id": "login", "type": "flow" },
74
- { "id": "register", "type": "flow" }
75
- ],
76
- "edges": [
77
- { "source": "auth", "target": "login", "type": "contains" },
78
- { "source": "auth", "target": "register", "type": "contains" },
79
- { "source": "login", "target": "auth", "type": "implements" }
80
- // ... total 9 edges
81
- ]
82
- }
83
- ```
84
-
85
- ---
86
-
87
- ### Bug C: query command - Búsqueda de símbolos
88
-
89
- | Aspecto | Antes (Bug) | Después (Corregido) |
90
- |---------|-------------|---------------------|
91
- | **Exit Code** | ❌ 1 | ✅ 0 |
92
- | **Index encontrado** | ❌ NO | ✅ SÍ |
93
- | **Símbolos encontrados** | ❌ 0 | ✅ 1 (AuthController) |
94
- | **Archivo index.db** | ❌ No existía en path correcto | ✅ Existe |
95
-
96
- **Verificación:**
97
- ```bash
98
- # ANTES
99
- $ ai-first query symbol AuthController --root test-projects/nestjs-backend
100
- ❌ "Index not found"
101
- EXIT: 1 ❌
102
-
103
- # DESPUÉS
104
- $ node dist/commands/ai-first.js query symbol AuthController --root test-projects/nestjs-backend
105
- 🔍 Searching for symbol: AuthController
106
-
107
- Found symbols:
108
-
109
- Name | Type | File | Line
110
- -------------------|------------|--------------------------------|------
111
- AuthController | class | src/auth/auth.controller.ts | 6
112
-
113
- Total: 1 symbols
114
- EXIT: 0 ✅
115
- ```
116
-
117
- ---
118
-
119
- ## 📈 Métricas Comparativas Completas
120
-
121
- ### Comandos Funcionales (antes y después)
122
-
123
- | Comando | Proyecto | Antes | Después | Mejora |
124
- |---------|----------|-------|---------|--------|
125
- | **init** | express-api | ✅ Exit 0 | ✅ Exit 0 | - |
126
- | **init** | nestjs-backend | ✅ Exit 0 | ✅ Exit 0 | - |
127
- | **init** | python-cli | ✅ Exit 0 | ✅ Exit 0 | - |
128
- | **init** | react-app | ✅ Exit 0 | ✅ Exit 0 | - |
129
- | **init** | salesforce-cli | ✅ Exit 0 | ✅ Exit 0 | - |
130
- | **map** | express-api | ✅ 49 symbols | ✅ 49 symbols | - |
131
- | **map** | nestjs-backend | ✅ 18 symbols | ✅ 18 symbols | - |
132
- | **map** | python-cli | ✅ 14 symbols | ✅ 14 symbols | - |
133
- | **map** | react-app | ✅ 40 symbols | ✅ 40 symbols | - |
134
- | **map** | salesforce-cli | ✅ 7 symbols | ✅ 7 symbols | - |
135
- | **index** | nestjs-backend | ❌ NO genera index.db | ✅ Genera index.db | 🔧 |
136
- | **graph** | express-api | ❌ Exit 1 | ✅ Exit 0 | 🔧 |
137
- | **query** | nestjs-backend | ❌ Exit 1 | ✅ Encuentra símbolos | 🔧 |
138
-
139
- ---
140
-
141
- ## 🎯 Resumen Ejecutivo
142
-
143
- ### Bugs corregidos: 3/3
144
-
145
- | Bug | Descripción | Corrección |
146
- |-----|-------------|-------------|
147
- | **A** | index generaba en cwd | Se calcula outputPath desde rootDir |
148
- | **B** | graph requería git | Se agregó static analysis fallback |
149
- | **C** | query no hallaba index | Resuelto al corregir Bug A |
150
-
151
- ### Estado final: ✅ 100% FUNCIONAL
152
-
153
- - 12 comandos probados
154
- - 12 comandos funcionando correctamente
155
- - 0 comandos fallando
156
-
157
- ---
158
-
159
- *Documento generado: 2026-03-17*
@@ -1,127 +0,0 @@
1
- # 📊 PRUEBAS EXHAUSTIVAS COMPLETAS - ai-first-cli
2
- ## Fecha: 2026-03-17
3
-
4
- ---
5
-
6
- ## 📋 RESUMEN: 12 COMANDOS × 5 PROYECTOS = 60 PRUEBAS
7
-
8
- | Comando | express-api | nestjs-backend | python-cli | react-app | salesforce-cli | Estado |
9
- |---------|:-----------:|:--------------:|:----------:|:---------:|:--------------:|:------:|
10
- | **init** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ FUNCIONA |
11
- | **map** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ FUNCIONA |
12
- | **doctor** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ FUNCIONA |
13
- | **index** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ FUNCIONA |
14
- | **graph** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ FUNCIONA |
15
- | **query** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ FUNCIONA |
16
- | **context** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ FUNCIONA |
17
- | **explore** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ FUNCIONA |
18
- | **summarize** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ FUNCIONA |
19
- | **update** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ FUNCIONA |
20
- | **adapters** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ FUNCIONA |
21
- | **git** | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ ESPERADO* |
22
-
23
- *git requiere repositorio git real
24
-
25
- ---
26
-
27
- ## 📁 ARCHIVOS GENERADOS (express-api como ejemplo)
28
-
29
- ### 📂 ai/ (Directorio principal)
30
-
31
- | Archivo | Tipo | Tamaño | Descripción |
32
- |---------|------|--------|-------------|
33
- | ai_context.md | Markdown | 2,042 bytes | Contexto unificado para AI |
34
- | ai_rules.md | Markdown | 915 bytes | Reglas específicas del proyecto |
35
- | architecture.md | Markdown | 1,328 bytes | Patrón de arquitectura detectado |
36
- | cache.json | JSON | 3,674 bytes | Caché de análisis |
37
- | conventions.md | Markdown | 811 bytes | Convenciones de código detectadas |
38
- | dependencies.json | JSON | 1,193 bytes | Dependencias del proyecto |
39
- | entrypoints.md | Markdown | 304 bytes | Puntos de entrada detectados |
40
- | files.json | JSON | 3,361 bytes | Índice de archivos |
41
- | index.db | SQLite | 45,056 bytes | Base de datos de índice |
42
- | index-state.json | JSON | 7,530 bytes | Estado del índice |
43
- | modules.json | JSON | 555 bytes | Módulos detectados |
44
- | project.json | JSON | 249 bytes | Metadatos del proyecto |
45
- | repo-map.json | JSON | 6,308 bytes | Mapa del repositorio |
46
- | repo_map.json | JSON | 2,017 bytes | Mapa de repositorio (legible) |
47
- | repo_map.md | Markdown | 618 bytes | Mapa del repositorio |
48
- | schema.json | JSON | 102 bytes | Esquema del proyecto |
49
- | summary.md | Markdown | 215 bytes | Resumen ejecutivo |
50
- | symbols.json | JSON | 30,291 bytes | Símbolos extraídos |
51
- | tech_stack.md | Markdown | 411 bytes | Stack tecnológico detectado |
52
- | tools.json | JSON | 138 bytes | Herramientas detectadas |
53
-
54
- ### 📂 ai/graph/
55
-
56
- | Archivo | Tipo | Tamaño | Descripción |
57
- |---------|------|--------|-------------|
58
- | knowledge-graph.json | JSON | 1,809 bytes | Grafo de conocimiento |
59
- | module-graph.json | JSON | 725 bytes | Grafo de módulos |
60
- | symbol-graph.json | JSON | 23,692 bytes | Grafo de símbolos |
61
- | symbol-references.json | JSON | 1,577 bytes | Referencias de símbolos |
62
-
63
- ### 📂 ai/context/features/
64
-
65
- | Archivo | Tipo | Tamaño | Descripción |
66
- |---------|------|--------|-------------|
67
- | controllers.json | JSON | 262 bytes | Feature: controllers |
68
- | services.json | JSON | 232 bytes | Feature: services |
69
-
70
- ### 📂 ai/context/flows/
71
-
72
- | Archivo | Tipo | Tamaño | Descripción |
73
- |---------|------|--------|-------------|
74
- | auth.json | JSON | 201 bytes | Flow: auth |
75
- | user.json | JSON | 233 bytes | Flow: user |
76
-
77
- ---
78
-
79
- ## 📈 MÉTRICAS POR PROYECTO
80
-
81
- | Métrica | express-api | nestjs-backend | python-cli | react-app | salesforce-cli |
82
- |---------|:-----------:|:--------------:|:----------:|:---------:|:--------------:|
83
- | **Símbolos** | 49 | 18 | 14 | 40 | 7 |
84
- | **Relaciones** | 42 | 13 | 21 | 50 | 7 |
85
- | **Features** | 2 | 1 | 1 | 1 | 1 |
86
- | **Flows** | 2 | 2 | 3 | 3 | 2 |
87
- | **Módulos** | 4 | 1 | 2 | 1 | 1 |
88
- | **Graph Nodes** | 4 | 3 | 4 | 4 | 3 |
89
- | **Graph Edges** | 9 | 6 | 6 | 6 | 4 |
90
- | **Index DB Size** | 45KB | 45KB | 45KB | 45KB | 45KB |
91
-
92
- ---
93
-
94
- ## ✅ VERIFICACIÓN DE ARCHIVOS
95
-
96
- ### JSON Files - Validación
97
- | Archivo | express-api | nestjs-backend | python-cli | react-app | salesforce-cli |
98
- |---------|:------------:|:--------------:|:----------:|:---------:|:--------------:|
99
- | symbols.json | ✅ Válido | ✅ Válido | ✅ Válido | ✅ Válido | ✅ Válido |
100
- | knowledge-graph.json | ✅ Válido | ✅ Válido | ✅ Válido | ✅ Válido | ✅ Válido |
101
- | symbol-graph.json | ✅ Válido | ✅ Válido | ✅ Válido | ✅ Válido | ✅ Válido |
102
- | context/*.json | ✅ Válido | ✅ Válido | ✅ Válido | ✅ Válido | ✅ Válido |
103
- | modules.json | ✅ Válido | ✅ Válido | ✅ Válido | ✅ Válido | ✅ Válido |
104
- | dependencies.json | ✅ Válido | ✅ Válido | ✅ Válido | ✅ Válido | ✅ Válido |
105
-
106
- ### SQLite Database
107
- | Archivo | express-api | nestjs-backend | python-cli | react-app | salesforce-cli |
108
- |---------|:------------:|:--------------:|:----------:|:---------:|:--------------:|
109
- | index.db | ✅ SQLite 3.x | ✅ SQLite 3.x | ✅ SQLite 3.x | ✅ SQLite 3.x | ✅ SQLite 3.x |
110
-
111
- ### Markdown Files
112
- | Archivo | express-api | nestjs-backend | python-cli | react-app | salesforce-cli |
113
- |---------|:------------:|:--------------:|:----------:|:---------:|:--------------:|
114
- | ai_context.md | ✅ Válido | ✅ Válido | ✅ Válido | ✅ Válido | ✅ Válido |
115
- | architecture.md | ✅ Válido | ✅ Válido | ✅ Válido | ✅ Válido | ✅ Válido |
116
- | tech_stack.md | ✅ Válido | ✅ Válido | ✅ Válido | ✅ Válido | ✅ Válido |
117
-
118
- ---
119
-
120
- ## 🎯 RESULTADO FINAL
121
-
122
- - **60 pruebas ejecutadas**
123
- - **55 exitosas** (92%)
124
- - **5 fallidas** (git - esperado en proyectos sin repo)
125
- - **0 errores inesperados**
126
-
127
- ### Estado: ✅ CLI 100% FUNCIONAL