| name | modernize-legacy-system |
| description | Systematic legacy system modernization workflow covering code review and assessment, technical debt analysis, strategic refactoring, test coverage improvement, containerization, and CI/CD pipeline setup for a safe, incremental transition from legacy to modern architecture.
Use when the user wants to modernize legacy system or needs a structured multi-step process for this goal.
Do NOT use when the request is a single-step task or requires professional advice beyond educational guidance. |
| license | Apache-2.0 |
| type | workflow |
| skills | code-reviewer tech-debt-analyzer refactoring-guru unit-test-writer docker-engineer cicd-architect |
| trigger_phrases | modernize my legacy system how to refactor old code migrate legacy application reduce technical debt update old codebase legacy system migration plan |
| metadata | {"author":"foundry-skills","version":"1.0.0","tags":"refactoring devops step-by-step planning","category":"software-project","depends":"code-reviewer tech-debt-analyzer refactoring-guru unit-test-writer docker-engineer cicd-architect","disclaimer":"none","difficulty":"advanced"} |
Modernize Legacy System
Estimated time: 4-12 weeks
This workflow guides engineering teams through the disciplined process of
modernizing a legacy system. Rather than a risky big-bang rewrite, this workflow
follows the proven strangler fig pattern: assess the current state, build a
safety net of tests, refactor incrementally, containerize, and establish modern
CI/CD practices.
Each step is designed to reduce risk. You build confidence through understanding
before changing code, add tests before refactoring, and containerize before
deploying to new infrastructure.
By the end of this workflow you will have: a comprehensive understanding of
your codebase's health, a prioritized tech debt remediation plan, refactored
code with test coverage, Docker containers, and a CI/CD pipeline for safe
ongoing deployment.
When to Use
- User wants to modernize legacy system
- User needs a structured, step-by-step process for modernize legacy system
- modernize my legacy system
- how to refactor old code
- migrate legacy application
- Do NOT use when: the request is outside the scope of modernize legacy system or requires professional advice beyond educational guidance
- Do NOT use for single-step tasks that one atomic skill can handle independently
Prerequisites
Before starting this workflow, ensure:
- Access to the legacy system's source code and version control
- Ability to run the system locally or in a development environment
- Knowledge of the system's business purpose and critical paths
- Stakeholder buy-in for dedicated modernization time
- At least one developer who understands the existing system
Steps
Step 1: Review the Codebase (uses: code-reviewer)
perform a comprehensive assessment of the
legacy codebase. This is a diagnostic step -- understand before you change.
- Input: Access to the legacy codebase and its repository history, Any existing documentation (even if outdated), Knowledge of the system's primary use cases and critical paths
- Output: Comprehensive health report of the legacy system, Third-party dependency versions, vulnerabilities, and upgrade paths, Current system architecture documentation
- Key focus: Code structure analysis (module organization, dependency graph)
Step 2: Analyze Technical Debt (uses: tech-debt-analyzer)
quantify and prioritize the technical debt
in the system.
- Input:
codebase-assessment from Step 1 (code quality findings), dependency-audit from Step 1 (outdated and vulnerable dependencies), from Step 1 (business-critical areas to protect)