@girardelli/architect 2.2.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. package/README.md +105 -116
  2. package/__test_agent_output__/INDEX.md +1 -0
  3. package/__test_agent_output__/agents/AGENT-ORCHESTRATOR.md +1 -0
  4. package/__test_agent_output__/agents/DATABASE-ENGINEER.md +174 -0
  5. package/__test_agent_output__/agents/QA-TEST-ENGINEER.md +138 -0
  6. package/__test_agent_output__/agents/SECURITY-AUDITOR.md +106 -0
  7. package/__test_agent_output__/agents/TECH-DEBT-CONTROLLER.md +104 -0
  8. package/__test_agent_output__/agents/TYPESCRIPT-BACKEND-DEVELOPER.md +135 -0
  9. package/__test_agent_output__/guards/CODE-REVIEW-CHECKLIST.md +95 -0
  10. package/__test_agent_output__/guards/PREFLIGHT.md +200 -0
  11. package/__test_agent_output__/guards/QUALITY-GATES.md +1 -0
  12. package/__test_agent_output__/rules/00-general.md +229 -0
  13. package/__test_agent_output__/rules/01-architecture.md +191 -0
  14. package/__test_agent_output__/rules/02-security.md +402 -0
  15. package/__test_agent_output__/rules/03-nestjs.md +124 -0
  16. package/__test_agent_output__/templates/ADR.md +95 -0
  17. package/__test_agent_output__/templates/BDD.md +58 -0
  18. package/__test_agent_output__/templates/C4.md +68 -0
  19. package/__test_agent_output__/templates/TDD.md +86 -0
  20. package/__test_agent_output__/templates/THREAT-MODEL.md +82 -0
  21. package/__test_agent_output__/workflows/fix-bug.md +228 -0
  22. package/__test_agent_output__/workflows/new-feature.md +311 -0
  23. package/__test_agent_output__/workflows/review.md +95 -0
  24. package/__test_context_7RvUrO/src/modules/empty/empty.ts +0 -0
  25. package/__test_context_Rf5fNJ/src/modules/mixed/mixed.ts +5 -0
  26. package/__test_context_WRCnYH/src/modules/test/test.ts +10 -0
  27. package/__test_context_YsnVS3/src/modules/test/test.ts +10 -0
  28. package/__test_context_w7XZeH/src/modules/mixed/mixed.ts +5 -0
  29. package/__test_context_y5noh6/src/modules/empty/empty.ts +0 -0
  30. package/__test_framework__24OjAu/package.json +1 -0
  31. package/__test_framework__3ZDZsx/pyproject.toml +8 -0
  32. package/__test_framework__4T54Jn/package.json +1 -0
  33. package/__test_framework__4tlXu9/pyproject.toml +8 -0
  34. package/__test_framework__6boWqQ/Pipfile +6 -0
  35. package/__test_framework__6gygMU/pom.xml +10 -0
  36. package/__test_framework__6kxj0N/go.mod +8 -0
  37. package/__test_framework__7CEoXw/pom.xml +10 -0
  38. package/__test_framework__85DDz0/Pipfile +6 -0
  39. package/__test_framework__9WrRIr/pom.xml +7 -0
  40. package/__test_framework__ANqGKl/Gemfile +5 -0
  41. package/__test_framework__BCXTEM/go.mod +3 -0
  42. package/__test_framework__BHiPNq/setup.py +2 -0
  43. package/__test_framework__BqkiKv/package.json +1 -0
  44. package/__test_framework__C5yd8X/Pipfile.lock +1 -0
  45. package/__test_framework__C5yd8X/requirements.txt +1 -0
  46. package/__test_framework__C87d3a/manage.py +1 -0
  47. package/__test_framework__C87d3a/requirements.txt +2 -0
  48. package/__test_framework__DXNwc5/build.gradle +7 -0
  49. package/__test_framework__GhHSt3/build.gradle.kts +4 -0
  50. package/__test_framework__GzklJP/Cargo.toml +7 -0
  51. package/__test_framework__H4hd13/go.mod +8 -0
  52. package/__test_framework__HKjOXO/composer.json +1 -0
  53. package/__test_framework__HaDN45/Gemfile +3 -0
  54. package/__test_framework__IBO7YG/pyproject.toml +9 -0
  55. package/__test_framework__JwSOyF/pyproject.toml +6 -0
  56. package/__test_framework__K6HrCr/build.gradle +2 -0
  57. package/__test_framework__KzRPlh/pubspec.yaml +9 -0
  58. package/__test_framework__L6uIym/pyproject.toml +6 -0
  59. package/__test_framework__LOdoGK/requirements.txt +4 -0
  60. package/__test_framework__LgHzss/package.json +1 -0
  61. package/__test_framework__M76M6q/Gemfile +5 -0
  62. package/__test_framework__Mr9vWW/composer.json +1 -0
  63. package/__test_framework__N03Gnv/package.json +1 -0
  64. package/__test_framework__Num4UE/requirements +1 -0
  65. package/__test_framework__OAGw3Y/build.gradle +7 -0
  66. package/__test_framework__OQc8yG/pubspec.yaml +9 -0
  67. package/__test_framework__OwKZcd/requirements.txt +3 -0
  68. package/__test_framework__P0gFv7/requirements +1 -0
  69. package/__test_framework__PN55Rq/package.json +1 -0
  70. package/__test_framework__PQiqX8/pubspec.yaml +3 -0
  71. package/__test_framework__RBHsg7/composer.json +1 -0
  72. package/__test_framework__RHxif4/Cargo.toml +7 -0
  73. package/__test_framework__T0v0p1/Cargo.toml +4 -0
  74. package/__test_framework__Tu0clt/Pipfile.lock +1 -0
  75. package/__test_framework__Tu0clt/requirements.txt +1 -0
  76. package/__test_framework__TwDj9P/Cargo.toml +4 -0
  77. package/__test_framework__VQJNC4/pom.xml +7 -0
  78. package/__test_framework__W6sm05/package.json +1 -0
  79. package/__test_framework__W7vBLy/pyproject.toml +4 -0
  80. package/__test_framework__WNJOWT/setup.py +2 -0
  81. package/__test_framework__WSJs7U/package.json +1 -0
  82. package/__test_framework__YQ5VpA/build.gradle.kts +4 -0
  83. package/__test_framework__ZNEUEs/package.json +1 -0
  84. package/__test_framework__Znt922/pom.xml +7 -0
  85. package/__test_framework__azyg0h/pom.xml +7 -0
  86. package/__test_framework__c6otLr/package.json +1 -0
  87. package/__test_framework__cl9S9G/build.gradle +2 -0
  88. package/__test_framework__eilvV4/composer.json +1 -0
  89. package/__test_framework__gQZxXO/manage.py +1 -0
  90. package/__test_framework__gQZxXO/requirements.txt +2 -0
  91. package/__test_framework__ghvl26/poetry.lock +1 -0
  92. package/__test_framework__ghvl26/pyproject.toml +2 -0
  93. package/__test_framework__hR7b9U/Makefile +11 -0
  94. package/__test_framework__iESVsi/composer.json +1 -0
  95. package/__test_framework__jm6TJy/package.json +1 -0
  96. package/__test_framework__kBUpjs/pyproject.toml +9 -0
  97. package/__test_framework__kqoZrw/requirements.txt +4 -0
  98. package/__test_framework__lWkoyO/pyproject.toml +4 -0
  99. package/__test_framework__mTKnUO/package.json +1 -0
  100. package/__test_framework__nCeZwe/Makefile +11 -0
  101. package/__test_framework__oljsU0/package.json +1 -0
  102. package/__test_framework__osRG4q/go.mod +3 -0
  103. package/__test_framework__pCHH4F/package.json +1 -0
  104. package/__test_framework__pExx6E/Gemfile +3 -0
  105. package/__test_framework__pyBoGd/pyproject.toml +5 -0
  106. package/__test_framework__qw16VQ/package.json +1 -0
  107. package/__test_framework__rRayrG/package.json +1 -0
  108. package/__test_framework__s82zO5/package.json +1 -0
  109. package/__test_framework__tp8MFK/pyproject.toml +5 -0
  110. package/__test_framework__w44k4w/composer.json +1 -0
  111. package/__test_framework__yefPZY/poetry.lock +1 -0
  112. package/__test_framework__yefPZY/pyproject.toml +2 -0
  113. package/__test_framework__zCiyDT/requirements.txt +3 -0
  114. package/__test_framework__zGZN3j/pubspec.yaml +3 -0
  115. package/__test_framework__zXpnxL/package.json +1 -0
  116. package/architect-run.sh +431 -0
  117. package/assets/banner-v3.html +561 -0
  118. package/dist/agent-generator/context-enricher.d.ts +58 -0
  119. package/dist/agent-generator/context-enricher.d.ts.map +1 -0
  120. package/dist/agent-generator/context-enricher.js +581 -0
  121. package/dist/agent-generator/context-enricher.js.map +1 -0
  122. package/dist/agent-generator/domain-inferrer.d.ts +52 -0
  123. package/dist/agent-generator/domain-inferrer.d.ts.map +1 -0
  124. package/dist/agent-generator/domain-inferrer.js +575 -0
  125. package/dist/agent-generator/domain-inferrer.js.map +1 -0
  126. package/dist/agent-generator/framework-detector.d.ts +40 -0
  127. package/dist/agent-generator/framework-detector.d.ts.map +1 -0
  128. package/dist/agent-generator/framework-detector.js +611 -0
  129. package/dist/agent-generator/framework-detector.js.map +1 -0
  130. package/dist/agent-generator/index.d.ts +33 -0
  131. package/dist/agent-generator/index.d.ts.map +1 -0
  132. package/dist/agent-generator/index.js +477 -0
  133. package/dist/agent-generator/index.js.map +1 -0
  134. package/dist/agent-generator/stack-detector.d.ts +12 -0
  135. package/dist/agent-generator/stack-detector.d.ts.map +1 -0
  136. package/dist/agent-generator/stack-detector.js +128 -0
  137. package/dist/agent-generator/stack-detector.js.map +1 -0
  138. package/dist/agent-generator/templates/core/agents.d.ts +17 -0
  139. package/dist/agent-generator/templates/core/agents.d.ts.map +1 -0
  140. package/dist/agent-generator/templates/core/agents.js +1252 -0
  141. package/dist/agent-generator/templates/core/agents.js.map +1 -0
  142. package/dist/agent-generator/templates/core/architecture-rules.d.ts +7 -0
  143. package/dist/agent-generator/templates/core/architecture-rules.d.ts.map +1 -0
  144. package/dist/agent-generator/templates/core/architecture-rules.js +274 -0
  145. package/dist/agent-generator/templates/core/architecture-rules.js.map +1 -0
  146. package/dist/agent-generator/templates/core/general-rules.d.ts +8 -0
  147. package/dist/agent-generator/templates/core/general-rules.d.ts.map +1 -0
  148. package/dist/agent-generator/templates/core/general-rules.js +301 -0
  149. package/dist/agent-generator/templates/core/general-rules.js.map +1 -0
  150. package/dist/agent-generator/templates/core/index-md.d.ts +7 -0
  151. package/dist/agent-generator/templates/core/index-md.d.ts.map +1 -0
  152. package/dist/agent-generator/templates/core/index-md.js +246 -0
  153. package/dist/agent-generator/templates/core/index-md.js.map +1 -0
  154. package/dist/agent-generator/templates/core/orchestrator.d.ts +8 -0
  155. package/dist/agent-generator/templates/core/orchestrator.d.ts.map +1 -0
  156. package/dist/agent-generator/templates/core/orchestrator.js +422 -0
  157. package/dist/agent-generator/templates/core/orchestrator.js.map +1 -0
  158. package/dist/agent-generator/templates/core/preflight.d.ts +8 -0
  159. package/dist/agent-generator/templates/core/preflight.d.ts.map +1 -0
  160. package/dist/agent-generator/templates/core/preflight.js +213 -0
  161. package/dist/agent-generator/templates/core/preflight.js.map +1 -0
  162. package/dist/agent-generator/templates/core/quality-gates.d.ts +11 -0
  163. package/dist/agent-generator/templates/core/quality-gates.d.ts.map +1 -0
  164. package/dist/agent-generator/templates/core/quality-gates.js +254 -0
  165. package/dist/agent-generator/templates/core/quality-gates.js.map +1 -0
  166. package/dist/agent-generator/templates/core/security-rules.d.ts +7 -0
  167. package/dist/agent-generator/templates/core/security-rules.d.ts.map +1 -0
  168. package/dist/agent-generator/templates/core/security-rules.js +528 -0
  169. package/dist/agent-generator/templates/core/security-rules.js.map +1 -0
  170. package/dist/agent-generator/templates/core/skills-generator.d.ts +6 -0
  171. package/dist/agent-generator/templates/core/skills-generator.d.ts.map +1 -0
  172. package/dist/agent-generator/templates/core/skills-generator.js +207 -0
  173. package/dist/agent-generator/templates/core/skills-generator.js.map +1 -0
  174. package/dist/agent-generator/templates/core/workflow-fix-bug.d.ts +7 -0
  175. package/dist/agent-generator/templates/core/workflow-fix-bug.d.ts.map +1 -0
  176. package/dist/agent-generator/templates/core/workflow-fix-bug.js +237 -0
  177. package/dist/agent-generator/templates/core/workflow-fix-bug.js.map +1 -0
  178. package/dist/agent-generator/templates/core/workflow-new-feature.d.ts +8 -0
  179. package/dist/agent-generator/templates/core/workflow-new-feature.d.ts.map +1 -0
  180. package/dist/agent-generator/templates/core/workflow-new-feature.js +321 -0
  181. package/dist/agent-generator/templates/core/workflow-new-feature.js.map +1 -0
  182. package/dist/agent-generator/templates/core/workflow-review.d.ts +7 -0
  183. package/dist/agent-generator/templates/core/workflow-review.d.ts.map +1 -0
  184. package/dist/agent-generator/templates/core/workflow-review.js +104 -0
  185. package/dist/agent-generator/templates/core/workflow-review.js.map +1 -0
  186. package/dist/agent-generator/templates/domain/index.d.ts +22 -0
  187. package/dist/agent-generator/templates/domain/index.d.ts.map +1 -0
  188. package/dist/agent-generator/templates/domain/index.js +1176 -0
  189. package/dist/agent-generator/templates/domain/index.js.map +1 -0
  190. package/dist/agent-generator/templates/stack/index.d.ts +8 -0
  191. package/dist/agent-generator/templates/stack/index.d.ts.map +1 -0
  192. package/dist/agent-generator/templates/stack/index.js +695 -0
  193. package/dist/agent-generator/templates/stack/index.js.map +1 -0
  194. package/dist/agent-generator/templates/template-helpers.d.ts +75 -0
  195. package/dist/agent-generator/templates/template-helpers.d.ts.map +1 -0
  196. package/dist/agent-generator/templates/template-helpers.js +726 -0
  197. package/dist/agent-generator/templates/template-helpers.js.map +1 -0
  198. package/dist/agent-generator/types.d.ts +196 -0
  199. package/dist/agent-generator/types.d.ts.map +1 -0
  200. package/dist/agent-generator/types.js +27 -0
  201. package/dist/agent-generator/types.js.map +1 -0
  202. package/dist/analyzer.d.ts +5 -0
  203. package/dist/analyzer.d.ts.map +1 -1
  204. package/dist/analyzer.js +35 -4
  205. package/dist/analyzer.js.map +1 -1
  206. package/dist/analyzers/forecast.d.ts +85 -0
  207. package/dist/analyzers/forecast.d.ts.map +1 -0
  208. package/dist/analyzers/forecast.js +337 -0
  209. package/dist/analyzers/forecast.js.map +1 -0
  210. package/dist/analyzers/git-cache.d.ts +7 -0
  211. package/dist/analyzers/git-cache.d.ts.map +1 -0
  212. package/dist/analyzers/git-cache.js +41 -0
  213. package/dist/analyzers/git-cache.js.map +1 -0
  214. package/dist/analyzers/git-history.d.ts +113 -0
  215. package/dist/analyzers/git-history.d.ts.map +1 -0
  216. package/dist/analyzers/git-history.js +333 -0
  217. package/dist/analyzers/git-history.js.map +1 -0
  218. package/dist/analyzers/index.d.ts +10 -0
  219. package/dist/analyzers/index.d.ts.map +1 -0
  220. package/dist/analyzers/index.js +7 -0
  221. package/dist/analyzers/index.js.map +1 -0
  222. package/dist/analyzers/temporal-scorer.d.ts +72 -0
  223. package/dist/analyzers/temporal-scorer.d.ts.map +1 -0
  224. package/dist/analyzers/temporal-scorer.js +140 -0
  225. package/dist/analyzers/temporal-scorer.js.map +1 -0
  226. package/dist/cli.d.ts +2 -3
  227. package/dist/cli.d.ts.map +1 -1
  228. package/dist/cli.js +275 -113
  229. package/dist/cli.js.map +1 -1
  230. package/dist/html-reporter.d.ts +3 -1
  231. package/dist/html-reporter.d.ts.map +1 -1
  232. package/dist/html-reporter.js +248 -12
  233. package/dist/html-reporter.js.map +1 -1
  234. package/dist/index.d.ts +16 -3
  235. package/dist/index.d.ts.map +1 -1
  236. package/dist/index.js +63 -4
  237. package/dist/index.js.map +1 -1
  238. package/dist/project-summarizer.d.ts +18 -0
  239. package/dist/project-summarizer.d.ts.map +1 -0
  240. package/dist/project-summarizer.js +306 -0
  241. package/dist/project-summarizer.js.map +1 -0
  242. package/dist/refactor-reporter.js +1 -1
  243. package/dist/types.d.ts +13 -0
  244. package/dist/types.d.ts.map +1 -1
  245. package/package.json +12 -3
  246. package/src/agent-generator/context-enricher.ts +643 -0
  247. package/src/agent-generator/domain-inferrer.ts +625 -0
  248. package/src/agent-generator/framework-detector.ts +669 -0
  249. package/src/agent-generator/index.ts +555 -0
  250. package/src/agent-generator/stack-detector.ts +103 -0
  251. package/src/agent-generator/templates/core/agents.ts +1293 -0
  252. package/src/agent-generator/templates/core/architecture-rules.ts +287 -0
  253. package/src/agent-generator/templates/core/general-rules.ts +306 -0
  254. package/src/agent-generator/templates/core/index-md.ts +260 -0
  255. package/src/agent-generator/templates/core/orchestrator.ts +459 -0
  256. package/src/agent-generator/templates/core/preflight.ts +215 -0
  257. package/src/agent-generator/templates/core/quality-gates.ts +256 -0
  258. package/src/agent-generator/templates/core/security-rules.ts +543 -0
  259. package/src/agent-generator/templates/core/skills-generator.ts +236 -0
  260. package/src/agent-generator/templates/core/workflow-fix-bug.ts +239 -0
  261. package/src/agent-generator/templates/core/workflow-new-feature.ts +323 -0
  262. package/src/agent-generator/templates/core/workflow-review.ts +106 -0
  263. package/src/agent-generator/templates/domain/index.ts +1201 -0
  264. package/src/agent-generator/templates/stack/index.ts +705 -0
  265. package/src/agent-generator/templates/template-helpers.ts +776 -0
  266. package/src/agent-generator/types.ts +232 -0
  267. package/src/analyzer.ts +38 -4
  268. package/src/analyzers/forecast.ts +496 -0
  269. package/src/analyzers/git-cache.ts +52 -0
  270. package/src/analyzers/git-history.ts +488 -0
  271. package/src/analyzers/index.ts +33 -0
  272. package/src/analyzers/temporal-scorer.ts +227 -0
  273. package/src/cli.ts +316 -117
  274. package/src/html-reporter.ts +263 -13
  275. package/src/index.ts +92 -9
  276. package/src/project-summarizer.ts +347 -0
  277. package/src/refactor-reporter.ts +1 -1
  278. package/src/types.ts +10 -0
  279. package/tests/agent-generator.test.ts +411 -0
  280. package/tests/analyzers-integration.test.ts +174 -0
  281. package/tests/architect-adapter-enrichment.test.ts +9 -0
  282. package/tests/context-enricher.test.ts +971 -0
  283. package/tests/forecast.test.ts +509 -0
  284. package/tests/framework-detector.test.ts +1172 -0
  285. package/tests/git-history.test.ts +254 -0
  286. package/tests/scanner.test.ts +7 -8
  287. package/tests/scorer.test.ts +588 -0
  288. package/tests/stack-detector.test.ts +241 -0
  289. package/tests/template-generation.test.ts +706 -0
  290. package/tests/template-helpers.test.ts +1152 -0
  291. package/tests/temporal-scorer.test.ts +307 -0
  292. package/dist/agent-generator.d.ts +0 -106
  293. package/dist/agent-generator.d.ts.map +0 -1
  294. package/dist/agent-generator.js +0 -1398
  295. package/dist/agent-generator.js.map +0 -1
  296. package/src/agent-generator.ts +0 -1526
