MCPcopy Create free account
hub / github.com/PatrickSys/codebase-context / trackGoldenFile

Method trackGoldenFile

src/utils/usage-tracker.ts:313–324  ·  view source on GitHub ↗

* Track a file as a potential "Golden File" - a file that demonstrates multiple modern patterns

(file: string, score: number, patterns: Record<string, boolean>)

Source from the content-addressed store, hash-verified

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

Callers 1

indexMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected