Inspiration
95% of ATM transactions still run on COBOL. Enterprises spend over $100 billion annually maintaining legacy mainframe systems. Having spent 22 years in mainframe modernization for tier-1 banks and insurers, I've seen teams spend weeks manually reading through programs, extracting business logic, and writing migration plans before a single line of modern code gets written.
COBOL Compass automates that painful first 80%.
What it does
COBOL Compass is a suite of 3 AI agents and 1 orchestrated flow on the GitLab Duo Agent Platform that transforms legacy code assessment from weeks of manual work into minutes.
Three specialized agents:
- COBOL Scanner — Scans a GitLab repo for .cbl, .cob, and .cpy files. Produces a structured inventory with lines of code, divisions, copybook references, external dependencies, and complexity ratings.
- COBOL Analyzer — Deep-dives into individual programs producing: plain English explanations, extracted business rules with priorities, complexity scores, risk flags, and migration recommendations. Automatically creates GitLab epics and issues with acceptance criteria and effort estimates.
- COBOL Modernizer — Converts COBOL programs to Python with full test suites, commits the code to the repo, and opens a merge request ready for review.
One orchestrated flow:
- Full Modernization Assessment — Chains all three agents: Scan → Analyze → Modernize. One trigger, complete assessment.
How I built it
Built using GitLab Duo Agent Platform custom agents and flows. Each agent is powered by Anthropic's Claude models (default in GitLab Duo) with carefully crafted system prompts encoding 22 years of mainframe modernization methodology — covering COBOL-85, CICS, DB2, VSAM, JCL, copybook patterns, and enterprise migration strategies. The sample COBOL programs represent real-world patterns from banking and insurance — from simple batch calculations to complex online transaction programs with DB2 cursors and CICS screen handling.
What it accomplishes
In a single session, COBOL Compass:
- Scanned a repository and produced a complete modernization inventory
- Analyzed a complex loan processing program and automatically created 22 GitLab issues with an epic, acceptance criteria, and effort estimates
- Converted a COBOL program to Python with 50+ test cases, committed the code, and opened a merge request
Challenges I faced
Encoding deep domain expertise into system prompts that produce consistent, structured output. COBOL has decades of dialect variations, vendor extensions, and implicit behaviors (like automatic truncation in MOVE statements) that generic AI models miss. Getting the agents to reliably identify business rules buried in nested PERFORM loops and EVALUATE statements required iterating with real-world patterns.
What I learned
The GitLab Duo Agent Platform is well-suited for legacy modernization. It's fundamentally a DevSecOps lifecycle problem — touching code analysis, security assessment, compliance, planning, and deployment. Agents that can read project context and create issues, commits, and merge requests directly in GitLab make the output immediately actionable.
What's next
- Expand to PL/I, JCL, and VSAM file definitions
- Add a Cost Estimator agent for person-day calculations
- CI/CD integration to run assessments on every push to a legacy branch
- Enterprise pilot with a tier-1 banking client
Built With
- anthropic-claude
- cobol
- gitlab-duo-agent-platform
- google-cloud
- python
- yaml
Log in or sign up for Devpost to join the conversation.