Why this matters
Legacy industrial software forms the backbone of many critical infrastructures, including factories, energy grids, and transportation networks. For businesses in healthcare, professional services, and technology sectors, similar challenges exist when dealing with deeply entrenched systems that have evolved over decades. These codebases often span millions of lines and contain complex dependencies that are poorly documented or scattered across multiple repositories and formats.
Standard AI tools and coding assistants generally cannot grasp these sprawling, layered environments fully. Without tailored solutions, refactoring or modernizing such systems is expensive, time-consuming, and error-prone. This impedes innovation and raises operational risks, especially when regulatory and compliance demands require traceability and quality assurance over extended lifecycles.
Siemens’ approach highlights why traditional techniques fall short and why a domain-specific, graph-based intelligence combined with a modular agent workflow is essential. For SMBs and growing tech teams, this strategy underscores the importance of tooling that respects the inherent structure and relationships within code and documentation rather than flattening them into unstructured data.
What usually goes wrong
Common attempts to modernize legacy software often start with incomplete or inadequate analysis of the codebase. Teams rely on keyword searches, isolated document reviews, or disconnected ticket systems that fail to reveal the true dependencies across modules, requirements, and business processes. This leads to superficial changes that cause regressions or operational failures.
Another frequent pitfall is the attempt to apply generic AI coding assistants without embedding the business context or historical knowledge accumulated in the system. Such models struggle to navigate sprawling repositories that far exceed their context windows, and they lack the ability to trace changes back to regulatory or compliance standards.
Moreover, manual refactoring efforts consume senior engineers’ valuable time, distracting them from higher-value tasks. Without a systematic method to identify the impact of changes, teams face unpredictable side effects, increased testing cycles, and prolonged delivery timelines. The lack of explainability and traceability in AI-generated code changes further complicates approvals in regulated environments.
Finally, the organizational challenge of juggling multiple documentation formats — including legacy PDFs, ticketing systems, and code comments — fragments knowledge. This fragmentation stifles visibility and collaboration, leaving developers isolated from crucial decision-making context.
A better Cloudain-style approach
Siemens’ Knowledge Fabric exemplifies a practical architecture for addressing these challenges. At its core, it models the entire software ecosystem as a knowledge graph, preserving relationships between code modules, documentation, requirements, and historic tickets. This is critical because code is not just text; it is a structured entity with inherent hierarchies and linkages.
Using a graph database built on Spanner Graph, the system enables querying through Graph Query Language (GQL), allowing agents to traverse and reason about dependencies precisely. This structured approach is complemented by semantic searches using vector embeddings and full-text capabilities, enabling rich, contextual exploration beyond keyword matching.
The innovation extends to the use of specialized AI agents handling distinct workflow segments — a pattern Siemens calls “slicing the elephant.” Instead of one monolithic AI trying to refactor a module in one go, the task is broken into smaller, well-defined stages:
- A search agent maps dependencies and extracts relevant knowledge from the graph.
- A user story agent gathers detailed requirements linked to existing system contexts.
- An architecture impact agent predicts potential side effects of proposed changes.
- A task breakdown agent divides work into manageable, context-rich tasks.
- Finally, a coding agent implements the changes with full awareness of the prior analysis.
This approach keeps a human engineer in the loop at each stage, ensuring accountability and adherence to quality standards. It also allows the AI to operate within manageable context windows and reduces risks associated with hallucinated or unvalidated code changes.
Applying this design pattern to SMBs can mean introducing graph-based tooling tailored to their specific domain and compliance needs, and establishing modular AI workflows that align with internal processes. It emphasizes a clear separation of concerns and incremental, explainable automation rather than a black-box refactoring attempt.
A simple next step
Organizations facing legacy modernization challenges should begin by mapping their critical software artifacts into a unified, queryable structure. This can start with a lightweight knowledge graph capturing key entities such as code modules, documentation, tickets, and compliance requirements. Open-source graph databases and existing cloud-native graph services can support this initial step without heavy upfront investment.
Next, teams can pilot agent-based workflows for small, well-defined tasks like impact analysis or user story generation, leveraging existing AI APIs with custom connectors to the graph. This “slice the elephant” mindset helps maintain control and visibility while exploring automation benefits.
It is also valuable to establish collaboration practices that keep engineering, product, and compliance teams closely aligned throughout the modernization process. Transparent handoffs between agents and humans ensure that each incremental change is justified, tested, and traceable.
Lastly, investing in continuous integration pipelines that incorporate automated dependency checks and context-aware testing can help catch unintended side effects early. Over time, this foundational work will reduce the cognitive load on engineering teams and improve delivery predictability.
How Cloudain can help
Cloudain specializes in helping SMBs architect practical, maintainable solutions for complex cloud and legacy software challenges. By applying proven patterns like knowledge graph modeling and agentic workflows, Cloudain can assist teams in designing phased modernization strategies that respect existing domain constraints and compliance needs.
Whether it’s integrating graph databases with your cloud environment, establishing AI workflows that augment developer productivity, or creating governance frameworks for explainable automation, Cloudain’s advisory approach centers on realistic, business-driven outcomes. This ensures that modernization efforts free engineers from repetitive tasks and empower them to focus on innovation, much like Siemens’ experience with industrial software.
For companies looking to address legacy code complexity without disrupting operations or compromising traceability, Cloudain offers tailored guidance and hands-on support to navigate this journey efficiently.
Focus Areas

Cloudain
Expert insights on AI, Cloud, and Compliance solutions. Helping organisations transform their technology infrastructure with innovative strategies.
