Skip to content

Commit 88e42d9

Browse files
authored
Merge pull request #8859 from leonard520/java-rearchitecutre
add re-architecture support
2 parents f3673c0 + 5161157 commit 88e42d9

4 files changed

Lines changed: 128 additions & 6 deletions

File tree

articles/github-copilot-app-modernization/index.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ landingContent:
2727
- text: Java FAQ
2828
url: ../java/migration/migrate-github-copilot-app-modernization-for-java-faq.yml?toc=/azure/developer/github-copilot-app-modernization/toc.json&bc=/azure/developer/github-copilot-app-modernization/breadcrumb/toc.json
2929
- text: .NET overview
30-
url: /dotnet/core/porting/github-copilot-app-modernization-overview?toc=/azure/developer/github-copilot-app-modernization/toc.json&bc=/azure/developer/github-copilot-app-modernization/breadcrumb/toc.json
30+
url: /dotnet/core/porting/github-copilot-app-modernization/overview?toc=/azure/developer/github-copilot-app-modernization/toc.json&bc=/azure/developer/github-copilot-app-modernization/breadcrumb/toc.json
3131
- text: .NET FAQ
32-
url: /dotnet/core/porting/github-copilot-app-modernization-faq?toc=/azure/developer/github-copilot-app-modernization/toc.json&bc=/azure/developer/github-copilot-app-modernization/breadcrumb/toc.json
32+
url: /dotnet/core/porting/github-copilot-app-modernization/faq?toc=/azure/developer/github-copilot-app-modernization/toc.json&bc=/azure/developer/github-copilot-app-modernization/breadcrumb/toc.json
3333
- title: "CLI: Modernization agent"
3434
linkLists:
3535
- linkListType: overview
@@ -49,7 +49,7 @@ landingContent:
4949
- text: Batch assessment
5050
url: modernization-agent/batch-assess.md
5151
- text: Batch upgrade
52-
url: modernization-agent/batch-upgrade.md
52+
url: modernization-agent/batch-upgrade.md
5353
- text: Customization
5454
url: modernization-agent/customization.md
5555
- text: CI/CD integration

