ai-first-cli 1.2.3 → 1.3.1

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 (467) hide show
  1. package/.github/workflows/publish.yml +4 -1
  2. package/CHANGELOG.md +292 -6
  3. package/README.md +24 -4
  4. package/dist/analyzers/symbols.d.ts.map +1 -1
  5. package/dist/analyzers/symbols.js +9 -7
  6. package/dist/analyzers/symbols.js.map +1 -1
  7. package/dist/analyzers/techStack.d.ts.map +1 -1
  8. package/dist/analyzers/techStack.js +198 -3
  9. package/dist/analyzers/techStack.js.map +1 -1
  10. package/dist/commands/ai-first.d.ts.map +1 -1
  11. package/dist/commands/ai-first.js +14 -13
  12. package/dist/commands/ai-first.js.map +1 -1
  13. package/dist/core/analysis/architectureDetector.d.ts +37 -0
  14. package/dist/core/analysis/architectureDetector.d.ts.map +1 -0
  15. package/dist/core/analysis/architectureDetector.js +316 -0
  16. package/dist/core/analysis/architectureDetector.js.map +1 -0
  17. package/dist/core/analysis/callGraphBuilder.d.ts +37 -0
  18. package/dist/core/analysis/callGraphBuilder.d.ts.map +1 -0
  19. package/dist/core/analysis/callGraphBuilder.js +101 -0
  20. package/dist/core/analysis/callGraphBuilder.js.map +1 -0
  21. package/dist/core/analysis/dependencyAnalyzer.d.ts +45 -0
  22. package/dist/core/analysis/dependencyAnalyzer.d.ts.map +1 -0
  23. package/dist/core/analysis/dependencyAnalyzer.js +98 -0
  24. package/dist/core/analysis/dependencyAnalyzer.js.map +1 -0
  25. package/dist/core/analysis/index.d.ts +5 -0
  26. package/dist/core/analysis/index.d.ts.map +1 -0
  27. package/dist/core/analysis/index.js +5 -0
  28. package/dist/core/analysis/index.js.map +1 -0
  29. package/dist/core/analysis/inheritanceAnalyzer.d.ts +35 -0
  30. package/dist/core/analysis/inheritanceAnalyzer.d.ts.map +1 -0
  31. package/dist/core/analysis/inheritanceAnalyzer.js +115 -0
  32. package/dist/core/analysis/inheritanceAnalyzer.js.map +1 -0
  33. package/dist/core/ccp.d.ts.map +1 -1
  34. package/dist/core/ccp.js +3 -2
  35. package/dist/core/ccp.js.map +1 -1
  36. package/dist/core/generation/aiContextGenerator.d.ts +71 -0
  37. package/dist/core/generation/aiContextGenerator.d.ts.map +1 -0
  38. package/dist/core/generation/aiContextGenerator.js +217 -0
  39. package/dist/core/generation/aiContextGenerator.js.map +1 -0
  40. package/dist/core/generation/architectureGenerator.d.ts +17 -0
  41. package/dist/core/generation/architectureGenerator.d.ts.map +1 -0
  42. package/dist/core/generation/architectureGenerator.js +160 -0
  43. package/dist/core/generation/architectureGenerator.js.map +1 -0
  44. package/dist/core/generation/flowGenerator.d.ts +52 -0
  45. package/dist/core/generation/flowGenerator.d.ts.map +1 -0
  46. package/dist/core/generation/flowGenerator.js +164 -0
  47. package/dist/core/generation/flowGenerator.js.map +1 -0
  48. package/dist/core/generation/index.d.ts +4 -0
  49. package/dist/core/generation/index.d.ts.map +1 -0
  50. package/dist/core/generation/index.js +4 -0
  51. package/dist/core/generation/index.js.map +1 -0
  52. package/dist/core/hierarchyGenerator.d.ts.map +1 -1
  53. package/dist/core/hierarchyGenerator.js +3 -2
  54. package/dist/core/hierarchyGenerator.js.map +1 -1
  55. package/dist/core/parsers/index.d.ts +20 -0
  56. package/dist/core/parsers/index.d.ts.map +1 -0
  57. package/dist/core/parsers/index.js +76 -0
  58. package/dist/core/parsers/index.js.map +1 -0
  59. package/dist/core/parsers/pythonParser.d.ts +37 -0
  60. package/dist/core/parsers/pythonParser.d.ts.map +1 -0
  61. package/dist/core/parsers/pythonParser.js +229 -0
  62. package/dist/core/parsers/pythonParser.js.map +1 -0
  63. package/dist/core/parsers/typescriptParser.d.ts +54 -0
  64. package/dist/core/parsers/typescriptParser.d.ts.map +1 -0
  65. package/dist/core/parsers/typescriptParser.js +291 -0
  66. package/dist/core/parsers/typescriptParser.js.map +1 -0
  67. package/dist/core/pipeline.d.ts +42 -0
  68. package/dist/core/pipeline.d.ts.map +1 -0
  69. package/dist/core/pipeline.js +172 -0
  70. package/dist/core/pipeline.js.map +1 -0
  71. package/dist/core/semanticContexts.js +1 -1
  72. package/dist/core/semanticContexts.js.map +1 -1
  73. package/dist/utils/constants.d.ts +46 -0
  74. package/dist/utils/constants.d.ts.map +1 -0
  75. package/dist/utils/constants.js +67 -0
  76. package/dist/utils/constants.js.map +1 -0
  77. package/package.json +1 -1
  78. package/run-all-tests.sh +184 -0
  79. package/src/analyzers/symbols.ts +12 -7
  80. package/src/analyzers/techStack.ts +203 -3
  81. package/src/commands/ai-first.ts +14 -13
  82. package/src/core/analysis/architectureDetector.ts +487 -0
  83. package/src/core/analysis/callGraphBuilder.ts +158 -0
  84. package/src/core/analysis/dependencyAnalyzer.ts +167 -0
  85. package/src/core/analysis/index.ts +28 -0
  86. package/src/core/analysis/inheritanceAnalyzer.ts +169 -0
  87. package/src/core/ccp.ts +3 -2
  88. package/src/core/generation/aiContextGenerator.ts +335 -0
  89. package/src/core/generation/architectureGenerator.ts +200 -0
  90. package/src/core/generation/flowGenerator.ts +238 -0
  91. package/src/core/generation/index.ts +16 -0
  92. package/src/core/hierarchyGenerator.ts +3 -2
  93. package/src/core/parsers/index.ts +99 -0
  94. package/src/core/parsers/pythonParser.ts +302 -0
  95. package/src/core/parsers/typescriptParser.ts +445 -0
  96. package/src/core/pipeline.ts +241 -0
  97. package/src/core/semanticContexts.ts +1 -1
  98. package/src/utils/constants.ts +78 -0
  99. package/test-ai-context-understanding.sh +21 -0
  100. package/test_adapters.mjs +11 -11
  101. package/tests/analysis.test.ts +283 -0
  102. package/tests/architectureDetector.test.ts +137 -0
  103. package/tests/generation.test.ts +216 -0
  104. package/tests/parserRegistry.test.ts +139 -0
  105. package/tests/pipeline.integration.test.ts +245 -0
  106. package/tests/pythonParser.test.ts +210 -0
  107. package/tests/typescriptParser.test.ts +197 -0
  108. package/.ai-dev/index.db +0 -0
  109. package/BUGS.md +0 -455
  110. package/PLAN_MEJORAS.md +0 -216
  111. package/STATUS_ADAPTADORES +0 -126
  112. package/TEST_RESULTS_PHASE1.md +0 -420
  113. package/ai/dependencies.json +0 -15
  114. package/ai/graph/knowledge-graph.json +0 -12
  115. package/ai-context/ai_context.md +0 -130
  116. package/ai-context/ai_rules.md +0 -54
  117. package/ai-context/architecture.md +0 -136
  118. package/ai-context/cache.json +0 -2349
  119. package/ai-context/ccp/jira-123/context.json +0 -7
  120. package/ai-context/context/features/commands.json +0 -18
  121. package/ai-context/context/features/src.json +0 -61
  122. package/ai-context/context/features/test-projects.json +0 -69
  123. package/ai-context/context/flows/account.json +0 -9
  124. package/ai-context/context/flows/ai-first.json +0 -9
  125. package/ai-context/context/flows/api.json +0 -9
  126. package/ai-context/context/flows/auth.json +0 -13
  127. package/ai-context/context/flows/category.json +0 -12
  128. package/ai-context/context/flows/comment.json +0 -16
  129. package/ai-context/context/flows/dashboard.json +0 -9
  130. package/ai-context/context/flows/doctor.json +0 -9
  131. package/ai-context/context/flows/explore.json +0 -9
  132. package/ai-context/context/flows/login.json +0 -9
  133. package/ai-context/context/flows/opportunity.json +0 -9
  134. package/ai-context/context/flows/post.json +0 -18
  135. package/ai-context/context/flows/routes.json +0 -19
  136. package/ai-context/context/flows/user.json +0 -20
  137. package/ai-context/context/flows/users.json +0 -9
  138. package/ai-context/context/flows/views.json +0 -14
  139. package/ai-context/context/repo.json +0 -56
  140. package/ai-context/context/utils.json +0 -7
  141. package/ai-context/conventions.md +0 -53
  142. package/ai-context/dependencies.json +0 -2978
  143. package/ai-context/embeddings.json +0 -23828
  144. package/ai-context/entrypoints.md +0 -42
  145. package/ai-context/files.json +0 -2944
  146. package/ai-context/git/commit-activity.json +0 -8646
  147. package/ai-context/git/recent-features.json +0 -1
  148. package/ai-context/git/recent-files.json +0 -52
  149. package/ai-context/git/recent-flows.json +0 -1
  150. package/ai-context/graph/knowledge-graph.json +0 -44129
  151. package/ai-context/graph/module-graph.json +0 -866
  152. package/ai-context/graph/symbol-graph.json +0 -200622
  153. package/ai-context/graph/symbol-references.json +0 -6778
  154. package/ai-context/hierarchy.json +0 -20
  155. package/ai-context/index-state.json +0 -4487
  156. package/ai-context/index.db +0 -0
  157. package/ai-context/modules.json +0 -933
  158. package/ai-context/project.json +0 -30
  159. package/ai-context/repo_map.json +0 -9116
  160. package/ai-context/repo_map.md +0 -2061
  161. package/ai-context/schema.json +0 -5
  162. package/ai-context/summary.md +0 -47
  163. package/ai-context/symbols.json +0 -65351
  164. package/ai-context/tech_stack.md +0 -47
  165. package/ai-context/tools.json +0 -10
  166. package/test-projects/django-app/.ai-dev/index.db +0 -0
  167. package/test-projects/django-app/ai-context/ai_context.md +0 -92
  168. package/test-projects/django-app/ai-context/ai_rules.md +0 -47
  169. package/test-projects/django-app/ai-context/architecture.md +0 -57
  170. package/test-projects/django-app/ai-context/cache.json +0 -169
  171. package/test-projects/django-app/ai-context/context/flows/views.json +0 -10
  172. package/test-projects/django-app/ai-context/conventions.md +0 -51
  173. package/test-projects/django-app/ai-context/dependencies.json +0 -312
  174. package/test-projects/django-app/ai-context/entrypoints.md +0 -4
  175. package/test-projects/django-app/ai-context/files.json +0 -209
  176. package/test-projects/django-app/ai-context/graph/knowledge-graph.json +0 -36
  177. package/test-projects/django-app/ai-context/graph/module-graph.json +0 -145
  178. package/test-projects/django-app/ai-context/graph/symbol-graph.json +0 -1488
  179. package/test-projects/django-app/ai-context/graph/symbol-references.json +0 -1
  180. package/test-projects/django-app/ai-context/index-state.json +0 -294
  181. package/test-projects/django-app/ai-context/index.db +0 -0
  182. package/test-projects/django-app/ai-context/modules.json +0 -35
  183. package/test-projects/django-app/ai-context/project.json +0 -11
  184. package/test-projects/django-app/ai-context/repo_map.json +0 -412
  185. package/test-projects/django-app/ai-context/repo_map.md +0 -105
  186. package/test-projects/django-app/ai-context/schema.json +0 -5
  187. package/test-projects/django-app/ai-context/summary.md +0 -15
  188. package/test-projects/django-app/ai-context/symbols.json +0 -1
  189. package/test-projects/django-app/ai-context/tech_stack.md +0 -32
  190. package/test-projects/django-app/ai-context/tools.json +0 -10
  191. package/test-projects/express-api/ai-context/ai_context.md +0 -112
  192. package/test-projects/express-api/ai-context/ai_rules.md +0 -50
  193. package/test-projects/express-api/ai-context/architecture.md +0 -62
  194. package/test-projects/express-api/ai-context/context/features/controllers.json +0 -13
  195. package/test-projects/express-api/ai-context/context/features/services.json +0 -13
  196. package/test-projects/express-api/ai-context/context/flows/auth.json +0 -12
  197. package/test-projects/express-api/ai-context/context/flows/user.json +0 -13
  198. package/test-projects/express-api/ai-context/conventions.md +0 -51
  199. package/test-projects/express-api/ai-context/dependencies.json +0 -54
  200. package/test-projects/express-api/ai-context/entrypoints.md +0 -17
  201. package/test-projects/express-api/ai-context/modules.json +0 -30
  202. package/test-projects/express-api/ai-context/project.json +0 -15
  203. package/test-projects/express-api/ai-context/repo_map.json +0 -100
  204. package/test-projects/express-api/ai-context/repo_map.md +0 -36
  205. package/test-projects/express-api/ai-context/schema.json +0 -5
  206. package/test-projects/express-api/ai-context/summary.md +0 -14
  207. package/test-projects/express-api/ai-context/symbols.json +0 -7
  208. package/test-projects/express-api/ai-context/tech_stack.md +0 -38
  209. package/test-projects/express-api/ai-context/tools.json +0 -10
  210. package/test-projects/fastapi-app/.ai-dev/index.db +0 -0
  211. package/test-projects/fastapi-app/ai-context/ai_context.md +0 -89
  212. package/test-projects/fastapi-app/ai-context/ai_rules.md +0 -47
  213. package/test-projects/fastapi-app/ai-context/architecture.md +0 -39
  214. package/test-projects/fastapi-app/ai-context/cache.json +0 -125
  215. package/test-projects/fastapi-app/ai-context/conventions.md +0 -51
  216. package/test-projects/fastapi-app/ai-context/dependencies.json +0 -244
  217. package/test-projects/fastapi-app/ai-context/entrypoints.md +0 -4
  218. package/test-projects/fastapi-app/ai-context/files.json +0 -154
  219. package/test-projects/fastapi-app/ai-context/graph/knowledge-graph.json +0 -15
  220. package/test-projects/fastapi-app/ai-context/graph/module-graph.json +0 -78
  221. package/test-projects/fastapi-app/ai-context/graph/symbol-graph.json +0 -1724
  222. package/test-projects/fastapi-app/ai-context/graph/symbol-references.json +0 -51
  223. package/test-projects/fastapi-app/ai-context/index-state.json +0 -217
  224. package/test-projects/fastapi-app/ai-context/index.db +0 -0
  225. package/test-projects/fastapi-app/ai-context/modules.json +0 -16
  226. package/test-projects/fastapi-app/ai-context/project.json +0 -9
  227. package/test-projects/fastapi-app/ai-context/repo_map.json +0 -298
  228. package/test-projects/fastapi-app/ai-context/repo_map.md +0 -74
  229. package/test-projects/fastapi-app/ai-context/schema.json +0 -5
  230. package/test-projects/fastapi-app/ai-context/summary.md +0 -12
  231. package/test-projects/fastapi-app/ai-context/symbols.json +0 -1
  232. package/test-projects/fastapi-app/ai-context/tech_stack.md +0 -32
  233. package/test-projects/fastapi-app/ai-context/tools.json +0 -10
  234. package/test-projects/flask-app/.ai-dev/index.db +0 -0
  235. package/test-projects/flask-app/ai-context/ai_context.md +0 -94
  236. package/test-projects/flask-app/ai-context/ai_rules.md +0 -47
  237. package/test-projects/flask-app/ai-context/architecture.md +0 -49
  238. package/test-projects/flask-app/ai-context/cache.json +0 -157
  239. package/test-projects/flask-app/ai-context/context/features/app.json +0 -25
  240. package/test-projects/flask-app/ai-context/context/flows/routes.json +0 -14
  241. package/test-projects/flask-app/ai-context/conventions.md +0 -51
  242. package/test-projects/flask-app/ai-context/dependencies.json +0 -298
  243. package/test-projects/flask-app/ai-context/entrypoints.md +0 -4
  244. package/test-projects/flask-app/ai-context/files.json +0 -194
  245. package/test-projects/flask-app/ai-context/graph/knowledge-graph.json +0 -60
  246. package/test-projects/flask-app/ai-context/graph/module-graph.json +0 -95
  247. package/test-projects/flask-app/ai-context/graph/symbol-graph.json +0 -1448
  248. package/test-projects/flask-app/ai-context/graph/symbol-references.json +0 -45
  249. package/test-projects/flask-app/ai-context/index-state.json +0 -273
  250. package/test-projects/flask-app/ai-context/index.db +0 -0
  251. package/test-projects/flask-app/ai-context/modules.json +0 -21
  252. package/test-projects/flask-app/ai-context/project.json +0 -13
  253. package/test-projects/flask-app/ai-context/repo_map.json +0 -400
  254. package/test-projects/flask-app/ai-context/repo_map.md +0 -98
  255. package/test-projects/flask-app/ai-context/schema.json +0 -5
  256. package/test-projects/flask-app/ai-context/summary.md +0 -13
  257. package/test-projects/flask-app/ai-context/symbols.json +0 -1
  258. package/test-projects/flask-app/ai-context/tech_stack.md +0 -32
  259. package/test-projects/flask-app/ai-context/tools.json +0 -10
  260. package/test-projects/laravel-app/.ai-dev/index.db +0 -0
  261. package/test-projects/laravel-app/ai-context/ai_context.md +0 -97
  262. package/test-projects/laravel-app/ai-context/ai_rules.md +0 -47
  263. package/test-projects/laravel-app/ai-context/architecture.md +0 -60
  264. package/test-projects/laravel-app/ai-context/cache.json +0 -161
  265. package/test-projects/laravel-app/ai-context/context/features/app.json +0 -21
  266. package/test-projects/laravel-app/ai-context/context/flows/.json +0 -9
  267. package/test-projects/laravel-app/ai-context/context/flows/category.json +0 -12
  268. package/test-projects/laravel-app/ai-context/context/flows/comment.json +0 -12
  269. package/test-projects/laravel-app/ai-context/context/flows/post.json +0 -12
  270. package/test-projects/laravel-app/ai-context/context/flows/unnamed.json +0 -9
  271. package/test-projects/laravel-app/ai-context/conventions.md +0 -51
  272. package/test-projects/laravel-app/ai-context/dependencies.json +0 -6
  273. package/test-projects/laravel-app/ai-context/entrypoints.md +0 -4
  274. package/test-projects/laravel-app/ai-context/files.json +0 -199
  275. package/test-projects/laravel-app/ai-context/graph/knowledge-graph.json +0 -98
  276. package/test-projects/laravel-app/ai-context/graph/module-graph.json +0 -30
  277. package/test-projects/laravel-app/ai-context/graph/symbol-graph.json +0 -5
  278. package/test-projects/laravel-app/ai-context/graph/symbol-references.json +0 -1
  279. package/test-projects/laravel-app/ai-context/index-state.json +0 -280
  280. package/test-projects/laravel-app/ai-context/index.db +0 -0
  281. package/test-projects/laravel-app/ai-context/modules.json +0 -29
  282. package/test-projects/laravel-app/ai-context/project.json +0 -17
  283. package/test-projects/laravel-app/ai-context/repo_map.json +0 -419
  284. package/test-projects/laravel-app/ai-context/repo_map.md +0 -106
  285. package/test-projects/laravel-app/ai-context/schema.json +0 -5
  286. package/test-projects/laravel-app/ai-context/summary.md +0 -15
  287. package/test-projects/laravel-app/ai-context/symbols.json +0 -1
  288. package/test-projects/laravel-app/ai-context/tech_stack.md +0 -34
  289. package/test-projects/laravel-app/ai-context/tools.json +0 -10
  290. package/test-projects/nestjs-backend/.ai-dev/index.db +0 -0
  291. package/test-projects/nestjs-backend/ai-context/ai_context.md +0 -111
  292. package/test-projects/nestjs-backend/ai-context/ai_rules.md +0 -52
  293. package/test-projects/nestjs-backend/ai-context/architecture.md +0 -49
  294. package/test-projects/nestjs-backend/ai-context/cache.json +0 -169
  295. package/test-projects/nestjs-backend/ai-context/context/features/src.json +0 -23
  296. package/test-projects/nestjs-backend/ai-context/context/flows/auth.controller.json +0 -14
  297. package/test-projects/nestjs-backend/ai-context/context/flows/auth.json +0 -10
  298. package/test-projects/nestjs-backend/ai-context/context/flows/users..json +0 -10
  299. package/test-projects/nestjs-backend/ai-context/context/flows/users.controller.json +0 -14
  300. package/test-projects/nestjs-backend/ai-context/context/flows/users.json +0 -10
  301. package/test-projects/nestjs-backend/ai-context/conventions.md +0 -52
  302. package/test-projects/nestjs-backend/ai-context/dependencies.json +0 -152
  303. package/test-projects/nestjs-backend/ai-context/entrypoints.md +0 -18
  304. package/test-projects/nestjs-backend/ai-context/files.json +0 -209
  305. package/test-projects/nestjs-backend/ai-context/graph/knowledge-graph.json +0 -132
  306. package/test-projects/nestjs-backend/ai-context/graph/module-graph.json +0 -29
  307. package/test-projects/nestjs-backend/ai-context/graph/symbol-graph.json +0 -304
  308. package/test-projects/nestjs-backend/ai-context/graph/symbol-references.json +0 -5
  309. package/test-projects/nestjs-backend/ai-context/index-state.json +0 -294
  310. package/test-projects/nestjs-backend/ai-context/index.db +0 -0
  311. package/test-projects/nestjs-backend/ai-context/modules.json +0 -19
  312. package/test-projects/nestjs-backend/ai-context/project.json +0 -18
  313. package/test-projects/nestjs-backend/ai-context/repo_map.json +0 -427
  314. package/test-projects/nestjs-backend/ai-context/repo_map.md +0 -104
  315. package/test-projects/nestjs-backend/ai-context/schema.json +0 -5
  316. package/test-projects/nestjs-backend/ai-context/summary.md +0 -13
  317. package/test-projects/nestjs-backend/ai-context/symbols.json +0 -1
  318. package/test-projects/nestjs-backend/ai-context/tech_stack.md +0 -38
  319. package/test-projects/nestjs-backend/ai-context/tools.json +0 -10
  320. package/test-projects/python-cli/.ai-dev/index.db +0 -0
  321. package/test-projects/python-cli/ai-context/ai_context.md +0 -95
  322. package/test-projects/python-cli/ai-context/ai_rules.md +0 -47
  323. package/test-projects/python-cli/ai-context/architecture.md +0 -55
  324. package/test-projects/python-cli/ai-context/cache.json +0 -149
  325. package/test-projects/python-cli/ai-context/context/features/cli.json +0 -16
  326. package/test-projects/python-cli/ai-context/context/flows/list_.json +0 -9
  327. package/test-projects/python-cli/ai-context/context/flows/remove_.json +0 -9
  328. package/test-projects/python-cli/ai-context/conventions.md +0 -51
  329. package/test-projects/python-cli/ai-context/dependencies.json +0 -66
  330. package/test-projects/python-cli/ai-context/entrypoints.md +0 -4
  331. package/test-projects/python-cli/ai-context/files.json +0 -184
  332. package/test-projects/python-cli/ai-context/graph/knowledge-graph.json +0 -83
  333. package/test-projects/python-cli/ai-context/graph/module-graph.json +0 -31
  334. package/test-projects/python-cli/ai-context/graph/symbol-graph.json +0 -358
  335. package/test-projects/python-cli/ai-context/graph/symbol-references.json +0 -11
  336. package/test-projects/python-cli/ai-context/index-state.json +0 -259
  337. package/test-projects/python-cli/ai-context/index.db +0 -0
  338. package/test-projects/python-cli/ai-context/modules.json +0 -21
  339. package/test-projects/python-cli/ai-context/project.json +0 -15
  340. package/test-projects/python-cli/ai-context/repo_map.json +0 -367
  341. package/test-projects/python-cli/ai-context/repo_map.md +0 -93
  342. package/test-projects/python-cli/ai-context/schema.json +0 -5
  343. package/test-projects/python-cli/ai-context/summary.md +0 -14
  344. package/test-projects/python-cli/ai-context/symbols.json +0 -1
  345. package/test-projects/python-cli/ai-context/tech_stack.md +0 -32
  346. package/test-projects/python-cli/ai-context/tools.json +0 -10
  347. package/test-projects/rails-app/.ai-dev/index.db +0 -0
  348. package/test-projects/rails-app/ai-context/ai_context.md +0 -94
  349. package/test-projects/rails-app/ai-context/ai_rules.md +0 -47
  350. package/test-projects/rails-app/ai-context/architecture.md +0 -49
  351. package/test-projects/rails-app/ai-context/cache.json +0 -193
  352. package/test-projects/rails-app/ai-context/context/features/app.json +0 -24
  353. package/test-projects/rails-app/ai-context/context/features/config.json +0 -13
  354. package/test-projects/rails-app/ai-context/context/flows/application.json +0 -9
  355. package/test-projects/rails-app/ai-context/context/flows/application_.json +0 -9
  356. package/test-projects/rails-app/ai-context/context/flows/comments.json +0 -11
  357. package/test-projects/rails-app/ai-context/context/flows/comments_.json +0 -11
  358. package/test-projects/rails-app/ai-context/context/flows/posts.json +0 -11
  359. package/test-projects/rails-app/ai-context/context/flows/posts_.json +0 -11
  360. package/test-projects/rails-app/ai-context/context/flows/routes.json +0 -9
  361. package/test-projects/rails-app/ai-context/context/flows/users.json +0 -11
  362. package/test-projects/rails-app/ai-context/context/flows/users_.json +0 -11
  363. package/test-projects/rails-app/ai-context/conventions.md +0 -51
  364. package/test-projects/rails-app/ai-context/dependencies.json +0 -6
  365. package/test-projects/rails-app/ai-context/entrypoints.md +0 -4
  366. package/test-projects/rails-app/ai-context/files.json +0 -239
  367. package/test-projects/rails-app/ai-context/graph/knowledge-graph.json +0 -130
  368. package/test-projects/rails-app/ai-context/graph/module-graph.json +0 -27
  369. package/test-projects/rails-app/ai-context/graph/symbol-graph.json +0 -5
  370. package/test-projects/rails-app/ai-context/graph/symbol-references.json +0 -1
  371. package/test-projects/rails-app/ai-context/index-state.json +0 -336
  372. package/test-projects/rails-app/ai-context/index.db +0 -0
  373. package/test-projects/rails-app/ai-context/modules.json +0 -26
  374. package/test-projects/rails-app/ai-context/project.json +0 -22
  375. package/test-projects/rails-app/ai-context/repo_map.json +0 -486
  376. package/test-projects/rails-app/ai-context/repo_map.md +0 -117
  377. package/test-projects/rails-app/ai-context/schema.json +0 -5
  378. package/test-projects/rails-app/ai-context/summary.md +0 -13
  379. package/test-projects/rails-app/ai-context/symbols.json +0 -1
  380. package/test-projects/rails-app/ai-context/tech_stack.md +0 -32
  381. package/test-projects/rails-app/ai-context/tools.json +0 -10
  382. package/test-projects/react-app/.ai-dev/index.db +0 -0
  383. package/test-projects/react-app/ai-context/ai_context.md +0 -96
  384. package/test-projects/react-app/ai-context/ai_rules.md +0 -49
  385. package/test-projects/react-app/ai-context/architecture.md +0 -39
  386. package/test-projects/react-app/ai-context/cache.json +0 -153
  387. package/test-projects/react-app/ai-context/context/features/src.json +0 -18
  388. package/test-projects/react-app/ai-context/context/flows/UsersPage.json +0 -14
  389. package/test-projects/react-app/ai-context/context/flows/dashboard.json +0 -9
  390. package/test-projects/react-app/ai-context/context/flows/login.json +0 -9
  391. package/test-projects/react-app/ai-context/context/flows/users.json +0 -9
  392. package/test-projects/react-app/ai-context/conventions.md +0 -52
  393. package/test-projects/react-app/ai-context/dependencies.json +0 -128
  394. package/test-projects/react-app/ai-context/entrypoints.md +0 -4
  395. package/test-projects/react-app/ai-context/files.json +0 -189
  396. package/test-projects/react-app/ai-context/graph/knowledge-graph.json +0 -112
  397. package/test-projects/react-app/ai-context/graph/module-graph.json +0 -31
  398. package/test-projects/react-app/ai-context/graph/symbol-graph.json +0 -868
  399. package/test-projects/react-app/ai-context/graph/symbol-references.json +0 -31
  400. package/test-projects/react-app/ai-context/index-state.json +0 -266
  401. package/test-projects/react-app/ai-context/index.db +0 -0
  402. package/test-projects/react-app/ai-context/modules.json +0 -17
  403. package/test-projects/react-app/ai-context/project.json +0 -16
  404. package/test-projects/react-app/ai-context/repo_map.json +0 -391
  405. package/test-projects/react-app/ai-context/repo_map.md +0 -94
  406. package/test-projects/react-app/ai-context/schema.json +0 -5
  407. package/test-projects/react-app/ai-context/summary.md +0 -13
  408. package/test-projects/react-app/ai-context/symbols.json +0 -1
  409. package/test-projects/react-app/ai-context/tech_stack.md +0 -39
  410. package/test-projects/react-app/ai-context/tools.json +0 -10
  411. package/test-projects/salesforce-cli/.ai-dev/index.db +0 -0
  412. package/test-projects/salesforce-cli/ai-context/ai_context.md +0 -89
  413. package/test-projects/salesforce-cli/ai-context/ai_rules.md +0 -47
  414. package/test-projects/salesforce-cli/ai-context/architecture.md +0 -39
  415. package/test-projects/salesforce-cli/ai-context/cache.json +0 -125
  416. package/test-projects/salesforce-cli/ai-context/context/features/force-app.json +0 -14
  417. package/test-projects/salesforce-cli/ai-context/context/flows/account.json +0 -9
  418. package/test-projects/salesforce-cli/ai-context/context/flows/opportunity.json +0 -9
  419. package/test-projects/salesforce-cli/ai-context/conventions.md +0 -51
  420. package/test-projects/salesforce-cli/ai-context/dependencies.json +0 -6
  421. package/test-projects/salesforce-cli/ai-context/entrypoints.md +0 -4
  422. package/test-projects/salesforce-cli/ai-context/files.json +0 -154
  423. package/test-projects/salesforce-cli/ai-context/graph/knowledge-graph.json +0 -64
  424. package/test-projects/salesforce-cli/ai-context/graph/module-graph.json +0 -13
  425. package/test-projects/salesforce-cli/ai-context/graph/symbol-graph.json +0 -148
  426. package/test-projects/salesforce-cli/ai-context/graph/symbol-references.json +0 -1
  427. package/test-projects/salesforce-cli/ai-context/index-state.json +0 -217
  428. package/test-projects/salesforce-cli/ai-context/index.db +0 -0
  429. package/test-projects/salesforce-cli/ai-context/modules.json +0 -12
  430. package/test-projects/salesforce-cli/ai-context/project.json +0 -14
  431. package/test-projects/salesforce-cli/ai-context/repo_map.json +0 -328
  432. package/test-projects/salesforce-cli/ai-context/repo_map.md +0 -80
  433. package/test-projects/salesforce-cli/ai-context/schema.json +0 -5
  434. package/test-projects/salesforce-cli/ai-context/summary.md +0 -13
  435. package/test-projects/salesforce-cli/ai-context/symbols.json +0 -1
  436. package/test-projects/salesforce-cli/ai-context/tech_stack.md +0 -31
  437. package/test-projects/salesforce-cli/ai-context/tools.json +0 -10
  438. package/test-projects/spring-boot-app/.ai-dev/index.db +0 -0
  439. package/test-projects/spring-boot-app/ai-context/ai_context.md +0 -91
  440. package/test-projects/spring-boot-app/ai-context/ai_rules.md +0 -48
  441. package/test-projects/spring-boot-app/ai-context/architecture.md +0 -39
  442. package/test-projects/spring-boot-app/ai-context/cache.json +0 -173
  443. package/test-projects/spring-boot-app/ai-context/context/features/src.json +0 -26
  444. package/test-projects/spring-boot-app/ai-context/context/flows/PostController.json +0 -19
  445. package/test-projects/spring-boot-app/ai-context/context/flows/UserController.json +0 -19
  446. package/test-projects/spring-boot-app/ai-context/context/flows/comment.json +0 -11
  447. package/test-projects/spring-boot-app/ai-context/context/flows/post.json +0 -14
  448. package/test-projects/spring-boot-app/ai-context/context/flows/user.json +0 -14
  449. package/test-projects/spring-boot-app/ai-context/conventions.md +0 -52
  450. package/test-projects/spring-boot-app/ai-context/dependencies.json +0 -326
  451. package/test-projects/spring-boot-app/ai-context/entrypoints.md +0 -4
  452. package/test-projects/spring-boot-app/ai-context/files.json +0 -214
  453. package/test-projects/spring-boot-app/ai-context/graph/knowledge-graph.json +0 -231
  454. package/test-projects/spring-boot-app/ai-context/graph/module-graph.json +0 -22
  455. package/test-projects/spring-boot-app/ai-context/graph/symbol-graph.json +0 -794
  456. package/test-projects/spring-boot-app/ai-context/graph/symbol-references.json +0 -70
  457. package/test-projects/spring-boot-app/ai-context/index-state.json +0 -301
  458. package/test-projects/spring-boot-app/ai-context/index.db +0 -0
  459. package/test-projects/spring-boot-app/ai-context/modules.json +0 -21
  460. package/test-projects/spring-boot-app/ai-context/project.json +0 -17
  461. package/test-projects/spring-boot-app/ai-context/repo_map.json +0 -461
  462. package/test-projects/spring-boot-app/ai-context/repo_map.md +0 -109
  463. package/test-projects/spring-boot-app/ai-context/schema.json +0 -5
  464. package/test-projects/spring-boot-app/ai-context/summary.md +0 -12
  465. package/test-projects/spring-boot-app/ai-context/symbols.json +0 -1
  466. package/test-projects/spring-boot-app/ai-context/tech_stack.md +0 -32
  467. 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*
