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/datacorp-sifap-modernization-team-kit --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/datacorp-sifap-modernization-team-kit/tree/main/.github/skills/code-modernization
Command: npx skills add https://github.com/serpro-workshop-fortaleza/datacorp-sifap-modernization-team-kit --skill code-modernization-serpro-workshop-fortaleza

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Legacy systems written in languages like COBOL or Natural/Adabas hide critical business rules in procedural code, making rewrites risky and error-prone. This Skill enforces a disciplined, behavior-preserving modernization workflow so teams understand the system before transforming it. ## Core Features & Use Cases - Staged Modernization Workflow: Seven ordered steps from brief and assessment through rule extraction, mapping, reimagining, transformation, and hardening. - Business Rule Extraction: Converts hidden procedural logic into business rule cards with source-code evidence, separating observed behavior from inferred intent. - Characterization Testing: Requires tests that pin legacy behavior before any intentional changes, with traceability from modern modules back to original requirements. - 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 module by module into Java 21 and Next.js while keeping full traceability. ## Quick Start Ask the AI to plan the modernization of a legacy module by first assessing the codebase and extracting its business rules before rewriting anything.

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 codebase without breaking existing behavior?▼

Follow a staged workflow: assess the codebase and extract business rules before transforming anything. Write characterization tests that pin the legacy behavior, then rewrite module by module so tests verify the new code matches the old behavior.

How to extract business rules from COBOL or Natural legacy programs?▼

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

What is a characterization test in legacy code migration?▼

A characterization test captures the current behavior of legacy code before changes, acting as a safety net during rewriting. It ensures transformed modules preserve existing behavior unless a change is intentional.

When should I not start rewriting legacy code?▼

Do not transform code before completing the assessment and business rule extraction stages. Rewriting without understanding modules, integrations, and hidden rules risks losing critical behavior that no one documented.

How do I maintain traceability between legacy code and modern modules?▼

Record each modernized module as an assessment note linking the legacy source file to the target module, the workflow stage reached, behavior evidence from tests, and the requirement ID it traces to.