
Kiro Compresses AS/400 Business Rule Extraction from 6 Weeks to 3 Days
Cloud Platform EngineeringLegacy modernization projects die in the discovery phase. Before a line of replacement code can be written, the existing system’s business rules — encoded across decades of RPG, COBOL, and undocumented patches — need to be understood well enough to replicate. That discovery process, typically running 4 to 6 weeks for a 40K line codebase, is where migrations stall and budgets exhaust.
The AWS DevOps Blog published a Kiro-based workflow this week that compresses that window to roughly 3 days.
The Problem with Manual Business Rule Extraction
AS/400 systems — IBM’s mid-range platform that has run enterprise business logic since the 1980s — commonly contain business rules that exist nowhere except in the code. No documentation was written, the original developers left decades ago, and the system keeps running because no one has successfully replaced it.
Manual extraction requires developers to read RPG or COBOL code, understand the control flow, identify the embedded business logic, and translate it into something a modern system can implement. For complex financial, inventory, or process control systems, a single 40K line application can take 4 to 6 weeks of focused engineering time just to document — before any replacement work begins.
Person-hours at that level routinely consume 30-50% of total project budgets before a prototype exists.
The Three-Phase Kiro Process
Kiro’s business rule extraction operates in three phases:
Phase 1: Config The developer provides Kiro with the codebase entry point, target documentation format, and scope boundaries — which modules to analyze, which to exclude, what terminology to use for business domain concepts. This configuration step establishes the analysis context and prevents Kiro from generating documentation that doesn’t map to the business domain’s actual vocabulary.
Phase 2: Task Definition Kiro analyzes the code structure to generate a task list: which RPG programs or COBOL procedures contain extractable business logic, in what order they should be analyzed, and how they relate to each other. This phase produces the roadmap for systematic extraction and surfaces dependencies that would otherwise be discovered ad-hoc mid-extraction.
Phase 3: Execution Kiro works through the task list, reading each program, inferring the business rules embedded in the control flow, and generating structured documentation. For a 40K line codebase, this produces approximately 50 pages of structured documentation — covering inputs, outputs, conditions, exception handling, and the business intent behind each module.
What the Numbers Mean
The AWS blog cites 70-85% reduction in person-hours and a compression from 4-6 weeks to approximately 3 days. At face value, those numbers require a sanity check: they’re plausible because most of the time in manual extraction is reading and comprehension, not writing. A senior developer reading RPG programs they’ve never seen before might spend 90% of their time understanding what the code does and 10% documenting it. Kiro inverts that ratio — reading and comprehension happen at machine speed; the human reviews and corrects the output.
The output quality caveat matters: 50 pages of structured documentation for 40K lines of code is a starting point, not a finished specification. Business rules that depend on environmental state, external system behavior, or tacit knowledge embedded in undocumented patches will still require human validation. Kiro’s output is a first pass at the discovery problem, not a complete substitute for experienced legacy engineering.
The value is in the first pass being done in hours rather than weeks.
The Existing Kiro Landscape
Kiro has accumulated a growing library of DevOps use cases: incident remediation, threat modeling, CVE workflows, Bedrock knowledge base integration, client-protocol decoupling. The AS/400 extraction use case is the first that targets the legacy modernization problem specifically — a different buyer, a different workflow, and a different risk profile than Kiro’s DevOps-native deployments.
Legacy modernization teams haven’t typically been the target audience for AI-assisted tooling because the codebase formats (RPG, COBOL, PL/I) are less well-represented in training data than modern languages. The fact that Kiro can operate at 70-85% efficiency on RPG and COBOL is the result worth testing — it suggests the comprehension gap for legacy languages is narrower than commonly assumed.
The So What
Business rule extraction from AS/400 codebases is a bottleneck that shapes the economics of an entire modernization project. Compressing a 4-6 week manual process to 3 days doesn’t just accelerate discovery — it changes the risk calculus of whether to modernize at all. Projects that stall because discovery costs too much in time and budget become viable when extraction can be automated at this efficiency.
For platform teams evaluating whether to modernize legacy systems: the Kiro workflow on AS/400 is a test worth running on a small codebase before committing to a full modernization budget. If the output quality holds on your specific RPG/COBOL patterns, the business case for the full project changes significantly.
Source: AWS DevOps Blog
Content created with AI assistance and reviewed for accuracy.
Join the conversation
Stack Insiders is our free community for readers who want to go deeper — share resources, ask questions, and connect with others across every vertical we cover.
Join Stack Insiders →