---
title: "How to choose the next safe step in application modernization"
description: "Before picking a replacement framework, build an evidence inventory of what an application actually runs on and still does, then choose the least disruptive treatment per component: keep, upgrade, swap, wrap, or rewrite only when evidence justifies it."
url: "https://swe.quest/articles/how-to-choose-the-next-safe-step-in-application-modernization-67d91582b346269d"
canonical: "https://blog.github.com/ai-and-ml/github-copilot/how-to-choose-the-next-safe-step-in-application-modernization/"
source: "GitHub Engineering"
published: "2026-11-25"
difficulty: "medium"
kind: "Case study"
reading_minutes: 9
tags: ["refactoring","testing","jvm","ai-agents","ci-cd"]
---

# How to choose the next safe step in application modernization

A post on [GitHub Engineering](https://swe.quest/sources/github.md), published 2026-11-25, 9 min read, Case study. Original: [https://blog.github.com/ai-and-ml/github-copilot/how-to-choose-the-next-safe-step-in-application-modernization/](https://blog.github.com/ai-and-ml/github-copilot/how-to-choose-the-next-safe-step-in-application-modernization/)

## Summary

Before picking a replacement framework, build an evidence inventory of what an application actually runs on and still does, then choose the least disruptive treatment per component: keep, upgrade, swap, wrap, or rewrite only when evidence justifies it. A time-boxed feasibility check decides between capturing legacy behavior and then upgrading, or building a thin modern slice first when the old code cannot run. Explicit safety levels (L0–L4) state how much regression protection actually exists. Applied to PiggyMetrics, BrowserQuest, DOOM and ADempiere, the method showed that a single broken embedded-MongoDB test dependency, not the architecture, was blocking PiggyMetrics, and the procedure is now packaged as the doc-and-modernize Copilot agent skill.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Refactoring & migrations](https://swe.quest/tags/refactoring.md) (Engineering practices)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [Java & JVM](https://swe.quest/tags/jvm.md) (Languages)
- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [CI/CD](https://swe.quest/tags/ci-cd.md) (Reliability & operations)

## Prerequisites

- regression testing ([easy posts on Testing](https://swe.quest/tags/testing.md?difficulty=easy))
- dependency management ([easy posts on Engineering management](https://swe.quest/tags/engineering-management.md?difficulty=easy))
- CI pipelines ([easy posts on CI/CD](https://swe.quest/tags/ci-cd.md?difficulty=easy))

## Keywords

GitHub Copilot, doc-and-modernize, PiggyMetrics, Spring Boot, ADempiere, Testcontainers, BrowserQuest, DOOM

## Related posts

- [ScarfBench: Benchmarking AI Agents for Enterprise Java Framework Migration](https://swe.quest/articles/scarfbench-benchmarking-ai-agents-for-enterprise-java-framework-migration-946bb68c0f7d1d1f.md): Hugging Face · 2026-06-30 · Easy · 5 min read · AI for coding, Evaluation, Java & JVM, Refactoring & migrations, AI agents
  ScarfBench is an open benchmark of 34 enterprise Java applications (102 implementations, 204 migration tasks, ~151K LOC, 1,331 expert-written tests) for evaluating AI agents on migrations between Spring, Jakarta EE and Quarkus, scored on whether the result builds, deploys and preserves behavior.
- [How We Fixed the Dependency Confusion Vulnerability in Over 600 Ruby Applications](https://swe.quest/articles/how-we-fixed-the-dependency-confusion-vulnerability-in-over-600-ruby-14f9a0a0836510b2.md): Shopify Engineering · 2022-01-27 · Medium · 9 min read · Supply chain security, Ruby, Refactoring & migrations, CI/CD
  Shopify closed a dependency confusion hole across roughly 600 Ruby applications by migrating each \`Gemfile.lock\` to Bundler's newer format, which pins every gem to an explicit source.
- [The Case Against Monkey Patching, From a Rails Core Team Member](https://swe.quest/articles/the-case-against-monkey-patching-from-a-rails-core-team-member-b0bd43ce3a761b2b.md): Shopify Engineering · 2023-02-21 · Medium · 14 min read · Ruby, Refactoring & migrations, Open source
  Monkey patching Rails and other gems is brittle and should be avoided.
- [Taking the fear out of migrations](https://swe.quest/articles/taking-the-fear-out-of-migrations-570a94639201ef71.md): incident.io · 2023-02-28 · Medium · 9 min read · Schema migrations, Databases, Deployment
  Data model migrations can be made low-risk with a four-step playbook: create the new model, dual-write to old and new (backfilling dependent and existing data with rerunnable jobs), read from both and alert on mismatches before switching reads behind a feature flag, then stop writing to and drop the old model. incident.io walks through the pattern using its move from hard-coded string incident statuses to a per-organisation incident\_statuses table.
- [How to Write Code Without Having to Read It](https://swe.quest/articles/how-to-write-code-without-having-to-read-it-1700fbc56278687d.md): Shopify Engineering · 2022-10-11 · Medium · 12 min read · Type systems, Testing, Refactoring & migrations, TypeScript, Developer productivity
  Engineers can safely change unfamiliar code with minimal reading by letting the compiler, linter and unit tests guide them: locate the entrypoint via user-visible strings (or git bisect for regressions), make the breaking change at the leaf component, then climb the callstack following build errors and sweep back down via lint errors, exhaustive switches and test failures.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
