* Track a file as a potential "Golden File" - a file that demonstrates multiple modern patterns
(file: string, score: number, patterns: Record<string, boolean>)
| 311 | * Track a file as a potential "Golden File" - a file that demonstrates multiple modern patterns |
| 312 | */ |
| 313 | trackGoldenFile(file: string, score: number, patterns: Record<string, boolean>): void { |
| 314 | // Check if already tracked |
| 315 | const existing = this.goldenFiles.find((gf) => gf.file === file); |
| 316 | if (existing) { |
| 317 | if (score > existing.score) { |
| 318 | existing.score = score; |
| 319 | existing.patterns = patterns; |
| 320 | } |
| 321 | } else { |
| 322 | this.goldenFiles.push({ file, score, patterns }); |
| 323 | } |
| 324 | } |
| 325 | |
| 326 | /** |
| 327 | * Get top N Golden Files - files that best demonstrate all modern patterns together |