ANSWER
How do you find hidden business rules in a legacy system?
Reviewed · Reviewed by Paulo Pierrondi, founder.
Hidden business rules show up when you observe what the legacy system actually does, not what the manual says. Record real inputs and outputs over a full process cycle, read the code and logs where exceptions happen, and turn every behavior you find into a written rule with an owner, an example and a test criterion. A rule that is not written down does not enter the equivalence contract, and anything left outside the contract becomes a surprise at cutover.
Step by step
- Capture real inputs and outputs over a full process cycle, including month-end close and seasonal exceptions.
- Read the code, stored procedures and scheduled jobs looking for conditionals, parameter tables and hardcoded values.
- Interview the people who run the process and record manual adjustments, side spreadsheets and workarounds that became routine.
- Write each rule with an owner, a sample input, the expected output and evidence of where it was found.
- Validate the rules by running the replacement in parallel and treat each new variance as a possible unmapped rule.
How an agent does this
In AgenticosCore, discovery feeds the equivalence contract. The agent runs in shadow mode in Parallel, each variance becomes a candidate rule in Trail, and no new rule enters the contract without approval from one of your owners.
Frequently asked questions
Can you find the rules just by reading the code?
Rarely. Some rules live in parameters, historical data and team habits. The code shows what can happen, and observing real outputs shows what does happen.
What do you do with a rule nobody can explain?
Record it with the evidence you found and assign an owner to decide. It can be kept, fixed or retired, but the decision must be written down before cutover.
Primary sources
- Patterns of Legacy Displacement — martinfowler.com
- Managing legacy technology — GOV.UK