code-modernization

Modernize legacy codebases through staged assessment, business-rule extraction, and behavior-preserving transformation.

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/serpro-workshop-fortaleza/sifap-modernization-paula --skill code-modernization-serpro-workshop-fortaleza
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-modernization
Source: https://github.com/serpro-workshop-fortaleza/sifap-modernization-paula/tree/main/.github/skills/code-modernization
Command: npx skills add https://github.com/serpro-workshop-fortaleza/sifap-modernization-paula --skill code-modernization-serpro-workshop-fortaleza

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Rewriting legacy systems like COBOL or Natural/Adabas without losing hidden business logic is risky. This Skill enforces a disciplined, staged workflow so teams understand the legacy system before transforming it, keeping full traceability from modern code back to original business rules. ## Core Features & Use Cases - Staged Modernization Workflow: Seven steps from brief and assessment through rule extraction, mapping, redesign, transformation, and hardening. - Business Rule Extraction: Converts hidden procedural logic into business rule cards with source-code evidence, separating observed behavior from inferred intent. - Behavior-Preserving Transformation: Uses characterization tests to pin legacy behavior before rewriting modules into backend/ and frontend/ targets. - Use Case: A team modernizing a 29-year-old Natural/Adabas payment system uses this Skill to inventory modules, extract business rules with file citations, then rewrite each module in Java 21 and Next.js 15 with tests proving equivalent behavior. ## Quick Start Ask the assistant to plan the modernization of a legacy module, starting with an assessment and business rule extraction before any code transformation.

Frequently Asked Questions about code-modernization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I modernize a legacy COBOL or Natural/Adabas system safely?

Follow a staged workflow: assess the codebase, extract business rules with source evidence, map legacy modules to target domains, then transform module by module. Use characterization tests to pin legacy behavior before rewriting anything.

How to extract business rules from legacy code?

Convert hidden procedural logic into business rule cards, each citing the source file and line numbers where available. Separate observed behavior from inferred intent, and flag open questions that need human validation.

What are characterization tests in legacy modernization?

Characterization tests capture the current behavior of legacy code before changes are made. They act as a safety net so transformed modules in backend/ or frontend/ can be verified against the original system's behavior.

When should I not start rewriting legacy code?

Never transform code before completing the assessment and business rule extraction stages. Rewriting without understanding integrations, complexity, and hidden rules risks losing critical behavior that only exists in the legacy source.

Can modernization metrics like complexity and cost be estimated?

Only use measured values from inventory tools like scc or cloc, or explicitly label figures as assumptions. Invented complexity, cost, runtime, or risk metrics undermine the credibility of the modernization plan.