| 464 | } |
| 465 | |
| 466 | private isCompositionRootFile(filePath: string): boolean { |
| 467 | const normalized = filePath.toLowerCase().replace(/\\/g, '/'); |
| 468 | const base = path.basename(normalized); |
| 469 | |
| 470 | if (/^(main|index|bootstrap|startup)\./.test(base)) return true; |
| 471 | |
| 472 | return ( |
| 473 | normalized.includes('/routes') || |
| 474 | normalized.includes('/routing') || |
| 475 | normalized.includes('/router') || |
| 476 | normalized.includes('/config') || |
| 477 | normalized.includes('/providers') |
| 478 | ); |
| 479 | } |
| 480 | |
| 481 | private queryPathTokenOverlap(filePath: string, query: string): number { |
| 482 | const queryTerms = new Set(this.normalizeQueryTerms(query)); |