The author recounts a messy experiment where their AI struggled with code analysis due to being trained like a fresh bootcamp grad, not a senior developer. They then implemented a context-aware grouping system that led to surprising results, with the AI displaying senior dev level awareness in its analysis – catching connections they hadn’t explicitly taught it. The focus shifted to mirroring how senior devs think, emphasizing context first, pattern matching, impact analysis, and historical understanding. The experiment also uncovered unexpected side effects such as spotting copy-pasted code and suggesting architectural improvements. The author concludes that the key to AI in code analysis is better code understanding, not just generating code. They raise open questions and propose teaching AI other senior dev instincts for future development.
https://nmn.gl/blog/ai-senior-developer