modernize-extract-rules

Extract business rules from legacy code into structured rule cards and a DTO catalog.

15|6|Updated May 7, 2026
One-click install
npx skills add https://github.com/MinhThang1009/dotclaude --skill modernize-extract-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: modernize-extract-rules
Source: https://github.com/MinhThang1009/dotclaude/tree/main/plugins/code-modernization/skills/modernize-extract-rules
Command: npx skills add https://github.com/MinhThang1009/dotclaude --skill modernize-extract-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Legacy code often encodes essential business rules in complex logic and hard-to-read paths. This skill provides a structured approach to mine that logic into clear, testable rule specifications.

Core Features & Use Cases

  • Three parallel extractors for Calculations, Validations & eligibility, and State & lifecycle, enabling comprehensive rule discovery.
  • Synthesize, deduplicate, and present Rule Cards in a standardized format, plus a DTO catalog at analysis/$1/DATA_OBJECTS.md.
  • Use case: when legacy modules contain coupled logic for pricing, eligibility, and workflow, extract rules to enable automated testing and governance.

Quick Start

Provide legacy module path and optional module pattern; I will run three extractors in parallel and generate rule cards plus a DTO catalog.

Frequently Asked Questions about modernize-extract-rules

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

FAQPage Schema
How do I extract business rules from legacy code?

Extracting business rules from legacy code involves applying three parallel viewpoints—calculations, validations, and state transitions—to synthesize structured, testable rule cards and a data object catalog.

What is the best way to modernize legacy code into testable specifications?

Modernizing legacy code into testable specifications is best achieved by mining coupled logic through three parallel extractors, producing standardized Rule Cards and a DTO catalog for automated testing and governance.

How do I identify calculations and validations embedded in legacy modules?

Identify calculations and validations in legacy modules by applying parallel extraction viewpoints that target pricing logic, eligibility checks, and workflow transitions, then deduplicate findings into structured rule cards.

Can I generate a data object catalog alongside business rule extraction?

Yes, you can generate a data object catalog alongside business rule extraction; the process outputs a DTO catalog at analysis/$1/DATA_OBJECTS.md while synthesizing structured rule cards for the extracted logic.

When do I need to extract state and lifecycle rules from legacy code?

You need to extract state and lifecycle rules from legacy code when modules contain coupled workflow logic, enabling automated testing and governance by transforming transitions into clear, testable rule specifications.

Does this rule extraction approach support automated testing of legacy workflows?

Yes, this rule extraction approach supports automated testing by mining complex legacy paths and producing structured Rule Cards in a standardized format, separating calculations, validations, and state transitions for governance.