Modernization Agent
A human-in-the-loop legacy modernization workflow that reads every service, repository and controller file in a codebase, documents each business feature in its own markdown file, then proposes a modern stack and a step-by-step migration plan.
Overview
Modernization Agent is built for the part of a legacy migration that usually gets skipped: actually understanding what the old system does before replacing it. It reads every business logic file rather than sampling a few, and won't move to recommendations until that reading is complete.
How it works
- It identifies the tech stack and architectural pattern from project and manifest files, then catalogs every service, repository, domain model and controller it needs to read.
- It reads each of those files individually and groups them by business feature (for example CarModel or DriverManagement), rather than summarizing the codebase at a high level.
- For every feature it finds, it writes a dedicated markdown file under
/docs/features/with the feature's purpose, business rules, workflows and specific code references down to file and line number. - It re-reads all the generated feature docs to synthesize a single
/docs/README.md, and reports its file coverage (for example "40/40 files analyzed") before asking whether the analysis is complete. - Once you approve the analysis, it proposes a modern stack and
architecture with its reasoning, then generates an implementation plan
and a
/modernizedone/folder structure that starts with shared cross-cutting code before migrating individual features.
Examples
"Help me modernize this ASP.NET WebForms app."
The agent works through all nine steps of its workflow autonomously, reporting progress ("Analyzed 5/12 features") without stopping, and only pauses at the two checkpoints: after the full analysis, and after proposing a new stack.
Notes
This is a heavyweight agent meant for repositories with real depth (the instructions call out 1000+ files or complex business logic as the sweet spot). For a small script or a simple app, a lighter refactor agent will be faster.
Installation
You need VS Code with the GitHub Copilot extension.
- Create the agents folder and download the file into your repo:
mkdir -p .github/agents curl -o .github/agents/modernization.agent.md \ https://raw.githubusercontent.com/github/awesome-copilot/main/agents/modernization.agent.md - Reload VS Code, or open a new Copilot Chat; custom agents under
.github/agents/are picked up automatically. - Pick this agent from the mode picker in Copilot Chat and point it at a legacy app to confirm it starts reading files instead of proposing a stack right away.
Related assets
Context7
Pulls updated, version-specific documentation and code examples straight from the source into your prompt, so agents stop citing outdated APIs or hallucinating ones that don't exist.
Accessibility Expert
Reviews code and designs against WCAG 2.1/2.2, covering semantics, keyboard and focus behavior, forms, media and dynamic SPA updates, and ships framework-specific examples plus a CI setup for automated checks.
Address Comments Agent
Works through pull request review comments one at a time: applies the minimal fix for each, pushes back on comments that don't make sense, adds test coverage, and commits with a descriptive message before moving to the next comment.