articles/github-copilot-app-modernization/toc.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ items:
2323
- name: Batch assessment
2424
href: modernization-agent/batch-assess.md
2525
- name: Batch upgrade
26-
href: modernization-agent/batch-upgrade.md
26+
href: modernization-agent/batch-upgrade.md
2727
- name: Customization
2828
href: modernization-agent/customization.md
2929
- name: CI/CD integration
@@ -79,7 +79,9 @@ items:
7979
- name: Migrate from Oracle to PostgreSQL
8080
href: ../java/migration/migrate-github-copilot-app-modernization-for-java-oracle-to-postgresql.md?toc=/azure/developer/github-copilot-app-modernization/toc.json&bc=/azure/developer/github-copilot-app-modernization/breadcrumb/toc.json
8181
- name: Migration via custom agent
82-
href: ../java/migration/migrate-github-copilot-app-modernization-for-java-custom-agent.md?toc=/azure/developer/github-copilot-app-modernization/toc.json&bc=/azure/developer/github-copilot-app-modernization/breadcrumb/toc.json
82+
href: ../java/migration/migrate-github-copilot-app-modernization-for-java-custom-agent.md?toc=/azure/developer/github-copilot-app-modernization/toc.json&bc=/azure/developer/github-copilot-app-modernization/breadcrumb/toc.json
83+
- name: Re-architect (preview)
84+
href: ../java/migration/github-copilot-app-modernization-for-java-rearchitecture.md?toc=/azure/developer/github-copilot-app-modernization/toc.json&bc=/azure/developer/github-copilot-app-modernization/breadcrumb/toc.json
8385
- name: Infrastructure and deployment
8486
expanded: true
8587
items:
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
---
2+
title: Re-architect Projects by Using GitHub Copilot Modernization
3+
titleSuffix: Azure
4+
description: Learn how to use the re-architecture feature in GitHub Copilot modernization to rewrite projects from legacy frameworks to modern architectures.
5+
author: KarlErickson
6+
ms.author: karler
7+
ms.reviewer: xiading
8+
ms.topic: overview
9+
ms.date: 04/17/2026
10+
ms.custom: devx-track-java
11+
ms.subservice: migration-copilot
12+
ms.collection: ce-skilling-ai-copilot
13+
ai-usage: ai-generated
14+
---
15+
16+
# Re-architect projects by using GitHub Copilot modernization
17+
18+
This article describes how to use the re-architecture feature in GitHub Copilot modernization to rewrite projects from legacy frameworks to modern architectures, such as from Struts to Spring MVC.
19+
20+
> [!IMPORTANT]
21+
> The re-architecture feature is currently in preview. Preview features might have limited capabilities and aren't recommended for production use.
22+
23+
## Overview
24+
25+
The re-architecture feature enables you to transform an entire project from a legacy framework to a modern architecture by using an AI-powered multi-agent workflow. Instead of manual, file-by-file migration, you can describe the desired transformation in natural language, and the modernization agents handle analysis, planning, and code generation.
26+
27+
Common re-architecture scenarios include:
28+
29+
- Struts to Spring MVC
30+
- JSP to Thymeleaf
31+
- EJB to Spring Boot
32+
- Legacy servlet-based applications to modern Spring-based architectures
33+
34+
## Prerequisites
35+
36+
- Visual Studio Code with the [GitHub Copilot modernization](https://marketplace.visualstudio.com/items?itemName=vscjava.migrate-java-to-azure) extension installed.
37+
- A GitHub Copilot subscription. For more information, see [Copilot plans](https://github.com/features/copilot/plans?ref_product=copilot).
38+
- (Optional) [Python](https://www.python.org/downloads/) 3.7 or later for building a knowledge graph, which gives the agent a clearer understanding of your project structure during the rewriting process. If Python isn't available, the knowledge graph step is skipped.
39+
- (Optional) [Node.js](https://nodejs.org/) 18 or later for running Playwright tests as part of runtime validation. If Node.js isn't available, the Playwright test step is skipped.
40+
- (Optional) [Docker Desktop](https://www.docker.com/products/docker-desktop/) for runtime validation. If Docker isn't available, the runtime validation step is skipped.
41+
42+
## Enable the re-architecture feature
43+
44+
The re-architecture feature is in preview, so you need to activate it manually in Visual Studio Code.
45+
46+
Use the following steps to enable the feature:
47+
48+
1. In Visual Studio Code, open the **Settings** editor by selecting **File** > **Preferences** > **Settings** (or **Code** > **Preferences** > **Settings** on macOS).
49+
50+
1. Search for `appmod.experimental.task.rearchitecture`.
51+
52+
1. Select the checkbox to enable the re-architecture feature.
53+
54+
Alternatively, add the following entry to your `settings.json` file:
55+
56+
```json
57+
{
58+
"appmod.experimental.task.rearchitecture": true
59+
}
60+
```
61+
62+
## Use the re-architecture agent
63+
64+
After you enable the feature, use the re-architecture agent in the GitHub Copilot Chat panel.
65+
66+
Use the following steps to re-architect a project:
67+
68+
1. Open your project in Visual Studio Code.
69+
70+
1. Open the **GitHub Copilot Chat** panel.
71+
72+
1. Select the **modernize-rearchitecture** agent from the agent list.
73+
74+
1. Describe the transformation you want to perform. For example:
75+
76+
```prompt
77+
Rewrite the entire project from Struts to Spring MVC
78+
```
79+
80+
The agent coordinates a multi-agent team that performs the following steps:
81+
82+
1. **Analysis** - Examines the existing codebase, identifying framework patterns, dependencies, and module boundaries.
83+
1. **Planning** - Generates a structured implementation plan with ordered tasks and requirement traceability.
84+
1. **Execution** - Applies code transformations following the plan, with validation checks at each step.
85+
86+
### Provide more context
87+
88+
You can improve the transformation results by providing additional context in your prompt:
89+
90+
- Specify target framework versions, for example, "Use Spring Boot 3.2 and Java 21."
91+
- Reference documentation links or migration guides.
92+
- Describe organization-specific patterns or conventions.
93+
- Indicate which modules or packages to prioritize.
94+
95+
For example:
96+
97+
```prompt
98+
Rewrite the entire project from Struts to Spring MVC using Spring Boot 3.2.
99+
Refer to the Spring MVC migration guide at https://docs.spring.io/spring-framework/reference/web/webmvc.html.
100+
Keep the existing backend business logic unchanged.
101+
```
102+
103+
## Limitations
104+
105+
Because this feature is in preview, the following limitations apply:
106+
107+
- Complex projects with deeply coupled legacy frameworks might require multiple iterations.
108+
- You should review generated code carefully before committing changes.
109+
110+
## Provide feedback
111+
112+
If you have any feedback about the re-architecture feature, [create an issue at the github-copilot-appmod repository](https://github.com/microsoft/github-copilot-appmod/issues/new?template=feedback-template.yml) or use the [GitHub Copilot modernization feedback form](https://aka.ms/ghcp-appmod/feedback).

articles/java/migration/toc.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ items:
1313
href: migrate-github-copilot-app-modernization-for-java.md
1414
- name: FAQ
1515
href: migrate-github-copilot-app-modernization-for-java-faq.yml
16+
- name: Portfolio assessment integration
17+
href: github-copilot-app-modernization-for-java-portfolio-assessment-integration.md
18+
- name: Copilot CLI
19+
href: github-copilot-app-modernization-for-java-copilot-cli.md
20+
- name: Coding agent
21+
href: github-copilot-app-modernization-for-java-coding-agent.md
1622
- name: Predefined tasks
1723
href: migrate-github-copilot-app-modernization-for-java-predefined-tasks.md
1824
- name: Working with assessment
@@ -36,7 +42,9 @@ items:
3642
- name: Migrate from Oracle to PostgreSQL
3743
href: migrate-github-copilot-app-modernization-for-java-oracle-to-postgresql.md
3844
- name: Migration via custom agent
39-
href: migrate-github-copilot-app-modernization-for-java-custom-agent.md
45+
href: migrate-github-copilot-app-modernization-for-java-custom-agent.md
46+
- name: Re-architect (preview)
47+
href: github-copilot-app-modernization-for-java-rearchitecture.md
4048
- name: Spring to Azure
4149
expanded: true
4250
items:

0 commit comments

Comments
 (0)