@@ -0,0 +1,581 @@
1
+ import { existsSync, readFileSync, statSync } from 'fs';
2
+ import { join } from 'path';
3
+ import { DEFAULT_AGENT_CONFIG, } from './types.js';
4
+ import { DomainInferrer } from './domain-inferrer.js';
5
+ import { FrameworkDetector } from './framework-detector.js';
6
+ /**
7
+ * ContextEnricher — Builds an EnrichedTemplateContext from AnalysisReport.
8
+ *
9
+ * Multi-stack: detects modules and endpoints for Python, TypeScript, Java, PHP,
10
+ * Go, Ruby, Dart — supports NestJS modules, Django apps, FastAPI routers,
11
+ * Spring controllers, Laravel controllers, Flask blueprints, and more.
12
+ *
13
+ * v3.1: Now includes framework detection, line counting, smart descriptions,
14
+ * and project structure detection for truly context-aware agent generation.
15
+ */
16
+ export class ContextEnricher {
17
+ constructor() {
18
+ this.domainInferrer = new DomainInferrer();
19
+ this.frameworkDetector = new FrameworkDetector();
20
+ }
21
+ /**
22
+ * Build a fully enriched context for template generation.
23
+ */
24
+ enrich(report, plan, stack, projectPath, config = DEFAULT_AGENT_CONFIG) {
25
+ const modules = this.extractModules(report, projectPath);
26
+ const endpoints = this.extractEndpoints(report, modules);
27
+ const untestedModules = this.findUntestedModules(modules);
28
+ const criticalPaths = this.findCriticalPaths(report);
29
+ const projectDepth = this.classifyProjectDepth(report);
30
+ const domain = this.domainInferrer.infer(report, projectPath);
31
+ // v3.1: Framework detection
32
+ const fwResult = this.frameworkDetector.detect(projectPath, report);
33
+ return {
34
+ report,
35
+ plan,
36
+ stack,
37
+ projectName: report.projectInfo.name || 'Project',
38
+ stackLabel: [...stack.languages, ...stack.frameworks].join(' + '),
39
+ config,
40
+ domain,
41
+ modules,
42
+ endpoints,
43
+ untestedModules,
44
+ criticalPaths,
45
+ projectDepth,
46
+ detectedFrameworks: fwResult.frameworks,
47
+ primaryFramework: fwResult.primaryFramework,
48
+ toolchain: fwResult.toolchain,
49
+ projectStructure: fwResult.projectStructure,
50
+ };
51
+ }
52
+ // ═══════════════════════════════════════════════════════════════════════
53
+ // MODULE EXTRACTION — Multi-stack, multi-architecture
54
+ // ═══════════════════════════════════════════════════════════════════════
55
+ extractModules(report, projectPath) {
56
+ const modules = new Map();
57
+ const nodes = report.dependencyGraph.nodes;
58
+ for (const filePath of nodes) {
59
+ const moduleName = this.inferModuleName(filePath);
60
+ if (!moduleName)
61
+ continue;
62
+ if (!modules.has(moduleName)) {
63
+ modules.set(moduleName, {
64
+ name: moduleName,
65
+ path: this.inferModulePath(filePath, moduleName),
66
+ files: [],
67
+ fileCount: 0,
68
+ lineCount: 0,
69
+ description: '',
70
+ hasTests: false,
71
+ testFiles: [],
72
+ entities: [],
73
+ controllers: [],
74
+ services: [],
75
+ layer: this.inferFileLayer(filePath),
76
+ });
77
+ }
78
+ const mod = modules.get(moduleName);
79
+ mod.files.push(filePath);
80
+ mod.fileCount++;
81
+ // v3.1: Count real lines
82
+ mod.lineCount += this.countFileLines(projectPath, filePath);
83
+ const lower = filePath.toLowerCase();
84
+ if (this.isTestFile(lower)) {
85
+ mod.hasTests = true;
86
+ mod.testFiles.push(filePath);
87
+ }
88
+ if (this.isEntityFile(lower)) {
89
+ const entityName = this.extractEntityName(filePath);
90
+ if (entityName)
91
+ mod.entities.push(entityName);
92
+ }
93
+ if (this.isControllerOrRouteFile(lower)) {
94
+ mod.controllers.push(filePath);
95
+ }
96
+ if (this.isServiceFile(lower)) {
97
+ mod.services.push(filePath);
98
+ }
99
+ }
100
+ // Enrich with descriptions from project summary
101
+ if (report.projectSummary?.modules) {
102
+ for (const summaryMod of report.projectSummary.modules) {
103
+ const key = summaryMod.name.toLowerCase();
104
+ for (const [modName, mod] of modules) {
105
+ if (modName.toLowerCase().includes(key) || key.includes(modName.toLowerCase())) {
106
+ mod.description = summaryMod.description;
107
+ break;
108
+ }
109
+ }
110
+ }
111
+ }
112
+ // v3.1: Smart descriptions for modules without one
113
+ for (const mod of modules.values()) {
114
+ if (!mod.description) {
115
+ mod.description = this.generateSmartDescription(mod);
116
+ }
117
+ }
118
+ return [...modules.values()].sort((a, b) => b.fileCount - a.fileCount);
119
+ }
120
+ // ═══════════════════════════════════════════════════════════════════════
121
+ // v3.1: LINE COUNTING
122
+ // ═══════════════════════════════════════════════════════════════════════
123
+ /**
124
+ * Count actual lines in a file. Uses a fast approach:
125
+ * reads file size and estimates if too large, counts \n for smaller files.
126
+ */
127
+ countFileLines(projectPath, filePath) {
128
+ try {
129
+ const fullPath = join(projectPath, filePath);
130
+ if (!existsSync(fullPath))
131
+ return 0;
132
+ const stats = statSync(fullPath);
133
+ // Skip files larger than 1MB — estimate based on average line length
134
+ if (stats.size > 1000000) {
135
+ return Math.round(stats.size / 45); // ~45 chars avg per line
136
+ }
137
+ if (stats.size === 0)
138
+ return 0;
139
+ const content = readFileSync(fullPath, 'utf-8');
140
+ return content.split('\n').length;
141
+ }
142
+ catch {
143
+ return 0;
144
+ }
145
+ }
146
+ // ═══════════════════════════════════════════════════════════════════════
147
+ // v3.1: SMART MODULE DESCRIPTIONS
148
+ // ═══════════════════════════════════════════════════════════════════════
149
+ /**
150
+ * Generate intelligent descriptions based on module name patterns,
151
+ * file composition, and layer context.
152
+ */
153
+ generateSmartDescription(mod) {
154
+ const name = mod.name.toLowerCase();
155
+ const parts = [];
156
+ // Pattern-based descriptions
157
+ const descriptionPatterns = {
158
+ 'extractors': 'Extração e parsing de dados de documentos',
159
+ 'ocr': 'Reconhecimento óptico de caracteres (OCR)',
160
+ 'guards': 'Validação e proteção de fluxos de dados',
161
+ 'confidence': 'Cálculo de confiança e scoring de dados extraídos',
162
+ 'routes': 'Definição de rotas e endpoints da API',
163
+ 'workers': 'Processamento assíncrono e workers de background',
164
+ 'persistence': 'Camada de persistência e acesso a dados',
165
+ 'storage': 'Gerenciamento de armazenamento de arquivos',
166
+ 'agents': 'Agentes de processamento e automação',
167
+ 'auth': 'Autenticação e gerenciamento de sessão',
168
+ 'users': 'Gerenciamento de usuários e perfis',
169
+ 'notifications': 'Sistema de notificações e alertas',
170
+ 'payments': 'Processamento de pagamentos e transações',
171
+ 'reports': 'Geração de relatórios e dashboards',
172
+ 'search': 'Motor de busca e indexação',
173
+ 'cache': 'Camada de cache e otimização de performance',
174
+ 'queue': 'Filas de mensagens e processamento assíncrono',
175
+ 'email': 'Envio e gerenciamento de e-mails',
176
+ 'upload': 'Upload e processamento de arquivos',
177
+ 'migration': 'Migrações de banco de dados',
178
+ 'seed': 'Dados iniciais e seed do banco',
179
+ 'fixtures': 'Fixtures e dados de teste',
180
+ 'middleware': 'Middleware de requisição/resposta',
181
+ 'dependencies': 'Injeção de dependências e configuração',
182
+ 'exceptions': 'Tratamento de erros e exceções customizadas',
183
+ 'enums': 'Enumerações e constantes de domínio',
184
+ 'events': 'Sistema de eventos e event handlers',
185
+ 'value_objects': 'Value Objects do domínio (imutáveis)',
186
+ 'entities': 'Entidades de domínio com identidade',
187
+ 'services': 'Serviços de domínio e lógica de negócio',
188
+ 'interfaces': 'Contratos e interfaces de abstração',
189
+ 'repositories': 'Repositórios de acesso a dados',
190
+ 'mappers': 'Mapeamento entre camadas (DTO ↔ Entity)',
191
+ 'validators': 'Validação de dados e regras de negócio',
192
+ 'serializers': 'Serialização/deserialização de dados',
193
+ 'schemas': 'Schemas de validação e contratos',
194
+ };
195
+ // Try exact match first
196
+ for (const [pattern, desc] of Object.entries(descriptionPatterns)) {
197
+ if (name === pattern || name.endsWith(`/${pattern}`)) {
198
+ parts.push(desc);
199
+ break;
200
+ }
201
+ }
202
+ // Try partial match
203
+ if (parts.length === 0) {
204
+ for (const [pattern, desc] of Object.entries(descriptionPatterns)) {
205
+ if (name.includes(pattern)) {
206
+ parts.push(desc);
207
+ break;
208
+ }
209
+ }
210
+ }
211
+ // Add composition info
212
+ const composition = [];
213
+ if (mod.controllers.length > 0)
214
+ composition.push(`${mod.controllers.length} endpoint(s)`);
215
+ if (mod.services.length > 0)
216
+ composition.push(`${mod.services.length} service(s)`);
217
+ if (mod.entities.length > 0)
218
+ composition.push(`entities: ${mod.entities.join(', ')}`);
219
+ if (composition.length > 0) {
220
+ parts.push(composition.join(' · '));
221
+ }
222
+ // Fallback: file count + line count
223
+ if (parts.length === 0) {
224
+ parts.push(`${mod.fileCount} arquivo(s)`);
225
+ }
226
+ if (mod.lineCount > 0) {
227
+ parts.push(`${mod.lineCount.toLocaleString()} linhas`);
228
+ }
229
+ return parts.join(' — ');
230
+ }
231
+ /**
232
+ * Multi-strategy module name inference.
233
+ * Strategy 1: Explicit module markers (modules/, features/, apps/, etc.)
234
+ * Strategy 2: Clean Architecture layers — use meaningful subdirectory
235
+ * Strategy 3: Django apps pattern (app_name/models.py, app_name/views.py)
236
+ * Strategy 4: Package-based (Java/PHP namespaces)
237
+ * Strategy 5: Go package
238
+ * Strategy 6: Fallback — first non-generic directory from the end
239
+ */
240
+ inferModuleName(filePath) {
241
+ const parts = filePath.split('/');
242
+ const lower = filePath.toLowerCase();
243
+ // Skip __init__.py / index files as standalone modules
244
+ const fileName = parts[parts.length - 1].toLowerCase();
245
+ if (fileName === '__init__.py' || fileName === 'index.ts' || fileName === 'index.js' || fileName === 'index.py') {
246
+ // Only process if it's in a meaningful directory
247
+ }
248
+ // ── Strategy 1: Explicit module markers ──
249
+ const moduleMarkers = ['modules', 'features', 'apps', 'domains', 'packages', 'components', 'pages', 'bundles'];
250
+ for (let i = 0; i < parts.length; i++) {
251
+ if (moduleMarkers.includes(parts[i].toLowerCase()) && parts[i + 1]) {
252
+ return parts[i + 1];
253
+ }
254
+ }
255
+ // ── Strategy 2: Clean Architecture / DDD layers ──
256
+ const cleanArchLayers = new Set([
257
+ 'domain', 'application', 'infrastructure', 'presentation',
258
+ 'core', 'adapters', 'ports', 'usecases', 'use_cases',
259
+ ]);
260
+ for (let i = 0; i < parts.length - 1; i++) {
261
+ if (cleanArchLayers.has(parts[i].toLowerCase()) && parts[i + 1]) {
262
+ const nextDir = parts[i + 1].toLowerCase();
263
+ const subLayers = new Set([
264
+ 'services', 'entities', 'models', 'repositories', 'interfaces',
265
+ 'value_objects', 'events', 'exceptions', 'enums', 'dto', 'dtos',
266
+ 'controllers', 'views', 'routes', 'api', 'workers', 'consumers',
267
+ 'persistence', 'storage', 'extraction', 'agents', 'adapters',
268
+ 'mappers', 'factories', 'providers', 'guards', 'middleware',
269
+ 'dependencies', 'schemas', 'serializers', 'signals', 'tasks',
270
+ 'commands', 'queries', 'handlers', 'listeners',
271
+ ]);
272
+ if (subLayers.has(nextDir)) {
273
+ if (parts[i + 2] && !parts[i + 2].includes('.')) {
274
+ return parts[i + 2]; // e.g., infrastructure/extraction/extractors → extractors
275
+ }
276
+ return `${parts[i]}/${parts[i + 1]}`;
277
+ }
278
+ if (!this.isGenericDir(nextDir) && nextDir.length > 2 && !nextDir.startsWith('__')) {
279
+ return parts[i + 1];
280
+ }
281
+ }
282
+ }
283
+ // ── Strategy 3: Django apps pattern ──
284
+ const djangoMarkers = ['views.py', 'models.py', 'urls.py', 'serializers.py', 'admin.py', 'apps.py', 'forms.py'];
285
+ if (djangoMarkers.some(m => lower.endsWith(m))) {
286
+ const parentDir = parts[parts.length - 2];
287
+ if (parentDir && !this.isGenericDir(parentDir.toLowerCase())) {
288
+ return parentDir;
289
+ }
290
+ }
291
+ // ── Strategy 4: Java/PHP package-based ──
292
+ const javaPackageMarkers = ['com', 'org', 'net', 'io', 'br'];
293
+ for (let i = 0; i < parts.length; i++) {
294
+ if (javaPackageMarkers.includes(parts[i].toLowerCase()) && parts[i + 2]) {
295
+ return parts[i + 2];
296
+ }
297
+ }
298
+ // PHP namespace: App/Http/Controllers/UserController.php → user
299
+ if (lower.includes('/http/controllers/') || lower.includes('/http/requests/')) {
300
+ const parentDir = parts[parts.length - 2];
301
+ if (parentDir && parentDir.toLowerCase() !== 'controllers' && parentDir.toLowerCase() !== 'requests') {
302
+ return parentDir;
303
+ }
304
+ const baseName = parts[parts.length - 1]
305
+ .replace(/\.[^.]+$/, '')
306
+ .replace(/(Controller|Request|Resource|Policy|Observer|Event)$/i, '');
307
+ if (baseName.length > 2)
308
+ return baseName;
309
+ }
310
+ // ── Strategy 5: Go package ──
311
+ if (lower.endsWith('.go')) {
312
+ const parentDir = parts[parts.length - 2];
313
+ if (parentDir && !this.isGenericDir(parentDir.toLowerCase()) && parentDir !== 'cmd' && parentDir !== 'internal' && parentDir !== 'pkg') {
314
+ return parentDir;
315
+ }
316
+ }
317
+ // ── Strategy 6: Fallback — walk from end, find first non-generic dir ──
318
+ const extraGenericForFallback = new Set(['__pycache__', 'node_modules', 'dist', 'build', '.git', 'vendor', 'target']);
319
+ for (let i = parts.length - 2; i >= 0; i--) {
320
+ const dir = parts[i].toLowerCase();
321
+ if (!this.isGenericDir(dir) &&
322
+ !extraGenericForFallback.has(dir) &&
323
+ dir.length > 2 &&
324
+ !dir.startsWith('.') &&
325
+ !dir.startsWith('__')) {
326
+ return parts[i];
327
+ }
328
+ }
329
+ return null;
330
+ }
331
+ /** Check if a directory name is too generic to be a module */
332
+ isGenericDir(name) {
333
+ const generic = new Set([
334
+ 'src', 'lib', 'app', 'main', 'common', 'shared', 'utils', 'helpers',
335
+ 'config', 'configuration', 'middleware', 'middlewares', 'guards', 'pipes',
336
+ 'interceptors', 'filters', 'decorators',
337
+ 'tests', 'test', '__tests__', 'spec', 'specs', 'e2e', 'migrations', 'seeds',
338
+ 'dto', 'dtos', 'entities', 'models', 'schemas', 'interfaces', 'types', 'typings',
339
+ 'controllers', 'services', 'repositories', 'providers', 'factories',
340
+ 'data', 'domain', 'presentation', 'infrastructure', 'application',
341
+ 'core', 'base', 'abstract', 'generics', 'constants', 'enums',
342
+ 'public', 'static', 'assets', 'resources', 'templates', 'views',
343
+ 'internal', 'pkg', 'cmd', 'vendor', 'node_modules',
344
+ 'adapters', 'ports', 'usecases', 'use_cases', 'value_objects',
345
+ 'events', 'exceptions', 'errors', 'signals', 'hooks',
346
+ ]);
347
+ return generic.has(name);
348
+ }
349
+ inferModulePath(filePath, moduleName) {
350
+ const idx = filePath.toLowerCase().indexOf(moduleName.toLowerCase());
351
+ if (idx >= 0) {
352
+ return filePath.substring(0, idx + moduleName.length);
353
+ }
354
+ return filePath.split('/').slice(0, -1).join('/');
355
+ }
356
+ inferFileLayer(filePath) {
357
+ const lower = filePath.toLowerCase();
358
+ if (lower.includes('/route') || lower.includes('/controller') || lower.includes('/endpoint')
359
+ || lower.includes('/api/') || lower.includes('/presentation/') || lower.includes('/handler')
360
+ || lower.includes('/view') && !lower.includes('/review')
361
+ || lower.includes('/urls') || lower.includes('/blueprint')
362
+ || lower.includes('/http/'))
363
+ return 'API';
364
+ if (lower.includes('/service') || lower.includes('/usecase') || lower.includes('/use_case')
365
+ || lower.includes('/use-case') || lower.includes('/application/'))
366
+ return 'Service';
367
+ if (lower.includes('/model') || lower.includes('/entity') || lower.includes('/entities')
368
+ || lower.includes('/schema') || lower.includes('/repository') || lower.includes('/persistence')
369
+ || lower.includes('/migration') || lower.includes('/domain/')
370
+ || lower.includes('/value_object') || lower.includes('/serializer'))
371
+ return 'Data';
372
+ if (lower.includes('/component') || lower.includes('/page') || lower.includes('/screen')
373
+ || lower.includes('/widget') || lower.includes('/template')
374
+ || lower.includes('/partial') || lower.includes('/layout'))
375
+ return 'UI';
376
+ if (lower.includes('/config') || lower.includes('/middleware') || lower.includes('/infra')
377
+ || lower.includes('/infrastructure/') || lower.includes('/storage')
378
+ || lower.includes('/extraction') || lower.includes('/adapter')
379
+ || lower.includes('/worker') || lower.includes('/consumer')
380
+ || lower.includes('/queue') || lower.includes('/cache')
381
+ || lower.includes('/email') || lower.includes('/notification'))
382
+ return 'Infrastructure';
383
+ if (lower.includes('/cli/') || lower.includes('/command') || lower.includes('/script')
384
+ || lower.includes('/management/commands'))
385
+ return 'CLI';
386
+ return 'Other';
387
+ }
388
+ // ═══════════════════════════════════════════════════════════════════════
389
+ // ENDPOINT EXTRACTION — Multi-framework
390
+ // ═══════════════════════════════════════════════════════════════════════
391
+ extractEndpoints(report, modules) {
392
+ const endpoints = [];
393
+ const nodes = report.dependencyGraph.nodes;
394
+ for (const filePath of nodes) {
395
+ const lower = filePath.toLowerCase();
396
+ if (!this.isControllerOrRouteFile(lower))
397
+ continue;
398
+ const resourceName = this.extractResourceFromFile(filePath);
399
+ if (!resourceName || resourceName === 'init' || resourceName === 'index')
400
+ continue;
401
+ const isAuthRoute = lower.includes('auth');
402
+ const isHealthRoute = lower.includes('health') || lower.includes('status');
403
+ const isSearchRoute = lower.includes('search') || lower.includes('query');
404
+ const isMetricsRoute = lower.includes('metric') || lower.includes('monitor');
405
+ if (isHealthRoute) {
406
+ endpoints.push({
407
+ method: 'GET', path: `/health`, file: filePath,
408
+ handler: 'health_check', hasAuth: false, hasValidation: false,
409
+ });
410
+ continue;
411
+ }
412
+ if (isMetricsRoute) {
413
+ endpoints.push({
414
+ method: 'GET', path: `/metrics`, file: filePath,
415
+ handler: 'get_metrics', hasAuth: this.fileReferencesAuth(filePath, report), hasValidation: false,
416
+ });
417
+ continue;
418
+ }
419
+ if (isAuthRoute) {
420
+ endpoints.push({ method: 'POST', path: `/auth/login`, file: filePath, handler: 'login', hasAuth: false, hasValidation: true }, { method: 'POST', path: `/auth/register`, file: filePath, handler: 'register', hasAuth: false, hasValidation: true }, { method: 'POST', path: `/auth/refresh`, file: filePath, handler: 'refresh_token', hasAuth: true, hasValidation: false });
421
+ continue;
422
+ }
423
+ if (isSearchRoute) {
424
+ endpoints.push({
425
+ method: 'GET', path: `/${resourceName}/search`, file: filePath,
426
+ handler: `search_${resourceName}`, hasAuth: this.fileReferencesAuth(filePath, report), hasValidation: true,
427
+ });
428
+ endpoints.push({
429
+ method: 'POST', path: `/${resourceName}/search`, file: filePath,
430
+ handler: `advanced_search_${resourceName}`, hasAuth: this.fileReferencesAuth(filePath, report), hasValidation: true,
431
+ });
432
+ continue;
433
+ }
434
+ // Standard CRUD
435
+ const hasAuth = this.fileReferencesAuth(filePath, report);
436
+ const hasValidation = this.fileReferencesValidation(filePath, report);
437
+ const crud = [
438
+ { method: 'GET', path: `/${resourceName}`, handler: `list_${resourceName}` },
439
+ { method: 'GET', path: `/${resourceName}/{id}`, handler: `get_${resourceName}` },
440
+ { method: 'POST', path: `/${resourceName}`, handler: `create_${resourceName}` },
441
+ { method: 'PUT', path: `/${resourceName}/{id}`, handler: `update_${resourceName}` },
442
+ { method: 'DELETE', path: `/${resourceName}/{id}`, handler: `delete_${resourceName}` },
443
+ ];
444
+ for (const c of crud) {
445
+ endpoints.push({ method: c.method, path: c.path, file: filePath, handler: c.handler, hasAuth, hasValidation });
446
+ }
447
+ }
448
+ return endpoints;
449
+ }
450
+ extractResourceFromFile(filePath) {
451
+ const parts = filePath.split('/');
452
+ const fileName = parts[parts.length - 1]
453
+ .replace(/\.[^.]+$/, '')
454
+ .replace(/(Controller|Router|Route|View|Handler|Endpoint|Resource|Blueprint)$/i, '')
455
+ .replace(/[-_]/g, '')
456
+ .toLowerCase();
457
+ if (fileName && fileName !== '__init__' && fileName !== 'index' && fileName !== 'base' && fileName.length > 1) {
458
+ return fileName;
459
+ }
460
+ const parent = parts[parts.length - 2];
461
+ if (parent && parent.toLowerCase() !== 'routes' && parent.toLowerCase() !== 'controllers') {
462
+ return parent.toLowerCase().replace(/[-_]/g, '');
463
+ }
464
+ return '';
465
+ }
466
+ // ═══════════════════════════════════════════════════════════════════════
467
+ // TEST & COUPLING ANALYSIS
468
+ // ═══════════════════════════════════════════════════════════════════════
469
+ findUntestedModules(modules) {
470
+ return modules
471
+ .filter(m => !m.hasTests && m.fileCount > 1)
472
+ .map(m => m.name);
473
+ }
474
+ findCriticalPaths(report) {
475
+ const coupling = new Map();
476
+ for (const edge of report.dependencyGraph.edges) {
477
+ coupling.set(edge.from, (coupling.get(edge.from) || 0) + edge.weight);
478
+ coupling.set(edge.to, (coupling.get(edge.to) || 0) + edge.weight);
479
+ }
480
+ return [...coupling.entries()]
481
+ .sort((a, b) => b[1] - a[1])
482
+ .slice(0, 10)
483
+ .map(([file]) => file);
484
+ }
485
+ classifyProjectDepth(report) {
486
+ const files = report.projectInfo.totalFiles;
487
+ const lines = report.projectInfo.totalLines;
488
+ if (files > 500 || lines > 100000)
489
+ return 'enterprise';
490
+ if (files > 200 || lines > 50000)
491
+ return 'large';
492
+ if (files > 50 || lines > 10000)
493
+ return 'medium';
494
+ return 'small';
495
+ }
496
+ // ═══════════════════════════════════════════════════════════════════════
497
+ // FILE CLASSIFICATION HELPERS — Multi-stack
498
+ // ═══════════════════════════════════════════════════════════════════════
499
+ isTestFile(lower) {
500
+ return lower.includes('/test') || lower.includes('/spec') || lower.includes('__tests__')
501
+ || lower.includes('.test.') || lower.includes('.spec.')
502
+ || lower.includes('_test.py') || lower.includes('_test.go')
503
+ || lower.includes('test_') && lower.endsWith('.py')
504
+ || lower.includes('/tests/');
505
+ }
506
+ isEntityFile(lower) {
507
+ return lower.includes('/model') || lower.includes('/entity') || lower.includes('/entities')
508
+ || lower.includes('/schema') || lower.includes('/value_object')
509
+ || lower.includes('.model.') || lower.includes('.entity.')
510
+ || lower.endsWith('models.py')
511
+ || lower.includes('/domain/') && (lower.endsWith('.java') || lower.endsWith('.kt')) && !lower.includes('service') && !lower.includes('repository')
512
+ || lower.includes('/models/') && lower.endsWith('.php');
513
+ }
514
+ isControllerOrRouteFile(lower) {
515
+ if (lower.includes('.controller.'))
516
+ return true;
517
+ if (lower.includes('.router.'))
518
+ return true;
519
+ if (lower.includes('/routes/') && !lower.includes('__init__'))
520
+ return true;
521
+ if (lower.includes('/route/') && !lower.includes('__init__'))
522
+ return true;
523
+ if (lower.endsWith('views.py') || lower.endsWith('_view.py'))
524
+ return true;
525
+ if (lower.endsWith('urls.py'))
526
+ return true;
527
+ if (lower.includes('blueprint'))
528
+ return true;
529
+ if ((lower.endsWith('.java') || lower.endsWith('.kt')) && lower.includes('controller'))
530
+ return true;
531
+ if (lower.includes('/controllers/') && lower.endsWith('.php'))
532
+ return true;
533
+ if (lower.endsWith('.go') && (lower.includes('handler') || lower.includes('router')))
534
+ return true;
535
+ if (lower.includes('/controllers/') && lower.endsWith('.rb'))
536
+ return true;
537
+ if (lower.includes('/endpoint') || lower.includes('/handler'))
538
+ return true;
539
+ return false;
540
+ }
541
+ isServiceFile(lower) {
542
+ return lower.includes('service') || lower.includes('usecase') || lower.includes('use_case')
543
+ || lower.includes('use-case') || lower.includes('interactor')
544
+ || lower.includes('/application/') && !lower.includes('interface') && !lower.includes('__init__');
545
+ }
546
+ extractEntityName(filePath) {
547
+ const parts = filePath.split('/');
548
+ const fileName = parts[parts.length - 1];
549
+ const name = fileName
550
+ .replace(/\.[^.]+$/, '')
551
+ .replace(/\.(model|entity|schema|dto)$/i, '')
552
+ .replace(/(Model|Entity|Schema|Dto)$/i, '')
553
+ .replace(/[-_]/g, ' ')
554
+ .replace(/\b\w/g, l => l.toUpperCase())
555
+ .trim();
556
+ const skip = new Set(['Index', 'Base', 'Init', '__Init__', 'Abstract', 'Models', 'Entities', 'Schemas']);
557
+ if (name && !skip.has(name)) {
558
+ return name;
559
+ }
560
+ return null;
561
+ }
562
+ fileReferencesAuth(filePath, report) {
563
+ const edges = report.dependencyGraph.edges.filter(e => e.from === filePath);
564
+ return edges.some(e => {
565
+ const to = e.to.toLowerCase();
566
+ return to.includes('auth') || to.includes('guard') || to.includes('permission')
567
+ || to.includes('jwt') || to.includes('token') || to.includes('security')
568
+ || to.includes('dependencies/auth') || to.includes('middleware/auth');
569
+ });
570
+ }
571
+ fileReferencesValidation(filePath, report) {
572
+ const edges = report.dependencyGraph.edges.filter(e => e.from === filePath);
573
+ return edges.some(e => {
574
+ const to = e.to.toLowerCase();
575
+ return to.includes('dto') || to.includes('schema') || to.includes('validator')
576
+ || to.includes('pipe') || to.includes('serializer') || to.includes('form')
577
+ || to.includes('pydantic') || to.includes('marshmallow');
578
+ });
579
+ }
580
+ }
581
+ //# sourceMappingURL=context-enricher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-enricher.js","sourceRoot":"","sources":["../../src/agent-generator/context-enricher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAML,oBAAoB,GACrB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D;;;;;;;;;GASG;AACH,MAAM,OAAO,eAAe;IAA5B;QACU,mBAAc,GAAG,IAAI,cAAc,EAAE,CAAC;QACtC,sBAAiB,GAAG,IAAI,iBAAiB,EAAE,CAAC;IAwmBtD,CAAC;IAtmBC;;OAEG;IACH,MAAM,CACJ,MAAsB,EACtB,IAAqB,EACrB,KAAgB,EAChB,WAAmB,EACnB,SAA+B,oBAAoB;QAEnD,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QACzD,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACzD,MA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