AI-Assisted Modernization of Legacy Mainframe Code
Purpose
This system uses AI to analyze the Canada Revenue Agency's legacy COBOL mainframe code, automatically identifying key components, generating documentation, and extracting business logic. It is used internally by CRA employees to help plan and carry out the modernization of aging government software. The system is currently a proof of concept and does not affect citizen-facing services or decisions.
What the system collects and what happens to the data
Data taken in
Operational data
Anonymous data
- Legacy COBOL mainframe source code and application artifacts from the CRA's existing mainframe systems. This is software code, not personal data about individuals.
Processing
Classification & Prediction
- Uses supervised and unsupervised machine learning to automatically identify and classify key components in legacy COBOL code, extract business logic, and predict structure and relationships within the codebase.
Language Models
- Language model capabilities within AWS Transform – Mainframe are used to generate human-readable documentation and extract natural-language descriptions of business logic from COBOL code.
What the system does
Deciding (Analytical AI)
Advisory
- The AI analyzes legacy COBOL code to classify and label key components, predict business rules, and rank areas of complexity. Human software architects and developers review the outputs and decide on modernization strategy.
Creating (Generative AI)
Advisory
- The AI generates documentation from the analyzed COBOL code, producing written descriptions of program logic and component relationships that did not previously exist as structured documents. CRA staff review all generated documentation before use.
Outputs
Operational data
Anonymous data
- Structured maps and inventories of COBOL application components, identified business rules, and dependency charts describing the existing mainframe architecture. These outputs are administrative artefacts for internal use only.
Generated content
Anonymous data
- AI-generated documentation describing the logic, structure, and purpose of legacy COBOL programs. This content is reviewed by CRA technical staff before being used in modernization planning.
Run by
Canada Revenue Agency (CRA)
- The Canada Revenue Agency (CRA) is the federal government department responsible for tax administration and benefit delivery. CRA is deploying this proof-of-concept AI system to support internal software modernization efforts.
Built by
Amazon Web Services (AWS)
- Amazon Web Services provides the AWS Transform – Mainframe AI service used in this proof of concept. AWS supplies the underlying AI models and cloud infrastructure that analyze the COBOL codebase.
Kept for
Not stated by Helpful Places.
Shared with
Available to the accountable organization
- Outputs (code maps, documentation, extracted business logic) are available to CRA employees involved in the modernization project. This is an internal government tool with no public-facing output.
Available to vendor
- CRA mainframe code is processed through the AWS Transform – Mainframe service. As a cloud service, source code and derived outputs may be accessible to AWS for service delivery purposes. The extent of vendor data access is not fully specified in the register entry.
Stored
Stored on 3rd Party Cloud
- The system operates on AWS cloud infrastructure. CRA mainframe code and AI outputs are processed and potentially stored on Amazon Web Services infrastructure. Specific data residency and retention terms are not detailed in the register entry.
- Duration: Not specified
What you can do
Ask about this system
Questions should be addressed to Helpful Places.
Your rights
- Right to Algorithmic TransparencyThis system processes internal government software code and is used only by CRA employees. Citizens are not directly subject to its outputs. Information about this system is publicly disclosed via the Government of Canada AI Register. The underlying AWS Transform – Mainframe service documentation is publicly available from Amazon Web Services.
Risks and safeguards
- Reputational harmThe AI may incorrectly classify or document business logic from legacy code, potentially leading to misunderstandings of critical tax administration rules if outputs are acted on without review.Safeguard: The system is a proof of concept with outputs reviewed by CRA technical staff before informing any modernization decisions. No automated decisions about citizens are produced.
- Civil liberties harmCRA mainframe code may encode sensitive tax administration business logic; if cloud-processed, there is a potential risk of unauthorized exposure of government system internals to a third-party vendor.Safeguard: The proof-of-concept scope is limited; the register entry does not detail what data-protection agreements govern the AWS processing relationship. Public disclosure through the AI Register supports accountability.
How to read the colors
Data use
- Anonymous data
- Data that can’t be tied to a person. Either the data was never about people (water samples, traffic counts, documents), or identifiers were stripped, blurred, aggregated or noised so this system can’t reasonably tie a record back to an individual.
- Pseudonymous data
- Each person’s data is tied to a token (hash, ID, template) that lets this system recognise the same person across events, but the token itself doesn’t reveal a name. Reidentification is possible with extra information.
- Identifiable data
- The data either contains a direct identifier (name, address, account name, recognisable face or voice, plate number) or carries a token this system uses to look up legal identity during processing.
Autonomy level
- Advisory
- The system produces a result, but a person is always in the loop: they make any decision and carry that decision out.
- Semi-autonomous
- The system works out the decision and a person carries that decision out, such as a crew following a route the system recommends.
- Autonomous
- The system decides and acts on its own, such as screening job applications, with no person in between.
- AI registerCanada AI and Algorithmic Systems Register — AI AWS Transform - Mainframe Proof of Concept (2526-CRA-ARC-009)Government of Canada Algorithmic Impact Assessment / AI Register, Canada Revenue Agency, entry 2526-CRA-ARC-009.
- AI registerCanada AI Register — 2526-CRA-ARC-009
- AI registerCanada AI Register — 2526-CRA-ARC-009
- Register entryPublished by Helpful Places. Reference 1c9c3780. This disclosure was drafted with AI assistance.Schema: ai@2026-05-06-beta