Inspiration

News headlines from 2020: "NJ Unemployment System Crashes", "COBOL Programmers Called Out of Retirement"

In 2020, as the world locked down, critical banking and insurance systems froze—not from traffic, but from a silent failure: missing COBOL developers. Mainframes still processed 70% of global transactions… but no one could safely change them.

Banks worldwide struggle with billions of lines of legacy COBOL code that power critical financial systems. Complete rewrites are risky and expensive, yet modernization is essential for cloud adoption and innovation. We were inspired to create an AI-powered bridge that enables incremental, zero-cost modernization—allowing banks to transform legacy systems without the traditional risks and costs.

What it does

COBRA is an agentic AI orchestration system that analyzes COBOL banking code and generates modern AWS cloud infrastructure. It parses COBOL source files, extracts business logic patterns (interest calculations, transactions, batch processing), generates natural-language specifications, and produces production-ready Lambda functions, API Gateway configs, and CDK infrastructure code. The included web interface provides instant analysis and downloadable AWS artifacts—all running locally at zero cost during development.

How we built it

We built COBRA using TypeScript with a modular architecture: a custom COBOL parser for AST generation, pattern recognition engine for banking-specific logic, LLM integration (OpenAI/Anthropic) for natural-language explanations, and AWS code generators for Lambda, API Gateway, and CDK. We integrated it with Kiro IDE via Model Context Protocol (MCP) for seamless workflow automation. The demo web interface uses React + Vite frontend with Express.js backend, featuring Monaco Editor for COBOL syntax highlighting and Mermaid.js for architecture visualization. Performance optimizations include multi-tier caching, example preloading, and worker thread pools.

Challenges we ran into

The biggest challenges were: (1) Parsing diverse COBOL dialects (COBOL-85, COBOL-2002, IBM extensions) with varying syntax conventions, (2) Accurately recognizing banking-specific patterns from unstructured legacy code without documentation, (3) Generating production-ready AWS code that meets security and compliance requirements, (4) Achieving sub-30-second parse times for 10,000+ line files while maintaining accuracy, and (5) Designing a zero-cost architecture that works entirely locally without AWS infrastructure during development.

Accomplishments that we're proud of

We're proud of achieving true zero-cost development ($0 AWS charges), meeting all performance targets (10K lines in <30s, 80-95% cache hit rates), successfully parsing real-world banking COBOL with pattern recognition for interest calculations and transaction processing, generating production-ready AWS code with security best practices built-in, and creating a polished web interface with professional branding. The seamless Kiro IDE integration via MCP and comprehensive documentation make COBRA immediately usable for banking modernization projects.

What we learned

We learned the intricacies of COBOL banking systems and why they've survived 60+ years—their reliability and precision are unmatched. We discovered that incremental modernization is far more practical than big-bang rewrites. We gained deep expertise in LLM prompt engineering for code analysis, the importance of intelligent caching for cost control (80-95% savings), and how Model Context Protocol enables powerful IDE integrations. Most importantly, we learned that AI can bridge legacy and modern systems effectively when combined with domain-specific knowledge.

What's next for COBRA: COBOL Banking Resilience Agent

Next steps include: expanding COBOL dialect support (Micro Focus, GnuCOBOL), adding real-time collaboration features for team modernization projects, implementing automated testing generation from COBOL test cases, building a migration progress dashboard with cost tracking, creating pre-built templates for common banking operations, adding support for CICS and IMS transaction systems, integrating with CI/CD pipelines for automated deployments, and developing a marketplace for sharing modernization patterns. We also plan to add support for other legacy languages (PL/I, RPG) and expand cloud provider support beyond AWS.

Built With

Share this project:

Updates