๐ค AI Summary
This work addresses the challenge of high evolutionary risk in legacy systems, where implicit business rules and architectural decisions are difficult for AI agents to reliably interpret. To mitigate this, the authors propose a multi-agent pipeline that transforms legacy code into traceable, unit-level specifications through structural mapping, modular analysis, implicit rule extraction, and architectural synthesis. The approach innovatively incorporates code-to-specification traceability, explicit confidence annotations, and knowledge gap identification to ensure the safety of AI-driven evolution. Implemented as a Node.js CLI tool integrated with a multi-agent engine, the system tracks changes via SHA-256 hashes and outputs Gherkin scenarios alongside structured declarative specifications. Evaluated on a COBOL-to-Go ATM migration case study, it generated 517 confidence-annotated statements, 53 Gherkin scenarios, identified 10 knowledge gaps, and successfully completed 9 out of 11 targeted refactorings.
๐ Abstract
Legacy systems concentrate business rules, architectural decisions, and operational exceptions that often remain implicit in code, data, configuration, and
maintenance practices. At the same time, language-model-based coding agents depend on reliable context, correctness criteria, and behavioral contracts to
modify real systems with lower risk. This paper presents Reversa, a reverse documentation engineering framework for converting legacy software into
traceable operational specifications for AI agents. Reversa organizes this process as a multi-agent pipeline: specialized agents map the project surface,
analyze modules, extract implicit rules, synthesize architecture, write unit-level specifications, and review generated claims. The proposal emphasizes
three mechanisms: traceability between code and specification, explicit confidence marking, and preservation of gaps for human validation. The framework is
distributed as a Node.js CLI, installs skills across multiple agent engines, and uses a SHA-256 manifest to preserve modified files during update or
uninstall operations. In addition to the architectural description, we report an exploratory case study on migrating an ATM from COBOL to Go, in which the
pipeline produced 517 claims classified by an internal confidence index, 10 registered gaps, 53 Gherkin parity scenarios, and a reconstruction plan with 9
of 11 tasks completed at inventory time. Final parity validation and cutover were not completed in this study. We do not claim broad empirical superiority;
we position the contribution with respect to the literature on reverse engineering, LLM-based documentation, and software agents, and propose an evaluation
protocol with metrics for coverage, traceability, confidence, utility, and cost.