---
title: "Comment by Shlomo Friman on \"Code Generation and Review with AI in Complex Repositories\" | Hashnode"
description: "One thing I'd add from the enterprise side, where codebases tend to be measured in decades rather than years: the golden files principle runs into a wall when t"
url: "https://hashnode.com/posts/code-generation-and-review-with-ai-in-complex-repositories/6a0207c3fca21b0d4b49990a/comment/6a045e385418a55a522d156d"
---

[Discussion](https://hashnode.com/posts/code-generation-and-review-with-ai-in-complex-repositories/6a0207c3fca21b0d4b49990a)

Comment [Code Generation and Review with AI in Complex Repositories](https://hashnode.com/posts/code-generation-and-review-with-ai-in-complex-repositories/6a0207c3fca21b0d4b49990a)

[Shlomo Friman](https://hashnode.com/@shlomofr)

[May 13](https://hashnode.com/posts/code-generation-and-review-with-ai-in-complex-repositories/6a0207c3fca21b0d4b49990a/comment/6a045e385418a55a522d156d)

One thing I'd add from the enterprise side, where codebases tend to be measured in decades rather than years: the golden files principle runs into a wall when the "approved pattern" in the codebase is itself a workaround for something nobody documented. I've seen teams point AI to golden files that were golden by convention, not by design — the file was just the one nobody broke. The AI learns the workaround as the standard, and the instructions quietly encode technical debt as policy.

[vladkrv](https://hashnode.com/@vladkrv)

[May 13](https://hashnode.com/posts/code-generation-and-review-with-ai-in-complex-repositories/6a0207c3fca21b0d4b49990a/comment/6a045e385418a55a522d156d#reply-6a0467f0a0c15402772bcea4)

That's a great point! Though I wouldn't necessarily consider it a wall of the principle itself, but rather a symptom of a project where too much tech debt has accumulated. I completely agree that teams have to be very careful when defining what a 'golden file' actually is for their project. What would be your definition of a golden file in such a decade-old enterprise project, Shlomo?
