Definition
The percentage of identifiable business rules in legacy source code that are functionally preserved (producing identical outputs for identical inputs) after AI-driven modernization, measured by input/output equivalence testing against the legacy system.
The Measurement Gap
There is no metric that tells you whether AI-driven modernization preserves the original business logic encoded in legacy code, which means framework upgrades and language migrations can silently alter business rules.
Formula
Plain language: Before modernization, identify and catalog the business rules in the legacy code (conditional logic, calculation formulas, validation rules, edge-case handlers). After modernization, run the same test inputs through both the legacy code and the modernized code. Compare outputs. The BLPS is the percentage of business rules that produce identical outputs in both systems.
Notation:
BLPS = (BR_preserved / BR_identified) × 100
Variables:
- BR_preserved = business rules where legacy output exactly matches modernized output for all test inputs (count, DERIVED from equivalence testing)
- BR_identified = total business rules identified in the legacy code prior to modernization (count, DERIVED from business rule extraction)
Business rule identification methods:
- Automated: static analysis tools that identify conditional branches, calculation formulas, validation logic, and exception handlers. (INTEGRATION)
- Semi-automated: AI-assisted code review that flags code blocks containing business logic vs. infrastructure/framework code. (DERIVED)
- Manual: domain expert review identifying rules that encode regulatory requirements, contractual obligations, or institutional decisions. (MANUAL)
Proposed formula, pending validation pilots.
At a Glance
Decision Supported
When we tell the AI to modernize a legacy codebase, is it preserving the business rules that matter, or is it silently altering behavior while producing syntactically correct code that passes AI-generated tests?