Resources · Documentation
In short
Documentation generated from code alone misses much of what a legacy system does. Recover the rules by combining observed production behavior, a reading of code, schema and reports, and review with the owners who know the business. Write each rule as a testable requirement with its source, and track what is covered and what is still a gap.
Legacy systems accumulate rules over years: a pricing exception for one customer group, a rounding choice finance relies on, a nightly job that fixes records nobody else touches. The people who asked for them move on. The documentation, if there was any, stops being updated. The system keeps running the rules faithfully, and it becomes the only complete record of how the business works.
Generating documentation from source code is useful, but it describes what the code could do rather than what the business relies on. It misses several things:
Buyers need coverage: confidence that the important behavior has been found and confirmed. Volume of generated text is not coverage.
Instrument the running system to record requests, jobs, queries, errors and business outcomes across representative workflows and business cycles, including month-end and other rare events. Redact sensitive payloads. Treat what has not been observed as an explicit gap.
Use the code, schema, migrations and report definitions to explain what was observed and to find paths that were not. Map report fields back to the data and rules that produce them.
Put what you found in front of the people who know the business. Evidence makes the conversation concrete: "on the 14th, 312 invoice lines were created with a zero amount; is that intended?" gets a better answer than "how does invoicing work?".
Give each rule a stable ID and write it in a structured, testable form. For example: While an allocation has no rate card, the system shall flag the invoice line as unbillable rather than invoicing at zero. Link each requirement to where it came from and, later, to the work that implements it.
Agree a confidence threshold with owners and engineers for the workflow in scope: critical rules, data states, exceptions and business cycles. Record what is known, what is uncertain and what has been deliberately excluded.
Recovered rules are only valuable while they stay true. Link documentation to the work that changes the system, so that when a change reaches done the relevant pages are updated. Then the next change starts from what is known rather than from memory.
Book a 30-minute conversation about one priority and the system behind it. You leave with a practical first step.