What makes a modernization step safe enough to try?
GitHub published a repeatable method for picking the next modernization step without rewriting the whole system. The approach relies on evidence collected from the running application and a set of safety levels that describe what kind of regression protection actually exists.
The evidence-first method
A modernization request usually starts with a technology question. Which framework should replace the old one? Sam Quakenbush, a senior solutions engineer at GitHub, argues that the first step is to find out what still works. He applied the same process to four public applications: a small Node.js game, a Java microservices demo called PiggyMetrics, a DOOM port, and ADempiere, a large Java ERP suite. Each needed a different treatment, but the way evidence was collected, the next experiment chosen, and possible proof points decided was repeatable.
Before proposing any change, build a small evidence inventory. Manifests, lockfiles, entry points, and deployable components. Verified commands for installing, building, testing, packaging, and running. Runtime pins in containers, CI workflows, deployment files, and developer tooling. External contracts such as APIs, database behavior, file formats, and user workflows. End-of-life frameworks and dependencies, with evidence that the application still uses them.
Record uncertainty while you work. Quakenbush uses three labels: documented, inferred, and unverified. If two files disagree about the Java version, resolve the contradiction. If you cannot determine whether a CI check blocks merges, say so. Record the unknown rather than treating a guess as a finding. That inventory gives you something concrete to review with the people who own the application before you propose changes.
How the safety levels work
Once you understand the application, decide per component. A single system can contain code that should stay, dependencies that should be swapped, and one subsystem that genuinely needs a rewrite. For a capability you still need, start with the option that changes the least. Keep it. Upgrade it. Swap it. Wrap it. Rewrite it. This is a decision order, not a universal ranking of effort or risk. Ask what evidence justifies choosing a more disruptive option. A known vulnerability with no patched release for the pinned version, a dependency that fails on the required runtime, or a measured reliability target the current design cannot meet can justify escalation.
The next question is whether the component can run well enough to produce evidence, even if the legacy CI pipeline is not green. Run a time-boxed feasibility check. Try to install dependencies, build on an available toolchain, start the component, and execute at least one meaningful test. Stop when the time box expires. The result sends you down one of two paths. Capture behavior, then upgrade. Use this path when the old application can still run at an acceptable cost. Record its externally visible behavior, fix the test harness where practical, and use those checks to verify the upgrade. Build a small modern slice first. Use this path when the old component cannot run until you have already changed it. Move the thinnest useful workflow to supported technology, prove it, and expand from there.
Quakenbush defines five safety levels adapted from the doc-and-modernize skill. L0: no usable regression net; treat the old code and available documentation as the specification. L1: small reversible changes with old and new paths in parallel, plus smoke checks and domain review. L2: captured inputs and outputs, snapshots, or other behavioral comparisons. L3: automated checks cover part of the system, with the remaining gaps named. L4: an automated CI gate combines lint, unit, behavioral, and end-to-end checks for the agreed scope. Even an L4 gate cannot establish that every possible behavior is correct. APIs, database effects, files, rendered output, and business workflows often make durable comparison points because those behaviors can survive a framework or language change.
Four applications, four different answers
PiggyMetrics was the clearest example of an application that looked worse than it was. The project used Java 8, Spring Boot 2.0.3, Spring Cloud Finchley, Zuul, Hystrix, and the old spring-security-oauth2 library. The feasibility check told a different story. Two probes against the legacy checkout with JDK 8 produced these recorded results. Command mvn -pl config -am compile exited with code 0. The selected config module and required reactor dependencies compiled. Command mvn -pl account-service -am test ran 14 tests: five passed and nine errored. Some service logic passed; embedded MongoDB initialization blocked the other tests.
The nine errors traced through Failed to load ApplicationContext to an embedded MongoDB download returning HTTP 403. The pinned binary also targeted i386, which would not run on the Apple Silicon host. The probes did not establish that the whole application ran or that its integration behavior was correct. They did give a narrower next step: replace the test dependency and rerun the affected tests before changing the production stack. That result saved Quakenbush from making a very tidy, very expensive mistake. He had already started thinking about which parts of the architecture he might replace. One broken test dependency did not justify redesigning the application, and five passing tests established behavior he could check for unintended changes during modernization.
The modernization plan turned that evidence into a capture-then-upgrade sequence. Replace the embedded database dependency with Testcontainers and establish a green baseline on the existing stack. Put that baseline in GitHub Actions before changing the production runtime. Move from Java 8 to Java 21 and Spring Boot 3.3. Replace obsolete components behind their existing interfaces: Zuul with Spring Cloud Gateway, Hystrix with Resilience4j, and the retired OAuth stack with Spring Authorization Server and JSON Web Token (JWT) resource servers. Carry the baseline forward and add contract checks around the parts whose behavior changed. The first acceptance gate was a passing baseline on the old stack, not merely the successful installation of a replacement dependency. Running checks in CI and enforcing them as merge requirements were also separate steps in the plan. The in-scope build went from nine modules to seven. Those versions describe the experiment, not a recommendation to select the same versions today.
The same process produced different answers on two smaller applications. BrowserQuest kept the canvas renderer, pathfinding, world model, protocol, and game-loop model. Node 0.4.7 moved to Node 22. Two obsolete WebSocket stacks moved to ws. Tests and GitHub Actions were added. Strategy: upgrade and swap. DOOM kept the renderer, 35 Hz simulation model, and WAD game-data format. X11 video and OSS audio were replaced with SDL2; platform code adapted for modern 64-bit systems. Strategy: preserve the core and replace the platform. DOOM's checks froze outputs from the modernized engine itself. They protected against later regressions; they did not independently prove parity with a period-correct legacy binary. Naming that limit is part of choosing an honest safety level.
Turning the method into a Copilot skill
Scaling the method to ADempiere, a large Java suite covering ERP, customer relationship management, manufacturing, supply chain, accounting, and point of sale, changed the controls but not the method. The work established a reproducible build, moved the runtime to JDK 21, preserved SOAP web-service contracts while replacing XFire with CXF and Jakarta, captured legacy web behavior, and introduced a modern web path for selected users. The first modern business partner write was compared with a result frozen from the legacy application. The fixed measurement report covers 30 merged modernization pull requests and 102,587.72 reconstructed Copilot credits through the first accepted portable demo. The credit total is not a dollar cost. More important, the report says exactly what the result was not: it was not a claim that every ADempiere screen or production deployment had been modernized. Quakenbush stopped because the proof-of-concept question had been answered. The result demonstrated a build on the selected runtime, old and new paths running together, and a real business write checked against the legacy result. Completing the rest would have required a product funding decision, not another technical proof. Stopping at that boundary was part of the method.
After repeating this work, Quakenbush encoded the evidence checklist and decision rules in the public doc-and-modernize agent skill. Agent skills are folders of instructions, scripts, and resources that Copilot can load when a task is relevant. A project skill can live with one repository. Only SKILL.md is required; resource folders are optional. The file needs YAML frontmatter with a name and a description explaining what the skill does and when to use it, followed by the instructions. Its decision fork: if the old component can run at an acceptable cost, capture its behavior before upgrading. If it cannot run without changes, build and verify a small modern slice first, then expand it. The full skill adds the feasibility check, testability milestone, safety levels, phase gates, and evidence requirements.
The useful distinction is procedure versus policy. A shared skill can require repository evidence, bounded experiments, explicit safety levels, and runnable exit criteria. Your organization still needs to supply the parts only it knows: approved runtimes, frameworks, and hosting services; application criticality and acceptable residual risk; security, compliance, and change-control requirements; which legacy or production results may be used as the expected answer; who can approve the architecture and declare a production change complete. The skill should make those decisions visible. It should not make them for you.
Where the method stops
Choose an application with an identified owner, known business value, and one workflow you can observe. Run the documentation workflow first. Review the architecture, commands, runtime surfaces, and unknowns with the people who own the system. Then approve one experiment, not a portfolio rewrite. Inspect the skill and its supporting files before adding it to a project. GitHub CLI's gh skill commands are in public preview; check the current installation guidance when you are ready to use them. The method does not tell you which versions to pick today. It does not claim that every screen or deployment is modernized. It gives you a way to decide the next step with evidence instead of a guess.
The sources this article was written from
- "GitHub Blog
https://github.blog/ai-and-ml/github-copilot/how-to-choose-the-next-safe-step-in-application-modernization/"