This page provides architectural guidance and forward-engineering methodologies
for refactoring monolithic legacy mainframe applications into modular
cloud-native microservices on Google Cloud.

If you are a cloud architect, application developer, or engineering lead, use
the information on this page to transform procedural mainframe code, such as
COBOL or PL/I, into modern codebases, such as Java or Go,
generate microservices by using generative AI, and deploy to
Google Kubernetes Engine (GKE) or Cloud Run.

Before you read this page, you should have completed an initial mainframe
codebase assessment and extracted your application's core business rules.

## Refactoring lifecycle

Refactoring uses AI-assisted forward engineering to convert extracted
business logic into maintainable microservices through the following phases:

1. **Extract business logic** : use the [Mainframe Assessment Tool](https://docs.cloud.google.com/mainframe-assessment-tool/docs) to extract validated business rules and control flows from the original source code.
2. **Generate requirements** : transform assessment outputs into structured product requirements documents (PRDs) by using the [Antigravity CLI](https://antigravity.google/product/antigravity-cli). Export [dependency graphs and assessment
   results](https://docs.cloud.google.com/mainframe-assessment-tool/docs/export-results) into the Antigravity CLI to generate equivalent target language microservice contracts.
3. **Refactor target databases** : re-architect VSAM flat files or DB2 schemas into modern relational and distributed data models on [Spanner](https://docs.cloud.google.com/spanner/docs) or [AlloyDB for PostgreSQL](https://docs.cloud.google.com/alloydb/docs).

## What's next

- [Automated mainframe code conversion](https://docs.cloud.google.com/docs/migration/scenarios/automated-conversion)
- [Mainframe workload lift and shift](https://docs.cloud.google.com/docs/migration/scenarios/mainframe-lift-shift)
- [Mainframe Assessment Tool documentation](https://docs.cloud.google.com/mainframe-assessment-tool/docs)
- [Dual Run documentation](https://docs.cloud.google.com/mainframe-dual-run/docs)
- [Mainframe Connector documentation](https://docs.cloud.google.com/mainframe-connector/docs)