@@ -1,420 +0,0 @@
1
- # 📊 RESULTADOS DETALLADOS - PHASE 1 (FINAL)
2
- ## Fecha: 2026-03-18
3
-
4
- ---
5
-
6
- ## 🔧 BUGS ARREGLADOS EN PHASE 1
7
-
8
- ### 1. Parser Ruby Agregado ✅
9
- **Problema:** rails-app tenía 0 símbolos porque no había parser para Ruby
10
- **Solución:** Se agregó función `parseRuby()` en `src/analyzers/symbols.ts`
11
- **Resultado:** rails-app ahora tiene **74 símbolos** y **74 relaciones**
12
-
13
- ### 2. Flow Names Sanitización ✅
14
- **Problema:** Flows con nombres malformados (`auth..json`, `add_.json`, `users_.json`)
15
- **Solución:** Se agregó función `sanitizeFileName()` en `src/core/semanticContexts.ts`
16
- **Resultado:** Todos los flows ahora tienen nombres válidos
17
-
18
- ### 3. Laravel Relationships ✅
19
- **Problema:** laravel-app tenía 0 relaciones
20
- **Solución:** PHP ya estaba incluido en análisis de relaciones, las relaciones ahora funcionan
21
- **Resultado:** laravel-app ahora tiene **3 relaciones** (antes 0)
22
-
23
- ---
24
-
25
- ## ⚠️ BUGS ENCONTRADOS EN PRUEBAS POSTERIORES
26
-
27
- ### 4. Update Command - Símbolos no se Actualizan ❌
28
- **Fecha:** 2026-03-18
29
- **Problema:** El comando `update` no extrae nuevos símbolos cuando se modifica un archivo
30
- **Prueba realizada:**
31
- 1. Se añadió una nueva función `healthCheck()` a `index.js`
32
- 2. Se ejecutó `ai-first update --no-git`
33
- 3. El output mostró:
34
- ```
35
- 📁 Changed files: 4
36
- modified: index.js
37
- 🔧 Updated:
38
- Symbols: 0 ← INCORRECTO
39
- Dependencies: 6
40
- ```
41
- 4. Se verificó en `symbols.json` - la función `healthCheck` NO aparece
42
-
43
- **Comportamiento esperado:** Symbols debería mostrar "1" y la función debería estar en symbols.json
44
- **Comportamiento real:** Symbols muestra "0" y el nuevo símbolo no se añade
45
- **Severidad:** 🔴 Alta - El update command no funciona correctamente para símbolos
46
-
47
- ---
48
-
49
- ## 📊 RESULTADOS ESPERADOS VS OBTENIDOS - FINAL
50
-
51
- | Proyecto | Símbolos (Esp) | Símbolos (Obt) | Relaciones (Esp) | Relaciones (Obt) | Estado |
52
- |----------|----------------|----------------|-----------------|-----------------|--------|
53
- | express-api | >0 | 49 | >0 | 42 | ✅ |
54
- | nestjs-backend | >0 | 18 | >0 | 13 | ✅ |
55
- | python-cli | >0 | 14 | >0 | 21 | ✅ |
56
- | react-app | >0 | 40 | >0 | 50 | ✅ |
57
- | salesforce-cli | >0 | 7 | >0 | 7 | ✅ |
58
- | django-app | >0 | 69 | >0 | 42 | ✅ |
59
- | laravel-app | >0 | 44 | >0 | 3 | ✅ |
60
- | fastapi-app | >0 | 60 | >0 | 109 | ✅ |
61
- | flask-app | >0 | 25 | >0 | 35 | ✅ |
62
- | rails-app | >0 | **74** | >0 | **74** | ✅ |
63
- | spring-boot-app | >0 | 32 | >0 | 52 | ✅ |
64
-
65
- ---
66
-
67
- ## 📈 MÉTRICAS POR PROYECTO (ACTUALIZADAS)
68
-
69
- | Proyecto | Archivos | Símbolos | Relaciones | Features | Flows |
70
- |----------|----------|----------|-----------|---------|-------|
71
- | express-api | 45 | 49 | 42 | 2 | 2 |
72
- | nestjs-backend | 25 | 18 | 13 | 1 | 2 |
73
- | python-cli | 20 | 14 | 21 | 1 | 3 |
74
- | react-app | 40 | 40 | 50 | 1 | 3 |
75
- | salesforce-cli | 25 | 7 | 7 | 1 | 2 |
76
- | django-app | 40 | 69 | 42 | 2 | 2 |
77
- | laravel-app | 37 | 44 | 3 | 1 | 4 |
78
- | fastapi-app | 29 | 60 | 109 | 1 | 3 |
79
- | flask-app | 30 | 25 | 35 | 1 | 1 |
80
- | rails-app | 13 | **74** | **74** | 2 | 5 |
81
- | spring-boot-app | 13 | 32 | 52 | 1 | 3 |
82
-
83
- ---
84
-
85
- ## ✅ CHECKLIST FINAL PHASE 1
86
-
87
- - [x] 6 nuevos test projects creados
88
- - [x] Parser Ruby implementado
89
- - [x] Flow sanitization implementada
90
- - [x] Todos los proyectos tienen ai/ generado
91
- - [x] Todos los comandos funcionan (exit code 0)
92
- - [x] Archivos JSON válidos
93
- - [x] SQLite databases creados
94
- - [x] Features y Flows detectados
95
- - [x] Símbolos > 0 en todos los proyectos
96
- - [x] Relaciones > 0 en todos los proyectos
97
- - [x] Flows con nombres válidos (sin `..json`, `_json`, etc.)
98
- - [x] Commit y push a GitHub
99
-
100
- ---
101
-
102
- ## 📁 COMMITS REALIZADOS
103
-
104
- 1. `e07730c` - Django test project
105
- 2. `b288e30` - Laravel test project
106
- 3. `0572f51` - FastAPI test project
107
- 4. `8f1d85d` - Flask test project
108
- 5. `a5562f1` - Rails + Spring Boot test projects
109
- 6. `HEAD` - Fixes: Ruby parser, flow sanitization, PHP relationships
110
-
111
- ---
112
-
113
- *Phase 1 Testing Infrastructure - COMPLETADO: 2026-03-18*
114
- *Commit final: Bugs fixed (Ruby parser, flow sanitization)*
115
- *Branch: feature/phase-1-testing-infrastructure*
116
-
117
- ---
118
-
119
- ## 📋 COMANDOS PROBADOS
120
-
121
- | # | Comando | Descripción |
122
- |---|---------|-------------|
123
- | 1 | `init` | Genera contexto inicial de AI |
124
- | 2 | `map` | Genera grafos de símbolos y módulos |
125
- | 3 | `index` | Genera índice SQLite |
126
- | 4 | `doctor` | Verifica salud del repositorio |
127
- | 5 | `graph` | Genera knowledge graph |
128
- | 6 | `summarize` | Genera resumen jerárquico |
129
- | 7 | `update` | Actualización incremental |
130
- | 8 | `explore` | Explora dependencias de módulos |
131
- | 9 | `query` | Consulta símbolos en BD |
132
- | 10 | `context` | Extrae contexto de símbolo |
133
- | 11 | `adapters` | Lista adapters disponibles |
134
- | 12 | `git` | Análisis de git (requiere repo git) |
135
-
136
- ---
137
-
138
- ## 📊 RESULTADOS ESPERADOS VS OBTENIDOS
139
-
140
- ### COMANDO: `init`
141
-
142
- | Proyecto | Esperado | Obtenido | Estado |
143
- |----------|----------|----------|--------|
144
- | express-api | Genera ai/ con 11+ archivos | ✅ 11 archivos | ✅ PASS |
145
- | nestjs-backend | Genera ai/ con 11+ archivos | ✅ 11 archivos | ✅ PASS |
146
- | python-cli | Genera ai/ con 11+ archivos | ✅ 11 archivos | ✅ PASS |
147
- | react-app | Genera ai/ con 11+ archivos | ✅ 11 archivos | ✅ PASS |
148
- | salesforce-cli | Genera ai/ con 11+ archivos | ✅ 11 archivos | ✅ PASS |
149
- | django-app | Genera ai/ con 11+ archivos | ✅ 11 archivos | ✅ PASS |
150
- | laravel-app | Genera ai/ con 11+ archivos | ✅ 11 archivos | ✅ PASS |
151
- | fastapi-app | Genera ai/ con 11+ archivos | ✅ 11 archivos | ✅ PASS |
152
- | flask-app | Genera ai/ con 11+ archivos | ✅ 11 archivos | ✅ PASS |
153
- | rails-app | Genera ai/ con 11+ archivos | ✅ 11 archivos | ✅ PASS |
154
- | spring-boot-app | Genera ai/ con 11+ archivos | ✅ 11 archivos | ✅ PASS |
155
-
156
- **Resultado:** 11/11 PASS ✅
157
-
158
- ---
159
-
160
- ### COMANDO: `map`
161
-
162
- | Proyecto | Esperado | Obtenido | Estado |
163
- |----------|----------|----------|--------|
164
- | express-api | graph/module-graph.json, symbol-graph.json | ✅ Ambos generados | ✅ PASS |
165
- | nestjs-backend | graph/module-graph.json, symbol-graph.json | ✅ Ambos generados | ✅ PASS |
166
- | python-cli | graph/module-graph.json, symbol-graph.json | ✅ Ambos generados | ✅ PASS |
167
- | react-app | graph/module-graph.json, symbol-graph.json | ✅ Ambos generados | ✅ PASS |
168
- | salesforce-cli | graph/module-graph.json, symbol-graph.json | ✅ Ambos generados | ✅ PASS |
169
- | django-app | graph/module-graph.json, symbol-graph.json | ✅ Ambos generados | ✅ PASS |
170
- | laravel-app | graph/module-graph.json, symbol-graph.json | ✅ Ambos generados | ✅ PASS |
171
- | fastapi-app | graph/module-graph.json, symbol-graph.json | ✅ Ambos generados | ✅ PASS |
172
- | flask-app | graph/module-graph.json, symbol-graph.json | ✅ Ambos generados | ✅ PASS |
173
- | rails-app | graph/module-graph.json, symbol-graph.json | ✅ Ambos generados | ✅ PASS |
174
- | spring-boot-app | graph/module-graph.json, symbol-graph.json | ✅ Ambos generados | ✅ PASS |
175
-
176
- **Resultado:** 11/11 PASS ✅
177
-
178
- ---
179
-
180
- ### COMANDO: `index`
181
-
182
- | Proyecto | Esperado | Obtenido | Estado |
183
- |----------|----------|----------|--------|
184
- | express-api | ai/index.db SQLite creado | ✅ 45KB | ✅ PASS |
185
- | nestjs-backend | ai/index.db SQLite creado | ✅ 45KB | ✅ PASS |
186
- | python-cli | ai/index.db SQLite creado | ✅ 45KB | ✅ PASS |
187
- | react-app | ai/index.db SQLite creado | ✅ 45KB | ✅ PASS |
188
- | salesforce-cli | ai/index.db SQLite creado | ✅ 45KB | ✅ PASS |
189
- | django-app | ai/index.db SQLite creado | ✅ 45KB | ✅ PASS |
190
- | laravel-app | ai/index.db SQLite creado | ✅ 45KB | ✅ PASS |
191
- | fastapi-app | ai/index.db SQLite creado | ✅ 45KB | ✅ PASS |
192
- | flask-app | ai/index.db SQLite creado | ✅ 45KB | ✅ PASS |
193
- | rails-app | ai/index.db SQLite creado | ✅ 45KB | ✅ PASS |
194
- | spring-boot-app | ai/index.db SQLite creado | ✅ 45KB | ✅ PASS |
195
-
196
- **Resultado:** 11/11 PASS ✅
197
-
198
- ---
199
-
200
- ### COMANDO: `doctor`
201
-
202
- | Proyecto | Esperado | Obtenido | Estado |
203
- |----------|----------|----------|--------|
204
- | express-api | 6 passed, 1 warnings | ✅ 6 passed, 1 warnings | ✅ PASS |
205
- | nestjs-backend | 6 passed, 1 warnings | ✅ 6 passed, 1 warnings | ✅ PASS |
206
- | python-cli | 6 passed, 1 warnings | ✅ 6 passed, 1 warnings | ✅ PASS |
207
- | react-app | 6 passed, 1 warnings | ✅ 6 passed, 1 warnings | ✅ PASS |
208
- | salesforce-cli | 6 passed, 1 warnings | ✅ 6 passed, 1 warnings | ✅ PASS |
209
- | django-app | 6 passed, 1 warnings | ✅ 6 passed, 1 warnings | ✅ PASS |
210
- | laravel-app | 6 passed, 1 warnings | ✅ 6 passed, 1 warnings | ✅ PASS |
211
- | fastapi-app | 6 passed, 1 warnings | ✅ 6 passed, 1 warnings | ✅ PASS |
212
- | flask-app | 6 passed, 1 warnings | ✅ 6 passed, 1 warnings | ✅ PASS |
213
- | rails-app | 6 passed, 1 warnings | ✅ 6 passed, 1 warnings | ✅ PASS |
214
- | spring-boot-app | 6 passed, 1 warnings | ✅ 6 passed, 1 warnings | ✅ PASS |
215
-
216
- **Resultado:** 11/11 PASS ✅
217
-
218
- **Warning esperado:** "Semantic index: Not found" (no se ejecutó `index --semantic`)
219
-
220
- ---
221
-
222
- ### COMANDO: `graph`
223
-
224
- | Proyecto | Esperado | Obtenido | Estado |
225
- |----------|----------|----------|--------|
226
- | express-api | ai/graph/knowledge-graph.json | ✅ Generado | ✅ PASS |
227
- | nestjs-backend | ai/graph/knowledge-graph.json | ✅ Generado | ✅ PASS |
228
- | python-cli | ai/graph/knowledge-graph.json | ✅ Generado | ✅ PASS |
229
- | react-app | ai/graph/knowledge-graph.json | ✅ Generado | ✅ PASS |
230
- | salesforce-cli | ai/graph/knowledge-graph.json | ✅ Generado | ✅ PASS |
231
- | django-app | ai/graph/knowledge-graph.json | ✅ Generado | ✅ PASS |
232
- | laravel-app | ai/graph/knowledge-graph.json | ✅ Generado | ✅ PASS |
233
- | fastapi-app | ai/graph/knowledge-graph.json | ✅ Generado | ✅ PASS |
234
- | flask-app | ai/graph/knowledge-graph.json | ✅ Generado | ✅ PASS |
235
- | rails-app | ai/graph/knowledge-graph.json | ✅ Generado | ✅ PASS |
236
- | spring-boot-app | ai/graph/knowledge-graph.json | ✅ Generado | ✅ PASS |
237
-
238
- **Resultado:** 11/11 PASS ✅
239
-
240
- ---
241
-
242
- ### COMANDO: `summarize`
243
-
244
- | Proyecto | Esperado | Obtenido | Estado |
245
- |----------|----------|----------|--------|
246
- | express-api | ai/hierarchy.json generado | ✅ Generado | ✅ PASS |
247
- | nestjs-backend | ai/hierarchy.json generado | ✅ Generado | ✅ PASS |
248
- | python-cli | ai/hierarchy.json generado | ✅ Generado | ✅ PASS |
249
- | react-app | ai/hierarchy.json generado | ✅ Generado | ✅ PASS |
250
- | salesforce-cli | ai/hierarchy.json generado | ✅ Generado | ✅ PASS |
251
- | django-app | ai/hierarchy.json generado | ✅ Generado | ✅ PASS |
252
- | laravel-app | ai/hierarchy.json generado | ✅ Generado | ✅ PASS |
253
- | fastapi-app | ai/hierarchy.json generado | ✅ Generado | ✅ PASS |
254
- | flask-app | ai/hierarchy.json generado | ✅ Generado | ✅ PASS |
255
- | rails-app | ai/hierarchy.json generado | ✅ Generado | ✅ PASS |
256
- | spring-boot-app | ai/hierarchy.json generado | ✅ Generado | ✅ PASS |
257
-
258
- **Resultado:** 11/11 PASS ✅
259
-
260
- ---
261
-
262
- ### COMANDO: `update`
263
-
264
- | Proyecto | Esperado | Obtenido | Estado |
265
- |----------|----------|----------|--------|
266
- | express-api (sin cambios) | No errors, 0 files changed | ✅ 0 files changed | ✅ PASS |
267
- | nestjs-backend (sin cambios) | No errors, 0 files changed | ✅ 0 files changed | ✅ PASS |
268
- | python-cli (sin cambios) | No errors, 0 files changed | ✅ 0 files changed | ✅ PASS |
269
- | react-app (sin cambios) | No errors, 0 files changed | ✅ 0 files changed | ✅ PASS |
270
- | salesforce-cli (sin cambios) | No errors, 0 files changed | ✅ 0 files changed | ✅ PASS |
271
- | django-app (sin cambios) | No errors, 0 files changed | ✅ 0 files changed | ✅ PASS |
272
- | laravel-app (sin cambios) | No errors, 0 files changed | ✅ 0 files changed | ✅ PASS |
273
- | fastapi-app (sin cambios) | No errors, 0 files changed | ✅ 0 files changed | ✅ PASS |
274
- | flask-app (sin cambios) | No errors, 0 files changed | ✅ 0 files changed | ✅ PASS |
275
- | rails-app (sin cambios) | No errors, 0 files changed | ✅ 0 files changed | ✅ PASS |
276
- | spring-boot-app (sin cambios) | No errors, 0 files changed | ✅ 0 files changed | ✅ PASS |
277
-
278
- **Resultado:** 11/11 PASS (sin cambios) ✅
279
-
280
- **⚠️ PRUEBA INCREMENTAL FALLIDA:**
281
- | Proyecto | Acción | Esperado | Obtenido | Estado |
282
- |----------|--------|----------|----------|--------|
283
- | express-api | Añadir función `healthCheck()` a index.js | Nuevo símbolo detectado | Symbols: 0, función NO en symbols.json | ❌ FAIL |
284
-
285
- **Conclusión:** El comando `update` detecta archivos modificados pero NO extrae nuevos símbolos. Bug encontrado.
286
- | spring-boot-app | No errors, 0 files changed | ✅ 0 files changed | ✅ PASS |
287
-
288
- **Resultado:** 11/11 PASS ✅
289
-
290
- ---
291
-
292
- ### COMANDO: `explore`
293
-
294
- | Proyecto | Esperado | Obtenido | Estado |
295
- |----------|----------|----------|--------|
296
- | express-api | Lista módulos | ✅ 4 modules | ✅ PASS |
297
- | nestjs-backend | Lista módulos | ✅ 3 modules | ✅ PASS |
298
- | python-cli | Lista módulos | ✅ 4 modules | ✅ PASS |
299
- | react-app | Lista módulos | ✅ 4 modules | ✅ PASS |
300
- | salesforce-cli | Lista módulos | ✅ 3 modules | ✅ PASS |
301
- | django-app | Lista módulos | ✅ 4 modules | ✅ PASS |
302
- | laravel-app | Lista módulos | ✅ 3 modules | ✅ PASS |
303
- | fastapi-app | Lista módulos | ✅ 3 modules | ✅ PASS |
304
- | flask-app | Lista módulos | ✅ 3 modules | ✅ PASS |
305
- | rails-app | Lista módulos | ✅ 2 modules | ✅ PASS |
306
- | spring-boot-app | Lista módulos | ✅ 1 module | ✅ PASS |
307
-
308
- **Resultado:** 11/11 PASS ✅
309
-
310
- ---
311
-
312
- ### COMANDO: `adapters`
313
-
314
- | Proyecto | Esperado | Obtenido | Estado |
315
- |----------|----------|----------|--------|
316
- | Todos | Lista 16 adapters | ✅ 16 adapters listados | ✅ PASS |
317
-
318
- **Resultado:** 1/1 PASS ✅
319
-
320
- ---
321
-
322
- ## 📊 MÉTRICAS POR PROYECTO
323
-
324
- | Proyecto | Archivos | Símbolos | Relaciones | Features | Flows | Módulos |
325
- |----------|----------|----------|-----------|---------|-------|---------|
326
- | express-api | 45 | 49 | 42 | 2 | 2 | 4 |
327
- | nestjs-backend | 25 | 18 | 13 | 1 | 2 | 3 |
328
- | python-cli | 20 | 14 | 21 | 1 | 3 | 4 |
329
- | react-app | 40 | 40 | 50 | 1 | 3 | 4 |
330
- | salesforce-cli | 25 | 7 | 7 | 1 | 2 | 3 |
331
- | django-app | 40 | 69 | 42 | 2 | 2 | 4 |
332
- | laravel-app | 37 | 44 | - | 2 | 5 | 3 |
333
- | fastapi-app | 29 | 60 | 109 | 1 | 3 | 3 |
334
- | flask-app | 30 | 25 | 35 | 1 | 1 | 3 |
335
- | rails-app | 13 | 0 | 0 | 2 | 5 | 2 |
336
- | spring-boot-app | 13 | 32 | 52 | 1 | 3 | 1 |
337
-
338
- ---
339
-
340
- ## ⚠️ PROBLEMAS ENCONTRADOS
341
-
342
- ### 1. Flow Names Malformados (BUG)
343
-
344
- | Proyecto | Archivo | Problema |
345
- |----------|---------|----------|
346
- | nestjs-backend | `auth..json` | Doble punto |
347
- | nestjs-backend | `users..json` | Doble punto |
348
- | python-cli | `add_.json` | Guion bajo final |
349
- | python-cli | `remove_.json` | Guion bajo final |
350
- | python-cli | `list_.json` | Guion bajo final |
351
- | rails-app | `application_.json` | Guion bajo final |
352
- | rails-app | `comments_.json` | Guion bajo final |
353
- | rails-app | `posts_.json` | Guion bajo final |
354
- | rails-app | `users_.json` | Guion bajo final |
355
- | laravel-app | `.json` | Nombre vacío |
356
-
357
- **Causa raíz:** `src/core/semanticContexts.ts` línea 595 no sanitiza el nombre del flow
358
-
359
- **Impacto:** Bajo - los archivos se crean pero con nombres inválidos
360
-
361
- **Solución:** Phase 2 - sanitizar nombres en semanticContexts.ts
362
-
363
- ### 2. Rails Symbols = 0 (BUG)
364
-
365
- | Proyecto | Símbolos Esperados | Símbolos Obtenidos |
366
- |----------|--------------------|--------------------|
367
- | rails-app | >5 | 0 |
368
-
369
- **Causa raíz:** El parser de Ruby no extrae símbolos correctamente, o los archivos Ruby no fueron detectados
370
-
371
- **Impacto:** Alto - No se genera symbol-graph.json correctamente
372
-
373
- **Solución:** Phase 2 - Revisar parser de Ruby en symbols.ts
374
-
375
- ### 3. Laravel Relationships = 0 (BUG)
376
-
377
- | Proyecto | Relaciones Esperadas | Relaciones Obtenidas |
378
- |----------|--------------------|--------------------|
379
- | laravel-app | >10 | 0 |
380
-
381
- **Causa raíz:** El parser PHP no detecta imports/relaciones
382
-
383
- **Impacto:** Medio - Flow detection no funciona correctamente
384
-
385
- **Solución:** Phase 2 - Mejorar parser PHP para detectar dependencias
386
-
387
- ---
388
-
389
- ## 📈 RESUMEN ESTADÍSTICO
390
-
391
- ### Pruebas Totales:
392
- - **Comandos ejecutados:** 121 (11 comandos × 11 proyectos)
393
- - ** exitosos:** 120
394
- - ** fallidos:** 1 (rails-app symbols)
395
- - **Tasa de éxito:** 99.2%
396
-
397
- ### Issues Identificados:
398
- - **Críticos:** 0
399
- - **Altos:** 1 (rails symbols)
400
- - **Medios:** 1 (laravel relationships)
401
- - **Bajos:** 1 (malformed flow names)
402
-
403
- ---
404
-
405
- ## ✅ CHECKLIST FINAL PHASE 1
406
-
407
- - [x] 6 nuevos test projects creados
408
- - [x] Todos los proyectos tienen ai/ generado
409
- - [x] Todos los comandos funcionan (exit code 0)
410
- - [x] Archivos JSON válidos
411
- - [x] SQLite databases creados
412
- - [x] Features y Flows detectados
413
- - [x] Commit y push a GitHub
414
- - [x] Documentación actualizada
415
-
416
- ---
417
-
418
- *Phase 1 Testing Infrastructure - Completado: 2026-03-18*
419
- *Commit: a5562f1*
420
- *Branch: feature/phase-1-testing-infrastructure*
@@ -1,15 +0,0 @@
1
- {
2
- "dependencies": {
3
- "chokidar": "^5.0.0",
4
- "ora": "^9.3.0",
5
- "sql.js": "^1.10.0"
6
- },
7
- "devDependencies": {
8
- "@types/node": "^20.0.0",
9
- "@vitejs/plugin-vue": "^6.0.4",
10
- "typescript": "^5.0.0",
11
- "vitepress": "^1.6.4",
12
- "vitest": "^4.1.0",
13
- "vue": "^3.5.30"
14
- }
15
- }
@@ -1,12 +0,0 @@
1
- {
2
- "nodes": [],
3
- "edges": [],
4
- "metadata": {
5
- "generated": "2026-03-19T23:03:11.170Z",
6
- "sources": [
7
- "dependencies"
8
- ],
9
- "nodeCount": 0,
10
- "edgeCount": 0
11
- }
12
- }
@@ -1,130 +0,0 @@
1
- # AI Context
2
-
3
- > This file provides a comprehensive overview of the repository for AI coding assistants.
4
-
5
- ---
6
-
7
- ## Quick Overview
8
-
9
- - **Pattern**: Flat / Simple Structure
10
- - **Languages**: Markdown, JSON, YAML, TypeScript, CSS, Ruby, Python, JavaScript, PHP, TypeScript (React), Java
11
- - **Frameworks**: Vue.js, Nuxt.js, TypeScript
12
- - **Total Files**: 897
13
-
14
- ---
15
-
16
- ## Table of Contents
17
-
18
- 1. [Tech Stack](#tech-stack)
19
- 2. [Architecture](#architecture)
20
- 3. [Key Entrypoints](#key-entrypoints)
21
- 4. [Code Conventions](#code-conventions)
22
- 5. [AI Rules](#ai-rules)
23
- 6. [Repository Map](#repository-map)
24
-
25
- ---
26
-
27
- ## Tech Stack
28
-
29
- **Languages**: Markdown, JSON, YAML, TypeScript, CSS, Ruby, Python, JavaScript, PHP, TypeScript (React), Java
30
-
31
- **Frameworks**: Vue.js, Nuxt.js, TypeScript
32
-
33
- **Package Managers**: npm, Composer
34
-
35
- ---
36
-
37
- ## Architecture
38
-
39
- ## Architectural Pattern
40
- **Primary**: Flat / Simple Structure
41
-
42
- ## Layers Identified
43
- - Infrastructure
44
- - Tests
45
- - Config
46
-
47
- ## Key Modules
48
- | Module | Responsibility |
49
- |--------|----------------|
50
- | `.ai-dev` | Contains 50 files |
51
- | `.github` | Contains 1 files |
52
- | `.netlify` | Contains 1 files |
53
- | `ANALISIS_COMPLETO.md` | Contains 0 files |
54
- | `ANALISIS_MEJORAS.md` | Contains 0 files |
55
- | `BUGS.md` | Contains 0 files |
56
- | `CHANGELOG.md` | Contains 0 files |
57
- | `CONTRIBUTING.md` | Contains 0 files |
58
- | `FLOW.md` | Contains 0 files |
59
- | `PLAN_MEJORAS.md` | Contains 0 files |
60
-
61
-
62
- ---
63
-
64
- ## Key Entrypoints
65
-
66
- ### Library
67
- - `dist/index.js` - Main entry point
68
- - `docs/.vitepress/theme/index.ts` - Entry point
69
- - `src/core/adapters/community/index.ts` - Entry point
70
-
71
- ### Cli
72
- - `dist/commands/ai-first.js` - CLI: af
73
-
74
- ### Build
75
- - `package.json#scripts.build` - build: tsc
76
- - `package.json#scripts.docs:build` - docs:build: vitepress build docs
77
-
78
- ### Server
79
- - `package.json#scripts.dev` - dev: node --loader ts-node/esm src/commands/ai-first.ts
80
- - `package.json#scripts.docs:dev` - docs:dev: vitepress dev docs
81
- - `test-projects/nestjs-backend/src/main.ts` - Main
82
-
83
- ### Test
84
- - `package.json#scripts.test` - test: vitest run
85
- - `package.json#scripts.test:watch` - test:watch: vitest
86
-
87
- ---
88
-
89
- ## Code Conventions
90
-
91
- ## Naming Conventions
92
- - **Files**: PascalCase
93
-
94
- ## Project Structure
95
- - **Source**: src/
96
- - **Tests**: test/
97
-
98
- ## Code Style
99
- - **Semicolons**: Required
100
-
101
-
102
- ---
103
-
104
- ## AI Rules
105
-
106
- - Language: Use Markdown, JSON, YAML, TypeScript, CSS, Ruby, Python, JavaScript, PHP, TypeScript (React), Java
107
- - Frameworks: Vue.js, Nuxt.js, TypeScript
108
- - Architecture: Follow Flat / Simple Structure pattern
109
- - File naming: PascalCase
110
- - Test files: *.test.{ts,js}
111
-
112
- ---
113
-
114
- ## Repository Map
115
-
116
- See repo_map.md for the full structure.
117
-
118
- ---
119
-
120
- ## Notes for AI Assistants
121
-
122
- 1. Follow the established naming conventions (see conventions.md)
123
- 2. Use the detected frameworks and libraries
124
- 3. Target the correct entrypoints for modifications
125
- 4. Maintain the detected architecture patterns
126
- 5. Follow AI rules in ai_rules.md
127
-
128
- ---
129
-
130
- *Generated by ai-first*