The “Heterogeneous Divide” in AI Programming: From Productivity Tool to Debt Amplifier
In recent years, AI programming tools based on Large Language Models (LLMs) have shown immense potential for boosting development productivity. However, in the complex IT environments of large enterprises, their practical application often falls into a trap where using them feels more like ‘paying off debt.’ Industry analysis indicates the root cause is not the AI models themselves, but the ‘heterogeneous systems’ accumulated by companies over time. These systems typically employ a mix of technology stacks, such as Java monoliths, Go-based gateways, Node.js BFF (Backend for Frontend) layers, and Python scripting platforms, accompanied by a multitude of in-house frameworks and Domain-Specific Languages (DSLs).
This heterogeneity makes it difficult for AI models to effectively understand and generate code that complies with internal standards. One industry analogy compares this to ‘waste sorting’: traditional development is like a ‘landfill,’ which can support business in the short term but continuously accumulates problems. In contrast, AI programming is like ‘waste-to-energy incineration,’ which is more efficient but requires the input (i.e., the codebase) to be ‘sorted’ and standardized. Directly applying AI to ‘unsorted’ heterogeneous systems often leads to low-quality output and high validation costs, ultimately exacerbating rather than alleviating technical debt.
The Double-Edged Sword of Proprietary Tech Stacks
Historically, proprietary tech stacks were a core competitive advantage and a ‘moat’ for many large enterprises, offering better business alignment and control. However, in the age of AI, this advantage is turning into a liability. The powerful coding capabilities of AI models like the GPT series stem from their training on vast amounts of public code (such as open-source projects on GitHub). Consequently, they excel with standardized, well-documented open-source tech stacks like Spring, React, and Kubernetes, but are helpless when faced with a company’s internal, non-standard, and proprietary frameworks that rely heavily on tacit knowledge.
There are three main reasons why proprietary tech stacks become a ‘stumbling block’ for AI programming:
- Lack of Training Data: The models lack sufficient high-quality examples to learn the logic and patterns of internal frameworks.
- High Context Barrier: A large amount of ‘convention over configuration’ rules, architectural constraints, and business context is not explicitly documented, preventing the AI from performing effective reasoning.
- Poor Verifiability: Many legacy systems lack a comprehensive automated testing suite, making it difficult to quickly validate and create a feedback loop for AI-generated code, which introduces new risks.
Choosing a Path: A Decision Framework for Rewriting vs. Refactoring
Faced with the conflict between AI and heterogeneous systems, enterprises have two main paths: use AI to assist in rewriting legacy systems, or refactor existing systems to make them ‘AI-friendly.’
The decision to rewrite requires careful evaluation; it is not a silver bullet. Systems suitable for an AI-assisted rewrite typically exhibit the following characteristics: clear boundaries, independently replaceable functions, an existing (or easily implementable) automated verification system, and long-term maintenance costs that are significantly higher than the one-time migration cost. Conversely, if a system contains a large number of unspoken, tacit business rules, is tightly coupled with other legacy systems, or lies on a mission-critical business path with zero tolerance for errors, then forcing a rewrite is extremely risky.

A core principle is: a system’s ‘verifiability’ is a prerequisite for its ‘generatability.’ If the correctness of the code cannot be quickly verified through automated means, AI’s high-speed generation capability becomes a risk amplifier instead.
The Engineering Ecosystem of the Future: Building “AI-Friendly” Systems
A more practical strategy is to drive an upgrade in the organization’s engineering capabilities, gradually refactoring existing systems to be ‘AI-friendly.’ This does not require a complete overhaul but rather a systematic governance approach. Key initiatives include:
- Bolstering Engineering Infrastructure: Enhance automated testing, Continuous Integration (CI), and observability systems to provide a rapid feedback loop for AI-generated code.
- Explicit and Standardized Knowledge: Solidify tacit architectural constraints, coding standards, and business logic through documentation, static analysis rules (Linters), and Policy-as-Code.
- Assetizing Prompt Engineering: Templatize and version-control prompts for specific tasks, building reusable and manageable libraries of examples and standards, transforming it from a manual craft into an engineering asset.
Ultimately, when making technology choices, enterprises should add ‘AI compatibility’ as a key consideration alongside traditional metrics like performance and cost. Instead of creating expensive ‘instruction manuals’ (prompts) for each heterogeneous system, it is better to invest in building a more standardized engineering ecosystem that AI can understand and contribute to at scale.